diff --git a/lean/OAI/Geometry/SplitTangent/GlobalProducts.lean b/lean/OAI/Geometry/SplitTangent/GlobalProducts.lean new file mode 100644 index 0000000000000000000000000000000000000000..c0a451d584a168a92d8deca79f1103d97ecfe29f --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/GlobalProducts.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Geometry.SplitTangent.CoveringProductBackend +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.HolomorphicLocalDiffeomorph +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.ProductCriteria + +namespace OAI + +/-! Global Products. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +namespace SplitTangent +universe u + + + +def compact_analytic_diffeomorph {X Y : ComplexManifold.{u}} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] [SimplyConnectedSpace Y.Carrier] + (f : X.Carrier → Y.Carrier) + (hf : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω f) + (hb : ∀x, Function.Bijective (mfderiv (ModelWithCorners X) (ModelWithCorners Y) f x)) : + Diffeomorph (ModelWithCorners X) (ModelWithCorners Y) X.Carrier Y.Carrier ω := by + let : LocallyPathConnectedSpace Y.Carrier := ChartedSpace.locallyPathConnectedSpace (Model Y) Y.Carrier + have hl : IsLocalDiffeomorph (ModelWithCorners X) (ModelWithCorners Y) ω f := + fun x => HolomorphicLocalDiffeomorph.manifold_ift (hf x) (hb x) + exact hl.diffeomorphOfBijective + (CoveringProductBackend.compact_local_homeomorph_bijective hl.isLocalHomeomorph) + +namespace TangentSplitting +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +theorem compatible_product_of_quotients [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (e : ProjectiveEmbedding X) (Y Z : ComplexManifold.{u}) + [SimplyConnectedSpace Y.Carrier] [SimplyConnectedSpace Z.Carrier] + (q₁ : X.Carrier → Y.Carrier) (q₂ : X.Carrier → Z.Carrier) + (hq₁ : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω q₁) + (hq₂ : ContMDiff (ModelWithCorners X) (ModelWithCorners Z) ω q₂) + (hs₁ : ∀x, Function.Surjective (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x)) + (hs₂ : ∀x, Function.Surjective (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x)) + (hk₁ : ∀x, LinearMap.ker (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x).toLinearMap= + S.second x) + (hk₂ : ∀x, LinearMap.ker (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x).toLinearMap= + S.first x) : HasCompatibleProjectiveProduct X S := by + let : ChartedSpace (Model Y × Model Z) (Y.Carrier × Z.Carrier) := + prodChartedSpace (Model Y) Y.Carrier (Model Z) Z.Carrier + let : IsManifold 𝓘(ℂ,Model Y × Model Z) ω (Y.Carrier × Z.Carrier) := by + rw [modelWithCornersSelf_prod] + exact IsManifold.prod Y.Carrier Z.Carrier + let q : X.Carrier → Y.Carrier × Z.Carrier := fun x => (q₁ x,q₂ x) + let I := (ModelWithCorners Y).prod (ModelWithCorners Z) + have hq : ContMDiff (ModelWithCorners X) I ω q := hq₁.prodMk hq₂ + have hd (x : X.Carrier) : mfderiv (ModelWithCorners X) I q x= + (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x).prod + (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x) := + mfderiv_prodMk ((hq₁ x).mdifferentiableAt (by simp)) ((hq₂ x).mdifferentiableAt (by simp)) + have hb (x : X.Carrier) : Function.Bijective (mfderiv (ModelWithCorners X) I q x) := by + rw [hd] + exact HolomorphicFrobenius.complementary_quotients_bijective + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₁ x) (hs₂ x) (hk₁ x) (hk₂ x) + let : SimplyConnectedSpace (Y.Carrier × Z.Carrier) := + CoveringProductBackend.simplyConnected_product + let : LocallyPathConnectedSpace Y.Carrier := ChartedSpace.locallyPathConnectedSpace (Model Y) Y.Carrier + let : LocallyPathConnectedSpace Z.Carrier := ChartedSpace.locallyPathConnectedSpace (Model Z) Z.Carrier + have hl : IsLocalDiffeomorph (ModelWithCorners X) I ω q := by + intro x + have hI : I=𝓘(ℂ,Model Y × Model Z) := modelWithCornersSelf_prod.symm + rw [hI] at hq hb ⊢ + exact HolomorphicLocalDiffeomorph.manifold_ift (hq x) (hb x) + let f : Diffeomorph (ModelWithCorners X) I X.Carrier (Y.Carrier × Z.Carrier) ω := + hl.diffeomorphOfBijective + (CoveringProductBackend.compact_local_homeomorph_bijective hl.isLocalHomeomorph) + have hf : (f : X.Carrier → Y.Carrier × Z.Carrier)=q := rfl + obtain ⟨hY,hZ⟩ := isProjective_factors e f + refine ⟨Y,Z,hY,hZ,f,?_⟩ + intro x + change Submodule.map (mfderiv (ModelWithCorners X) I q x).toLinearMap (S.first x)=_ ∧ + Submodule.map (mfderiv (ModelWithCorners X) I q x).toLinearMap (S.second x)=_ + rw [hd] + exact ⟨HolomorphicFrobenius.image_range_projector_of_quotients + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₁ x) (hk₁ x) (hk₂ x), + HolomorphicFrobenius.image_kernel_projector_of_quotients + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₂ x) (hk₁ x) (hk₂ x)⟩ + +end TangentSplitting +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/GlobalTensorVanishing.lean b/lean/OAI/Geometry/SplitTangent/GlobalTensorVanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..72743ba14e5a5aae6c8d489a33100b956ed507d9 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/GlobalTensorVanishing.lean @@ -0,0 +1,161 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.RationalTrivialization +import OAI.Geometry.SplitTangent.TwistedCurveTensor + +namespace OAI + +/-! Global Tensor Vanishing. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent + +lemma tangentTensorCoordinates_zero_iff {X : ComplexManifold.{u}} {m : ℕ} + {g : ℂ → X.Carrier} {A : ℂ → TangentTensor X m} {z₀ z : ℂ} + (hz : g z∈(trivializationAt (Model X) (Tangent X) (g z₀)).baseSet) : + tangentTensorCoordinates g A z₀ z=0 ↔ A z=0 := by + let t := trivializationAt (Model X) (Tangent X) (g z₀) + constructor + · intro h + apply ContinuousMultilinearMap.ext + intro v + have h' := congrArg (fun B : TangentTensor X m => B (fun i => t.continuousLinearMapAt ℂ (g z) (v i))) h + change A z (fun i => t.symmL ℂ (g z) (t.continuousLinearMapAt ℂ (g z) (v i)))=0 at h' + have he : (fun i => t.symmL ℂ (g z) + (t.continuousLinearMapAt ℂ (g z) (v i))) = v := by + funext i + exact t.symmL_continuousLinearMapAt hz (v i) + rw [he] at h' + exact h' + · intro h + apply ContinuousMultilinearMap.ext + intro v + simp [tangentTensorCoordinates,h] + rfl + +namespace TwistedCurveTensor +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {d m : ℕ} + + + +theorem finite_zero_of_eventually {d : ℤ} (A : TwistedCurveTensor g d m) + {z₀ : ℂ} (h : ∀ᶠz in 𝓝 z₀,A.finite z=0) : ∀z,A.finite z=0 := by + have hall : (Set.univ : Set ℂ)⊆{z | A.finite z=0} := by + apply AnalyticContinuation.subset_of_local_analytic_equations (F := TangentTensor X m) isPreconnected_univ + · intro z hz + refine ⟨tangentTensorCoordinates g.finite A.finite z,A.finite_holomorphic z,?_⟩ + let t := trivializationAt (Model X) (Tangent X) (g.finite z) + have hbase : g.finite z∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + filter_upwards [g.finite_holomorphic.continuous.continuousAt.preimage_mem_nhds + (t.open_baseSet.mem_nhds hbase)] with w hw + exact (tangentTensorCoordinates_zero_iff hw).symm + · exact ⟨z₀,Set.mem_univ _,mem_interior_iff_mem_nhds.mpr h⟩ + exact fun z => hall (Set.mem_univ z) + + + +theorem finite_zero_of_pointedGenerated (A : TwistedCurveTensor g (d : ℤ) m) + (S : TangentSplitting X) (hg : PointedGenerated g S.first) (hdm : d < m) + (hSupport : ∀z v,A.finite z (fun i => S.projector (g.finite z) (v i))=A.finite z v) : + ∀z,A.finite z=0 := by + classical + let t := trivializationAt (Model X) (Tangent X) (g.finite 1) + let c := chartAt (Model X) (g.finite 1) + let b := Pi.basisFun ℂ (Fin X.dim) + let a (j : Fin X.dim) := S.projector (g.finite 1) (t.symmL ℂ (g.finite 1) (b j)) + have ha : ∀j,a j∈S.first (g.finite 1) := fun j => ⟨_,rfl⟩ + choose σ hσf hσi hσ0 hσ1 using fun j => hg (a j) (ha j) + let w (j : Fin X.dim) (z : ℂ) := + (t (⟨g.finite z,(σ j).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + let M (z : ℂ) : Model X →L[ℂ] Model X := + ∑j,(ContinuousLinearMap.proj j).smulRight (w j z) + let P (z : ℂ) := S.coordinateProjector (g.finite 1) (c (g.finite z)) + have hMb : ∀z j,M z (b j)=w j z := by + intro z j + simp [M,b,Pi.basisFun_apply] + have hM : ContinuousAt M 1 := by + apply tendsto_finsetSum + intro j hj + exact (ContinuousLinearMap.smulRightL ℂ (Model X) (Model X) + (ContinuousLinearMap.proj j)).continuous.continuousAt.comp + (section_coordinates_analytic (σ j).finite_holomorphic 1).continuousAt + have hP : ContinuousAt P 1 := by + have hc : AnalyticAt ℂ (c ∘ g.finite) (1 : ℂ) := + TangentSplitting.coordinateCurve_analytic g.finite_holomorphic (g.finite 1) (mem_chart_source _ _) + have hp := (S.coordinateProjector_analytic (g.finite 1) _ + (c.map_source (mem_chart_source _ _))).comp (f := c ∘ g.finite) (x := (1 : ℂ)) hc + exact hp.continuousAt + have hbase : ∀ᶠz in 𝓝 (1 : ℂ),g.finite z∈t.baseSet := + g.finite_holomorphic.continuous.continuousAt.preimage_mem_nhds + (t.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt' _)) + have hPw : ∀z,g.finite z∈t.baseSet → ∀j,P z (w j z)=w j z := by + intro z hz j + change S.coordinateProjector (g.finite 1) (c (g.finite z)) + (t (⟨g.finite z,(σ j).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2=_ + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz,S.coordinateProjector_fixed _ hz, + (S.mem_first_iff _ _).mp (hσf j z)] + exact t.continuousLinearMapAt_apply_of_mem ℂ hz _ + have hx : M 1=P 1 := by + apply ContinuousLinearMap.coe_injective + apply b.ext + intro j + change M 1 (b j)=P 1 (b j) + rw [hMb] + dsimp only [w] + rw [hσ1] + change (t (⟨g.finite 1,S.projector (g.finite 1) (t.symmL ℂ (g.finite 1) (b j))⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)).2=P 1 (b j) + rw [← t.continuousLinearMapAt_apply_of_mem ℂ (FiberBundle.mem_baseSet_trivializationAt' _)] + dsimp only [P,TangentSplitting.coordinateProjector] + rw [c.left_inv (mem_chart_source _ _)] + rfl + have hPP : ∀ᶠz in 𝓝 (1 : ℂ),∀v,P z (P z v)=P z v := by + filter_upwards [hbase] with z hz + exact S.coordinateProjector_idempotent _ (c.map_source hz) + have hPM : ∀ᶠz in 𝓝 (1 : ℂ),∀v,P z (M z v)=M z v := by + filter_upwards [hbase] with z hz + intro v + simp only [M,sum_apply,ContinuousLinearMap.smulRight_apply,map_sum,map_smul, + hPw z hz] + have hRange := ProjectorSpanning.eventually_range_eq hP hM hx hPP hPM + apply A.finite_zero_of_eventually (z₀ := 1) + filter_upwards [hbase,hRange] with z hz hRange + let B := tangentTensorCoordinates g.finite A.finite 1 z + have hB : ∀j : Fin m → Fin X.dim,B (fun i => M z (b (j i)))=0 := by + intro j + have hc := A.contract_zero hdm (fun i => σ (j i)) (fun i => hσ0 (j i)) + have hv := congrArg (fun s : DiagonalRationality.lineSections (d : ℤ) => s.val.1 z) hc + change A.finite z (fun i => (σ (j i)).finite z)=0 at hv + have he (i : Fin m) : t.symmL ℂ (g.finite z) (M z (b (j i))) = + (σ (j i)).finite z := by + rw [hMb] + change t.symmL ℂ (g.finite z) (t (⟨g.finite z,(σ (j i)).finite z⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)).2=_ + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz,t.symmL_continuousLinearMapAt hz] + change A.finite z (fun i => t.symmL ℂ (g.finite z) (M z (b (j i)))) = 0 + exact (congrArg (A.finite z) (funext he)).trans hv + apply ContinuousMultilinearMap.ext + intro v + rw [← hSupport z v] + have hv : ∀i,t.continuousLinearMapAt ℂ (g.finite z) (S.projector (g.finite z) (v i))∈ + LinearMap.range (M z).toLinearMap := by + intro i + rw [hRange] + exact ⟨t.continuousLinearMapAt ℂ (g.finite z) (v i),S.coordinateProjector_fixed _ hz _⟩ + have h := ProjectorSpanning.multilinear_zero_of_basis_range (M z) B hB _ hv + change A.finite z (fun i => t.symmL ℂ (g.finite z) + (t.continuousLinearMapAt ℂ (g.finite z) (S.projector (g.finite z) (v i))))=0 at h + simpa only [t.symmL_continuousLinearMapAt hz,zero_apply] using h + +end TwistedCurveTensor +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/GlobalTopologicalProduct.lean b/lean/OAI/Geometry/SplitTangent/GlobalTopologicalProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae2d0121025cce5ddf6ad21875bb48a4d28e1b39 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/GlobalTopologicalProduct.lean @@ -0,0 +1,128 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.SwappedProductChart +import OAI.Geometry.SplitTangent.CompactLeafQuotient +import OAI.Geometry.SplitTangent.ArbitraryPlaqueLeaves +import OAI.Geometry.SplitTangent.ComplementaryLeafIntersections + +namespace OAI + +/-! Global Topological Product. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (M : LeafJetAtlas S.swap) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 hrect ⟨hk,hb⟩) hc ha + · change M.leafQuotient e hRC hdim (P.chart.symm (c,b))=t.2 + rw [←hy] + apply (M.leafQuotient_eq_iff e hRC hdim _ _).mpr + exact M.arbitrary_plaque_mem_leaf P.swap (b := c) hVc (fun k hk => by + rw [AlignedProductChart.swap_target] + change (c,k)∈P.chart.target + exact hrect ⟨hc,hk⟩) hb hd + +lemma leafPair_rectangle_image_open + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) {U : Set A} {V : Set B} + (hU : IsOpen U) (hUc : IsPreconnected U) (hV : IsOpen V) (hVc : IsPreconnected V) + (hrect : U ×ˢ V ⊆ P.chart.target) : + IsOpen (L.leafPair M e hRC hdim '' (P.chart.symm '' (U ×ˢ V))) := by + rw [L.leafPair_rectangle_image M e hRC hdim P hUc hVc hrect] + have hopen := P.chart.symm.isOpen_image_of_subset_source (hU.prod hV) hrect + exact (L.isOpenMap_leafQuotient e hRC hdim _ hopen).prod + (M.isOpenMap_leafQuotient e hRC hdim _ hopen) + +lemma isOpenMap_leafPair : IsOpenMap (L.leafPair M e hRC hdim) := by + intro W hW + apply isOpen_iff_mem_nhds.mpr + rintro q ⟨x,hx,rfl⟩ + let P := L.chart x + have hxs := L.mem_source x + have hxt := P.chart.map_source hxs + have hN : P.chart.target ∩ P.chart.symm ⁻¹' W∈𝓝 (P.chart x) := + Filter.inter_mem (P.chart.open_target.mem_nhds hxt) + ((P.chart.symm.continuousAt hxt).preimage_mem_nhds (by + rw [P.chart.left_inv hxs] + exact hW.mem_nhds hx)) + obtain ⟨r,hr,hsub⟩ := Metric.mem_nhds_iff.mp hN + let U := Metric.ball (P.chart x).1 r + let V := Metric.ball (P.chart x).2 r + have hrect : U ×ˢ V ⊆ P.chart.target ∩ P.chart.symm ⁻¹' W := by + intro p hp + apply hsub + simpa only [U,V,Set.mem_prod,Metric.mem_ball,Prod.dist_eq,max_lt_iff] using hp + have hopen := L.leafPair_rectangle_image_open M e hRC hdim P Metric.isOpen_ball + (convex_ball _ _).isPreconnected Metric.isOpen_ball (convex_ball _ _).isPreconnected + (fun p hp => (hrect hp).1) + have hxin : x∈P.chart.symm '' (U ×ˢ V) := + ⟨P.chart x,⟨Metric.mem_ball_self hr,Metric.mem_ball_self hr⟩,P.chart.left_inv hxs⟩ + apply Filter.mem_of_superset (hopen.mem_nhds ⟨x,hxin,rfl⟩) + rintro q ⟨y,⟨p,hp,rfl⟩,rfl⟩ + exact ⟨P.chart.symm p,(hrect hp).2,rfl⟩ + +lemma surjective_leafPair : Function.Surjective (L.leafPair M e hRC hdim) := by + have hc : IsClopen (range (L.leafPair M e hRC hdim)) := + ⟨(isCompact_range (L.continuous_leafPair M e hRC hdim)).isClosed, + by simpa only [Set.image_univ] using L.isOpenMap_leafPair M e hRC hdim Set.univ isOpen_univ⟩ + exact Set.range_eq_univ.mp (hc.eq_univ (Set.range_nonempty _)) + +lemma leafPair_fiber_eq (x : X.Carrier) : + {y | L.leafPair M e hRC hdim y=L.leafPair M e hRC hdim x}=L.leaf x ∩ M.leaf x := by + ext y + change ((L.leafQuotient e hRC hdim y,M.leafQuotient e hRC hdim y)= + (L.leafQuotient e hRC hdim x,M.leafQuotient e hRC hdim x)) ↔ _ + rw [Prod.mk.injEq] + constructor + · intro h + exact ⟨(L.leafQuotient_eq_iff e hRC hdim x y).mp h.1.symm, + (M.leafQuotient_eq_iff e hRC hdim x y).mp h.2.symm⟩ + · intro h + exact ⟨((L.leafQuotient_eq_iff e hRC hdim x y).mpr h.1).symm, + ((M.leafQuotient_eq_iff e hRC hdim x y).mpr h.2).symm⟩ + +lemma leafPair_fiber_finite (q : L.CompactLeafSpace e hRC hdim × M.CompactLeafSpace e hRC hdim) : + {x | L.leafPair M e hRC hdim x=q}.Finite := by + obtain ⟨x,rfl⟩ := L.surjective_leafPair M e hRC hdim q + rw [L.leafPair_fiber_eq M e hRC hdim x] + exact L.complementary_leaves_finite M e hRC hdim x x + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicBasicTransport.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicBasicTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..d915ac2168bd057a14488ab9d35d48b2b683d1c2 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicBasicTransport.lean @@ -0,0 +1,112 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.LeafPlaques +import OAI.Geometry.SplitTangent.ArbitraryPlaqueLeaves + +namespace OAI + +/-! Holomorphic Basic Transport. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + + +def Basic (f : X.Carrier → E) : Prop := ∀x y,y∈L.leaf x → f x=f y + +variable {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + +lemma basic_contMDiffAt_rectangle (P : AlignedProductChart S A B) + {U : Set A} {V : Set B} (hU : IsOpen U) (hUc : IsPreconnected U) (hV : IsOpen V) + (hrect : U ×ˢ V⊆P.chart.target) {a c : A} {b : B} + (ha : a∈U) (hc : c∈U) (hb : b∈V) + {f : X.Carrier → E} (hbasic : L.Basic f) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (a,b))) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (c,b)) := by + let x := P.chart.symm (c,b) + let H : X.Carrier → X.Carrier := fun y => P.chart.symm (a,(P.chart y).2) + have hxt : (c,b)∈P.chart.target := hrect ⟨hc,hb⟩ + have hxs : x∈P.chart.source := P.chart.map_target hxt + have hx : P.chart x=(c,b) := P.chart.right_inv hxt + have hN : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,A × B) ω + (fun y => (a,(P.chart y).2)) x := + contMDiffAt_const.prodMk_space + ((ContinuousLinearMap.snd ℂ A B).contDiff.contMDiff.contMDiffAt.comp x + (P.holomorphicAt hxs)) + have hH : ContMDiffAt (ModelWithCorners X) (ModelWithCorners X) ω H x := by + apply ContMDiffAt.comp x _ hN + apply P.inverse_holomorphicAt + simpa only [hx] using hrect ⟨ha,hb⟩ + have hHx : H x=P.chart.symm (a,b) := by simp only [H,hx] + have hcomp : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω (f ∘ H) x := by + apply ContMDiffAt.comp x _ hH + rwa [hHx] + apply hcomp.congr_of_eventuallyEq + have hnear : ∀ᶠ y in 𝓝 x,y∈P.chart.source ∧ P.chart y∈U ×ˢ V := + Filter.Eventually.and (P.chart.open_source.mem_nhds hxs) + ((P.chart.continuousAt hxs).preimage_mem_nhds (by + rw [hx] + exact (hU.prod hV).mem_nhds ⟨hc,hb⟩)) + filter_upwards [hnear] with y hy + change f y=f (H y) + have hmem := L.arbitrary_plaque_mem_leaf P hUc + (fun k hk => hrect ⟨hk,hy.2.2⟩) hy.2.1 ha + have he : P.chart.symm ((P.chart y).1,(P.chart y).2)=y := P.chart.left_inv hy.1 + rw [he] at hmem + exact hbasic y _ hmem + +lemma basic_contMDiffAt_local (P : AlignedProductChart S A B) + {a : A} {b : B} (hT : (a,b)∈P.chart.target) + {f : X.Carrier → E} (hbasic : L.Basic f) : + ∀ᶠ c in 𝓝 a, + (ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (c,b)) ↔ + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (a,b))) := by + obtain ⟨U,V,hU,hUc,hV,hUV,hrect⟩ := UniformPlaqueSlices.connected_rectangle + (P.chart.open_target.mem_nhds hT) + filter_upwards [hU.mem_nhds hUV.1] with c hc + exact ⟨L.basic_contMDiffAt_rectangle P hU hUc hV hrect hc hUV.1 hUV.2 hbasic, + L.basic_contMDiffAt_rectangle P hU hUc hV hrect hUV.1 hc hUV.2 hbasic⟩ + +lemma basic_contMDiffAt_plaque (P : AlignedProductChart S A B) + {U : Set A} {b : B} (hUc : IsPreconnected U) (hT : ∀a∈U,(a,b)∈P.chart.target) + {a c : A} (ha : a∈U) (hc : c∈U) + {f : X.Carrier → E} (hbasic : L.Basic f) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (a,b)) ↔ + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (c,b)) := by + let : PreconnectedSpace U := isPreconnected_iff_preconnectedSpace.mp hUc + let p : U → Prop := fun t => ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f (P.chart.symm (t.val,b)) + have hp : IsLocallyConstant p := by + apply (IsLocallyConstant.iff_eventually_eq _).mpr + intro t + filter_upwards [continuous_subtype_val.continuousAt.eventually + (L.basic_contMDiffAt_local P (hT t.val t.property) hbasic)] with v hv + exact propext hv + exact Iff.of_eq (hp.apply_eq_of_preconnectedSpace ⟨a,ha⟩ ⟨c,hc⟩) + +lemma basic_contMDiffAt_related {f : X.Carrier → E} (hbasic : L.Basic f) + {x y : X.Carrier} (hxy : L.plaques.Related x y) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f x ↔ + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f y := by + obtain ⟨i,b,U,hU,hT,a,ha,c,hc,rfl,rfl⟩ := hxy + exact L.basic_contMDiffAt_plaque (L.chart i) hU hT ha hc hbasic + +lemma basic_contMDiffAt_leaf {f : X.Carrier → E} (hbasic : L.Basic f) + {x y : X.Carrier} (hxy : y∈L.leaf x) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f x ↔ + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,E) ω f y := by + induction hxy with + | refl => exact Iff.rfl + | @tail y z _ hyz ih => exact ih.trans (L.basic_contMDiffAt_related hbasic hyz) + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicCommonZeros.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicCommonZeros.lean new file mode 100644 index 0000000000000000000000000000000000000000..1daf82b49b8fa3109cb9f2765a61fdcfc8ef89f1 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicCommonZeros.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Holomorphic Common Zeros. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent + +def LocallyHolomorphicCommonZeros (X : ComplexManifold.{u}) (Z : Set X.Carrier) : Prop := + ∀x,∃U : Set X.Carrier,IsOpen U ∧ x∈U ∧ ∃𝒜 : Set (X.Carrier → ℂ), + (∀f∈𝒜,ContMDiffOn (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f U) ∧ + ∀y∈U,y∈Z ↔ ∀f∈𝒜,f y=0 + +lemma LocallyHolomorphicCommonZeros.isClosed {X : ComplexManifold.{u}} {Z : Set X.Carrier} + (h : LocallyHolomorphicCommonZeros X Z) : IsClosed Z := by + rw [←isOpen_compl_iff] + apply isOpen_iff_mem_nhds.mpr + intro x hx + obtain ⟨U,hU,hxU,𝒜,hf,he⟩ := h x + have hn : ¬∀f∈𝒜,f x=0 := fun hz => hx ((he x hxU).mpr hz) + push Not at hn + obtain ⟨f,hfA,hfx⟩ := hn + have hn' := ((hf f hfA).contMDiffAt (hU.mem_nhds hxU)).continuousAt.eventually_ne hfx + filter_upwards [hn',hU.mem_nhds hxU] with y hy hyU + exact fun hz => hy ((he y hyU).mp hz f hfA) + +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +include L in +lemma commonZeros_closure_interior {Z : Set X.Carrier} + (hZ : LocallyHolomorphicCommonZeros X Z) : closure (interior Z) ⊆ interior Z := by + intro x hx + obtain ⟨U,hU,hxU,𝒜,hf,he⟩ := hZ x + let P := L.chart x + let a := P.chart x + have hxs : x∈P.chart.source := L.mem_source x + have hat : a∈P.chart.target := P.chart.map_source hxs + have hUx : P.chart.symm ⁻¹' U∈𝓝 a := by + apply (P.chart.symm.continuousAt hat).preimage_mem_nhds + simpa only [a,P.chart.left_inv hxs] using hU.mem_nhds hxU + obtain ⟨r,hr,hrsub⟩ := Metric.mem_nhds_iff.mp + (Filter.inter_mem (P.chart.open_target.mem_nhds hat) hUx) + have hN : ∀ᶠy in 𝓝 x,y∈P.chart.source ∧ P.chart y∈Metric.ball a r := + Filter.Eventually.and (P.chart.open_source.mem_nhds hxs) + ((P.chart.continuousAt hxs).preimage_mem_nhds (Metric.ball_mem_nhds a hr)) + obtain ⟨y,hy,hys,hyr⟩ := ((mem_closure_iff_frequently.mp hx).and_eventually hN).exists + have haF (f : X.Carrier → ℂ) (hfA : f∈𝒜) : + AnalyticOnNhd ℂ (f ∘ P.chart.symm) (Metric.ball a r) := by + intro b hb + exact (((hf f hfA).contMDiffAt (hU.mem_nhds (hrsub hb).2)).comp b + (P.inverse_holomorphicAt (hrsub hb).1)).contDiffAt.analyticAt + have hzF (f : X.Carrier → ℂ) (hfA : f∈𝒜) : + (f ∘ P.chart.symm) =ᶠ[𝓝 (P.chart y)] 0 := by + have hc := P.chart.symm.continuousAt (P.chart.map_source hys) + have hzN : P.chart.symm ⁻¹' interior Z∈𝓝 (P.chart y) := by + apply hc.preimage_mem_nhds + simpa only [P.chart.left_inv hys] using isOpen_interior.mem_nhds hy + filter_upwards [hzN,Metric.isOpen_ball.mem_nhds hyr] with b hb hbr + exact (he _ (hrsub hbr).2).mp (interior_subset hb) f hfA + have hall (f : X.Carrier → ℂ) (hfA : f∈𝒜) := + (haF f hfA).eqOn_zero_of_preconnected_of_eventuallyEq_zero + (convex_ball a r).isPreconnected hyr (hzF f hfA) + rw [mem_interior_iff_mem_nhds] + filter_upwards [hN] with z hzs + have heq := P.chart.left_inv hzs.1 + have hzU : z∈U := by + have hh := (hrsub hzs.2).2 + change P.chart.symm (P.chart z)∈U at hh + rwa [heq] at hh + apply (he z hzU).mpr + intro f hfA + have hz := hall f hfA hzs.2 + simpa only [Function.comp_apply,heq,Pi.zero_apply] using hz + +include L in +lemma commonZeros_eq_univ [PreconnectedSpace X.Carrier] {Z : Set X.Carrier} + (hZ : LocallyHolomorphicCommonZeros X Z) (h : (interior Z).Nonempty) : Z=univ := by + have hc : IsClosed (interior Z) := isClosed_of_closure_subset + (L.commonZeros_closure_interior hZ) + have he : interior Z=univ := (show IsClopen (interior Z) from ⟨hc,isOpen_interior⟩).eq_univ h + exact eq_univ_of_univ_subset (he ▸ interior_subset) + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicHypersurfaces.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicHypersurfaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9871f5410f8dbdd93eb4ed0cd6c2d4ec3d1b51e --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicHypersurfaces.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.LeafPlaques +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Holomorphic Hypersurfaces. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent + + +def LocallyHolomorphicZeroSet (X : ComplexManifold.{u}) (Z : Set X.Carrier) : Prop := + ∀x,∃U : Set X.Carrier,IsOpen U ∧ x∈U ∧ ∃f : X.Carrier → ℂ, + ContMDiffOn (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f U ∧ ∀y∈U,y∈Z ↔ f y=0 + +namespace AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + +omit [CompleteSpace A] [CompleteSpace B] in +lemma locally_analytic_plaque_zeroSet (P : AlignedProductChart S A B) + {Z : Set X.Carrier} (hZ : LocallyHolomorphicZeroSet X Z) (b : B) + (U : Set A) (hU : ∀a∈U,(a,b)∈P.chart.target) : + AnalyticGermContinuation.LocallyAnalyticZeroSet + {a | P.chart.symm (a,b)∈Z} U := by + intro a ha + obtain ⟨V,hVo,hx,f,hf,he⟩ := hZ (P.chart.symm (a,b)) + have hpair : ContinuousAt (fun t : A => (t,b)) a := continuousAt_id.prodMk continuousAt_const + have hs : ContinuousAt (fun t : A => P.chart.symm (t,b)) a := + (P.inverse_holomorphicAt (hU a ha)).continuousAt.comp + (f := fun t : A => (t,b)) (x := a) hpair + have hn : ∀ᶠ t in 𝓝 a,(t,b)∈P.chart.target ∧ P.chart.symm (t,b)∈V := + Filter.Eventually.and + (hpair.preimage_mem_nhds (P.chart.open_target.mem_nhds (hU a ha))) + (hs.preimage_mem_nhds (hVo.mem_nhds hx)) + obtain ⟨r,hr,hrS⟩ := Metric.mem_nhds_iff.mp hn + refine ⟨r,hr,fun t => f (P.chart.symm (t,b)),?_,fun t ht => he _ (hrS ht).2⟩ + intro t ht + have hf' := hf.contMDiffAt (hVo.mem_nhds (hrS ht).2) + have hc : AnalyticAt ℂ (f ∘ P.chart.symm) (t,b) := + (hf'.comp (t,b) (P.inverse_holomorphicAt (hrS ht).1)).contDiffAt.analyticAt + exact hc.comp (f := fun a : A => (a,b)) (x := t) (analyticAt_id.prod analyticAt_const) + +end AlignedProductChart + +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +lemma germIn_of_related {Z : Set X.Carrier} (hZ : LocallyHolomorphicZeroSet X Z) + {y z : X.Carrier} (hy : L.GermIn Z y) (hrel : L.plaques.Related y z) : + L.GermIn Z z := by + obtain ⟨i,b,U,hUc,hT,a₀,ha₀,a₁,ha₁,h₀,h₁⟩ := hrel + let P := L.chart i + have hyS : y∈P.chart.source := h₀ ▸ P.chart.map_target (hT a₀ ha₀) + have hzS : z∈P.chart.source := h₁ ▸ P.chart.map_target (hT a₁ ha₁) + have hyC : P.chart y=(a₀,b) := by rw [←h₀]; exact P.chart.right_inv (hT a₀ ha₀) + have hzC : P.chart z=(a₁,b) := by rw [←h₁]; exact P.chart.right_inv (hT a₁ ha₁) + have hyP := (L.germIn_iff P hyS).mp hy + have hyG : {a | P.chart.symm (a,b)∈Z}∈𝓝 a₀ := by + change ∀ᶠ a in 𝓝 a₀,P.chart.symm (a,b)∈Z + simpa only [AlignedProductChart.GermIn,hyC] using hyP + have hzG := AnalyticGermContinuation.propagate hUc + (P.locally_analytic_plaque_zeroSet hZ b U hT) ha₀ ha₁ hyG + apply (L.germIn_iff P hzS).mpr + change ∀ᶠ a in 𝓝 a₁,P.chart.symm (a,b)∈Z at hzG + simpa only [AlignedProductChart.GermIn,hzC] using hzG + +lemma germIn_of_reachable {Z : Set X.Carrier} (hZ : LocallyHolomorphicZeroSet X Z) + {y z : X.Carrier} (hy : L.GermIn Z y) (hrel : L.plaques.Reachable y z) : + L.GermIn Z z := by + induction hrel with + | refl => exact hy + | tail _ h ih => exact L.germIn_of_related hZ ih h + + + +theorem closure_leaf_subset {Z : Set X.Carrier} (hZ : LocallyHolomorphicZeroSet X Z) + (hclosed : IsClosed Z) {y : X.Carrier} (hy : L.GermIn Z y) : + closure (L.leaf y) ⊆ Z := by + apply closure_minimal _ hclosed + intro z hz + exact L.germIn_mem (L.germIn_of_reachable hZ hy hz) + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicLeafBasic.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicLeafBasic.lean new file mode 100644 index 0000000000000000000000000000000000000000..892bf923788cbdb65adc189d4e8e6c554b534a1b --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicLeafBasic.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.LeafPlaques + +namespace OAI + +/-! Holomorphic Leaf Basic. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent +namespace AlignedProductChart +variable {X Y : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) {f : X.Carrier → Y.Carrier} + (hf : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω f) + (hz : ∀x v,v∈S.first x → mfderiv (ModelWithCorners X) (ModelWithCorners Y) f x v=0) + +include hf hz in +omit [CompleteSpace A] [CompleteSpace B] in +lemma map_plaque_eventually_constant {a : A} {b : B} (ht : (a,b)∈P.chart.target) : + ∀ᶠ c in 𝓝 a,f (P.chart.symm (c,b))=f (P.chart.symm (a,b)) := by + let g : A × B → Y.Carrier := f ∘ P.chart.symm + let y := g (a,b) + let Q := chartAt (Model Y) y + have hy : y∈Q.source := mem_chart_source (Model Y) y + have hQa : Q∈IsManifold.maximalAtlas (ModelWithCorners Y) ω Y.Carrier := + IsManifold.chart_mem_maximalAtlas y + have hgn : ∀ᶠ z in 𝓝 (a,b),z∈P.chart.target ∧ g z∈Q.source := + Filter.Eventually.and (P.chart.open_target.mem_nhds ht) + (((hf _).continuousAt.comp (P.inverse_holomorphicAt ht).continuousAt).preimage_mem_nhds + (Q.open_source.mem_nhds hy)) + have hd : ∀ᶠ z in 𝓝 (a,b),DifferentiableAt ℂ (Q ∘ g) z := by + filter_upwards [hgn] with z hz + exact (((contMDiffAt_of_mem_maximalAtlas hQa hz.2).comp z + ((hf _).comp z (P.inverse_holomorphicAt hz.1))).contDiffAt).differentiableAt (by simp) + have hd0 : ∀ᶠ z in 𝓝 (a,b),∀v,fderiv ℂ (Q ∘ g) z (v,0)=0 := by + filter_upwards [hgn] with z hzg + intro v + have hP := (P.inverse_holomorphicAt hzg.1).mdifferentiableAt (by simp) + have hfz := (hf (P.chart.symm z)).mdifferentiableAt (by simp) + have hQ := (contMDiffAt_of_mem_maximalAtlas hQa hzg.2).mdifferentiableAt (by simp) + have hchain := mfderiv_comp z hQ (hfz.comp z hP) + rw [mfderiv_eq_fderiv] at hchain + rw [hchain] + change mfderiv (ModelWithCorners Y) 𝓘(ℂ,Model Y) Q (g z) + (mfderiv 𝓘(ℂ,A × B) (ModelWithCorners Y) g z (v,0))=0 + change mfderiv _ _ Q (g z) + (mfderiv _ _ (f ∘ P.chart.symm) z (v,0))=0 + rw [mfderiv_comp z hfz hP] + change mfderiv _ _ Q (g z) + (mfderiv _ _ f (P.chart.symm z) (mfderiv _ _ P.chart.symm z (v,0)))=0 + rw [hz _ _ (P.inverse_first hzg.1 v),map_zero] + have he := ProductTransition.eventually_factors_snd hd hd0 + have hc : Tendsto (fun c : A => (c,b)) (𝓝 a) (𝓝 (a,b)) := + continuousAt_id.prodMk continuousAt_const + filter_upwards [hc.eventually hgn,hc.eventually he] with c hcg hce + apply Q.injOn hcg.2 hy + exact hce + +include hf hz in +omit [CompleteSpace A] [CompleteSpace B] in +lemma map_plaque_constant {U : Set A} {b : B} + (hU : IsPreconnected U) (ht : ∀a∈U,(a,b)∈P.chart.target) + {a c : A} (ha : a∈U) (hc : c∈U) : + f (P.chart.symm (a,b))=f (P.chart.symm (c,b)) := by + let : PreconnectedSpace U := isPreconnected_iff_preconnectedSpace.mp hU + have hlocal : IsLocallyConstant (fun a : U => f (P.chart.symm (a.val,b))) := by + apply (IsLocallyConstant.iff_eventually_eq _).mpr + intro a + exact continuous_subtype_val.continuousAt.eventually + (P.map_plaque_eventually_constant hf hz (ht a.val a.property)) + exact hlocal.apply_eq_of_preconnectedSpace ⟨a,ha⟩ ⟨c,hc⟩ + +end AlignedProductChart +namespace LeafJetAtlas +variable {X Y : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +lemma holomorphic_map_eq_on_leaf {f : X.Carrier → Y.Carrier} + (hf : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω f) + (hz : ∀x v,v∈S.first x → mfderiv (ModelWithCorners X) (ModelWithCorners Y) f x v=0) + {x y : X.Carrier} (hy : y∈L.leaf x) : f x=f y := by + induction hy with + | refl => rfl + | @tail y z _ h ih => + obtain ⟨i,b,U,hU,hT,a,ha,c,hc,rfl,rfl⟩ := h + exact ih.trans ((L.chart i).map_plaque_constant hf hz hU hT ha hc) + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicLocalDiffeomorph.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicLocalDiffeomorph.lean new file mode 100644 index 0000000000000000000000000000000000000000..96d1149a5b0170b1749774410c3556935198c9fd --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicLocalDiffeomorph.lean @@ -0,0 +1,156 @@ +import Mathlib + +namespace OAI + +/-! Holomorphic Local Diffeomorph. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff + +namespace HolomorphicLocalDiffeomorph +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] +variable {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] + [ChartedSpace E M] [ChartedSpace F N] + [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] + + + +theorem of_analytic_partial_homeomorph (φ : OpenPartialHomeomorph M N) + {x : M} (hx : x∈φ.source) + (hφ : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ x) + (hφs : ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm (φ x)) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ x := by + have he : ∀ᶠ y in 𝓝 x, + ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ y ∧ + ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm (φ y) := + ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).1 hφ).and + (hφ.continuousAt.eventually ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).1 hφs)) + obtain ⟨U,hUsub,hU,hxU⟩ := mem_nhds_iff.mp he + let ψ := φ.restrOpen U hU + let Φ : PartialDiffeomorph 𝓘(ℂ,E) 𝓘(ℂ,F) M N ω := { + ψ.toPartialEquiv with + open_source := ψ.open_source + open_target := ψ.open_target + contMDiffOn_toFun := by + intro y hy + exact (hUsub hy.2).1.contMDiffWithinAt + contMDiffOn_invFun := by + intro y hy + have hz : φ.symm y∈ψ.source := ψ.map_target hy + have hh := (hUsub hz.2).2 + change ContMDiffWithinAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm ψ.target y + simpa only [φ.right_inv hy.1] using hh.contMDiffWithinAt } + exact ⟨Φ,⟨hx,hxU⟩,fun _ _ => rfl⟩ + + + +theorem normed_ift [CompleteSpace E] [CompleteSpace F] + {f : E → F} {x : E} (hf : ContDiffAt ℂ ω f x) + (L : E ≃L[ℂ] F) (hL : HasFDerivAt f (L : E →L[ℂ] F) x) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x := by + let φ := hf.toOpenPartialHomeomorph f hL (by simp) + exact of_analytic_partial_homeomorph φ + (hf.mem_toOpenPartialHomeomorph_source hL (by simp)) + hf.contMDiffAt (hf.to_localInverse hL (by simp)).contMDiffAt + +end HolomorphicLocalDiffeomorph + +namespace HolomorphicLocalDiffeomorph +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] +variable {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] + [ChartedSpace E M] [ChartedSpace F N] + [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] + +omit [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] in +theorem congr_eventually {f g : M → N} {x : M} + (hf : IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x) + (he : f=ᶠ[𝓝 x]g) : IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω g x := by + obtain ⟨φ,hx,hφ⟩ := hf + obtain ⟨U,hUsub,hU,hxU⟩ := mem_nhds_iff.mp he + let ψ := φ.toOpenPartialHomeomorph.restrOpen U hU + let Φ : PartialDiffeomorph 𝓘(ℂ,E) 𝓘(ℂ,F) M N ω := { + ψ.toPartialEquiv with + open_source := ψ.open_source + open_target := ψ.open_target + contMDiffOn_toFun := φ.contMDiffOn_toFun.mono inter_subset_left + contMDiffOn_invFun := φ.contMDiffOn_invFun.mono inter_subset_left } + refine ⟨Φ,⟨hx,hxU⟩,?_⟩ + intro y hy + exact (hUsub hy.2).symm.trans (hφ hy.1) + +theorem chart_local {x y : M} (hy : y∈(chartAt E x).source) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,E) ω (chartAt E x) y := + of_analytic_partial_homeomorph _ hy + (contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I:=𝓘(ℂ,E)) + (n:=ω) x) hy) + (contMDiffAt_symm_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I:=𝓘(ℂ,E)) + (n:=ω) x) ((chartAt E x).map_source hy)) + +theorem chart_symm_local {x : M} {y : E} (hy : y∈(chartAt E x).target) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,E) ω (chartAt E x).symm y := + of_analytic_partial_homeomorph _ hy + (contMDiffAt_symm_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I:=𝓘(ℂ,E)) + (n:=ω) x) hy) + (contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I:=𝓘(ℂ,E)) + (n:=ω) x) ((chartAt E x).map_target hy)) + + + +theorem manifold_ift [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] + {f : M → N} {x : M} (hf : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x) + (hb : Function.Bijective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f x)) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x := by + let c := chartAt E x + let d := chartAt F (f x) + have hc : x∈c.source := mem_chart_source E x + have hd : f x∈d.source := mem_chart_source F (f x) + have hcs : c.symm (c x)=x := c.left_inv hc + have hdl := chart_local hd + have hcsl := chart_symm_local (c.map_source hc) + have hcl := chart_local hc + let g : E → F := d ∘ f ∘ c.symm + have hfcs : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f (c.symm (c x)) := by + rwa [hcs] + have hinner := hfcs.comp (c x) hcsl.contMDiffAt + have hdcs : ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,F) ω d (f (c.symm (c x))) := by + simpa only [hcs] using hdl.contMDiffAt + have hgM : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω g (c x) := hdcs.comp (c x) hinner + have hg : ContDiffAt ℂ ω g (c x) := hgM.contDiffAt + have hbD : Function.Bijective + (mfderiv 𝓘(ℂ,F) 𝓘(ℂ,F) d (f (c.symm (c x)))) := by + rw [hcs] + exact (hdl.mfderivToContinuousLinearEquiv (by simp)).bijective + have hbF : Function.Bijective + (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f (c.symm (c x))) := by + rw [hcs] + exact hb + have hbC : Function.Bijective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,E) c.symm (c x)) := + (hcsl.mfderivToContinuousLinearEquiv (by simp)).bijective + have hbg : Function.Bijective (fderiv ℂ g (c x)) := by + rw [← mfderiv_eq_fderiv] + change Function.Bijective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) (d ∘ (f ∘ c.symm)) (c x)) + rw [mfderiv_comp (c x) (f := f ∘ c.symm) (g := d) (hdcs.mdifferentiableAt (by simp)) + (hinner.mdifferentiableAt (by simp)), + mfderiv_comp (c x) (f := c.symm) (g := f) (hfcs.mdifferentiableAt (by simp)) + (hcsl.mdifferentiableAt (by simp))] + exact hbD.comp (hbF.comp hbC) + let L : E ≃L[ℂ] F := + (LinearEquiv.ofBijective (fderiv ℂ g (c x)).toLinearMap hbg).toContinuousLinearEquiv + have hLg : HasFDerivAt g (L : E →L[ℂ] F) (c x) := hg.differentiableAt (by simp) |>.hasFDerivAt + have hgl := normed_ift hg L hLg + have hdsl : IsLocalDiffeomorphAt 𝓘(ℂ,F) 𝓘(ℂ,F) ω d.symm (g (c x)) := by + simpa only [g,Function.comp_apply,hcs] using chart_symm_local (d.map_source hd) + apply congr_eventually (hcl.comp 𝓘(ℂ,F) N (hgl.comp 𝓘(ℂ,F) N hdsl)) + filter_upwards [c.open_source.mem_nhds hc, + hf.continuousAt.eventually (d.open_source.mem_nhds hd)] with y hy hfy + change d.symm (d (f (c.symm (c y))))=f y + rw [c.left_inv hy,d.left_inv hfy] + +end HolomorphicLocalDiffeomorph + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicManifoldProduct.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicManifoldProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..1377e9a5ac557a9f4659bd078010bad29083d940 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicManifoldProduct.lean @@ -0,0 +1,177 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Holomorphic Manifold Product. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent +variable {X : ComplexManifold.{u}} +namespace TangentSplitting +variable (S : TangentSplitting X) + +lemma coordinateProjector_range (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) : + Submodule.map (chartDerivative x y).toLinearMap (S.first y)= + LinearMap.range (S.coordinateProjector x ((chartAt (Model X) x) y)).toLinearMap := by + have hD := chartDerivative_isInvertible x hy + ext v + rw [S.coordinateProjector_range_iff x hy] + constructor + · rintro ⟨w,hw,rfl⟩ + change (chartDerivative x y).inverse ((chartDerivative x y) w) ∈ S.first y + rw [hD.inverse_apply_self] + exact hw + · intro hv + exact ⟨(chartDerivative x y).inverse v,hv,hD.self_apply_inverse v⟩ + +lemma coordinateProjector_kernel (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) : + Submodule.map (chartDerivative x y).toLinearMap (S.second y)= + LinearMap.ker (S.coordinateProjector x ((chartAt (Model X) x) y)).toLinearMap := by + rw [← S.swap_first,S.swap.coordinateProjector_range x hy, + S.coordinateProjector_swap x ((chartAt (Model X) x).map_source hy)] + exact HolomorphicFrobenius.range_complementary_projector _ + (S.coordinateProjector_idempotent x ((chartAt (Model X) x).map_source hy)) + +abbrev FirstModel (x : X.Carrier) := + HolomorphicFrobenius.FirstQuotient (S.coordinateProjector x) ((chartAt (Model X) x) x) +abbrev SecondModel (x : X.Carrier) := + HolomorphicFrobenius.SecondQuotient (S.coordinateProjector x) ((chartAt (Model X) x) x) + + + +theorem exists_local_product_chart (hI₁ : Integrable X S.first) + (hI₂ : Integrable X S.second) (x : X.Carrier) : + ∃ Φ : OpenPartialHomeomorph X.Carrier (S.FirstModel x × S.SecondModel x), + x∈Φ.source ∧ Φ x=0 ∧ + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) ω Φ x ∧ + ContMDiffAt 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ModelWithCorners X) ω Φ.symm 0 ∧ + ∀ᶠ y in 𝓝 x, + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) + Φ y).toLinearMap (S.first y)= + LinearMap.ker (ContinuousLinearMap.snd ℂ (S.FirstModel x) (S.SecondModel x)).toLinearMap ∧ + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) + Φ y).toLinearMap (S.second y)= + LinearMap.ker (ContinuousLinearMap.fst ℂ (S.FirstModel x) (S.SecondModel x)).toLinearMap := by + let c := chartAt (Model X) x + let z := c x + have hx : x∈c.source := mem_chart_source (Model X) x + have hz : z∈c.target := c.map_source hx + have hP := S.coordinateProjector_analytic x z hz + have hPid : ∀ᶠ a in 𝓝 z, ∀v, S.coordinateProjector x a (S.coordinateProjector x a v)= + S.coordinateProjector x a v := + Filter.Eventually.mono (c.open_target.mem_nhds hz) fun a ha => S.coordinateProjector_idempotent x ha + have hPcomp : S.swap.coordinateProjector x=ᶠ[𝓝 z] + (fun a => ContinuousLinearMap.id ℂ (Model X)-S.coordinateProjector x a) := + Filter.Eventually.mono (c.open_target.mem_nhds hz) fun a ha => S.coordinateProjector_swap x ha + have hIc := (S.swap.coordinateProjector_involutive (by simpa using hI₂) x hz).congr hPcomp + obtain ⟨ψ,hzψ,hψ0,hψ,hψs,haxes⟩ := HolomorphicFrobenius.exists_local_product_chart + hP hPid (S.coordinateProjector_involutive hI₁ x hz) hIc + let Φ := c.trans ψ + have hΦx : Φ x=0 := hψ0 + have hc : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,Model X) ω c x := + contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) + (n := ω) x) hx + have h0t : (0 : S.FirstModel x × S.SecondModel x)∈ψ.target := hψ0 ▸ ψ.map_source hzψ + have hψs0 : ψ.symm 0=z := by simpa only [hψ0] using ψ.left_inv hzψ + have hcs : ContMDiffAt 𝓘(ℂ,Model X) (ModelWithCorners X) ω c.symm (ψ.symm 0) := by + rw [hψs0] + exact contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz + refine ⟨Φ,⟨hx,hzψ⟩,hΦx,hψ.contDiffAt.contMDiffAt.comp x hc, + hcs.comp 0 hψs.contDiffAt.contMDiffAt,?_⟩ + have ht : Tendsto c (𝓝 x) (𝓝 z) := hc.continuousAt + filter_upwards [c.open_source.mem_nhds hx,ht.eventually haxes, + ht.eventually hψ.eventually_analyticAt] with y hy hay hψy + have hcy : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,Model X) ω c y := + contMDiffAt_of_mem_maximalAtlas (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) + (n := ω) x) hy + have hd : mfderiv (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) Φ y= + (fderiv ℂ ψ (c y)).comp (chartDerivative x y) := by + change mfderiv (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ψ ∘ c) y=_ + rw [mfderiv_comp y (hψy.differentiableAt.mdifferentiableAt) + (hcy.mdifferentiableAt (by simp)),mfderiv_eq_fderiv] + rfl + constructor + · rw [hd] + change Submodule.map ((fderiv ℂ ψ (c y)).toLinearMap.comp + (chartDerivative x y).toLinearMap) (S.first y)=_ + rw [Submodule.map_comp,S.coordinateProjector_range x hy] + exact hay.1 + · rw [hd] + change Submodule.map ((fderiv ℂ ψ (c y)).toLinearMap.comp + (chartDerivative x y).toLinearMap) (S.second y)=_ + rw [Submodule.map_comp,S.coordinateProjector_kernel x hy] + exact hay.2 + +end TangentSplitting +end SplitTangent + +namespace SplitTangent +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + +theorem TangentSplitting.exists_aligned_product_chart (S : TangentSplitting X) + (hI₁ : Integrable X S.first) (hI₂ : Integrable X S.second) (x : X.Carrier) : + ∃P : AlignedProductChart S (S.FirstModel x) (S.SecondModel x), + x∈P.chart.source ∧ P.chart x=0 := by + obtain ⟨φ,hx,h0,hφ,hφs,haxes⟩ := S.exists_local_product_chart hI₁ hI₂ x + have hs : ContMDiffAt 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ModelWithCorners X) ω φ.symm (φ x) := + h0.symm ▸ hφs + have hall := ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).mp hφ).and + ((hφ.continuousAt.eventually ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).mp hs)).and haxes) + obtain ⟨U,hUsub,hU,hxU⟩ := mem_nhds_iff.mp hall + let ψ := φ.restrOpen U hU + let P : AlignedProductChart S (S.FirstModel x) (S.SecondModel x) := { + chart := ψ + holomorphic := by + intro y hy + exact (hUsub hy.2).1.contMDiffWithinAt + inverse_holomorphic := by + intro y hy + have hz : φ.symm y∈ψ.source := ψ.map_target hy + have hh := (hUsub hz.2).2.1 + change ContMDiffWithinAt 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ModelWithCorners X) + ω φ.symm ψ.target y + simpa only [φ.right_inv hy.1] using hh.contMDiffWithinAt + first := fun y hy => (hUsub hy.2).2.2.1 + second := fun y hy => (hUsub hy.2).2.2.2 } + exact ⟨P,⟨hx,hxU⟩,h0⟩ + +theorem TangentSplitting.exists_aligned_product_chartAlternative (S : TangentSplitting X) + (hI₁ : Integrable X S.first) (hI₂ : Integrable X S.second) (x : X.Carrier) : + ∃P : AlignedProductChart S (S.FirstModel x) (S.SecondModel x), + x∈P.chart.source ∧ P.chart x=0 := by + obtain ⟨φ,hx,h0,hφ,hφs,haxes⟩ := S.exists_local_product_chart hI₁ hI₂ x + have hs : ContMDiffAt 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ModelWithCorners X) ω φ.symm (φ x) := + h0.symm ▸ hφs + have hall := ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).mp hφ).and + ((hφ.continuousAt.eventually ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).mp hs)).and haxes) + obtain ⟨U,hUsub,hU,hxU⟩ := _root_.mem_nhds_iff.mp hall + let ψ := φ.restrOpen U hU + let P : AlignedProductChart S (S.FirstModel x) (S.SecondModel x) := { + chart := ψ + holomorphic := by + intro y hy + exact (hUsub hy.2).1.contMDiffWithinAt + inverse_holomorphic := by + intro y hy + have hz : φ.symm y∈ψ.source := ψ.map_target hy + have hh := (hUsub hz.2).2.1 + change ContMDiffWithinAt 𝓘(ℂ,S.FirstModel x × S.SecondModel x) (ModelWithCorners X) + ω φ.symm ψ.target y + simpa only [φ.right_inv hy.1] using hh.contMDiffWithinAt + first := fun y hy => (hUsub hy.2).2.2.1 + second := fun y hy => (hUsub hy.2).2.2.2 } + exact ⟨P,⟨hx,hxU⟩,h0⟩ + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/HolomorphicTangentMapAt.lean b/lean/OAI/Geometry/SplitTangent/HolomorphicTangentMapAt.lean new file mode 100644 index 0000000000000000000000000000000000000000..11d03b5b84747289bbc774dbe3cf19513490854e --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/HolomorphicTangentMapAt.lean @@ -0,0 +1,42 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Holomorphic Tangent Map At. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent + + + +lemma holomorphicAt_tangentMap {X Y : ComplexManifold.{u}} + {f : X.Carrier → Y.Carrier} {x : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) (ModelWithCorners Y) ω f x) + (v : Tangent X x) : + ContMDiffAt ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) + ((ModelWithCorners Y).prod 𝓘(ℂ,Model Y)) ω + (tangentMap (ModelWithCorners X) (ModelWithCorners Y) f) + (⟨x,v⟩ : TangentBundle (ModelWithCorners X) X.Carrier) := by + obtain ⟨s,hs,hfs⟩ := (contMDiffAt_iff_contMDiffOn_nhds (by simp : (ω : WithTop ℕ∞)≠∞)).mp hf + obtain ⟨U,hUs,hU,hxU⟩ := mem_nhds_iff.mp hs + have hFU := hfs.mono hUs + have hTU := hFU.contMDiffOn_tangentMapWithin (m := ω) (by simp) hU.uniqueMDiffOn + have hπ : Continuous (fun p : TangentBundle (ModelWithCorners X) X.Carrier => p.proj) := + (contMDiff_proj (IB := ModelWithCorners X) (n := ω) (TangentSpace (ModelWithCorners X))).continuous + have hn : (fun p : TangentBundle (ModelWithCorners X) X.Carrier => p.proj) ⁻¹' U ∈ + 𝓝 (⟨x,v⟩ : TangentBundle (ModelWithCorners X) X.Carrier) := + hπ.continuousAt.preimage_mem_nhds (hU.mem_nhds hxU) + apply (hTU.contMDiffAt hn).congr_of_eventuallyEq + filter_upwards [hn] with p hp + exact (tangentMapWithin_eq_tangentMap (hU.uniqueMDiffOn p.proj hp) + ((hFU.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp))).symm + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/IntegrabilityReduction.lean b/lean/OAI/Geometry/SplitTangent/IntegrabilityReduction.lean new file mode 100644 index 0000000000000000000000000000000000000000..c987402b5080dc76d6b8f74d5fc93d97246a55de --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/IntegrabilityReduction.lean @@ -0,0 +1,118 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.CompactLeafQuotient +import OAI.Geometry.SplitTangent.GlobalTopologicalProduct +import OAI.Geometry.SplitTangent.LeafProducts +import OAI.Geometry.SplitTangent.HolomorphicLeafBasic +import OAI.Geometry.SplitTangent.RationalVariation + +namespace OAI + +/-! Integrability Reduction. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (M : LeafJetAtlas S.swap) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 ⊤) ∧ + (∀z,i (k.finite z)=g.finite z) ∧ (∀z,i (k.infinity z)=g.infinity z) := by + let h := F.leaf_locallySinglePlaque L ht hg + let A := L.embeddedAtlas (g.finite 1) h + let := A.chartedSpace + let := A.isManifold + let hf := L.tangent_rational_curve_finite ht + let hi := L.tangent_rational_curve_infinity ht + let k := A.rationalCurve g hf hi + refine ⟨A.manifold,⟨isCompact_iff_compactSpace.mp (F.leaf_isCompact L ht hg), + ⟨A.projectiveEmbedding e⟩⟩,isConnected_iff_connectedSpace.mp (L.plaques.leaf_isConnected _),rfl, + Subtype.val,A.inclusion_holomorphic,Subtype.val_injective,Subtype.range_coe, + L.embedded_inclusion_tangent _ h,k,?_,fun _ => rfl,fun _ => rfl⟩ + exact A.rationalCurve_pointedGenerated g hf hi S.first hg (L.embedded_inclusion_tangent _ h) + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeadingJetProduct.lean b/lean/OAI/Geometry/SplitTangent/LeadingJetProduct.lean new file mode 100644 index 0000000000000000000000000000000000000000..a375e30c5ead1880bee69d452bd28a5c513f104b --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeadingJetProduct.lean @@ -0,0 +1,62 @@ +import Mathlib + +namespace OAI + +/-! Leading Jet Product. -/ + +noncomputable section +open Set Filter +open scoped Topology ContDiff +namespace SplitTangent.LeadingJet +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +lemma iteratedFDeriv_smul_zero {f : E → F} {u : E → ℂ} {x : E} + (hf : AnalyticAt ℂ f x) (hu : AnalyticAt ℂ u x) (m : ℕ) + (hu0 : u x=0) (hz : ∀n,n < m → iteratedFDeriv ℂ n f x=0) : + iteratedFDeriv ℂ m (fun y => u y • f y) x=0 := by + obtain ⟨s,hsub,hs,hxs⟩ := mem_nhds_iff.mp + (hu.eventually_analyticAt.and hf.eventually_analyticAt) + have hu' : ContDiffOn ℂ ω u s := fun y hy => (hsub hy).1.contDiffAt.contDiffWithinAt + have hf' : ContDiffOn ℂ ω f s := fun y hy => (hsub hy).2.contDiffAt.contDiffWithinAt + have hb := norm_iteratedFDerivWithin_smul_le hu' hf' hs.uniqueDiffOn hxs + (n := m) (by simp only [le_top]) + have he (n : ℕ) (g : E → F) : iteratedFDerivWithin ℂ n g s x=iteratedFDeriv ℂ n g x := + iteratedFDerivWithin_of_isOpen n hs hxs + have heu (n : ℕ) : iteratedFDerivWithin ℂ n u s x=iteratedFDeriv ℂ n u x := + iteratedFDerivWithin_of_isOpen n hs hxs + simp only [he,heu] at hb + have hs0 : (∑i∈Finset.range (m+1), (m.choose i : ℝ)*‖iteratedFDeriv ℂ i u x‖* + ‖iteratedFDeriv ℂ (m-i) f x‖)=0 := by + apply Finset.sum_eq_zero + intro i hi + have him : i ≤ m := Finset.mem_range_succ_iff.mp hi + by_cases hi0 : i=0 + · subst i + rw [norm_iteratedFDeriv_zero,hu0,norm_zero,mul_zero,zero_mul] + · rw [hz (m-i) (by omega),norm_zero,mul_zero] + rw [hs0] at hb + exact norm_le_zero_iff.mp hb + + + +theorem iteratedFDeriv_smul_of_lower_zero {f : E → F} {u : E → ℂ} {x : E} + (hf : AnalyticAt ℂ f x) (hu : AnalyticAt ℂ u x) (m : ℕ) + (hz : ∀n,n < m → iteratedFDeriv ℂ n f x=0) : + iteratedFDeriv ℂ m (fun y => u y • f y) x=u x • iteratedFDeriv ℂ m f x := by + have hp := iteratedFDeriv_smul_zero hf (hu.sub analyticAt_const) m (sub_self _) hz + have huf : ContDiffAt ℂ m (fun y => u y • f y) x := (hu.smul hf).contDiffAt + have hcf : ContDiffAt ℂ m (fun y => u x • f y) x := + (hf.const_smul (c := u x)).contDiffAt + have he : (fun y => (u y-u x) • f y)= + (fun y => u y • f y)-(fun y => u x • f y) := by ext y; simp [sub_smul] + change iteratedFDeriv ℂ m (fun y => (u y-u x) • f y) x=0 at hp + rw [he,iteratedFDeriv_sub_apply huf hcf, + iteratedFDeriv_const_smul_apply' (hf.contDiffAt)] at hp + exact sub_eq_zero.mp hp + +end SplitTangent.LeadingJet + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafAffineRelations.lean b/lean/OAI/Geometry/SplitTangent/LeafAffineRelations.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e16d6394b2492785ac04d600299a841fd1ef46d --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafAffineRelations.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.ProjectiveLinearCoordinates +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.LeafClosureRelations + +namespace OAI + +/-! Leaf Affine Relations. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) + +include F in + + +theorem leaf_closure_affine_relation + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) + (p : (Fin (e.N+1) → ℂ) →ₗ[ℂ] (Fin (Module.finrank ℂ (S.first (g.finite 1))) → ℂ)) + (i j : Fin (e.N+1)) : + ∃q : MvPolynomial (Option (Fin (Module.finrank ℂ (S.first (g.finite 1))))) ℂ, + q≠0 ∧ ∀x∈closure (L.leaf (g.finite 1)),(e.map x).rep i≠0 → + MvPolynomial.eval (fun t => Option.elim t (projectiveCoordinates i (e.map x) j) + (p (projectiveCoordinates i (e.map x)))) q=0 := by + classical + let r := Module.finrank ℂ (S.first (g.finite 1)) + let D : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1 := + ⟨MvPolynomial.X i,MvPolynomial.isHomogeneous_X ℂ i⟩ + let H : Option (Fin r) → MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1 := + fun t => Option.elim t ⟨MvPolynomial.X j,MvPolynomial.isHomogeneous_X ℂ j⟩ + (fun a => ProjectiveLinearCoordinates.form ((LinearMap.proj a).comp p)) + obtain ⟨q,hq,hrel⟩ := F.leaf_closure_relation L P hy ht hg D (H ∘ finSuccEquiv r) + refine ⟨MvPolynomial.rename (finSuccEquiv r) q,?_,?_⟩ + · exact fun he => hq ((MvPolynomial.rename_injective _ (finSuccEquiv r).injective) + (he.trans (map_zero _).symm)) + · intro x hx hi + have hd : MvPolynomial.eval (e.map x).rep D.val≠0 := by + simpa only [D,MvPolynomial.eval_X] using hi + have he := hrel x hx hd + have hv : ∀t : Option (Fin r), + MvPolynomial.eval (e.map x).rep (H t).val/MvPolynomial.eval (e.map x).rep D.val = + Option.elim t (projectiveCoordinates i (e.map x) j) (p (projectiveCoordinates i (e.map x))) := by + intro t + cases t with + | none => simp only [H,D,Option.elim_none,MvPolynomial.eval_X,projectiveCoordinates,div_eq_mul_inv,mul_comm] + | some a => + simp only [H,D,Option.elim_some,MvPolynomial.eval_X] + rw [ProjectiveLinearCoordinates.eval_form_ratio] + rfl + rw [MvPolynomial.eval_rename] + convert he using 1 + congr 1 + apply congrArg MvPolynomial.eval + funext t + exact (hv (finSuccEquiv r t)).symm + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafAlgebraicDependence.lean b/lean/OAI/Geometry/SplitTangent/LeafAlgebraicDependence.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cf331705c5e95810e940cfb615b00e1bc76cc28 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafAlgebraicDependence.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxMonomials +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.LeafPolynomialGrowth + +namespace OAI + +/-! Leaf Algebraic Dependence. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) + +abbrev leafFrame (t : A) := + F.finite 1 (P.chart.symm (t,(P.chart (g.finite 1)).2)) + +omit [CompleteSpace A] [CompleteSpace B] in +lemma leafFrame_continuousAt (hy : g.finite 1∈P.chart.source) : + ContinuousAt (F.leafFrame P) (P.chart (g.finite 1)).1 := by + have hh := (P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt.comp + (f := fun a : A => (a,(P.chart (g.finite 1)).2)) + (x := (P.chart (g.finite 1)).1) + (continuousAt_id.prodMk continuousAt_const) + have hf := (F.finite_holomorphicAt 1).continuousAt + have he : P.chart.symm ((P.chart (g.finite 1)).1,(P.chart (g.finite 1)).2)=g.finite 1 := + P.chart.left_inv hy + rw [←he] at hf + exact hf.comp (f := fun a : A => P.chart.symm (a,(P.chart (g.finite 1)).2)) + (x := (P.chart (g.finite 1)).1) hh + +include L in + + +theorem leaf_coordinates_dependent + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) + (j : Fin (e.N+1)) (hj : F.finite 1 (g.finite 1) j≠0) + (v : Fin (Module.finrank ℂ (S.first (g.finite 1))+1) → Fin (e.N+1)) : + ∃p : MvPolynomial (Fin (Module.finrank ℂ (S.first (g.finite 1))+1)) ℂ, + p≠0 ∧ (fun t : A => MvPolynomial.eval (fun i => F.leafFrame P t (v i)/F.leafFrame P t j) p) + =ᶠ[𝓝 (P.chart (g.finite 1)).1] 0 := by + classical + let r := Module.finrank ℂ (S.first (g.finite 1)) + let C := (F.degree+r+1)^r*(F.degree+1) + obtain ⟨t,hbig⟩ := PolynomialGrowthArithmetic.box_exceeds C r + let k := (r+1)*t + obtain ⟨hfin,hbound⟩ := F.leaf_polynomial_growth L P hy ht hg k + let := hfin + let q : BoxMonomials.Box (r+1) t → F.LeafPolynomialGerms P k := + fun b => (F.leafPolynomialKernel P k).mkQ (BoxMonomials.homogeneous j v b) + have hnot : ¬LinearIndependent ℂ q := by + intro hlin + have hcard := hlin.fintype_card_le_finrank + have hc : (t+1)^(r+1) ≤ Module.finrank ℂ (F.LeafPolynomialGerms P k) := by + simpa only [BoxMonomials.Box,Fintype.card_fun,Fintype.card_fin] using hcard + exact (Nat.not_lt_of_ge (hc.trans hbound)) hbig + obtain ⟨c,hc,i,hi⟩ := Fintype.not_linearIndependent_iff.mp hnot + let p : MvPolynomial (Fin (r+1)) ℂ := ∑b,c b • BoxMonomials.affine b + have hp : p≠0 := by + intro he + exact hi (Fintype.linearIndependent_iff.mp (BoxMonomials.affine_independent (r+1) t) c he i) + refine ⟨p,hp,?_⟩ + have hzero : (∑b,c b • BoxMonomials.homogeneous j v b)∈F.leafPolynomialKernel P k := by + apply (Submodule.Quotient.mk_eq_zero _).mp + change (F.leafPolynomialKernel P k).mkQ (∑b,c b • BoxMonomials.homogeneous j v b)=0 + simpa only [map_sum,map_smul] using hc + have hn : ∀ᶠ a in 𝓝 (P.chart (g.finite 1)).1,F.leafFrame P a j≠0 := by + apply ((continuous_apply j).continuousAt.comp (F.leafFrame_continuousAt P hy)).eventually_ne + simpa only [Function.comp_apply,leafFrame,Prod.mk.eta,P.chart.left_inv hy] using hj + filter_upwards [hzero,hn] with a ha haj + change MvPolynomial.eval (F.leafFrame P a) (↑(∑b,c b • BoxMonomials.homogeneous j v b))=0 at ha + have he : MvPolynomial.eval (F.leafFrame P a) (↑(∑b,c b • BoxMonomials.homogeneous j v b))= + (F.leafFrame P a j)^k * + MvPolynomial.eval (fun i => F.leafFrame P a (v i)/F.leafFrame P a j) p := by + simp only [Submodule.coe_sum,Submodule.coe_smul,map_sum,MvPolynomial.smul_eval,p, + BoxMonomials.eval_homogeneous j v _ _ haj,Finset.mul_sum] + apply Finset.sum_congr rfl + intro b hb + ring + rw [he] at ha + exact (mul_eq_zero.mp ha).resolve_left (pow_ne_zero _ haj) + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafClosureRelations.lean b/lean/OAI/Geometry/SplitTangent/LeafClosureRelations.lean new file mode 100644 index 0000000000000000000000000000000000000000..0871c7b3e5a67b1e9db87697d0af500839dde195 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafClosureRelations.lean @@ -0,0 +1,78 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.LeafPolynomialGrowth +import OAI.Geometry.SplitTangent.LeafHomogeneousRelations +import OAI.Geometry.SplitTangent.ProjectiveHypersurfaces + +namespace OAI + +/-! Leaf Closure Relations. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) + +lemma polynomialKernel_germIn {k : ℕ} + {Q : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k} + (hy : g.finite 1∈P.chart.source) (hQ : Q∈F.leafPolynomialKernel P k) : + L.GermIn (e.homogeneousZeroLocus Q.val) (g.finite 1) := by + apply (L.germIn_iff P hy).mpr + have ha := e.linearFrame_denominator_eventually + (fun i => (F.a i).eval 1) (F.finite_denominator_ne 1) + let s : A → X.Carrier := fun t => P.chart.symm (t,(P.chart (g.finite 1)).2) + have hs : ContinuousAt s (P.chart (g.finite 1)).1 := + (P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt.comp + (f := fun t : A => (t,(P.chart (g.finite 1)).2)) (x := (P.chart (g.finite 1)).1) + (continuousAt_id.prodMk continuousAt_const) + have hae : ∀ᶠ t in 𝓝 (P.chart (g.finite 1)).1, + (∑i,(F.a i).eval 1*(e.map (s t)).rep i)≠0 := + (by simpa only [s,P.chart.left_inv hy] using hs.tendsto : + Tendsto s (𝓝 (P.chart (g.finite 1)).1) (𝓝 (g.finite 1))).eventually ha + filter_upwards [hQ,hae] with t ht hta + exact (e.linearFrame_zero_iff Q.property _ hta).mp ht + +lemma polynomialKernel_closure_zero {k : ℕ} + {Q : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k} + (hy : g.finite 1∈P.chart.source) (hQ : Q∈F.leafPolynomialKernel P k) : + ∀x∈closure (L.leaf (g.finite 1)),MvPolynomial.eval (e.map x).rep Q.val=0 := + L.closure_leaf_subset (e.homogeneousZeroLocus_locally_holomorphic Q.property) + (e.homogeneousZeroLocus_isClosed Q.property) (F.polynomialKernel_germIn L P hy hQ) + +include F in + + +theorem leaf_closure_relation + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) + (D : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1) + (H : Fin (Module.finrank ℂ (S.first (g.finite 1))+1) → + MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1) : + ∃p : MvPolynomial (Fin (Module.finrank ℂ (S.first (g.finite 1))+1)) ℂ, + p≠0 ∧ ∀x∈closure (L.leaf (g.finite 1)), MvPolynomial.eval (e.map x).rep D.val≠0 → + MvPolynomial.eval (fun i => MvPolynomial.eval (e.map x).rep (H i).val / + MvPolynomial.eval (e.map x).rep D.val) p=0 := by + obtain ⟨k,Q,hQ,p,hp,he⟩ := F.leaf_homogeneous_relation L P hy ht hg D H + refine ⟨p,hp,?_⟩ + intro x hx hD + have hz := F.polynomialKernel_closure_zero L P hy hQ x hx + rw [he _ hD] at hz + exact (mul_eq_zero_iff_left (pow_ne_zero k hD)).mp hz + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafCompactLimits.lean b/lean/OAI/Geometry/SplitTangent/LeafCompactLimits.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc2c6634f78bcbe0e72634786b4675590cf93048 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafCompactLimits.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Geometry.SplitTangent.CompactSetLimits +import OAI.Geometry.SplitTangent.FoliationLeaves +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.LeafPlaques +import OAI.Geometry.SplitTangent.AllCompactLeaves + +namespace OAI + +/-! Leaf Compact Limits. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 P.symm (a₁,(P y).2) + have hW : IsOpen W := P.continuousOn.isOpen_inter_preimage P.open_source (hU.prod hV) + have hf : ContinuousOn f W := by + intro y hy + apply ContinuousAt.continuousWithinAt + exact ContinuousAt.comp (f := fun y => (a₁,(P y).2)) (g := P.symm) + (P.symm.continuousAt (hT ⟨ha₁,hy.2.2⟩)) + (continuousAt_const.prodMk (P.continuousAt hy.1).snd) + have hInv : ∀y∈(K : Set X.Carrier),y∈W → f y∈(K : Set X.Carrier) := by + apply (closure_minimal (t := {K : Compacts X.Carrier | + ∀y∈(K : Set X.Carrier),y∈W → f y∈(K : Set X.Carrier)}) ?_ + (CompactSetLimits.isClosed_local_invariance hW hf)) hK + rintro _ ⟨x,rfl⟩ y hy hyW + apply L.plaques.leaf_saturated hy + have hh := L.plaques.related_in_rectangle (i := z) hUc hT hyW.2.1 ha₁ hyW.2.2 + change L.plaques.Related (P.symm (P y)) (f y) at hh + rwa [P.left_inv hyW.1] at hh + have ht₀ := hT (show (a₀,b)∈U ×ˢ V from ⟨ha₀,hb⟩) + have hh := hInv (P.symm (a₀,b)) hx ⟨P.map_target ht₀,by + change P (P.symm (a₀,b))∈U ×ˢ V + rw [P.right_inv ht₀] + exact ⟨ha₀,hb⟩⟩ + simpa only [f,P.right_inv ht₀] using hh + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafGermIdentity.lean b/lean/OAI/Geometry/SplitTangent/LeafGermIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9cf6c7db5e86116f8d9e050df5738b877b27b5d --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafGermIdentity.lean @@ -0,0 +1,83 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Leaf Germ Identity. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + +omit [CompleteSpace A] [CompleteSpace B] in +lemma tangent_curve_snd_derivative (P : AlignedProductChart S A B) + {h : ℂ → X.Carrier} {z : ℂ} + (hh : ContMDiffAt 𝓘(ℂ,ℂ) (ModelWithCorners X) ω h z) + (hy : h z∈P.chart.source) + (ht : mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) h z (1 : ℂ)∈S.first (h z)) : + HasFDerivAt (fun t => (P.chart (h t)).2) (0 : ℂ →L[ℂ] B) z := by + have hp := P.holomorphicAt hy + have ha := (hp.comp z hh).contDiffAt.analyticAt.differentiableAt + have hc := mfderiv_comp z (hp.mdifferentiableAt (by simp)) (hh.mdifferentiableAt (by simp)) + rw [mfderiv_eq_fderiv] at hc + have hd : fderiv ℂ (fun t => (P.chart (h t)).2) z=0 := by + change fderiv ℂ (fun x => ((P.chart ∘ h) x).2) z=0 + rw [fderiv.snd ha,hc] + apply ContinuousLinearMap.ext + intro w + have hw : mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) h z w∈S.first (h z) := by + have he : w=w • (1 : ℂ) := by simp + erw [he,map_smul] + exact (S.first (h z)).smul_mem w ht + have hm : mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (h z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) h z w) ∈ + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (h z)).toLinearMap (S.first (h z)) := + ⟨_,hw,rfl⟩ + rw [P.first _ hy] at hm + exact hm + rw [←hd] + exact ha.snd.hasFDerivAt + +omit [CompleteSpace A] [CompleteSpace B] in +theorem tangent_curve_snd_eventually (P : AlignedProductChart S A B) + {h : ℂ → X.Carrier} {z₀ : ℂ} + (hh : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω h) + (hy : h z₀∈P.chart.source) + (ht : ∀z,mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) h z (1 : ℂ)∈S.first (h z)) : + ∀ᶠ z in 𝓝 z₀,(P.chart (h z)).2=(P.chart (h z₀)).2 := by + have hnh := (hh z₀).continuousAt.preimage_mem_nhds (P.chart.open_source.mem_nhds hy) + obtain ⟨r,hr,hs⟩ := Metric.mem_nhds_iff.mp hnh + have hD : ∀z∈Metric.ball z₀ r, + HasFDerivAt (fun t => (P.chart (h t)).2) (0 : ℂ →L[ℂ] B) z := + fun z hz => P.tangent_curve_snd_derivative (hh z) (hs hz) (ht z) + filter_upwards [Metric.ball_mem_nhds z₀ hr] with z hz + exact Metric.isOpen_ball.is_const_of_fderiv_eq_zero (convex_ball z₀ r).isPreconnected + (fun z hz => (hD z hz).differentiableAt.differentiableWithinAt) + (fun z hz => (hD z hz).fderiv) hz (Metric.mem_ball_self hr) + + + +theorem germ_zero_of_all_jets (P : AlignedProductChart S A B) (L : LeafJetAtlas S) + {f : X.Carrier → ℂ} {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hz : ∀m,L.jet f y m=0) : + (fun a => f (P.chart.symm (a,(P.chart y).2))) =ᶠ[𝓝 (P.chart y).1] 0 := by + apply HorizontalJet.eventually_zero_of_all_zero (P.coordinate_function_analytic hy hf) + intro m + apply (P.jet_eq_zero_iff f hy m).mp + rw [P.jet_independent (L.chart y) hy (L.mem_source y) hf m (fun n hn => hz n)] + exact hz m + +end SplitTangent.AlignedProductChart + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafHomogeneousRelations.lean b/lean/OAI/Geometry/SplitTangent/LeafHomogeneousRelations.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a0f82590c9165e793c7428af852f1cc777a2a14 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafHomogeneousRelations.lean @@ -0,0 +1,75 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxMonomials +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.LeafPolynomialGrowth + +namespace OAI + +/-! Leaf Homogeneous Relations. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) + +include L in +theorem leaf_homogeneous_relation + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) + (D : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1) + (H : Fin (Module.finrank ℂ (S.first (g.finite 1))+1) → + MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1) : + ∃(k : ℕ) (Q : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k), + Q∈F.leafPolynomialKernel P k ∧ + ∃p : MvPolynomial (Fin (Module.finrank ℂ (S.first (g.finite 1))+1)) ℂ, + p≠0 ∧ ∀x : Fin (e.N+1) → ℂ,MvPolynomial.eval x D.val≠0 → + MvPolynomial.eval x Q.val=(MvPolynomial.eval x D.val)^k* + MvPolynomial.eval (fun i => MvPolynomial.eval x (H i).val/MvPolynomial.eval x D.val) p := by + classical + let r := Module.finrank ℂ (S.first (g.finite 1)) + let C := (F.degree+r+1)^r*(F.degree+1) + obtain ⟨t,hbig⟩ := PolynomialGrowthArithmetic.box_exceeds C r + let k := (r+1)*t + obtain ⟨hfin,hbound⟩ := F.leaf_polynomial_growth L P hy ht hg k + let := hfin + let q : BoxMonomials.Box (r+1) t → F.LeafPolynomialGerms P k := + fun b => (F.leafPolynomialKernel P k).mkQ (BoxMonomials.homogeneousForms D H b) + have hnot : ¬LinearIndependent ℂ q := by + intro hlin + have hcard := hlin.fintype_card_le_finrank + have hc : (t+1)^(r+1) ≤ Module.finrank ℂ (F.LeafPolynomialGerms P k) := by + simpa only [BoxMonomials.Box,Fintype.card_fun,Fintype.card_fin] using hcard + exact (Nat.not_lt_of_ge (hc.trans hbound)) hbig + obtain ⟨c,hc,i,hi⟩ := Fintype.not_linearIndependent_iff.mp hnot + let p : MvPolynomial (Fin (r+1)) ℂ := ∑b,c b • BoxMonomials.affine b + have hp : p≠0 := by + intro he + exact hi (Fintype.linearIndependent_iff.mp (BoxMonomials.affine_independent (r+1) t) c he i) + refine ⟨k,∑b,c b • BoxMonomials.homogeneousForms D H b,?_,p,hp,?_⟩ + · apply (Submodule.Quotient.mk_eq_zero _).mp + change (F.leafPolynomialKernel P k).mkQ (∑b,c b • BoxMonomials.homogeneousForms D H b)=0 + simpa only [map_sum,map_smul] using hc + · intro x hx + simp only [Submodule.coe_sum,Submodule.coe_smul,map_sum,MvPolynomial.smul_eval,p, + BoxMonomials.eval_homogeneousForms D H _ _ hx,Finset.mul_sum] + apply Finset.sum_congr rfl + intro b hb + ring + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafJetAtlas.lean b/lean/OAI/Geometry/SplitTangent/LeafJetAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..42c43735b2d1328d4891f06fcf11ecbea69404eb --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafJetAtlas.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.TwistedCurveTensor +import OAI.Geometry.SplitTangent.HolomorphicManifoldProduct +import OAI.Geometry.SplitTangent.ManifoldLeafJets +import OAI.Geometry.SplitTangent.ManifoldJetAnalytic + +namespace OAI + +/-! Leaf Jet Atlas. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent + + +structure LeafJetAtlas {X : ComplexManifold.{u}} (S : TangentSplitting X) where + chart : ∀x, AlignedProductChart S (S.FirstModel x) (S.SecondModel x) + mem_source : ∀x,x∈(chart x).chart.source + +def TangentSplitting.leafJetAtlas {X : ComplexManifold.{u}} (S : TangentSplitting X) + (hI₁ : Integrable X S.first) (hI₂ : Integrable X S.second) : LeafJetAtlas S where + chart x := (S.exists_aligned_product_chart hI₁ hI₂ x).choose + mem_source x := (S.exists_aligned_product_chart hI₁ hI₂ x).choose_spec.1 + +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (A : LeafJetAtlas S) + +abbrev jet (f : X.Carrier → ℂ) (y : X.Carrier) (m : ℕ) : TangentTensor X m := + (A.chart y).jet f y m + +lemma jet_add {f h : X.Carrier → ℂ} {y : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hh : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω h y) (m : ℕ) : + A.jet (f+h) y m=A.jet f y m+A.jet h y m := + (A.chart y).jet_add (A.mem_source y) hf hh m + +lemma jet_csmul {f : X.Carrier → ℂ} {y : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) (m : ℕ) (c : ℂ) : + A.jet (c • f) y m=c • A.jet f y m := + (A.chart y).jet_csmul (A.mem_source y) hf m c + +@[simp] lemma jet_zero (y : X.Carrier) (m : ℕ) : A.jet 0 y m=0 := + (A.chart y).jet_zero y m + +lemma jet_smul {f v : X.Carrier → ℂ} {y : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hv : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω v y) + (m : ℕ) (hz : ∀n,n < m → A.jet f y n=0) : + A.jet (fun x => v x*f x) y m=v y • A.jet f y m := + (A.chart y).jet_smul (A.mem_source y) hf hv m hz + +lemma jet_congr {f h : X.Carrier → ℂ} {y : X.Carrier} + (he : f=ᶠ[𝓝 y] h) (m : ℕ) : A.jet f y m=A.jet h y m := + (A.chart y).jet_congr (A.mem_source y) he m + +lemma parameter_slice {f : ℂ × X.Carrier → ℂ} {z : ℂ} {y : X.Carrier} + (hf : ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,ℂ) ω f (z,y)) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω (fun x => f (z,x)) y := + hf.comp y (contMDiffAt_const.prodMk contMDiffAt_id) + + + +theorem leading_analytic {g : ℂ → X.Carrier} {f : ℂ × X.Carrier → ℂ} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hf : ∀z,ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,ℂ) ω f (z,g z)) + (m : ℕ) (hz : ∀z n,n < m → A.jet (fun x => f (z,x)) (g z) n=0) (z₀ : ℂ) : + AnalyticAt ℂ (tangentTensorCoordinates g + (fun z => A.jet (fun x => f (z,x)) (g z) m) z₀) z₀ := by + let P := A.chart (g z₀) + have hp := P.jet_parameter_analytic (hg z₀) (A.mem_source _) (hf z₀) m + apply hp.congr + filter_upwards [(hg z₀).continuousAt.preimage_mem_nhds + (P.chart.open_source.mem_nhds (A.mem_source _))] with z hPz + have he := P.jet_independent (A.chart (g z)) hPz (A.mem_source _) + (parameter_slice (hf z)) m (hz z) + exact congrArg (fun t : TangentTensor X m => + tangentTensorCoordinates g (fun _ => t) z₀ z) he + +lemma jet_supported (f : X.Carrier → ℂ) (y : X.Carrier) (m : ℕ) + (v : Fin m → Tangent X y) : + A.jet f y m (fun i => S.projector y (v i))=A.jet f y m v := + (A.chart y).jet_supported f (A.mem_source _) m v + +lemma jet_symmetric {f : X.Carrier → ℂ} {y : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (m : ℕ) (v : Fin m → Tangent X y) (σ : Equiv.Perm (Fin m)) : + A.jet f y m (v ∘ σ)=A.jet f y m v := + (A.chart y).jet_symmetric (A.mem_source _) hf m v σ + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafLimitRelations.lean b/lean/OAI/Geometry/SplitTangent/LeafLimitRelations.lean new file mode 100644 index 0000000000000000000000000000000000000000..e3f1073a8b4800c7ab409fe31660d7bc600ddd6d --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafLimitRelations.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxRelationLocus +import OAI.Geometry.SplitTangent.CompactPolynomialRelations +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PolynomialRelationLocus +import OAI.Geometry.SplitTangent.ProjectiveLinearCoordinates +import OAI.Geometry.SplitTangent.LeafCompactLimits + +namespace OAI + +/-! Leaf Limit Relations. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 MvPolynomial.eval (e.map z).rep (H i).val / + MvPolynomial.eval (e.map z).rep D.val) p=0 := by + classical + obtain ⟨t,ht⟩ := L.exists_uniform_boxRelationLocus e hRC hdim x₀ D H + have hmem : K∈compactRelationLocus e (BoxMonomials.indexedForms D H t) := by + apply (closure_minimal ?_ (compactRelationLocus_isClosed e _)) hK + rintro _ ⟨y,rfl⟩ + obtain ⟨c,hc,hzero⟩ := show y∈L.boxRelationLocus e D H t from ht ▸ mem_univ y + exact ⟨c,hc,fun z hz => hzero (subset_closure hz)⟩ + obtain ⟨c,hc,hzero⟩ := hmem + let r := Module.finrank ℂ (S.first x₀) + let p : MvPolynomial (Fin (r+1)) ℂ := ∑j,c j • BoxMonomials.indexedAffine j + refine ⟨p,?_,?_⟩ + · intro he + apply hc + funext j + exact Fintype.linearIndependent_iff.mp (BoxMonomials.indexedAffine_independent (r+1) t) c he j + · intro z hz hD + have hh : MvPolynomial.eval (e.map z).rep + (relationPolynomial e (BoxMonomials.indexedForms D H t) c).val=0 := hzero hz + rw [relation_eval] at hh + simp only [BoxMonomials.indexedForms_eval D H _ _ hD,mul_assoc,←Finset.mul_sum] at hh + apply (mul_eq_zero_iff_left (pow_ne_zero _ hD)).mp + convert hh using 1 + simp only [p,map_sum,MvPolynomial.smul_eval] + congr 1 + apply Finset.sum_congr rfl + intro j hj + ring + +lemma leafLimits_affine_relation {K : Compacts X.Carrier} (hK : K∈L.leafLimits e hRC hdim) + (x₀ : X.Carrier) + (p : (Fin (e.N+1) → ℂ) →ₗ[ℂ] (Fin (Module.finrank ℂ (S.first x₀)) → ℂ)) + (i j : Fin (e.N+1)) : + ∃q : MvPolynomial (Option (Fin (Module.finrank ℂ (S.first x₀)))) ℂ, + q≠0 ∧ ∀x∈(K : Set X.Carrier),(e.map x).rep i≠0 → + MvPolynomial.eval (fun t => Option.elim t (projectiveCoordinates i (e.map x) j) + (p (projectiveCoordinates i (e.map x)))) q=0 := by + classical + let r := Module.finrank ℂ (S.first x₀) + let D : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1 := + ⟨MvPolynomial.X i,MvPolynomial.isHomogeneous_X ℂ i⟩ + let H : Option (Fin r) → MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ 1 := + fun t => Option.elim t ⟨MvPolynomial.X j,MvPolynomial.isHomogeneous_X ℂ j⟩ + (fun a => ProjectiveLinearCoordinates.form ((LinearMap.proj a).comp p)) + obtain ⟨q,hq,hrel⟩ := L.leafLimits_relation e hRC hdim hK x₀ D (H ∘ finSuccEquiv r) + refine ⟨MvPolynomial.rename (finSuccEquiv r) q,?_,?_⟩ + · exact fun he => hq ((MvPolynomial.rename_injective _ (finSuccEquiv r).injective) + (he.trans (map_zero _).symm)) + · intro x hx hi + have hd : MvPolynomial.eval (e.map x).rep D.val≠0 := by + simpa only [D,MvPolynomial.eval_X] using hi + have he := hrel x hx hd + have hv : ∀t : Option (Fin r), + MvPolynomial.eval (e.map x).rep (H t).val/MvPolynomial.eval (e.map x).rep D.val = + Option.elim t (projectiveCoordinates i (e.map x) j) (p (projectiveCoordinates i (e.map x))) := by + intro t + cases t with + | none => simp only [H,D,Option.elim_none,MvPolynomial.eval_X,projectiveCoordinates,div_eq_mul_inv,mul_comm] + | some a => + simp only [H,D,Option.elim_some,MvPolynomial.eval_X] + rw [ProjectiveLinearCoordinates.eval_form_ratio] + rfl + rw [MvPolynomial.eval_rename] + convert he using 1 + congr 1 + apply congrArg MvPolynomial.eval + funext t + exact (hv (finSuccEquiv r t)).symm + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafLimitsSinglePlaque.lean b/lean/OAI/Geometry/SplitTangent/LeafLimitsSinglePlaque.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f5c18f6171b636d76255fa31ffadee38252fa63 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafLimitsSinglePlaque.lean @@ -0,0 +1,145 @@ +import Mathlib +import OAI.Geometry.SplitTangent.FoliationLeaves +import OAI.Geometry.SplitTangent.PlaqueConnectedSets +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.LeafCompactLimits +import OAI.Geometry.SplitTangent.LeafLimitRelations +import OAI.Geometry.SplitTangent.AllCompactLeaves + +namespace OAI + +/-! Leaf Limits Single Plaque. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (e : ProjectiveEmbedding X) + +lemma leafLimits_locallySinglePlaque (hRC : RationallyConnected e) (hdim : 0 (hrect hh).1 + have hrectP : ∀t∈U ×ˢ V,(e.map (P.chart.symm t)).rep i≠0 := fun t hh => (hrect hh).2 + obtain ⟨p,Q,hxQ,hQ,_,_⟩ := e.exists_linear_plaque_coordinates P hxt i hi' + have hsecond : ∀t,(Q t).2=t.2 := by + intro t + rw [hQ] + obtain ⟨U',V',hU',hUc',hV',hxU',hxV',hVV,hQT,hslice⟩ := + UniformPlaqueSlices.exists_slices Q hxQ hsecond hU hV hx + let T : Set (S.SecondModel z) := {b | b∈V' ∧ ∃a∈U,P.chart.symm (a,b)∈(K : Set X.Carrier)} + let lift : S.FirstModel z → S.SecondModel z → X.Carrier := fun a b => P.chart.symm (Q.symm (a,b)) + have hliftUV : ∀a∈U',∀b∈T,Q.symm (a,b)∈U ×ˢ V := + fun a ha b hb => (hslice a ha b hb.1).1 + have hliftP : ∀a∈U',∀b∈T,(e.map (lift a b)).rep i≠0 := + fun a ha b hb => hrectP _ (hliftUV a ha b hb) + have hliftW : ∀a∈U',∀b∈T,lift a b∈(K : Set X.Carrier) := by + intro a ha b hb + obtain ⟨a₀,ha₀,hw⟩ := hb.2 + have hs := hslice a ha b hb.1 + have hh := L.leafLimits_saturated e hRC hdim hK hU hUc hV hrectT ha₀ hs.1.1 (hVV hb.1) hw + change P.chart.symm _∈(K : Set X.Carrier) + have he : ((Q.symm (a,b)).1,b)=Q.symm (a,b) := by + exact Prod.ext rfl hs.2.symm + rwa [he] at hh + let r := Module.finrank ℂ (S.first x₀) + have hr : Module.finrank ℂ (S.FirstModel z)=Module.finrank ℂ (Fin r → ℂ) := by + rw [←P.first_finrank hzs] + simpa only [Module.finrank_fintype_fun_eq_card,Fintype.card_fin,r] using + L.first_rank_eq z x₀ + let E : S.FirstModel z ≃L[ℂ] (Fin r → ℂ) := ContinuousLinearEquiv.ofFinrankEq hr + let coord : X.Carrier → Fin (e.N+1) → ℂ := fun y => projectiveCoordinates i (e.map y) + let first : X.Carrier → Fin r → ℂ := fun y => E (p (coord y)) + have hfirst : ∀a∈U',∀b∈T,first (lift a b)=E a := by + intro a ha b hb + have hh := congrArg Prod.fst (Q.right_inv (hQT (show (a,b)∈U' ×ˢ V' from ⟨ha,hb.1⟩))) + rw [hQ] at hh + exact congrArg E hh + have hinj : ∀a∈U',InjOn (fun b => coord (lift a b)) T := by + intro a ha b hb c hc he + have he' := e.coordinates_injOn i (hliftP a ha b hb) (hliftP a ha c hc) he + have hP₁ := P.chart.right_inv (hrectT (hliftUV a ha b hb)) + have hP₂ := P.chart.right_inv (hrectT (hliftUV a ha c hc)) + have hh := congrArg (fun y => (P.chart y).2) he' + change (P.chart (P.chart.symm (Q.symm (a,b)))).2= + (P.chart (P.chart.symm (Q.symm (a,c)))).2 at hh + rw [hP₁,hP₂,(hslice a ha b hb.1).2,(hslice a ha c hc.1).2] at hh + exact hh + have hrels := fun j => L.leafLimits_affine_relation e hRC hdim hK x₀ (E.toLinearMap.comp p.toLinearMap) i j + choose q hq hroot using hrels + have hT : T.Finite := PolynomialSpecialization.finite_transversal T hU' ⟨(Q x).1,hxU'⟩ + E lift coord first hfirst hinj q hq (by + intro a ha b hb j + exact hroot j (lift a b) (hliftW a ha b hb) (hliftP a ha b hb)) + apply L.plaques.locallySinglePlaque_of_finite_transversal hU hUc hV' + (fun t ht => hrectT ⟨ht.1,hVV ht.2⟩) hzs ⟨hx.1,hxV'⟩ hT + intro y hy hys hyUV + refine ⟨hyUV.2,(P.chart y).1,hyUV.1,?_⟩ + change P.chart.symm (P.chart y)∈(K : Set X.Carrier) + simpa only [P.chart.left_inv hys] using hy + +lemma leafLimits_subset_leaf (hRC : RationallyConnected e) (hdim : 0 L.leafLimits_locallySinglePlaque e hRC hdim hK x z) hx + +lemma leafLimits_eq_leaf (hRC : RationallyConnected e) (hdim : 0 P.chart.symm (a,(P.chart y).2) + have hs : s (P.chart y).1=y := P.chart.left_inv hy + have hsc : ContinuousAt s (P.chart y).1 := by + exact (P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt.comp + (f := fun a : A => (a,(P.chart y).2)) (x := (P.chart y).1) + (continuousAt_id.prodMk continuousAt_const) + have ht : ContinuousAt (Q.chart ∘ s) (P.chart y).1 := + (Q.chart.continuousAt hq).comp_of_eq hsc hs + have hQ : ∀ᶠ a in 𝓝 (P.chart y).1,s a∈Q.chart.source := + hsc.preimage_mem_nhds (by rw [hs]; exact Q.chart.open_source.mem_nhds hq) + have hpi : Tendsto (fun a : A => (a,(P.chart y).2)) (𝓝 (P.chart y).1) (𝓝 (P.chart y)) := + continuousAt_id.prodMk continuousAt_const + have haxes := hpi.eventually (P.transition_product Q (P.chart.map_source hy) + (by simpa only [P.chart.left_inv hy] using hq)) + have hfirst : Tendsto (fun a => (Q.chart (s a)).1) (𝓝 (P.chart y).1) (𝓝 (Q.chart y).1) := by + simpa only [ContinuousAt,Function.comp_apply,hs] using ht.fst + filter_upwards [hQ,haxes,hfirst.eventually h] with a hQa hax ha + have hb : (Q.chart (s a)).2=(Q.chart y).2 := by + have hb := congrArg Prod.snd hax + simpa only [Function.comp_apply,Prod.mk.eta,P.chart.left_inv hy,s] using hb + change s a∈Z + have he : Q.chart.symm ((Q.chart (s a)).1,(Q.chart y).2)=s a := by + rw [←hb,Prod.mk.eta,Q.chart.left_inv hQa] + rwa [he] at ha + +lemma germIn_iff [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) (Q : AlignedProductChart S C D) + {Z : Set X.Carrier} {y : X.Carrier} (hy : y∈P.chart.source) (hq : y∈Q.chart.source) : + P.GermIn Z y ↔ Q.GermIn Z y := + ⟨Q.germIn_transfer P hq hy,P.germIn_transfer Q hy hq⟩ + +lemma all_jets_of_germ_zero [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) (L : LeafJetAtlas S) + {f : X.Carrier → ℂ} {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hz : (fun a => f (P.chart.symm (a,(P.chart y).2))) =ᶠ[𝓝 (P.chart y).1] 0) : + ∀m,L.jet f y m=0 := by + have hP : ∀m,P.jet f y m=0 := by + intro m + apply (P.jet_eq_zero_iff f hy m).mpr + apply (HorizontalJet.value_eq_zero_iff _ _ _).mpr + have he := (hz.iteratedFDeriv ℂ m).self_of_nhds + simpa only [Function.comp_apply,iteratedFDeriv_zero,Pi.zero_apply] using he + intro m + induction m using Nat.strong_induction_on with + | h m ih => + change (L.chart y).jet f y m=0 + rw [← P.jet_independent (L.chart y) hy (L.mem_source y) hf m (fun n hn => ih n hn)] + exact hP m + +end AlignedProductChart + +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +def plaques : PlaqueSystem X.Carrier S.FirstModel S.SecondModel where + chart x := (L.chart x).chart + covering x := ⟨x,L.mem_source x⟩ + +abbrev leaf (x : X.Carrier) : Set X.Carrier := L.plaques.leaf x + +def GermIn (Z : Set X.Carrier) (y : X.Carrier) : Prop := (L.chart y).GermIn Z y + +lemma germIn_iff {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) {Z : Set X.Carrier} {y : X.Carrier} + (hy : y∈P.chart.source) : L.GermIn Z y ↔ P.GermIn Z y := + (L.chart y).germIn_iff P (L.mem_source y) hy + +lemma germIn_mem {Z : Set X.Carrier} {y : X.Carrier} (h : L.GermIn Z y) : y∈Z := by + have he := h.self_of_nhds + simpa only [Prod.mk.eta,(L.chart y).chart.left_inv (L.mem_source y)] using he + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafPolynomialGrowth.lean b/lean/OAI/Geometry/SplitTangent/LeafPolynomialGrowth.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b351c897ccd9ad8956882ac8a682c6bb4203ab4 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafPolynomialGrowth.lean @@ -0,0 +1,125 @@ +import Mathlib +import OAI.Geometry.SplitTangent.AmbientLeafSectionBound +import OAI.Geometry.SplitTangent.CurveHomogeneousSections +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.PolynomialLeafGerms + +namespace OAI + +/-! Leaf Polynomial Growth. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + (P : AlignedProductChart S A B) + +def leafPolynomialKernel (k : ℕ) : + Submodule ℂ (MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k) where + carrier := {p | (fun t : A => MvPolynomial.eval + (F.finite 1 (P.chart.symm (t,(P.chart (g.finite 1)).2))) p.val) + =ᶠ[𝓝 (P.chart (g.finite 1)).1] 0} + zero_mem' := by + filter_upwards [] with t + simp + add_mem' := by + intro p q hp hq + filter_upwards [hp,hq] with t ht ht' + simp only [Submodule.coe_add,MvPolynomial.eval_add,ht,ht',Pi.zero_apply,add_zero] + smul_mem' := by + intro c p hp + filter_upwards [hp] with t ht + simp only [Submodule.coe_smul,MvPolynomial.smul_eval,ht,Pi.zero_apply,mul_zero] + +abbrev LeafPolynomialGerms (k : ℕ) := + (MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k) ⧸ F.leafPolynomialKernel P k + +def coefficientQuotient (a k : ℕ) : HomogeneousTuple (e := e) a k →ₗ[ℂ] + (Fin (a+1) → F.LeafPolynomialGerms P k) where + toFun p i := (F.leafPolynomialKernel P k).mkQ (p i) + map_add' _ _ := by ext i; exact map_add _ _ _ + map_smul' c p := by + funext i + exact (F.leafPolynomialKernel P k).mkQ.map_smul c (p i) + +omit [CompleteSpace A] [CompleteSpace B] in +lemma coefficientQuotient_surjective (a k : ℕ) : + Function.Surjective (F.coefficientQuotient P a k) := by + intro q + choose p hp using fun i => (F.leafPolynomialKernel P k).mkQ_surjective (q i) + exact ⟨p,funext hp⟩ + +def sectionGermMap (a k : ℕ) : HomogeneousTuple (e := e) a k →ₗ[ℂ] + (F.ambientTransition a k).GermSpace L := + (SeparatedQuotientFiltration.zeroPart ((F.ambientTransition a k).contact L)).mkQ.comp (F.sections a k) + +lemma sectionGermMap_ker_le (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (a k : ℕ) : (F.sectionGermMap L a k).ker ≤ (F.coefficientQuotient P a k).ker := by + intro p hp + have hf : F.sections a k p∈SeparatedQuotientFiltration.zeroPart + ((F.ambientTransition a k).contact L) := (Submodule.Quotient.mk_eq_zero _).mp hp + have hc := F.flat_section_coefficients L P hy ht p hf + change F.coefficientQuotient P a k p=0 + funext i + exact (Submodule.Quotient.mk_eq_zero _).mpr (hc i) + +include L in + + +theorem leaf_polynomial_finite_and_bound + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) (a k : ℕ) : + Module.Finite ℂ (F.LeafPolynomialGerms P k) ∧ + (a+1)*Module.finrank ℂ (F.LeafPolynomialGerms P k) ≤ + (a+k*F.degree+Module.finrank ℂ (S.first (g.finite 1))).choose + (Module.finrank ℂ (S.first (g.finite 1)))*(a+k*F.degree+1) := by + obtain ⟨hfin,hbound⟩ := (F.ambientTransition a k).germ_finite_and_bound L hg + let := hfin + obtain ⟨hQ,hb⟩ := LinearKernelDimension.finite_and_bound (F.sectionGermMap L a k) + (F.coefficientQuotient P a k) (F.sectionGermMap_ker_le L P hy ht a k) + (F.coefficientQuotient_surjective P a k) + let := hQ + let ev : (Fin (a+1) → F.LeafPolynomialGerms P k) →ₗ[ℂ] F.LeafPolynomialGerms P k := + LinearMap.proj (0 : Fin (a+1)) + have hev : Function.Surjective ev := fun v => ⟨fun _ => v,rfl⟩ + let : Module.Finite ℂ (F.LeafPolynomialGerms P k) := Module.Finite.of_surjective ev hev + refine ⟨inferInstance,?_⟩ + let : AddCommGroup (F.LeafPolynomialGerms P k) := + Module.addCommMonoidToAddCommGroup ℂ + have he : Module.finrank ℂ (Fin (a+1) → F.LeafPolynomialGerms P k)= + (a+1)*Module.finrank ℂ (F.LeafPolynomialGerms P k) := by + rw [Module.finrank_pi_fintype] + simp + rw [he] at hb + exact hb.trans hbound + +include L in + + +theorem leaf_polynomial_growth + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + (hg : PointedGenerated g S.first) (k : ℕ) : + Module.Finite ℂ (F.LeafPolynomialGerms P k) ∧ + Module.finrank ℂ (F.LeafPolynomialGerms P k) ≤ + (F.degree+Module.finrank ℂ (S.first (g.finite 1))+1)^ + (Module.finrank ℂ (S.first (g.finite 1)))*(F.degree+1)* + (k+1)^(Module.finrank ℂ (S.first (g.finite 1))) := by + obtain ⟨hf,hb⟩ := F.leaf_polynomial_finite_and_bound L P hy ht hg k k + exact ⟨hf,PolynomialGrowthArithmetic.cancel_graph_dimension _ _ _ _ hb⟩ + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafProducts.lean b/lean/OAI/Geometry/SplitTangent/LeafProducts.lean new file mode 100644 index 0000000000000000000000000000000000000000..a49d8b8a87914ac7e5bdc02dea7c8df56ea96e1a --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafProducts.lean @@ -0,0 +1,107 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.LeafPlaques +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.SmoothLeafManifold +import OAI.Geometry.SplitTangent.SmoothLeafProjection +import OAI.Geometry.SplitTangent.EverywhereSmoothLeafQuotient +import OAI.Geometry.SplitTangent.ProductCriteria + +namespace OAI + +/-! Leaf Products. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent + +lemma TangentSplitting.ext_projector {X : ComplexManifold.{u}} {S T : TangentSplitting X} + (h : S.projector=T.projector) : S=T := by + cases S + cases T + cases h + rfl + +lemma TangentSplitting.swap_swap_eq {X : ComplexManifold.{u}} (S : TangentSplitting X) : + S.swap.swap=S := by + apply TangentSplitting.ext_projector + funext x + ext v + change v-(v-S.projector x v)=S.projector x v + abel + +namespace LeafJetAtlas + +lemma leaf_cast {X : ComplexManifold.{u}} {S T : TangentSplitting X} + (h : S=T) (L : LeafJetAtlas S) (x : X.Carrier) : + (h ▸ L).leaf x=L.leaf x := by + cases h + rfl + +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (M : LeafJetAtlas S.swap) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 (p x,q x)) := by + constructor + · intro x y hxy + apply hinj + exact Prod.ext (congrArg (fun z => z.2.val) hxy) (congrArg (fun z => z.1.val) hxy) + · intro yz + obtain ⟨x,hx⟩ := L.surjective_leafPair M e hRC hdim (yz.2.val,yz.1.val) + exact ⟨x,Prod.ext (Subtype.ext (congrArg Prod.snd hx)) + (Subtype.ext (congrArg Prod.fst hx))⟩ + exact S.compatible_product_of_bijective_quotients e Y Z p q hp hq + (SmoothLeafManifold.projection_submersion N x₀ hM) + (SmoothLeafManifold.projection_submersion M x₀ hL) hk₁ hk₂ hb + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafRank.lean b/lean/OAI/Geometry/SplitTangent/LeafRank.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae2a65ad331b31af94b82f21a1bff4b8b838ae61 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafRank.lean @@ -0,0 +1,71 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Leaf Rank. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent +namespace AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + +def firstLinearMap (P : AlignedProductChart S A B) (y : X.Carrier) : S.first y →ₗ[ℂ] A := + (ContinuousLinearMap.fst ℂ A B).toLinearMap.comp + ((mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap.comp (S.first y).subtype) + +lemma firstLinearMap_bijective (P : AlignedProductChart S A B) {y : X.Carrier} + (hy : y∈P.chart.source) : Function.Bijective (P.firstLinearMap y) := by + have hz : ∀ v : S.first y, + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y v.val).2=0 := by + intro v + have hm := Submodule.mem_map_of_mem (f := + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap) v.property + rw [P.first y hy] at hm + exact hm + constructor + · intro v w he + apply Subtype.ext + apply P.mdifferentiable.mfderiv_injective hy + exact Prod.ext he ((hz v).trans (hz w).symm) + · intro a + have ha : (a,0)∈Submodule.map + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap (S.first y) := by + rw [P.first y hy] + rfl + obtain ⟨v,hv,he⟩ := ha + exact ⟨⟨v,hv⟩,congrArg Prod.fst he⟩ + +lemma first_finrank (P : AlignedProductChart S A B) {y : X.Carrier} + (hy : y∈P.chart.source) : Module.finrank ℂ (S.first y)=Module.finrank ℂ A := + (LinearEquiv.ofBijective (P.firstLinearMap y) (P.firstLinearMap_bijective hy)).finrank_eq + +end AlignedProductChart +namespace LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +include L in +lemma first_rank_locally_constant : IsLocallyConstant (fun x => Module.finrank ℂ (S.first x)) := by + apply (IsLocallyConstant.iff_eventually_eq _).mpr + intro x + filter_upwards [(L.chart x).chart.open_source.mem_nhds (L.mem_source x)] with y hy + exact ((L.chart x).first_finrank hy).trans ((L.chart x).first_finrank (L.mem_source x)).symm + +include L in +lemma first_rank_eq [PreconnectedSpace X.Carrier] (x y : X.Carrier) : + Module.finrank ℂ (S.first x)=Module.finrank ℂ (S.first y) := + L.first_rank_locally_constant.apply_eq_of_preconnectedSpace x y + +end LeafJetAtlas +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/LeafTopology.lean b/lean/OAI/Geometry/SplitTangent/LeafTopology.lean new file mode 100644 index 0000000000000000000000000000000000000000..b2424a53c7cafc1220ae9d658521c5596adcbdee --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/LeafTopology.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Geometry.SplitTangent.FoliationLeaves + +namespace OAI + +/-! Leaf Topology. -/ + +noncomputable section +open Set Filter Topology +universe u v w +namespace PlaqueSystem +variable {ι : Type v} {X : Type u} [TopologicalSpace X] + {A B : ι → Type w} [∀i,TopologicalSpace (A i)] [∀i,TopologicalSpace (B i)] + (P : PlaqueSystem X A B) + +lemma related_connected_subset {x y : X} (h : P.Related x y) : + ∃Z, Z⊆P.leaf x ∧ x∈Z ∧ y∈Z ∧ IsPreconnected Z := by + obtain ⟨i,b,U,hU,hT,a,ha,c,hc,hx,hy⟩ := h + let f : A i → X := fun t => (P.chart i).symm (t,b) + have hf : ContinuousOn f U := (P.chart i).symm.continuousOn.comp + ((continuous_id.prodMk continuous_const).continuousOn) (fun t ht => hT t ht) + refine ⟨f '' U,?_,⟨a,ha,hx⟩,⟨c,hc,hy⟩,hU.image f hf⟩ + rintro z ⟨d,hd,rfl⟩ + apply Relation.ReflTransGen.single + exact ⟨i,b,U,hU,hT,a,ha,d,hd,hx,rfl⟩ + +lemma reachable_connected_subset {x y : X} (h : P.Reachable x y) : + ∃Z, Z⊆P.leaf x ∧ x∈Z ∧ y∈Z ∧ IsPreconnected Z := by + induction h with + | refl => exact ⟨{x},by intro z hz; subst z; exact Relation.ReflTransGen.refl,by simp,by simp,isPreconnected_singleton⟩ + | @tail y z hyz h ih => + obtain ⟨U,hU,hx,hy,hUc⟩ := ih + obtain ⟨V,hV,hy',hz,hVc⟩ := P.related_connected_subset h + refine ⟨U∪V,?_,Or.inl hx,Or.inr hz,hUc.union y hy hy' hVc⟩ + intro w hw + rcases hw with hw | hw + · exact hU hw + · exact Relation.ReflTransGen.trans hyz (hV hw) + +lemma leaf_isConnected (x : X) : IsConnected (P.leaf x) := by + refine ⟨⟨x,Relation.ReflTransGen.refl⟩,isPreconnected_of_forall x ?_⟩ + intro y hy + exact P.reachable_connected_subset hy + +lemma leaf_eq_of_mem {x y : X} (h : y∈P.leaf x) : P.leaf y=P.leaf x := by + ext z + exact ⟨fun hz => Relation.ReflTransGen.trans h hz, + fun hz => Relation.ReflTransGen.trans (Reachable.symm P h) hz⟩ + +end PlaqueSystem + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ManifoldJetAnalytic.lean b/lean/OAI/Geometry/SplitTangent/ManifoldJetAnalytic.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a45f0fdf065d9e981e3c10faeec3809b1e04a13 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ManifoldJetAnalytic.lean @@ -0,0 +1,114 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.TwistedCurveTensor +import OAI.Geometry.SplitTangent.ManifoldLeafJets + +namespace OAI + +/-! Manifold Jet Analytic. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent.AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + +lemma derivative_coordinates_analytic (P : AlignedProductChart S A B) + {g : ℂ → X.Carrier} {z₀ : ℂ} + (hg : ContMDiffAt 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g z₀) + (hy : g z₀∈P.chart.source) : + AnalyticAt ℂ (F := Model X →L[ℂ] A × B) (fun z : ℂ => + ((mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (g z) : Model X →L[ℂ] A × B).comp + ((trivializationAt (Model X) (Tangent X) (g z₀)).symmL ℂ (g z)) : Model X →L[ℂ] A × B)) z₀ := by + let c := chartAt (Model X) (g z₀) + let t := trivializationAt (Model X) (Tangent X) (g z₀) + have hc0 : g z₀∈c.source := mem_chart_source _ _ + have hcinv := contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) (g z₀)) + (c.map_source hc0) + have hP : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,A × B) ω P.chart (c.symm (c (g z₀))) := by + simpa only [c.left_inv hc0] using P.holomorphicAt hy + have hpc : AnalyticAt ℂ (P.chart ∘ c.symm) (c (g z₀)) := + (hP.comp _ hcinv).contDiffAt.analyticAt + have hcg : AnalyticAt ℂ (c ∘ g) z₀ := + ((contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) (g z₀)) hc0).comp _ hg).contDiffAt.analyticAt + have h := AnalyticAt.comp (g := fderiv ℂ (P.chart ∘ c.symm)) (f := c ∘ g) hpc.fderiv hcg + apply h.congr + filter_upwards [hg.continuousAt.preimage_mem_nhds (c.open_source.mem_nhds hc0), + hg.continuousAt.preimage_mem_nhds (P.chart.open_source.mem_nhds hy)] with z hcz hpz + have ht : t.symmL ℂ (g z)=mfderiv 𝓘(ℂ,Model X) (ModelWithCorners X) c.symm (c (g z)) := by + simpa [t,c,extChartAt_coe_symm,extChartAt_coe,ModelWithCorners] using + (TangentBundle.symmL_trivializationAt (I := ModelWithCorners X) hcz) + have hci := (contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) (g z₀)) + (c.map_source hcz)).mdifferentiableAt (by simp) + have hpi : MDifferentiableAt (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (c.symm (c (g z))) := by + simpa only [c.left_inv hcz] using (P.holomorphicAt hpz).mdifferentiableAt (by simp) + change fderiv ℂ (P.chart ∘ c.symm) (c (g z))=_ + rw [←mfderiv_eq_fderiv,mfderiv_comp _ hpi hci,c.left_inv hcz,←ht] + rfl + + +lemma jet_analytic (P : AlignedProductChart S A B) + {g : ℂ → X.Carrier} {z₀ : ℂ} {f : X.Carrier → ℂ} + (hg : ContMDiffAt 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g z₀) + (hy : g z₀∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f (g z₀)) (m : ℕ) : + AnalyticAt ℂ (tangentTensorCoordinates g (fun z => P.jet f (g z) m) z₀) z₀ := by + have hv := AnalyticAt.comp (f := P.chart ∘ g) (g := fun y => HorizontalJet.value (f ∘ P.chart.symm) y m) + (HorizontalJet.analytic_value (P.coordinate_function_analytic hy hf) m) + (((P.holomorphicAt hy).comp _ hg).contDiffAt.analyticAt) + have hd := P.derivative_coordinates_analytic hg hy + have hdp : AnalyticAt ℂ (F := Fin m → (Model X →L[ℂ] A × B)) (fun z : ℂ => fun _ : Fin m => + ((mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (g z) : Model X →L[ℂ] A × B).comp + ((trivializationAt (Model X) (Tangent X) (g z₀)).symmL ℂ (g z)) : Model X →L[ℂ] A × B)) z₀ := + analyticAt_pi_iff.mpr fun _ => hd + have hh := ContinuousMultilinearMap.analyticAt_uncurry_compContinuousLinearMap.comp + (hdp.prod hv) + exact hh + + + +lemma jet_parameter_analytic (P : AlignedProductChart S A B) + {g : ℂ → X.Carrier} {z₀ : ℂ} {f : ℂ × X.Carrier → ℂ} + (hg : ContMDiffAt 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g z₀) + (hy : g z₀∈P.chart.source) + (hf : ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,ℂ) ω f (z₀,g z₀)) + (m : ℕ) : + AnalyticAt ℂ (tangentTensorCoordinates g + (fun z => P.jet (fun x => f (z,x)) (g z) m) z₀) z₀ := by + let h : ℂ × (A × B) → ℂ := fun w => f (w.1,P.chart.symm w.2) + have hf' : ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,ℂ) ω + f (z₀,P.chart.symm (P.chart (g z₀))) := by + simpa only [P.chart.left_inv hy] using hf + have hh : AnalyticAt ℂ h (z₀,P.chart (g z₀)) := by + have hi : ContMDiffAt 𝓘(ℂ,ℂ × (A × B)) (ModelWithCorners X) ω + (fun w : ℂ × (A × B) => P.chart.symm w.2) (z₀,P.chart (g z₀)) := + (P.inverse_holomorphicAt (P.chart.map_source hy)).comp (z₀,P.chart (g z₀)) + (show ContMDiffAt 𝓘(ℂ,ℂ × (A × B)) 𝓘(ℂ,A × B) ω Prod.snd _ from + contDiff_snd.contDiffAt.contMDiffAt) + exact (hf'.comp (z₀,P.chart (g z₀)) + ((show ContMDiffAt 𝓘(ℂ,ℂ × (A × B)) 𝓘(ℂ,ℂ) ω Prod.fst _ from + contDiff_fst.contDiffAt.contMDiffAt).prodMk hi)).contDiffAt.analyticAt + have hv := HorizontalJet.analytic_parameter_value (g := P.chart ∘ g) hh + (((P.holomorphicAt hy).comp _ hg).contDiffAt.analyticAt) m + have hd := P.derivative_coordinates_analytic hg hy + have hdp : AnalyticAt ℂ (F := Fin m → (Model X →L[ℂ] A × B)) + (fun z : ℂ => fun _ : Fin m => + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (g z) : Model X →L[ℂ] A × B).comp + ((trivializationAt (Model X) (Tangent X) (g z₀)).symmL ℂ (g z))) z₀ := + analyticAt_pi_iff.mpr fun _ => hd + exact ContinuousMultilinearMap.analyticAt_uncurry_compContinuousLinearMap.comp + (hdp.prod hv) + +end SplitTangent.AlignedProductChart + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ManifoldLeafJets.lean b/lean/OAI/Geometry/SplitTangent/ManifoldLeafJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..47d577ae88786866d04d201cbc62665ef8e51642 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ManifoldLeafJets.lean @@ -0,0 +1,205 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Manifold Leaf Jets. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent.AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B C D : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + [NormedAddCommGroup C] [NormedSpace ℂ C] + [NormedAddCommGroup D] [NormedSpace ℂ D] + + +def jet (P : AlignedProductChart S A B) (f : X.Carrier → ℂ) + (y : X.Carrier) (m : ℕ) : + ContinuousMultilinearMap ℂ (fun _ : Fin m => Tangent X y) ℂ := + (HorizontalJet.value (f ∘ P.chart.symm) (P.chart y) m).compContinuousLinearMap + (fun _ => mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y) + +lemma jet_eq_zero_iff [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) (f : X.Carrier → ℂ) + {y : X.Carrier} (hy : y∈P.chart.source) (m : ℕ) : + P.jet f y m=0 ↔ HorizontalJet.value (f ∘ P.chart.symm) (P.chart y) m=0 := by + constructor + · intro h + ext w + choose v hv using fun i => P.mdifferentiable.mfderiv_surjective hy (w i) + have he := congrArg (fun K => K v) h + change HorizontalJet.value (f ∘ P.chart.symm) (P.chart y) m + (fun i => mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i))=0 at he + have hw : (fun i => mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i))=w := funext hv + rwa [hw] at he + · intro h + ext v + simp only [jet,h] + rfl + +lemma coordinate_function_analytic [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) + {f : X.Carrier → ℂ} {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) : + AnalyticAt ℂ (f ∘ P.chart.symm) (P.chart y) := by + have hf' : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f + (P.chart.symm (P.chart y)) := by simpa only [P.chart.left_inv hy] using hf + exact (hf'.comp _ (P.inverse_holomorphicAt (P.chart.map_source hy))).contDiffAt.analyticAt + +lemma transition_derivative [CompleteSpace A] [CompleteSpace B] + [CompleteSpace C] [CompleteSpace D] (P : AlignedProductChart S A B) + (Q : AlignedProductChart S C D) {y : X.Carrier} + (hy : y∈P.chart.source) (hq : y∈Q.chart.source) : + (fderiv ℂ (Q.chart ∘ P.chart.symm) (P.chart y)).comp + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y) = + mfderiv (ModelWithCorners X) 𝓘(ℂ,C × D) Q.chart y := by + have hq' : P.chart.symm (P.chart y)∈Q.chart.source := by simpa only [P.chart.left_inv hy] using hq + have ht := (Q.holomorphicAt hq').comp _ (P.inverse_holomorphicAt (P.chart.map_source hy)) + have hc := mfderiv_comp y (ht.mdifferentiableAt (by simp)) + ((P.holomorphicAt hy).mdifferentiableAt (by simp)) + rw [mfderiv_eq_fderiv] at hc + have he : ((Q.chart ∘ P.chart.symm) ∘ P.chart) =ᶠ[𝓝 y] Q.chart := by + filter_upwards [P.chart.open_source.mem_nhds hy] with z hz + exact congrArg Q.chart (P.chart.left_inv hz) + exact hc.symm.trans he.mfderiv_eq + + + +theorem jet_independent [CompleteSpace A] [CompleteSpace B] + [CompleteSpace C] [CompleteSpace D] (P : AlignedProductChart S A B) + (Q : AlignedProductChart S C D) {f : X.Carrier → ℂ} {y : X.Carrier} + (hy : y∈P.chart.source) (hq : y∈Q.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (m : ℕ) (hz : ∀n,n < m → Q.jet f y n=0) : + P.jet f y m=Q.jet f y m := by + let T : A × B → C × D := Q.chart ∘ P.chart.symm + have hq' : P.chart.symm (P.chart y)∈Q.chart.source := by simpa only [P.chart.left_inv hy] using hq + have hT : AnalyticAt ℂ T (P.chart y) := + ((Q.holomorphicAt hq').comp _ (P.inverse_holomorphicAt (P.chart.map_source hy))).contDiffAt.analyticAt + have hx : T (P.chart y)=Q.chart y := congrArg Q.chart (P.chart.left_inv hy) + have hfc : AnalyticAt ℂ (f ∘ Q.chart.symm) (T (P.chart y)) := + hx.symm ▸ Q.coordinate_function_analytic hq hf + have hzero (n : ℕ) (hn : n < m) : + HorizontalJet.value (f ∘ Q.chart.symm) (T (P.chart y)) n=0 := + hx.symm ▸ (Q.jet_eq_zero_iff f hq n).mp (hz n hn) + have hcomp := HorizontalJet.value_comp hfc hT + (P.transition_axes Q (P.chart.map_source hy) hq') m hzero + have he : (f ∘ P.chart.symm) =ᶠ[𝓝 (P.chart y)] ((f ∘ Q.chart.symm) ∘ T) := by + filter_upwards [(P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt.preimage_mem_nhds + (Q.chart.open_source.mem_nhds hq')] with z hz + exact congrArg f (Q.chart.left_inv hz).symm + have hval := (HorizontalJet.value_congr he m).trans hcomp + have hd := P.transition_derivative Q hy hq + ext v + change HorizontalJet.value (f ∘ P.chart.symm) (P.chart y) m + (fun i => mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i)) = _ + rw [hval] + change HorizontalJet.value (f ∘ Q.chart.symm) (T (P.chart y)) m + (fun i => ((fderiv ℂ T (P.chart y)).comp + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y)) (v i)) = _ + rw [hx,hd] + rfl + + + +theorem jet_smul [CompleteSpace A] [CompleteSpace B] (P : AlignedProductChart S A B) + {f v : X.Carrier → ℂ} {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hv : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω v y) + (m : ℕ) (hz : ∀n,n < m → P.jet f y n=0) : + P.jet (fun z => v z*f z) y m=v y • P.jet f y m := by + have he := HorizontalJet.value_smul (P.coordinate_function_analytic hy hf) + (P.coordinate_function_analytic hy hv) m + (fun n hn => (P.jet_eq_zero_iff f hy n).mp (hz n hn)) + ext w + change HorizontalJet.value (fun z => (v ∘ P.chart.symm) z • (f ∘ P.chart.symm) z) + (P.chart y) m _ = _ + rw [he] + simp only [smul_apply,Function.comp_apply,P.chart.left_inv hy] + rfl + + + +lemma jet_supported [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) (f : X.Carrier → ℂ) + {y : X.Carrier} (hy : y∈P.chart.source) (m : ℕ) + (v : Fin m → Tangent X y) : + P.jet f y m (fun i => S.projector y (v i))=P.jet f y m v := by + have he (w : Tangent X y) : + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (S.projector y w)).1= + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y w).1 := by + have hk : w-S.projector y w∈S.second y := by + change S.projector y (w-S.projector y w)=0 + rw [map_sub,S.idempotent,sub_self] + have hm := Submodule.mem_map_of_mem (f := + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap) hk + rw [P.second y hy] at hm + change (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (w-S.projector y w)).1=0 at hm + erw [map_sub,Prod.fst_sub,sub_eq_zero] at hm + exact hm.symm + change iteratedFDeriv ℂ m (fun a => (f ∘ P.chart.symm) (a,(P.chart y).2)) (P.chart y).1 + (fun i => (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (S.projector y (v i))).1)=_ + simp only [he] + rfl + +lemma jet_symmetric [CompleteSpace A] [CompleteSpace B] (P : AlignedProductChart S A B) + {f : X.Carrier → ℂ} {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (m : ℕ) (v : Fin m → Tangent X y) (σ : Equiv.Perm (Fin m)) : + P.jet f y m (v ∘ σ)=P.jet f y m v := by + exact (HorizontalJet.slice_analytic (P.coordinate_function_analytic hy hf)).contDiffAt.iteratedFDeriv_comp_perm + (fun i => (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i)).1) σ + +lemma jet_congr [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) {f h : X.Carrier → ℂ} + {y : X.Carrier} (hy : y∈P.chart.source) (he : f=ᶠ[𝓝 y] h) (m : ℕ) : + P.jet f y m=P.jet h y m := by + have hi : Tendsto P.chart.symm (𝓝 (P.chart y)) (𝓝 y) := by + simpa only [P.chart.left_inv hy] using + (P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt.tendsto + have hc' := he.comp_tendsto hi + unfold jet + rw [HorizontalJet.value_congr hc' m] + +lemma jet_add [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) {f h : X.Carrier → ℂ} + {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) + (hh : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω h y) (m : ℕ) : + P.jet (f+h) y m=P.jet f y m+P.jet h y m := by + have hf' := (HorizontalJet.slice_analytic (P.coordinate_function_analytic hy hf)).contDiffAt (n := m) + have hh' := (HorizontalJet.slice_analytic (P.coordinate_function_analytic hy hh)).contDiffAt (n := m) + ext v + exact congrArg (fun K => K (fun i => + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i)).1)) + (iteratedFDeriv_add_apply hf' hh') + +lemma jet_csmul [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) {f : X.Carrier → ℂ} + {y : X.Carrier} (hy : y∈P.chart.source) + (hf : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,ℂ) ω f y) (m : ℕ) (c : ℂ) : + P.jet (c • f) y m=c • P.jet f y m := by + ext v + have hf' := (HorizontalJet.slice_analytic (P.coordinate_function_analytic hy hf)).contDiffAt (n := m) + exact congrArg (fun K => K (fun i => + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y (v i)).1)) + (iteratedFDeriv_const_smul_apply (a := c) hf') + +@[simp] lemma jet_zero [CompleteSpace A] [CompleteSpace B] + (P : AlignedProductChart S A B) (y : X.Carrier) (m : ℕ) : + P.jet 0 y m=0 := by + ext v + simp [jet,HorizontalJet.value] + rfl + +end SplitTangent.AlignedProductChart + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/OpenManifold.lean b/lean/OAI/Geometry/SplitTangent/OpenManifold.lean new file mode 100644 index 0000000000000000000000000000000000000000..952585b9746d14e90ba35403df5e4d775d2f464c --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/OpenManifold.lean @@ -0,0 +1,58 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Open Manifold. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold +universe u +namespace SplitTangent +namespace OpenManifold +variable {d : ℕ} (U : Set (Fin d → ℂ)) (hU : IsOpen U) (hne : U.Nonempty) + +abbrev Carrier := ULift.{u} U +include hne in +theorem nonempty : Nonempty (Carrier.{u} U) := ⟨⟨⟨hne.choose,hne.choose_spec⟩⟩⟩ +def val (x : Carrier.{u} U) : Fin d → ℂ := x.down.val +include hU in +lemma isOpenEmbedding_val : IsOpenEmbedding (val (U := U) : Carrier.{u} U → _) := + hU.isOpenEmbedding_subtypeVal.comp Homeomorph.ulift.isOpenEmbedding + +def manifold : ComplexManifold.{u} where + dim := d + Carrier := Carrier.{u} U + charts := by + letI := nonempty U hne + exact (isOpenEmbedding_val U hU).singletonChartedSpace + secondCountable := Homeomorph.ulift.isInducing.secondCountableTopology + holomorphicAtlas := by + let := nonempty U hne + exact (isOpenEmbedding_val U hU).isManifold_singleton + +lemma val_holomorphic : ContMDiff (ModelWithCorners (manifold.{u} U hU hne)) + 𝓘(ℂ, Fin d → ℂ) ω (fun x : (manifold.{u} U hU hne).Carrier => val U x) := by + let := nonempty U hne + exact contMDiff_isOpenEmbedding (isOpenEmbedding_val U hU) + +lemma val_mem (x : (manifold.{u} U hU hne).Carrier) : val (U := U) x∈U := x.down.property + +lemma range_val : Set.range (val (U := U) : (manifold.{u} U hU hne).Carrier → _)=U := by + ext x + exact ⟨fun ⟨y,hy⟩ => hy ▸ y.down.property, fun hx => ⟨⟨⟨x,hx⟩⟩,rfl⟩⟩ + +lemma val_mfderiv_bijective (x : (manifold.{u} U hU hne).Carrier) : + Function.Bijective (mfderiv (ModelWithCorners (manifold.{u} U hU hne)) + 𝓘(ℂ, Fin d → ℂ) (fun y : (manifold.{u} U hU hne).Carrier => val U y) x) := by + have H := (mdifferentiable_chart (I := ModelWithCorners (manifold.{u} U hU hne)) x).mfderiv_bijective + (mem_chart_source (Model (manifold.{u} U hU hne)) x) + exact H + +end OpenManifold +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/OpenPositiveLeaves.lean b/lean/OAI/Geometry/SplitTangent/OpenPositiveLeaves.lean new file mode 100644 index 0000000000000000000000000000000000000000..df274ad2f31103859a7dc0e1502e832065d9ec0d --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/OpenPositiveLeaves.lean @@ -0,0 +1,87 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.CompactPositiveLeaf +import OAI.Geometry.SplitTangent.ProjectivePositiveLeaf + +namespace OAI + +/-! Open Positive Leaves. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent + +namespace RationalFamily +variable {X T : ComplexManifold.{u}} (G : RationalFamily X T) + +def evaluation (a : ℂ) (τ : T.Carrier) : X.Carrier := G.finite (a,τ) + +lemma evaluation_holomorphic (a : ℂ) : + ContMDiff (ModelWithCorners T) (ModelWithCorners X) ω (G.evaluation a) := + G.finite_holomorphic.comp (contMDiff_const.prodMk contMDiff_id) + +lemma evaluation_surjective_derivative {τ : T.Carrier} + (hs : Function.Surjective (mfderiv (ModelWithCorners T) + ((ModelWithCorners X).prod (ModelWithCorners X)) (G.twoPointEvaluation 0 1) τ)) : + Function.Surjective (mfderiv (ModelWithCorners T) (ModelWithCorners X) (G.evaluation 1) τ) := by + intro w + obtain ⟨v,hv⟩ := hs (0,w) + refine ⟨v,?_⟩ + rw [G.twoPointEvaluation_derivative] at hv + exact congrArg Prod.snd hv + +lemma evaluation_open + (hs : ∀τ,Function.Surjective (mfderiv (ModelWithCorners T) + ((ModelWithCorners X).prod (ModelWithCorners X)) (G.twoPointEvaluation 0 1) τ)) : + IsOpenMap (G.evaluation 1) := + HolomorphicLocalDiffeomorph.isOpenMap_of_surjective_mfderiv (G.evaluation_holomorphic 1) + (fun τ => G.evaluation_surjective_derivative (hs τ)) + +end RationalFamily +namespace TangentSplitting +variable {X : ComplexManifold.{u}} [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (S : TangentSplitting X) (e : ProjectiveEmbedding X) + + + +omit [ConnectedSpace X.Carrier] in +theorem exists_open_positive_leaves (hRC : RationallyConnected e) (hdim : 0 P.Reachable x y.val + have hf : IsLocallyConstant f := by + apply (IsLocallyConstant.iff_eventually_eq f).mpr + intro y + have ht : Tendsto (Subtype.val : Z → X) (𝓝 y) (𝓝[Z] y.val) := + tendsto_inf.mpr ⟨continuous_subtype_val.tendsto y, + tendsto_principal.mpr (Filter.Eventually.of_forall (fun z : Z => z.property))⟩ + have hh := ht.eventually + ((hlocal y.val y.property).eventually_reachable P) + filter_upwards [hh] with z hz + apply propext + exact ⟨fun hxz => Reachable.trans P hxz (Reachable.symm P hz),fun hxy => Reachable.trans P hxy hz⟩ + intro y hy + have hh := hf.apply_eq_of_preconnectedSpace (⟨y,hy⟩ : Z) ⟨x,hx⟩ + exact hh.mpr (Reachable.refl P x) + +end PlaqueSystem + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PlaqueTangentImage.lean b/lean/OAI/Geometry/SplitTangent/PlaqueTangentImage.lean new file mode 100644 index 0000000000000000000000000000000000000000..26ca31c2df6fe264eff1403b1fdb6cacd3f0fef4 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PlaqueTangentImage.lean @@ -0,0 +1,54 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Plaque Tangent Image. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u v +namespace SplitTangent.AlignedProductChart +variable {X : ComplexManifold.{u}} {Y : ComplexManifold.{v}} {S : TangentSplitting X} + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + +lemma mfderiv_into_first (P : AlignedProductChart S A B) {f : Y.Carrier → X.Carrier} + {y : Y.Carrier} (hf : ContMDiffAt (ModelWithCorners Y) (ModelWithCorners X) ω f y) + (hy : f y∈P.chart.source) + (hplaque : ∀ᶠ z in 𝓝 y,(P.chart (f z)).2=(P.chart (f y)).2) + (v : Tangent Y y) : + mfderiv (ModelWithCorners Y) (ModelWithCorners X) f y v∈S.first (f y) := by + have hp := P.holomorphicAt hy + have hcomp := hp.comp y hf + have hzero : mfderiv (ModelWithCorners Y) 𝓘(ℂ,B) (fun z => (P.chart (f z)).2) y=0 := by + have he : (fun z => (P.chart (f z)).2) =ᶠ[𝓝 y] (fun _ => (P.chart (f y)).2) := hplaque + rw [he.mfderiv_eq,mfderiv_const] + simp + have hds := mfderiv_comp y ((ContinuousLinearMap.snd ℂ A B).differentiableAt.mdifferentiableAt) + (hcomp.mdifferentiableAt (by simp)) + have hdc := mfderiv_comp y (hp.mdifferentiableAt (by simp)) (hf.mdifferentiableAt (by simp)) + have hs : (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (f y) + (mfderiv (ModelWithCorners Y) (ModelWithCorners X) f y v)).2=0 := by + have he := DFunLike.congr_fun hzero v + change mfderiv (ModelWithCorners Y) 𝓘(ℂ,B) ((ContinuousLinearMap.snd ℂ A B) ∘ P.chart ∘ f) y v=0 at he + rw [hds,hdc,mfderiv_eq_fderiv] at he + simp only [ContinuousLinearMap.fderiv] at he + exact he + have hm : mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (f y) + (mfderiv (ModelWithCorners Y) (ModelWithCorners X) f y v) ∈ + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (f y)).toLinearMap + (S.first (f y)) := by + rw [P.first _ hy] + exact hs + obtain ⟨w,hw,he⟩ := hm + have he' := P.mdifferentiable.mfderiv_injective hy he + exact he' ▸ hw + +end SplitTangent.AlignedProductChart + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PolynomialLeafGerms.lean b/lean/OAI/Geometry/SplitTangent/PolynomialLeafGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..56d95b32d839ad7f708a3ebca9f49038f46fca9c --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PolynomialLeafGerms.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.Geometry.SplitTangent.AmbientLeafGerm +import OAI.Geometry.SplitTangent.CurveHomogeneousSections +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.ProjectiveLineFrame +import OAI.Geometry.SplitTangent.RationalCurveFrames + +namespace OAI + +/-! Polynomial Leaf Germs. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + +def baseMultiplier (q : ℂ × X.Carrier) : ℂ := + ∑i,(F.a i).eval 1*F.finite q.1 q.2 i + +lemma baseMultiplier_holomorphic : + ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,ℂ) ω + F.baseMultiplier (1,g.finite 1) := by + apply contMDiffAt_finsetSum + intro i hi + exact (contMDiffAt_const (I' := 𝓘(ℂ,ℂ))).mul + (contMDiffAt_pi_space.mp (F.finite_joint_holomorphicAt 1) i) + +lemma baseMultiplier_one : F.baseMultiplier (1,g.finite 1)=1 := by + simp only [baseMultiplier,F.finite_on_curve] + exact F.finite_unit 1 + +lemma base_frame_eventually : ∀ᶠ q : ℂ × X.Carrier in 𝓝 (1,g.finite 1), + F.finite q.1 q.2=F.baseMultiplier q • F.finite 1 q.2 ∧ F.baseMultiplier q≠0 := by + have hn : F.baseMultiplier (1,g.finite 1)≠0 := by rw [F.baseMultiplier_one]; exact one_ne_zero + filter_upwards [F.baseMultiplier_holomorphic.continuousAt.eventually_ne hn] with q hq + have he : F.baseMultiplier q= + (∑i,(F.a i).eval q.1*(e.map q.2).rep i)⁻¹ * + (∑i,(F.a i).eval 1*(e.map q.2).rep i) := by + simp only [baseMultiplier,finite,ProjectiveEmbedding.linearFrame,Pi.smul_apply,smul_eq_mul] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + ring + have hb : (∑i,(F.a i).eval 1*(e.map q.2).rep i)≠0 := by + rw [he] at hq + exact (mul_ne_zero_iff.mp hq).2 + exact ⟨e.linearFrame_change _ _ q.2 hb,hq⟩ + +variable (L : LeafJetAtlas S) + {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + + + +theorem flat_section_coefficients (P : AlignedProductChart S A B) + (hy : g.finite 1∈P.chart.source) (ht : g.TangentTo S.first) + {a k : ℕ} (p : HomogeneousTuple (e := e) a k) + (hf : F.sections a k p∈SeparatedQuotientFiltration.zeroPart ((F.ambientTransition a k).contact L)) : + ∀i,(fun t : A => MvPolynomial.eval (F.finite 1 (P.chart.symm (t,(P.chart (g.finite 1)).2))) (p i).val) + =ᶠ[𝓝 (P.chart (g.finite 1)).1] 0 := by + let b := (P.chart (g.finite 1)).2 + let t₀ := (P.chart (g.finite 1)).1 + have hh := (F.ambientTransition a k).flat_joint_germ L (F.sections a k p) hf ht P hy + have hm : Tendsto (fun q : ℂ × A => (q.1,P.chart.symm (q.2,b))) + (𝓝 (1,t₀)) (𝓝 (1,g.finite 1)) := by + have hInv : ContinuousAt P.chart.symm (t₀,b) := + (P.inverse_holomorphicAt (P.chart.map_source hy)).continuousAt + have hP : ContinuousAt (fun q : ℂ × A => P.chart.symm (q.2,b)) (1,t₀) := + hInv.comp (f := fun q : ℂ × A => (q.2,b)) (x := (1,t₀)) + (continuousAt_snd.prodMk continuousAt_const) + simpa only [ContinuousAt,t₀,b,Prod.mk.eta,P.chart.left_inv hy] using continuousAt_fst.prodMk hP + apply PolynomialCoefficientGerms.coefficient_germs _ (1 : ℂ) + filter_upwards [hh,hm.eventually F.base_frame_eventually] with q hq hframe + change (∑i : Fin (a+1),q.1^i.val*MvPolynomial.eval (F.finite q.1 (P.chart.symm (q.2,b))) (p i).val)=0 at hq + have he : (∑i : Fin (a+1),q.1^i.val*MvPolynomial.eval (F.finite q.1 (P.chart.symm (q.2,b))) (p i).val)= + (F.baseMultiplier (q.1,P.chart.symm (q.2,b)))^k* + (∑i : Fin (a+1),q.1^i.val*MvPolynomial.eval (F.finite 1 (P.chart.symm (q.2,b))) (p i).val) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + rw [hframe.1,_root_.OAI.MvPolynomial.IsHomogeneous.eval_scale (p i).property] + ring + rw [he] at hq + exact (mul_eq_zero.mp hq).resolve_left (pow_ne_zero _ hframe.2) + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PolynomialRelationLocus.lean b/lean/OAI/Geometry/SplitTangent/PolynomialRelationLocus.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff13bef2c1b03fe42963af56b52d506bc85d0275 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PolynomialRelationLocus.lean @@ -0,0 +1,122 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.HolomorphicCommonZeros +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.ProjectiveHypersurfaces + +namespace OAI + +/-! Polynomial Relation Locus. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + (L : LeafJetAtlas S) (e : ProjectiveEmbedding X) {n k : ℕ} + (Q : Fin n → MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k) + +def relationPolynomial (c : Fin n → ℂ) : MvPolynomial.homogeneousSubmodule (Fin (e.N+1)) ℂ k := + ∑j,c j • Q j + +def relationLocus : Set X.Carrier := {x | ∃c : Fin n → ℂ,c≠0 ∧ + closure (L.leaf x) ⊆ e.homogeneousZeroLocus (relationPolynomial e Q c).val} + +lemma relation_eval (c : Fin n → ℂ) (w : Fin (e.N+1) → ℂ) : + MvPolynomial.eval w (relationPolynomial e Q c).val=∑j,MvPolynomial.eval w (Q j).val*c j := by + simp only [relationPolynomial,Submodule.coe_sum,Submodule.coe_smul,map_sum,MvPolynomial.smul_eval] + apply Finset.sum_congr rfl + intro j hj + simp only [mul_comm] + +lemma relation_rectangle_iff {x z : X.Carrier} (i : Fin (e.N+1)) + {U : Set (S.FirstModel x)} {V : Set (S.SecondModel x)} + (hU : IsOpen U) (hUc : IsPreconnected U) + (hrect : U ×ˢ V ⊆ (L.chart x).chart.target) + (hpatch : ∀t∈U ×ˢ V,(e.map ((L.chart x).chart.symm t)).rep i≠0) + (hz : z∈(L.chart x).chart.source) (hzUV : (L.chart x).chart z∈U ×ˢ V) : + z∈L.relationLocus e Q ↔ ∃c : Fin n → ℂ,c≠0 ∧ ∀a : U, + ∑j,MvPolynomial.eval (projectiveCoordinates i (e.map ((L.chart x).chart.symm + (a.val,((L.chart x).chart z).2)))) (Q j).val*c j=0 := by + let P := L.chart x + constructor + · rintro ⟨c,hc,hzero⟩ + refine ⟨c,hc,fun a => ?_⟩ + have hrel := L.plaques.related_in_rectangle hUc hrect hzUV.1 a.property hzUV.2 + change L.plaques.Related (P.chart.symm (P.chart z)) + (P.chart.symm (a.val,(P.chart z).2)) at hrel + rw [P.chart.left_inv hz] at hrel + have hleaf : P.chart.symm (a.val,(P.chart z).2)∈L.leaf z := + Relation.ReflTransGen.single hrel + have hh := (e.homogeneous_coordinates_zero_iff (relationPolynomial e Q c).property i + (hpatch (a.val,(P.chart z).2) ⟨a.property,hzUV.2⟩)).mp (hzero (subset_closure hleaf)) + rwa [relation_eval] at hh + · rintro ⟨c,hc,hzero⟩ + refine ⟨c,hc,?_⟩ + apply L.closure_leaf_subset + (e.homogeneousZeroLocus_locally_holomorphic (relationPolynomial e Q c).property) + (e.homogeneousZeroLocus_isClosed (relationPolynomial e Q c).property) + apply (L.germIn_iff P hz).mpr + change ∀ᶠa in 𝓝 (P.chart z).1, + P.chart.symm (a,(P.chart z).2)∈e.homogeneousZeroLocus (relationPolynomial e Q c).val + filter_upwards [hU.mem_nhds hzUV.1] with a ha + apply (e.homogeneous_coordinates_zero_iff (relationPolynomial e Q c).property i + (hpatch (a,(P.chart z).2) ⟨ha,hzUV.2⟩)).mpr + rw [relation_eval] + exact hzero ⟨a,ha⟩ + + + +theorem relationLocus_locally_holomorphic : + LocallyHolomorphicCommonZeros X (L.relationLocus e Q) := by + classical + intro x + let P := L.chart x + have hxs : x∈P.chart.source := L.mem_source x + have hxt : P.chart x∈P.chart.target := P.chart.map_source hxs + obtain ⟨i,hi⟩ := Function.ne_iff.mp (e.map x).rep_nonzero + change (e.map x).rep i≠0 at hi + let patch := {y : X.Carrier | (e.map y).rep i≠0} + have hpatch : P.chart.symm ⁻¹' patch∈𝓝 (P.chart x) := by + apply (P.chart.symm.continuousAt hxt).preimage_mem_nhds + simpa only [P.chart.left_inv hxs] using (e.open_patch i).mem_nhds hi + obtain ⟨U,V,hU,hUc,hV,hxUV,hrect⟩ := UniformPlaqueSlices.connected_rectangle + (Filter.inter_mem (P.chart.open_target.mem_nhds hxt) hpatch) + have hrectT : U ×ˢ V⊆P.chart.target := fun t ht => (hrect ht).1 + have hrectP : ∀t∈U ×ˢ V,(e.map (P.chart.symm t)).rep i≠0 := fun t ht => (hrect ht).2 + let W := P.chart.source ∩ P.chart ⁻¹' (U ×ˢ V) + have hW : IsOpen W := P.chart.continuousOn.isOpen_inter_preimage P.chart.open_source (hU.prod hV) + let row : U → X.Carrier → Fin n → ℂ := fun a y j => + MvPolynomial.eval (projectiveCoordinates i (e.map (P.chart.symm (a.val,(P.chart y).2)))) (Q j).val + let f : (Fin n → U) → X.Carrier → ℂ := fun s y => Matrix.det (fun a b => row (s a) y b) + refine ⟨W,hW,⟨hxs,hxUV⟩,Set.range f,?_,?_⟩ + · rintro _ ⟨s,rfl⟩ y hy + apply ContMDiffAt.contMDiffWithinAt + apply HolomorphicDeterminant.contMDiffAt_det + intro a b + have hC : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,S.FirstModel x × S.SecondModel x) ω + (fun z => ((s a).val,(P.chart z).2)) y := by + apply (contMDiffAt_prod_module_iff _).mpr + exact ⟨contMDiffAt_const,(contMDiffAt_prod_module_iff _).mp (P.holomorphicAt hy.1) |>.2⟩ + have hI := (P.inverse_holomorphicAt (hrectT (show ((s a).val,(P.chart y).2)∈U ×ˢ V from ⟨(s a).property,hy.2.2⟩))).comp y hC + have he := ((e.holomorphic i).contMDiffAt ((e.open_patch i).mem_nhds + (hrectP ((s a).val,(P.chart y).2) ⟨(s a).property,hy.2.2⟩))).comp y hI + exact _root_.OAI.MvPolynomial.contMDiffAt_eval_comp (ModelWithCorners X) (Q b).val + (fun j => contMDiffAt_pi_space.mp he j) + · intro y hy + have hiff := L.relation_rectangle_iff e Q i hU hUc hrectT hrectP hy.1 hy.2 + rw [hiff,FiniteSampling.relation_iff_det_zero] + constructor + · intro hd f' hf' + obtain ⟨s,rfl⟩ := hf' + exact hd s + · intro hd s + exact hd (f s) ⟨s,rfl⟩ + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PolynomialSpecialization.lean b/lean/OAI/Geometry/SplitTangent/PolynomialSpecialization.lean new file mode 100644 index 0000000000000000000000000000000000000000..7516476ff617144f56308b2873ce964ea6411dc1 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PolynomialSpecialization.lean @@ -0,0 +1,100 @@ +import Mathlib + +namespace OAI + +/-! Polynomial Specialization. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold BigOperators +namespace PolynomialSpecialization +open MvPolynomial + +lemma eval_analyticAt {σ : Type*} [Fintype σ] (p : MvPolynomial σ ℂ) (x : σ → ℂ) : + AnalyticAt ℂ (fun y => eval y p) x := by + induction p using MvPolynomial.induction_on with + | C c => simpa only [eval_C] using (analyticAt_const (v := c) (x := x)) + | add p q hp hq => + have he : (fun y => eval y (p+q))=((fun y => eval y p)+(fun y => eval y q)) := by + funext y + exact eval_add + rw [he] + exact hp.add hq + | mul_X p i hp => + have he : (fun y => eval y (p*X i))=((fun y => eval y p)*(fun y => y i)) := by + funext y + simp only [eval_mul,eval_X,Pi.mul_apply] + rw [he] + exact hp.mul ((ContinuousLinearMap.proj i : (σ → ℂ) →L[ℂ] ℂ).analyticAt x) + +lemma eq_zero_of_zero_on_open {σ : Type*} [Fintype σ] + (p : MvPolynomial σ ℂ) {U : Set (σ → ℂ)} (hU : IsOpen U) (hne : U.Nonempty) + (hp : ∀a∈U,eval a p=0) : p=0 := by + obtain ⟨a,ha⟩ := hne + have hz : (fun y => eval y p) =ᶠ[𝓝 a] 0 := by + filter_upwards [hU.mem_nhds ha] with y hy + exact hp y hy + have he := (show AnalyticOnNhd ℂ (fun y => eval y p) univ from + fun y _ => eval_analyticAt p y).eqOn_zero_of_preconnected_of_eventuallyEq_zero + isPreconnected_univ (mem_univ a) hz + apply MvPolynomial.funext + intro y + simpa using he (mem_univ y) + +lemma exists_simultaneously_nonzero {σ ι : Type*} [Fintype σ] [Fintype ι] + (p : ι → MvPolynomial σ ℂ) (hp : ∀i,p i≠0) + {U : Set (σ → ℂ)} (hU : IsOpen U) (hne : U.Nonempty) : + ∃a∈U,∀i,eval a (p i)≠0 := by + classical + by_contra! h + have he : (∏i,p i)=0 := eq_zero_of_zero_on_open _ hU hne (by + intro a ha + obtain ⟨i,hi⟩ := h a ha + rw [map_prod] + exact Finset.prod_eq_zero (Finset.mem_univ i) hi) + exact (Finset.prod_ne_zero_iff.mpr (fun i _ => hp i)) he + + + +theorem generic_specialization {σ ι : Type*} [Fintype σ] [Fintype ι] + (p : ι → MvPolynomial (Option σ) ℂ) (hp : ∀i,p i≠0) + {U : Set (σ → ℂ)} (hU : IsOpen U) (hne : U.Nonempty) : + ∃a∈U,∀i,Polynomial.map (eval a) (optionEquivLeft ℂ σ (p i))≠0 := by + classical + have hc : ∀i,∃n,(optionEquivLeft ℂ σ (p i)).coeff n≠0 := by + intro i + by_contra! h + apply hp i + apply (optionEquivLeft ℂ σ).injective + rw [map_zero] + exact Polynomial.ext (by simpa using h) + choose n hn using hc + obtain ⟨a,ha,h⟩ := exists_simultaneously_nonzero + (fun i => (optionEquivLeft ℂ σ (p i)).coeff (n i)) hn hU hne + refine ⟨a,ha,fun i he => h i ?_⟩ + have hec := congrArg (fun q : Polynomial ℂ => q.coeff (n i)) he + simpa only [Polynomial.coeff_map,Polynomial.coeff_zero] using hec + + + +theorem finite_fiber {ι B : Type*} [Fintype ι] + (T : Set B) (f : B → ι → ℂ) (hf : Set.InjOn f T) + (p : ι → Polynomial ℂ) (hp : ∀i,p i≠0) + (hroot : ∀b∈T,∀i,(p i).IsRoot (f b i)) : T.Finite := by + let R (i : ι) := {c : ℂ // (p i).IsRoot c} + let : ∀i,Finite (R i) := fun i => (Polynomial.finite_setOfPred_isRoot (hp i)).to_subtype + let g : T → ∀i,R i := fun b i => ⟨f b.val i,hroot b.val b.property i⟩ + have hg : Function.Injective g := by + intro a b he + apply Subtype.ext + apply hf a.property b.property + funext i + exact congrArg Subtype.val (congrFun he i) + let : Finite T := Finite.of_injective g hg + exact Set.toFinite T + +end PolynomialSpecialization + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PositiveCoverLift.lean b/lean/OAI/Geometry/SplitTangent/PositiveCoverLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ea7beabad5672bb97962c450c9789b3e51f5099 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PositiveCoverLift.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Geometry.SplitTangent.HolomorphicTangentMapAt +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCoverLift + +namespace OAI + +/-! Positive Cover Lift. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent +variable {X Y : ComplexManifold.{u}} {p : Y.Carrier → X.Carrier} + + +def coverTangentLift + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (y : Y.Carrier) : Tangent X (p y) →L[ℂ] Tangent Y y := + ((hp y).mfderivToContinuousLinearEquiv (by simp)).symm.toContinuousLinearMap + +lemma coverTangentLift_leftInverse + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (y : Y.Carrier) (v : Tangent Y y) : + coverTangentLift hp y (mfderiv (ModelWithCorners Y) (ModelWithCorners X) p y v)=v := + ((hp y).mfderivToContinuousLinearEquiv (by simp)).symm_apply_apply v + +lemma coverTangentLift_eq_localInverse + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (y z : Y.Carrier) (hz : z∈(hp y).localInverse.target) (v : Tangent X (p z)) : + coverTangentLift hp z v= + mfderiv (ModelWithCorners X) (ModelWithCorners Y) (hp y).localInverse (p z) v := by + let h := hp y + have hps : p z∈h.localInverse.source := by + rw [h.choose_spec.2 hz] + exact h.choose.map_source hz + have hdi := (h.localInverse_contMDiffOn.contMDiffAt + (h.localInverse.open_source.mem_nhds hps)).mdifferentiableAt (by simp) + have he : h.localInverse ∘ p =ᶠ[𝓝 z] id := + Filter.eventuallyEq_of_mem (h.localInverse.open_target.mem_nhds hz) + h.localInverse_eqOn_left + have hd := mfderiv_comp z hdi ((hp z).mdifferentiableAt (by simp)) + rw [he.mfderiv_eq,mfderiv_id] at hd + let C := (hp z).mfderivToContinuousLinearEquiv (by simp) + have hh := DFunLike.congr_fun hd (C.symm v) + change C.symm v=mfderiv (ModelWithCorners X) (ModelWithCorners Y) + h.localInverse (p z) (C (C.symm v)) at hh + change C.symm v=mfderiv (ModelWithCorners X) (ModelWithCorners Y) + h.localInverse (p z) v + simpa only [C.apply_symm_apply] using hh + +lemma coverTangentLift_holomorphic + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + {g : ℂ → Y.Carrier} {σ : ∀t,Tangent X (p (g t))} + (hg : Continuous g) + (hσ : ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun t => (⟨p (g t),σ t⟩ : TangentBundle (ModelWithCorners X) X.Carrier))) : + ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners Y).prod 𝓘(ℂ,Model Y)) ω + (fun t => (⟨g t,coverTangentLift hp (g t) (σ t)⟩ : + TangentBundle (ModelWithCorners Y) Y.Carrier)) := by + intro t + have hh := (holomorphicAt_tangentMap + (hp (g t)).localInverse_contMDiffAt (σ t)).comp t (hσ t) + apply hh.congr_of_eventuallyEq + filter_upwards [hg.continuousAt.preimage_mem_nhds + ((hp (g t)).localInverse.open_target.mem_nhds + (hp (g t)).localInverse_mem_target)] with w hw + exact Bundle.TotalSpace.ext ((hp (g t)).localInverse_left_inv hw).symm + (heq_of_eq (coverTangentLift_eq_localInverse hp (g t) (g w) hw (σ w))) + +namespace RationalCurve +variable {g : RationalCurve X} {k : RationalCurve Y} + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (hf : ∀z,p (k.finite z)=g.finite z) (hi : ∀z,p (k.infinity z)=g.infinity z) + +def coverSection (σ : CurveTangentSection g) : CurveTangentSection k where + finite z := coverTangentLift hp (k.finite z) (σ.finite z) + infinity z := coverTangentLift hp (k.infinity z) (σ.infinity z) + finite_holomorphic := coverTangentLift_holomorphic hp k.finite_holomorphic.continuous + (by + have he : (fun t => (⟨p (k.finite t),σ.finite t⟩ : + TangentBundle (ModelWithCorners X) X.Carrier))= + (fun t => (⟨g.finite t,σ.finite t⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) := by + funext t + exact Bundle.TotalSpace.ext (hf t) (heq_of_eq rfl) + rw [he] + exact σ.finite_holomorphic) + infinity_holomorphic := coverTangentLift_holomorphic hp k.infinity_holomorphic.continuous + (by + have he : (fun t => (⟨p (k.infinity t),σ.infinity t⟩ : + TangentBundle (ModelWithCorners X) X.Carrier))= + (fun t => (⟨g.infinity t,σ.infinity t⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) := by + funext t + exact Bundle.TotalSpace.ext (hi t) (heq_of_eq rfl) + rw [he] + exact σ.infinity_holomorphic) + overlap z hz := by rw [k.overlap z hz,σ.overlap z hz] + +include hp hf hi in + +theorem pointedGenerated_cover_lift (hg : PointedGenerated g (fun _ => ⊤)) : + PointedGenerated k (fun _ => ⊤) := by + intro v hv + let D := mfderiv (ModelWithCorners Y) (ModelWithCorners X) p (k.finite 1) + obtain ⟨σ,_,_,h0,h1⟩ := hg (D v) Submodule.mem_top + refine ⟨coverSection hp hf hi σ,fun _ => Submodule.mem_top, + fun _ => Submodule.mem_top,?_,?_⟩ + · change coverTangentLift hp (k.finite 0) (σ.finite 0)=0 + erw [h0,map_zero] + · change coverTangentLift hp (k.finite 1) (σ.finite 1)=v + rw [h1] + exact coverTangentLift_leftInverse hp (k.finite 1) v + + + +theorem exists_positive_cover_lift + (g : RationalCurve X) (hg : PointedGenerated g (fun _ => ⊤)) + (hcover : IsCoveringMap p) + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (y : Y.Carrier) (hy : p y=g.finite 0) : + ∃k : RationalCurve Y,k.finite 0=y ∧ PointedGenerated k (fun _ => ⊤) ∧ + (∀z,p (k.finite z)=g.finite z) ∧ (∀z,p (k.infinity z)=g.infinity z) := by + obtain ⟨k,hk,hf,hi⟩ := g.exists_cover_lift hcover hp y hy + exact ⟨k,hk,pointedGenerated_cover_lift hp hf hi hg,hf,hi⟩ + + + +theorem exists_positive_cover_lift_at + (g : RationalCurve X) (hg : PointedGenerated g (fun _ => ⊤)) + (hcover : IsCoveringMap p) + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (a : ℂ) (y : Y.Carrier) (hy : p y=g.finite a) : + ∃k : RationalCurve Y,k.finite a=y ∧ PointedGenerated k (fun _ => ⊤) ∧ + (∀z,p (k.finite z)=g.finite z) ∧ (∀z,p (k.infinity z)=g.infinity z) := by + obtain ⟨k,hk,hf,hi⟩ := g.exists_cover_lift_at hcover hp a y hy + exact ⟨k,hk,pointedGenerated_cover_lift hp hf hi hg,hf,hi⟩ + +end RationalCurve +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PositiveJetFiltration.lean b/lean/OAI/Geometry/SplitTangent/PositiveJetFiltration.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa3fdbc2e3c1214fd929e7edd1edaef2b9c47974 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PositiveJetFiltration.lean @@ -0,0 +1,103 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.SymmetricConormalBound +import OAI.Geometry.SplitTangent.TensorSectionSpace + +namespace OAI + +/-! Positive Jet Filtration. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent.PositiveJetFiltration +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {S : TangentSplitting X} + {V : Type*} [AddCommGroup V] [Module ℂ V] {d : ℕ} + (F : ℕ → Submodule ℂ V) (hF : Antitone F) + (L : ∀m,F m →ₗ[ℂ] symmetricSupportedTensors g S (d : ℤ) m) + (hker : ∀m s,L m s=0 ↔ s.val∈F (m+1)) + +include hF hker L + + + +def kernelEquiv (m : ℕ) : LinearMap.ker (L m) ≃ₗ[ℂ] F (m+1) where + toFun s := ⟨s.val.val,(hker m s.val).mp s.property⟩ + invFun s := ⟨⟨s.val,hF (Nat.le_succ m) s.property⟩, + (hker m _).mpr s.property⟩ + left_inv _ := rfl + right_inv _ := rfl + map_add' _ _ := rfl + map_smul' _ _ := rfl + +theorem high_eq_zero (hg : PointedGenerated g S.first) + (hsep : ∀v,(∀m,v∈F m) → v=0) {k : ℕ} (hk : d < k) (s : F k) : s=0 := by + have hs (n : ℕ) : s.val∈F n := by + induction n with + | zero => exact hF (Nat.zero_le k) s.property + | succ n ih => + by_cases hn : n+1≤k + · exact hF hn s.property + · exact (hker n ⟨s.val,ih⟩).mp + (symmetricSupportedTensors.eq_zero_of_degree_lt_order hg (by omega) _) + exact Subtype.ext (hsep s.val hs) + + + +theorem finite_and_bound (hg : PointedGenerated g S.first) + (hsep : ∀v,(∀m,v∈F m) → v=0) (N k : ℕ) (hk : d < k+N) : + Module.Finite ℂ (F k) ∧ Module.finrank ℂ (F k) ≤ + ∑j∈Finset.range N, + (Module.finrank ℂ (S.first (g.finite 1))+(k+j)-1).choose (k+j)*(d+1) := by + induction N generalizing k with + | zero => + have : Subsingleton (F k) := ⟨fun s t => + (high_eq_zero F hF L hker hg hsep (by simpa using hk) s).trans + (high_eq_zero F hF L hker hg hsep (by simpa using hk) t).symm⟩ + exact ⟨inferInstance,by simp [Module.finrank_zero_of_subsingleton]⟩ + | succ N ih => + obtain ⟨hf,hb⟩ := ih (k+1) (by omega) + let : Module.Finite ℂ (F (k+1)) := hf + let : AddCommGroup (symmetricSupportedTensors g S (d : ℤ) k) := + Module.addCommMonoidToAddCommGroup ℂ + obtain ⟨ht,htb⟩ := symmetricSupportedTensors.finite_and_finrank_le hg d k + let : Module.Finite ℂ (symmetricSupportedTensors g S (d : ℤ) k) := ht + let : Module.Finite ℂ (LinearMap.ker (L k)) := + Module.Finite.equiv (kernelEquiv F hF L hker k).symm + let : Module.Finite ℂ (F k) := DiagonalRationality.finite_of_kernel (L k) + refine ⟨inferInstance,?_⟩ + have hrank := LinearMap.finrank_range_add_finrank_ker (K := ℂ) (L k) + have hrange := (LinearMap.range (L k)).finrank_le + have hkernel := (kernelEquiv F hF L hker k).finrank_eq + rw [Finset.sum_range_succ'] + have hshift : (∑j∈Finset.range N, + (Module.finrank ℂ (S.first (g.finite 1))+(k+(j+1))-1).choose (k+(j+1))*(d+1)) = + ∑j∈Finset.range N, + (Module.finrank ℂ (S.first (g.finite 1))+(k+1+j)-1).choose (k+1+j)*(d+1) := by + apply Finset.sum_congr rfl + intro j hj + simp only [Nat.add_assoc, Nat.add_comm, Nat.add_left_comm] + rw [hshift] + simp only [Nat.add_zero] + omega + + + +theorem polynomial_bound (hg : PointedGenerated g S.first) + (hsep : ∀v,(∀m,v∈F m) → v=0) : + Module.Finite ℂ (F 0) ∧ Module.finrank ℂ (F 0) ≤ + (d+Module.finrank ℂ (S.first (g.finite 1))).choose + (Module.finrank ℂ (S.first (g.finite 1)))*(d+1) := by + obtain ⟨hf,hb⟩ := finite_and_bound F hF L hker hg hsep (d+1) 0 (by omega) + refine ⟨hf,?_⟩ + simpa only [Nat.zero_add,←Nat.multichoose_eq,←Finset.sum_mul,Nat.sum_range_multichoose] + using hb + +end SplitTangent.PositiveJetFiltration + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/PositiveTangentCurves.lean b/lean/OAI/Geometry/SplitTangent/PositiveTangentCurves.lean new file mode 100644 index 0000000000000000000000000000000000000000..006bfd660daa437efe2efca6296f288045b2b085 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/PositiveTangentCurves.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxTransportBase +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.BoxFirstTransport +import OAI.Geometry.SplitTangent.TangentRationalChains +import OAI.Geometry.SplitTangent.RationalVariation + +namespace OAI + +/-! Positive Tangent Curves. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped ContDiff Manifold +universe u +namespace SplitTangent + + + +def PointedGenerated {X : ComplexManifold.{u}} (g : RationalCurve X) + (D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)) : Prop := + ∀ v : Tangent X (g.finite 1), v∈D (g.finite 1) → + ∃σ : CurveTangentSection g, + (∀z, σ.finite z∈D (g.finite z)) ∧ + (∀z, σ.infinity z∈D (g.infinity z)) ∧ + σ.finite 0=0 ∧ σ.finite 1=v + +namespace TangentBox +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : RationalCurve X} + (B : TangentBox S g) + +lemma firstFactor_tangentTo (b : ℂ) : (B.firstFactor b).TangentTo S.first := by + exact B.horizontal_tangent false b + + + +theorem firstFactor_pointedGenerated + (hg : PointedGenerated g S.first) : PointedGenerated (B.firstFactor 1) S.first := by + intro v hv + have hv' : v∈S.first (g.finite 1) := by + change v∈S.first (B.chart false false (1,1)) at hv + erw [B.finite_diagonal 1] at hv + exact hv + obtain ⟨σ,σf,σi,σ0,σ1⟩ := hg v hv' + let τ := ((B.firstMap 1).mapSection σ).project S + refine ⟨τ,fun z => CurveTangentSection.project_mem_first_finite S _ z, + fun z => CurveTangentSection.project_mem_first_infinity S _ z,?_,?_⟩ + · change S.projector _ ((B.firstMap 1).finite 0 (σ.finite 0))=0 + rw [σ0,map_zero,map_zero] + · change S.projector _ ((B.firstMap 1).finite 1 (σ.finite 1))=v + rw [σ1,B.firstMap_normalized] + have hfix := (S.mem_first_iff (g.finite 1) v).mp hv' + erw [B.firstFactor_diagonal,hfix,hfix] + +end TangentBox + +namespace RationalFamily +variable {X T : ComplexManifold.{u}} (G : RationalFamily X T) + +theorem pointedGenerated_of_submersive (S : TangentSplitting X) (τ : T.Carrier) + (hτ : Function.Surjective (mfderiv (ModelWithCorners T) + ((ModelWithCorners X).prod (ModelWithCorners X)) (G.twoPointEvaluation 0 1) τ)) : + PointedGenerated (G.curve τ) S.first := + fun v hv => G.exists_first_section_zero_value S hτ v hv + +end RationalFamily + +namespace TangentSplitting + + + +theorem exists_positive_tangent_curve {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] (S : TangentSplitting X) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 L v) hd + have hdw := congrArg (fun L : Model Y →L[ℂ] Model Y => L w) hd + exact hdv.trans (h.trans hdw.symm) + + + +theorem isProjective_factors {X Y Z : ComplexManifold.{u}} + [Nonempty X.Carrier] [CompactSpace X.Carrier] + (e : ProjectiveEmbedding X) + (f : Diffeomorph (ModelWithCorners X) + ((ModelWithCorners Y).prod (ModelWithCorners Z)) X.Carrier + (Y.Carrier × Z.Carrier) ω) : IsProjective Y ∧ IsProjective Z := by + let yz := f (Classical.arbitrary X.Carrier) + let p : X.Carrier → Y.Carrier := fun x => (f x).1 + let q : X.Carrier → Z.Carrier := fun x => (f x).2 + let i : Y.Carrier → X.Carrier := fun y => f.symm (y, yz.2) + let j : Z.Carrier → X.Carrier := fun z => f.symm (yz.1, z) + have hp : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω p := + contMDiff_fst.comp f.contMDiff + have hq : ContMDiff (ModelWithCorners X) (ModelWithCorners Z) ω q := + contMDiff_snd.comp f.contMDiff + have hi : ContMDiff (ModelWithCorners Y) (ModelWithCorners X) ω i := + f.symm.contMDiff.comp (contMDiff_id.prodMk contMDiff_const) + have hj : ContMDiff (ModelWithCorners Z) (ModelWithCorners X) ω j := + f.symm.contMDiff.comp (contMDiff_const.prodMk contMDiff_id) + have hpi : Function.LeftInverse p i := by intro y; simp [p, i] + have hqj : Function.LeftInverse q j := by intro z; simp [q, j] + have hpc : CompactSpace Y.Carrier := + hpi.surjective.compactSpace hp.continuous + have hqc : CompactSpace Z.Carrier := + hqj.surjective.compactSpace hq.continuous + exact ⟨⟨hpc, ⟨e.pullback i hi hpi.injective + (injective_mfderiv_of_leftInverse hi hp hpi)⟩⟩, + ⟨hqc, ⟨e.pullback j hj hqj.injective + (injective_mfderiv_of_leftInverse hj hq hqj)⟩⟩⟩ + +namespace TangentSplitting +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +theorem compatible_product_of_bijective_quotients [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (e : ProjectiveEmbedding X) (Y Z : ComplexManifold.{u}) + (q₁ : X.Carrier → Y.Carrier) (q₂ : X.Carrier → Z.Carrier) + (hq₁ : ContMDiff (ModelWithCorners X) (ModelWithCorners Y) ω q₁) + (hq₂ : ContMDiff (ModelWithCorners X) (ModelWithCorners Z) ω q₂) + (hs₁ : ∀x, Function.Surjective (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x)) + (hs₂ : ∀x, Function.Surjective (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x)) + (hk₁ : ∀x, LinearMap.ker (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x).toLinearMap= + S.second x) + (hk₂ : ∀x, LinearMap.ker (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x).toLinearMap= + S.first x) + (hpair : Function.Bijective (fun x => (q₁ x,q₂ x))) : HasCompatibleProjectiveProduct X S := by + let : ChartedSpace (Model Y × Model Z) (Y.Carrier × Z.Carrier) := + prodChartedSpace (Model Y) Y.Carrier (Model Z) Z.Carrier + let : IsManifold 𝓘(ℂ,Model Y × Model Z) ω (Y.Carrier × Z.Carrier) := by + rw [modelWithCornersSelf_prod] + exact IsManifold.prod Y.Carrier Z.Carrier + let q : X.Carrier → Y.Carrier × Z.Carrier := fun x => (q₁ x,q₂ x) + let I := (ModelWithCorners Y).prod (ModelWithCorners Z) + have hq : ContMDiff (ModelWithCorners X) I ω q := hq₁.prodMk hq₂ + have hd (x : X.Carrier) : mfderiv (ModelWithCorners X) I q x= + (mfderiv (ModelWithCorners X) (ModelWithCorners Y) q₁ x).prod + (mfderiv (ModelWithCorners X) (ModelWithCorners Z) q₂ x) := + mfderiv_prodMk ((hq₁ x).mdifferentiableAt (by simp)) ((hq₂ x).mdifferentiableAt (by simp)) + have hb (x : X.Carrier) : Function.Bijective (mfderiv (ModelWithCorners X) I q x) := by + rw [hd] + exact HolomorphicFrobenius.complementary_quotients_bijective + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₁ x) (hs₂ x) (hk₁ x) (hk₂ x) + let : LocallyPathConnectedSpace Y.Carrier := ChartedSpace.locallyPathConnectedSpace (Model Y) Y.Carrier + let : LocallyPathConnectedSpace Z.Carrier := ChartedSpace.locallyPathConnectedSpace (Model Z) Z.Carrier + have hl : IsLocalDiffeomorph (ModelWithCorners X) I ω q := by + intro x + have hI : I=𝓘(ℂ,Model Y × Model Z) := modelWithCornersSelf_prod.symm + rw [hI] at hq hb ⊢ + exact HolomorphicLocalDiffeomorph.manifold_ift (hq x) (hb x) + let f : Diffeomorph (ModelWithCorners X) I X.Carrier (Y.Carrier × Z.Carrier) ω := + hl.diffeomorphOfBijective hpair + have hf : (f : X.Carrier → Y.Carrier × Z.Carrier)=q := rfl + obtain ⟨hY,hZ⟩ := isProjective_factors e f + refine ⟨Y,Z,hY,hZ,f,?_⟩ + intro x + change Submodule.map (mfderiv (ModelWithCorners X) I q x).toLinearMap (S.first x)=_ ∧ + Submodule.map (mfderiv (ModelWithCorners X) I q x).toLinearMap (S.second x)=_ + rw [hd] + exact ⟨HolomorphicFrobenius.image_range_projector_of_quotients + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₁ x) (hk₁ x) (hk₂ x), + HolomorphicFrobenius.image_kernel_projector_of_quotients + (E := Model X) (F := Model Y) (G := Model Z) (S.projector x) + (S.idempotent x) _ _ (hs₂ x) (hk₁ x) (hk₂ x)⟩ + +end TangentSplitting +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ProjectiveHypersurfaces.lean b/lean/OAI/Geometry/SplitTangent/ProjectiveHypersurfaces.lean new file mode 100644 index 0000000000000000000000000000000000000000..d96aa8dcefebb3628c6260db4d83e6de006a987c --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ProjectiveHypersurfaces.lean @@ -0,0 +1,96 @@ +import Mathlib +import OAI.Geometry.SplitTangent.HolomorphicHypersurfaces +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.ProjectiveLineFrame +import OAI.Geometry.SplitTangent.RationalCurveFrames + +namespace OAI + +/-! Projective Hypersurfaces. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent + +lemma LocallyHolomorphicZeroSet.isClosed {X : ComplexManifold.{u}} {Z : Set X.Carrier} + (h : LocallyHolomorphicZeroSet X Z) : IsClosed Z := by + rw [← isOpen_compl_iff] + apply isOpen_iff_mem_nhds.mpr + intro x hx + obtain ⟨U,hU,hxU,f,hf,he⟩ := h x + have hfc := (hf.contMDiffAt (hU.mem_nhds hxU)).continuousAt + have hn : f x≠0 := fun hz => hx ((he x hxU).mpr hz) + have hne := hfc.eventually_ne hn + filter_upwards [hU.mem_nhds hxU,hne] with y hy hyn + exact fun hz => hyn ((he y hy).mp hz) + +namespace ProjectiveEmbedding +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) + +def homogeneousZeroLocus (p : MvPolynomial (Fin (e.N+1)) ℂ) : Set X.Carrier := + {x | MvPolynomial.eval (e.map x).rep p=0} + +lemma homogeneous_coordinates_eval {p : MvPolynomial (Fin (e.N+1)) ℂ} {k : ℕ} + (hp : p.IsHomogeneous k) (i : Fin (e.N+1)) (x : X.Carrier) : + MvPolynomial.eval (projectiveCoordinates i (e.map x)) p= + ((e.map x).rep i)⁻¹^k*MvPolynomial.eval (e.map x).rep p := by + exact _root_.OAI.MvPolynomial.IsHomogeneous.eval_scale hp ((e.map x).rep i)⁻¹ (e.map x).rep + +lemma homogeneous_coordinates_zero_iff {p : MvPolynomial (Fin (e.N+1)) ℂ} {k : ℕ} + (hp : p.IsHomogeneous k) (i : Fin (e.N+1)) {x : X.Carrier} (hi : (e.map x).rep i≠0) : + x∈e.homogeneousZeroLocus p ↔ MvPolynomial.eval (projectiveCoordinates i (e.map x)) p=0 := by + rw [e.homogeneous_coordinates_eval hp] + exact (mul_eq_zero_iff_left (pow_ne_zero _ (inv_ne_zero hi))).symm + +lemma homogeneousZeroLocus_locally_holomorphic + {p : MvPolynomial (Fin (e.N+1)) ℂ} {k : ℕ} (hp : p.IsHomogeneous k) : + LocallyHolomorphicZeroSet X (e.homogeneousZeroLocus p) := by + intro x + obtain ⟨i,hi⟩ := Function.ne_iff.mp (e.map x).rep_nonzero + change (e.map x).rep i≠0 at hi + refine ⟨{y | (e.map y).rep i≠0},e.open_patch i,hi, + fun y => MvPolynomial.eval (projectiveCoordinates i (e.map y)) p,?_,?_⟩ + · intro y hy + apply ContMDiffAt.contMDiffWithinAt + apply _root_.OAI.MvPolynomial.contMDiffAt_eval_comp (ModelWithCorners X) p + intro j + exact contMDiffAt_pi_space.mp + ((e.holomorphic i).contMDiffAt ((e.open_patch i).mem_nhds hy)) j + · intro y hy + exact e.homogeneous_coordinates_zero_iff hp i hy + +lemma homogeneousZeroLocus_isClosed + {p : MvPolynomial (Fin (e.N+1)) ℂ} {k : ℕ} (hp : p.IsHomogeneous k) : + IsClosed (e.homogeneousZeroLocus p) := + (e.homogeneousZeroLocus_locally_holomorphic hp).isClosed + +lemma linearFrame_zero_iff + {p : MvPolynomial (Fin (e.N+1)) ℂ} {k : ℕ} (hp : p.IsHomogeneous k) + (a : Fin (e.N+1) → ℂ) {x : X.Carrier} (ha : (∑i,a i*(e.map x).rep i)≠0) : + MvPolynomial.eval (e.linearFrame a x) p=0 ↔ x∈e.homogeneousZeroLocus p := by + rw [linearFrame,_root_.OAI.MvPolynomial.IsHomogeneous.eval_scale hp] + exact mul_eq_zero_iff_left (pow_ne_zero _ (inv_ne_zero ha)) + +lemma linearFrame_denominator_eventually + (a : Fin (e.N+1) → ℂ) {x : X.Carrier} (ha : (∑i,a i*(e.map x).rep i)≠0) : + ∀ᶠ y in 𝓝 x,(∑i,a i*(e.map y).rep i)≠0 := by + have hframe : e.linearFrame a x≠0 := + smul_ne_zero (inv_ne_zero ha) (e.map x).rep_nonzero + obtain ⟨j,hj⟩ := Function.ne_iff.mp hframe + have hc := (e.linearFrame_holomorphicAt (ModelWithCorners X) + (f := id) (a := fun _ => a) contMDiffAt_id contMDiffAt_const ha).continuousAt + have hn := ((continuous_apply j).continuousAt.comp hc).eventually_ne hj + filter_upwards [hn] with y hy + intro hh + apply hy + change e.linearFrame a y j=0 + simp only [linearFrame,hh,inv_zero,zero_smul,Pi.zero_apply] + +end ProjectiveEmbedding +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ProjectiveLineFrame.lean b/lean/OAI/Geometry/SplitTangent/ProjectiveLineFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e2c39485533722bb62f3dcbb9b894e3e7fe79c0 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ProjectiveLineFrame.lean @@ -0,0 +1,132 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.FormalBoxes + +namespace OAI + +/-! Projective Line Frame. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent.ProjectiveEmbedding +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) + + +def linearFrame (a : Fin (e.N+1) → ℂ) (x : X.Carrier) : Fin (e.N+1) → ℂ := + (∑i,a i*(e.map x).rep i)⁻¹ • (e.map x).rep + +lemma linearFrame_eq_coordinates {a : Fin (e.N+1) → ℂ} {x : X.Carrier} + {k : Fin (e.N+1)} (hk : (e.map x).rep k ≠ 0) : + e.linearFrame a x = (∑i,a i*projectiveCoordinates k (e.map x) i)⁻¹ • + projectiveCoordinates k (e.map x) := by + have he : (∑i,a i*projectiveCoordinates k (e.map x) i)= + ((e.map x).rep k)⁻¹ * ∑i,a i*(e.map x).rep i := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + simp only [projectiveCoordinates] + ring + ext i + simp only [linearFrame,Pi.smul_apply,smul_eq_mul] + rw [he] + simp only [projectiveCoordinates,mul_inv_rev,inv_inv] + symm + calc + _ = (∑ j, a j*(e.map x).rep j)⁻¹ * + (((e.map x).rep k * ((e.map x).rep k)⁻¹) * (e.map x).rep i) := by ring + _ = _ := by rw [mul_inv_cancel₀ hk,one_mul] + +lemma linearFrame_denominator_ne {a v : Fin (e.N+1) → ℂ} {x : X.Carrier} + (hv : e.Incidence x v) (ha : ∑i,a i*v i=1) : + (∑i,a i*(e.map x).rep i) ≠ 0 := by + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map x).rep_nonzero + change (e.map x).rep k ≠ 0 at hk + have hvk : v k ≠ 0 := by + intro hz + have hvz : v=0 := by + ext i + rw [(e.incidence_iff_coordinates hk).mp hv i,hz,zero_mul] + rfl + simp [hvz] at ha + have hcross : (∑i,a i*(e.map x).rep i)*v k=(e.map x).rep k := by + calc + _ = ∑i,a i*((e.map x).rep i*v k) := by rw [Finset.sum_mul]; congr 1; funext i; ring + _ = ∑i,a i*((e.map x).rep k*v i) := by + apply Finset.sum_congr rfl + intro i hi + rw [← hv k i] + _ = (e.map x).rep k*(∑i,a i*v i) := by rw [Finset.mul_sum]; congr 1; funext i; ring + _ = _ := by rw [ha,mul_one] + intro h + exact hk (by simpa only [h,zero_mul] using hcross.symm) + +lemma linearFrame_eq_of_incidence {a v : Fin (e.N+1) → ℂ} {x : X.Carrier} + (hv : e.Incidence x v) (ha : ∑i,a i*v i=1) : e.linearFrame a x=v := by + have hden := e.linearFrame_denominator_ne hv ha + ext j + change (∑i,a i*(e.map x).rep i)⁻¹ * (e.map x).rep j=v j + apply (inv_mul_eq_iff_eq_mul₀ hden).mpr + calc + _ = ∑i,a i*((e.map x).rep j*v i) := by + rw [show (∑i,a i*((e.map x).rep j*v i))= + (e.map x).rep j*(∑i,a i*v i) by rw [Finset.mul_sum]; congr 1; funext i; ring,ha,mul_one] + _ = ∑i,a i*((e.map x).rep i*v j) := by + apply Finset.sum_congr rfl + intro i hi + rw [hv j i] + _ = _ := by rw [Finset.sum_mul]; congr 1; funext i; ring + + +lemma linearFrame_change (a b : Fin (e.N+1) → ℂ) (x : X.Carrier) + (hb : (∑i,b i*(e.map x).rep i)≠0) : + e.linearFrame a x = (∑i,b i*e.linearFrame a x i) • e.linearFrame b x := by + have he : (∑i,b i*e.linearFrame a x i)= + (∑i,a i*(e.map x).rep i)⁻¹ * (∑i,b i*(e.map x).rep i) := by + simp only [linearFrame,Pi.smul_apply,smul_eq_mul,Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + ring + rw [he] + ext i + simp only [linearFrame,Pi.smul_apply,smul_eq_mul] + field_simp + +lemma linearFrame_holomorphicAt + {E H M : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [TopologicalSpace H] (I : _root_.ModelWithCorners ℂ E H) + [TopologicalSpace M] [ChartedSpace H M] + {f : M → X.Carrier} {a : M → Fin (e.N+1) → ℂ} {y : M} + (hf : ContMDiffAt I (ModelWithCorners X) ω f y) + (ha : ContMDiffAt I 𝓘(ℂ,Fin (e.N+1) → ℂ) ω a y) + (hn : (∑i,a y i*(e.map (f y)).rep i)≠0) : + ContMDiffAt I 𝓘(ℂ,Fin (e.N+1) → ℂ) ω + (fun z => e.linearFrame (a z) (f z)) y := by + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map (f y)).rep_nonzero + change (e.map (f y)).rep k ≠ 0 at hk + have hc := ((e.holomorphic k).contMDiffAt ((e.open_patch k).mem_nhds hk)).comp y hf + have hd : ContMDiffAt I 𝓘(ℂ,ℂ) ω + (fun z => ∑i,a z i*projectiveCoordinates k (e.map (f z)) i) y := by + apply contMDiffAt_finsetSum + intro i hi + exact (contMDiffAt_pi_space.mp ha i).mul (contMDiffAt_pi_space.mp hc i) + have hd0 : (∑i,a y i*projectiveCoordinates k (e.map (f y)) i)≠0 := by + have he : (∑i,a y i*projectiveCoordinates k (e.map (f y)) i)= + ((e.map (f y)).rep k)⁻¹ * (∑i,a y i*(e.map (f y)).rep i) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + simp only [projectiveCoordinates] + ring + rw [he] + exact mul_ne_zero (inv_ne_zero hk) hn + apply ((hd.inv₀ hd0).smul hc).congr_of_eventuallyEq + filter_upwards [hf.continuousAt.preimage_mem_nhds ((e.open_patch k).mem_nhds hk)] with z hz + exact e.linearFrame_eq_coordinates hz + +end SplitTangent.ProjectiveEmbedding + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ProjectiveLinearCoordinates.lean b/lean/OAI/Geometry/SplitTangent/ProjectiveLinearCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..adbaea945f3f2268a885aa1dd607a1d8c84219fc --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ProjectiveLinearCoordinates.lean @@ -0,0 +1,105 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Projective Linear Coordinates. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace ProjectiveLinearCoordinates +open _root_.MvPolynomial _root_.OAI.MvPolynomial +variable {σ : Type*} [Fintype σ] + + +def form (l : (σ → ℂ) →ₗ[ℂ] ℂ) : homogeneousSubmodule σ ℂ 1 := by + classical + exact ∑i,l (Pi.single i 1) • ⟨X i,isHomogeneous_X ℂ i⟩ + +lemma eval_form (l : (σ → ℂ) →ₗ[ℂ] ℂ) (x : σ → ℂ) : eval x (form l).val=l x := by + classical + have he : (∑i,x i • Pi.single i (1 : ℂ))=x := by + ext j + simp [Pi.single_apply] + calc + _ = ∑i,x i*l (Pi.single i 1) := by + simp only [form,Submodule.coe_sum,Submodule.coe_smul,map_sum,MvPolynomial.smul_eval,eval_X] + apply Finset.sum_congr rfl + intro i hi + exact mul_comm _ _ + _ = l (∑i,x i • Pi.single i 1) := by simp only [map_sum,map_smul,smul_eq_mul] + _ = l x := congrArg l he + +lemma eval_form_ratio (l : (σ → ℂ) →ₗ[ℂ] ℂ) (x : σ → ℂ) (i : σ) : + eval x (form l).val / x i=l ((x i)⁻¹ • x) := by + rw [eval_form,map_smul] + simp only [smul_eq_mul,div_eq_mul_inv,mul_comm] + +end ProjectiveLinearCoordinates +namespace SplitTangent.ProjectiveEmbedding +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) + {S : TangentSplitting X} {A B : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [FiniteDimensional ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [FiniteDimensional ℂ B] + +omit [FiniteDimensional ℂ A] [FiniteDimensional ℂ B] in +lemma plaque_coordinates_analytic (P : AlignedProductChart S A B) + {z : A × B} (hz : z∈P.chart.target) (i : Fin (e.N+1)) + (hi : (e.map (P.chart.symm z)).rep i≠0) : + AnalyticAt ℂ (fun t => projectiveCoordinates i (e.map (P.chart.symm t))) z := + (((e.holomorphic i).contMDiffAt ((e.open_patch i).mem_nhds hi)).comp z + (P.inverse_holomorphicAt hz)).contDiffAt.analyticAt + +omit [FiniteDimensional ℂ A] [FiniteDimensional ℂ B] in +lemma plaque_coordinates_first_injective (P : AlignedProductChart S A B) + {z : A × B} (hz : z∈P.chart.target) (i : Fin (e.N+1)) + (hi : (e.map (P.chart.symm z)).rep i≠0) : + Function.Injective ((fderiv ℂ (fun t => projectiveCoordinates i (e.map (P.chart.symm t))) z).comp + (ContinuousLinearMap.inl ℂ A B)) := by + have hd := mfderiv_comp z + (((e.holomorphic i).contMDiffAt ((e.open_patch i).mem_nhds hi)).mdifferentiableAt (by simp)) + ((P.inverse_holomorphicAt hz).mdifferentiableAt (by simp)) + rw [mfderiv_eq_fderiv] at hd + change Function.Injective ((fderiv ℂ ((fun x => projectiveCoordinates i (e.map x)) ∘ P.chart.symm) z).comp + (ContinuousLinearMap.inl ℂ A B)) + rw [hd] + exact (e.immersion _ i hi).comp ((P.mdifferentiable.symm.mfderiv_injective hz).comp + (fun _ _ h => congrArg Prod.fst h)) + +lemma coordinates_injOn (i : Fin (e.N+1)) : + Set.InjOn (fun x => projectiveCoordinates i (e.map x)) {x | (e.map x).rep i≠0} := by + intro x hx y hy h + apply e.injective + rw [←Projectivization.mk_rep (e.map x),←Projectivization.mk_rep (e.map y), + Projectivization.mk_eq_mk_iff'] + refine ⟨(e.map x).rep i*((e.map y).rep i)⁻¹,?_⟩ + ext j + have hh := congrFun h j + change ((e.map x).rep i)⁻¹*(e.map x).rep j= + ((e.map y).rep i)⁻¹*(e.map y).rep j at hh + change ((e.map x).rep i*((e.map y).rep i)⁻¹)*(e.map y).rep j=(e.map x).rep j + calc + _ = (e.map x).rep i*(((e.map y).rep i)⁻¹*(e.map y).rep j) := by ring + _ = (e.map x).rep i*(((e.map x).rep i)⁻¹*(e.map x).rep j) := by rw [hh] + _ = _ := by rw [←mul_assoc,mul_inv_cancel₀ hx,one_mul] + + + +theorem exists_linear_plaque_coordinates (P : AlignedProductChart S A B) + {z : A × B} (hz : z∈P.chart.target) (i : Fin (e.N+1)) + (hi : (e.map (P.chart.symm z)).rep i≠0) : + ∃(p : (Fin (e.N+1) → ℂ) →L[ℂ] A) + (Q : OpenPartialHomeomorph (A × B) (A × B)), z∈Q.source ∧ + (∀t,Q t=(p (projectiveCoordinates i (e.map (P.chart.symm t))),t.2)) ∧ + AnalyticAt ℂ Q z ∧ AnalyticAt ℂ Q.symm (Q z) := + RectangularInverse.exists_chart (e.plaque_coordinates_analytic P hz i hi) + (e.plaque_coordinates_first_injective P hz i hi) + +end SplitTangent.ProjectiveEmbedding + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ProjectivePositiveLeaf.lean b/lean/OAI/Geometry/SplitTangent/ProjectivePositiveLeaf.lean new file mode 100644 index 0000000000000000000000000000000000000000..02c30062823d252f0823ded95f9348099db8cfa9 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ProjectivePositiveLeaf.lean @@ -0,0 +1,124 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.RationalCurveFrames +import OAI.Geometry.SplitTangent.EmbeddedLeafCharts +import OAI.Geometry.SplitTangent.CompactPositiveLeaf +import OAI.Geometry.SplitTangent.PlaqueTangentImage +import OAI.Geometry.SplitTangent.TangentCurveLeaf + +namespace OAI + +/-! Projective Positive Leaf. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + (L : LeafJetAtlas S) (x₀ : X.Carrier) [PreconnectedSpace X.Carrier] + (h : ∀y∈L.leaf x₀,L.plaques.LocallySinglePlaque (L.leaf x₀) y) + +lemma embedded_inclusion_tangent : let A := L.embeddedAtlas x₀ h; + letI := A.chartedSpace; + ∀y : L.leaf x₀,LinearMap.range + (mfderiv 𝓘(ℂ,Fin (Module.finrank ℂ (S.first x₀)) → ℂ) (ModelWithCorners X) + (Subtype.val : L.leaf x₀ → X.Carrier) y).toLinearMap=S.first y.val := by + dsimp only + let A := L.embeddedAtlas x₀ h + let := A.chartedSpace + intro y + let Y := A.manifold + let i : Y.Carrier → X.Carrier := Subtype.val + have hi : ContMDiff (ModelWithCorners Y) (ModelWithCorners X) ω i := A.inclusion_holomorphic + let D : Model Y →L[ℂ] Tangent X y.val := mfderiv (ModelWithCorners Y) (ModelWithCorners X) i y + have hsub : LinearMap.range D.toLinearMap ≤ S.first y.val := by + obtain ⟨j,U,V,hU,_,hV,hrect,hys,hyUV,huniq⟩ := h y.val y.property + let P := L.chart j + have hc : ContinuousAt (fun z : Y.Carrier => P.chart z.val) y := + (P.chart.continuousAt hys).comp continuousAt_subtype_val + have hs : ∀ᶠ z : Y.Carrier in 𝓝 y,z.val∈P.chart.source := + continuousAt_subtype_val.preimage_mem_nhds (P.chart.open_source.mem_nhds hys) + have hUV : ∀ᶠ z : Y.Carrier in 𝓝 y,P.chart z.val∈U ×ˢ V := + hc.preimage_mem_nhds ((hU.prod hV).mem_nhds hyUV) + have hplaque : ∀ᶠ z : Y.Carrier in 𝓝 y,(P.chart (i z)).2=(P.chart (i y)).2 := by + filter_upwards [hs,hUV] with z hzs hzUV + exact huniq z.val z.property hzs hzUV + rintro v ⟨w,rfl⟩ + exact P.mfderiv_into_first (hi y) hys hplaque w + let : FiniteDimensional ℂ (Tangent X y.val) := by + change FiniteDimensional ℂ (Model X) + infer_instance + apply Submodule.eq_of_le_of_finrank_eq hsub + change Module.finrank ℂ (LinearMap.range + (mfderiv 𝓘(ℂ,Fin (Module.finrank ℂ (S.first x₀)) → ℂ) (ModelWithCorners X) + (Subtype.val : L.leaf x₀ → X.Carrier) y).toLinearMap)=Module.finrank ℂ (S.first y.val) + rw [LinearMap.finrank_range_of_inj (A.inclusion_mfderiv_injective y)] + change Module.finrank ℂ (Fin (Module.finrank ℂ (S.first x₀)) → ℂ)=Module.finrank ℂ (S.first y.val) + rw [Module.finrank_fintype_fun_eq_card,Fintype.card_fin] + exact L.first_rank_eq x₀ y.val + +include h in + + +theorem exists_projective_leaf (e : ProjectiveEmbedding X) (hc : IsCompact (L.leaf x₀)) : + ∃Y : ComplexManifold.{u}, IsProjective Y ∧ ConnectedSpace Y.Carrier ∧ + Y.dim=Module.finrank ℂ (S.first x₀) ∧ + ∃i : Y.Carrier → X.Carrier, + ContMDiff (ModelWithCorners Y) (ModelWithCorners X) ω i ∧ + Function.Injective i ∧ Set.range i=L.leaf x₀ ∧ + ∀y,LinearMap.range (mfderiv (ModelWithCorners Y) (ModelWithCorners X) i y).toLinearMap= + S.first (i y) := by + let A := L.embeddedAtlas x₀ h + let := A.chartedSpace + refine ⟨A.manifold,⟨isCompact_iff_compactSpace.mp hc,⟨A.projectiveEmbedding e⟩⟩, + isConnected_iff_connectedSpace.mp (L.plaques.leaf_isConnected x₀),rfl, + Subtype.val,A.inclusion_holomorphic,Subtype.val_injective,?_,?_⟩ + · exact Subtype.range_coe + · exact L.embedded_inclusion_tangent x₀ h + +end SplitTangent.LeafJetAtlas +namespace SplitTangent.RationalCurveFrames +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {e : ProjectiveEmbedding X} {g : RationalCurve X} (F : RationalCurveFrames e g) + (L : LeafJetAtlas S) [PreconnectedSpace X.Carrier] [CompactSpace X.Carrier] + +include F in +omit [CompactSpace X.Carrier] in +lemma leaf_locallySinglePlaque (ht : g.TangentTo S.first) (hg : PointedGenerated g S.first) : + ∀y∈L.leaf (g.finite 1),L.plaques.LocallySinglePlaque (L.leaf (g.finite 1)) y := by + intro y hy + have hh := F.closure_locallySinglePlaque L ht hg (subset_closure hy) + rwa [(F.leaf_isClosed L ht hg).closure_eq] at hh + +include F in +theorem exists_projective_leaf (ht : g.TangentTo S.first) (hg : PointedGenerated g S.first) : + ∃Y : ComplexManifold.{u}, IsProjective Y ∧ ConnectedSpace Y.Carrier ∧ + Y.dim=Module.finrank ℂ (S.first (g.finite 1)) ∧ + ∃i : Y.Carrier → X.Carrier, + ContMDiff (ModelWithCorners Y) (ModelWithCorners X) ω i ∧ + Function.Injective i ∧ Set.range i=L.leaf (g.finite 1) ∧ + (∀y,LinearMap.range (mfderiv (ModelWithCorners Y) (ModelWithCorners X) i y).toLinearMap= + S.first (i y)) ∧ + ∃k : RationalCurve Y,(∀z,i (k.finite z)=g.finite z) ∧ (∀z,i (k.infinity z)=g.infinity z) := by + let h := F.leaf_locallySinglePlaque L ht hg + let A := L.embeddedAtlas (g.finite 1) h + let := A.chartedSpace + let k : RationalCurve A.manifold := { + finite := fun z => ⟨g.finite z,L.tangent_rational_curve_finite ht z⟩ + infinity := fun z => ⟨g.infinity z,L.tangent_rational_curve_infinity ht z⟩ + finite_holomorphic := A.holomorphic_lift g.finite_holomorphic (L.tangent_rational_curve_finite ht) + infinity_holomorphic := A.holomorphic_lift g.infinity_holomorphic (L.tangent_rational_curve_infinity ht) + overlap := fun z hz => Subtype.ext (g.overlap z hz) } + refine ⟨A.manifold,⟨isCompact_iff_compactSpace.mp (F.leaf_isCompact L ht hg), + ⟨A.projectiveEmbedding e⟩⟩,isConnected_iff_connectedSpace.mp (L.plaques.leaf_isConnected _),rfl, + Subtype.val,A.inclusion_holomorphic,Subtype.val_injective,Subtype.range_coe, + L.embedded_inclusion_tangent _ h,k,fun _ => rfl,fun _ => rfl⟩ + +end SplitTangent.RationalCurveFrames + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ProjectiveTangentBox.lean b/lean/OAI/Geometry/SplitTangent/ProjectiveTangentBox.lean new file mode 100644 index 0000000000000000000000000000000000000000..1153c3fc96266384a1bd4dde0fcd95297032b026 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ProjectiveTangentBox.lean @@ -0,0 +1,84 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.FormalBoxes + +namespace OAI + +/-! Projective Tangent Box. -/ + +noncomputable section +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + +universe u +namespace SplitTangent + +attribute [instance] ComplexManifold.topology ComplexManifold.charts + ComplexManifold.holomorphicAtlas ComplexManifold.hausdorff + ComplexManifold.secondCountable + +namespace FormalCauchy + +variable {V : Type*} [AddCommGroup V] [Module ℂ V] + +instance projectiveTangentBoxAnalyticFunctionCoeFun (U : Set ℂ) : + CoeFun (AnalyticFunction U) (fun _ => ℂ → ℂ) := ⟨Subtype.val⟩ + +open scoped MvPowerSeries.WithPiTopology + +end FormalCauchy +end SplitTangent + +open Set Filter Topology + +namespace SplitTangent.TangentSplitting +open HolomorphicJets +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +theorem coordinateCurve_analyticAlternative {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) (x : X.Carrier) : + AnalyticOnNhd ℂ (coordinateCurve g x) (coordinateDomain g x) := by + intro z hz + have hc := contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz + exact (hc.comp z (hg z)).contDiffAt.analyticAt + + + +def localJetAlternative {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) (x : X.Carrier) : + ℕ → ℂ → Model X := Classical.choose + (exists_cauchyOn (coordinateDomain_open hg x) (coordinateCurve g x) + (fun i z hz => analyticAt_pi_iff.mp (coordinateCurve_analyticAlternative hg x z hz) i) + (S.coordinateMatrix x) (fun i j _ hz => S.coordinateMatrix_analytic x i j _ + ((chartAt (Model X) x).map_source hz))) + +end SplitTangent.TangentSplitting + +open Filter Topology + +section FiniteBaseImport +open Polynomial +namespace SplitTangent.RationalSurface + +local instance projectiveTangentBoxDecidableEq : DecidableEq K := Classical.decEq K + +variable {ι : Type*} [Fintype ι] + +end SplitTangent.RationalSurface + +end FiniteBaseImport + +open Filter Topology + +open Filter Topology Metric Set + + + +open MvPowerSeries + +open Filter Topology Set Metric + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/QuotientSubmersions.lean b/lean/OAI/Geometry/SplitTangent/QuotientSubmersions.lean new file mode 100644 index 0000000000000000000000000000000000000000..9bd3bcfebe3e74f614ed96e7f4886266a0c92414 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/QuotientSubmersions.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Geometry.SplitTangent.ActualQuotientCharts +import OAI.Geometry.SplitTangent.BasicSubmersionTransport +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.SwappedProductChart +import OAI.Geometry.SplitTangent.ChartSubmersion +import OAI.Geometry.SplitTangent.BasicDerivativeKernel + +namespace OAI + +/-! Quotient Submersions. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + {L : LeafJetAtlas S} (M : LeafJetAtlas S.swap) {e : ProjectiveEmbedding X} + {hRC : RationallyConnected e} {hdim : 0 ((L.chart i).chart y).2) := by + let P := L.chart i + have ht : (a,b)∈P.chart.target := D.rectangle ⟨ha,hb⟩ + have hs := P.chart.map_target ht + have hx : P.chart (P.chart.symm (a,b))=(a,b) := P.chart.right_inv ht + have hn := Filter.Eventually.and (P.chart.open_source.mem_nhds hs) + ((P.chart.continuousAt hs).preimage_mem_nhds (by + rw [hx] + exact (D.open_U.prod D.open_V).mem_nhds ⟨ha,hb⟩)) + filter_upwards [hn] with y hy + change D.chart (L.leafQuotient e hRC hdim y)=(P.chart y).2 + conv_lhs => rw [←P.chart.left_inv hy.1] + exact D.chart_quotient_rectangle hy.2.1 hy.2.2 + +lemma chart_comp_quotient_submersion_rectangle {a : S.FirstModel i} {b : S.SecondModel i} + (ha : a∈D.U) (hb : b∈D.V) : + BasicSubmersionAt (D.chart ∘ L.leafQuotient e hRC hdim) ((L.chart i).chart.symm (a,b)) := by + refine ⟨D.chart_comp_quotient_contMDiffAt_rectangle ha hb,?_⟩ + let P := L.chart i + have hs := P.chart.map_target (D.rectangle (show (a,b)∈D.U ×ˢ D.V from ⟨ha,hb⟩)) + rw [(D.chart_comp_quotient_eventuallyEq_rectangle ha hb).mfderiv_eq] + exact P.snd_mfderiv_surjective hs + +lemma chart_comp_quotient_submersion {x : X.Carrier} + (hx : L.leafQuotient e hRC hdim x∈D.chart.source) : + BasicSubmersionAt (D.chart ∘ L.leafQuotient e hRC hdim) x := by + obtain ⟨b,hb,he⟩ := hx + exact (L.basic_submersion_leaf D.chart_comp_quotient_basic + ((L.leafQuotient_eq_iff e hRC hdim _ _).mp he)).mp + (D.chart_comp_quotient_submersion_rectangle D.mem_U hb) + +include M in +lemma chart_comp_quotient_kernel {x : X.Carrier} + (hx : L.leafQuotient e hRC hdim x∈D.chart.source) : + LinearMap.ker (mfderiv (ModelWithCorners X) 𝓘(ℂ,S.SecondModel i) + (D.chart ∘ L.leafQuotient e hRC hdim) x).toLinearMap=S.first x := by + let : FiniteDimensional ℂ (Tangent X x) := by + change FiniteDimensional ℂ (Model X) + infer_instance + let d := (mfderiv (ModelWithCorners X) 𝓘(ℂ,S.SecondModel i) + (D.chart ∘ L.leafQuotient e hRC hdim) x).toLinearMap + have hs := D.chart_comp_quotient_submersion hx + have hsub : S.first x≤d.ker := by + intro v hv + exact L.basic_derivative_annihilates_first D.chart_comp_quotient_basic + (hs.1.mdifferentiableAt (by simp)) hv + apply Eq.symm + apply Submodule.eq_of_le_of_finrank_le hsub + have hd := d.finrank_range_add_finrank_ker + have hsur : d.range=⊤ := LinearMap.range_eq_top.mpr hs.2 + rw [hsur,finrank_top] at hd + have hr := (L.chart i).swap.first_finrank (by + rw [AlignedProductChart.swap_source] + exact L.mem_source i) + have hc := M.first_rank_eq i x + rw [S.swap_first] at hr hc + have hp := (S.projector x).toLinearMap.finrank_range_add_finrank_ker + change Module.finrank ℂ (S.first x)+Module.finrank ℂ (S.second x)=_ at hp + change Module.finrank ℂ (S.SecondModel i)+Module.finrank ℂ d.ker= + Module.finrank ℂ (Tangent X x) at hd + rw [←hr,hc,Nat.add_comm] at hd + have hk : Module.finrank ℂ d.ker=Module.finrank ℂ (S.first x) := + Nat.add_right_cancel (hd.trans hp.symm) + exact hk.le + +end QuotientChartData +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RCCovariantVanishing.lean b/lean/OAI/Geometry/SplitTangent/RCCovariantVanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..577af4a9e7b058060c45990451ee673d5651999e --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RCCovariantVanishing.lean @@ -0,0 +1,176 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.TwistedCurveTensor +import OAI.Geometry.SplitTangent.PositiveCoverLift +import OAI.Geometry.SplitTangent.OpenPositiveLeaves + +namespace OAI + +/-! R C Covariant Vanishing. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent + + + +structure HolomorphicTangentTensor (X : ComplexManifold.{u}) (m : ℕ) where + value : X.Carrier → TangentTensor X m + holomorphic : ∀x,ContMDiffOn (ModelWithCorners X) 𝓘(ℂ,TangentTensor X m) ω + (fun y => (value y).compContinuousLinearMap (fun _ => + (trivializationAt (Model X) (Tangent X) x).symmL ℂ y)) + (trivializationAt (Model X) (Tangent X) x).baseSet + +namespace HolomorphicTangentTensor +variable {X : ComplexManifold.{u}} {m : ℕ} (A : HolomorphicTangentTensor X m) + +def coordinates (x y : X.Carrier) : TangentTensor X m := + (A.value y).compContinuousLinearMap (fun _ => + (trivializationAt (Model X) (Tangent X) x).symmL ℂ y) + +lemma coordinates_zero_iff {x y : X.Carrier} + (hy : y∈(trivializationAt (Model X) (Tangent X) x).baseSet) : + A.coordinates x y=0 ↔ A.value y=0 := by + let t := trivializationAt (Model X) (Tangent X) x + constructor + · intro h + apply ContinuousMultilinearMap.ext + intro v + have h' := congrArg (fun B : TangentTensor X m => + B (fun i => t.continuousLinearMapAt ℂ y (v i))) h + change A.value y (fun i => t.symmL ℂ y (t.continuousLinearMapAt ℂ y (v i)))=0 at h' + have he : (fun i => t.symmL ℂ y (t.continuousLinearMapAt ℂ y (v i))) = v := by + funext i + exact t.symmL_continuousLinearMapAt hy (v i) + rw [he] at h' + exact h' + · intro h + apply ContinuousMultilinearMap.ext + intro v + simp [coordinates,h] + rfl + +def along (g : RationalCurve X) : TwistedCurveTensor g 0 m where + finite := A.value ∘ g.finite + infinity := A.value ∘ g.infinity + finite_holomorphic z := by + exact (((A.holomorphic (g.finite z)).contMDiffAt + ((trivializationAt (Model X) (Tangent X) (g.finite z)).open_baseSet.mem_nhds + (FiberBundle.mem_baseSet_trivializationAt' _))).comp z + (g.finite_holomorphic z)).contDiffAt.analyticAt + infinity_holomorphic z := by + exact (((A.holomorphic (g.infinity z)).contMDiffAt + ((trivializationAt (Model X) (Tangent X) (g.infinity z)).open_baseSet.mem_nhds + (FiberBundle.mem_baseSet_trivializationAt' _))).comp z + (g.infinity_holomorphic z)).contDiffAt.analyticAt + overlap z hz := by simp [g.overlap z hz] + +lemma zero_on_positive_curve (hm : 0 < m) (g : RationalCurve X) + (hg : PointedGenerated g (fun _ => ⊤)) : A.value (g.finite 1)=0 := by + apply ContinuousMultilinearMap.ext + intro v + exact (A.along g).vanish_on_generated_fiber hg hm v (fun _ => Submodule.mem_top) + +lemma local_analytic_zero_locus (x : X.Carrier) : + ∃e : OpenPartialHomeomorph X.Carrier (Model X),x∈e.source ∧ + ∃f : Model X → TangentTensor X m,AnalyticOnNhd ℂ f e.target ∧ + ∀y∈e.source,A.value y=0 ↔ f (e y)=0 := by + let t := trivializationAt (Model X) (Tangent X) x + let c := chartAt (Model X) x + let e := c.restr t.baseSet + have hsrc : e.source=c.source ∩ t.baseSet := c.restr_source' _ t.open_baseSet + have htarg : e.target=c.target ∩ c.symm ⁻¹' t.baseSet := by + rw [OpenPartialHomeomorph.restr_target,t.open_baseSet.interior_eq] + refine ⟨e,?_,fun z => A.coordinates x (c.symm z),?_,?_⟩ + · rw [hsrc] + exact ⟨mem_chart_source (Model X) x,FiberBundle.mem_baseSet_trivializationAt' _⟩ + · intro z hz + rw [htarg] at hz + have hc : ContMDiffAt 𝓘(ℂ,Model X) (ModelWithCorners X) ω c.symm z := + contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) x) hz.1 + exact (((A.holomorphic x).contMDiffAt (t.open_baseSet.mem_nhds hz.2)).comp z hc).contDiffAt.analyticAt + · intro y hy + rw [hsrc] at hy + change A.value y=0 ↔ A.coordinates x (c.symm (c y))=0 + rw [c.left_inv hy.1] + exact (A.coordinates_zero_iff hy.2).symm + +lemma eq_zero_of_nonempty_open [PreconnectedSpace X.Carrier] + {U : Set X.Carrier} (hU : IsOpen U) (hne : U.Nonempty) + (hzero : ∀x∈U,A.value x=0) : ∀x,A.value x=0 := by + have hZ : {x | A.value x=0}=univ := + AnalyticContinuation.eq_univ_of_local_analytic_zero_locus + A.local_analytic_zero_locus (by + obtain ⟨x,hx⟩ := hne + exact ⟨x,mem_interior_iff_mem_nhds.mpr + (Filter.mem_of_superset (hU.mem_nhds hx) hzero)⟩) + intro x + have := Set.mem_univ x + rwa [←hZ] at this + +end HolomorphicTangentTensor + +namespace RationallyConnected +variable {X : ComplexManifold.{u}} [CompactSpace X.Carrier] + (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) +include e hRC + + + +theorem exists_open_positive_tangent_curves (hdim : 0 ⊤) := by + obtain ⟨T,hT,G,hs⟩ := hRC.exists_submersive_family e hdim + let := hT + refine ⟨Set.range (G.evaluation 1),(G.evaluation_open hs).isOpen_range, + Set.range_nonempty _,?_⟩ + rintro x ⟨τ,rfl⟩ + refine ⟨G.curve τ,rfl,?_⟩ + intro v hv + obtain ⟨σ,h0,h1⟩ := G.exists_section_endpoints (hs τ) 0 v + exact ⟨σ,fun _ => Submodule.mem_top,fun _ => Submodule.mem_top,h0,h1⟩ + + + +theorem holomorphic_tensor_zero [PreconnectedSpace X.Carrier] (hdim : 0.isClosed,hcover.isOpenMap.isOpen_range⟩ + exact Set.range_eq_univ.mp (hc.eq_univ (Set.range_nonempty _)) + obtain ⟨U,hU,hUn,hpos⟩ := hRC.exists_open_positive_tangent_curves e hdim + apply A.eq_zero_of_nonempty_open (hU.preimage hcover.continuous) + (hUn.preimage hs) + intro y hy + obtain ⟨g,hg1,hg⟩ := hpos (p y) hy + obtain ⟨k,hk1,hk,_,_⟩ := g.exists_positive_cover_lift_at hg hcover hp 1 y hg1.symm + rw [←hk1] + exact A.zero_on_positive_curve hm k hk + +end RationallyConnected +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalAccepted.lean b/lean/OAI/Geometry/SplitTangent/RationalAccepted.lean new file mode 100644 index 0000000000000000000000000000000000000000..47656d3d4f6782c51826d75b314ec353672b3013 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalAccepted.lean @@ -0,0 +1,97 @@ +import Mathlib +import OAI.Geometry.SplitTangent.RationalFamilies +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Rational Accepted. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold + +universe u +namespace SplitTangent.RationalParameters +open AnalyticZeroCover + +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) [CompactSpace X.Carrier] + + + +lemma analyticSetOn_incidenceAlternative {m : ℕ} {U : Set (Space m)} (hU : IsOpen U) + {Q : Space m → Fin (e.N+1) → ℂ} (hQ : AnalyticOnNhd ℂ Q U) + (hnz : ∀ z∈U, Q z≠0) : + AnalyticSetOn U {z | z∈U ∧ ∃ x, e.Incidence x (Q z)} where + subset := fun _ h => h.1 + closed := by + intro z hz + refine ⟨hz.2,?_⟩ + change Q z ∈ {v | ∃ x, e.Incidence x v} + rw [← e.isClosed_cone.closure_eq] + exact (closure_mono (show Q '' {z | z∈U ∧ ∃ x, e.Incidence x (Q z)} ⊆ + {v | ∃ x, e.Incidence x v} from by rintro _ ⟨y,hy,rfl⟩; exact hy.2) + (mem_closure_image (hQ z hz.2).continuousAt hz.1)) + local_equations := by + intro z hz + obtain ⟨D,hD,hDeq⟩ := e.cone_local_equations_any (hnz z hz.1) + have hcomp : AnalyticAt ℂ (D ∘ Q) z := hD.comp (hQ z hz.1) + have heq := (hQ z hz.1).continuousAt.eventually hDeq + obtain ⟨V,hV,hVo,hVz⟩ := eventually_nhds_iff.mp + (Filter.Eventually.and (hU.mem_nhds hz.1) (hcomp.eventually_analyticAt.and heq)) + let f : Fin (e.N+1) → Space m → ℂ := fun i y => D (Q y) i + refine ⟨V,hVo,hVz,fun y hy => (hV y hy).1,Set.range f,?_,?_⟩ + · rintro g ⟨i,rfl⟩ y hy + exact ((ContinuousLinearMap.proj i).analyticAt _).comp (hV y hy).2.1 + · intro y hy + simp only [mem_ofPred_eq,forall_mem_range] + have hyU : y∈U := (hV y hy).1 + simp only [hyU,true_and] + rw [(hV y hy).2.2] + exact ⟨fun h i => congrFun h i,fun h => funext h⟩ + +lemma accepted_test {d : ℕ} (P : Patch (Coeff e.N d)) + (hPM : P.image ⊆ regular e.N d) (hPA : ¬P.image ⊆ accepted e d) : + ∃ B : Set (Space P.dim), AnalyticSetOn P.domain B ∧ + (∃ x∈P.domain, x∉B) ∧ {x | x∈P.domain ∧ P.map x∈accepted e d} ⊆ B := by + classical + obtain ⟨τ,hτ,hτA⟩ := Set.not_subset.mp hPA + obtain ⟨x,hx,rfl⟩ := hτ + have hn : ∃ b : Bool, ∃ z : ℂ, ¬∃ y, e.Incidence y (ev b (P.map x) z) := by + simpa only [accepted,mem_ofPred_eq,not_forall] using hτA + obtain ⟨b,z,hbad⟩ := hn + let Q : Space P.dim → (Fin (e.N+1) → ℂ) := fun y => ev b (P.map y) z + have hQ : AnalyticOnNhd ℂ Q P.domain := fun y hy => + AnalyticAt.comp (f := fun y => (z,P.map y)) (x := y) (ev_analytic b (z,P.map y)) + (analyticAt_const.prod (P.analytic y hy)) + refine ⟨{y | y∈P.domain ∧ ∃ q, e.Incidence q (Q y)}, + analyticSetOn_incidenceAlternative e P.isOpen_domain hQ + (fun y hy => regular_nonzero (hPM ⟨y,hy,rfl⟩) b z),?_,?_⟩ + · exact ⟨x,hx,fun h => hbad h.2⟩ + · intro y hy + exact ⟨hy.1,hy.2 b z⟩ + + + +theorem countable_accepted {d : ℕ} : + ∃ C : Set (Patch (Coeff e.N d)), C.Countable ∧ + (∀ P∈C, P.image ⊆ regular e.N d ∩ accepted e d) ∧ + regular e.N d ∩ accepted e d ⊆ ⋃ P∈C,P.image := by + classical + obtain ⟨D,hD,hDdim,hcover⟩ := countable_open_patches (isOpen_regular e.N d) + have H (i : D) := i.val.countable_accepted_cover (accepted_test e) (hDdim i.val i.property).2 + choose C hC hCp hCc using H + let : Countable D := hD.to_subtype + refine ⟨⋃ i,C i,Set.countable_iUnion hC,?_,?_⟩ + · intro P hP + obtain ⟨i,hi⟩ := mem_iUnion.mp hP + exact (hCp i P hi).2 + · intro τ hτ + obtain ⟨P,hP,hτP⟩ := mem_iUnion₂.mp (hcover hτ.1) + obtain ⟨Q,hQ,hτQ⟩ := mem_iUnion₂.mp (hCc ⟨P,hP⟩ ⟨hτP,hτ.2⟩) + exact mem_iUnion₂.mpr ⟨Q,mem_iUnion.mpr ⟨⟨P,hP⟩,hQ⟩,hτQ⟩ + +end SplitTangent.RationalParameters + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalCoverLift.lean b/lean/OAI/Geometry/SplitTangent/RationalCoverLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..84d6b8d5466fdda02dae645781547019c2fe6ff8 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalCoverLift.lean @@ -0,0 +1,89 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Rational Cover Lift. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent +variable {X Y : ComplexManifold.{u}} {p : Y.Carrier → X.Carrier} + +lemma holomorphic_of_continuous_cover_lift + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + {f : ℂ → X.Carrier} {g : ℂ → Y.Carrier} + (hf : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω f) + (hg : Continuous g) (he : ∀z,p (g z)=f z) : + ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners Y) ω g := by + intro z + let h := hp (g z) + have hinv := h.localInverse_contMDiffAt + rw [he z] at hinv + have hh := hinv.comp z (hf z) + apply hh.congr_of_eventuallyEq + have hn := hg.continuousAt.preimage_mem_nhds + (h.localInverse.open_target.mem_nhds h.localInverse_mem_target) + filter_upwards [hn] with w hw + change g w=h.localInverse (f w) + rw [←he w,h.localInverse_left_inv hw] + + + +theorem RationalCurve.exists_cover_lift_at (g : RationalCurve X) + (hcover : IsCoveringMap p) + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (a₀ : ℂ) (y : Y.Carrier) (hy : p y=g.finite a₀) : + ∃k : RationalCurve Y,k.finite a₀=y ∧ + (∀z,p (k.finite z)=g.finite z) ∧ (∀z,p (k.infinity z)=g.infinity z) := by + let f : C(ℂ,X.Carrier) := ⟨g.finite,g.finite_holomorphic.continuous⟩ + obtain ⟨F,hF,_⟩ := hcover.existsUnique_continuousMap_lifts f a₀ y hy + have hF' z : p (F z)=g.finite z := congrFun hF.2 z + have h1 : p (F 1)=g.infinity 1 := by + rw [hF' 1,g.overlap 1 one_ne_zero,inv_one] + let q : C(ℂ,X.Carrier) := ⟨g.infinity,g.infinity_holomorphic.continuous⟩ + obtain ⟨G,hG,_⟩ := hcover.existsUnique_continuousMap_lifts q (1 : ℂ) (F 1) h1 + have hG' z : p (G z)=g.infinity z := congrFun hG.2 z + have hconn : IsPreconnected {z : ℂ | z≠0} := by + have hh := (isConnected_compl_singleton_of_one_lt_rank + (E := ℂ) (by norm_num [Complex.rank_real_complex]) (0 : ℂ)).isPreconnected + exact hh + let : PreconnectedSpace {z : ℂ // z≠0} := isPreconnected_iff_preconnectedSpace.mp hconn + let a : {z : ℂ // z≠0} → Y.Carrier := fun z => F z.val + let b : {z : ℂ // z≠0} → Y.Carrier := fun z => G z.val⁻¹ + have ha : Continuous a := F.continuous.comp continuous_subtype_val + have hb : Continuous b := G.continuous.comp + (continuous_subtype_val.inv₀ (fun z => z.property)) + have hab : p ∘ a=p ∘ b := by + funext z + exact (hF' z.val).trans ((g.overlap z.val z.property).trans (hG' z.val⁻¹).symm) + have hab1 : a ⟨1,one_ne_zero⟩=b ⟨1,one_ne_zero⟩ := by + change F 1=G 1⁻¹ + rw [inv_one,hG.1] + have heq : a=b := hcover.eq_of_comp_eq ha hb hab ⟨1,one_ne_zero⟩ hab1 + let k : RationalCurve Y := { + finite := F + infinity := G + finite_holomorphic := holomorphic_of_continuous_cover_lift hp + g.finite_holomorphic F.continuous hF' + infinity_holomorphic := holomorphic_of_continuous_cover_lift hp + g.infinity_holomorphic G.continuous hG' + overlap z hz := congrFun heq ⟨z,hz⟩ } + exact ⟨k,hF.1,hF',hG'⟩ + + +theorem RationalCurve.exists_cover_lift (g : RationalCurve X) + (hcover : IsCoveringMap p) + (hp : IsLocalDiffeomorph (ModelWithCorners Y) (ModelWithCorners X) ω p) + (y : Y.Carrier) (hy : p y=g.finite 0) : + ∃k : RationalCurve Y,k.finite 0=y ∧ + (∀z,p (k.finite z)=g.finite z) ∧ (∀z,p (k.infinity z)=g.infinity z) := + g.exists_cover_lift_at hcover hp 0 y hy + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalCurveFrames.lean b/lean/OAI/Geometry/SplitTangent/RationalCurveFrames.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a71356356eedb567a8dd4702d96f162fc4fa394 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalCurveFrames.lean @@ -0,0 +1,134 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.ProjectiveLineFrame + +namespace OAI + +/-! Rational Curve Frames. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +universe u +namespace SplitTangent + + + +structure RationalCurveFrames {X : ComplexManifold.{u}} + (e : ProjectiveEmbedding X) (g : RationalCurve X) where + degree : ℕ + P : Fin (e.N+1) → Polynomial ℂ + Q : Fin (e.N+1) → Polynomial ℂ + a : Fin (e.N+1) → Polynomial ℂ + b : Fin (e.N+1) → Polynomial ℂ + finite_bezout : ∑i,a i*P i=1 + infinity_bezout : ∑i,b i*Q i=1 + finite_incidence : ∀z,e.Incidence (g.finite z) (fun i => (P i).eval z) + infinity_incidence : ∀z,e.Incidence (g.infinity z) (fun i => (Q i).eval z) + transition : ∀z,z≠0 → ∀i,(P i).eval z=z^degree*(Q i).eval z⁻¹ + +theorem RationalCurve.exists_frames {X : ComplexManifold.{u}} + (e : ProjectiveEmbedding X) (g : RationalCurve X) : Nonempty (RationalCurveFrames e g) := by + classical + obtain ⟨d,P,Q,hP,hQ,hdeg,hf,hi,ht⟩ := rationalCurve_two_chart_polynomials e g + obtain ⟨a,ha⟩ := PolynomialTuple.bezout P hP + obtain ⟨b,hb⟩ := PolynomialTuple.bezout Q hQ + refine ⟨⟨d,P,Q,a,b,ha,hb,?_,?_,ht⟩⟩ + · intro z + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map (g.finite z)).rep_nonzero + refine (e.incidence_iff_coordinates hk).mpr (fun j => ?_) + exact (hf z k j hk).trans (mul_comm _ _) + · intro z + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map (g.infinity z)).rep_nonzero + refine (e.incidence_iff_coordinates hk).mpr (fun j => ?_) + exact (hi z k j hk).trans (mul_comm _ _) + +namespace RationalCurveFrames +variable {X : ComplexManifold.{u}} {e : ProjectiveEmbedding X} {g : RationalCurve X} + (F : RationalCurveFrames e g) + +def finite (z : ℂ) (x : X.Carrier) := e.linearFrame (fun i => (F.a i).eval z) x +def infinity (z : ℂ) (x : X.Carrier) := e.linearFrame (fun i => (F.b i).eval z) x + +lemma finite_unit (z : ℂ) : ∑i,(F.a i).eval z*(F.P i).eval z=1 := by + simpa only [Polynomial.eval_finsetSum,Polynomial.eval_mul,Polynomial.eval_one] + using congrArg (Polynomial.eval z) F.finite_bezout +lemma infinity_unit (z : ℂ) : ∑i,(F.b i).eval z*(F.Q i).eval z=1 := by + simpa only [Polynomial.eval_finsetSum,Polynomial.eval_mul,Polynomial.eval_one] + using congrArg (Polynomial.eval z) F.infinity_bezout + +lemma finite_denominator_ne (z : ℂ) : + (∑i,(F.a i).eval z*(e.map (g.finite z)).rep i)≠0 := + e.linearFrame_denominator_ne (F.finite_incidence z) (F.finite_unit z) +lemma infinity_denominator_ne (z : ℂ) : + (∑i,(F.b i).eval z*(e.map (g.infinity z)).rep i)≠0 := + e.linearFrame_denominator_ne (F.infinity_incidence z) (F.infinity_unit z) + +lemma finite_on_curve (z : ℂ) : F.finite z (g.finite z)=fun i => (F.P i).eval z := + e.linearFrame_eq_of_incidence (F.finite_incidence z) (F.finite_unit z) +lemma infinity_on_curve (z : ℂ) : F.infinity z (g.infinity z)=fun i => (F.Q i).eval z := + e.linearFrame_eq_of_incidence (F.infinity_incidence z) (F.infinity_unit z) + + +def multiplier (z : ℂ) (x : X.Carrier) : ℂ := + ∑i,(F.b i).eval z⁻¹ * F.finite z x i + +lemma multiplier_on_curve {z : ℂ} (hz : z≠0) : + F.multiplier z (g.finite z)=z^F.degree := by + simp only [multiplier,F.finite_on_curve,F.transition z hz] + calc + _ = z^F.degree * (∑i,(F.b i).eval z⁻¹ * (F.Q i).eval z⁻¹) := by + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i hi + ring + _ = _ := by rw [F.infinity_unit,mul_one] + +lemma frame_transition (z : ℂ) (x : X.Carrier) + (hb : (∑i,(F.b i).eval z⁻¹*(e.map x).rep i)≠0) : + F.finite z x=F.multiplier z x • F.infinity z⁻¹ x := + e.linearFrame_change _ _ x hb + +lemma finite_holomorphicAt (z : ℂ) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,Fin (e.N+1) → ℂ) ω + (F.finite z) (g.finite z) := + e.linearFrame_holomorphicAt (ModelWithCorners X) contMDiffAt_id + contMDiffAt_const (F.finite_denominator_ne z) + +lemma infinity_holomorphicAt (z : ℂ) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,Fin (e.N+1) → ℂ) ω + (F.infinity z) (g.infinity z) := + e.linearFrame_holomorphicAt (ModelWithCorners X) contMDiffAt_id + contMDiffAt_const (F.infinity_denominator_ne z) + + + +lemma finite_joint_holomorphicAt (z : ℂ) : + ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,Fin (e.N+1) → ℂ) ω + (fun q : ℂ × X.Carrier => F.finite q.1 q.2) (z,g.finite z) := by + apply e.linearFrame_holomorphicAt _ contMDiffAt_snd _ (F.finite_denominator_ne z) + apply contMDiffAt_pi_space.mpr + intro i + have hp : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ) ω (fun t => (F.a i).eval t) z := by + simpa [Polynomial.aeval_def] using + ((F.a i).contDiff_aeval (𝕜 := ℂ) ω).contDiffAt.contMDiffAt + exact hp.comp (z,g.finite z) (contMDiffAt_fst (I := 𝓘(ℂ,ℂ)) (J := ModelWithCorners X)) + +lemma infinity_joint_holomorphicAt (z : ℂ) : + ContMDiffAt (𝓘(ℂ,ℂ).prod (ModelWithCorners X)) 𝓘(ℂ,Fin (e.N+1) → ℂ) ω + (fun q : ℂ × X.Carrier => F.infinity q.1 q.2) (z,g.infinity z) := by + apply e.linearFrame_holomorphicAt _ contMDiffAt_snd _ (F.infinity_denominator_ne z) + apply contMDiffAt_pi_space.mpr + intro i + have hp : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ) ω (fun t => (F.b i).eval t) z := by + simpa [Polynomial.aeval_def] using + ((F.b i).contDiff_aeval (𝕜 := ℂ) ω).contDiffAt.contMDiffAt + exact hp.comp (z,g.infinity z) (contMDiffAt_fst (I := 𝓘(ℂ,ℂ)) (J := ModelWithCorners X)) + +end RationalCurveFrames +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalEncoding.lean b/lean/OAI/Geometry/SplitTangent/RationalEncoding.lean new file mode 100644 index 0000000000000000000000000000000000000000..30dd5f11453090a34ab984355140361981b23cab --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalEncoding.lean @@ -0,0 +1,95 @@ +import Mathlib +import OAI.Geometry.SplitTangent.RationalFamilies +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.FormalBoxes + +namespace OAI + +/-! Rational Encoding. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold BigOperators +universe u +namespace SplitTangent.RationalParameters + + +def ofPolynomials {N : ℕ} (d : ℕ) (P : Fin (N+1) → Polynomial ℂ) : Coeff N d := + fun k => (P (finProdFinEquiv.symm k).1).coeff (finProdFinEquiv.symm k).2.val + +lemma ev_ofPolynomials_false {N d : ℕ} (P : Fin (N+1) → Polynomial ℂ) + (hP : ∀ i, (P i).natDegree≤d) (z : ℂ) : + ev false (ofPolynomials d P) z = fun i => (P i).eval z := by + ext i + simp only [ev,ofPolynomials,Equiv.symm_apply_apply,Bool.false_eq_true,↓reduceIte] + rw [Polynomial.eval_eq_sum_range' (Nat.lt_succ_of_le (hP i))] + exact Fin.sum_univ_eq_sum_range (fun k : ℕ => (P i).coeff k * z^k) (d+1) + +lemma ev_ofPolynomials_true {N d : ℕ} (P : Fin (N+1) → Polynomial ℂ) + (hP : ∀ i, (P i).natDegree≤d) (z : ℂ) : + ev true (ofPolynomials d P) z = fun i => ((P i).reflect d).eval z := by + ext i + apply tendsto_nhds_unique_of_frequently_eq + ((continuous_apply i).comp ((ev_continuous true).comp (continuous_id.prodMk continuous_const))).continuousAt + (by fun_prop : ContinuousAt (fun w => ((P i).reflect d).eval w) z) + have hfreq : ∃ᶠ w in 𝓝 z, w≠(0 : ℂ) := by + simpa only [Polynomial.eval_X] using + PolynomialTuple.frequently_eval_ne_zero Polynomial.X Polynomial.X_ne_zero z + apply hfreq.mono + intro w hw + have he := congrFun (ev_transition (ofPolynomials d P) (inv_ne_zero hw)) i + rw [ev_ofPolynomials_false P hP,inv_inv] at he + have hp := PolynomialTuple.reflect_transition (P i) d (hP i) w⁻¹ (inv_ne_zero hw) + simp only [inv_inv] at hp + change (P i).eval w⁻¹ = w⁻¹ ^ d * ev true (ofPolynomials d P) w i at he + exact mul_left_cancel₀ (pow_ne_zero d (inv_ne_zero hw)) + (he.symm.trans (hp.symm.trans (mul_comm _ _))) + + + +theorem curve_encoding {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) (g : RationalCurve X) : + ∃ d : ℕ, ∃ τ : Coeff e.N d, τ∈regular e.N d ∩ accepted e d ∧ + (∀ z, e.Incidence (g.finite z) (ev false τ z)) ∧ + (∀ z, e.Incidence (g.infinity z) (ev true τ z)) := by + classical + obtain ⟨d,P,Q,hP,hQ,hdeg,hfinite,hinfty,htrans⟩ := rationalCurve_two_chart_polynomials e g + let τ := ofPolynomials d P + have hτf (z : ℂ) : ev false τ z = fun i => (P i).eval z := + ev_ofPolynomials_false P (fun i => (hdeg i).1) z + have hτi (z : ℂ) : ev true τ z = fun i => (Q i).eval z := by + rw [ev_ofPolynomials_true P (fun i => (hdeg i).1)] + ext i + rw [← (hdeg i).2] + have hf (z : ℂ) : e.Incidence (g.finite z) (ev false τ z) := by + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map (g.finite z)).rep_nonzero + apply (e.incidence_iff_coordinates hk).mpr + intro j + simpa only [hτf] using (hfinite z k j hk).trans (mul_comm _ _) + have hi (z : ℂ) : e.Incidence (g.infinity z) (ev true τ z) := by + obtain ⟨k,hk⟩ := Function.ne_iff.mp (e.map (g.infinity z)).rep_nonzero + apply (e.incidence_iff_coordinates hk).mpr + intro j + simpa only [hτi] using (hinfty z k j hk).trans (mul_comm _ _) + refine ⟨d,τ,⟨?_,?_⟩,hf,hi⟩ + · intro b z hz + cases b + · obtain ⟨i,hi⟩ := PolynomialTuple.basepoint_free P hP z + intro he + have hh := congrFun he i + rw [hτf] at hh + exact hi hh + · obtain ⟨i,hi⟩ := PolynomialTuple.basepoint_free Q hQ z + intro he + have hh := congrFun he i + rw [hτi] at hh + exact hi hh + · intro b z + cases b + · exact ⟨g.finite z,hf z⟩ + · exact ⟨g.infinity z,hi z⟩ + +end SplitTangent.RationalParameters + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalFamilies.lean b/lean/OAI/Geometry/SplitTangent/RationalFamilies.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c58c2ddf428305752ee99fad900668d365ed535 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalFamilies.lean @@ -0,0 +1,1415 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.OpenManifold +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.RationalTrivialization +import OAI.Geometry.SplitTangent.BoxFirstTransport + +namespace OAI + +/-! Rational Families. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold +universe u + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover +abbrev Space (n : ℕ) := Fin n → ℂ + + +structure Patch (E : Type*) [NormedAddCommGroup E] [NormedSpace ℂ E] where + dim : ℕ + domain : Set (Space dim) + isOpen_domain : IsOpen domain + preconnected_domain : IsPreconnected domain + map : Space dim → E + analytic : AnalyticOnNhd ℂ map domain + +def Patch.image {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] (P : Patch E) : Set E := + P.map '' P.domain + + + +theorem regular_zero_patchAlternative {d : ℕ} {f : Space d → ℂ} {x : Space d} + {U : Set (Space d)} (hU : IsOpen U) (hxU : x ∈ U) + (hf : AnalyticAt ℂ f x) (hx : f x=0) (hd : fderiv ℂ f x ≠ 0) : + ∃ P : Patch (Space d), P.dim < d ∧ P.image ⊆ U ∩ {y | f y=0} ∧ + ∃ V : Set (Space d), IsOpen V ∧ x ∈ V ∧ + ∀ y ∈ V, f y=0 → y ∈ P.image := by + classical + let L := fderiv ℂ f x + have hL : L.toLinearMap ≠ 0 := by + intro hh + apply hd + ext v + exact congrArg (fun q : Space d →ₗ[ℂ] ℂ => q v) hh + have hr : L.range = ⊤ := Module.Dual.range_eq_top_of_ne_zero hL + have hk := L.ker_closedComplemented_of_finiteDimensional_range + let φ := HasStrictFDerivAt.implicitFunctionDataOfComplemented f L + ((hf.contDiffAt (n := ω)).hasStrictFDerivAt (by simp)) hr hk + let m := Module.finrank ℂ L.ker + let e : Space m ≃L[ℂ] L.ker := + (ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm).symm + have hm : m < d := by + have hh := Module.Dual.finrank_ker_add_one_of_ne_zero hL + have hh' : m + 1 = d := by simpa only [Space,Module.finrank_fin_fun] using hh + omega + have hright : AnalyticAt ℂ φ.rightFun x := by + exact ((Classical.choose hk).analyticAt _).comp (analyticAt_id.sub analyticAt_const) + have hφ : AnalyticAt ℂ φ.implicitFunction.uncurry (φ.prodFun φ.pt) := + (φ.contDiffAt_implicitFunction hf.contDiffAt hright.contDiffAt (by simp)).analyticAt + have hbase : φ.prodFun φ.pt = (0,0) := by + ext <;> simp [φ,ImplicitFunctionData.prodFun,hx] + have hval : φ.implicitFunction 0 0 = x := by + have hh := mem_of_mem_nhds φ.implicitFunction_apply_image + simpa [φ,hx] using hh + let g : Space m → Space d := fun z => φ.implicitFunction 0 (e z) + have hg : AnalyticAt ℂ g 0 := by + have hh : AnalyticAt ℂ φ.implicitFunction.uncurry (0,e 0) := by + simpa only [hbase,map_zero] using hφ + exact AnalyticAt.comp (f := fun z : Space m => (0,e z)) (x := 0) hh + (analyticAt_const.prod (e.analyticAt 0)) + have hg0 : g 0=x := by simpa [g] using hval + have hfg : ∀ᶠ z in 𝓝 (0 : Space m), f (g z)=0 := by + have ht : Tendsto (fun z : Space m => (0,e z)) (𝓝 0) (𝓝 (φ.prodFun φ.pt)) := by + rw [hbase] + simpa using (continuous_const.prodMk e.continuous).continuousAt.tendsto (x := 0) + exact ht.eventually φ.leftFun_implicitFunction + have hgU : ∀ᶠ z in 𝓝 (0 : Space m), g z∈U := + hg.continuousAt (hg0 ▸ hU.mem_nhds hxU) + obtain ⟨r,hr,hrW⟩ := Metric.mem_nhds_iff.mp + (hg.eventually_analyticAt.and (hgU.and hfg)) + let W := Metric.ball (0 : Space m) r + have hWo : IsOpen W := Metric.isOpen_ball + have hW0 : (0 : Space m)∈W := Metric.mem_ball_self hr + have hWh : ∀ z∈W, AnalyticAt ℂ g z ∧ g z∈U ∧ f (g z)=0 := hrW + let P : Patch (Space d) := ⟨m,W,hWo,(convex_ball (0 : Space m) r).isPreconnected, + g,fun z hz => (hWh z hz).1⟩ + refine ⟨P,hm,?_,?_⟩ + · rintro y ⟨z,hz,rfl⟩ + exact (hWh z hz).2 + · have hψ : ContinuousAt (fun y => e.symm (φ.rightFun y)) x := + e.symm.continuousAt.comp hright.continuousAt + have hψ0 : e.symm (φ.rightFun x)=0 := by simp [φ] + have hψW : ∀ᶠ y in 𝓝 x, e.symm (φ.rightFun y)∈W := + hψ (by simpa only [hψ0] using hWo.mem_nhds hW0) + obtain ⟨V,hV,hVo,hVx⟩ := eventually_nhds_iff.mp + (hψW.and φ.implicitFunction_apply_image) + refine ⟨V,hVo,hVx,fun y hy hfy => ?_⟩ + refine ⟨e.symm (φ.rightFun y),(hV y hy).1,?_⟩ + change φ.implicitFunction 0 (e (e.symm (φ.rightFun y)))=y + rw [e.apply_symm_apply] + have hh := (hV y hy).2 + simpa only [show φ.leftFun y=f y from rfl,hfy] using hh + +end AnalyticZeroCover + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover +section + +variable {R K F : Type*} [NormedAddCommGroup R] [NormedSpace ℂ R] + [NormedAddCommGroup K] [NormedSpace ℂ K] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [FiniteDimensional ℂ R] [FiniteDimensional ℂ K] [FiniteDimensional ℂ F] + + + +omit [FiniteDimensional ℂ F] in +lemma vertical_eq_zero_of_rank_le (A : R × K →L[ℂ] F) (p : F →L[ℂ] R) + (hp : p.comp A = ContinuousLinearMap.fst ℂ R K) + (hr : Module.finrank ℂ A.range ≤ Module.finrank ℂ R) (k : K) : + A (0,k)=0 := by + let q : A.range →ₗ[ℂ] R := p.toLinearMap.comp A.range.subtype + have hq : Function.Surjective q := by + intro r + refine ⟨⟨A (r,0),⟨(r,0),rfl⟩⟩,?_⟩ + exact congrArg (fun B : R × K →L[ℂ] R => B (r,0)) hp + have heq : Module.finrank ℂ A.range = Module.finrank ℂ R := + le_antisymm hr (LinearMap.finrank_le_finrank_of_surjective hq) + have hi := (LinearMap.injective_iff_surjective_of_finrank_eq_finrank heq).mpr hq + have hh : q ⟨A (0,k),⟨(0,k),rfl⟩⟩ = q 0 := by + simpa [q,ContinuousLinearMap.comp_apply] using congrArg (fun B : R × K →L[ℂ] R => B (0,k)) hp + exact congrArg Subtype.val (hi hh) + + +omit [FiniteDimensional ℂ F] in +lemma finrank_range_comp_le {E G : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup G] [NormedSpace ℂ G] + [FiniteDimensional ℂ E] [FiniteDimensional ℂ G] + (a : E →L[ℂ] F) (b : G →L[ℂ] E) : + Module.finrank ℂ (a.comp b).range ≤ Module.finrank ℂ a.range := by + exact Submodule.finrank_mono (by + rintro _ ⟨v,rfl⟩ + exact ⟨b v,rfl⟩) + + + +lemma Patch.dimH_image_le (P : Patch F) : + dimH P.image ≤ (2*P.dim : ℕ) := by + have hh : dimH P.image ≤ dimH P.domain := by + exact dimH_image_le_of_locally_lipschitzOn (fun x hx => by + obtain ⟨C,s,hs,hC⟩ := (P.analytic x hx).contDiffAt (n := 1) |>.exists_lipschitzOnWith + exact ⟨C,s,mem_nhdsWithin_of_mem_nhds hs,hC⟩) + apply hh.trans + apply (dimH_mono (subset_univ P.domain)).trans_eq + rw [Real.dimH_univ_eq_finrank,finrank_real_of_complex,Module.finrank_fin_fun] + +end + +variable {E F R K : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [NormedAddCommGroup R] [NormedSpace ℂ R] + [NormedAddCommGroup K] [NormedSpace ℂ K] + [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] + [FiniteDimensional ℂ R] [FiniteDimensional ℂ K] + + +omit [FiniteDimensional ℂ F] in +lemma constant_vertical {H : R × K → F} {U : Set R} {V : Set K} + (hU : IsOpen U) (hV : IsOpen V) (hVc : IsPreconnected V) + (hH : AnalyticOnNhd ℂ H (U ×ˢ V)) (p : F →L[ℂ] R) + (hp : ∀ z∈U ×ˢ V, p (H z)=z.1) + (hr : ∀ z∈U ×ˢ V, Module.finrank ℂ (fderiv ℂ H z).range ≤ Module.finrank ℂ R) + {r : R} (hrU : r∈U) {k l : K} (hk : k∈V) (hl : l∈V) : + H (r,k)=H (r,l) := by + have hd (v : K) (hv : v∈V) := (hH (r,v) ⟨hrU,hv⟩).differentiableAt + have hcomp (v : K) (hv : v∈V) : + HasFDerivAt (fun k => H (r,k)) + ((fderiv ℂ H (r,v)).comp (ContinuousLinearMap.inr ℂ R K)) v := + (hd v hv).hasFDerivAt.comp v + ((hasFDerivAt_const r v).prodMk (hasFDerivAt_id v)) + have hz (v : K) (hv : v∈V) : fderiv ℂ (fun k => H (r,k)) v=0 := by + rw [(hcomp v hv).fderiv] + have he : (fun z => p (H z)) =ᶠ[𝓝 (r,v)] Prod.fst := + Filter.Eventually.mono ((hU.prod hV).mem_nhds (show (r,v)∈U ×ˢ V from ⟨hrU,hv⟩)) + (fun z hz => hp z hz) + have heD : p.comp (fderiv ℂ H (r,v)) = ContinuousLinearMap.fst ℂ R K := + ((p.hasFDerivAt.comp (r,v) (hd v hv).hasFDerivAt).congr_of_eventuallyEq he.symm).unique + hasFDerivAt_fst + ext w + exact vertical_eq_zero_of_rank_le _ p heD (hr (r,v) ⟨hrU,hv⟩) w + exact hV.is_const_of_fderiv_eq_zero hVc + (fun v hv => (hcomp v hv).differentiableAt.differentiableWithinAt) + (fun v hv => hz v hv) hk hl + + + +theorem local_image_patchAlternative {f : E → F} {U : Set E} {x : E} + (hU : IsOpen U) (hx : x∈U) (hf : AnalyticOnNhd ℂ f U) + (p : F →L[ℂ] R) (hs : Function.Surjective (p.comp (fderiv ℂ f x))) + (hr : ∀ y∈U, Module.finrank ℂ (fderiv ℂ f y).range ≤ Module.finrank ℂ R) : + ∃ P : Patch F, P.dim=Module.finrank ℂ R ∧ + ∃ W : Set E, IsOpen W ∧ x∈W ∧ W⊆U ∧ f '' W ⊆ P.image := by + classical + let g : E → R := fun y => p (f y) + let L := p.comp (fderiv ℂ f x) + have hg : AnalyticAt ℂ g x := (p.analyticAt _).comp (hf x hx) + have hgD : HasStrictFDerivAt g L x := + p.hasStrictFDerivAt.comp x (((hf x hx).contDiffAt (n := ω)).hasStrictFDerivAt (by simp)) + have hL : L.range=⊤ := LinearMap.range_eq_top.mpr hs + have hK := L.ker_closedComplemented_of_finiteDimensional_range + let φ := HasStrictFDerivAt.implicitFunctionDataOfComplemented g L hgD hL hK + have hright : AnalyticAt ℂ φ.rightFun x := + ((Classical.choose hK).analyticAt _).comp (analyticAt_id.sub analyticAt_const) + have hφ : AnalyticAt ℂ φ.implicitFunction.uncurry (φ.prodFun φ.pt) := + (φ.contDiffAt_implicitFunction hg.contDiffAt hright.contDiffAt (by simp)).analyticAt + have hbase : φ.prodFun φ.pt=(g x,0) := by + ext <;> simp [φ,ImplicitFunctionData.prodFun] + have hval : φ.implicitFunction (g x) 0=x := by + have hh := mem_of_mem_nhds φ.implicitFunction_apply_image + simpa [φ] using hh + have hφ' : AnalyticAt ℂ φ.implicitFunction.uncurry (g x,0) := hbase ▸ hφ + have hφU : ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), φ.implicitFunction.uncurry z∈U := + hφ'.continuousAt (by simpa only [Function.uncurry_apply_pair,hval] using hU.mem_nhds hx) + have hφp : ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), p (f (φ.implicitFunction.uncurry z))=z.1 := by + change ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), φ.leftFun (φ.implicitFunction z.1 z.2)=z.1 + rw [← hbase] + exact φ.leftFun_implicitFunction + obtain ⟨ε,hε,hεprop⟩ := Metric.mem_nhds_iff.mp + (hφ'.eventually_analyticAt.and (hφU.and hφp)) + let A := Metric.ball (g x) ε + let B := Metric.ball (0 : L.ker) ε + have hAB : A ×ˢ B = Metric.ball (g x,(0 : L.ker)) ε := by + ext z + simp only [A,B,mem_prod,Metric.mem_ball,Prod.dist_eq,max_lt_iff] + let H : R × L.ker → F := f ∘ φ.implicitFunction.uncurry + have hprop (z : R × L.ker) (hz : z∈A ×ˢ B) : + AnalyticAt ℂ φ.implicitFunction.uncurry z ∧ + φ.implicitFunction.uncurry z∈U ∧ p (H z)=z.1 := hεprop (hAB ▸ hz) + have hH : AnalyticOnNhd ℂ H (A ×ˢ B) := fun z hz => + (hf _ (hprop z hz).2.1).comp (hprop z hz).1 + have hrH : ∀ z∈A ×ˢ B, Module.finrank ℂ (fderiv ℂ H z).range ≤ Module.finrank ℂ R := by + intro z hz + rw [fderiv_comp z (hf _ (hprop z hz).2.1).differentiableAt (hprop z hz).1.differentiableAt] + exact (finrank_range_comp_le _ _).trans (hr _ (hprop z hz).2.1) + have hconst {r : R} (hrA : r∈A) {k : L.ker} (hkB : k∈B) : H (r,k)=H (r,0) := + constant_vertical Metric.isOpen_ball Metric.isOpen_ball (convex_ball (0 : L.ker) ε).isPreconnected + hH p (fun z hz => (hprop z hz).2.2) hrH hrA hkB (Metric.mem_ball_self hε) + let e : Space (Module.finrank ℂ R) ≃L[ℂ] R := + (ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm).symm + let q : Space (Module.finrank ℂ R) → F := fun z => H (e z,0) + let c := e.symm (g x) + have hcA : e c ∈ A := by simpa [c,A] using Metric.mem_ball_self hε (x := g x) + have hq : AnalyticAt ℂ q c := + AnalyticAt.comp (f := fun z => (e z,(0 : L.ker))) (x := c) + (hH (e c,0) ⟨hcA,Metric.mem_ball_self hε⟩) ((e.analyticAt c).prod analyticAt_const) + obtain ⟨δ,hδ,hδprop⟩ := Metric.mem_nhds_iff.mp + (hq.eventually_analyticAt.and (e.continuousAt (Metric.isOpen_ball.mem_nhds hcA))) + let P : Patch F := ⟨Module.finrank ℂ R,Metric.ball c δ,Metric.isOpen_ball, + (convex_ball c δ).isPreconnected,q,fun z hz => (hδprop hz).1⟩ + have hnear : ∀ᶠ y in 𝓝 x, e.symm (g y) ∈ Metric.ball c δ := + (e.symm.continuousAt.comp hg.continuousAt) (Metric.ball_mem_nhds c hδ) + have hknear : ∀ᶠ y in 𝓝 x, φ.rightFun y∈B := + hright.continuousAt (by simpa [φ,B] using Metric.ball_mem_nhds (0 : L.ker) hε) + obtain ⟨W,hW,hWo,hWx⟩ := eventually_nhds_iff.mp + (Filter.Eventually.and (hU.mem_nhds hx) (hnear.and (hknear.and φ.implicitFunction_apply_image))) + refine ⟨P,rfl,W,hWo,hWx,fun y hy => (hW y hy).1,?_⟩ + rintro _ ⟨y,hy,rfl⟩ + refine ⟨e.symm (g y),(hW y hy).2.1,?_⟩ + change H (e (e.symm (g y)),0)=f y + rw [e.apply_symm_apply] + have hgA : g y∈A := by + have hh := (hδprop (hW y hy).2.1).2 + simpa only [e.apply_symm_apply] using hh + rw [← hconst hgA (hW y hy).2.2.1] + change f (φ.implicitFunction (g y) (φ.rightFun y))=f y + exact congrArg f (hW y hy).2.2.2 + +end AnalyticZeroCover + +open Filter Topology Set +open scoped ContDiff + +open Filter Topology Set + +open scoped Manifold LinearAlgebra.Projectivization +open Bundle + +open Filter Topology + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle Filter Topology +namespace SplitTangent + + + +namespace FormalCauchy + +variable {V : Type*} [AddCommGroup V] [Module ℂ V] + +instance (U : Set ℂ) : CoeFun (AnalyticFunction U) (fun _ => ℂ → ℂ) := ⟨Subtype.val⟩ + +open scoped MvPowerSeries.WithPiTopology + +end FormalCauchy +end SplitTangent + +open Set Filter Topology + +open Filter Topology + +section FiniteBaseImport +open Polynomial +namespace SplitTangent.RationalSurface + +local instance : DecidableEq K := Classical.decEq K + +variable {ι : Type*} [Fintype ι] + +end SplitTangent.RationalSurface + +end FiniteBaseImport + +open Filter Topology + +open Filter Topology Metric Set + + + +open MvPowerSeries + +open Filter Topology Set Metric + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + + +lemma eventually_zero_of_all_derivatives {f : E → F} {x : E} + (hf : AnalyticAt ℂ f x) (h : ∀ n, iteratedFDeriv ℂ n f x = 0) : + f =ᶠ[𝓝 x] 0 := by + obtain ⟨p,r,hp⟩ := hf + filter_upwards [Metric.eball_mem_nhds x hp.r_pos] with y hy + have hh := hp.hasSum_iteratedFDeriv (y := y-x) (by simpa only [Metric.mem_eball, edist_dist, dist_eq_norm, sub_zero] using hy) + simp only [h, zero_apply, smul_zero, add_sub_cancel] at hh + exact hh.unique (hasSum_zero) + +lemma analyticAt_iterated {f : E → F} {x : E} (hf : AnalyticAt ℂ f x) (n : ℕ) : + AnalyticAt ℂ (iteratedFDeriv ℂ n f) x := + (show AnalyticOnNhd ℂ f {x} from fun _ hy => mem_singleton_iff.mp hy ▸ hf).iteratedFDeriv n x + (mem_singleton x) + + +def coeffDerivative {d : ℕ} (f : Space d → ℂ) (n : ℕ) (k : Fin n → Fin d) : + Space d → ℂ := fun x => iteratedFDeriv ℂ n f x (fun i => Pi.single (k i) 1) + +lemma coeffDerivative_analytic {d n : ℕ} {f : Space d → ℂ} {x : Space d} + (hf : AnalyticAt ℂ f x) (k : Fin n → Fin d) : + AnalyticAt ℂ (coeffDerivative f n k) x := by + exact ((ContinuousMultilinearMap.apply ℂ (fun _ : Fin n => Space d) ℂ + (fun i => Pi.single (k i) 1)).analyticAt _).comp (analyticAt_iterated hf n) + +lemma derivative_zero_of_coefficients {d n : ℕ} {f : Space d → ℂ} {x : Space d} + (h : ∀ k : Fin n → Fin d, coeffDerivative f n k x = 0) : + iteratedFDeriv ℂ n f x = 0 := by + apply ContinuousMultilinearMap.toMultilinearMap_injective + apply Module.Basis.ext_multilinear (fun _ : Fin n => Pi.basisFun ℂ (Fin d)) + intro k + simpa only [coeffDerivative,Pi.basisFun_apply,ContinuousMultilinearMap.coe_coe, + zero_apply] using h k + + + +theorem exists_regular_derivative {d : ℕ} {f : Space d → ℂ} {x : Space d} + (hf : AnalyticAt ℂ f x) (hx : f x=0) (hn : ¬ f =ᶠ[𝓝 x] 0) : + ∃ (n : ℕ) (k : Fin n → Fin d), coeffDerivative f n k x=0 ∧ + fderiv ℂ (coeffDerivative f n k) x ≠ 0 := by + classical + have he : ∃ n, iteratedFDeriv ℂ n f x ≠ 0 := by + by_contra! h + exact hn (eventually_zero_of_all_derivatives hf h) + let n := Nat.find he + have hn0 : n ≠ 0 := by + intro h + have hh := Nat.find_spec he + rw [show Nat.find he=0 from h] at hh + apply hh + ext v + simp [iteratedFDeriv_zero_apply,hx] + obtain ⟨m,hm⟩ := Nat.exists_eq_succ_of_ne_zero hn0 + have hm0 : iteratedFDeriv ℂ m f x=0 := by + by_contra hc + have := Nat.find_min' he hc + dsimp [n] at hm + omega + have hm1 : iteratedFDeriv ℂ (m+1) f x≠0 := by + have hh : iteratedFDeriv ℂ n f x ≠ 0 := Nat.find_spec he + rw [hm] at hh + exact hh + have hk : ∃ k : Fin (m+1) → Fin d, coeffDerivative f (m+1) k x ≠ 0 := by + by_contra! h + exact hm1 (derivative_zero_of_coefficients h) + obtain ⟨k,hk⟩ := hk + refine ⟨m,Fin.tail k,?_,?_⟩ + · simp [coeffDerivative,hm0] + · intro hz + apply hk + have hd := (analyticAt_iterated hf m).differentiableAt.iteratedFDeriv_succ_apply_left' + (m := fun i => Pi.single (k i) 1) + change iteratedFDeriv ℂ (m+1) f x (fun i => Pi.single (k i) 1)=0 + rw [hd] + change fderiv ℂ (coeffDerivative f m (Fin.tail k)) x (Pi.single (k 0) 1)=0 + rw [hz,zero_apply] + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover + +theorem regular_zero_patch {d : ℕ} {f : Space d → ℂ} {x : Space d} + {U : Set (Space d)} (hU : IsOpen U) (hxU : x ∈ U) + (hf : AnalyticAt ℂ f x) (hx : f x=0) (hd : fderiv ℂ f x ≠ 0) : + ∃ P : Patch (Space d), P.dim < d ∧ P.image ⊆ U ∩ {y | f y=0} ∧ + ∃ V : Set (Space d), IsOpen V ∧ x ∈ V ∧ + ∀ y ∈ V, f y=0 → y ∈ P.image := by + classical + let L := fderiv ℂ f x + have hL : L.toLinearMap ≠ 0 := by + intro hh + apply hd + ext v + exact congrArg (fun q : Space d →ₗ[ℂ] ℂ => q v) hh + have hr : L.range = ⊤ := Module.Dual.range_eq_top_of_ne_zero hL + have hk := L.ker_closedComplemented_of_finiteDimensional_range + let φ := HasStrictFDerivAt.implicitFunctionDataOfComplemented f L + ((hf.contDiffAt (n := ω)).hasStrictFDerivAt (by simp)) hr hk + let m := Module.finrank ℂ L.ker + let e : Space m ≃L[ℂ] L.ker := + (ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm).symm + have hm : m < d := by + have hh := Module.Dual.finrank_ker_add_one_of_ne_zero hL + have hh' : m + 1 = d := by simpa only [Space,Module.finrank_fin_fun] using hh + omega + have hright : AnalyticAt ℂ φ.rightFun x := by + exact ((Classical.choose hk).analyticAt _).comp (analyticAt_id.sub analyticAt_const) + have hφ : AnalyticAt ℂ φ.implicitFunction.uncurry (φ.prodFun φ.pt) := + (φ.contDiffAt_implicitFunction hf.contDiffAt hright.contDiffAt (by simp)).analyticAt + have hbase : φ.prodFun φ.pt = (0,0) := by + ext <;> simp [φ,ImplicitFunctionData.prodFun,hx] + have hval : φ.implicitFunction 0 0 = x := by + have hh := mem_of_mem_nhds φ.implicitFunction_apply_image + simpa [φ,hx] using hh + let g : Space m → Space d := fun z => φ.implicitFunction 0 (e z) + have hg : AnalyticAt ℂ g 0 := by + have hh : AnalyticAt ℂ φ.implicitFunction.uncurry (0,e 0) := by + simpa only [hbase,map_zero] using hφ + exact AnalyticAt.comp (f := fun z : Space m => (0,e z)) (x := 0) hh + (analyticAt_const.prod (e.analyticAt 0)) + have hg0 : g 0=x := by simpa [g] using hval + have hfg : ∀ᶠ z in 𝓝 (0 : Space m), f (g z)=0 := by + have ht : Tendsto (fun z : Space m => (0,e z)) (𝓝 0) (𝓝 (φ.prodFun φ.pt)) := by + rw [hbase] + simpa using (continuous_const.prodMk e.continuous).continuousAt.tendsto (x := 0) + exact ht.eventually φ.leftFun_implicitFunction + have hgU : ∀ᶠ z in 𝓝 (0 : Space m), g z∈U := + hg.continuousAt (hg0 ▸ hU.mem_nhds hxU) + obtain ⟨r,hr,hrW⟩ := Metric.mem_nhds_iff.mp + (hg.eventually_analyticAt.and (hgU.and hfg)) + let W := Metric.ball (0 : Space m) r + have hWo : IsOpen W := Metric.isOpen_ball + have hW0 : (0 : Space m)∈W := Metric.mem_ball_self hr + have hWh : ∀ z∈W, AnalyticAt ℂ g z ∧ g z∈U ∧ f (g z)=0 := hrW + let P : Patch (Space d) := ⟨m,W,hWo,(convex_ball (0 : Space m) r).isPreconnected, + g,fun z hz => (hWh z hz).1⟩ + refine ⟨P,hm,?_,?_⟩ + · rintro y ⟨z,hz,rfl⟩ + exact (hWh z hz).2 + · have hψ : ContinuousAt (fun y => e.symm (φ.rightFun y)) x := + e.symm.continuousAt.comp hright.continuousAt + have hψ0 : e.symm (φ.rightFun x)=0 := by simp [φ] + have hψW : ∀ᶠ y in 𝓝 x, e.symm (φ.rightFun y)∈W := + hψ (by simpa only [hψ0] using hWo.mem_nhds hW0) + obtain ⟨V,hV,hVo,hVx⟩ := _root_.eventually_nhds_iff.mp + (hψW.and φ.implicitFunction_apply_image) + refine ⟨V,hVo,hVx,fun y hy hfy => ?_⟩ + refine ⟨e.symm (φ.rightFun y),(hV y hy).1,?_⟩ + change φ.implicitFunction 0 (e (e.symm (φ.rightFun y)))=y + rw [e.apply_symm_apply] + have hh := (hV y hy).2 + simpa only [show φ.leftFun y=f y from rfl,hfy] using hh + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover + + +theorem countable_regular_zero_cover {d : ℕ} {f : Space d → ℂ} + {U : Set (Space d)} (hU : IsOpen U) (hf : AnalyticOnNhd ℂ f U) : + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P ∈ C, P.dim < d ∧ P.image ⊆ U) ∧ + {x | x∈U ∧ f x=0 ∧ fderiv ℂ f x≠0} ⊆ ⋃ P∈C,P.image := by + classical + let A := {x | x∈U ∧ f x=0 ∧ fderiv ℂ f x≠0} + have hlocal (x : A) := regular_zero_patch hU x.property.1 + (hf x x.property.1) x.property.2.1 x.property.2.2 + choose P hdim himg V hVo hVx hVcover using hlocal + have hcover : A ⊆ ⋃ x : A,V x := by + intro x hx + exact mem_iUnion.mpr ⟨⟨x,hx⟩,hVx ⟨x,hx⟩⟩ + obtain ⟨D,hD,hDA⟩ := (HereditarilyLindelofSpace.isLindelof A).elim_countable_subcover V hVo hcover + refine ⟨P '' D,hD.image P,?_,?_⟩ + · rintro _ ⟨x,hx,rfl⟩ + exact ⟨hdim x,fun y hy => (himg x hy).1⟩ + · intro y hy + obtain ⟨x,hx,hyV⟩ := mem_iUnion₂.mp (hDA hy) + exact mem_iUnion₂.mpr ⟨P x,mem_image_of_mem P hx,hVcover x y hyV hy.2.1⟩ + + + +theorem countable_zero_cover {d : ℕ} {f : Space d → ℂ} + {U : Set (Space d)} (hU : IsOpen U) (hf : AnalyticOnNhd ℂ f U) + (hn : ∀ x∈U, f x=0 → ¬ f =ᶠ[𝓝 x] 0) : + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P ∈ C, P.dim < d ∧ P.image ⊆ U) ∧ + {x | x∈U ∧ f x=0} ⊆ ⋃ P∈C,P.image := by + classical + let I := Σ n : ℕ, Fin n → Fin d + have hlocal (i : I) := countable_regular_zero_cover hU + (fun x hx => coeffDerivative_analytic (hf x hx) i.2) + choose C hC hdim hcover using hlocal + refine ⟨⋃ i,C i,Set.countable_iUnion hC,?_,?_⟩ + · intro P hP + obtain ⟨i,hi⟩ := mem_iUnion.mp hP + exact hdim i P hi + · intro x hx + obtain ⟨n,k,hk0,hk1⟩ := exists_regular_derivative (hf x hx.1) hx.2 (hn x hx.1 hx.2) + obtain ⟨P,hP,hxP⟩ := mem_iUnion₂.mp (hcover ⟨n,k⟩ ⟨hx.1,hk0,hk1⟩) + exact mem_iUnion₂.mpr ⟨P,mem_iUnion.mpr ⟨⟨n,k⟩,hP⟩,hxP⟩ + + +theorem countable_zero_cover_of_nonzero {d : ℕ} {f : Space d → ℂ} + {U : Set (Space d)} (hU : IsOpen U) (hconn : IsPreconnected U) + (hf : AnalyticOnNhd ℂ f U) (hne : ∃ x∈U, f x≠0) : + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P ∈ C, P.dim < d ∧ P.image ⊆ U) ∧ + {x | x∈U ∧ f x=0} ⊆ ⋃ P∈C,P.image := by + apply countable_zero_cover hU hf + intro x hx _ he + obtain ⟨y,hy,hy0⟩ := hne + exact hy0 (hf.eqOn_zero_of_preconnected_of_eventuallyEq_zero hconn hx he hy) + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover + + + +structure AnalyticSetOn {d : ℕ} (U A : Set (Space d)) : Prop where + subset : A ⊆ U + closed : closure A ∩ U ⊆ A + local_equations : ∀ x∈A, ∃ V : Set (Space d), IsOpen V ∧ x∈V ∧ V ⊆ U ∧ + ∃ F : Set (Space d → ℂ), (∀ f∈F, AnalyticOnNhd ℂ f V) ∧ + ∀ y∈V, y∈A ↔ ∀ f∈F, f y=0 + + +lemma AnalyticSetOn.closure_interior {d : ℕ} {U A : Set (Space d)} + (h : AnalyticSetOn U A) : closure (interior A) ∩ U ⊆ interior A := by + intro x hx + have hxA : x∈A := h.closed ⟨closure_mono interior_subset hx.1,hx.2⟩ + obtain ⟨V,hVo,hVx,hVU,F,hF,hEq⟩ := h.local_equations x hxA + obtain ⟨r,hr,hBV⟩ := Metric.isOpen_iff.mp hVo x hVx + let B := Metric.ball x r + have hBx : x∈B := Metric.mem_ball_self hr + obtain ⟨y,hyB,hyA⟩ := mem_closure_iff.mp hx.1 B Metric.isOpen_ball hBx + have hBA : B ⊆ A := by + intro z hz + apply (hEq z (hBV hz)).mpr + intro f hf + have hfe : f =ᶠ[𝓝 y] 0 := by + filter_upwards [isOpen_interior.mem_nhds hyA, Metric.isOpen_ball.mem_nhds hyB] + with w hwA hwB + exact (hEq w (hBV hwB)).mp (interior_subset hwA) f hf + exact (hF f hf).mono hBV |>.eqOn_zero_of_preconnected_of_eventuallyEq_zero + (convex_ball x r).isPreconnected hyB hfe hz + exact mem_interior_iff_mem_nhds.mpr (Filter.mem_of_superset + (Metric.isOpen_ball.mem_nhds hBx) hBA) + + +theorem AnalyticSetOn.interior_eq_empty {d : ℕ} {U A : Set (Space d)} + (h : AnalyticSetOn U A) (hconn : IsPreconnected U) (hne : ∃ x∈U, x∉A) : + interior A = ∅ := by + apply Set.eq_empty_iff_forall_notMem.mpr + intro x hx + have hU : U ⊆ interior A := hconn.subset_of_closure_inter_subset isOpen_interior + ⟨x,h.subset (interior_subset hx),hx⟩ h.closure_interior + obtain ⟨y,hy,hyA⟩ := hne + exact hyA (interior_subset (hU hy)) + + + +lemma AnalyticSetOn.local_cover {d : ℕ} {U A : Set (Space d)} + (h : AnalyticSetOn U A) (hconn : IsPreconnected U) (hne : ∃ x∈U, x∉A) + {x : Space d} (hx : x∈A) : + ∃ B : Set (Space d), IsOpen B ∧ x∈B ∧ + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P∈C, P.dim < d ∧ P.image ⊆ U) ∧ A ∩ B ⊆ ⋃ P∈C,P.image := by + classical + obtain ⟨V,hVo,hVx,hVU,F,hF,hEq⟩ := h.local_equations x hx + obtain ⟨r,hr,hBV⟩ := Metric.isOpen_iff.mp hVo x hVx + let B := Metric.ball x r + have hBx : x∈B := Metric.mem_ball_self hr + have he : ∃ f∈F, ∃ y∈B, f y≠0 := by + by_contra! he + have hBA : B ⊆ A := fun y hy => (hEq y (hBV hy)).mpr (fun f hf => he f hf y hy) + have hi : x∈interior A := mem_interior_iff_mem_nhds.mpr + (Filter.mem_of_superset (Metric.isOpen_ball.mem_nhds hBx) hBA) + rw [h.interior_eq_empty hconn hne] at hi + exact hi + obtain ⟨f,hf,y,hy,hy0⟩ := he + obtain ⟨C,hC,hP,hcover⟩ := countable_zero_cover_of_nonzero Metric.isOpen_ball + (convex_ball x r).isPreconnected ((hF f hf).mono hBV) ⟨y,hy,hy0⟩ + refine ⟨B,Metric.isOpen_ball,hBx,C,hC,?_,?_⟩ + · intro P hPC + exact ⟨(hP P hPC).1,((hP P hPC).2.trans hBV).trans hVU⟩ + · intro z hz + exact hcover ⟨hz.2,(hEq z (hBV hz.2)).mp hz.1 f hf⟩ + + + +theorem AnalyticSetOn.countable_lower_cover {d : ℕ} {U A : Set (Space d)} + (h : AnalyticSetOn U A) (hconn : IsPreconnected U) (hne : ∃ x∈U, x∉A) : + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P∈C, P.dim < d ∧ P.image ⊆ U) ∧ A ⊆ ⋃ P∈C,P.image := by + classical + have hlocal (x : A) := h.local_cover hconn hne x.property + choose B hBo hBx C hC hdim hcover using hlocal + have hAB : A ⊆ ⋃ x:A,B x := fun x hx => mem_iUnion.mpr ⟨⟨x,hx⟩,hBx ⟨x,hx⟩⟩ + obtain ⟨D,hD,hDA⟩ := (HereditarilyLindelofSpace.isLindelof A).elim_countable_subcover B hBo hAB + refine ⟨⋃ x∈D,C x,hD.biUnion (fun x _ => hC x),?_,?_⟩ + · intro P hP + obtain ⟨x,hx,hPC⟩ := mem_iUnion₂.mp hP + exact hdim x P hPC + · intro z hz + obtain ⟨x,hx,hzB⟩ := mem_iUnion₂.mp (hDA hz) + obtain ⟨P,hPC,hzP⟩ := mem_iUnion₂.mp (hcover x ⟨hz,hzB⟩) + exact mem_iUnion₂.mpr ⟨P, mem_iUnion₂.mpr ⟨x,hx,hPC⟩,hzP⟩ + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + +def Patch.comp (P : Patch E) (Q : Patch (Space P.dim)) (h : Q.image ⊆ P.domain) : Patch E where + dim := Q.dim + domain := Q.domain + isOpen_domain := Q.isOpen_domain + preconnected_domain := Q.preconnected_domain + map := P.map ∘ Q.map + analytic z hz := (P.analytic _ (h ⟨z,hz,rfl⟩)).comp (Q.analytic z hz) + +omit [CompleteSpace E] in +lemma Patch.comp_image_subset (P : Patch E) (Q : Patch (Space P.dim)) (h : Q.image⊆P.domain) : + (P.comp Q h).image ⊆ P.image := by + rintro _ ⟨z,hz,rfl⟩ + exact ⟨Q.map z,h ⟨z,hz,rfl⟩,rfl⟩ + + + +omit [CompleteSpace E] in +theorem Patch.countable_accepted_cover {M A : Set E} + (test : ∀ P : Patch E, P.image ⊆ M → ¬ P.image ⊆ A → + ∃ B : Set (Space P.dim), AnalyticSetOn P.domain B ∧ + (∃ x∈P.domain, x∉B) ∧ {x | x∈P.domain ∧ P.map x∈A} ⊆ B) + (P : Patch E) (hPM : P.image ⊆ M) : + ∃ C : Set (Patch E), C.Countable ∧ + (∀ Q∈C, Q.dim ≤ P.dim ∧ Q.image ⊆ M ∩ A) ∧ + P.image ∩ A ⊆ ⋃ Q∈C, Q.image := by + classical + generalize hd : P.dim = n + induction n using Nat.strong_induction_on generalizing P with + | h n ih => + by_cases hPA : P.image ⊆ A + · refine ⟨{P},countable_singleton P,?_,?_⟩ + · intro Q hQ + obtain rfl := mem_singleton_iff.mp hQ + exact ⟨hd.le,fun y hy => ⟨hPM hy,hPA hy⟩⟩ + · intro y hy + exact mem_iUnion₂.mpr ⟨P,mem_singleton P,hy.1⟩ + · obtain ⟨B,hB,hproper,hAB⟩ := test P hPM hPA + obtain ⟨D,hD,hDdim,hcover⟩ := hB.countable_lower_cover P.preconnected_domain hproper + have hrec (i : D) : ∃ C : Set (Patch E), C.Countable ∧ + (∀ Q∈C, Q.dim ≤ (P.comp i.val (hDdim i.val i.property).2).dim ∧ + Q.image ⊆ M ∩ A) ∧ + (P.comp i.val (hDdim i.val i.property).2).image ∩ A ⊆ ⋃ Q∈C,Q.image := by + apply ih i.val.dim (by simpa only [← hd] using (hDdim i.val i.property).1) + (P.comp i.val (hDdim i.val i.property).2) + ((P.comp_image_subset i.val (hDdim i.val i.property).2).trans hPM) rfl + choose C hC hdim hCc using hrec + let : Countable D := hD.to_subtype + refine ⟨⋃ i,C i,Set.countable_iUnion hC,?_,?_⟩ + · intro Q hQ + obtain ⟨i,hi⟩ := mem_iUnion.mp hQ + exact ⟨(hdim i Q hi).1.trans ((le_of_lt (hDdim i.val i.property).1).trans hd.le),(hdim i Q hi).2⟩ + · rintro y ⟨⟨x,hx,rfl⟩,hxy⟩ + obtain ⟨Q,hQ,hxQ⟩ := mem_iUnion₂.mp (hcover (hAB ⟨hx,hxy⟩)) + obtain ⟨z,hz,hzx⟩ := hxQ + have hyP : P.map x∈(P.comp Q (hDdim Q hQ).2).image := by + refine ⟨z,hz,?_⟩ + change P.map (Q.map z)=P.map x + rw [hzx] + obtain ⟨R,hR,hyR⟩ := mem_iUnion₂.mp (hCc ⟨Q,hQ⟩ ⟨hyP,hxy⟩) + exact mem_iUnion₂.mpr ⟨R,mem_iUnion.mpr ⟨⟨Q,hQ⟩,hR⟩,hyR⟩ + + + +theorem countable_open_patches {d : ℕ} {U : Set (Space d)} (hU : IsOpen U) : + ∃ C : Set (Patch (Space d)), C.Countable ∧ + (∀ P∈C, P.dim=d ∧ P.image ⊆ U) ∧ U ⊆ ⋃ P∈C,P.image := by + classical + have hball (x : U) : ∃ r : ℝ, 0 + ⟨d,Metric.ball (x : Space d) (r x),Metric.isOpen_ball, + (convex_ball (x : Space d) (r x)).isPreconnected,id,fun _ _ => analyticAt_id⟩ + obtain ⟨D,hD,hDU⟩ := (HereditarilyLindelofSpace.isLindelof U).elim_countable_subcover + (fun x : U => Metric.ball (x : Space d) (r x)) (fun _ => Metric.isOpen_ball) + (fun x hx => mem_iUnion.mpr ⟨⟨x,hx⟩,Metric.mem_ball_self (hr ⟨x,hx⟩)⟩) + refine ⟨P '' D,hD.image P,?_,?_⟩ + · rintro _ ⟨x,hx,rfl⟩ + refine ⟨rfl,?_⟩ + rintro y ⟨z,hz,rfl⟩ + exact hsub x hz + · intro z hz + obtain ⟨x,hx,hzx⟩ := mem_iUnion₂.mp (hDU hz) + exact mem_iUnion₂.mpr ⟨P x,mem_image_of_mem P hx,⟨z,hzx,rfl⟩⟩ + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + +namespace SplitTangent.RationalParameters +open AnalyticZeroCover + +abbrev Coeff (N d : ℕ) := Space ((N+1)*(d+1)) + + +def ev {N d : ℕ} (b : Bool) (τ : Coeff N d) (z : ℂ) : Fin (N+1) → ℂ := + fun i => ∑ k : Fin (d+1), τ (finProdFinEquiv (i,k)) * z ^ (if b then d-k.val else k.val) + +lemma ev_analytic {N d : ℕ} (b : Bool) (a : ℂ × Coeff N d) : + AnalyticAt ℂ (fun z : ℂ × Coeff N d => ev b z.2 z.1) a := by + apply analyticAt_pi_iff.mpr + intro i + apply Finset.analyticAt_fun_sum + intro k hk + exact (((ContinuousLinearMap.proj (finProdFinEquiv (i,k)) : Coeff N d →L[ℂ] ℂ).analyticAt _).comp + analyticAt_snd).mul (analyticAt_fst.pow _) + +lemma ev_continuous {N d : ℕ} (b : Bool) : + Continuous (fun z : ℂ × Coeff N d => ev b z.2 z.1) := + continuous_iff_continuousAt.mpr (fun a => (ev_analytic b a).continuousAt) + +lemma ev_transition {N d : ℕ} (τ : Coeff N d) {z : ℂ} (hz : z≠0) : + ev false τ z = z^d • ev true τ z⁻¹ := by + ext i + simp only [ev,Bool.false_eq_true,↓reduceIte,Pi.smul_apply,smul_eq_mul,Finset.mul_sum] + apply Finset.sum_congr rfl + intro k hk + have hk : k.val≤d := Nat.le_of_lt_succ k.isLt + rw [inv_pow,← mul_assoc, mul_comm (z^d) (τ _),mul_assoc] + congr 1 + rw [← div_eq_mul_inv,eq_div_iff (pow_ne_zero _ hz)] + rw [← pow_add,Nat.add_sub_of_le hk] + + +def regular (N d : ℕ) : Set (Coeff N d) := + {τ | ∀ b : Bool, ∀ z∈Metric.closedBall (0 : ℂ) 1, ev b τ z≠0} + +lemma isOpen_regular (N d : ℕ) : IsOpen (regular N d) := by + let K := Metric.closedBall (0 : ℂ) 1 + let : CompactSpace K := isCompact_iff_compactSpace.mp (isCompact_closedBall (0 : ℂ) 1) + have h (b : Bool) : IsOpen {τ : Coeff N d | ∀ z : K, ev b τ z≠0} := by + have hc : IsClosed {z : K × Coeff N d | ev b z.2 z.1=0} := + isClosed_eq ((ev_continuous b).comp (continuous_subtype_val.comp continuous_fst |>.prodMk continuous_snd)) + continuous_const + have hp := isClosedMap_snd_of_compactSpace _ hc + convert hp.isOpen_compl using 1 + ext τ + simp + convert isOpen_iInter_of_finite h using 1 + ext τ + simp [regular,K] + +lemma regular_nonzero {N d : ℕ} {τ : Coeff N d} (hτ : τ∈regular N d) + (b : Bool) (z : ℂ) : ev b τ z≠0 := by + by_cases hz : ‖z‖≤1 + · exact hτ b z (by simpa using hz) + · have hz0 : z≠0 := by intro h; simp [h] at hz + have hzi : z⁻¹∈Metric.closedBall (0 : ℂ) 1 := by + simp only [Metric.mem_closedBall,dist_zero_right,norm_inv] + exact (inv_le_one₀ (norm_pos_iff.mpr hz0)).mpr (le_of_lt (lt_of_not_ge hz)) + cases b + · rw [ev_transition τ hz0] + exact smul_ne_zero (pow_ne_zero _ hz0) (hτ true z⁻¹ hzi) + · intro he + have htrans := ev_transition τ (inv_ne_zero hz0) + simp only [inv_inv,he,smul_zero] at htrans + exact hτ false z⁻¹ hzi htrans + + +def accepted {X : ComplexManifold} (e : ProjectiveEmbedding X) (d : ℕ) : Set (Coeff e.N d) := + {τ | ∀ b : Bool, ∀ z : ℂ, ∃ x, e.Incidence x (ev b τ z)} + + +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) [CompactSpace X.Carrier] +variable (x₀ : X.Carrier) {d : ℕ} (P : Patch (Coeff e.N d)) +variable (hP : P.image ⊆ regular e.N d ∩ accepted e d) + + +def evaluation (b : Bool) (w : ℂ × Space P.dim) : X.Carrier := + e.coneLift x₀ (ev b (P.map w.2) w.1) + +include hP in +lemma evaluation_holomorphicAt (b : Bool) {w : ℂ × Space P.dim} (hw : w.2∈P.domain) : + ContMDiffAt 𝓘(ℂ,ℂ × Space P.dim) (ModelWithCorners X) ω (evaluation e x₀ P b) w := by + apply e.holomorphic_of_incidence + (AnalyticAt.comp (f := fun y : ℂ × Space P.dim => (y.1,P.map y.2)) (ev_analytic b (w.1,P.map w.2)) + (analyticAt_fst.prod ((P.analytic w.2 hw).comp analyticAt_snd))) + (regular_nonzero (hP ⟨w.2,hw,rfl⟩).1 b w.1) + have hv : ∀ᶠ y : ℂ × Space P.dim in 𝓝 w, y.2∈P.domain := + continuous_snd.continuousAt.eventually (P.isOpen_domain.mem_nhds hw) + exact hv.mono (fun y hy => e.coneLift_incidence x₀ ((hP ⟨y.2,hy,rfl⟩).2 b y.1)) + +include hP in +omit [CompactSpace X.Carrier] in +lemma evaluation_overlap (z : ℂ) (hz : z≠0) {τ : Space P.dim} (hτ : τ∈P.domain) : + evaluation e x₀ P false (z,τ) = evaluation e x₀ P true (z⁻¹,τ) := by + dsimp only [evaluation] + rw [ev_transition _ hz,e.coneLift_smul x₀ (pow_ne_zero d hz) ((hP ⟨τ,hτ,rfl⟩).2 true z⁻¹)] + +def pairEvaluation (τ : Space P.dim) : X.Carrier × X.Carrier := + (evaluation e x₀ P false (0,τ),evaluation e x₀ P false (1,τ)) + +include hP in +lemma pairEvaluation_holomorphicAt {τ : Space P.dim} (hτ : τ∈P.domain) : + ContMDiffAt 𝓘(ℂ,Space P.dim) ((ModelWithCorners X).prod (ModelWithCorners X)) ω + (pairEvaluation e x₀ P) τ := by + apply ContMDiffAt.prodMk + · exact (evaluation_holomorphicAt e x₀ P hP false hτ).comp τ + (contMDiffAt_const.prodMk_space contMDiffAt_id) + · exact (evaluation_holomorphicAt e x₀ P hP false hτ).comp τ + (contMDiffAt_const.prodMk_space contMDiffAt_id) + + + +def family {W : Set (Space P.dim)} (hW : IsOpen W) (hne : W.Nonempty) (hWP : W⊆P.domain) : + RationalFamily X (OpenManifold.manifold.{u} W hW hne) where + finite p := evaluation e x₀ P false (p.1,OpenManifold.val W p.2) + infinity p := evaluation e x₀ P true (p.1,OpenManifold.val W p.2) + finite_holomorphic := by + intro p + exact (evaluation_holomorphicAt e x₀ P hP false (hWP p.2.down.property)).comp p + (contMDiffAt_fst.prodMk_space ((OpenManifold.val_holomorphic W hW hne).contMDiffAt.comp p contMDiffAt_snd)) + infinity_holomorphic := by + intro p + exact (evaluation_holomorphicAt e x₀ P hP true (hWP p.2.down.property)).comp p + (contMDiffAt_fst.prodMk_space ((OpenManifold.val_holomorphic W hW hne).contMDiffAt.comp p contMDiffAt_snd)) + overlap z hz τ := evaluation_overlap e x₀ P hP z hz (hWP τ.down.property) + +end SplitTangent.RationalParameters + + + +open Set Filter Topology +open scoped ContDiff Manifold + +namespace SplitTangent.RationalParameters +open AnalyticZeroCover + +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) [CompactSpace X.Carrier] + + + +lemma analyticSetOn_incidence {m : ℕ} {U : Set (Space m)} (hU : IsOpen U) + {Q : Space m → Fin (e.N+1) → ℂ} (hQ : AnalyticOnNhd ℂ Q U) + (hnz : ∀ z∈U, Q z≠0) : + AnalyticSetOn U {z | z∈U ∧ ∃ x, e.Incidence x (Q z)} where + subset := fun _ h => h.1 + closed := by + intro z hz + refine ⟨hz.2,?_⟩ + change Q z ∈ {v | ∃ x, e.Incidence x v} + rw [← e.isClosed_cone.closure_eq] + exact (closure_mono (show Q '' {z | z∈U ∧ ∃ x, e.Incidence x (Q z)} ⊆ + {v | ∃ x, e.Incidence x v} from by rintro _ ⟨y,hy,rfl⟩; exact hy.2) + (mem_closure_image (hQ z hz.2).continuousAt hz.1)) + local_equations := by + intro z hz + obtain ⟨D,hD,hDeq⟩ := e.cone_local_equations_any (hnz z hz.1) + have hcomp : AnalyticAt ℂ (D ∘ Q) z := hD.comp (hQ z hz.1) + have heq := (hQ z hz.1).continuousAt.eventually hDeq + obtain ⟨V,hV,hVo,hVz⟩ := _root_.eventually_nhds_iff.mp + (Filter.Eventually.and (hU.mem_nhds hz.1) (hcomp.eventually_analyticAt.and heq)) + let f : Fin (e.N+1) → Space m → ℂ := fun i y => D (Q y) i + refine ⟨V,hVo,hVz,fun y hy => (hV y hy).1,Set.range f,?_,?_⟩ + · rintro g ⟨i,rfl⟩ y hy + exact ((ContinuousLinearMap.proj i).analyticAt _).comp (hV y hy).2.1 + · intro y hy + simp only [mem_ofPred_eq,forall_mem_range] + have hyU : y∈U := (hV y hy).1 + simp only [hyU,true_and] + rw [(hV y hy).2.2] + exact ⟨fun h i => congrFun h i,fun h => funext h⟩ + +end SplitTangent.RationalParameters + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff + + + + +open Set Filter Topology +open scoped ContDiff + +namespace AnalyticZeroCover +variable {E F R K : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [NormedAddCommGroup R] [NormedSpace ℂ R] + [NormedAddCommGroup K] [NormedSpace ℂ K] + [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] + [FiniteDimensional ℂ R] [FiniteDimensional ℂ K] + +theorem local_image_patch {f : E → F} {U : Set E} {x : E} + (hU : IsOpen U) (hx : x∈U) (hf : AnalyticOnNhd ℂ f U) + (p : F →L[ℂ] R) (hs : Function.Surjective (p.comp (fderiv ℂ f x))) + (hr : ∀ y∈U, Module.finrank ℂ (fderiv ℂ f y).range ≤ Module.finrank ℂ R) : + ∃ P : Patch F, P.dim=Module.finrank ℂ R ∧ + ∃ W : Set E, IsOpen W ∧ x∈W ∧ W⊆U ∧ f '' W ⊆ P.image := by + classical + let g : E → R := fun y => p (f y) + let L := p.comp (fderiv ℂ f x) + have hg : AnalyticAt ℂ g x := (p.analyticAt _).comp (hf x hx) + have hgD : HasStrictFDerivAt g L x := + p.hasStrictFDerivAt.comp x (((hf x hx).contDiffAt (n := ω)).hasStrictFDerivAt (by simp)) + have hL : L.range=⊤ := LinearMap.range_eq_top.mpr hs + have hK := L.ker_closedComplemented_of_finiteDimensional_range + let φ := HasStrictFDerivAt.implicitFunctionDataOfComplemented g L hgD hL hK + have hright : AnalyticAt ℂ φ.rightFun x := + ((Classical.choose hK).analyticAt _).comp (analyticAt_id.sub analyticAt_const) + have hφ : AnalyticAt ℂ φ.implicitFunction.uncurry (φ.prodFun φ.pt) := + (φ.contDiffAt_implicitFunction hg.contDiffAt hright.contDiffAt (by simp)).analyticAt + have hbase : φ.prodFun φ.pt=(g x,0) := by + ext <;> simp [φ,ImplicitFunctionData.prodFun] + have hval : φ.implicitFunction (g x) 0=x := by + have hh := mem_of_mem_nhds φ.implicitFunction_apply_image + simpa [φ] using hh + have hφ' : AnalyticAt ℂ φ.implicitFunction.uncurry (g x,0) := hbase ▸ hφ + have hφU : ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), φ.implicitFunction.uncurry z∈U := + hφ'.continuousAt (by simpa only [Function.uncurry_apply_pair,hval] using hU.mem_nhds hx) + have hφp : ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), p (f (φ.implicitFunction.uncurry z))=z.1 := by + change ∀ᶠ z in 𝓝 (g x,(0 : L.ker)), φ.leftFun (φ.implicitFunction z.1 z.2)=z.1 + rw [← hbase] + exact φ.leftFun_implicitFunction + obtain ⟨ε,hε,hεprop⟩ := Metric.mem_nhds_iff.mp + (hφ'.eventually_analyticAt.and (hφU.and hφp)) + let A := Metric.ball (g x) ε + let B := Metric.ball (0 : L.ker) ε + have hAB : A ×ˢ B = Metric.ball (g x,(0 : L.ker)) ε := by + ext z + simp only [A,B,mem_prod,Metric.mem_ball,Prod.dist_eq,max_lt_iff] + let H : R × L.ker → F := f ∘ φ.implicitFunction.uncurry + have hprop (z : R × L.ker) (hz : z∈A ×ˢ B) : + AnalyticAt ℂ φ.implicitFunction.uncurry z ∧ + φ.implicitFunction.uncurry z∈U ∧ p (H z)=z.1 := hεprop (hAB ▸ hz) + have hH : AnalyticOnNhd ℂ H (A ×ˢ B) := fun z hz => + (hf _ (hprop z hz).2.1).comp (hprop z hz).1 + have hrH : ∀ z∈A ×ˢ B, Module.finrank ℂ (fderiv ℂ H z).range ≤ Module.finrank ℂ R := by + intro z hz + rw [fderiv_comp z (hf _ (hprop z hz).2.1).differentiableAt (hprop z hz).1.differentiableAt] + exact (finrank_range_comp_le _ _).trans (hr _ (hprop z hz).2.1) + have hconst {r : R} (hrA : r∈A) {k : L.ker} (hkB : k∈B) : H (r,k)=H (r,0) := + constant_vertical Metric.isOpen_ball Metric.isOpen_ball (convex_ball (0 : L.ker) ε).isPreconnected + hH p (fun z hz => (hprop z hz).2.2) hrH hrA hkB (Metric.mem_ball_self hε) + let e : Space (Module.finrank ℂ R) ≃L[ℂ] R := + (ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm).symm + let q : Space (Module.finrank ℂ R) → F := fun z => H (e z,0) + let c := e.symm (g x) + have hcA : e c ∈ A := by simpa [c,A] using Metric.mem_ball_self hε (x := g x) + have hq : AnalyticAt ℂ q c := + AnalyticAt.comp (f := fun z => (e z,(0 : L.ker))) (x := c) + (hH (e c,0) ⟨hcA,Metric.mem_ball_self hε⟩) ((e.analyticAt c).prod analyticAt_const) + obtain ⟨δ,hδ,hδprop⟩ := Metric.mem_nhds_iff.mp + (hq.eventually_analyticAt.and (e.continuousAt (Metric.isOpen_ball.mem_nhds hcA))) + let P : Patch F := ⟨Module.finrank ℂ R,Metric.ball c δ,Metric.isOpen_ball, + (convex_ball c δ).isPreconnected,q,fun z hz => (hδprop hz).1⟩ + have hnear : ∀ᶠ y in 𝓝 x, e.symm (g y) ∈ Metric.ball c δ := + (e.symm.continuousAt.comp hg.continuousAt) (Metric.ball_mem_nhds c hδ) + have hknear : ∀ᶠ y in 𝓝 x, φ.rightFun y∈B := + hright.continuousAt (by simpa [φ,B] using Metric.ball_mem_nhds (0 : L.ker) hε) + obtain ⟨W,hW,hWo,hWx⟩ := _root_.eventually_nhds_iff.mp + (Filter.Eventually.and (hU.mem_nhds hx) (hnear.and (hknear.and φ.implicitFunction_apply_image))) + refine ⟨P,rfl,W,hWo,hWx,fun y hy => (hW y hy).1,?_⟩ + rintro _ ⟨y,hy,rfl⟩ + refine ⟨e.symm (g y),(hW y hy).2.1,?_⟩ + change H (e (e.symm (g y)),0)=f y + rw [e.apply_symm_apply] + have hgA : g y∈A := by + have hh := (hδprop (hW y hy).2.1).2 + simpa only [e.apply_symm_apply] using hh + rw [← hconst hgA (hW y hy).2.2.1] + change f (φ.implicitFunction (g y) (φ.rightFun y))=f y + exact congrArg f (hW y hy).2.2.2 + +end AnalyticZeroCover + + + + +open Set Filter Topology +open scoped ContDiff +namespace AnalyticZeroCover + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] + + +def pivot {r : ℕ} (f : E → F) (p : F →L[ℂ] Space r) (s : Space r →L[ℂ] E) (x : E) : ℂ := + LinearMap.det ((p.comp (fderiv ℂ f x)).comp s).toLinearMap + +omit [FiniteDimensional ℂ E] in +lemma pivot_analytic {r : ℕ} {f : E → F} {x : E} (hf : AnalyticAt ℂ f x) + (p : F →L[ℂ] Space r) (s : Space r →L[ℂ] E) : AnalyticAt ℂ (pivot f p s) x := by + classical + have hentry (i j : Fin r) : AnalyticAt ℂ + (fun y => p (fderiv ℂ f y (s (Pi.single j 1))) i) x := + ((ContinuousLinearMap.proj i).analyticAt _).comp ((p.analyticAt _).comp + (((ContinuousLinearMap.apply ℂ F (s (Pi.single j 1))).analyticAt _).comp hf.fderiv)) + change AnalyticAt ℂ (fun y => LinearMap.det ((p.comp (fderiv ℂ f y)).comp s).toLinearMap) x + simp only [← LinearMap.det_toMatrix',Matrix.det_apply',LinearMap.toMatrix'_apply, + ContinuousLinearMap.coe_coe,ContinuousLinearMap.comp_apply] + apply Finset.analyticAt_fun_sum + intro σ hσ + apply AnalyticAt.mul analyticAt_const + apply Finset.analyticAt_fun_prod + intro i hi + exact hentry (σ i) i + +omit [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] in +lemma pivot_surjective {r : ℕ} {f : E → F} {x : E} + (p : F →L[ℂ] Space r) (s : Space r →L[ℂ] E) (h : pivot f p s x ≠ 0) : + Function.Surjective (p.comp (fderiv ℂ f x)) := by + let A := ((p.comp (fderiv ℂ f x)).comp s).toLinearMap + have hker : A.ker=⊥ := by + by_contra hh + exact h (LinearMap.det_eq_zero_iff_ker_ne_bot.mpr hh) + have hi : Function.Injective A := LinearMap.ker_eq_bot.mp hker + have hs := LinearMap.injective_iff_surjective.mp hi + intro y + obtain ⟨z,hz⟩ := hs y + exact ⟨s z,hz⟩ + + + +omit [FiniteDimensional ℂ F] in +lemma exists_pivot (L : E →L[ℂ] F) : + ∃ (p : F →L[ℂ] Space (Module.finrank ℂ L.range)) + (s : Space (Module.finrank ℂ L.range) →L[ℂ] E), + (p.comp L).comp s = ContinuousLinearMap.id ℂ _ := by + classical + obtain ⟨q,hq⟩ := Submodule.ClosedComplemented.of_finiteDimensional L.range + let e : L.range ≃L[ℂ] Space (Module.finrank ℂ L.range) := + ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm + let p := e.toContinuousLinearMap.comp q + have hp : Function.Surjective (p.comp L) := by + intro y + obtain ⟨v,hv⟩ := (e.symm y).property + refine ⟨v,?_⟩ + change e (q (L v))=y + change L v = (e.symm y : F) at hv + rw [hv,hq,e.apply_symm_apply] + obtain ⟨s,hs⟩ := ContinuousLinearMap.HasRightInverse.of_surjective_of_finiteDimensional hp + exact ⟨p,s,ContinuousLinearMap.ext hs⟩ + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff ENNReal +namespace AnalyticZeroCover + + +lemma dimH_image_le_of_local {E F : Type*} [TopologicalSpace E] + [SecondCountableTopology E] [EMetricSpace F] {f : E → F} {V : Set E} {a : ℝ≥0∞} + (h : ∀ x∈V, ∃ W : Set E, IsOpen W ∧ x∈W ∧ dimH (f '' W)≤a) : + dimH (f '' V)≤a := by + classical + choose W hWo hxW hdim using (fun x : V => h x x.property) + obtain ⟨D,hD,hcover⟩ := (HereditarilyLindelofSpace.isLindelof V).elim_countable_subcover + W hWo (fun x hx => mem_iUnion.mpr ⟨⟨x,hx⟩,hxW ⟨x,hx⟩⟩) + apply (dimH_mono (show f '' V ⊆ ⋃ i∈D,f '' W i from ?_)).trans + · rw [dimH_bUnion hD] + exact iSup₂_le (fun i _ => hdim i) + · rintro _ ⟨x,hx,rfl⟩ + obtain ⟨i,hi,hxi⟩ := mem_iUnion₂.mp (hcover hx) + exact mem_iUnion₂.mpr ⟨i,hi,mem_image_of_mem f hxi⟩ + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [FiniteDimensional ℂ F] + + + +theorem rank_dimH_le {d r : ℕ} {f : Space d → F} {U : Set (Space d)} + (hU : IsOpen U) (hUc : IsPreconnected U) (hf : AnalyticOnNhd ℂ f U) + (hr : ∀ x∈U, Module.finrank ℂ (fderiv ℂ f x).range ≤ r) : + dimH (f '' U) ≤ (2*r : ℕ) := by + classical + induction d using Nat.strong_induction_on with + | h d ih => + by_cases hne : U.Nonempty + · let m := Nat.findGreatest (fun k => ∃ x∈U, Module.finrank ℂ (fderiv ℂ f x).range=k) r + obtain ⟨x,hx,hxm⟩ : ∃ x∈U, Module.finrank ℂ (fderiv ℂ f x).range=m := + Nat.findGreatest_spec (P := fun k => ∃ x∈U, Module.finrank ℂ (fderiv ℂ f x).range=k) (hr hne.choose hne.choose_spec) + ⟨hne.choose,hne.choose_spec,rfl⟩ + have hm : m≤r := Nat.findGreatest_le r + have hmax : ∀ y∈U, Module.finrank ℂ (fderiv ℂ f y).range ≤ m := fun y hy => + Nat.le_findGreatest (hr y hy) ⟨y,hy,rfl⟩ + obtain ⟨p,s,hps⟩ := exists_pivot (fderiv ℂ f x) + let θ := pivot f p s + have hθ : AnalyticOnNhd ℂ θ U := fun y hy => pivot_analytic (hf y hy) p s + have hθx : θ x≠0 := by + change LinearMap.det _ ≠ 0 + rw [hps] + simp + let V := {y | y∈U ∧ θ y≠0} + have hV : dimH (f '' V)≤(2*r : ℕ) := by + apply dimH_image_le_of_local + intro y hy + obtain ⟨P,hP,W,hWo,hyW,hWU,hcov⟩ := local_image_patch hU hy.1 hf p + (pivot_surjective p s hy.2) (fun z hz => by simpa only [Module.finrank_fin_fun,hxm] using hmax z hz) + refine ⟨W,hWo,hyW,(dimH_mono hcov).trans (P.dimH_image_le.trans ?_)⟩ + exact_mod_cast Nat.mul_le_mul_left 2 (by simpa only [hP,Module.finrank_fin_fun,hxm] using hm) + obtain ⟨C,hC,hCdim,hcover⟩ := countable_zero_cover_of_nonzero hU hUc hθ ⟨x,hx,hθx⟩ + have hrest (Q : C) : dimH ((f ∘ Q.val.map) '' Q.val.domain) ≤ (2*r : ℕ) := by + apply ih Q.val.dim (hCdim Q.val Q.property).1 Q.val.isOpen_domain Q.val.preconnected_domain + (fun z hz => (hf _ ((hCdim Q.val Q.property).2 ⟨z,hz,rfl⟩)).comp (Q.val.analytic z hz)) + intro z hz + rw [fderiv_comp z (hf _ ((hCdim Q.val Q.property).2 ⟨z,hz,rfl⟩)).differentiableAt + (Q.val.analytic z hz).differentiableAt] + exact (finrank_range_comp_le _ _).trans (hr _ ((hCdim Q.val Q.property).2 ⟨z,hz,rfl⟩)) + have hsub : f '' U ⊆ f '' V ∪ ⋃ Q∈C,(f ∘ Q.map) '' Q.domain := by + rintro _ ⟨y,hy,rfl⟩ + by_cases hθy : θ y=0 + · obtain ⟨Q,hQ,z,hz,hzy⟩ := mem_iUnion₂.mp (hcover ⟨hy,hθy⟩) + exact Or.inr (mem_iUnion₂.mpr ⟨Q,hQ,z,hz,congrArg f hzy⟩) + · exact Or.inl ⟨y,⟨hy,hθy⟩,rfl⟩ + apply (dimH_mono hsub).trans + rw [dimH_union,dimH_bUnion hC] + exact max_le hV (iSup₂_le (fun Q hQ => hrest ⟨Q,hQ⟩)) + · rw [not_nonempty_iff_eq_empty.mp hne,image_empty,dimH_empty] + exact bot_le + +end AnalyticZeroCover + + + +open Set Filter Topology +open scoped ContDiff ENNReal +namespace AnalyticZeroCover +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [FiniteDimensional ℂ F] + +lemma finrank_range_lt_of_not_surjective {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + (L : E →L[ℂ] F) (hL : ¬Function.Surjective L) : + Module.finrank ℂ L.range < Module.finrank ℂ F := by + apply lt_of_le_of_ne L.range.finrank_le + intro heq + exact hL (LinearMap.range_eq_top.mp (Submodule.eq_top_of_finrank_eq heq)) + +lemma rank_dimH_le_open {d r : ℕ} {f : Space d → F} {U : Set (Space d)} + (hU : IsOpen U) (hf : AnalyticOnNhd ℂ f U) + (hr : ∀x∈U,Module.finrank ℂ (fderiv ℂ f x).range≤r) : + dimH (f '' U)≤(2*r : ℕ) := by + apply dimH_image_le_of_local + intro x hx + obtain ⟨ε,hε,hεU⟩ := Metric.isOpen_iff.mp hU x hx + exact ⟨Metric.ball x ε,Metric.isOpen_ball,Metric.mem_ball_self hε, + rank_dimH_le Metric.isOpen_ball (convex_ball x ε).isPreconnected + (hf.mono hεU) (fun y hy => hr y (hεU hy))⟩ + + + +theorem exists_surjective_of_countable_cover {A : Type*} [Countable A] + (d : A → ℕ) (U : ∀a,Set (Space (d a))) (f : ∀a,Space (d a) → F) + (hU : ∀a,IsOpen (U a)) (hf : ∀a,AnalyticOnNhd ℂ (f a) (U a)) + {V : Set F} (hV : IsOpen V) (hne : V.Nonempty) + (hcover : V ⊆ ⋃a,f a '' U a) (hdim : 0 Nat.le_sub_one_of_lt + (finrank_range_lt_of_not_surjective _ (hbad a x hx))) + have hbound : dimH V ≤ (2*(Module.finrank ℂ F-1) : ℕ) := by + apply (dimH_mono hcover).trans + rw [dimH_iUnion] + exact iSup_le hpiece + obtain ⟨x,hx⟩ := hne + have hc : Module.finrank ℝ F = 2*Module.finrank ℂ F := by + rw [← Module.finrank_mul_finrank ℝ ℂ F,Complex.finrank_real_complex] + rw [Real.dimH_of_mem_nhds (hV.mem_nhds hx),hc] at hbound + have hnat : 2*Module.finrank ℂ F ≤ 2*(Module.finrank ℂ F-1) := by exact_mod_cast hbound + omega + +end AnalyticZeroCover + + + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold + + + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold +namespace SplitTangent +open AnalyticZeroCover + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [FiniteDimensional ℂ F] +variable {M : Type*} [TopologicalSpace M] [ChartedSpace F M] [IsManifold 𝓘(ℂ,F) ω M] + + +theorem exists_chart_submersion_of_cover {A : Type*} [Countable A] + (d : A → ℕ) (U : ∀a,Set (Space (d a))) (f : ∀a,Space (d a) → M) + (hU : ∀a,IsOpen (U a)) + (hf : ∀a, ∀x∈U a,ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,F) ω (f a) x) + {V : Set M} (hV : IsOpen V) (hne : V.Nonempty) + (hcover : V ⊆ ⋃a,f a '' U a) (hdim : 0.mem_nhds hx.1) + ((hf a x hx.1).continuousAt.preimage_mem_nhds (c.open_source.mem_nhds hx.2)) + have hc : c∈maximalAtlas 𝓘(ℂ,F) ω M := IsManifold.chart_mem_maximalAtlas y + have hanalytic (a : A) : AnalyticOnNhd ℂ (c ∘ f a) (W a) := by + intro x hx + exact ((contMDiffAt_of_mem_maximalAtlas hc hx.2).comp x (hf a x hx.1)).contDiffAt.analyticAt + let Z := c.target ∩ c.symm ⁻¹' V + have hZ : IsOpen Z := c.isOpen_inter_preimage_symm hV + have hZn : Z.Nonempty := ⟨c y,c.map_source (mem_chart_source F y),by + change c.symm (c y)∈V + rw [c.left_inv (mem_chart_source F y)] + exact hy⟩ + have hZcov : Z ⊆ ⋃a,(c ∘ f a) '' W a := by + intro z hz + obtain ⟨a,x,hx,hfx⟩ := mem_iUnion.mp (hcover hz.2) + refine mem_iUnion.mpr ⟨a,x,⟨hx,?_⟩,?_⟩ + · change f a x∈c.source + rw [hfx] + exact c.map_target hz.1 + · change c (f a x)=z + rw [hfx,c.right_inv hz.1] + obtain ⟨a,x,hx,hs⟩ := exists_surjective_of_countable_cover d W + (fun a => c ∘ f a) hW hanalytic hZ hZn hZcov hdim + exact ⟨y,a,x,hx.1,hx.2,hs⟩ + + +omit [FiniteDimensional ℂ F] in +lemma surjective_mfderiv_of_chart {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {f : E → M} {x : E} (hf : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x) + (y : M) (hy : f x∈(chartAt F y).source) + (hs : Function.Surjective (fderiv ℂ ((chartAt F y) ∘ f) x)) : + Function.Surjective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f x) := by + have hc := mdifferentiable_chart (I := 𝓘(ℂ,F)) y + have hchain := mfderiv_comp x (hc.mdifferentiableAt hy) (hf.mdifferentiableAt (by decide)) + rw [mfderiv_eq_fderiv] at hchain + intro w + obtain ⟨v,hv⟩ := hs (mfderiv 𝓘(ℂ,F) 𝓘(ℂ,F) (chartAt F y) (f x) w) + refine ⟨v,hc.mfderiv_injective hy ?_⟩ + change ((mfderiv 𝓘(ℂ,F) 𝓘(ℂ,F) (chartAt F y) (f x)).comp + (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f x)) v = _ + rw [← hchain] + exact hv + + + +lemma eventually_surjective_fderiv {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] {f : E → F} {x : E} (hf : AnalyticAt ℂ f x) + (hs : Function.Surjective (fderiv ℂ f x)) : + ∀ᶠy in 𝓝 x, Function.Surjective (fderiv ℂ f y) := by + let e : F ≃L[ℂ] Space (Module.finrank ℂ F) := + ContinuousLinearEquiv.ofFinrankEq (Module.finrank_fin_fun ℂ).symm + obtain ⟨s,hs⟩ := ContinuousLinearMap.HasRightInverse.of_surjective_of_finiteDimensional + (f := e.toContinuousLinearMap.comp (fderiv ℂ f x)) (e.surjective.comp hs) + have heq : (e.toContinuousLinearMap.comp (fderiv ℂ f x)).comp s = ContinuousLinearMap.id ℂ _ := + ContinuousLinearMap.ext hs + have hp : pivot f e.toContinuousLinearMap s x≠0 := by + change LinearMap.det _ ≠ 0 + rw [heq] + simp + apply ((pivot_analytic hf e.toContinuousLinearMap s).continuousAt.eventually_ne hp).mono + intro y hy z + obtain ⟨v,hv⟩ := pivot_surjective e.toContinuousLinearMap s hy (e z) + exact ⟨v,e.injective hv⟩ + +end SplitTangent + +namespace SplitTangent.RationalFamily +variable {X T : ComplexManifold.{u}} (G : RationalFamily X T) + + +theorem integrable_both_of_submersive [CompactSpace X.Carrier] + [ConnectedSpace X.Carrier] [Nonempty T.Carrier] + (e : ProjectiveEmbedding X) (S : TangentSplitting X) {a b : ℂ} + (hs : ∀ τ, Function.Surjective (mfderiv (ModelWithCorners T) + ((ModelWithCorners X).prod (ModelWithCorners X)) (G.twoPointEvaluation a b) τ)) : + Integrable X S.first ∧ Integrable X S.second := by + classical + apply G.integrable_both_of_submersive_transport S hs + · intro τ + let F := Classical.choice (S.exists_projective_tangent_box e (G.curve τ)) + exact Classical.choice (F.exists_normalized_factor_transport b) + · intro τ + let F := Classical.choice (S.swap.exists_projective_tangent_box e (G.curve τ)) + exact Classical.choice (F.exists_normalized_factor_transport b) +end SplitTangent.RationalFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalFamilyCover.lean b/lean/OAI/Geometry/SplitTangent/RationalFamilyCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f1a92aaa5a716ee054947d795c1d50b22ac66fd --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalFamilyCover.lean @@ -0,0 +1,63 @@ +import Mathlib +import OAI.Geometry.SplitTangent.RationalFamilies +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.RationalAccepted +import OAI.Geometry.SplitTangent.RationalEncoding +import OAI.Geometry.SplitTangent.RationalReparam +import OAI.Geometry.SplitTangent.ZariskiPairOpen + +namespace OAI + +/-! Rational Family Cover. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold +universe u +namespace SplitTangent +open AnalyticZeroCover RationalParameters + +lemma RationallyConnected.fixed_endpoints {X : ComplexManifold.{u}} + {U : Set (X.Carrier × X.Carrier)} + (hU : ∀xy∈U,∃g : RationalCurve X, ∃a b : OnePoint ℂ, g.value a=xy.1 ∧ g.value b=xy.2) + {xy : X.Carrier × X.Carrier} (hxy : xy∈U) : + ∃g : RationalCurve X, g.finite 0=xy.1 ∧ g.finite 1=xy.2 := by + classical + obtain ⟨g,a,b,ha,hb⟩ := hU xy hxy + by_cases hab : a=b + · have he : xy.1=xy.2 := ha.symm.trans (hab ▸ hb) + exact ⟨⟨fun _ => xy.1,fun _ => xy.1,contMDiff_const,contMDiff_const,fun _ _ => rfl⟩,rfl,he⟩ + · obtain ⟨h,h0,h1⟩ := g.normalize_endpoints a b hab + exact ⟨h,h0.trans ha,h1.trans hb⟩ + + + +theorem RationallyConnected.countable_family_cover {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) + (x₀ : X.Carrier) : + ∃C : (d : ℕ) → Set (Patch (Coeff e.N d)), + (∀d,(C d).Countable) ∧ + (∀d, ∀P∈C d,P.image ⊆ regular e.N d ∩ accepted e d) ∧ + ∃U : Set (X.Carrier × X.Carrier), IsOpen U ∧ U.Nonempty ∧ + U ⊆ ⋃ d, ⋃P∈C d, pairEvaluation e x₀ P '' P.domain := by + classical + obtain ⟨U,hUz,hUn,hUd,hU⟩ := hRC + have Hd (d : ℕ) := countable_accepted e (d := d) + choose C hC hCP hCc using Hd + refine ⟨C,hC,hCP,U,hUz.isOpen e,hUn,?_⟩ + intro xy hxy + obtain ⟨g,hg0,hg1⟩ := RationallyConnected.fixed_endpoints hU hxy + obtain ⟨d,τ,hτ,hτf,hτi⟩ := curve_encoding e g + obtain ⟨P,hP,z,hz,hzτ⟩ := mem_iUnion₂.mp (hCc d hτ) + refine mem_iUnion.mpr ⟨d,mem_iUnion₂.mpr ⟨P,hP,z,hz,?_⟩⟩ + apply Prod.ext + · change e.coneLift x₀ (ev false (P.map z) 0)=xy.1 + rw [hzτ, e.coneLift_eq x₀ (regular_nonzero hτ.1 false 0) (hτf 0),hg0] + · change e.coneLift x₀ (ev false (P.map z) 1)=xy.2 + rw [hzτ, e.coneLift_eq x₀ (regular_nonzero hτ.1 false 1) (hτf 1),hg1] + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalReparam.lean b/lean/OAI/Geometry/SplitTangent/RationalReparam.lean new file mode 100644 index 0000000000000000000000000000000000000000..f166f1fc1d9522b412c82b4adfc6ab11b46969e1 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalReparam.lean @@ -0,0 +1,99 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Rational Reparam. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold +universe u +namespace SplitTangent.RationalCurve +variable {X : ComplexManifold.{u}} (g : RationalCurve X) + + +def homogeneousValue (a b : ℂ) : X.Carrier := + if b=0 then g.infinity 0 else g.finite (a/b) + +lemma homogeneousValue_finite {a b : ℂ} (hb : b≠0) : + g.homogeneousValue a b = g.finite (a/b) := ite_eq_right hb + +lemma homogeneousValue_infinity {a b : ℂ} (ha : a≠0) : + g.homogeneousValue a b = g.infinity (b/a) := by + by_cases hb : b=0 + · simp [homogeneousValue,hb] + · rw [g.homogeneousValue_finite hb,g.overlap (a/b) (div_ne_zero ha hb),inv_div] + +lemma homogeneousValue_holomorphicAt {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {a b : E → ℂ} {z : E} (ha : AnalyticAt ℂ a z) (hb : AnalyticAt ℂ b z) + (hnz : a z≠0 ∨ b z≠0) : + ContMDiffAt 𝓘(ℂ,E) (ModelWithCorners X) ω (fun y => g.homogeneousValue (a y) (b y)) z := by + rcases hnz with h | h + · have H := g.infinity_holomorphic.contMDiffAt.comp z ((hb.div ha h).contDiffAt.contMDiffAt) + apply H.congr_of_eventuallyEq + filter_upwards [ha.continuousAt.eventually_ne h] with y hy + exact g.homogeneousValue_infinity hy + · have H := g.finite_holomorphic.contMDiffAt.comp z ((ha.div hb h).contDiffAt.contMDiffAt) + apply H.congr_of_eventuallyEq + filter_upwards [hb.continuousAt.eventually_ne h] with y hy + exact g.homogeneousValue_finite hy + +lemma homogeneousValue_smul {a b s : ℂ} (hs : s≠0) : + g.homogeneousValue (s*a) (s*b)=g.homogeneousValue a b := by + by_cases hb : b=0 + · simp [homogeneousValue,hb] + · rw [g.homogeneousValue_finite (mul_ne_zero hs hb),g.homogeneousValue_finite hb, + mul_div_mul_left _ _ hs] + + +def mobius (a b c d : ℂ) (hdet : a*d-b*c≠0) : RationalCurve X where + finite z := g.homogeneousValue (a*z+b) (c*z+d) + infinity z := g.homogeneousValue (a+b*z) (c+d*z) + finite_holomorphic := by + intro z + apply g.homogeneousValue_holomorphicAt (by fun_prop) (by fun_prop) + by_contra! h + apply hdet + linear_combination a*h.2-c*h.1 + infinity_holomorphic := by + intro z + apply g.homogeneousValue_holomorphicAt (by fun_prop) (by fun_prop) + by_contra! h + apply hdet + linear_combination d*h.1-b*h.2 + overlap z hz := by + rw [← g.homogeneousValue_smul (a := a+b*z⁻¹) (b := c+d*z⁻¹) hz] + congr 1 <;> field_simp + + + +theorem normalize_endpoints (a b : OnePoint ℂ) (hab : a≠b) : + ∃ h : RationalCurve X, h.finite 0=g.value a ∧ h.finite 1=g.value b := by + classical + induction a using OnePoint.rec with + | infty => + induction b using OnePoint.rec with + | infty => exact (hab rfl).elim + | coe b => + let h := g.mobius (b-1) 1 1 0 (by norm_num) + refine ⟨h,?_,?_⟩ + · simp [h,mobius,homogeneousValue,value] + · simp [h,mobius,homogeneousValue,value] + | coe a => + induction b using OnePoint.rec with + | infty => + let h := g.mobius (1-a) a (-1) 1 (by ring_nf; exact one_ne_zero) + refine ⟨h,?_,?_⟩ + · simp [h,mobius,homogeneousValue,value] + · simp [h,mobius,homogeneousValue,value] + | coe b => + have hba : b-a≠0 := sub_ne_zero.mpr (fun hh => hab (congrArg OnePoint.some hh.symm)) + let h := g.mobius (b-a) a 0 1 (by simpa using hba) + refine ⟨h,?_,?_⟩ <;> simp [h,mobius,homogeneousValue,value] + +end SplitTangent.RationalCurve + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalTrivialization.lean b/lean/OAI/Geometry/SplitTangent/RationalTrivialization.lean new file mode 100644 index 0000000000000000000000000000000000000000..790538386f5b3d76cf863472d43b79cb91aae323 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalTrivialization.lean @@ -0,0 +1,3525 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Rational Trivialization. -/ + +noncomputable section +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + +universe u + +open scoped Topology +open Filter + +namespace SplitTangent.TangentSplitting +section +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + +def coordinateProjector (x : X.Carrier) (z : Model X) : Model X →L[ℂ] Model X := + let t := trivializationAt (Model X) (Tangent X) x + let y := (chartAt (Model X) x).symm z + (t.continuousLinearMapAt ℂ y).comp ((S.projector y).comp (t.symmL ℂ y)) + +def coordinateMatrix (x : X.Carrier) (i j : Fin X.dim) (z : Model X) : ℂ := + LinearMap.toMatrix' (S.coordinateProjector x z).toLinearMap i j + +theorem coordinateMatrix_mulVec (x : X.Carrier) (z v : Model X) : + Matrix.mulVec (fun i j => S.coordinateMatrix x i j z) v = S.coordinateProjector x z v := + LinearMap.toMatrix'_mulVec _ _ + +theorem coordinateProjector_idempotent (x : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) (v : Model X) : + S.coordinateProjector x z (S.coordinateProjector x z v) = S.coordinateProjector x z v := by + let t := trivializationAt (Model X) (Tangent X) x + have hy : (chartAt (Model X) x).symm z ∈ t.baseSet := + (chartAt (Model X) x).map_target hz + simp only [coordinateProjector,ContinuousLinearMap.comp_apply] + rw [t.symmL_continuousLinearMapAt hy, S.idempotent] + +theorem coordinateMatrix_idempotent (x : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) (i j : Fin X.dim) : + ∑ k, S.coordinateMatrix x i k z * S.coordinateMatrix x k j z = + S.coordinateMatrix x i j z := by + have hcomp : (S.coordinateProjector x z).toLinearMap.comp + (S.coordinateProjector x z).toLinearMap = (S.coordinateProjector x z).toLinearMap := by + apply LinearMap.ext + intro v + exact S.coordinateProjector_idempotent x hz v + have hM := congrArg LinearMap.toMatrix' hcomp + rw [LinearMap.toMatrix'_comp] at hM + exact congrFun (congrFun hM i) j + + + +theorem coordinateMatrix_analytic (x : X.Carrier) (i j : Fin X.dim) : + AnalyticOnNhd ℂ (S.coordinateMatrix x i j) (chartAt (Model X) x).target := by + let t := trivializationAt (Model X) (Tangent X) x + let b := Pi.basisFun ℂ (Fin X.dim) + let c := chartAt (Model X) x + let H := fun y : X.Carrier => (t ⟨y,S.projector y (t.localFrame b j y)⟩).2 + have hframe : HolomorphicSectionOn X (t.localFrame b j) t.baseSet := + t.contMDiffOn_localFrame_baseSet ω b j + have hH : ContMDiffOn (ModelWithCorners X) 𝓘(ℂ, Model X) ω H t.baseSet := + t.contMDiffOn_section_baseSet_iff.mp (S.holomorphicSectionOn_projectField hframe) + have heq : Set.EqOn (S.coordinateMatrix x i j) (fun z => H (c.symm z) i) c.target := by + intro z hz + have hy : c.symm z ∈ t.baseSet := c.map_target hz + have hb : t.symmL ℂ (c.symm z) (Pi.single j 1) = t.localFrame b j (c.symm z) := by + rw [Bundle.Trivialization.localFrame_apply_of_mem_baseSet t b hy] + simp only [Bundle.Trivialization.basisAt,Module.Basis.map_apply,b,Pi.basisFun_apply] + simp only [Bundle.Trivialization.linearEquivAt_symm_apply,Bundle.Trivialization.symmL_apply t hy] + simp only [coordinateMatrix,LinearMap.toMatrix'_apply,coordinateProjector, + ContinuousLinearMap.coe_coe,ContinuousLinearMap.comp_apply] + rw [hb,Bundle.Trivialization.continuousLinearMapAt_apply_of_mem ℂ t hy] + intro z hz + have hc : ContMDiffAt 𝓘(ℂ,Model X) (ModelWithCorners X) ω c.symm z := + contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) x) hz + have hh : AnalyticAt ℂ (fun z => H (c.symm z)) z := + ((hH.contMDiffAt (t.open_baseSet.mem_nhds (c.map_target hz))).comp z hc).contDiffAt.analyticAt + apply (analyticAt_pi_iff.mp hh i).congr + exact Filter.eventuallyEq_of_mem (c.open_target.mem_nhds hz) (fun z hz => (heq hz).symm) + +end + +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +def coordinateTransition (x y : X.Carrier) : Model X → Model X := + (chartAt (Model X) y) ∘ (chartAt (Model X) x).symm + +theorem coordinateTransition_analytic (x y : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) + (hzy : (chartAt (Model X) x).symm z ∈ (chartAt (Model X) y).source) : + AnalyticAt ℂ (coordinateTransition x y) z := by + have hc := contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) y) hzy + have hd := contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz + exact (hc.comp z hd).contDiffAt.analyticAt + +theorem coordinateTransition_derivative (x y : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) + (hzy : (chartAt (Model X) x).symm z ∈ (chartAt (Model X) y).source) : + fderiv ℂ (coordinateTransition x y) z = + ((trivializationAt (Model X) (Tangent X) y).continuousLinearMapAt ℂ + ((chartAt (Model X) x).symm z)).comp + ((trivializationAt (Model X) (Tangent X) x).symmL ℂ + ((chartAt (Model X) x).symm z)) := by + let c := chartAt (Model X) x + let d := chartAt (Model X) y + have hc := (contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) y) hzy).mdifferentiableAt (by simp) + have hd := (contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz).mdifferentiableAt (by simp) + have hA : (trivializationAt (Model X) (Tangent X) y).continuousLinearMapAt ℂ (c.symm z) = + mfderiv (ModelWithCorners X) 𝓘(ℂ,Model X) d (c.symm z) := by + exact TangentBundle.continuousLinearMapAt_trivializationAt (I := ModelWithCorners X) hzy + have hB : (trivializationAt (Model X) (Tangent X) x).symmL ℂ (c.symm z) = + mfderiv 𝓘(ℂ,Model X) (ModelWithCorners X) c.symm z := by + have he := TangentBundle.symmL_trivializationAt (I := ModelWithCorners X) (c.map_target hz) + have he' : (trivializationAt (Model X) (Tangent X) x).symmL ℂ (c.symm z) = + mfderiv 𝓘(ℂ,Model X) (ModelWithCorners X) c.symm (c (c.symm z)) := by + simpa [extChartAt_coe_symm,extChartAt_coe,ModelWithCorners,c] using he + rw [c.right_inv hz] at he' + exact he' + change fderiv ℂ (d ∘ c.symm) z = _ + rw [hA,hB] + exact mfderiv_eq_fderiv.symm.trans (mfderiv_comp z hc hd) + + +theorem coordinateProjector_intertwining (x y : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) + (hzy : (chartAt (Model X) x).symm z ∈ (chartAt (Model X) y).source) : + (fderiv ℂ (coordinateTransition x y) z).comp (S.coordinateProjector x z) = + (S.coordinateProjector y (coordinateTransition x y z)).comp + (fderiv ℂ (coordinateTransition x y) z) := by + rw [coordinateTransition_derivative x y hz hzy] + let t := trivializationAt (Model X) (Tangent X) x + let t' := trivializationAt (Model X) (Tangent X) y + have hx : (chartAt (Model X) x).symm z ∈ t.baseSet := (chartAt (Model X) x).map_target hz + have hy : (chartAt (Model X) x).symm z ∈ t'.baseSet := hzy + have he : (chartAt (Model X) y).symm (coordinateTransition x y z) = + (chartAt (Model X) x).symm z := (chartAt (Model X) y).left_inv hzy + simp only [coordinateProjector] + rw [he] + apply ContinuousLinearMap.ext + intro v + simp only [ContinuousLinearMap.comp_apply] + rw [t.symmL_continuousLinearMapAt hx,t'.symmL_continuousLinearMapAt hy] + +end SplitTangent.TangentSplitting + +end + +noncomputable section +universe u +open Filter Topology Set Bundle +open scoped ContDiff Manifold LinearAlgebra.Projectivization + +namespace SplitTangent.HolomorphicLinearODE +section +variable {R : Type*} [NormedRing R] [NormedAlgebra ℂ R] [CompleteSpace R] + +def solutionCoeff (A : ℕ → R) (v : R) : ℕ → R + | 0 => v + | n+1 => ((n+1 : ℕ) : ℂ)⁻¹ • + ∑ i ∈ Finset.range (n+1), A i * solutionCoeff A v (n-i) +termination_by n => n + +omit [CompleteSpace R] in +lemma solutionCoeff_recurrence (A : ℕ → R) (v : R) (n : ℕ) : + ((n+1 : ℕ) : ℂ) • solutionCoeff A v (n+1) = + ∑ i ∈ Finset.range (n+1), A i * solutionCoeff A v (n-i) := by + rw [solutionCoeff,smul_smul] + have hn : ((n+1 : ℕ) : ℂ) ≠ 0 := by exact_mod_cast Nat.succ_ne_zero n + rw [mul_inv_cancel₀ hn,one_smul] + +omit [CompleteSpace R] in +lemma solutionCoeff_norm {A : ℕ → R} (v : R) {B : ℝ} (hB : 0 < B) + (hA : ∀ n, ‖A n‖ ≤ B^(n+1)) (n : ℕ) : + ‖solutionCoeff A v n‖ ≤ B^n * ‖v‖ := by + induction n using Nat.strong_induction_on with + | h n ih => + cases n with + | zero => simp [solutionCoeff] + | succ n => + rw [solutionCoeff,norm_smul] + have hc : ‖(((n+1 : ℕ) : ℂ))⁻¹‖ = ((n+1 : ℕ) : ℝ)⁻¹ := by rw [norm_inv,Complex.norm_natCast] + rw [hc] + have hs : ‖∑ i ∈ Finset.range (n+1), A i * solutionCoeff A v (n-i)‖ ≤ + ((n+1 : ℕ) : ℝ) * (B^(n+1) * ‖v‖) := by + calc + _ ≤ ∑ i ∈ Finset.range (n+1), ‖A i * solutionCoeff A v (n-i)‖ := norm_sum_le _ _ + _ ≤ ∑ _i ∈ Finset.range (n+1), B^(n+1) * ‖v‖ := by + apply Finset.sum_le_sum + intro i hi + have hin : i ≤ n := by simpa using Nat.le_of_lt_succ (Finset.mem_range.mp hi) + calc + _ ≤ ‖A i‖ * ‖solutionCoeff A v (n-i)‖ := norm_mul_le _ _ + _ ≤ B^(i+1) * (B^(n-i) * ‖v‖) := by + exact mul_le_mul (hA i) (ih _ (by omega)) (norm_nonneg _) (pow_nonneg hB.le _) + _ = B^(n+1) * ‖v‖ := by rw [← mul_assoc,← pow_add]; congr 2; omega + _ = _ := by simp [nsmul_eq_mul] + calc + _ ≤ ((n+1 : ℕ) : ℝ)⁻¹ * (((n+1 : ℕ) : ℝ) * (B^(n+1) * ‖v‖)) := by gcongr + _ = _ := by rw [inv_mul_cancel_left₀ (by positivity)] + +def series (a : ℕ → R) : FormalMultilinearSeries ℂ ℂ R := + fun n => ContinuousMultilinearMap.mkPiRing ℂ (Fin n) (a n) + +omit [CompleteSpace R] in +@[simp] lemma series_coeff (a : ℕ → R) (n : ℕ) : (series a).coeff n = a n := by + simp [series,FormalMultilinearSeries.coeff,ContinuousMultilinearMap.mkPiRing_apply] + +omit [CompleteSpace R] in +lemma series_radius {a : ℕ → R} {B C : ℝ} (hB : 0 < B) + (ha : ∀ n, ‖a n‖ ≤ B^n*C) : + (ENNReal.ofReal B⁻¹) ≤ (series a).radius := by + rw [ENNReal.ofReal_eq_coe_nnreal (inv_nonneg.mpr hB.le)] + apply (series a).le_radius_of_bound C (r := ⟨B⁻¹,inv_nonneg.mpr hB.le⟩) + intro n + simp only [series,ContinuousMultilinearMap.norm_mkPiRing] + change ‖a n‖ * (B⁻¹)^n ≤ C + calc + _ ≤ (B^n*C)*(B⁻¹)^n := mul_le_mul_of_nonneg_right (ha n) (by positivity) + _ = (B^n*(B⁻¹)^n)*C := by ring + _ = C := by rw [← mul_pow,mul_inv_cancel₀ hB.ne',one_pow,one_mul] + +omit [CompleteSpace R] in +lemma solutionSeries_pos {A : ℕ → R} (v : R) {B : ℝ} (hB : 0 < B) + (hA : ∀ n, ‖A n‖ ≤ B^(n+1)) : + 0 < (series (solutionCoeff A v)).radius := + lt_of_lt_of_le (ENNReal.ofReal_pos.mpr (inv_pos.mpr hB)) + (series_radius hB (solutionCoeff_norm v hB hA)) + +omit [CompleteSpace R] in +lemma cauchy_eval (a b : ℕ → R) (z : ℂ) (n : ℕ) : + (∑ i ∈ Finset.range (n+1), (z^i • a i) * (z^(n-i) • b (n-i))) = + z^n • ∑ i ∈ Finset.range (n+1), a i * b (n-i) := by + rw [Finset.smul_sum] + apply Finset.sum_congr rfl + intro i hi + rw [smul_mul_smul,← pow_add] + congr 2 + have : i ≤ n := Nat.le_of_lt_succ (Finset.mem_range.mp hi) + omega + +lemma hasDerivAt_solutionSeries {A : ℕ → R} (v : R) {B : ℝ} (hB : 0 < B) + (hA : ∀ n, ‖A n‖ ≤ B^(n+1)) {z : ℂ} + (hzA : ‖z‖ₑ < (series A).radius) + (hzY : ‖z‖ₑ < (series (solutionCoeff A v)).radius) : + HasDerivAt (series (solutionCoeff A v)).sum + ((series A).sum z * (series (solutionCoeff A v)).sum z) z := by + let p := series (solutionCoeff A v) + have hp : 0 < p.radius := solutionSeries_pos v hB hA + have hzY' : z ∈ Metric.eball 0 p.radius := by simpa using hzY + have hzA' : z ∈ Metric.eball 0 (series A).radius := by simpa using hzA + have hD := (ContinuousLinearMap.apply ℂ R 1).hasSum + ((p.hasFPowerSeriesOnBall hp).fderiv.hasSum hzY') + have hprod := hasSum_sum_range_mul_of_summable_norm + ((series A).summable_norm_apply hzA') (p.summable_norm_apply hzY') + have he : (fun n => (ContinuousLinearMap.apply ℂ R 1) + (p.derivSeries n fun _ => z)) = + (fun n => ∑ i ∈ Finset.range (n+1), + ((series A) i fun _ => z) * (p (n-i) fun _ => z)) := by + funext n + simp only [ContinuousLinearMap.apply_apply,FormalMultilinearSeries.apply_eq_pow_smul_coeff, + smul_apply,FormalMultilinearSeries.derivSeries_coeff_one] + simp only [p,series_coeff] + rw [cauchy_eval,← Nat.cast_smul_eq_nsmul ℂ,solutionCoeff_recurrence] + rw [← he] at hprod + have hdval := hD.unique hprod + simp only [zero_add,ContinuousLinearMap.apply_apply] at hdval + rw [(series A).hasSum hzA' |>.tsum_eq,p.hasSum hzY' |>.tsum_eq] at hdval + have hder := ((p.hasFPowerSeriesOnBall hp).analyticAt_of_mem hzY').differentiableAt.hasFDerivAt.hasDerivAt + rw [hdval] at hder + exact hder + +omit [CompleteSpace R] in +lemma coeff_bound {p : FormalMultilinearSeries ℂ ℂ R} (hp : 0 < p.radius) : + ∃ B : ℝ, 0 < B ∧ ∀ n, ‖p.coeff n‖ ≤ B^(n+1) := by + obtain ⟨r,hr0,hrp⟩ := ENNReal.lt_iff_exists_nnreal_btwn.mp hp + have hr : 0 < r := by exact_mod_cast hr0 + obtain ⟨C,hC,hCp⟩ := p.norm_le_div_pow_of_pos_of_lt_radius hr hrp + let B := max C (r : ℝ)⁻¹ + have hCB : C ≤ B := le_max_left _ _ + have hrB : (r : ℝ)⁻¹ ≤ B := le_max_right _ _ + have hB : 0 < B := lt_of_lt_of_le hC hCB + refine ⟨B,hB,fun n => ?_⟩ + calc + ‖p.coeff n‖ = ‖p n‖ := (p.norm_apply_eq_norm_coef).symm + _ ≤ C / (r : ℝ)^n := hCp n + _ = C * ((r : ℝ)⁻¹)^n := by rw [div_eq_mul_inv,inv_pow] + _ ≤ B * B^n := mul_le_mul hCB (pow_le_pow_left₀ (by positivity) hrB n) + (by positivity) hB.le + _ = B^(n+1) := by rw [pow_succ,mul_comm] + +omit [CompleteSpace R] in +@[simp] lemma series_of_coeff (p : FormalMultilinearSeries ℂ ℂ R) : + series p.coeff = p := by + funext n + exact p.mkPiRing_coeff_eq n + +lemma exists_local_solution {A : ℂ → R} {x : ℂ} (hA : AnalyticAt ℂ A x) (v : R) : + ∃ Y : ℂ → R, AnalyticAt ℂ Y x ∧ Y x = v ∧ + ∀ᶠ z in 𝓝 x, HasDerivAt Y (A z * Y z) z := by + obtain ⟨p,r,hp⟩ := hA + obtain ⟨B,hB,hbound⟩ := coeff_bound (hp.r_pos.trans_le hp.r_le) + let q := series (solutionCoeff p.coeff v) + have hq : 0 < q.radius := solutionSeries_pos v hB hbound + let Y : ℂ → R := fun z => q.sum (z-x) + have hqA : AnalyticAt ℂ q.sum 0 := (q.hasFPowerSeriesOnBall hq).analyticAt + refine ⟨Y,?_,?_,?_⟩ + · simpa [Y] using hqA.comp_sub x + · change q.sum (x-x) = v + rw [sub_self,← (q.hasFPowerSeriesOnBall hq).coeff_zero (fun _ => 1)] + simp [q,series,ContinuousMultilinearMap.mkPiRing_apply,solutionCoeff] + · have hrN : ∀ᶠ z in 𝓝 x, z ∈ Metric.eball x r := Metric.eball_mem_nhds x hp.r_pos + have hqN : ∀ᶠ z in 𝓝 x, z ∈ Metric.eball x q.radius := Metric.eball_mem_nhds x hq + filter_upwards [hrN,hqN] with z hzr hzq + have hzr' : z-x ∈ Metric.eball 0 r := by simpa [edist_eq_enorm_sub] using hzr + have hzq' : ‖z-x‖ₑ < q.radius := by simpa [edist_eq_enorm_sub] using hzq + have hzp : ‖z-x‖ₑ < (series p.coeff).radius := by + simpa using (show ‖z-x‖ₑ < r by simpa using hzr').trans_le hp.r_le + have hder := hasDerivAt_solutionSeries v hB hbound hzp hzq' + have heA : (series p.coeff).sum (z-x) = A z := by + rw [series_of_coeff,← hp.sum hzr',add_sub_cancel] + rw [heA] at hder + simpa [Y,Function.comp_def] using hder.scomp z ((hasDerivAt_id z).sub_const x) + +lemma inverse_mul_horizontal {Y Z : ℂ → R} {A : R} {z : ℂ} + (hY : HasDerivAt Y (A * Y z) z) (hZ : HasDerivAt Z (A * Z z) z) + (hu : IsUnit (Y z)) : + HasDerivAt (fun w => Ring.inverse (Y w) * Z w) 0 z := by + obtain ⟨u,he⟩ := hu + have hi : HasDerivAt (fun w => Ring.inverse (Y w)) + (-(Ring.inverse (Y z) * (A * Y z) * Ring.inverse (Y z))) z := by + have h := (hasFDerivAt_ringInverse (𝕜 := ℂ) u) + rw [he] at h + convert! h.comp_hasDerivAt z hY using 1; try rfl + simp only [neg_apply,ContinuousLinearMap.mulLeftRight_apply] + rw [← Ring.inverse_unit u,he] + convert! hi.mul hZ using 1; try rfl + have hc : Y z * Ring.inverse (Y z) = 1 := Ring.mul_inverse_cancel _ ⟨u,he⟩ + simp only [neg_mul,mul_assoc,hc,mul_one,neg_add_cancel] + +lemma exists_local_fundamental {A : ℂ → R} {x : ℂ} (hA : AnalyticAt ℂ A x) : + ∃ Y : ℂ → R, AnalyticAt ℂ Y x ∧ Y x = 1 ∧ + ∀ᶠ z in 𝓝 x, HasDerivAt Y (A z * Y z) z ∧ IsUnit (Y z) := by + obtain ⟨Y,hYa,hY0,hYd⟩ := exists_local_solution hA 1 + refine ⟨Y,hYa,hY0,hYd.and ?_⟩ + have hn : {a : R | IsUnit a} ∈ 𝓝 (Y x) := + Units.isOpen.mem_nhds (hY0 ▸ isUnit_one) + exact hYa.continuousAt.eventually hn + +lemma local_uniqueness {A f g : ℂ → R} {x : ℂ} (hA : AnalyticAt ℂ A x) + (hf : ∀ᶠ z in 𝓝 x, HasDerivAt f (A z * f z) z) + (hg : ∀ᶠ z in 𝓝 x, HasDerivAt g (A z * g z) z) + (he : f x = g x) : f =ᶠ[𝓝 x] g := by + obtain ⟨Y,hYa,hY0,hY⟩ := exists_local_fundamental hA + obtain ⟨ε,hε,hs⟩ := Metric.eventually_nhds_iff_ball.mp (hY.and (hf.and hg)) + let D : ℂ → R := fun z => Ring.inverse (Y z) * (f z-g z) + have hd (z : ℂ) (hz : z ∈ Metric.ball x ε) : HasDerivAt D 0 z := by + have hsub : HasDerivAt (fun w => f w-g w) (A z * (f z-g z)) z := by + convert! (hs z hz).2.1.sub (hs z hz).2.2 using 1; try rfl + exact mul_sub _ _ _ + exact inverse_mul_horizontal (hs z hz).1.1 hsub (hs z hz).1.2 + filter_upwards [Metric.ball_mem_nhds x hε] with z hz + have hc : D z = D x := Metric.isOpen_ball.is_const_of_deriv_eq_zero + (convex_ball x ε).isPreconnected + (fun w hw => (hd w hw).differentiableAt.differentiableWithinAt) + (fun w hw => (hd w hw).deriv) hz (Metric.mem_ball_self hε) + have hmul := congrArg (fun a => Y z*a) hc + have hcancel := Ring.mul_inverse_cancel (Y z) (hs z hz).1.2 + have hz0 : f z-g z = 0 := by + simpa only [D,he,sub_self,mul_zero,← mul_assoc,hcancel,one_mul] using hmul + exact sub_eq_zero.mp hz0 + + + +def transport (Y : ℂ → R) (s t : ℂ) : R := Y t * Ring.inverse (Y s) + +omit [NormedAlgebra ℂ R] [CompleteSpace R] in +lemma transport_self {Y : ℂ → R} {s : ℂ} (hs : IsUnit (Y s)) : + transport Y s s = 1 := Ring.mul_inverse_cancel _ hs + +omit [NormedAlgebra ℂ R] [CompleteSpace R] in +lemma transport_trans {Y : ℂ → R} {s t u : ℂ} (ht : IsUnit (Y t)) : + transport Y t u * transport Y s t = transport Y s u := by + simp only [transport, mul_assoc, ← mul_assoc (Ring.inverse (Y t)), + Ring.inverse_mul_cancel _ ht, one_mul] + +omit [NormedAlgebra ℂ R] [CompleteSpace R] in +lemma transport_isUnit {Y : ℂ → R} {s t : ℂ} + (hs : IsUnit (Y s)) (ht : IsUnit (Y t)) : IsUnit (transport Y s t) := by + obtain ⟨u,hu⟩ := hs + rw [transport, ← hu, Ring.inverse_unit] + exact ht.mul (Units.isUnit _) + +lemma transport_analyticAt {Y : ℂ → R} {s t : ℂ} + (hs : AnalyticAt ℂ Y s) (ht : AnalyticAt ℂ Y t) (hu : IsUnit (Y s)) : + AnalyticAt ℂ (fun w : ℂ × ℂ => transport Y w.1 w.2) (s,t) := by + have hf : AnalyticAt ℂ (fun w : ℂ × ℂ => Y w.1) (s,t) := hs.comp analyticAt_fst + have hg : AnalyticAt ℂ (fun w : ℂ × ℂ => Y w.2) (s,t) := ht.comp analyticAt_snd + have hi : AnalyticAt ℂ (fun w : ℂ × ℂ => Ring.inverse (Y w.1)) (s,t) := + (analyticOnNhd_inverse (𝕜 := ℂ) _ hu).comp_of_eq hf rfl + exact hg.mul hi + +omit [CompleteSpace R] in +lemma transport_hasDerivAt {A Y : ℂ → R} {s t : ℂ} + (ht : HasDerivAt Y (A t * Y t) t) : + HasDerivAt (transport Y s) (A t * transport Y s t) t := by + convert! ht.mul_const (Ring.inverse (Y s)) using 1; try rfl + exact (mul_assoc _ _ _).symm + + + +theorem exists_local_transport {A : ℂ → R} {x : ℂ} (hA : AnalyticAt ℂ A x) : + ∃ ε : ℝ, 0 < ε ∧ ∃ T : ℂ → ℂ → R, + AnalyticOnNhd ℂ (fun w : ℂ × ℂ => T w.1 w.2) + (Metric.ball x ε ×ˢ Metric.ball x ε) ∧ + (∀ s ∈ Metric.ball x ε, T s s = 1) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, IsUnit (T s t)) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, ∀ u ∈ Metric.ball x ε, + T t u * T s t = T s u) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, + HasDerivAt (T s) (A t * T s t) t) := by + obtain ⟨Y,hYa,hY0,hY⟩ := exists_local_fundamental hA + obtain ⟨ε,hε,he⟩ := Metric.eventually_nhds_iff_ball.mp (hYa.eventually_analyticAt.and hY) + refine ⟨ε,hε,transport Y,?_,?_,?_,?_,?_⟩ + · intro w hw + exact transport_analyticAt (he w.1 hw.1).1 (he w.2 hw.2).1 (he w.1 hw.1).2.2 + · intro s hs; exact transport_self (he s hs).2.2 + · intro s hs t ht; exact transport_isUnit (he s hs).2.2 (he t ht).2.2 + · intro s hs t ht u hu; exact transport_trans (he t ht).2.2 + · intro s hs t ht; exact transport_hasDerivAt (he t ht).2.1 + + +theorem eqOn_of_solution {A f g : ℂ → R} {U : Set ℂ} (hU : IsOpen U) + (hUc : IsPreconnected U) (hA : AnalyticOnNhd ℂ A U) + (hf : ∀ z ∈ U, HasDerivAt f (A z * f z) z) + (hg : ∀ z ∈ U, HasDerivAt g (A z * g z) z) + {x : ℂ} (hx : x ∈ U) (he : f x = g x) : EqOn f g U := by + have hfa : AnalyticOnNhd ℂ f U := + (show DifferentiableOn ℂ f U from fun z hz => (hf z hz).differentiableAt.differentiableWithinAt).analyticOnNhd hU + have hga : AnalyticOnNhd ℂ g U := + (show DifferentiableOn ℂ g U from fun z hz => (hg z hz).differentiableAt.differentiableWithinAt).analyticOnNhd hU + apply hfa.eqOn_of_preconnected_of_eventuallyEq hga hUc hx + apply local_uniqueness (hA x hx) _ _ he + · exact Filter.Eventually.mono (hU.mem_nhds hx) (fun z hz => hf z hz) + · exact Filter.Eventually.mono (hU.mem_nhds hx) (fun z hz => hg z hz) + + +omit [CompleteSpace R] in +lemma gauge_hasDerivAt {A B H Y : ℂ → R} {z : ℂ} + (hH : HasDerivAt H (B z * H z - H z * A z) z) + (hY : HasDerivAt Y (A z * Y z) z) : + HasDerivAt (fun w => H w * Y w) (B z * (H z * Y z)) z := by + convert! hH.mul hY using 1; try rfl + simp only [sub_mul,mul_assoc,sub_add_cancel] + + + +lemma intertwine_eventually {A P Y : ℂ → R} {x : ℂ} + (hA : AnalyticAt ℂ A x) (hY0 : Y x = 1) + (hY : ∀ᶠ z in 𝓝 x, HasDerivAt Y (A z * Y z) z) + (hP : ∀ᶠ z in 𝓝 x, HasDerivAt P (A z * P z - P z * A z) z) : + ∀ᶠ z in 𝓝 x, P z * Y z = Y z * P x := by + apply local_uniqueness hA + · filter_upwards [hP,hY] with z hp hy + exact gauge_hasDerivAt hp hy + · filter_upwards [hY] with z hz + convert! hz.mul_const (P x) using 1; try rfl + exact (mul_assoc _ _ _).symm + · simp only [hY0,mul_one,one_mul] + +omit [NormedAlgebra ℂ R] [CompleteSpace R] in +lemma transport_intertwines {Y P : ℂ → R} {x s t : ℂ} + (hs : P s * Y s = Y s * P x) (ht : P t * Y t = Y t * P x) + (hu : IsUnit (Y s)) : P t * transport Y s t = transport Y s t * P s := by + have he : P x * Ring.inverse (Y s) = Ring.inverse (Y s) * P s := by + have h := congrArg (fun a => Ring.inverse (Y s) * a * Ring.inverse (Y s)) hs + simpa only [mul_assoc, Ring.mul_inverse_cancel _ hu, mul_one, + ← mul_assoc (Ring.inverse (Y s)) (Y s),Ring.inverse_mul_cancel _ hu,one_mul] using h.symm + unfold transport + rw [← mul_assoc, ht, mul_assoc, he, mul_assoc] + + +omit [CompleteSpace R] in +lemma solutionCoeff_differentiableOn {A : ℕ → ℂ → R} {U : Set ℂ} + (hA : ∀ n, DifferentiableOn ℂ (A n) U) (v : R) (n : ℕ) : + DifferentiableOn ℂ (fun s => solutionCoeff (fun i => A i s) v n) U := by + induction n using Nat.strong_induction_on with + | h n ih => + cases n with + | zero => simp [solutionCoeff] + | succ n => + simp only [solutionCoeff] + have hd : DifferentiableOn ℂ (fun s => + ∑ i ∈ Finset.range (n+1), A i s * solutionCoeff (fun i => A i s) v (n-i)) U := by + apply DifferentiableOn.fun_sum + intro i hi + exact (hA i).fun_mul (ih (n-i) (by omega)) + exact hd.fun_const_smul (((n+1 : ℕ) : ℂ)⁻¹) + + + +def parameterSolution (A : ℕ → ℂ → R) (v : R) (s t : ℂ) : R := + ∑' n, t^n • solutionCoeff (fun i => A i s) v n + + + +lemma parameterSolution_differentiableOn {A : ℕ → ℂ → R} {U : Set ℂ} + {t : ℂ → ℂ} {B r : ℝ} (hU : IsOpen U) (hB : 0 < B) (hr : 0 ≤ r) + (hBr : r*B < 1) (hA : ∀ n, DifferentiableOn ℂ (A n) U) + (hbound : ∀ n s, s ∈ U → ‖A n s‖ ≤ B^(n+1)) + (ht : DifferentiableOn ℂ t U) (htr : ∀ s ∈ U, ‖t s‖ ≤ r) (v : R) : + DifferentiableOn ℂ (fun s => parameterSolution A v s (t s)) U := by + apply Complex.differentiableOn_tsum_of_summable_norm + ((summable_geometric_of_lt_one (mul_nonneg hr hB.le) hBr).mul_right ‖v‖) + (fun n => (ht.pow n).smul (solutionCoeff_differentiableOn hA v n)) hU + intro n s hs + change ‖t s ^ n • solutionCoeff (fun i => A i s) v n‖ ≤ (r*B)^n * ‖v‖ + rw [norm_smul,norm_pow] + calc + ‖t s‖^n * ‖solutionCoeff (fun i => A i s) v n‖ ≤ + r^n * (B^n * ‖v‖) := + mul_le_mul (pow_le_pow_left₀ (norm_nonneg _) (htr s hs) n) + (solutionCoeff_norm v hB (fun i => hbound i s hs) n) + (norm_nonneg _) (pow_nonneg hr _) + _ = (r*B)^n * ‖v‖ := by rw [mul_pow]; ring + +lemma parameterSolution_analyticAt {A : ℕ → ℂ → R} {U : Set ℂ} + {t : ℂ → ℂ} {B r : ℝ} (hU : IsOpen U) (hB : 0 < B) (hr : 0 ≤ r) + (hBr : r*B < 1) (hA : ∀ n, DifferentiableOn ℂ (A n) U) + (hbound : ∀ n s, s ∈ U → ‖A n s‖ ≤ B^(n+1)) + (ht : DifferentiableOn ℂ t U) (htr : ∀ s ∈ U, ‖t s‖ ≤ r) + (v : R) {s : ℂ} (hs : s ∈ U) : + AnalyticAt ℂ (fun s => parameterSolution A v s (t s)) s := + (parameterSolution_differentiableOn hU hB hr hBr hA hbound ht htr v).analyticAt + (hU.mem_nhds hs) + +omit [CompleteSpace R] in +@[simp] lemma parameterSolution_zero (A : ℕ → ℂ → R) (v : R) (s : ℂ) : + parameterSolution A v s 0 = v := by + rw [parameterSolution,tsum_eq_single 0] + · simp [solutionCoeff] + · intro n hn + simp [zero_pow hn] + +omit [CompleteSpace R] in +lemma parameterSolution_eq_series_sum (A : ℕ → ℂ → R) (v : R) (s t : ℂ) : + parameterSolution A v s t = (series (solutionCoeff (fun i => A i s) v)).sum t := by + simp only [parameterSolution,FormalMultilinearSeries.sum,series, + ContinuousMultilinearMap.mkPiRing_apply,Finset.prod_const,Finset.card_univ,Fintype.card_fin] + +lemma parameterSolution_hasDerivAt {A : ℕ → ℂ → R} {B : ℝ} (hB : 0 < B) + {s t : ℂ} (hbound : ∀ n, ‖A n s‖ ≤ B^(n+1)) (ht : ‖t‖ < B⁻¹) (v : R) : + HasDerivAt (parameterSolution A v s) + ((series (fun i => A i s)).sum t * parameterSolution A v s t) t := by + have hradA : ENNReal.ofReal B⁻¹ ≤ (series (fun i => A i s)).radius := + series_radius hB (fun n => by simpa [pow_succ] using hbound n) + have hradY : ENNReal.ofReal B⁻¹ ≤ (series (solutionCoeff (fun i => A i s) v)).radius := + series_radius hB (solutionCoeff_norm v hB hbound) + have hte : ‖t‖ₑ < ENNReal.ofReal B⁻¹ := by + rw [← ofReal_norm] + exact ENNReal.ofReal_lt_ofReal_iff (inv_pos.mpr hB) |>.mpr ht + have he : parameterSolution A v s = (series (solutionCoeff (fun i => A i s) v)).sum := + funext (parameterSolution_eq_series_sum A v s) + rw [he] + exact + hasDerivAt_solutionSeries v hB hbound (hte.trans_le hradA) (hte.trans_le hradY) + + +omit [CompleteSpace R] in +lemma changeOriginSeries_norm_bound {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + (p : FormalMultilinearSeries ℂ E R) (n l : ℕ) : + ‖p.changeOriginSeries n l‖ ≤ (2 : ℝ)^(n+l) * ‖p (n+l)‖ := by + have hc : Fintype.card {s : Finset (Fin (n+l)) // s.card=l} ≤ 2^(n+l) := by + simpa only [Fintype.card_finset,Fintype.card_fin] using + (Fintype.card_subtype_le (fun s : Finset (Fin (n+l)) => s.card=l)) + have hn := p.nnnorm_changeOriginSeries_le_tsum n l + simp only [tsum_fintype,Finset.sum_const,Finset.card_univ,nsmul_eq_mul] at hn + calc + ‖p.changeOriginSeries n l‖ ≤ + (Fintype.card {s : Finset (Fin (n+l)) // s.card=l} : ℝ) * ‖p (n+l)‖ := by + exact_mod_cast hn + _ ≤ (2 : ℝ)^(n+l) * ‖p (n+l)‖ := by + apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) + exact_mod_cast hc + +omit [CompleteSpace R] in +lemma changeOrigin_norm_bound {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {p : FormalMultilinearSeries ℂ E R} {D C : ℝ} (hD : 0 < D) (hC : 0 ≤ C) + (hp : ∀ n, ‖p n‖ ≤ C*D^n) {x : E} (hx : ‖x‖ ≤ (4*D)⁻¹) (n : ℕ) : + ‖p.changeOrigin x n‖ ≤ (2*C) * (2*D)^n := by + have hterm (l : ℕ) : ‖p.changeOriginSeries n l (fun _ => x)‖ ≤ + (C*(2*D)^n) * ((1/2 : ℝ)^l) := by + calc + _ ≤ ‖p.changeOriginSeries n l‖ * ‖x‖^l := by + simpa using (p.changeOriginSeries n l).le_opNorm (fun _ => x) + _ ≤ ((2 : ℝ)^(n+l) * (C*D^(n+l))) * ((4*D)⁻¹)^l := by + apply mul_le_mul + · exact (changeOriginSeries_norm_bound p n l).trans + (mul_le_mul_of_nonneg_left (hp (n+l)) (by positivity)) + · exact pow_le_pow_left₀ (norm_nonneg _) hx l + · positivity + · positivity + _ = (C*(2*D)^n) * ((1/2 : ℝ)^l) := by + have he0 : (2 : ℝ)^(n+l) * (C*D^(n+l)) = C*((2*D)^(n+l)) := by + rw [mul_pow]; ring + rw [he0,pow_add] + have he : (2*D) * (4*D)⁻¹ = (1/2 : ℝ) := by field_simp [hD.ne']; ring + rw [show C * ((2*D)^n * (2*D)^l) * ((4*D)⁻¹)^l = + (C*(2*D)^n) * (((2*D)*((4*D)⁻¹))^l) by rw [mul_pow (2*D) ((4*D)⁻¹) l]; ring] + rw [he] + have hs : Summable (fun l : ℕ => (C*(2*D)^n) * (1/2 : ℝ)^l) := + (summable_geometric_of_lt_one (by norm_num : (0:ℝ) ≤ 1/2) (by norm_num)).mul_left _ + calc + _ ≤ ∑' l : ℕ, (C*(2*D)^n) * (1/2 : ℝ)^l := by + exact tsum_of_norm_bounded hs.hasSum hterm + _ = (2*C) * (2*D)^n := by + rw [tsum_mul_left,tsum_geometric_of_lt_one (by norm_num : (0:ℝ) ≤ 1/2) (by norm_num)] + ring + + + +def verticalCoeff (p : FormalMultilinearSeries ℂ (ℂ × ℂ) R) (n : ℕ) (s : ℂ) : R := + p.changeOrigin (s,0) n (fun _ => (0,1)) + +lemma verticalCoeff_differentiableAt {p : FormalMultilinearSeries ℂ (ℂ × ℂ) R} + (hp : 0 < p.radius) (n : ℕ) {s : ℂ} (hs : ‖s‖ₑ < p.radius) : + DifferentiableAt ℂ (verticalCoeff p n) s := by + have hs' : (s, (0:ℂ)) ∈ Metric.eball 0 p.radius := by + rw [Metric.mem_eball,edist_eq_enorm_sub,sub_zero,← ofReal_norm] + simpa using hs + have hc := (p.hasFPowerSeriesOnBall_changeOrigin n hp).analyticAt_of_mem hs' + exact (ContinuousMultilinearMap.apply ℂ (fun _ : Fin n => ℂ × ℂ) R + (fun _ => (0,1))).differentiableAt.comp s + (hc.differentiableAt.comp s (differentiableAt_id.prodMk (differentiableAt_const (0:ℂ)))) + +omit [CompleteSpace R] in +lemma verticalCoeff_bound {p : FormalMultilinearSeries ℂ (ℂ × ℂ) R} + {D C : ℝ} (hD : 0 < D) (hC : 0 ≤ C) (hp : ∀ n, ‖p n‖ ≤ C*D^n) + {s : ℂ} (hs : ‖s‖ ≤ (4*D)⁻¹) (n : ℕ) : + ‖verticalCoeff p n s‖ ≤ (2*C) * (2*D)^n := by + have he : ‖verticalCoeff p n s‖ ≤ ‖p.changeOrigin (s,0) n‖ := by + simpa [verticalCoeff] using + (p.changeOrigin (s,0) n).le_opNorm (fun _ => ((0:ℂ),(1:ℂ))) + exact he.trans (changeOrigin_norm_bound hD hC hp (by simpa using hs) n) + +omit [CompleteSpace R] in +lemma verticalCoeff_sum (p : FormalMultilinearSeries ℂ (ℂ × ℂ) R) (s t : ℂ) : + (series (fun n => verticalCoeff p n s)).sum t = (p.changeOrigin (s,0)).sum (0,t) := by + unfold FormalMultilinearSeries.sum + apply tsum_congr + intro n + simp only [FormalMultilinearSeries.apply_eq_pow_smul_coeff,series_coeff,verticalCoeff] + convert! ((p.changeOrigin (s,0) n).map_smul_univ (fun _ => t) (fun _ => ((0:ℂ),(1:ℂ)))).symm using 1 <;> simp + + +lemma analytic_coefficient_polydisk {A : ℂ × ℂ → R} (hA : AnalyticAt ℂ A (0,0)) : + ∃ (c : ℕ → ℂ → R) (δ B : ℝ), 0 < δ ∧ 0 < B ∧ δ*B < 1 ∧ + (∀ n, DifferentiableOn ℂ (c n) (Metric.ball 0 δ)) ∧ + (∀ n s, ‖s‖ < δ → ‖c n s‖ ≤ B^(n+1)) ∧ + (∀ s t, ‖s‖ < δ → ‖t‖ < δ → (series (fun n => c n s)).sum t = A (s,t)) := by + obtain ⟨p,ρ,hp⟩ := hA + obtain ⟨r,hr0,hrρ⟩ := ENNReal.lt_iff_exists_nnreal_btwn.mp hp.r_pos + have hr : 0 < r := by exact_mod_cast hr0 + have hrr : (0 : ℝ) < r := hr + have hrp : (r : ENNReal) < p.radius := hrρ.trans_le hp.r_le + obtain ⟨C,hC,hCp⟩ := p.norm_le_div_pow_of_pos_of_lt_radius hr hrp + let D : ℝ := (r : ℝ)⁻¹ + have hD : 0 < D := inv_pos.mpr hrr + have hpd (n : ℕ) : ‖p n‖ ≤ C*D^n := by + simpa [D,div_eq_mul_inv,inv_pow] using hCp n + let B := max (2*C) (2*D) + have hCB : 2*C ≤ B := le_max_left _ _ + have hDB : 2*D ≤ B := le_max_right _ _ + have hB : 0 < B := lt_of_lt_of_le (by positivity) hCB + let δ := min ((4*D)⁻¹) (min ((r:ℝ)/3) (B⁻¹/2)) + have hδ : 0 < δ := lt_min (by positivity) (lt_min (by positivity) (by positivity)) + have hδD : δ ≤ (4*D)⁻¹ := min_le_left _ _ + have hδr : δ ≤ (r:ℝ)/3 := (min_le_right _ _).trans (min_le_left _ _) + have hδB : δ ≤ B⁻¹/2 := (min_le_right _ _).trans (min_le_right _ _) + have hδBr : δ*B < 1 := by + calc + δ*B ≤ (B⁻¹/2)*B := mul_le_mul_of_nonneg_right hδB hB.le + _ = 1/2 := by field_simp + _ < 1 := by norm_num + have hsr (s : ℂ) (hs : ‖s‖ < δ) : ‖s‖ < (r:ℝ) := by linarith + have hse (s : ℂ) (hs : ‖s‖ < δ) : ‖s‖ₑ < (r:ENNReal) := by exact_mod_cast hsr s hs + refine ⟨verticalCoeff p,δ,B,hδ,hB,hδBr,?_,?_,?_⟩ + · intro n s hs + apply (verticalCoeff_differentiableAt (hp.r_pos.trans_le hp.r_le) n + ((hse s (by simpa using hs)).trans hrp)).differentiableWithinAt + · intro n s hs + calc + ‖verticalCoeff p n s‖ ≤ (2*C)*(2*D)^n := verticalCoeff_bound hD hC.le hpd (hs.le.trans hδD) n + _ ≤ B*B^n := mul_le_mul hCB (pow_le_pow_left₀ (by positivity) hDB n) (by positivity) hB.le + _ = B^(n+1) := by rw [pow_succ,mul_comm] + · intro s t hs ht + rw [verticalCoeff_sum] + have hsum : ‖s‖ + ‖t‖ < (r:ℝ) := by linarith + have hsum' : (‖(s,(0:ℂ))‖₊ + ‖((0:ℂ),t)‖₊ : ENNReal) < (r:ENNReal) := by + simp only [Prod.nnnorm_def,nnnorm_zero,max_eq_left (show (0:NNReal) ≤ ‖s‖₊ from zero_le),max_eq_right (show (0:NNReal) ≤ ‖t‖₊ from zero_le)] + exact_mod_cast hsum + rw [p.changeOrigin_eval (hsum'.trans hrp)] + have hmem : (s,t) ∈ Metric.eball (0:ℂ × ℂ) ρ := by + rw [Metric.mem_eball,edist_eq_enorm_sub,sub_zero,← ofReal_norm] + apply lt_trans _ hrρ + rw [← ENNReal.ofReal_coe_nnreal] + apply ENNReal.ofReal_lt_ofReal_iff hrr |>.mpr + exact max_lt (hsr s hs) (hsr t ht) + simpa using (hp.sum hmem).symm + +lemma parameterSolution_continuousOn {c : ℕ → ℂ → R} {U : Set ℂ} + {B r : ℝ} (hB : 0 < B) (hr : 0 ≤ r) (hrB : r*B < 1) + (hc : ∀ n, ContinuousOn (c n) U) + (hbound : ∀ n s, s ∈ U → ‖c n s‖ ≤ B^(n+1)) (v : R) : + ContinuousOn (fun w : ℂ × ℂ => parameterSolution c v w.1 w.2) + (U ×ˢ Metric.closedBall 0 r) := by + refine continuousOn_tsum (fun n => ?_) + ((summable_geometric_of_lt_one (mul_nonneg hr hB.le) hrB).mul_right ‖v‖) ?_ + · have hsc (n : ℕ) : ContinuousOn (fun s => solutionCoeff (fun i => c i s) v n) U := by + induction n using Nat.strong_induction_on with + | h n ih => + cases n with + | zero => simpa [solutionCoeff] using (continuousOn_const (c := v) (s := U)) + | succ n => + simp only [solutionCoeff] + apply ContinuousOn.const_smul + apply continuousOn_finsetSum + intro i hi + exact (hc i).mul (ih (n-i) (by omega)) + exact (continuousOn_snd.pow n).smul ((hsc n).comp continuousOn_fst (fun _ hw => hw.1)) + · intro n w hw + change ‖w.2^n • solutionCoeff (fun i => c i w.1) v n‖ ≤ (r*B)^n * ‖v‖ + rw [norm_smul,norm_pow] + have hwr : ‖w.2‖ ≤ r := by simpa using hw.2 + calc + _ ≤ r^n * (B^n*‖v‖) := mul_le_mul + (pow_le_pow_left₀ (norm_nonneg _) hwr n) + (solutionCoeff_norm v hB (fun i => hbound i w.1 hw.1) n) + (norm_nonneg _) (pow_nonneg hr _) + _ = _ := by rw [mul_pow]; ring + + + +lemma parameterSolution_analyticAt_curves {c : ℕ → ℂ → R} {δ B : ℝ} + (hδ : 0 < δ) (hB : 0 < B) (hδB : δ*B < 1) + (hc : ∀ n, DifferentiableOn ℂ (c n) (Metric.ball 0 δ)) + (hbound : ∀ n s, ‖s‖ < δ → ‖c n s‖ ≤ B^(n+1)) + {q t : ℂ → ℂ} {z : ℂ} (hq : AnalyticAt ℂ q z) (ht : AnalyticAt ℂ t z) + (hqδ : ‖q z‖ < δ) (htδ : ‖t z‖ < δ) (v : R) : + AnalyticAt ℂ (fun w => parameterSolution c v (q w) (t w)) z := by + have hqb' : ∀ᶠ w in 𝓝 z, q w ∈ Metric.ball 0 δ := + hq.continuousAt.eventually (Metric.isOpen_ball.mem_nhds (mem_ball_zero_iff.mpr hqδ)) + have htb' : ∀ᶠ w in 𝓝 z, t w ∈ Metric.ball 0 δ := + ht.continuousAt.eventually (Metric.isOpen_ball.mem_nhds (mem_ball_zero_iff.mpr htδ)) + have hqb : ∀ᶠ w in 𝓝 z, ‖q w‖ < δ := hqb'.mono (fun _ hw => mem_ball_zero_iff.mp hw) + have htb : ∀ᶠ w in 𝓝 z, ‖t w‖ < δ := htb'.mono (fun _ hw => mem_ball_zero_iff.mp hw) + obtain ⟨η,hη,he⟩ := Metric.eventually_nhds_iff_ball.mp + ((hq.eventually_analyticAt.and ht.eventually_analyticAt).and (hqb.and htb)) + have hqd : DifferentiableOn ℂ q (Metric.ball z η) := fun w hw => + (he w hw).1.1.differentiableAt.differentiableWithinAt + have htd : DifferentiableOn ℂ t (Metric.ball z η) := fun w hw => + (he w hw).1.2.differentiableAt.differentiableWithinAt + have hcd (n : ℕ) : DifferentiableOn ℂ (fun w => c n (q w)) (Metric.ball z η) := + (hc n).comp hqd (fun w hw => by simpa using (he w hw).2.1) + exact parameterSolution_analyticAt Metric.isOpen_ball hB hδ.le hδB hcd + (fun n w hw => hbound n (q w) (he w hw).2.1) htd + (fun w hw => (he w hw).2.2.le) v (Metric.mem_ball_self hη) + + + +lemma exists_parameter_fundamental {A : ℂ × ℂ → R} (hA : AnalyticAt ℂ A (0,0)) : + ∃ (Y : ℂ → ℂ → R) (ε : ℝ), 0 < ε ∧ + (∀ s, Y s 0 = 1) ∧ + (∀ s t, ‖s‖ < ε → ‖t‖ < ε → + HasDerivAt (Y s) (A (s,t)*Y s t) t ∧ IsUnit (Y s t)) ∧ + (∀ (q t : ℂ → ℂ) z, AnalyticAt ℂ q z → AnalyticAt ℂ t z → + ‖q z‖ < ε → ‖t z‖ < ε → AnalyticAt ℂ (fun w => Y (q w) (t w)) z) := by + obtain ⟨c,δ,B,hδ,hB,hδB,hc,hbound,hsum⟩ := analytic_coefficient_polydisk hA + let Y := parameterSolution c (1:R) + have hYc : ContinuousAt (fun w : ℂ × ℂ => Y w.1 w.2) (0,0) := by + apply (parameterSolution_continuousOn hB hδ.le hδB + (fun n => (hc n).continuousOn) (fun n s hs => hbound n s (by simpa using hs)) 1).continuousAt + exact prod_mem_nhds (Metric.ball_mem_nhds 0 hδ) (Metric.closedBall_mem_nhds 0 hδ) + have hYu : ∀ᶠ w : ℂ × ℂ in 𝓝 (0,0), IsUnit (Y w.1 w.2) := by + apply hYc.eventually + have hy0 : Y 0 0 = 1 := parameterSolution_zero c 1 0 + apply Units.isOpen.mem_nhds + change IsUnit (Y 0 0) + rw [hy0] + exact isUnit_one + obtain ⟨η,hη,hηu⟩ := Metric.eventually_nhds_iff_ball.mp hYu + let ε := min δ η + have hε : 0 < ε := lt_min hδ hη + have hεδ : ε ≤ δ := min_le_left _ _ + have hεη : ε ≤ η := min_le_right _ _ + refine ⟨Y,ε,hε,parameterSolution_zero c 1,?_,?_⟩ + · intro s t hs ht + constructor + · have htB : ‖t‖ < B⁻¹ := by + have hdB : δ < B⁻¹ := by + apply (mul_lt_mul_iff_left₀ hB).mp + rw [inv_mul_cancel₀ hB.ne'] + simpa [mul_comm] using hδB + exact (ht.trans_le hεδ).trans hdB + have hd := parameterSolution_hasDerivAt hB (fun n => hbound n s (hs.trans_le hεδ)) htB (1:R) + rw [hsum s t (hs.trans_le hεδ) (ht.trans_le hεδ)] at hd + exact hd + · apply hηu (s,t) + simp only [Metric.mem_ball,dist_eq_norm,Prod.mk_sub_mk,sub_zero,Prod.norm_def] + exact max_lt (hs.trans_le hεη) (ht.trans_le hεη) + · intro q t z hq ht hqε htε + exact parameterSolution_analyticAt_curves hδ hB hδB hc hbound hq ht + (hqε.trans_le hεδ) (htε.trans_le hεδ) 1 + + + + + +theorem exists_parameter_transport {A : ℂ × ℂ → R} (hA : AnalyticAt ℂ A (0,0)) : + ∃ (T : ℂ → ℂ → ℂ → R) (ε : ℝ), 0 < ε ∧ + (∀ s u, ‖s‖ < ε → ‖u‖ < ε → T s u u = 1) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → IsUnit (T s u v)) ∧ + (∀ s u v w, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → ‖w‖ < ε → + T s v w * T s u v = T s u w) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → + HasDerivAt (T s u) (A (s,v)*T s u v) v) ∧ + (∀ (q u v : ℂ → ℂ) z, AnalyticAt ℂ q z → AnalyticAt ℂ u z → AnalyticAt ℂ v z → + ‖q z‖ < ε → ‖u z‖ < ε → ‖v z‖ < ε → + AnalyticAt ℂ (fun w => T (q w) (u w) (v w)) z) := by + obtain ⟨Y,ε,hε,hY0,hYd,hYa⟩ := exists_parameter_fundamental hA + refine ⟨fun s => transport (Y s),ε,hε,?_,?_,?_,?_,?_⟩ + · intro s u hs hu + exact transport_self (hYd s u hs hu).2 + · intro s u v hs hu hv + exact transport_isUnit (hYd s u hs hu).2 (hYd s v hs hv).2 + · intro s u v w hs hu hv hw + exact transport_trans (hYd s v hs hv).2 + · intro s u v hs hu hv + exact transport_hasDerivAt (A := fun t => A (s,t)) (hYd s v hs hv).1 + · intro q u v z hq hu hv hqs hus hvs + have hsu := hYa q u z hq hu hqs hus + have hsv := hYa q v z hq hv hqs hvs + exact hsv.mul ((analyticOnNhd_inverse (𝕜 := ℂ) _ (hYd (q z) (u z) hqs hus).2).comp_of_eq hsu rfl) + +end + +variable {R : Type*} [NormedRing R] [NormedAlgebra ℂ R] [CompleteSpace R] + +omit [CompleteSpace R] in +lemma idempotent_derivative {P : ℂ → R} {P' : R} {z : ℂ} + (hP : HasDerivAt P P' z) (hid : ∀ᶠ w in 𝓝 z, P w * P w = P w) : + P' * P z + P z * P' = P' := by + exact (hP.mul hP).unique (hP.congr_of_eventuallyEq hid) + +omit [NormedAlgebra ℂ R] [CompleteSpace R] in +lemma projector_derivative_sandwich {p q : R} (hp : p*p=p) + (hq : q*p+p*q=q) : p*q*p=0 := by + have hh := congrArg (fun a => p*a) hq + have he : p*q*p+p*q=p*q := by + simpa only [mul_add,← mul_assoc,hp] using hh + exact add_eq_right.mp he + + + +def projectorODE (P B : ℂ → R) (z : ℂ) : R := + deriv P z * P z - P z * deriv P z - P z * B z * P z + +omit [CompleteSpace R] in +lemma projectorODE_commutator {P B : ℂ → R} {z : ℂ} + (hP : DifferentiableAt ℂ P z) (hid : ∀ᶠ w in 𝓝 z, P w*P w=P w) : + projectorODE P B z * P z - P z * projectorODE P B z = deriv P z := by + have hh := idempotent_derivative hP.hasDerivAt hid + have hp := hid.self_of_nhds + have hz := projector_derivative_sandwich hp hh + calc + projectorODE P B z * P z - P z * projectorODE P B z = + deriv P z * (P z*P z) + (P z*P z)*deriv P z - + (P z*deriv P z*P z+P z*deriv P z*P z) - + P z*B z*(P z*P z)+(P z*P z)*B z*P z := by + unfold projectorODE + noncomm_ring + _ = deriv P z := by rw [hp,hz,add_zero,sub_zero,sub_add_cancel,hh] + +lemma projectorODE_analyticAt {P B : ℂ → R} {z : ℂ} + (hP : AnalyticAt ℂ P z) (hB : AnalyticAt ℂ B z) : + AnalyticAt ℂ (projectorODE P B) z := + ((hP.deriv.mul hP).sub (hP.mul hP.deriv)).sub ((hP.mul hB).mul hP) + + + +theorem exists_local_projector_transport {P B : ℂ → R} {x : ℂ} + (hP : AnalyticAt ℂ P x) (hB : AnalyticAt ℂ B x) + (hid : ∀ᶠ z in 𝓝 x, P z*P z=P z) : + ∃ ε : ℝ, 0 < ε ∧ ∃ T : ℂ → ℂ → R, + AnalyticOnNhd ℂ (fun w : ℂ × ℂ => T w.1 w.2) + (Metric.ball x ε ×ˢ Metric.ball x ε) ∧ + (∀ s ∈ Metric.ball x ε, T s s=1) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, IsUnit (T s t)) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, ∀ u ∈ Metric.ball x ε, + T t u*T s t=T s u) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, + HasDerivAt (T s) (projectorODE P B t * T s t) t) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, + P t*T s t=T s t*P s) := by + have hA := projectorODE_analyticAt hP hB + obtain ⟨Y,hYa,hYx,hY⟩ := exists_local_fundamental hA + have hpd : ∀ᶠ z in 𝓝 x, HasDerivAt P + (projectorODE P B z * P z-P z*projectorODE P B z) z := by + filter_upwards [hP.eventually_analyticAt,eventually_eventually_nhds.mpr hid] with z hz hi + rw [projectorODE_commutator hz.differentiableAt hi] + exact hz.differentiableAt.hasDerivAt + have hint := intertwine_eventually hA hYx (hY.mono fun _ h => h.1) hpd + obtain ⟨ε,hε,he⟩ := Metric.eventually_nhds_iff_ball.mp + (hYa.eventually_analyticAt.and (hY.and hint)) + refine ⟨ε,hε,transport Y,?_,?_,?_,?_,?_,?_⟩ + · intro w hw + exact transport_analyticAt (he w.1 hw.1).1 (he w.2 hw.2).1 (he w.1 hw.1).2.1.2 + · intro s hs + exact transport_self (he s hs).2.1.2 + · intro s hs t ht + exact transport_isUnit (he s hs).2.1.2 (he t ht).2.1.2 + · intro s hs t ht u hu + exact transport_trans (he t ht).2.1.2 + · intro s hs t ht + exact transport_hasDerivAt (he t ht).2.1.1 + · intro s hs t ht + exact transport_intertwines (he s hs).2.2 (he t ht).2.2 (he s hs).2.1.2 + +end SplitTangent.HolomorphicLinearODE + +namespace SplitTangent.ParameterProjector +section +open HolomorphicLinearODE +variable {R : Type*} [NormedRing R] [NormedAlgebra ℂ R] [CompleteSpace R] + + +def verticalDerivative (P : ℂ × ℂ → R) (w : ℂ × ℂ) : R := fderiv ℂ P w (0,1) + +omit [CompleteSpace R] in +lemma hasDerivAt_vertical {P : ℂ × ℂ → R} {s t : ℂ} + (hP : DifferentiableAt ℂ P (s,t)) : + HasDerivAt (fun v => P (s,v)) (verticalDerivative P (s,t)) t := by + exact hP.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_const t s).prodMk (hasDerivAt_id t)) + +lemma verticalDerivative_analyticAt {P : ℂ × ℂ → R} {w : ℂ × ℂ} + (hP : AnalyticAt ℂ P w) : AnalyticAt ℂ (verticalDerivative P) w := + ((ContinuousLinearMap.apply ℂ R (E := ℂ × ℂ)).analyticAt_bilinear _).comp + (analyticAt_const.prod hP.fderiv) + +def equation (P B : ℂ × ℂ → R) (w : ℂ × ℂ) : R := + verticalDerivative P w * P w - P w * verticalDerivative P w - P w * B w * P w + +lemma equation_analyticAt {P B : ℂ × ℂ → R} {w : ℂ × ℂ} + (hP : AnalyticAt ℂ P w) (hB : AnalyticAt ℂ B w) : AnalyticAt ℂ (equation P B) w := + (((verticalDerivative_analyticAt hP).mul hP).sub + (hP.mul (verticalDerivative_analyticAt hP))).sub ((hP.mul hB).mul hP) + +omit [CompleteSpace R] in +lemma equation_eq {P B : ℂ × ℂ → R} {s t : ℂ} + (hP : DifferentiableAt ℂ P (s,t)) : + equation P B (s,t) = projectorODE (fun v => P (s,v)) (fun v => B (s,v)) t := by + simp only [equation,projectorODE,(hasDerivAt_vertical hP).deriv] + + + +lemma exists_preserving_parameter_fundamental {P B : ℂ × ℂ → R} + (hP : AnalyticAt ℂ P (0,0)) (hB : AnalyticAt ℂ B (0,0)) + (hid : ∀ᶠ w in 𝓝 (0,0), P w*P w=P w) : + ∃ (Y : ℂ → ℂ → R) (ε : ℝ), 0 < ε ∧ + (∀ s, Y s 0=1) ∧ + (∀ s t, ‖s‖ < ε → ‖t‖ < ε → + HasDerivAt (Y s) (equation P B (s,t)*Y s t) t ∧ IsUnit (Y s t)) ∧ + (∀ s t, ‖s‖ < ε → ‖t‖ < ε → P (s,t)*Y s t=Y s t*P (s,0)) ∧ + (∀ (q t : ℂ → ℂ) z, AnalyticAt ℂ q z → AnalyticAt ℂ t z → + ‖q z‖ < ε → ‖t z‖ < ε → AnalyticAt ℂ (fun w => Y (q w) (t w)) z) := by + have hA := equation_analyticAt hP hB + obtain ⟨Y,r,hr,hY0,hYd,hYa⟩ := exists_parameter_fundamental hA + obtain ⟨η,hη,hηd⟩ := Metric.eventually_nhds_iff_ball.mp + ((hP.eventually_analyticAt.and hA.eventually_analyticAt).and hid) + let ε := min r η + have hε : 0 < ε := lt_min hr hη + have hεr : ε ≤ r := min_le_left _ _ + have hεη : ε ≤ η := min_le_right _ _ + have hpol (s t : ℂ) (hs : ‖s‖ < ε) (ht : ‖t‖ < ε) : + AnalyticAt ℂ P (s,t) ∧ AnalyticAt ℂ (equation P B) (s,t) ∧ P (s,t)*P (s,t)=P (s,t) := by + have hm : (s,t) ∈ Metric.ball (0,0) η := by + simp only [Metric.mem_ball,dist_eq_norm,Prod.mk_sub_mk,sub_zero,Prod.norm_def] + exact max_lt (hs.trans_le hεη) (ht.trans_le hεη) + exact ⟨(hηd (s,t) hm).1.1,(hηd (s,t) hm).1.2,(hηd (s,t) hm).2⟩ + refine ⟨Y,ε,hε,hY0,fun s t hs ht => hYd s t (hs.trans_le hεr) (ht.trans_le hεr),?_,?_⟩ + · intro s t hs ht + have hconn (v : ℂ) (hv : v ∈ Metric.ball 0 ε) : + HasDerivAt (fun w => P (s,w)) + (equation P B (s,v)*P (s,v)-P (s,v)*equation P B (s,v)) v := by + have hpa := (hpol s v hs (mem_ball_zero_iff.mp hv)).1 + have hpd := hasDerivAt_vertical hpa.differentiableAt + have hi : ∀ᶠ w in 𝓝 v, P (s,w)*P (s,w)=P (s,w) := by + filter_upwards [Metric.isOpen_ball.mem_nhds hv] with w hw + exact (hpol s w hs (mem_ball_zero_iff.mp hw)).2.2 + rw [equation_eq hpa.differentiableAt, + projectorODE_commutator hpd.differentiableAt hi] + exact hpd.differentiableAt.hasDerivAt + have ha : AnalyticOnNhd ℂ (fun v => equation P B (s,v)) (Metric.ball 0 ε) := by + intro v hv + exact (hpol s v hs (mem_ball_zero_iff.mp hv)).2.1.comp (analyticAt_const.prod analyticAt_id) + have he := eqOn_of_solution (f := fun v => P (s,v)*Y s v) + Metric.isOpen_ball (convex_ball (0:ℂ) ε).isPreconnected ha + (fun v hv => gauge_hasDerivAt (A := fun v => equation P B (s,v)) + (B := fun v => equation P B (s,v)) (H := fun v => P (s,v)) (Y := Y s) (hconn v hv) + (hYd s v (hs.trans_le hεr) ((mem_ball_zero_iff.mp hv).trans_le hεr)).1) + (g := fun v => Y s v * P (s,0)) ?_ (Metric.mem_ball_self hε) ?_ + · exact he (mem_ball_zero_iff.mpr ht) + · intro v hv + convert! ((hYd s v (hs.trans_le hεr) ((mem_ball_zero_iff.mp hv).trans_le hεr)).1).mul_const (P (s,0)) using 1; try rfl + exact (mul_assoc _ _ _).symm + · simp only [hY0,mul_one,one_mul] + · intro q t z hq ht hqε htε + exact hYa q t z hq ht (hqε.trans_le hεr) (htε.trans_le hεr) + +end + +open HolomorphicLinearODE +variable {R : Type*} [NormedRing R] [NormedAlgebra ℂ R] [CompleteSpace R] + +lemma exists_preserving_parameter_transport {P B : ℂ × ℂ → R} + (hP : AnalyticAt ℂ P (0,0)) (hB : AnalyticAt ℂ B (0,0)) + (hid : ∀ᶠ w in 𝓝 (0,0), P w*P w=P w) : + ∃ (T : ℂ → ℂ → ℂ → R) (ε : ℝ), 0 < ε ∧ + (∀ s u, ‖s‖ < ε → ‖u‖ < ε → T s u u=1) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → IsUnit (T s u v)) ∧ + (∀ s u v w, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → ‖w‖ < ε → + T s v w*T s u v=T s u w) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → + HasDerivAt (T s u) (equation P B (s,v)*T s u v) v ∧ + P (s,v)*T s u v=T s u v*P (s,u)) ∧ + (∀ (q u v : ℂ → ℂ) z, AnalyticAt ℂ q z → AnalyticAt ℂ u z → AnalyticAt ℂ v z → + ‖q z‖ < ε → ‖u z‖ < ε → ‖v z‖ < ε → + AnalyticAt ℂ (fun w => T (q w) (u w) (v w)) z) := by + obtain ⟨Y,ε,hε,hY0,hYd,hYP,hYa⟩ := exists_preserving_parameter_fundamental hP hB hid + refine ⟨fun s => transport (Y s),ε,hε,?_,?_,?_,?_,?_⟩ + · intro s u hs hu + exact transport_self (hYd s u hs hu).2 + · intro s u v hs hu hv + exact transport_isUnit (hYd s u hs hu).2 (hYd s v hs hv).2 + · intro s u v w hs hu hv hw + exact transport_trans (hYd s v hs hv).2 + · intro s u v hs hu hv + exact ⟨transport_hasDerivAt (A := fun t => equation P B (s,t)) (hYd s v hs hv).1, + transport_intertwines (P := fun t => P (s,t)) (hYP s u hs hu) (hYP s v hs hv) (hYd s u hs hu).2⟩ + · intro q u v z hq hu hv hqs hus hvs + have hsu := hYa q u z hq hu hqs hus + have hsv := hYa q v z hq hv hqs hvs + exact hsv.mul ((analyticOnNhd_inverse (𝕜 := ℂ) _ (hYd (q z) (u z) hqs hus).2).comp_of_eq hsu rfl) + +end SplitTangent.ParameterProjector + +namespace SplitTangent.PullbackConnection +section +open HolomorphicLinearODE +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + + +omit [CompleteSpace E] in +lemma projected_bracket_eq {P : E → E →L[ℂ] E} {ξ e : E → E} {y : E} + (hP : DifferentiableAt ℂ P y) (hξ : DifferentiableAt ℂ ξ y) + (hzero : ∀ᶠ z in 𝓝 y, P z (ξ z)=0) : + P y (VectorField.lieBracket ℂ ξ e y) = + P y (fderiv ℂ e y (ξ y)) + (fderiv ℂ P y (e y)) (ξ y) := by + have hd := (hP.hasFDerivAt.clm_apply hξ.hasFDerivAt).unique + ((hasFDerivAt_const (0:E) y).congr_of_eventuallyEq hzero) + have hv := congrArg (fun A : E →L[ℂ] E => A (e y)) hd + simp only [add_apply,ContinuousLinearMap.comp_apply, + ContinuousLinearMap.flip_apply,zero_apply] at hv + simp only [VectorField.lieBracket,map_sub] + rw [eq_neg_of_add_eq_zero_left hv,sub_neg_eq_add] + + +def coefficient (P : E → E →L[ℂ] E) (g : ℂ → E) (z : ℂ) : E →L[ℂ] E := + (fderiv ℂ P (g z)).flip (deriv g z) + + +def covariantDerivative (P : E → E →L[ℂ] E) (g v : ℂ → E) (z : ℂ) : E := + P (g z) (deriv v z) + P (g z) (coefficient P g z (v z)) + +lemma coefficient_analyticAt {P : E → E →L[ℂ] E} {g : ℂ → E} {z : ℂ} + (hP : AnalyticAt ℂ P (g z)) (hg : AnalyticAt ℂ g z) : + AnalyticAt ℂ (coefficient P g) z := by + have ha : AnalyticAt ℂ (fun w => (fderiv ℂ P (g w)).flip) z := + ((ContinuousLinearMap.flipₗᵢ (𝕜 := ℂ) (E := E) (Fₗ := E) (Gₗ := E)).toContinuousLinearEquiv.toContinuousLinearMap.analyticAt _).comp + (hP.fderiv.comp hg) + exact (ha.contDiffAt.clm_apply hg.deriv.contDiffAt).analyticAt + +omit [CompleteSpace E] in +lemma covariantDerivative_pulled_section {P : E → E →L[ℂ] E} + {g : ℂ → E} {e ξ : E → E} {z : ℂ} + (hP : DifferentiableAt ℂ P (g z)) (he : DifferentiableAt ℂ e (g z)) + (hξ : DifferentiableAt ℂ ξ (g z)) (hg : DifferentiableAt ℂ g z) + (hzero : ∀ᶠ y in 𝓝 (g z), P y (ξ y)=0) (hvel : ξ (g z)=deriv g z) + (hid : ∀ v, P (g z) (P (g z) v)=P (g z) v) : + covariantDerivative P g (e ∘ g) z = + P (g z) (VectorField.lieBracket ℂ ξ e (g z)) := by + have hbr := projected_bracket_eq (e := e) hP hξ hzero + rw [hvel] at hbr + have hd := (he.hasFDerivAt.comp_hasDerivAt z hg.hasDerivAt).deriv + unfold covariantDerivative coefficient + rw [hd] + have hp : P (g z) (P (g z) (VectorField.lieBracket ℂ ξ e (g z))) = + P (g z) (P (g z) (fderiv ℂ e (g z) (deriv g z)) + + (fderiv ℂ P (g z) (e (g z))) (deriv g z)) := congrArg (P (g z)) hbr + simpa only [hid,map_add,ContinuousLinearMap.flip_apply,Function.comp_apply] using hp.symm + +omit [CompleteSpace E] in +lemma covariantDerivative_leibniz {P : E → E →L[ℂ] E} {g v : ℂ → E} + {f : ℂ → ℂ} {z : ℂ} (hf : DifferentiableAt ℂ f z) (hv : DifferentiableAt ℂ v z) : + covariantDerivative P g (fun w => f w • v w) z = + deriv f z • P (g z) (v z) + f z • covariantDerivative P g v z := by + unfold covariantDerivative + have hd : deriv (fun w => f w • v w) z = deriv f z • v z + f z • deriv v z := + by simpa only [add_comm] using deriv_fun_smul hf hv + rw [hd] + simp only [map_add,map_smul,smul_add] + abel + + +def equation (P : E → E →L[ℂ] E) (g : ℂ → E) : ℂ → E →L[ℂ] E := + projectorODE (P ∘ g) (coefficient P g) + +lemma equation_analyticAt {P : E → E →L[ℂ] E} {g : ℂ → E} {z : ℂ} + (hP : AnalyticAt ℂ P (g z)) (hg : AnalyticAt ℂ g z) : + AnalyticAt ℂ (equation P g) z := + projectorODE_analyticAt (hP.comp hg) (coefficient_analyticAt hP hg) + +omit [CompleteSpace E] in +lemma projectorODE_horizontal {P B : ℂ → E →L[ℂ] E} {z : ℂ} {v : E} + (hP : DifferentiableAt ℂ P z) (hid : ∀ᶠ w in 𝓝 z, P w * P w = P w) + (hv : P z v = v) : + P z (projectorODE P B z v) + P z (B z v) = 0 := by + have hi := hid.self_of_nhds + have hz := projector_derivative_sandwich hi (idempotent_derivative hP.hasDerivAt hid) + have hvz := congrArg (fun A : E →L[ℂ] E => A v) hz + simp only [mul_apply_eq_comp,hv,zero_apply] at hvz + have hi' : ∀ w, P z (P z w) = P z w := fun w => + congrArg (fun A : E →L[ℂ] E => A w) hi + simp only [projectorODE,sub_apply,mul_apply_eq_comp,map_sub,hv,hi',hvz,map_zero] + abel + +omit [CompleteSpace E] in +lemma horizontal_of_equation {P : E → E →L[ℂ] E} {g v : ℂ → E} {z : ℂ} + (hP : DifferentiableAt ℂ (P ∘ g) z) + (hid : ∀ᶠ w in 𝓝 z, P (g w) * P (g w) = P (g w)) + (him : P (g z) (v z) = v z) + (hv : HasDerivAt v (equation P g z (v z)) z) : + covariantDerivative P g v z = 0 := by + unfold covariantDerivative + rw [hv.deriv] + exact projectorODE_horizontal hP hid him + + + +theorem exists_local_horizontal_transport {P : E → E →L[ℂ] E} {g : ℂ → E} {x : ℂ} + (hP : AnalyticAt ℂ P (g x)) (hg : AnalyticAt ℂ g x) + (hid : ∀ᶠ y in 𝓝 (g x), P y * P y = P y) : + ∃ ε : ℝ, 0 < ε ∧ ∃ T : ℂ → ℂ → E →L[ℂ] E, + AnalyticOnNhd ℂ (fun w : ℂ × ℂ => T w.1 w.2) + (Metric.ball x ε ×ˢ Metric.ball x ε) ∧ + (∀ s ∈ Metric.ball x ε, T s s=1) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, IsUnit (T s t)) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, ∀ u ∈ Metric.ball x ε, + T t u*T s t=T s u) ∧ + (∀ s ∈ Metric.ball x ε, ∀ t ∈ Metric.ball x ε, ∀ v : E, + P (g s) v = v → + P (g t) (T s t v) = T s t v ∧ + covariantDerivative P g (fun w => T s w v) t = 0) := by + have hpg := hP.comp hg + have hip : ∀ᶠ z in 𝓝 x, (P ∘ g) z * (P ∘ g) z = (P ∘ g) z := + hg.continuousAt hid + obtain ⟨r,hr,T,hTa,hT0,hTu,hTc,hTd,hTi⟩ := + exists_local_projector_transport hpg (coefficient_analyticAt hP hg) hip + obtain ⟨q,hq,hqn⟩ := Metric.eventually_nhds_iff_ball.mp + (hpg.eventually_analyticAt.and (eventually_eventually_nhds.mpr hip)) + have hmr : Metric.ball x (min r q) ⊆ Metric.ball x r := Metric.ball_subset_ball (min_le_left _ _) + have hmq : Metric.ball x (min r q) ⊆ Metric.ball x q := Metric.ball_subset_ball (min_le_right _ _) + refine ⟨min r q,lt_min hr hq,T,?_,?_,?_,?_,?_⟩ + · exact hTa.mono (Set.prod_mono hmr hmr) + · exact fun s hs => hT0 s (hmr hs) + · exact fun s hs t ht => hTu s (hmr hs) t (hmr ht) + · exact fun s hs t ht u hu => hTc s (hmr hs) t (hmr ht) u (hmr hu) + · intro s hs t ht v hv + have him : P (g t) (T s t v) = T s t v := by + have hh := congrArg (fun A : E →L[ℂ] E => A v) (hTi s (hmr hs) t (hmr ht)) + simpa only [mul_apply_eq_comp,Function.comp_apply,hv] using hh + refine ⟨him,horizontal_of_equation (hqn t (hmq ht)).1.differentiableAt + (hqn t (hmq ht)).2 him ?_⟩ + have hd := (hTd s (hmr hs) t (hmr ht)).clm_apply (hasDerivAt_const t v) + simpa only [equation,add_zero,map_zero,mul_apply_eq_comp] using hd + + +def familyCoefficient (P : E → E →L[ℂ] E) (F : ℂ × ℂ → E) (w : ℂ × ℂ) : E →L[ℂ] E := + (fderiv ℂ P (F w)).flip (fderiv ℂ F w (0,1)) + +lemma familyCoefficient_analyticAt {P : E → E →L[ℂ] E} {F : ℂ × ℂ → E} {w : ℂ × ℂ} + (hP : AnalyticAt ℂ P (F w)) (hF : AnalyticAt ℂ F w) : + AnalyticAt ℂ (familyCoefficient P F) w := by + have ha : AnalyticAt ℂ (fun w => (fderiv ℂ P (F w)).flip) w := + ((ContinuousLinearMap.flipₗᵢ (𝕜 := ℂ) (E := E) (Fₗ := E) (Gₗ := E)).toContinuousLinearEquiv.toContinuousLinearMap.analyticAt _).comp + (hP.fderiv.comp hF) + have hb : AnalyticAt ℂ (fun w => fderiv ℂ F w (0,1)) w := + ((ContinuousLinearMap.apply ℂ E (E := ℂ × ℂ)).analyticAt_bilinear _).comp + (analyticAt_const.prod hF.fderiv) + exact (ha.contDiffAt.clm_apply hb.contDiffAt).analyticAt + +omit [CompleteSpace E] in +lemma familyCoefficient_eq {P : E → E →L[ℂ] E} {F : ℂ × ℂ → E} {s t : ℂ} + (hF : DifferentiableAt ℂ F (s,t)) : + familyCoefficient P F (s,t) = coefficient P (fun v => F (s,v)) t := by + have hd := hF.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_const t s).prodMk (hasDerivAt_id t)) + have hd' : HasDerivAt (fun v => F (s,v)) (fderiv ℂ F (s,t) (0,1)) t := hd + simp only [familyCoefficient,coefficient,hd'.deriv] + +omit [CompleteSpace E] in +lemma familyEquation_eq {P : E → E →L[ℂ] E} {F : ℂ × ℂ → E} {s t : ℂ} + (hP : DifferentiableAt ℂ P (F (s,t))) (hF : DifferentiableAt ℂ F (s,t)) : + ParameterProjector.equation (P ∘ F) (familyCoefficient P F) (s,t) = + equation P (fun v => F (s,v)) t := by + rw [ParameterProjector.equation_eq (hP.comp (s,t) hF)] + simp only [equation,projectorODE,familyCoefficient_eq hF,Function.comp_def] + + + +theorem exists_horizontal_parameter_transport {P : E → E →L[ℂ] E} {F : ℂ × ℂ → E} + (hP : AnalyticAt ℂ P (F (0,0))) (hF : AnalyticAt ℂ F (0,0)) + (hid : ∀ᶠ y in 𝓝 (F (0,0)), P y*P y=P y) : + ∃ (T : ℂ → ℂ → ℂ → E →L[ℂ] E) (ε : ℝ), 0 < ε ∧ + (∀ s u, ‖s‖ < ε → ‖u‖ < ε → T s u u=1) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → IsUnit (T s u v)) ∧ + (∀ s u v w, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → ‖w‖ < ε → + T s v w*T s u v=T s u w) ∧ + (∀ s u v, ‖s‖ < ε → ‖u‖ < ε → ‖v‖ < ε → ∀ e : E, + P (F (s,u)) e=e → P (F (s,v)) (T s u v e)=T s u v e ∧ + covariantDerivative P (fun t => F (s,t)) (fun t => T s u t e) v=0) ∧ + (∀ (q u v : ℂ → ℂ) z, AnalyticAt ℂ q z → AnalyticAt ℂ u z → AnalyticAt ℂ v z → + ‖q z‖ < ε → ‖u z‖ < ε → ‖v z‖ < ε → + AnalyticAt ℂ (fun w => T (q w) (u w) (v w)) z) := by + have hidF : ∀ᶠ w in 𝓝 (0,0), (P ∘ F) w*(P ∘ F) w=(P ∘ F) w := hF.continuousAt hid + obtain ⟨T,r,hr,hT0,hTu,hTc,hTd,hTa⟩ := ParameterProjector.exists_preserving_parameter_transport + (hP.comp hF) (familyCoefficient_analyticAt hP hF) hidF + have hhP : ∀ᶠ w in 𝓝 (0,0), AnalyticAt ℂ P (F w) := hF.continuousAt hP.eventually_analyticAt + obtain ⟨η,hη,hηd⟩ := Metric.eventually_nhds_iff_ball.mp + ((hhP.and hF.eventually_analyticAt).and hidF) + let ε := min r η + have hε : 0 < ε := lt_min hr hη + have hεr : ε ≤ r := min_le_left _ _ + have hεη : ε ≤ η := min_le_right _ _ + have hpol (s t : ℂ) (hs : ‖s‖ < ε) (ht : ‖t‖ < ε) : + AnalyticAt ℂ P (F (s,t)) ∧ AnalyticAt ℂ F (s,t) ∧ P (F (s,t))*P (F (s,t))=P (F (s,t)) := by + have hm : (s,t) ∈ Metric.ball (0,0) η := by + simp only [Metric.mem_ball,dist_eq_norm,Prod.mk_sub_mk,sub_zero,Prod.norm_def] + exact max_lt (hs.trans_le hεη) (ht.trans_le hεη) + exact ⟨(hηd (s,t) hm).1.1,(hηd (s,t) hm).1.2,(hηd (s,t) hm).2⟩ + refine ⟨T,ε,hε,?_,?_,?_,?_,?_⟩ + · exact fun s u hs hu => hT0 s u (hs.trans_le hεr) (hu.trans_le hεr) + · exact fun s u v hs hu hv => hTu s u v (hs.trans_le hεr) (hu.trans_le hεr) (hv.trans_le hεr) + · exact fun s u v w hs hu hv hw => hTc s u v w (hs.trans_le hεr) (hu.trans_le hεr) (hv.trans_le hεr) (hw.trans_le hεr) + · intro s u v hs hu hv e he + have hpoint := hpol s v hs hv + have hdata := hTd s u v (hs.trans_le hεr) (hu.trans_le hεr) (hv.trans_le hεr) + have him : P (F (s,v)) (T s u v e)=T s u v e := by + have hh := congrArg (fun A : E →L[ℂ] E => A e) hdata.2 + simpa only [mul_apply_eq_comp,Function.comp_apply,he] using hh + have hg : AnalyticAt ℂ (fun t => F (s,t)) v := hpoint.2.1.comp (analyticAt_const.prod analyticAt_id) + have hi : ∀ᶠ t in 𝓝 v, P (F (s,t))*P (F (s,t))=P (F (s,t)) := by + filter_upwards [Metric.isOpen_ball.mem_nhds (mem_ball_zero_iff.mpr hv)] with t ht + exact (hpol s t hs (mem_ball_zero_iff.mp ht)).2.2 + refine ⟨him,horizontal_of_equation (P := P) (g := fun t => F (s,t)) + (v := fun t => T s u t e) (hpoint.1.comp (f := fun t => F (s,t)) hg).differentiableAt hi him ?_⟩ + rw [familyEquation_eq hpoint.1.differentiableAt hpoint.2.1.differentiableAt] at hdata + have hd := hdata.1.clm_apply (hasDerivAt_const v e) + simpa only [add_zero,map_zero,mul_apply_eq_comp] using hd + · exact fun q u v z hq hu hv hqs hus hvs => hTa q u v z hq hu hv + (hqs.trans_le hεr) (hus.trans_le hεr) (hvs.trans_le hεr) + +end + +open HolomorphicLinearODE +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + + + +omit [CompleteSpace E] in +theorem covariantDerivative_naturality + {P : E → E →L[ℂ] E} {Q : F → F →L[ℂ] F} {φ : E → F} + {g v : ℂ → E} {z : ℂ} + (hP : DifferentiableAt ℂ P (g z)) (hQ : DifferentiableAt ℂ Q (φ (g z))) + (hφ : AnalyticAt ℂ φ (g z)) (hg : DifferentiableAt ℂ g z) + (hv : DifferentiableAt ℂ v z) + (hnat : ∀ᶠ y in 𝓝 (g z), ∀ w : E, + Q (φ y) (fderiv ℂ φ y w) = fderiv ℂ φ y (P y w)) + (hvel : P (g z) (deriv g z) = 0) + (hid : ∀ w : F, Q (φ (g z)) (Q (φ (g z)) w) = Q (φ (g z)) w) : + covariantDerivative Q (φ ∘ g) (fun t => fderiv ℂ φ (g t) (v t)) z = + fderiv ℂ φ (g z) (covariantDerivative P g v z) := by + let G := fderiv ℂ φ + have hG : DifferentiableAt ℂ G (g z) := hφ.fderiv.differentiableAt + have hφd := hφ.differentiableAt.hasFDerivAt + have he : (fun y => Q (φ y) (G y (deriv g z))) =ᶠ[𝓝 (g z)] + (fun y => G y (P y (deriv g z))) := hnat.mono fun y hy => hy _ + have hl := (hQ.hasFDerivAt.comp (g z) hφd).clm_apply + (hG.hasFDerivAt.clm_apply (hasFDerivAt_const (deriv g z) (g z))) + have hr := hG.hasFDerivAt.clm_apply + (hP.hasFDerivAt.clm_apply (hasFDerivAt_const (deriv g z) (g z))) + have hd := hl.unique (hr.congr_of_eventuallyEq he) + have hde := congrArg (fun A : E →L[ℂ] F => A (v z)) hd + simp only [add_apply,ContinuousLinearMap.comp_apply, + ContinuousLinearMap.flip_apply,zero_apply,map_zero,add_zero,hvel] at hde + have hsym := hφ.contDiffAt.isSymmSndFDerivAt_of_omega (v z) (deriv g z) + have hzero := congrArg (Q (φ (g z))) hde + simp only [G,Function.comp_apply,map_add,hid,hnat.self_of_nhds,zero_add] at hzero + have hdg := (hφd.comp_hasDerivAt z hg.hasDerivAt).deriv + have hdv := ((hG.hasFDerivAt.comp_hasDerivAt z hg.hasDerivAt).clm_apply + hv.hasDerivAt).deriv + simp only [G,Function.comp_apply] at hdv + unfold covariantDerivative coefficient + rw [hdg,hdv] + simp only [Function.comp_apply,ContinuousLinearMap.flip_apply,map_add, + hnat.self_of_nhds] + change Q (φ (g z)) ((fderiv ℂ G (g z) (deriv g z)) (v z)) + + G (g z) (P (g z) (deriv v z)) + + Q (φ (g z)) ((fderiv ℂ Q (φ (g z)) (G (g z) (v z))) (G (g z) (deriv g z))) = + G (g z) (P (g z) (deriv v z)) + + G (g z) (P (g z) ((fderiv ℂ P (g z) (v z)) (deriv g z))) + rw [show (fderiv ℂ G (g z) (deriv g z)) (v z) = + (fderiv ℂ G (g z) (v z)) (deriv g z) from hsym.symm] + calc + _ = G (g z) (P (g z) (deriv v z)) + + (Q (φ (g z)) ((fderiv ℂ G (g z) (v z)) (deriv g z)) + + Q (φ (g z)) ((fderiv ℂ Q (φ (g z)) (G (g z) (v z))) (G (g z) (deriv g z)))) := by abel + _ = _ := by rw [hzero] + +end SplitTangent.PullbackConnection + +namespace SplitTangent.HolomorphicLinearODE +open Filter Topology Set +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + +lemma inverse_apply_horizontal {Y : ℂ → E →L[ℂ] E} {v : ℂ → E} + {A : E →L[ℂ] E} {z : ℂ} + (hY : HasDerivAt Y (A * Y z) z) (hv : HasDerivAt v (A (v z)) z) + (hu : IsUnit (Y z)) : + HasDerivAt (fun w => Ring.inverse (Y w) (v w)) 0 z := by + obtain ⟨u,he⟩ := hu + have hi : HasDerivAt (fun w => Ring.inverse (Y w)) + (-(Ring.inverse (Y z) * (A * Y z) * Ring.inverse (Y z))) z := by + have h := (hasFDerivAt_ringInverse (𝕜 := ℂ) u) + rw [he] at h + convert! h.comp_hasDerivAt z hY using 1; try rfl + simp only [neg_apply,ContinuousLinearMap.mulLeftRight_apply] + rw [← Ring.inverse_unit u,he] + convert! hi.clm_apply hv using 1; try rfl + have hc : Y z * Ring.inverse (Y z) = 1 := Ring.mul_inverse_cancel _ ⟨u,he⟩ + rw [mul_assoc (Ring.inverse (Y z)),mul_assoc A,hc,mul_one] + simp only [neg_apply,mul_apply_eq_comp,neg_add_cancel] + + +theorem vector_local_uniqueness {A : ℂ → E →L[ℂ] E} {f g : ℂ → E} {x : ℂ} + (hA : AnalyticAt ℂ A x) + (hf : ∀ᶠ z in 𝓝 x, HasDerivAt f (A z (f z)) z) + (hg : ∀ᶠ z in 𝓝 x, HasDerivAt g (A z (g z)) z) + (he : f x = g x) : f =ᶠ[𝓝 x] g := by + obtain ⟨Y,hYa,hY0,hY⟩ := exists_local_fundamental hA + obtain ⟨ε,hε,hs⟩ := Metric.eventually_nhds_iff_ball.mp (hY.and (hf.and hg)) + let D : ℂ → E := fun z => Ring.inverse (Y z) (f z-g z) + have hd (z : ℂ) (hz : z ∈ Metric.ball x ε) : HasDerivAt D 0 z := by + have hsub : HasDerivAt (fun w => f w-g w) (A z (f z-g z)) z := by + convert! (hs z hz).2.1.sub (hs z hz).2.2 using 1; try rfl + exact map_sub _ _ _ + exact inverse_apply_horizontal (hs z hz).1.1 hsub (hs z hz).1.2 + filter_upwards [Metric.ball_mem_nhds x hε] with z hz + have hc : D z = D x := Metric.isOpen_ball.is_const_of_deriv_eq_zero + (convex_ball x ε).isPreconnected + (fun w hw => (hd w hw).differentiableAt.differentiableWithinAt) + (fun w hw => (hd w hw).deriv) hz (Metric.mem_ball_self hε) + have hmul := congrArg (Y z) hc + have hcancel := congrArg (fun A : E →L[ℂ] E => A (f z-g z)) + (Ring.mul_inverse_cancel (Y z) (hs z hz).1.2) + have hz0 : f z-g z = 0 := by + simpa only [D,he,sub_self,map_zero,← mul_apply_eq_comp, + Ring.mul_inverse_cancel _ (hs z hz).1.2,one_apply_eq_self] using hmul + exact sub_eq_zero.mp hz0 + +end SplitTangent.HolomorphicLinearODE + +namespace SplitTangent.PullbackConnection +section +open HolomorphicLinearODE +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + + +omit [CompleteSpace E] in +lemma hasDerivAt_equation_of_horizontal {P : E → E →L[ℂ] E} {g v : ℂ → E} {z : ℂ} + (hP : DifferentiableAt ℂ (P ∘ g) z) (hv : DifferentiableAt ℂ v z) + (hid : ∀ᶠ w in 𝓝 z, P (g w) * P (g w) = P (g w)) + (him : ∀ᶠ w in 𝓝 z, P (g w) (v w) = v w) + (hh : covariantDerivative P g v z = 0) : + HasDerivAt v (equation P g z (v z)) z := by + have hfix := ((hP.hasDerivAt.clm_apply hv.hasDerivAt).congr_of_eventuallyEq (him.mono fun _ h => h.symm)).unique + hv.hasDerivAt + have hp := hid.self_of_nhds + have hi := him.self_of_nhds + have hz := congrArg (fun A : E →L[ℂ] E => A (v z)) + (projector_derivative_sandwich hp (idempotent_derivative hP.hasDerivAt hid)) + simp only [mul_apply_eq_comp,hi,zero_apply] at hz + have hvd : deriv v z = deriv (P ∘ g) z (v z) - + P (g z) (coefficient P g z (v z)) := by + unfold covariantDerivative at hh + change deriv (P ∘ g) z (v z) + P (g z) (deriv v z) = deriv v z at hfix + rw [eq_neg_of_add_eq_zero_left hh] at hfix + simpa only [sub_eq_add_neg,add_comm] using hfix.symm + convert! hv.hasDerivAt using 1 + rw [hvd] + simp only [equation,projectorODE,sub_apply,mul_apply_eq_comp, + Function.comp_apply,hi,hz,sub_zero] + +lemma horizontal_local_uniqueness {P : E → E →L[ℂ] E} {g f h : ℂ → E} {x : ℂ} + (hP : AnalyticAt ℂ P (g x)) (hg : AnalyticAt ℂ g x) + (hid : ∀ᶠ y in 𝓝 (g x), P y * P y=P y) + (hf : ∀ᶠ z in 𝓝 x, DifferentiableAt ℂ f z ∧ covariantDerivative P g f z=0) + (hh : ∀ᶠ z in 𝓝 x, DifferentiableAt ℂ h z ∧ covariantDerivative P g h z=0) + (hfi : ∀ᶠ z in 𝓝 x, P (g z) (f z)=f z) + (hhi : ∀ᶠ z in 𝓝 x, P (g z) (h z)=h z) + (he : f x=h x) : f =ᶠ[𝓝 x] h := by + have hpg := hP.comp hg + have hi := hg.continuousAt hid + apply vector_local_uniqueness (equation_analyticAt hP hg) _ _ he + · filter_upwards [hpg.eventually_analyticAt,eventually_eventually_nhds.mpr hi, + eventually_eventually_nhds.mpr hfi,hf] with z hz hzi hzfi hzf + exact hasDerivAt_equation_of_horizontal hz.differentiableAt hzf.1 hzi hzfi hzf.2 + · filter_upwards [hpg.eventually_analyticAt,eventually_eventually_nhds.mpr hi, + eventually_eventually_nhds.mpr hhi,hh] with z hz hzi hzhi hzh + exact hasDerivAt_equation_of_horizontal hz.differentiableAt hzh.1 hzi hzhi hzh.2 + +end + +open HolomorphicLinearODE +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + + + +theorem horizontal_chart_compatibility + {P : E → E →L[ℂ] E} {Q : F → F →L[ℂ] F} {φ : E → F} + {g f : ℂ → E} {h : ℂ → F} {z : ℂ} + (hP : AnalyticAt ℂ P (g z)) (hQ : AnalyticAt ℂ Q (φ (g z))) + (hφ : AnalyticAt ℂ φ (g z)) (hg : AnalyticAt ℂ g z) + (hf : AnalyticAt ℂ f z) (hh : AnalyticAt ℂ h z) + (hidQ : ∀ᶠ y in 𝓝 (φ (g z)), Q y*Q y=Q y) + (hnat : ∀ᶠ y in 𝓝 (g z), ∀ v : E, Q (φ y) (fderiv ℂ φ y v)=fderiv ℂ φ y (P y v)) + (hvel : ∀ᶠ w in 𝓝 z, P (g w) (deriv g w)=0) + (hfi : ∀ᶠ w in 𝓝 z, P (g w) (f w)=f w) + (hhi : ∀ᶠ w in 𝓝 z, Q (φ (g w)) (h w)=h w) + (hfh : ∀ᶠ w in 𝓝 z, covariantDerivative P g f w=0) + (hhh : ∀ᶠ w in 𝓝 z, covariantDerivative Q (φ ∘ g) h w=0) + (he : h z=fderiv ℂ φ (g z) (f z)) : + h =ᶠ[𝓝 z] fun w => fderiv ℂ φ (g w) (f w) := by + have hcurve : AnalyticAt ℂ (φ ∘ g) z := hφ.comp hg + have ht : AnalyticAt ℂ (fun w => fderiv ℂ φ (g w) (f w)) z := + ((ContinuousLinearMap.apply ℂ F (E := E)).analyticAt_bilinear _).comp + (hf.prod (hφ.fderiv.comp hg)) + have hNatLocal : ∀ᶠ w in 𝓝 z, ∀ᶠ y in 𝓝 (g w), ∀ v : E, + Q (φ y) (fderiv ℂ φ y v)=fderiv ℂ φ y (P y v) := + hg.continuousAt (eventually_eventually_nhds.mpr hnat) + have hti : ∀ᶠ w in 𝓝 z, Q (φ (g w)) (fderiv ℂ φ (g w) (f w)) = + fderiv ℂ φ (g w) (f w) := by + filter_upwards [hg.continuousAt hnat,hfi] with w hn hi + rw [hn (f w),hi] + have hth : ∀ᶠ w in 𝓝 z, covariantDerivative Q (φ ∘ g) + (fun w => fderiv ℂ φ (g w) (f w)) w=0 := by + filter_upwards [hg.continuousAt hP.eventually_analyticAt, + hcurve.continuousAt hQ.eventually_analyticAt,hg.continuousAt hφ.eventually_analyticAt, + hg.eventually_analyticAt,hf.eventually_analyticAt,hNatLocal,hvel, + hcurve.continuousAt hidQ,hfh] with w hp hq hφw hgw hfw hn hv hq2 hhor + have hq2' : ∀ v : F, Q (φ (g w)) (Q (φ (g w)) v)=Q (φ (g w)) v := by + intro v + exact congrArg (fun A : F →L[ℂ] F => A v) hq2 + rw [covariantDerivative_naturality hp.differentiableAt hq.differentiableAt hφw + hgw.differentiableAt hfw.differentiableAt hn hv hq2',hhor,map_zero] + apply horizontal_local_uniqueness (P := Q) (g := φ ∘ g) hQ hcurve hidQ _ _ hhi hti he + · filter_upwards [hh.eventually_analyticAt,hhh] with w ha hb + exact ⟨ha.differentiableAt,hb⟩ + · filter_upwards [ht.eventually_analyticAt,hth] with w ha hb + exact ⟨ha.differentiableAt,hb⟩ + + + +theorem horizontal_eqOn {P : E → E →L[ℂ] E} {g f h : ℂ → E} {U : Set ℂ} + (hU : IsOpen U) (hUc : IsPreconnected U) + (hP : ∀ z ∈ U, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g U) + (hf : AnalyticOnNhd ℂ f U) (hh : AnalyticOnNhd ℂ h U) + (hid : ∀ z ∈ U, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) + (hfi : ∀ z ∈ U, P (g z) (f z)=f z) (hhi : ∀ z ∈ U, P (g z) (h z)=h z) + (hfh : ∀ z ∈ U, covariantDerivative P g f z=0) + (hhh : ∀ z ∈ U, covariantDerivative P g h z=0) + {x : ℂ} (hx : x ∈ U) (he : f x=h x) : EqOn f h U := by + apply hf.eqOn_of_preconnected_of_eventuallyEq hh hUc hx + apply horizontal_local_uniqueness (hP x hx) (hg x hx) (hid x hx) _ _ _ _ he + · exact Filter.Eventually.mono (hU.mem_nhds hx) (fun z hz => ⟨(hf z hz).differentiableAt,hfh z hz⟩) + · exact Filter.Eventually.mono (hU.mem_nhds hx) (fun z hz => ⟨(hh z hz).differentiableAt,hhh z hz⟩) + · exact Filter.Eventually.mono (hU.mem_nhds hx) hfi + · exact Filter.Eventually.mono (hU.mem_nhds hx) hhi + +end SplitTangent.PullbackConnection + +open Filter Topology Set +namespace SplitTangent.TwoChartCovering +variable {B E : Type*} [TopologicalSpace B] [TopologicalSpace E] + + + +theorem exists_normalized_lifts {p : E → B} (hp : IsCoveringMap p) + {f g : ℂ → B} (hf : Continuous f) (hg : Continuous g) + (hov : ∀ z : ℂ, z ≠ 0 → f z = g z⁻¹) + (a : ℂ) (e : E) (he : p e=f a) : + ∃ (F G : C(ℂ,E)), F a=e ∧ p ∘ F=f ∧ p ∘ G=g ∧ + ∀ z : ℂ, z ≠ 0 → F z=G z⁻¹ := by + obtain ⟨F,⟨hFa,hFp⟩,_⟩ := hp.existsUnique_continuousMap_lifts ⟨f,hf⟩ a e he + have h1 : p (F 1)=g 1 := by + have hh := congrFun hFp 1 + change p (F 1)=f 1 at hh + simpa using hh.trans (hov 1 one_ne_zero) + obtain ⟨G,⟨hG1,hGp⟩,_⟩ := hp.existsUnique_continuousMap_lifts ⟨g,hg⟩ 1 (F 1) h1 + refine ⟨F,G,hFa,hFp,hGp,?_⟩ + have hconn : IsPreconnected ({0}ᶜ : Set ℂ) := by + exact (isPathConnected_compl_singleton_of_one_lt_rank (by simp [Complex.rank_real_complex]) (0 : ℂ)).isConnected.isPreconnected + have hci : ContinuousOn (fun z : ℂ => G z⁻¹) ({0}ᶜ : Set ℂ) := by + exact G.continuous.comp_continuousOn (continuousOn_id.inv₀ (fun z hz => hz)) + have heq : EqOn (p ∘ F) (p ∘ fun z : ℂ => G z⁻¹) ({0}ᶜ : Set ℂ) := by + intro z hz + change p (F z)=p (G z⁻¹) + have h1 := congrFun hFp z + have h2 := congrFun hGp z⁻¹ + exact h1.trans ((hov z hz).trans h2.symm) + have hbase : (F : ℂ → E) 1=(fun z : ℂ => G z⁻¹) 1 := by simpa using hG1.symm + exact hp.eqOn_of_comp_eqOn hconn F.continuous.continuousOn hci heq one_ne_zero hbase + +end SplitTangent.TwoChartCovering + +namespace SplitTangent.HorizontalCovering +section +open Bundle +variable {ι B V : Type*} [TopologicalSpace B] [TopologicalSpace V] [DiscreteTopology V] + + + +structure HorizontalCocycle (ι B V : Type*) [TopologicalSpace B] where + baseSet : ι → Set B + isOpen_baseSet : ∀ i, IsOpen (baseSet i) + indexAt : B → ι + mem_baseSet : ∀ x, x ∈ baseSet (indexAt x) + change : ι → ι → B → V → V + change_self : ∀ i x, x ∈ baseSet i → ∀ v, change i i x v=v + change_comp : ∀ i j k x, x ∈ baseSet i ∩ baseSet j ∩ baseSet k → ∀ v, + change j k x (change i j x v)=change i k x v + change_locally_constant : ∀ i j x, x ∈ baseSet i ∩ baseSet j → ∀ v, + ∀ᶠ y in 𝓝 x, change i j y v=change i j x v + +namespace HorizontalCocycle +variable (D : HorizontalCocycle ι B V) + + + +def toCore : FiberBundleCore ι B V where + baseSet := D.baseSet + isOpen_baseSet := D.isOpen_baseSet + indexAt := D.indexAt + mem_baseSet_at := D.mem_baseSet + coordChange := D.change + coordChange_self := D.change_self + continuousOn_coordChange := by + intro i j + apply continuousOn_prod_of_discrete_right.mpr + intro v x hx + exact (continuousAt_const.congr_of_eventuallyEq + (D.change_locally_constant i j x hx.1 v)).continuousWithinAt + coordChange_comp := D.change_comp + + + +theorem isCoveringMap : IsCoveringMap D.toCore.proj := + FiberBundle.isCoveringMap + + + +theorem coordinates_locally_constant {A : Type*} [TopologicalSpace A] + {f : A → B} {s : C(A,D.toCore.TotalSpace)} (hs : D.toCore.proj ∘ s=f) + {a : A} {i : ι} (ha : f a ∈ D.baseSet i) : + ∀ᶠ y in 𝓝 a, (D.toCore.localTriv i (s y)).2=(D.toCore.localTriv i (s a)).2 := by + have hsource : s a ∈ (D.toCore.localTriv i).source := by + rw [D.toCore.mem_localTriv_source,← D.toCore.baseSet_at] + change D.toCore.proj (s a) ∈ D.baseSet i + rw [show D.toCore.proj (s a)=f a from congrFun hs a] + exact ha + have hc : ContinuousAt (fun y => (D.toCore.localTriv i (s y)).2) a := + ((D.toCore.localTriv i).toOpenPartialHomeomorph.continuousAt hsource).snd.comp s.continuous.continuousAt + simpa only [ContinuousAt,nhds_discrete,tendsto_pure] using hc + + + +theorem lift_local_form {A : Type*} [TopologicalSpace A] + {f : A → B} (hf : Continuous f) {s : C(A,D.toCore.TotalSpace)} + (hs : D.toCore.proj ∘ s=f) {a : A} {i : ι} (ha : f a ∈ D.baseSet i) : + ∀ᶠ y in 𝓝 a, s y=(D.toCore.localTriv i).toPartialEquiv.symm + (f y,(D.toCore.localTriv i (s a)).2) := by + filter_upwards [D.coordinates_locally_constant hs ha, + hf.continuousAt ((D.isOpen_baseSet i).mem_nhds ha)] with y hy hbase + have hsource : s y ∈ (D.toCore.localTriv i).source := by + rw [D.toCore.mem_localTriv_source,← D.toCore.baseSet_at] + change D.toCore.proj (s y) ∈ D.baseSet i + rw [show D.toCore.proj (s y)=f y from congrFun hs y] + exact hbase + have he : D.toCore.localTriv i (s y)=(f y,(D.toCore.localTriv i (s a)).2) := by + apply Prod.ext + · exact ((D.toCore.localTriv i).coe_fst hsource).trans (congrFun hs y) + · exact hy + rw [← he] + exact ((D.toCore.localTriv i).toPartialEquiv.left_inv hsource).symm + + + +theorem exists_two_chart_lifts {f g : ℂ → B} (hf : Continuous f) (hg : Continuous g) + (hov : ∀ z : ℂ, z ≠ 0 → f z=g z⁻¹) (a : ℂ) + (e : D.toCore.TotalSpace) (he : D.toCore.proj e=f a) : + ∃ (F G : C(ℂ,D.toCore.TotalSpace)), F a=e ∧ D.toCore.proj ∘ F=f ∧ D.toCore.proj ∘ G=g ∧ + ∀ z : ℂ, z ≠ 0 → F z=G z⁻¹ := + TwoChartCovering.exists_normalized_lifts D.isCoveringMap hf hg hov a e he + +end HorizontalCocycle +end + +variable {B : Type*} [TopologicalSpace B] {V : B → Type*} + + + +structure LocalTransportData (B : Type*) [TopologicalSpace B] (V : B → Type*) where + domain : B → Set B + domain_open : ∀ x, IsOpen (domain x) + domain_self : ∀ x, x ∈ domain x + forward : ∀ x y, V x → V y + reverse : ∀ x y, V y → V x + left_inv : ∀ x y, y ∈ domain x → Function.LeftInverse (reverse x y) (forward x y) + right_inv : ∀ x y, y ∈ domain x → Function.RightInverse (reverse x y) (forward x y) + forward_self : ∀ x v, forward x x v=v + overlap : ∀ x y z, z ∈ domain x ∩ domain y → ∀ v : V x, + ∀ᶠ w in 𝓝 z, forward y w (reverse y z (forward x z v))=forward x w v + +namespace LocalTransportData +variable (D : LocalTransportData B V) + +def localEquiv (x y : B) (hy : y ∈ D.domain x) : V x ≃ V y where + toFun := D.forward x y + invFun := D.reverse x y + left_inv := D.left_inv x y hy + right_inv := D.right_inv x y hy + +lemma reverse_self (x : B) (v : V x) : D.reverse x x v=v := by + simpa only [D.forward_self] using D.left_inv x x (D.domain_self x) v + +include D in + + +theorem equiv_nonempty [ConnectedSpace B] (a x : B) : Nonempty (V a ≃ V x) := by + let Z : Set B := {x | Nonempty (V a ≃ V x)} + have ho : IsOpen Z := isOpen_iff_mem_nhds.mpr fun x hx => + Filter.mem_of_superset ((D.domain_open x).mem_nhds (D.domain_self x)) + (fun y hy => hx.map (fun e => e.trans (D.localEquiv x y hy))) + have hoc : IsOpen Zᶜ := isOpen_iff_mem_nhds.mpr fun x hx => + Filter.mem_of_superset ((D.domain_open x).mem_nhds (D.domain_self x)) (fun y hy he => + hx (he.map (fun e => e.trans (D.localEquiv x y hy).symm))) + have hu : Z=univ := (show IsClopen Z from ⟨isOpen_compl_iff.mp hoc,ho⟩).eq_univ + ⟨a,⟨Equiv.refl _⟩⟩ + exact (show x ∈ Z from hu ▸ mem_univ x) + +def fiberEquiv [ConnectedSpace B] (a x : B) : V a ≃ V x := + Classical.choice (D.equiv_nonempty a x) + + + +def toCocycle [ConnectedSpace B] (a : B) : HorizontalCocycle B B (V a) where + baseSet := D.domain + isOpen_baseSet := D.domain_open + indexAt := id + mem_baseSet := D.domain_self + change := fun i j z v => (D.fiberEquiv a j).symm + (D.reverse j z (D.forward i z (D.fiberEquiv a i v))) + change_self := by + intro i z hz v + rw [D.left_inv i z hz] + exact (D.fiberEquiv a i).symm_apply_apply v + change_comp := by + intro i j k z hz v + simp only [Equiv.apply_symm_apply] + rw [D.right_inv j z hz.1.2 (D.forward i z (D.fiberEquiv a i v))] + change_locally_constant := by + intro i j z hz v + filter_upwards [D.overlap i j z hz (D.fiberEquiv a i v), + (D.domain_open j).mem_nhds hz.2] with w he hw + have hh := congrArg (D.reverse j w) he + rw [D.left_inv j w hw] at hh + exact congrArg (D.fiberEquiv a j).symm hh.symm + +variable [ConnectedSpace B] (a : B) [TopologicalSpace (V a)] [DiscreteTopology (V a)] + + +def decode (p : (D.toCocycle a).toCore.TotalSpace) : (b : B) × V b := + ⟨p.proj,D.fiberEquiv a p.proj p.2⟩ + +def encode (x : B) (v : V x) : (D.toCocycle a).toCore.TotalSpace := + ⟨x,(D.fiberEquiv a x).symm v⟩ + +@[simp] lemma decode_encode (x : B) (v : V x) : D.decode a (D.encode a x v)=⟨x,v⟩ := by + change (⟨x,D.fiberEquiv a x ((D.fiberEquiv a x).symm v)⟩ : (b : B) × V b)=_ + rw [Equiv.apply_symm_apply] + +lemma decode_local_frame {i x : B} (_ : x ∈ D.domain i) (v : V a) : + D.decode a (((D.toCocycle a).toCore.localTriv i).toPartialEquiv.symm (x,v)) = + ⟨x,D.forward i x (D.fiberEquiv a i v)⟩ := by + change (⟨x,D.fiberEquiv a x ((D.fiberEquiv a x).symm + (D.reverse x x (D.forward i x (D.fiberEquiv a i v)) ))⟩ : (b : B) × V b) = _ + simp only [Equiv.apply_symm_apply,D.reverse_self] + + + +theorem decode_lift_local_form {A : Type*} [TopologicalSpace A] {f : A → B} + (hf : Continuous f) {s : C(A,(D.toCocycle a).toCore.TotalSpace)} + (hs : (D.toCocycle a).toCore.proj ∘ s=f) {z : A} {i : B} + (hi : f z ∈ D.domain i) : + ∃ v : V i, ∀ᶠ y in 𝓝 z, D.decode a (s y)=⟨f y,D.forward i (f y) v⟩ := by + refine ⟨D.fiberEquiv a i (((D.toCocycle a).toCore.localTriv i) (s z)).2,?_⟩ + filter_upwards [(D.toCocycle a).lift_local_form hf hs hi, + hf.continuousAt ((D.domain_open i).mem_nhds hi)] with y hy hbase + rw [hy,D.decode_local_frame a hbase] + +end LocalTransportData +end SplitTangent.HorizontalCovering + +namespace SplitTangent.HorizontalCovering.LocalTransportData +variable {B : Type*} [TopologicalSpace B] {V : B → Type*} +variable (D : LocalTransportData B V) + + + +def IsHorizontalAlong {A : Type*} [TopologicalSpace A] (f : A → B) + (σ : A → (b : B) × V b) : Prop := + ∀ a, ∃ v : V (f a), ∀ᶠ y in 𝓝 a, σ y=⟨f y,D.forward (f a) (f y) v⟩ + +lemma horizontal_local_form {A : Type*} [TopologicalSpace A] {f : A → B} + {σ : A → (b : B) × V b} (hσ : D.IsHorizontalAlong f σ) (a : A) : + ∃ v : V (f a), σ a=⟨f a,v⟩ ∧ ∀ᶠ y in 𝓝 a, σ y=⟨f y,D.forward (f a) (f y) v⟩ := by + obtain ⟨v,hv⟩ := hσ a + exact ⟨v,by simpa only [D.forward_self] using hv.self_of_nhds,hv⟩ + +lemma horizontal_base {A : Type*} [TopologicalSpace A] {f : A → B} + {σ : A → (b : B) × V b} (hσ : D.IsHorizontalAlong f σ) (a : A) : (σ a).1=f a := by + obtain ⟨v,hv,_⟩ := D.horizontal_local_form hσ a + rw [hv] + + + +theorem horizontal_equalizer_clopen {A : Type*} [TopologicalSpace A] {f : A → B} + (hf : Continuous f) {σ τ : A → (b : B) × V b} + (hσ : D.IsHorizontalAlong f σ) (hτ : D.IsHorizontalAlong f τ) : + IsClopen {a | σ a=τ a} := by + have hevent (a : A) : ∀ᶠ y in 𝓝 a, (σ y=τ y) ↔ (σ a=τ a) := by + obtain ⟨v,hv,hσv⟩ := D.horizontal_local_form hσ a + obtain ⟨w,hw,hτw⟩ := D.horizontal_local_form hτ a + filter_upwards [hσv,hτw,hf.continuousAt ((D.domain_open (f a)).mem_nhds (D.domain_self (f a)))] with y hy hz hd + rw [hy,hz,hv,hw] + constructor + · intro he + have hvw : v=w := (D.left_inv (f a) (f y) hd).injective (sigma_mk_injective he) + rw [hvw] + · intro he + rw [sigma_mk_injective he] + constructor + · apply isOpen_compl_iff.mp + apply isOpen_iff_mem_nhds.mpr + intro a ha + exact (hevent a).mono fun y hy he => ha (hy.mp he) + · apply isOpen_iff_mem_nhds.mpr + intro a ha + exact (hevent a).mono fun y hy => hy.mpr ha + + + +theorem horizontal_unique {A : Type*} [TopologicalSpace A] [ConnectedSpace A] + {f : A → B} (hf : Continuous f) {σ τ : A → (b : B) × V b} + (hσ : D.IsHorizontalAlong f σ) (hτ : D.IsHorizontalAlong f τ) + (a : A) (he : σ a=τ a) : σ=τ := by + have hu := (D.horizontal_equalizer_clopen hf hσ hτ).eq_univ ⟨a,he⟩ + exact funext fun y => show y ∈ {a | σ a=τ a} from hu ▸ mem_univ y + +variable [ConnectedSpace B] + + + +theorem exists_normalized_horizontal {A : Type*} [TopologicalSpace A] + [SimplyConnectedSpace A] [LocallyPathConnectedSpace A] + {f : A → B} (hf : Continuous f) (a : A) (v : V (f a)) : + ∃ σ : A → (b : B) × V b, D.IsHorizontalAlong f σ ∧ σ a=⟨f a,v⟩ := by + let : TopologicalSpace (V (f a)) := ⊥ + let : DiscreteTopology (V (f a)) := ⟨rfl⟩ + let C := D.toCocycle (f a) + obtain ⟨s,⟨hsa,hsp⟩,_⟩ := C.isCoveringMap.existsUnique_continuousMap_lifts + ⟨f,hf⟩ a (D.encode (f a) (f a) v) rfl + refine ⟨fun y => D.decode (f a) (s y),?_,?_⟩ + · intro z + exact D.decode_lift_local_form (f a) hf hsp (D.domain_self (f z)) + · change D.decode (f a) (s a)=_ + rw [hsa,D.decode_encode] + + + +theorem exists_two_chart_horizontal {f g : ℂ → B} (hf : Continuous f) (hg : Continuous g) + (hov : ∀ z : ℂ, z ≠ 0 → f z=g z⁻¹) (a : ℂ) (v : V (f a)) : + ∃ σ τ : ℂ → (b : B) × V b, + D.IsHorizontalAlong f σ ∧ D.IsHorizontalAlong g τ ∧ σ a=⟨f a,v⟩ ∧ + ∀ z : ℂ, z ≠ 0 → σ z=τ z⁻¹ := by + let : TopologicalSpace (V (f a)) := ⊥ + let : DiscreteTopology (V (f a)) := ⟨rfl⟩ + let C := D.toCocycle (f a) + obtain ⟨F,G,hFa,hFp,hGp,hFG⟩ := C.exists_two_chart_lifts hf hg hov a + (D.encode (f a) (f a) v) rfl + refine ⟨fun z => D.decode (f a) (F z),fun z => D.decode (f a) (G z),?_,?_,?_,?_⟩ + · intro z + exact D.decode_lift_local_form (f a) hf hFp (D.domain_self (f z)) + · intro z + exact D.decode_lift_local_form (f a) hg hGp (D.domain_self (g z)) + · change D.decode (f a) (F a)=_ + rw [hFa,D.decode_encode] + · intro z hz + change D.decode (f a) (F z)=D.decode (f a) (G z⁻¹) + rw [hFG z hz] + +end SplitTangent.HorizontalCovering.LocalTransportData + +namespace SplitTangent.PullbackConnection +section +open HorizontalCovering Filter Topology Set +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + +abbrev ImageFiber (P : E → E →L[ℂ] E) (g : ℂ → E) (z : ℂ) := + {v : E // P (g z) v=v} + + + +structure LocalImages (P : E → E →L[ℂ] E) (g : ℂ → E) where + radius : ℂ → ℝ + positive : ∀ x, 0 < radius x + trans : ℂ → ℂ → ℂ → E →L[ℂ] E + analytic : ∀ x, AnalyticOnNhd ℂ (fun w : ℂ × ℂ => trans x w.1 w.2) + (Metric.ball x (radius x) ×ˢ Metric.ball x (radius x)) + normalized : ∀ x s, s ∈ Metric.ball x (radius x) → trans x s s=1 + cocycle : ∀ x s, s ∈ Metric.ball x (radius x) → ∀ t, t ∈ Metric.ball x (radius x) → + ∀ u, u ∈ Metric.ball x (radius x) → trans x t u*trans x s t=trans x s u + preserves_horizontal : ∀ x s, s ∈ Metric.ball x (radius x) → ∀ t, t ∈ Metric.ball x (radius x) → + ∀ v, P (g s) v=v → P (g t) (trans x s t v)=trans x s t v ∧ + covariantDerivative P g (fun w => trans x s w v) t=0 + +namespace LocalImages +variable {P : E → E →L[ℂ] E} {g : ℂ → E} (L : LocalImages P g) + +omit [CompleteSpace E] in +lemma center (x : ℂ) : x ∈ Metric.ball x (L.radius x) := Metric.mem_ball_self (L.positive x) + +omit [CompleteSpace E] in +lemma trans_analytic {x s t : ℂ} (hs : s ∈ Metric.ball x (L.radius x)) + (ht : t ∈ Metric.ball x (L.radius x)) (v : E) : + AnalyticAt ℂ (fun w => L.trans x s w v) t := by + have h := (L.analytic x (s,t) ⟨hs,ht⟩).comp (analyticAt_const.prod analyticAt_id) + exact ((ContinuousLinearMap.apply ℂ E (E := E)).analyticAt_bilinear _).comp (analyticAt_const.prod h) + +def forward (x y : ℂ) (v : ImageFiber P g x) : ImageFiber P g y := by + classical + exact if hy : y ∈ Metric.ball x (L.radius x) then + ⟨L.trans x x y v,(L.preserves_horizontal x x (L.center x) y hy v v.2).1⟩ + else ⟨0,by simp⟩ + +def reverse (x y : ℂ) (v : ImageFiber P g y) : ImageFiber P g x := by + classical + exact if hy : y ∈ Metric.ball x (L.radius x) then + ⟨L.trans x y x v,(L.preserves_horizontal x y hy x (L.center x) v v.2).1⟩ + else ⟨0,by simp⟩ + +omit [CompleteSpace E] in +lemma forward_val {x y : ℂ} (hy : y ∈ Metric.ball x (L.radius x)) (v : ImageFiber P g x) : + (L.forward x y v).1=L.trans x x y v := by simp only [forward,dite_eq_left hy] +omit [CompleteSpace E] in +lemma reverse_val {x y : ℂ} (hy : y ∈ Metric.ball x (L.radius x)) (v : ImageFiber P g y) : + (L.reverse x y v).1=L.trans x y x v := by simp only [reverse,dite_eq_left hy] + +omit [CompleteSpace E] in +lemma left_inverse {x y : ℂ} (hy : y ∈ Metric.ball x (L.radius x)) : + Function.LeftInverse (L.reverse x y) (L.forward x y) := by + intro v + apply Subtype.ext + rw [L.reverse_val hy,L.forward_val hy] + have he := congrArg (fun A : E →L[ℂ] E => A v) + (L.cocycle x x (L.center x) y hy x (L.center x)) + simpa only [L.normalized x x (L.center x),mul_apply_eq_comp, + one_apply_eq_self] using he + +omit [CompleteSpace E] in +lemma right_inverse {x y : ℂ} (hy : y ∈ Metric.ball x (L.radius x)) : + Function.RightInverse (L.reverse x y) (L.forward x y) := by + intro v + apply Subtype.ext + rw [L.forward_val hy,L.reverse_val hy] + have he := congrArg (fun A : E →L[ℂ] E => A v) + (L.cocycle x y hy x (L.center x) y hy) + simpa only [L.normalized x y hy,mul_apply_eq_comp, + one_apply_eq_self] using he + +omit [CompleteSpace E] in +lemma normalized_forward (x : ℂ) (v : ImageFiber P g x) : L.forward x x v=v := by + apply Subtype.ext + rw [L.forward_val (L.center x),L.normalized x x (L.center x),one_apply_eq_self] + + +lemma overlap (hP : ∀ z, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g univ) + (hid : ∀ z, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) + (x y z : ℂ) (hz : z ∈ Metric.ball x (L.radius x) ∩ Metric.ball y (L.radius y)) + (v : ImageFiber P g x) : + ∀ᶠ w in 𝓝 z, L.forward y w (L.reverse y z (L.forward x z v))=L.forward x w v := by + let u : ImageFiber P g y := L.reverse y z (L.forward x z v) + have he : L.trans y y z u=L.trans x x z v := by + have hinv := congrArg Subtype.val (L.right_inverse hz.2 (L.forward x z v)) + simpa only [L.forward_val hz.2,L.forward_val hz.1] using hinv + have huniq : (fun w => L.trans y y w u) =ᶠ[𝓝 z] (fun w => L.trans x x w v) := by + apply horizontal_local_uniqueness (hP z) (hg z (mem_univ z)) (hid z) _ _ _ _ he + · filter_upwards [Metric.isOpen_ball.mem_nhds hz.2] with w hw + exact ⟨(L.trans_analytic (L.center y) hw u).differentiableAt, + (L.preserves_horizontal y y (L.center y) w hw u u.2).2⟩ + · filter_upwards [Metric.isOpen_ball.mem_nhds hz.1] with w hw + exact ⟨(L.trans_analytic (L.center x) hw v).differentiableAt, + (L.preserves_horizontal x x (L.center x) w hw v v.2).2⟩ + · filter_upwards [Metric.isOpen_ball.mem_nhds hz.2] with w hw + exact (L.preserves_horizontal y y (L.center y) w hw u u.2).1 + · filter_upwards [Metric.isOpen_ball.mem_nhds hz.1] with w hw + exact (L.preserves_horizontal x x (L.center x) w hw v v.2).1 + filter_upwards [huniq,Metric.isOpen_ball.mem_nhds hz.1,Metric.isOpen_ball.mem_nhds hz.2] with w he hx hy + apply Subtype.ext + rw [L.forward_val hy,L.forward_val hx] + exact he + + + +def toData (hP : ∀ z, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g univ) + (hid : ∀ z, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) : + LocalTransportData ℂ (ImageFiber P g) where + domain := fun x => Metric.ball x (L.radius x) + domain_open := fun _ => Metric.isOpen_ball + domain_self := L.center + forward := L.forward + reverse := L.reverse + left_inv := fun _ _ hy => L.left_inverse hy + right_inv := fun _ _ hy => L.right_inverse hy + forward_self := L.normalized_forward + overlap := L.overlap hP hg hid + +end LocalImages + + + +theorem exists_local_images {P : E → E →L[ℂ] E} {g : ℂ → E} + (hP : ∀ z, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g univ) + (hid : ∀ z, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) : Nonempty (LocalImages P g) := by + have hex := fun z => exists_local_horizontal_transport (hP z) (hg z (mem_univ z)) (hid z) + choose r hr T hTa hT0 hTu hTc hTh using hex + exact ⟨⟨r,hr,T,hTa,hT0,hTc,hTh⟩⟩ + +end + +open HorizontalCovering Filter Topology Set +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + +omit [CompleteSpace E] in +lemma covariantDerivative_congr {P : E → E →L[ℂ] E} {g f h : ℂ → E} {z : ℂ} + (he : f =ᶠ[𝓝 z] h) : covariantDerivative P g f z=covariantDerivative P g h z := by + simp only [covariantDerivative,he.deriv_eq,he.self_of_nhds] + + + +theorem exists_entire_horizontal {P : E → E →L[ℂ] E} {g : ℂ → E} + (hP : ∀ z, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g univ) + (hid : ∀ z, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) + (a : ℂ) (v : E) (hv : P (g a) v=v) : + ∃ s : ℂ → E, AnalyticOnNhd ℂ s univ ∧ s a=v ∧ + (∀ z, P (g z) (s z)=s z) ∧ ∀ z, covariantDerivative P g s z=0 := by + obtain ⟨L⟩ := exists_local_images hP hg hid + let D := L.toData hP hg hid + obtain ⟨σ,hσ,hσa⟩ := D.exists_normalized_horizontal continuous_id a (⟨v,hv⟩ : ImageFiber P g a) + let s : ℂ → E := fun z => (σ z).2.1 + have hbase (z : ℂ) : (σ z).1=z := D.horizontal_base hσ z + have hlocal (z : ℂ) : ∃ u : ImageFiber P g z, + s =ᶠ[𝓝 z] fun w => L.trans z z w u := by + obtain ⟨u,hu⟩ := hσ z + refine ⟨u,?_⟩ + filter_upwards [hu,Metric.isOpen_ball.mem_nhds (L.center z)] with w hw hm + change (σ w).2.1=L.trans z z w u + rw [hw] + exact L.forward_val hm u + refine ⟨s,?_,?_,?_,?_⟩ + · intro z _ + obtain ⟨u,hu⟩ := hlocal z + exact (L.trans_analytic (L.center z) (L.center z) u).congr hu.symm + · change (σ a).2.1=v + rw [hσa] + · intro z + have hi : P (g (σ z).1) (s z)=s z := (σ z).2.2 + rwa [hbase z] at hi + · intro z + obtain ⟨u,hu⟩ := hlocal z + rw [covariantDerivative_congr hu] + exact (L.preserves_horizontal z z (L.center z) z (L.center z) u u.2).2 + + +theorem entire_horizontal_unique {P : E → E →L[ℂ] E} {g f h : ℂ → E} + (hP : ∀ z, AnalyticAt ℂ P (g z)) (hg : AnalyticOnNhd ℂ g univ) + (hid : ∀ z, ∀ᶠ y in 𝓝 (g z), P y*P y=P y) + (hf : AnalyticOnNhd ℂ f univ) (hh : AnalyticOnNhd ℂ h univ) + (hfi : ∀ z, P (g z) (f z)=f z) (hhi : ∀ z, P (g z) (h z)=h z) + (hfh : ∀ z, covariantDerivative P g f z=0) + (hhh : ∀ z, covariantDerivative P g h z=0) + (a : ℂ) (he : f a=h a) : f=h := by + have h := horizontal_eqOn isOpen_univ isPreconnected_univ (fun z _ => hP z) + hg hf hh (fun z _ => hid z) (fun z _ => hfi z) (fun z _ => hhi z) + (fun z _ => hfh z) (fun z _ => hhh z) (mem_univ a) he + exact funext fun z => h (mem_univ z) + +end SplitTangent.PullbackConnection + +open scoped Manifold LinearAlgebra.Projectivization +open Bundle + +namespace SplitTangent.TangentSplitting +section +open Filter Topology Set +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +theorem coordinateProjector_analytic (x : X.Carrier) : + AnalyticOnNhd ℂ (S.coordinateProjector x) (chartAt (Model X) x).target := by + let e : Matrix (Fin X.dim) (Fin X.dim) ℂ ≃L[ℂ] (Model X →L[ℂ] Model X) := + (Matrix.toLin'.trans LinearMap.toContinuousLinearMap).toContinuousLinearEquiv + intro z hz + have hM : AnalyticAt ℂ (fun z i j => S.coordinateMatrix x i j z) z := by + apply AnalyticAt.pi + intro i + apply AnalyticAt.pi + intro j + exact S.coordinateMatrix_analytic x i j z hz + have he : (fun z => e (fun i j => S.coordinateMatrix x i j z))=S.coordinateProjector x := by + funext z + apply ContinuousLinearMap.ext + intro v + change Matrix.toLin' (LinearMap.toMatrix' (S.coordinateProjector x z).toLinearMap) v=_ + rw [Matrix.toLin'_toMatrix'] + rfl + rw [← he] + exact (e.toContinuousLinearMap.analyticAt _).comp hM + +lemma coordinateProjector_fixed (x : X.Carrier) {y : X.Carrier} + (hy : y ∈ (chartAt (Model X) x).source) (v : Tangent X y) : + S.coordinateProjector x ((chartAt (Model X) x) y) + ((trivializationAt (Model X) (Tangent X) x).continuousLinearMapAt ℂ y v) = + (trivializationAt (Model X) (Tangent X) x).continuousLinearMapAt ℂ y (S.projector y v) := by + dsimp only [coordinateProjector] + rw [(chartAt (Model X) x).left_inv hy] + simp only [ContinuousLinearMap.comp_apply] + rw [Bundle.Trivialization.symmL_continuousLinearMapAt _ hy] + +lemma coordinateCurve_analytic {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) (x : X.Carrier) {z : ℂ} + (hz : g z ∈ (chartAt (Model X) x).source) : + AnalyticAt ℂ ((chartAt (Model X) x) ∘ g) z := by + have hc := contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz + exact (hc.comp z (hg z)).contDiffAt.analyticAt + +lemma coordinateCurve_derivative {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) (x : X.Carrier) {z : ℂ} + (hz : g z ∈ (chartAt (Model X) x).source) : + deriv ((chartAt (Model X) x) ∘ g) z = + (trivializationAt (Model X) (Tangent X) x).continuousLinearMapAt ℂ (g z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ)) := by + have hc := (contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hz).mdifferentiableAt (by simp) + have he := mfderiv_comp_apply z hc ((hg z).mdifferentiableAt (by simp)) (1 : ℂ) + rw [mfderiv_eq_fderiv] at he + change (fderiv ℂ ((chartAt (Model X) x) ∘ g) z) (1 : ℂ) = + mfderiv (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) (g z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ)) at he + rw [fderiv_eq_smul_deriv,one_smul] at he + have ht := TangentBundle.continuousLinearMapAt_trivializationAt (I := ModelWithCorners X) hz + rw [ht] + change deriv ((chartAt (Model X) x) ∘ g) z = + mfderiv (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) (g z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ)) + exact he + +lemma coordinateCurve_complementary {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + (x : X.Carrier) {z : ℂ} (hz : g z ∈ (chartAt (Model X) x).source) : + S.coordinateProjector x ((chartAt (Model X) x) (g z)) + (deriv ((chartAt (Model X) x) ∘ g) z)=0 := by + rw [coordinateCurve_derivative hg x hz,S.coordinateProjector_fixed x hz,hv z,map_zero] + + +lemma coordinateProjector_eventually_idempotent (x : X.Carrier) {z : Model X} + (hz : z ∈ (chartAt (Model X) x).target) : + ∀ᶠ w in 𝓝 z, S.coordinateProjector x w*S.coordinateProjector x w=S.coordinateProjector x w := by + filter_upwards [(chartAt (Model X) x).open_target.mem_nhds hz] with w hw + apply ContinuousLinearMap.ext + intro v + exact S.coordinateProjector_idempotent x hw v + + + +theorem exists_manifold_local_transport {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) (a : ℂ) : + ∃ ε : ℝ, 0 < ε ∧ ∃ T : ℂ → ℂ → Model X →L[ℂ] Model X, + (∀ z ∈ Metric.ball a ε, g z ∈ (chartAt (Model X) (g a)).source) ∧ + AnalyticOnNhd ℂ (fun w : ℂ × ℂ => T w.1 w.2) (Metric.ball a ε ×ˢ Metric.ball a ε) ∧ + (∀ s ∈ Metric.ball a ε, T s s=1) ∧ + (∀ s ∈ Metric.ball a ε, ∀ t ∈ Metric.ball a ε, ∀ u ∈ Metric.ball a ε, T t u*T s t=T s u) ∧ + (∀ s ∈ Metric.ball a ε, ∀ t ∈ Metric.ball a ε, ∀ v : Model X, + S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g s)) v=v → + S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g t)) (T s t v)=T s t v ∧ + PullbackConnection.covariantDerivative (S.coordinateProjector (g a)) + ((chartAt (Model X) (g a)) ∘ g) (fun w => T s w v) t=0) := by + let c := chartAt (Model X) (g a) + have ha : g a ∈ c.source := mem_chart_source (Model X) (g a) + have hat : c (g a) ∈ c.target := c.map_source ha + obtain ⟨r,hr,T,hTa,hT0,_,hTc,hTh⟩ := PullbackConnection.exists_local_horizontal_transport + (S.coordinateProjector_analytic (g a) _ hat) (coordinateCurve_analytic hg (g a) ha) + (S.coordinateProjector_eventually_idempotent (g a) hat) + obtain ⟨q,hq,hqn⟩ := Metric.eventually_nhds_iff_ball.mp (hg.continuous.continuousAt (c.open_source.mem_nhds ha)) + have hrm : Metric.ball a (min r q) ⊆ Metric.ball a r := Metric.ball_subset_ball (min_le_left _ _) + have hqm : Metric.ball a (min r q) ⊆ Metric.ball a q := Metric.ball_subset_ball (min_le_right _ _) + refine ⟨min r q,lt_min hr hq,T,?_,?_,?_,?_,?_⟩ + · exact fun z hz => hqn z (hqm hz) + · exact hTa.mono (Set.prod_mono hrm hrm) + · exact fun s hs => hT0 s (hrm hs) + · exact fun s hs t ht u hu => hTc s (hrm hs) t (hrm ht) u (hrm hu) + · exact fun s hs t ht v hv => hTh s (hrm hs) t (hrm ht) v hv + +end + +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +abbrev TangentImageFiber (g : ℂ → X.Carrier) (z : ℂ) := + {v : Tangent X (g z) // S.projector (g z) v=v} + + + +structure LocalChartImages (g : ℂ → X.Carrier) where + radius : ℂ → ℝ + positive : ∀ a, 0 < radius a + chart_source : ∀ a z, z ∈ Metric.ball a (radius a) → g z ∈ (chartAt (Model X) (g a)).source + trans : ℂ → ℂ → ℂ → Model X →L[ℂ] Model X + analytic : ∀ a, AnalyticOnNhd ℂ (fun w : ℂ × ℂ => trans a w.1 w.2) + (Metric.ball a (radius a) ×ˢ Metric.ball a (radius a)) + normalized : ∀ a s, s ∈ Metric.ball a (radius a) → trans a s s=1 + cocycle : ∀ a s, s ∈ Metric.ball a (radius a) → ∀ t, t ∈ Metric.ball a (radius a) → + ∀ u, u ∈ Metric.ball a (radius a) → trans a t u*trans a s t=trans a s u + horizontal : ∀ a s, s ∈ Metric.ball a (radius a) → ∀ t, t ∈ Metric.ball a (radius a) → + ∀ v : Model X, S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g s)) v=v → + S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g t)) (trans a s t v)=trans a s t v ∧ + covariantDerivative (S.coordinateProjector (g a)) ((chartAt (Model X) (g a)) ∘ g) + (fun w => trans a s w v) t=0 + +namespace LocalChartImages +variable {S} {g : ℂ → X.Carrier} (L : LocalChartImages S g) + +abbrev frame (_L : LocalChartImages S g) (a : ℂ) := trivializationAt (Model X) (Tangent X) (g a) +abbrev coords (a z : ℂ) := (L.frame a).continuousLinearMapAt ℂ (g z) +abbrev uncoords (a z : ℂ) := (L.frame a).symmL ℂ (g z) + +lemma center (a : ℂ) : a ∈ Metric.ball a (L.radius a) := Metric.mem_ball_self (L.positive a) +lemma frame_mem {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) : g z ∈ (L.frame a).baseSet := + L.chart_source a z hz +lemma uncoords_coords {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) (v : Tangent X (g z)) : + L.uncoords a z (L.coords a z v)=v := (L.frame a).symmL_continuousLinearMapAt (L.frame_mem hz) v +lemma coords_uncoords {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) (v : Model X) : + L.coords a z (L.uncoords a z v)=v := (L.frame a).continuousLinearMapAt_symmL (L.frame_mem hz) v + +lemma coords_fixed {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) (v : TangentImageFiber S g z) : + S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g z)) (L.coords a z v)=L.coords a z v := by + rw [S.coordinateProjector_fixed (g a) (L.chart_source a z hz),v.2] + +lemma uncoords_fixed {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) {v : Model X} + (hv : S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g z)) v=v) : + S.projector (g z) (L.uncoords a z v)=L.uncoords a z v := by + have h := S.coordinateProjector_fixed (g a) (L.chart_source a z hz) (L.uncoords a z v) + change S.coordinateProjector (g a) ((chartAt (Model X) (g a)) (g z)) + (L.coords a z (L.uncoords a z v))=L.coords a z (S.projector (g z) (L.uncoords a z v)) at h + rw [L.coords_uncoords hz,hv] at h + have he := congrArg (L.uncoords a z) h + rw [L.uncoords_coords hz] at he + exact he.symm + +lemma trans_analytic {a s t : ℂ} (hs : s ∈ Metric.ball a (L.radius a)) + (ht : t ∈ Metric.ball a (L.radius a)) (v : Model X) : + AnalyticAt ℂ (fun w => L.trans a s w v) t := by + have h := (L.analytic a (s,t) ⟨hs,ht⟩).comp (analyticAt_const.prod analyticAt_id) + exact ((ContinuousLinearMap.apply ℂ (Model X) (E := Model X)).analyticAt_bilinear _).comp (analyticAt_const.prod h) + +def forward (a z : ℂ) (v : TangentImageFiber S g a) : TangentImageFiber S g z := by + classical + exact if hz : z ∈ Metric.ball a (L.radius a) then + ⟨L.uncoords a z (L.trans a a z (L.coords a a v)), + L.uncoords_fixed hz ((L.horizontal a a (L.center a) z hz _ (L.coords_fixed (L.center a) v)).1)⟩ + else ⟨0,by simp⟩ + +def reverse (a z : ℂ) (v : TangentImageFiber S g z) : TangentImageFiber S g a := by + classical + exact if hz : z ∈ Metric.ball a (L.radius a) then + ⟨L.uncoords a a (L.trans a z a (L.coords a z v)), + L.uncoords_fixed (L.center a) ((L.horizontal a z hz a (L.center a) _ (L.coords_fixed hz v)).1)⟩ + else ⟨0,by simp⟩ + +lemma forward_val {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) (v : TangentImageFiber S g a) : + (L.forward a z v).1=L.uncoords a z (L.trans a a z (L.coords a a v)) := by + simp only [forward,dite_eq_left hz] +lemma reverse_val {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) (v : TangentImageFiber S g z) : + (L.reverse a z v).1=L.uncoords a a (L.trans a z a (L.coords a z v)) := by + simp only [reverse,dite_eq_left hz] + +lemma left_inverse {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) : + Function.LeftInverse (L.reverse a z) (L.forward a z) := by + intro v + apply Subtype.ext + rw [L.reverse_val hz,L.forward_val hz,L.coords_uncoords hz] + have he := congrArg (fun A : Model X →L[ℂ] Model X => A (L.coords a a v)) + (L.cocycle a a (L.center a) z hz a (L.center a)) + rw [L.normalized a a (L.center a)] at he + change L.uncoords a a (L.trans a z a (L.trans a a z (L.coords a a v)))=v + rw [show L.trans a z a (L.trans a a z (L.coords a a v))=L.coords a a v from he] + exact L.uncoords_coords (L.center a) v + +lemma right_inverse {a z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) : + Function.RightInverse (L.reverse a z) (L.forward a z) := by + intro v + apply Subtype.ext + rw [L.forward_val hz,L.reverse_val hz,L.coords_uncoords (L.center a)] + have he := congrArg (fun A : Model X →L[ℂ] Model X => A (L.coords a z v)) + (L.cocycle a z hz a (L.center a) z hz) + rw [L.normalized a z hz] at he + change L.uncoords a z (L.trans a a z (L.trans a z a (L.coords a z v)))=v + rw [show L.trans a a z (L.trans a z a (L.coords a z v))=L.coords a z v from he] + exact L.uncoords_coords hz v + +lemma normalized_forward (a : ℂ) (v : TangentImageFiber S g a) : L.forward a a v=v := by + apply Subtype.ext + rw [L.forward_val (L.center a),L.normalized a a (L.center a),one_apply_eq_self] + exact L.uncoords_coords (L.center a) v + +end LocalChartImages + + + +theorem exists_local_chart_images {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) : Nonempty (LocalChartImages S g) := by + have h := fun a => S.exists_manifold_local_transport hg a + choose r hr T hsrc hTa hTn hTc hTh using h + exact ⟨⟨r,hr,hsrc,T,hTa,hTn,hTc,hTh⟩⟩ + +end SplitTangent.TangentSplitting + +namespace SplitTangent.PullbackConnection +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] +lemma covariantDerivative_curve_congr {P : E → E →L[ℂ] E} {g h v : ℂ → E} {z : ℂ} + (he : g =ᶠ[𝓝 z] h) : covariantDerivative P g v z=covariantDerivative P h v z := by + simp only [covariantDerivative,coefficient,he.eq_of_nhds,he.deriv_eq] +end SplitTangent.PullbackConnection + +namespace SplitTangent.TangentSplitting.LocalChartImages +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + +lemma transition_curve {a b z : ℂ} (hz : z ∈ Metric.ball a (L.radius a)) : + coordinateTransition (g a) (g b) ((chartAt (Model X) (g a)) (g z)) = + (chartAt (Model X) (g b)) (g z) := by + dsimp only [coordinateTransition,Function.comp_apply] + rw [(chartAt (Model X) (g a)).left_inv (L.chart_source a z hz)] + +lemma transition_derivative {a b z : ℂ} (ha : z ∈ Metric.ball a (L.radius a)) + (hb : z ∈ Metric.ball b (L.radius b)) : + fderiv ℂ (coordinateTransition (g a) (g b)) ((chartAt (Model X) (g a)) (g z)) = + (L.coords b z).comp (L.uncoords a z) := by + have hsa := L.chart_source a z ha + have hsb := L.chart_source b z hb + have he := (chartAt (Model X) (g a)).left_inv hsa + rw [coordinateTransition_derivative (g a) (g b) ((chartAt (Model X) (g a)).map_source hsa) + (by rw [he]; exact hsb),he] + +lemma overlap_locally_unique + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + {a b z : ℂ} (ha : z ∈ Metric.ball a (L.radius a)) (hb : z ∈ Metric.ball b (L.radius b)) + (v : TangentImageFiber S g a) : + ∀ᶠ w in 𝓝 z, L.forward b w (L.reverse b z (L.forward a z v))=L.forward a w v := by + let c := chartAt (Model X) (g a) + let d := chartAt (Model X) (g b) + let φ := coordinateTransition (g a) (g b) + let P := S.coordinateProjector (g a) + let Q := S.coordinateProjector (g b) + let u := L.reverse b z (L.forward a z v) + let f := fun w => L.trans a a w (L.coords a a v) + let h := fun w => L.trans b b w (L.coords b b u) + have hsa : g z ∈ c.source := L.chart_source a z ha + have hsb : g z ∈ d.source := L.chart_source b z hb + have he : c.symm (c (g z))=g z := c.left_inv hsa + have hφ : φ (c (g z))=d (g z) := L.transition_curve ha + have hhp : AnalyticAt ℂ P (c (g z)) := S.coordinateProjector_analytic (g a) _ (c.map_source hsa) + have hhq : AnalyticAt ℂ Q (φ (c (g z))) := by + rw [hφ] + exact S.coordinateProjector_analytic (g b) _ (d.map_source hsb) + have hha : AnalyticAt ℂ φ (c (g z)) := coordinateTransition_analytic (g a) (g b) + (c.map_source hsa) (by change c.symm (c (g z)) ∈ d.source; rw [he]; exact hsb) + have hiq : ∀ᶠ y in 𝓝 (φ (c (g z))), Q y*Q y=Q y := by + rw [hφ] + exact S.coordinateProjector_eventually_idempotent (g b) (d.map_source hsb) + have hnat : ∀ᶠ y in 𝓝 (c (g z)), ∀ t : Model X, + Q (φ y) (fderiv ℂ φ y t)=fderiv ℂ φ y (P y t) := by + have hcn : ContinuousAt c.symm (c (g z)) := c.continuousAt_symm (c.map_source hsa) + have hy : ∀ᶠ y in 𝓝 (c (g z)), c.symm y ∈ d.source := + hcn (d.open_source.mem_nhds (by rw [he]; exact hsb)) + filter_upwards [c.open_target.mem_nhds (c.map_source hsa),hy] with y hy hy' + intro t + exact (congrArg (fun A : Model X →L[ℂ] Model X => A t) + (S.coordinateProjector_intertwining (g a) (g b) hy hy')).symm + have hnA : ∀ᶠ w in 𝓝 z, w ∈ Metric.ball a (L.radius a) := Metric.isOpen_ball.mem_nhds ha + have hnB : ∀ᶠ w in 𝓝 z, w ∈ Metric.ball b (L.radius b) := Metric.isOpen_ball.mem_nhds hb + have hcur : (φ ∘ (c ∘ g)) =ᶠ[𝓝 z] d ∘ g := by + filter_upwards [hnA] with w hw + exact L.transition_curve hw + have hcur' := eventually_eventually_nhds.mpr hcur + have hvel : ∀ᶠ w in 𝓝 z, P ((c ∘ g) w) (deriv (c ∘ g) w)=0 := by + filter_upwards [hnA] with w hw + exact S.coordinateCurve_complementary hg hv (g a) (L.chart_source a w hw) + have hfi : ∀ᶠ w in 𝓝 z, P ((c ∘ g) w) (f w)=f w := by + filter_upwards [hnA] with w hw + exact (L.horizontal a a (L.center a) w hw _ (L.coords_fixed (L.center a) v)).1 + have hhi : ∀ᶠ w in 𝓝 z, Q (φ ((c ∘ g) w)) (h w)=h w := by + filter_upwards [hnA,hnB] with w hw hw' + rw [show φ ((c ∘ g) w)=d (g w) from L.transition_curve hw] + exact (L.horizontal b b (L.center b) w hw' _ (L.coords_fixed (L.center b) u)).1 + have hfh : ∀ᶠ w in 𝓝 z, covariantDerivative P (c ∘ g) f w=0 := by + filter_upwards [hnA] with w hw + exact (L.horizontal a a (L.center a) w hw _ (L.coords_fixed (L.center a) v)).2 + have hhh : ∀ᶠ w in 𝓝 z, covariantDerivative Q (φ ∘ (c ∘ g)) h w=0 := by + filter_upwards [hnB,hcur'] with w hw hc + rw [covariantDerivative_curve_congr hc] + exact (L.horizontal b b (L.center b) w hw _ (L.coords_fixed (L.center b) u)).2 + have hstart : h z=fderiv ℂ φ ((c ∘ g) z) (f z) := by + have hs := congrArg (fun t : TangentImageFiber S g z => L.coords b z t.1) + (L.right_inverse hb (L.forward a z v)) + rw [L.forward_val hb,L.forward_val ha,L.coords_uncoords hb] at hs + rw [show fderiv ℂ φ ((c ∘ g) z)=(L.coords b z).comp (L.uncoords a z) from + L.transition_derivative ha hb] + exact hs + have hu := horizontal_chart_compatibility hhp hhq hha (coordinateCurve_analytic hg (g a) hsa) + (L.trans_analytic (L.center a) ha _) (L.trans_analytic (L.center b) hb _) + hiq hnat hvel hfi hhi hfh hhh hstart + filter_upwards [hu,hnA,hnB] with w hw hwA hwB + apply Subtype.ext + rw [L.forward_val hwB,L.forward_val hwA] + change L.uncoords b w (h w)=L.uncoords a w (f w) + change h w=fderiv ℂ φ ((c ∘ g) w) (f w) at hw + rw [hw,show fderiv ℂ φ ((c ∘ g) w)=(L.coords b w).comp (L.uncoords a w) from + L.transition_derivative hwA hwB,ContinuousLinearMap.comp_apply,L.uncoords_coords hwB] + +end SplitTangent.TangentSplitting.LocalChartImages + +namespace SplitTangent.TangentSplitting +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +namespace LocalChartImages +variable {S} {g : ℂ → X.Carrier} (L : LocalChartImages S g) + + + +def toData (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) : + LocalTransportData ℂ (TangentImageFiber S g) where + domain := fun a => Metric.ball a (L.radius a) + domain_open := fun _ => Metric.isOpen_ball + domain_self := L.center + forward := L.forward + reverse := L.reverse + left_inv := fun _ _ hz => L.left_inverse hz + right_inv := fun _ _ hz => L.right_inverse hz + forward_self := L.normalized_forward + overlap := fun _ _ _ hz v => L.overlap_locally_unique hg hv hz.1 hz.2 v + +end LocalChartImages + + + +theorem exists_manifold_horizontal {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + (a : ℂ) (v : Tangent X (g a)) (hvi : S.projector (g a) v=v) : + ∃ s : ∀ z, Tangent X (g z), + ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,s z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) ∧ + s a=v ∧ (∀ z, S.projector (g z) (s z)=s z) ∧ + ∀ z, covariantDerivative (S.coordinateProjector (g z)) ((chartAt (Model X) (g z)) ∘ g) + (fun w => (trivializationAt (Model X) (Tangent X) (g z)).continuousLinearMapAt ℂ (g w) (s w)) z=0 := by + obtain ⟨L⟩ := S.exists_local_chart_images hg + let D := L.toData hg hv + obtain ⟨σ,hσ,hσa⟩ := D.exists_normalized_horizontal continuous_id a (⟨v,hvi⟩ : TangentImageFiber S g a) + let s : ∀ z, Tangent X (g z) := fun z => (σ z).2.1 + have hbase (z : ℂ) : (σ z).1=z := D.horizontal_base hσ z + have hlocal (z : ℂ) : ∃ u : TangentImageFiber S g z, + (fun w => L.coords z w (s w)) =ᶠ[𝓝 z] fun w => L.trans z z w (L.coords z z u) := by + obtain ⟨u,hu⟩ := hσ z + refine ⟨u,?_⟩ + filter_upwards [hu,Metric.isOpen_ball.mem_nhds (L.center z)] with w hw hm + change L.coords z w ((σ w).2.1)=_ + rw [hw] + change L.coords z w (L.forward z w u).1=_ + rw [L.forward_val hm,L.coords_uncoords hm] + refine ⟨s,?_,?_,?_,?_⟩ + · intro z + obtain ⟨u,hu⟩ := hlocal z + have han : AnalyticAt ℂ (fun w => L.coords z w (s w)) z := + (L.trans_analytic (L.center z) (L.center z) _).congr hu.symm + let t := trivializationAt (Model X) (Tangent X) (g z) + have hz : g z ∈ t.baseSet := L.frame_mem (L.center z) + apply (t.contMDiffAt_iff (f := fun w => (⟨g w,s w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) + (by simpa only [t.mem_source] using hz)).mpr + refine ⟨hg z,?_⟩ + apply han.contDiffAt.contMDiffAt.congr_of_eventuallyEq + filter_upwards [Metric.isOpen_ball.mem_nhds (L.center z)] with w hw + exact (t.continuousLinearMapAt_apply_of_mem ℂ (L.frame_mem hw) (s w)).symm + · change (σ a).2.1=v + rw [hσa] + · intro z + have hi : S.projector (g (σ z).1) (s z)=s z := (σ z).2.2 + rwa [hbase z] at hi + · intro z + obtain ⟨u,hu⟩ := hlocal z + rw [covariantDerivative_congr hu] + exact (L.horizontal z z (L.center z) z (L.center z) _ (L.coords_fixed (L.center z) u)).2 + +end SplitTangent.TangentSplitting + +open Filter Topology +namespace SplitTangent.AnalyticContinuation +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + + + +theorem subset_of_local_analytic_equations {U Z : Set E} (hU : IsPreconnected U) + (hlocal : ∀ x ∈ U, ∃ f : E → F, AnalyticAt ℂ f x ∧ + ∀ᶠ y in 𝓝 x, y ∈ Z ↔ f y = 0) + (hne : (U ∩ interior Z).Nonempty) : U ⊆ Z := by + suffices U ⊆ interior Z from this.trans interior_subset + apply hU.subset_of_closure_inter_subset isOpen_interior hne + rintro x ⟨hx,hxU⟩ + obtain ⟨f,hf,he⟩ := hlocal x hxU + have hn : ∀ᶠ y in 𝓝 x, AnalyticAt ℂ f y ∧ (y ∈ Z ↔ f y = 0) := + hf.eventually_analyticAt.and he + obtain ⟨r,hr,hrsub⟩ := Metric.mem_nhds_iff.mp hn + obtain ⟨y,hy,hyI⟩ := mem_closure_iff.mp hx (Metric.ball x r) Metric.isOpen_ball + (Metric.mem_ball_self hr) + have hzero : f =ᶠ[𝓝 y] 0 := by + filter_upwards [Metric.isOpen_ball.mem_nhds hy,isOpen_interior.mem_nhds hyI] with a ha hai + exact (hrsub ha).2.mp (interior_subset hai) + have ha : AnalyticOnNhd ℂ f (Metric.ball x r) := fun a ha => (hrsub ha).1 + have hball : Set.EqOn f 0 (Metric.ball x r) := + ha.eqOn_zero_of_preconnected_of_eventuallyEq_zero (convex_ball x r).isPreconnected hy hzero + apply mem_interior_iff_mem_nhds.mpr + apply Filter.mem_of_superset (Metric.ball_mem_nhds x hr) + intro y hy + exact (hrsub hy).2.mpr (hball hy) + +end SplitTangent.AnalyticContinuation + +namespace SplitTangent.AnalyticManifoldMaps +open Filter Topology Set +variable {E H : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup H] [NormedSpace ℂ H] [CompleteSpace H] + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] [IsManifold 𝓘(ℂ,H) ω M] [T2Space M] + +omit [CompleteSpace H] in +lemma equality_local_equations {F G : E → M} {z : E} + (hF : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,H) ω F z) + (hG : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,H) ω G z) : + ∃ f : E → ℂ × H, AnalyticAt ℂ f z ∧ + ∀ᶠ w in 𝓝 z, F w = G w ↔ f w = 0 := by + classical + by_cases he : F z = G z + · let c := chartAt H (F z) + have hFc : F z ∈ c.source := mem_chart_source H (F z) + have hGc : G z ∈ c.source := he ▸ hFc + have hc := IsManifold.chart_mem_maximalAtlas (I := 𝓘(ℂ,H)) (n := ω) (F z) + have hFA := ((contMDiffAt_of_mem_maximalAtlas hc hFc).comp z hF).contDiffAt.analyticAt + have hGA := ((contMDiffAt_of_mem_maximalAtlas hc hGc).comp z hG).contDiffAt.analyticAt + refine ⟨fun w => (0,c (F w)-c (G w)), analyticAt_const.prod (hFA.sub hGA),?_⟩ + filter_upwards [hF.continuousAt.eventually (c.open_source.mem_nhds hFc), + hG.continuousAt.eventually (c.open_source.mem_nhds hGc)] with w hwF hwG + constructor + · intro h; simp only [h,sub_self,Prod.zero_eq_mk] + · intro h + have hh := congrArg Prod.snd h + exact c.injOn hwF hwG (sub_eq_zero.mp hh) + · refine ⟨fun _ => (1,0),analyticAt_const,?_⟩ + have hn : ∀ᶠ w in 𝓝 z, F w ≠ G w := + (hF.continuousAt.prodMk hG.continuousAt).eventually + (isClosed_diagonal.isOpen_compl.mem_nhds he) + filter_upwards [hn] with w hw + simp only [hw,Prod.zero_eq_mk,Prod.mk.injEq,one_ne_zero,false_and] + +theorem eqOn_of_eventuallyEq {F G : E → M} {U : Set E} + (hU : IsPreconnected U) + (hF : ∀ z ∈ U, ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,H) ω F z) + (hG : ∀ z ∈ U, ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,H) ω G z) + {a : E} (ha : a ∈ U) (he : F =ᶠ[𝓝 a] G) : Set.EqOn F G U := by + exact AnalyticContinuation.subset_of_local_analytic_equations hU + (fun z hz => equality_local_equations (hF z hz) (hG z hz)) + ⟨a,ha,mem_interior_iff_mem_nhds.mpr he⟩ + +end SplitTangent.AnalyticManifoldMaps + +namespace SplitTangent.PullbackConnection +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + + +lemma covariantDerivative_reparam {P : E → E →L[ℂ] E} {g s : ℂ → E} {k : ℂ → ℂ} {z : ℂ} + (hg : DifferentiableAt ℂ g (k z)) (hs : DifferentiableAt ℂ s (k z)) + (hk : DifferentiableAt ℂ k z) : + covariantDerivative P (g ∘ k) (s ∘ k) z = + deriv k z • covariantDerivative P g s (k z) := by + have hg' := (hg.hasDerivAt.scomp z hk.hasDerivAt).deriv + have hs' := (hs.hasDerivAt.scomp z hk.hasDerivAt).deriv + simp only [covariantDerivative,coefficient,Function.comp_apply,hg',hs', + ContinuousLinearMap.flip_apply,map_smul,smul_apply,smul_add] + +end SplitTangent.PullbackConnection + +namespace SplitTangent.TangentSplitting.LocalChartImages +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) +variable (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + +lemma cover_section_coordinates {σ : ℂ → (z : ℂ) × TangentImageFiber S g z} + (hσ : (L.toData hg hv).IsHorizontalAlong id σ) (z : ℂ) : + ∃ u : TangentImageFiber S g z, + (fun w => L.coords z w ((σ w).2.1)) =ᶠ[𝓝 z] fun w => L.trans z z w (L.coords z z u) := by + obtain ⟨u,hu⟩ := hσ z + refine ⟨u,?_⟩ + filter_upwards [hu,Metric.isOpen_ball.mem_nhds (L.center z)] with w hw hm + rw [hw] + change L.coords z w (L.forward z w u).1=_ + rw [L.forward_val hm,L.coords_uncoords hm] + +lemma cover_section_holomorphic {σ : ℂ → (z : ℂ) × TangentImageFiber S g z} + (hσ : (L.toData hg hv).IsHorizontalAlong id σ) : + ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,(σ z).2.1⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) := by + intro z + obtain ⟨u,hu⟩ := L.cover_section_coordinates hg hv hσ z + have han : AnalyticAt ℂ (fun w => L.coords z w ((σ w).2.1)) z := + (L.trans_analytic (L.center z) (L.center z) _).congr hu.symm + let t := trivializationAt (Model X) (Tangent X) (g z) + have hz : g z ∈ t.baseSet := L.frame_mem (L.center z) + apply (t.contMDiffAt_iff (f := fun w => (⟨g w,(σ w).2.1⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) + (by simpa only [t.mem_source] using hz)).mpr + refine ⟨hg z,?_⟩ + apply han.contDiffAt.contMDiffAt.congr_of_eventuallyEq + filter_upwards [Metric.isOpen_ball.mem_nhds (L.center z)] with w hw + exact (t.continuousLinearMapAt_apply_of_mem ℂ (L.frame_mem hw) ((σ w).2.1)).symm + +end SplitTangent.TangentSplitting.LocalChartImages + +namespace SplitTangent.TangentSplitting +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +lemma rational_forward_germ (g : RationalCurve X) + (Lf : LocalChartImages S g.finite) (Li : LocalChartImages S g.infinity) + (v : TangentImageFiber S g.finite 1) (w : TangentImageFiber S g.infinity 1) + (hvw : v.1=w.1) : + (fun z => (Lf.forward 1 z v).1) =ᶠ[𝓝 (1 : ℂ)] fun z => (Li.forward 1 z⁻¹ w).1 := by + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + let c := chartAt (Model X) (g.finite 1) + let P := S.coordinateProjector (g.finite 1) + let f := fun z => Lf.trans 1 1 z (Lf.coords 1 1 v) + let h := fun z => Li.trans 1 1 z⁻¹ (Li.coords 1 1 w) + have hi : Tendsto (fun z : ℂ => z⁻¹) (𝓝 1) (𝓝 1) := by simpa using (continuousAt_inv₀ (one_ne_zero : (1:ℂ)≠0)).tendsto + have hnF : ∀ᶠ z : ℂ in 𝓝 1, z ∈ Metric.ball 1 (Lf.radius 1) := Metric.isOpen_ball.mem_nhds (Lf.center 1) + have hnI : ∀ᶠ z : ℂ in 𝓝 1, z⁻¹ ∈ Metric.ball 1 (Li.radius 1) := hi (Metric.isOpen_ball.mem_nhds (Li.center 1)) + have hn0 : ∀ᶠ z : ℂ in 𝓝 1, z≠0 := eventually_ne_nhds one_ne_zero + have hcur : (c ∘ g.finite) =ᶠ[𝓝 (1 : ℂ)] (c ∘ g.infinity) ∘ (fun z => z⁻¹) := by + filter_upwards [hn0] with z hz + exact congrArg c (g.overlap z hz) + have hcur' := eventually_eventually_nhds.mpr hcur + have hf : ∀ᶠ z : ℂ in 𝓝 1, DifferentiableAt ℂ f z ∧ covariantDerivative P (c ∘ g.finite) f z=0 := by + filter_upwards [hnF] with z hz + exact ⟨(Lf.trans_analytic (Lf.center 1) hz _).differentiableAt, + (Lf.horizontal 1 1 (Lf.center 1) z hz _ (Lf.coords_fixed (Lf.center 1) v)).2⟩ + have hh : ∀ᶠ z : ℂ in 𝓝 1, DifferentiableAt ℂ h z ∧ covariantDerivative P (c ∘ g.finite) h z=0 := by + filter_upwards [hnI,hn0,hcur'] with z hz hz0 hcz + have hA := Li.trans_analytic (Li.center 1) hz (Li.coords 1 1 w) + have hk : DifferentiableAt ℂ (fun z : ℂ => z⁻¹) z := differentiableAt_inv hz0 + have hgA := coordinateCurve_analytic g.infinity_holomorphic (g.infinity 1) (Li.chart_source 1 z⁻¹ hz) + have hh0 := (Li.horizontal 1 1 (Li.center 1) z⁻¹ hz _ (Li.coords_fixed (Li.center 1) w)).2 + have hrep := covariantDerivative_reparam (P := S.coordinateProjector (g.infinity 1)) hgA.differentiableAt hA.differentiableAt hk + refine ⟨hA.differentiableAt.comp z hk,?_⟩ + rw [covariantDerivative_curve_congr hcz] + dsimp only [P,c,h] + rw [hb] + change covariantDerivative (S.coordinateProjector (g.infinity 1)) + (((chartAt (Model X) (g.infinity 1)) ∘ g.infinity) ∘ (fun z => z⁻¹)) + ((fun z => Li.trans 1 1 z (Li.coords 1 1 w)) ∘ (fun z => z⁻¹)) z=0 + rw [hrep,hh0,smul_zero] + have hfi : ∀ᶠ z : ℂ in 𝓝 1, P ((c ∘ g.finite) z) (f z)=f z := by + filter_upwards [hnF] with z hz + exact (Lf.horizontal 1 1 (Lf.center 1) z hz _ (Lf.coords_fixed (Lf.center 1) v)).1 + have hhi : ∀ᶠ z : ℂ in 𝓝 1, P ((c ∘ g.finite) z) (h z)=h z := by + filter_upwards [hnI,hn0] with z hz hz0 + dsimp only [P,c,Function.comp_apply] + rw [g.overlap z hz0,hb] + exact (Li.horizontal 1 1 (Li.center 1) z⁻¹ hz _ (Li.coords_fixed (Li.center 1) w)).1 + have he : f 1=h 1 := by + dsimp only [f,h] + rw [inv_one,Lf.normalized 1 1 (Lf.center 1),Li.normalized 1 1 (Li.center 1)] + simp only [one_apply_eq_self] + change (trivializationAt (Model X) (Tangent X) (g.finite 1)).continuousLinearMapAt ℂ (g.finite 1) v.1= + (trivializationAt (Model X) (Tangent X) (g.infinity 1)).continuousLinearMapAt ℂ (g.infinity 1) w.1 + simp only [hb,hvw] + have hcbase (x y : X.Carrier) (hxy : x=y) (q : Model X) : + (trivializationAt (Model X) (Tangent X) (g.infinity 1)).continuousLinearMapAt ℂ x q = + (trivializationAt (Model X) (Tangent X) (g.infinity 1)).continuousLinearMapAt ℂ y q := by + subst y + rfl + exact hcbase _ _ hb w.1 + have hsource : g.finite 1 ∈ c.source := mem_chart_source (Model X) (g.finite 1) + have hu := horizontal_local_uniqueness (S.coordinateProjector_analytic _ _ (c.map_source hsource)) + (coordinateCurve_analytic g.finite_holomorphic _ hsource) + (S.coordinateProjector_eventually_idempotent _ (c.map_source hsource)) hf hh hfi hhi he + filter_upwards [hu,hnF,hnI,hn0] with z hz hzF hzI hz0 + rw [Lf.forward_val hzF,Li.forward_val hzI] + change Lf.uncoords 1 z (f z)=Li.uncoords 1 z⁻¹ (h z) + rw [hz] + dsimp only [LocalChartImages.uncoords,LocalChartImages.frame] + simp only [hb] + have hubase (x y : X.Carrier) (hxy : x=y) (q : Model X) : + (trivializationAt (Model X) (Tangent X) (g.infinity 1)).symmL ℂ x q = + (trivializationAt (Model X) (Tangent X) (g.infinity 1)).symmL ℂ y q := by + subst y + rfl + exact hubase _ _ (g.overlap z hz0) (h z) + +end SplitTangent.TangentSplitting + +namespace SplitTangent +open Filter Topology Set +variable {X : ComplexManifold.{u}} + + + +lemma rational_section_gluing (g : RationalCurve X) + (sf : ∀ z, Tangent X (g.finite z)) (si : ∀ z, Tangent X (g.infinity z)) + (hf : ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g.finite z,sf z⟩ : TangentBundle (ModelWithCorners X) X.Carrier))) + (hi : ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g.infinity z,si z⟩ : TangentBundle (ModelWithCorners X) X.Carrier))) + (he : sf =ᶠ[𝓝 (1:ℂ)] fun z => si z⁻¹) : ∀ z, z≠0 → sf z=si z⁻¹ := by + have hconn : IsPreconnected ({0}ᶜ : Set ℂ) := + (isPathConnected_compl_singleton_of_one_lt_rank (by simp [Complex.rank_real_complex]) (0 : ℂ)).isConnected.isPreconnected + have hl : ∀ z ∈ ({0}ᶜ : Set ℂ), ∃ f : ℂ → Model X, AnalyticAt ℂ f z ∧ + ∀ᶠ w in 𝓝 z, sf w=si w⁻¹ ↔ f w=0 := by + intro z hz + let t := trivializationAt (Model X) (Tangent X) (g.finite z) + have hzF : g.finite z ∈ t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + have hzI : g.infinity z⁻¹ ∈ t.baseSet := (g.overlap z hz) ▸ hzF + have hF := ((t.contMDiffAt_iff (f := fun w => (⟨g.finite w,sf w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) + (t.mem_source.mpr hzF)).mp (hf z)).2.contDiffAt.analyticAt + have hInv : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ) ω (fun w : ℂ => w⁻¹) z := + (analyticAt_id.inv hz).contDiffAt.contMDiffAt + have hI := ((t.contMDiffAt_iff (f := fun w => (⟨g.infinity w⁻¹,si w⁻¹⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) + (t.mem_source.mpr hzI)).mp ((hi z⁻¹).comp z hInv)).2.contDiffAt.analyticAt + refine ⟨fun w => (t ⟨g.finite w,sf w⟩).2-(t ⟨g.infinity w⁻¹,si w⁻¹⟩).2,hF.sub hI,?_⟩ + filter_upwards [(g.finite_holomorphic.continuous.continuousAt.eventually (t.open_baseSet.mem_nhds hzF)), + eventually_ne_nhds hz] with w hw hw0 + have hbw := g.overlap w hw0 + have hwF : (⟨g.finite w,sf w⟩ : TangentBundle (ModelWithCorners X) X.Carrier) ∈ t.source := t.mem_source.mpr hw + have hwI : (⟨g.infinity w⁻¹,si w⁻¹⟩ : TangentBundle (ModelWithCorners X) X.Carrier) ∈ t.source := t.mem_source.mpr (hbw ▸ hw) + constructor + · intro h + have htotal : (⟨g.finite w,sf w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)=⟨g.infinity w⁻¹,si w⁻¹⟩ := + Bundle.TotalSpace.ext hbw (heq_of_eq h) + exact sub_eq_zero.mpr (congrArg (fun q => (t q).2) htotal) + · intro h + have hh : t ⟨g.finite w,sf w⟩=t ⟨g.infinity w⁻¹,si w⁻¹⟩ := by + apply Prod.ext + · rw [t.coe_fst hwF,t.coe_fst hwI] + exact hbw + · exact sub_eq_zero.mp h + have hh' := t.injOn hwF hwI hh + exact congrArg (fun q : TangentBundle (ModelWithCorners X) X.Carrier => q.2) hh' + exact fun z hz => AnalyticContinuation.subset_of_local_analytic_equations hconn hl + ⟨1,one_ne_zero,mem_interior_iff_mem_nhds.mpr he⟩ hz + +end SplitTangent + +namespace SplitTangent.HorizontalCovering.LocalTransportData +open Filter Topology +variable {B : Type*} [TopologicalSpace B] {V : B → Type*} + (D : LocalTransportData B V) +lemma horizontal_germ_of_value {σ : B → (b : B) × V b} + (hσ : D.IsHorizontalAlong id σ) {a : B} {v : V a} (ha : σ a=⟨a,v⟩) : + σ =ᶠ[𝓝 a] fun z => ⟨z,D.forward a z v⟩ := by + obtain ⟨w,hw,hh⟩ := D.horizontal_local_form hσ a + have hwv : w=v := sigma_mk_injective (hw.symm.trans ha) + cases hwv + exact hh +end SplitTangent.HorizontalCovering.LocalTransportData + +namespace SplitTangent.TangentSplitting +open Filter Topology Set PullbackConnection HorizontalCovering +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +theorem exists_rational_horizontal_section (g : RationalCurve X) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) (v : Tangent X (g.finite a)) (hv : S.projector (g.finite a) v=v) : + ∃ s : CurveTangentSection g, s.finite a=v ∧ + (∀ z, S.projector (g.finite z) (s.finite z)=s.finite z) ∧ + (∀ z, S.projector (g.infinity z) (s.infinity z)=s.infinity z) := by + classical + obtain ⟨Lf⟩ := S.exists_local_chart_images g.finite_holomorphic + obtain ⟨Li⟩ := S.exists_local_chart_images g.infinity_holomorphic + let Df := Lf.toData g.finite_holomorphic hvf + let Di := Li.toData g.infinity_holomorphic hvi + obtain ⟨σ,hσ,hσa⟩ := Df.exists_normalized_horizontal continuous_id a (⟨v,hv⟩ : TangentImageFiber S g.finite a) + obtain ⟨u,hu,huσ⟩ := Df.horizontal_local_form hσ 1 + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + let w : TangentImageFiber S g.infinity 1 := ⟨u.1,by rw [← hb]; exact u.2⟩ + obtain ⟨τ,hτ,hτ1⟩ := Di.exists_normalized_horizontal continuous_id 1 w + have hτg := Di.horizontal_germ_of_value hτ hτ1 + let sf : ∀ z, Tangent X (g.finite z) := fun z => (σ z).2.1 + let si : ∀ z, Tangent X (g.infinity z) := fun z => (τ z).2.1 + have hsf := Lf.cover_section_holomorphic g.finite_holomorphic hvf hσ + have hsi := Li.cover_section_holomorphic g.infinity_holomorphic hvi hτ + have hloc := S.rational_forward_germ g Lf Li u w rfl + have hinv : Tendsto (fun z : ℂ => z⁻¹) (𝓝 1) (𝓝 1) := by simpa using (continuousAt_inv₀ (one_ne_zero : (1:ℂ)≠0)).tendsto + have he : sf =ᶠ[𝓝 (1:ℂ)] fun z => si z⁻¹ := by + filter_upwards [huσ,hinv hτg,hloc] with z hz hz' hzv + dsimp only [sf,si] + rw [hz,hz'] + exact hzv + have hEq := rational_section_gluing g sf si hsf hsi he + let s : CurveTangentSection g := { + finite := sf + infinity := si + finite_holomorphic := hsf + infinity_holomorphic := hsi + overlap := fun z hz => by + exact hEq z hz } + refine ⟨s,?_,?_,?_⟩ + · change (σ a).2.1=v + rw [hσa] + · intro z + have hh := (σ z).2.2 + change S.projector (g.finite (σ z).1) (sf z)=sf z at hh + rwa [Df.horizontal_base hσ z] at hh + · intro z + have hh := (τ z).2.2 + change S.projector (g.infinity (τ z).1) (si z)=si z at hh + rwa [Di.horizontal_base hτ z] at hh + +end SplitTangent.TangentSplitting + +namespace SplitTangent.HorizontalCovering.LocalTransportData +open Filter Topology Set +variable {B : Type*} [TopologicalSpace B] [SimplyConnectedSpace B] [LocallyPathConnectedSpace B] + {V : B → Type*} (D : LocalTransportData B V) + + +noncomputable def globalSection (a : B) (v : V a) : (b : B) → V b := + fun b => Classical.choose (D.horizontal_local_form + (Classical.choose_spec (D.exists_normalized_horizontal continuous_id a v)).1 b) + +lemma globalSection_horizontal (a : B) (v : V a) : + D.IsHorizontalAlong id (fun b => ⟨b,D.globalSection a v b⟩) := by + let σ := Classical.choose (D.exists_normalized_horizontal continuous_id a v) + have hσ := (Classical.choose_spec (D.exists_normalized_horizontal continuous_id a v)).1 + have he : σ=(fun b => ⟨b,D.globalSection a v b⟩) := by + funext b + exact (Classical.choose_spec (D.horizontal_local_form hσ b)).1 + rw [← he] + exact hσ + +lemma globalSection_self (a : B) (v : V a) : D.globalSection a v a=v := by + have hσ := (Classical.choose_spec (D.exists_normalized_horizontal continuous_id a v)).1 + have he := (Classical.choose_spec (D.horizontal_local_form hσ a)).1 + have hn := (Classical.choose_spec (D.exists_normalized_horizontal continuous_id a v)).2 + exact sigma_mk_injective (he.symm.trans hn) + +lemma globalSection_unique {σ : (b : B) → V b} + (hσ : D.IsHorizontalAlong id (fun b => ⟨b,σ b⟩)) (a : B) : + D.globalSection a (σ a)=σ := by + have he := D.horizontal_unique continuous_id + (D.globalSection_horizontal a (σ a)) hσ a + (by rw [D.globalSection_self]) + funext b + exact sigma_mk_injective (congrFun he b) + +lemma globalSection_cocycle (a b c : B) (v : V a) : + D.globalSection b (D.globalSection a v b) c=D.globalSection a v c := by + exact congrFun (D.globalSection_unique (D.globalSection_horizontal a v) b) c + + + +noncomputable def globalTransport (a b : B) : V a ≃ V b where + toFun v := D.globalSection a v b + invFun v := D.globalSection b v a + left_inv v := by + change D.globalSection b (D.globalSection a v b) a=v + rw [D.globalSection_cocycle,D.globalSection_self] + right_inv v := by + change D.globalSection a (D.globalSection b v a) b=v + rw [D.globalSection_cocycle,D.globalSection_self] + +lemma globalTransport_self (a : B) (v : V a) : D.globalTransport a a v=v := + D.globalSection_self a v + +lemma globalTransport_cocycle (a b c : B) (v : V a) : + D.globalTransport b c (D.globalTransport a b v)=D.globalTransport a c v := + D.globalSection_cocycle a b c v + +lemma globalTransport_germ (a b : B) (v : V a) : + ∀ᶠ z in 𝓝 b, D.globalTransport a z v = + D.forward b z (D.globalTransport a b v) := by + obtain ⟨w,hw,hh⟩ := D.horizontal_local_form (D.globalSection_horizontal a v) b + have hwv : w=D.globalSection a v b := sigma_mk_injective hw.symm + filter_upwards [hh] with z hz + change D.globalSection a v z=_ + exact (sigma_mk_injective hz).trans (congrArg (D.forward b z) hwv) + +end SplitTangent.HorizontalCovering.LocalTransportData + +namespace SplitTangent.TangentSplitting.LocalChartImages +section +open Filter Topology Set HorizontalCovering +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + + + +noncomputable def continuation (a b : ℂ) : + TangentImageFiber S g a ≃ TangentImageFiber S g b := + (L.toData hg hv).globalTransport a b + +lemma continuation_self (a : ℂ) (v : TangentImageFiber S g a) : + L.continuation hg hv a a v=v := + (L.toData hg hv).globalTransport_self a v + +lemma continuation_cocycle (a b c : ℂ) (v : TangentImageFiber S g a) : + L.continuation hg hv b c (L.continuation hg hv a b v)=L.continuation hg hv a c v := + (L.toData hg hv).globalTransport_cocycle a b c v + +lemma continuation_holomorphic (a : ℂ) (v : TangentImageFiber S g a) : + ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,(L.continuation hg hv a z v).1⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) := by + exact L.cover_section_holomorphic hg hv ((L.toData hg hv).globalSection_horizontal a v) + +lemma continuation_add (a b : ℂ) (v w : TangentImageFiber S g a) : + (L.continuation hg hv a b ⟨v.1+w.1,by simp only [map_add,v.2,w.2]⟩).1 = + (L.continuation hg hv a b v).1+(L.continuation hg hv a b w).1 := by + let D := L.toData hg hv + let τ : (z : ℂ) → TangentImageFiber S g z := fun z => ⟨ + (D.globalTransport a z v).1+(D.globalTransport a z w).1, + by rw [map_add,(D.globalTransport a z v).2,(D.globalTransport a z w).2]⟩ + have ht : D.IsHorizontalAlong id (fun z => ⟨z,τ z⟩) := by + intro c + refine ⟨τ c,?_⟩ + filter_upwards [D.globalTransport_germ a c v,D.globalTransport_germ a c w, + Metric.ball_mem_nhds c (L.positive c)] with z hzv hzw hz + apply congrArg (Sigma.mk z) + apply Subtype.ext + change (D.globalTransport a z v).1+(D.globalTransport a z w).1=(L.forward c z (τ c)).1 + rw [hzv,hzw] + change (L.forward c z (D.globalTransport a c v)).1+ + (L.forward c z (D.globalTransport a c w)).1=(L.forward c z (τ c)).1 + rw [L.forward_val hz,L.forward_val hz,L.forward_val hz] + simp only [τ,map_add] + have he := congrFun (D.globalSection_unique ht a) b + have hta : τ a=⟨v.1+w.1,by simp only [map_add,v.2,w.2]⟩ := by + apply Subtype.ext + dsimp only [τ] + rw [D.globalTransport_self,D.globalTransport_self] + rw [hta] at he + exact congrArg Subtype.val he + +lemma continuation_smul (a b : ℂ) (c : ℂ) (v : TangentImageFiber S g a) : + (L.continuation hg hv a b ⟨c • v.1,by simp only [map_smul,v.2]⟩).1 = + c • (L.continuation hg hv a b v).1 := by + let D := L.toData hg hv + let τ : (z : ℂ) → TangentImageFiber S g z := fun z => ⟨ + c • (D.globalTransport a z v).1, + by rw [map_smul,(D.globalTransport a z v).2]⟩ + have ht : D.IsHorizontalAlong id (fun z => ⟨z,τ z⟩) := by + intro d + refine ⟨τ d,?_⟩ + filter_upwards [D.globalTransport_germ a d v, + Metric.ball_mem_nhds d (L.positive d)] with z hzv hz + apply congrArg (Sigma.mk z) + apply Subtype.ext + change c • (D.globalTransport a z v).1=(L.forward d z (τ d)).1 + rw [hzv] + change c • (L.forward d z (D.globalTransport a d v)).1=(L.forward d z (τ d)).1 + rw [L.forward_val hz,L.forward_val hz] + simp only [τ,map_smul] + have he := congrFun (D.globalSection_unique ht a) b + have hta : τ a=⟨c • v.1,by simp only [map_smul,v.2]⟩ := by + apply Subtype.ext + dsimp only [τ] + rw [D.globalTransport_self] + rw [hta] at he + exact congrArg Subtype.val he + +end + +open Filter Topology Set +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + + + +noncomputable def continuationLinear (a b : ℂ) : + Tangent X (g a) →ₗ[ℂ] Tangent X (g b) where + toFun v := (L.continuation hg hv a b ⟨S.projector (g a) v,S.idempotent (g a) v⟩).1 + map_add' v w := by + simpa only [map_add] using L.continuation_add hg hv a b + ⟨S.projector (g a) v,S.idempotent (g a) v⟩ ⟨S.projector (g a) w,S.idempotent (g a) w⟩ + map_smul' c v := by + simpa only [map_smul,RingHom.id_apply] using L.continuation_smul hg hv a b c + ⟨S.projector (g a) v,S.idempotent (g a) v⟩ + +noncomputable def continuationMap (a b : ℂ) : + Tangent X (g a) →L[ℂ] Tangent X (g b) := by + let t := trivializationAt (Model X) (Tangent X) (g a) + let e := t.continuousLinearEquivAt ℂ (g a) (FiberBundle.mem_baseSet_trivializationAt' (g a)) + letI : FiniteDimensional ℂ (Tangent X (g a)) := + FiniteDimensional.of_injective e.toLinearMap e.injective + exact (L.continuationLinear hg hv a b).toContinuousLinearMap + +lemma continuationMap_apply (a b : ℂ) (v : Tangent X (g a)) : + L.continuationMap hg hv a b v = + (L.continuation hg hv a b ⟨S.projector (g a) v,S.idempotent (g a) v⟩).1 := rfl + +lemma continuationMap_fixed (a b : ℂ) (v : Tangent X (g a)) : + S.projector (g b) (L.continuationMap hg hv a b v)=L.continuationMap hg hv a b v := + (L.continuation hg hv a b ⟨S.projector (g a) v,S.idempotent (g a) v⟩).2 + +lemma continuationMap_self (a : ℂ) : L.continuationMap hg hv a a=S.projector (g a) := by + apply ContinuousLinearMap.ext + intro v + exact congrArg Subtype.val (L.continuation_self hg hv a + ⟨S.projector (g a) v,S.idempotent (g a) v⟩) + +lemma continuationMap_cocycle (a b c : ℂ) (v : Tangent X (g a)) : + L.continuationMap hg hv b c (L.continuationMap hg hv a b v)=L.continuationMap hg hv a c v := by + rw [L.continuationMap_apply] + have he : (⟨S.projector (g b) (L.continuationMap hg hv a b v), + S.idempotent (g b) (L.continuationMap hg hv a b v)⟩ : TangentImageFiber S g b)= + L.continuation hg hv a b ⟨S.projector (g a) v,S.idempotent (g a) v⟩ := by + apply Subtype.ext + exact L.continuationMap_fixed hg hv a b v + rw [he,L.continuation_cocycle] + rfl + +lemma continuationMap_reverse (a b : ℂ) (v : Tangent X (g a)) : + L.continuationMap hg hv b a (L.continuationMap hg hv a b v)=S.projector (g a) v := by + rw [L.continuationMap_cocycle,L.continuationMap_self] + +lemma continuationMap_holomorphic (a : ℂ) (v : Tangent X (g a)) : + ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,L.continuationMap hg hv a z v⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) := + L.continuation_holomorphic hg hv a ⟨S.projector (g a) v,S.idempotent (g a) v⟩ + +end SplitTangent.TangentSplitting.LocalChartImages + +namespace SplitTangent.HorizontalCovering.LocalTransportData +open Filter Topology Set +variable {B : Type*} [TopologicalSpace B] [SimplyConnectedSpace B] [LocallyPathConnectedSpace B] + {V : B → Type*} (D : LocalTransportData B V) + + + +lemma globalTransport_local (a : B) (hc : IsConnected (D.domain a)) (v : V a) + {b : B} (hb : b ∈ D.domain a) : D.globalTransport a b v=D.forward a b v := by + let : ConnectedSpace (D.domain a) := isConnected_iff_connectedSpace.mp hc + have hglobal : D.IsHorizontalAlong (fun z : D.domain a => (z : B)) + (fun z => ⟨(z : B),D.globalTransport a z v⟩) := by + intro z + obtain ⟨w,hw⟩ := D.globalSection_horizontal a v (z : B) + exact ⟨w,continuous_subtype_val.continuousAt hw⟩ + have hlocal : D.IsHorizontalAlong (fun z : D.domain a => (z : B)) + (fun z => ⟨(z : B),D.forward a z v⟩) := by + intro z + refine ⟨D.forward a z v,?_⟩ + have hh := D.overlap a z z ⟨z.2,D.domain_self z⟩ v + rw [D.reverse_self] at hh + filter_upwards [continuous_subtype_val.continuousAt hh] with w hw + exact congrArg (Sigma.mk (w : B)) hw.symm + have he := D.horizontal_unique continuous_subtype_val hglobal hlocal + (⟨a,D.domain_self a⟩ : D.domain a) (by rw [D.globalTransport_self,D.forward_self]) + exact sigma_mk_injective (congrFun he (⟨b,hb⟩ : D.domain a)) + +lemma globalTransport_reverse_local (a : B) (hc : IsConnected (D.domain a)) + {b : B} (hb : b ∈ D.domain a) (v : V b) : + D.globalTransport b a v=D.reverse a b v := by + apply (D.globalTransport a b).injective + rw [D.globalTransport_cocycle,D.globalTransport_self,D.globalTransport_local a hc _ hb] + exact (D.right_inv a b hb v).symm + +end SplitTangent.HorizontalCovering.LocalTransportData + +namespace SplitTangent.TangentSplitting.LocalChartImages +section +open Filter Topology Set +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) + +lemma continuationMap_reverse_local (b : ℂ) {z : ℂ} (hz : z ∈ Metric.ball b (L.radius b)) + (v : Tangent X (g z)) : L.continuationMap hg hv z b v= + L.uncoords b b (L.trans b z b (L.coords b z (S.projector (g z) v))) := by + rw [L.continuationMap_apply] + have hc : IsConnected ((L.toData hg hv).domain b) := + ⟨⟨b,L.center b⟩,(convex_ball b (L.radius b)).isPreconnected⟩ + change ((L.toData hg hv).globalTransport z b + ⟨S.projector (g z) v,S.idempotent (g z) v⟩).1=_ + rw [(L.toData hg hv).globalTransport_reverse_local b hc hz] + exact L.reverse_val hz _ + + + +lemma continuationMap_reverse_holomorphic_at (a b : ℂ) (v : ∀ z, Tangent X (g z)) + (hvs : ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) b) : + ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g a,L.continuationMap hg hv z a (v z)⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) b := by + let t := L.frame b + let u := trivializationAt (Model X) (Tangent X) (g a) + have ht : g b ∈ t.baseSet := L.frame_mem (L.center b) + have hu : g a ∈ u.baseSet := FiberBundle.mem_baseSet_trivializationAt' (g a) + have hp : ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,S.projector (g z) (v z)⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) b := + S.holomorphic.contMDiffAt.comp b hvs + have hp' := ((t.contMDiffAt_iff (f := fun z => (⟨g z,S.projector (g z) (v z)⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (by simpa only [t.mem_source] using ht)).mp hp).2 + have hc : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,Model X) ω + (fun z => L.coords b z (S.projector (g z) (v z))) b := by + apply hp'.congr_of_eventuallyEq + filter_upwards [Metric.ball_mem_nhds b (L.positive b)] with z hz + exact t.continuousLinearMapAt_apply_of_mem ℂ (L.frame_mem hz) _ + have hTa : AnalyticAt ℂ (fun z => L.trans b z b) b := + (L.analytic b (b,b) ⟨L.center b,L.center b⟩).comp + (g := fun w : ℂ × ℂ => L.trans b w.1 w.2) + (f := fun z : ℂ => (z,b)) (analyticAt_id.prod analyticAt_const) + have hf := hTa.contDiffAt.contMDiffAt.clm_apply hc + let C : Model X →L[ℂ] Model X := (u.continuousLinearMapAt ℂ (g a)).comp + ((L.continuationMap hg hv b a).comp (L.uncoords b b)) + have hCf : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,Model X) ω + (fun z => C (L.trans b z b (L.coords b z (S.projector (g z) (v z))))) b := + C.contDiff.contMDiff.contMDiffAt.comp b hf + apply (u.contMDiffAt_iff (f := fun z => (⟨g a,L.continuationMap hg hv z a (v z)⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (by simpa only [u.mem_source] using hu)).mpr + refine ⟨contMDiffAt_const,?_⟩ + apply hCf.congr_of_eventuallyEq + filter_upwards [Metric.ball_mem_nhds b (L.positive b)] with z hz + rw [← L.continuationMap_cocycle hg hv z b a (v z),L.continuationMap_reverse_local hg hv b hz] + exact (u.continuousLinearMapAt_apply_of_mem ℂ hu _).symm + +end + +open Filter Topology Set +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) +lemma continuation_germ (a b : ℂ) (v : TangentImageFiber S g a) : + ∀ᶠ z in 𝓝 b, L.continuation hg hv a z v = + L.forward b z (L.continuation hg hv a b v) := + (L.toData hg hv).globalTransport_germ a b v + +lemma continuationMap_apply_fixed (a b : ℂ) (v : Tangent X (g a)) + (h : S.projector (g a) v=v) : L.continuationMap hg hv a b v= + (L.continuation hg hv a b ⟨v,h⟩).1 := by + rw [L.continuationMap_apply] + congr 2 + exact Subtype.ext h +end SplitTangent.TangentSplitting.LocalChartImages + +namespace SplitTangent.TangentSplitting +open Filter Topology Set +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + + + +lemma rational_continuation_overlap (g : RationalCurve X) + (Lf : LocalChartImages S g.finite) (Li : LocalChartImages S g.infinity) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) (v : Tangent X (g.finite a)) {z : ℂ} (hz : z ≠ 0) : + Lf.continuationMap g.finite_holomorphic hvf a z v = + Li.continuationMap g.infinity_holomorphic hvi 1 z⁻¹ + (Lf.continuationMap g.finite_holomorphic hvf a 1 v) := by + let u0 : TangentImageFiber S g.finite a := ⟨S.projector (g.finite a) v,S.idempotent _ v⟩ + let u := Lf.continuation g.finite_holomorphic hvf a 1 u0 + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + let w : TangentImageFiber S g.infinity 1 := ⟨u.1,by rw [← hb]; exact u.2⟩ + let sf := fun q => (Lf.continuation g.finite_holomorphic hvf a q u0).1 + let si := fun q => (Li.continuation g.infinity_holomorphic hvi 1 q w).1 + have hsf := Lf.continuation_holomorphic g.finite_holomorphic hvf a u0 + have hsi := Li.continuation_holomorphic g.infinity_holomorphic hvi 1 w + have hf := Lf.continuation_germ g.finite_holomorphic hvf a 1 u0 + have hi := Li.continuation_germ g.infinity_holomorphic hvi 1 1 w + rw [Li.continuation_self] at hi + have hloc := S.rational_forward_germ g Lf Li u w rfl + have hinv : Tendsto (fun q : ℂ => q⁻¹) (𝓝 1) (𝓝 1) := by + simpa using (continuousAt_inv₀ (one_ne_zero : (1:ℂ)≠0)).tendsto + have he : sf =ᶠ[𝓝 (1:ℂ)] fun q => si q⁻¹ := by + filter_upwards [hf,hinv hi,hloc] with q hq hq' hqv + dsimp only [sf,si] + rw [hq,hq'] + exact hqv + have hEq := rational_section_gluing g sf si hsf hsi he z hz + rw [Lf.continuationMap_apply] + change sf z=Li.continuationMap g.infinity_holomorphic hvi 1 z⁻¹ u.1 + rw [Li.continuationMap_apply_fixed _ _ _ _ _ w.2] + exact hEq + +end SplitTangent.TangentSplitting + +namespace SplitTangent +section +open Filter Topology Set + +lemma holomorphic_const_fiber_linear_at {X : ComplexManifold.{u}} {x y : X.Carrier} + (A : Tangent X x →L[ℂ] Tangent X y) {v : ℂ → Tangent X x} {b : ℂ} + (hv : ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨x,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) b) : + ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨y,A (v z)⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) b := by + let t := trivializationAt (Model X) (Tangent X) x + let u := trivializationAt (Model X) (Tangent X) y + have hx : x ∈ t.baseSet := FiberBundle.mem_baseSet_trivializationAt' x + have hy : y ∈ u.baseSet := FiberBundle.mem_baseSet_trivializationAt' y + have hvc := ((t.contMDiffAt_iff (f := fun z => (⟨x,v z⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (by simpa only [t.mem_source] using hx)).mp hv).2 + let C : Model X →L[ℂ] Model X := (u.continuousLinearMapAt ℂ y).comp (A.comp (t.symmL ℂ x)) + have hc := C.contDiff.contMDiff.contMDiffAt.comp b hvc + apply (u.contMDiffAt_iff (f := fun z => (⟨y,A (v z)⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (by simpa only [u.mem_source] using hy)).mpr + refine ⟨contMDiffAt_const,?_⟩ + apply hc.congr_of_eventuallyEq + filter_upwards [] with z + change (u ⟨y,A (v z)⟩).2=C (t ⟨x,v z⟩).2 + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hx] + dsimp only [C,ContinuousLinearMap.comp_apply] + rw [t.symmL_continuousLinearMapAt hx] + exact (u.continuousLinearMapAt_apply_of_mem ℂ hy _).symm + +namespace TangentSplitting.LocalChartImages +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : ℂ → X.Carrier} + (L : LocalChartImages S g) + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) + (hv : ∀ z, S.projector (g z) (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g z (1 : ℂ))=0) +lemma continuationMap_source (a b : ℂ) (v : Tangent X (g a)) : + L.continuationMap hg hv a b (S.projector (g a) v)=L.continuationMap hg hv a b v := by + rw [L.continuationMap_apply,L.continuationMap_apply] + congr 2 + exact Subtype.ext (S.idempotent _ v) +end TangentSplitting.LocalChartImages + +namespace TangentSplitting +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) +lemma rational_reverse_overlap (g : RationalCurve X) + (Lf : LocalChartImages S g.finite) (Li : LocalChartImages S g.infinity) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) {z : ℂ} (hz : z ≠ 0) (v : Tangent X (g.finite z)) : + Lf.continuationMap g.finite_holomorphic hvf z a v = + Lf.continuationMap g.finite_holomorphic hvf 1 a + (Li.continuationMap g.infinity_holomorphic hvi z⁻¹ 1 v) := by + let f := Lf.continuationMap g.finite_holomorphic hvf + let i := Li.continuationMap g.infinity_holomorphic hvi + let w := i z⁻¹ 1 v + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + have hw : S.projector (g.finite 1) w=w := by + rw [hb] + exact Li.continuationMap_fixed _ _ _ _ _ + have hfw : f a 1 (f 1 a w)=w := by + dsimp only [f] + erw [Lf.continuationMap_reverse,hw] + have hiw : i 1 z⁻¹ w=S.projector (g.finite z) v := by + dsimp only [i,w] + erw [Li.continuationMap_reverse,g.overlap z hz] + change f z a v=f 1 a w + calc + _ = f z a (S.projector (g.finite z) v) := (Lf.continuationMap_source _ _ _ _ _).symm + _ = f z a (i 1 z⁻¹ w) := by rw [hiw] + _ = f z a (i 1 z⁻¹ (f a 1 (f 1 a w))) := by rw [hfw] + _ = f z a (f a z (f 1 a w)) := by + rw [S.rational_continuation_overlap g Lf Li hvf hvi a (f 1 a w) hz] + _ = f 1 a w := by + dsimp only [f] + erw [Lf.continuationMap_reverse,Lf.continuationMap_fixed] + + + +noncomputable def rationalReverseMap (g : RationalCurve X) + (Lf : LocalChartImages S g.finite) (Li : LocalChartImages S g.infinity) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) : CurveBundleMap g (RationalCurve.constant (g.finite a)) where + finite z := Lf.continuationMap g.finite_holomorphic hvf z a + infinity z := (Lf.continuationMap g.finite_holomorphic hvf 1 a).comp + (Li.continuationMap g.infinity_holomorphic hvi z 1) + overlap z hz := by + apply ContinuousLinearMap.ext + intro v + exact S.rational_reverse_overlap g Lf Li hvf hvi a hz v + finite_holomorphic U hU v hv z hz := + (Lf.continuationMap_reverse_holomorphic_at g.finite_holomorphic hvf a z v + ((hv z hz).contMDiffAt (hU.mem_nhds hz))).contMDiffWithinAt + infinity_holomorphic U hU v hv z hz := by + have h := Li.continuationMap_reverse_holomorphic_at g.infinity_holomorphic hvi 1 z v + ((hv z hz).contMDiffAt (hU.mem_nhds hz)) + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + rw [← hb] at h + exact (holomorphic_const_fiber_linear_at + (Lf.continuationMap g.finite_holomorphic hvf 1 a) h).contMDiffWithinAt + +theorem exists_rational_reverse_map (g : RationalCurve X) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) : ∃ B : CurveBundleMap g (RationalCurve.constant (g.finite a)), + B.finite a=S.projector (g.finite a) := by + obtain ⟨Lf⟩ := S.exists_local_chart_images g.finite_holomorphic + obtain ⟨Li⟩ := S.exists_local_chart_images g.infinity_holomorphic + exact ⟨S.rationalReverseMap g Lf Li hvf hvi a,Lf.continuationMap_self _ _ a⟩ +end TangentSplitting +end + +open Filter Topology Set + + + +lemma holomorphic_along_sum_smul_at {X : ComplexManifold.{u}} + {ι : Type*} [Fintype ι] {g : ℂ → X.Carrier} {z : ℂ} + (hg : ContMDiffAt 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g z) + (c : ι → ℂ → ℂ) (v : ι → ∀ w, Tangent X (g w)) + (hc : ∀ i, ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ) ω (c i) z) + (hv : ∀ i, ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun w => (⟨g w,v i w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) z) : + ContMDiffAt 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun w => (⟨g w,∑ i, c i w • v i w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) z := by + let t := trivializationAt (Model X) (Tangent X) (g z) + have hz : g z ∈ t.baseSet := FiberBundle.mem_baseSet_trivializationAt' (g z) + have hsrc (v' : Tangent X (g z)) : (⟨g z,v'⟩ : TangentBundle (ModelWithCorners X) X.Carrier) ∈ t.source := by + simpa only [t.mem_source] using hz + apply (t.contMDiffAt_iff (f := fun w => (⟨g w,∑ i, c i w • v i w⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (hsrc _)).mpr + refine ⟨hg,?_⟩ + have hv' (i : ι) := ((t.contMDiffAt_iff (f := fun w => (⟨g w,v i w⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (hsrc _)).mp (hv i)).2 + have hsum : ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,Model X) ω + (fun w => ∑ i, c i w • (t ⟨g w,v i w⟩).2) z := by + apply ContMDiffAt.sum + intro i _ + exact (hc i).smul (hv' i) + apply hsum.congr_of_eventuallyEq + filter_upwards [hg.continuousAt.eventually (t.open_baseSet.mem_nhds hz)] with w hw + change (t.linearEquivAt ℂ (g w) hw) (∑ i, c i w • v i w)=_ + simp only [map_sum,map_smul,Bundle.Trivialization.linearEquivAt_apply] + +namespace CurveBundleMap +variable {X : ComplexManifold.{u}} {g : RationalCurve X} + + + +def ofSections (x : X.Carrier) (σ : Fin X.dim → CurveTangentSection g) : + CurveBundleMap (RationalCurve.constant x) g := by + classical + let t := trivializationAt (Model X) (Tangent X) x + let e := t.continuousLinearEquivAt ℂ x (FiberBundle.mem_baseSet_trivializationAt' x) + let f : ℂ → Tangent X x →L[ℂ] Model X := fun z => (∑ i, (ContinuousLinearMap.proj i).smulRight (show Model X from (σ i).finite z)).comp e.toContinuousLinearMap + let h : ℂ → Tangent X x →L[ℂ] Model X := fun z => (∑ i, (ContinuousLinearMap.proj i).smulRight (show Model X from (σ i).infinity z)).comp e.toContinuousLinearMap + have hf (z : ℂ) (v : Tangent X x) : f z v=∑ i, (e v) i • (σ i).finite z := by + simp only [f,ContinuousLinearMap.comp_apply,sum_apply,ContinuousLinearEquiv.coe_coe] + apply Finset.sum_congr rfl + intro j _ + rfl + have hh (z : ℂ) (v : Tangent X x) : h z v=∑ i, (e v) i • (σ i).infinity z := by + simp only [h,ContinuousLinearMap.comp_apply,sum_apply,ContinuousLinearEquiv.coe_coe] + apply Finset.sum_congr rfl + intro j _ + rfl + have hcoeff {U : Set ℂ} (hU : IsOpen U) (v : ℂ → Tangent X x) + (hv : ContMDiffOn 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨x,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) U) + (z : ℂ) (hz : z ∈ U) (i : Fin X.dim) : + ContMDiffAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ) ω (fun w => (e (v w)) i) z := by + have hx : x ∈ t.baseSet := FiberBundle.mem_baseSet_trivializationAt' x + have hvz := (hv z hz).contMDiffAt (hU.mem_nhds hz) + have hc := ((t.contMDiffAt_iff (f := fun w => (⟨x,v w⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)) (by simpa only [t.mem_source] using hx)).mp hvz).2 + exact (contMDiffAt_pi_space.mp hc) i + refine ⟨f,h,?_,?_,?_⟩ + · intro z hz + apply ContinuousLinearMap.ext + intro v + erw [hf,hh] + simp only [fun i => (σ i).overlap z hz] + rfl + · intro U hU v hv z hz + have hd := holomorphic_along_sum_smul_at (g.finite_holomorphic z) + (fun i w => (e (v w)) i) (fun i w => (σ i).finite w) + (fun i => hcoeff hU v hv z hz i) (fun i => (σ i).finite_holomorphic z) + have he : (fun w => (⟨g.finite w,f w (v w)⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) = + (fun w => (⟨g.finite w,∑ i, (e (v w)) i • (σ i).finite w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) := by + funext w + erw [hf] + erw [he] + exact hd.contMDiffWithinAt + · intro U hU v hv z hz + have hd := holomorphic_along_sum_smul_at (g.infinity_holomorphic z) + (fun i w => (e (v w)) i) (fun i w => (σ i).infinity w) + (fun i => hcoeff hU v hv z hz i) (fun i => (σ i).infinity_holomorphic z) + have he : (fun w => (⟨g.infinity w,h w (v w)⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) = + (fun w => (⟨g.infinity w,∑ i, (e (v w)) i • (σ i).infinity w⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) := by + funext w + erw [hh] + erw [he] + exact hd.contMDiffWithinAt + +lemma ofSections_finite (x : X.Carrier) (σ : Fin X.dim → CurveTangentSection g) + (z : ℂ) (v : Tangent X x) : + (ofSections x σ).finite z v = ∑ i, + (trivializationAt (Model X) (Tangent X) x ⟨x,v⟩).2 i • (σ i).finite z := by + classical + dsimp only [ofSections] + change @Eq (Model X) + ((∑ i, (ContinuousLinearMap.proj i).smulRight (M₂ := Model X) ((σ i).finite z)) + ((trivializationAt (Model X) (Tangent X) x).continuousLinearEquivAt ℂ x + (FiberBundle.mem_baseSet_trivializationAt' x) v)) _ + rw [sum_apply] + apply Finset.sum_congr rfl + intro j _ + rfl + +lemma ofSections_infinity (x : X.Carrier) (σ : Fin X.dim → CurveTangentSection g) + (z : ℂ) (v : Tangent X x) : + (ofSections x σ).infinity z v = ∑ i, + (trivializationAt (Model X) (Tangent X) x ⟨x,v⟩).2 i • (σ i).infinity z := by + classical + dsimp only [ofSections] + change @Eq (Model X) + ((∑ i, (ContinuousLinearMap.proj i).smulRight (M₂ := Model X) ((σ i).infinity z)) + ((trivializationAt (Model X) (Tangent X) x).continuousLinearEquivAt ℂ x + (FiberBundle.mem_baseSet_trivializationAt' x) v)) _ + rw [sum_apply] + apply Finset.sum_congr rfl + intro j _ + rfl + +end CurveBundleMap +end SplitTangent + +namespace SplitTangent.TangentSplitting +open Filter Topology Set +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +def rationalContinuationSection (g : RationalCurve X) + (Lf : LocalChartImages S g.finite) (Li : LocalChartImages S g.infinity) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) (v : Tangent X (g.finite a)) : CurveTangentSection g where + finite z := Lf.continuationMap g.finite_holomorphic hvf a z v + infinity z := Li.continuationMap g.infinity_holomorphic hvi 1 z + (Lf.continuationMap g.finite_holomorphic hvf a 1 v) + finite_holomorphic := Lf.continuationMap_holomorphic _ _ a v + infinity_holomorphic := Li.continuationMap_holomorphic _ _ 1 _ + overlap _ hz := S.rational_continuation_overlap g Lf Li hvf hvi a v hz + + + +theorem exists_rational_trivialization (g : RationalCurve X) + (hvf : ∀ z, S.projector (g.finite z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ))=0) + (hvi : ∀ z, S.projector (g.infinity z) + (mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ))=0) + (a : ℂ) : + ∃ (A : CurveBundleMap (RationalCurve.constant (g.finite a)) g) + (B : CurveBundleMap g (RationalCurve.constant (g.finite a))), + A.finite a=S.projector (g.finite a) ∧ B.finite a=S.projector (g.finite a) ∧ + (∀ z v, B.finite z (A.finite z v)=S.projector (g.finite a) v) ∧ + (∀ z v, A.finite z (B.finite z v)=S.projector (g.finite z) v) ∧ + (∀ z v, B.infinity z (A.infinity z v)=S.projector (g.finite a) v) ∧ + (∀ z v, A.infinity z (B.infinity z v)=S.projector (g.infinity z) v) := by + classical + obtain ⟨Lf⟩ := S.exists_local_chart_images g.finite_holomorphic + obtain ⟨Li⟩ := S.exists_local_chart_images g.infinity_holomorphic + let f := Lf.continuationMap g.finite_holomorphic hvf + let i := Li.continuationMap g.infinity_holomorphic hvi + let t := trivializationAt (Model X) (Tangent X) (g.finite a) + let e := t.continuousLinearEquivAt ℂ (g.finite a) + (FiberBundle.mem_baseSet_trivializationAt' (g.finite a)) + let b := Pi.basisFun ℂ (Fin X.dim) + let σ := fun j => S.rationalContinuationSection g Lf Li hvf hvi a (e.symm (b j)) + let A := CurveBundleMap.ofSections (g.finite a) σ + let B := S.rationalReverseMap g Lf Li hvf hvi a + have heq (v : Tangent X (g.finite a)) : ∑ j, (e v) j • e.symm (b j)=v := by + have hsum : ∑ j, (e v) j • b j=e v := by + simpa only [b,Pi.basisFun_repr] using b.sum_repr (e v) + calc + _ = e.symm (∑ j, (e v) j • b j) := by simp only [map_sum,map_smul] + _ = v := by rw [hsum,e.symm_apply_apply] + have hAf (z : ℂ) (v : Tangent X (g.finite a)) : A.finite z v=f a z v := by + erw [CurveBundleMap.ofSections_finite] + change ∑ j, (e v) j • f a z (e.symm (b j))=f a z v + simpa only [map_sum,map_smul] using congrArg (f a z) (heq v) + have hAi (z : ℂ) (v : Tangent X (g.finite a)) : A.infinity z v=i 1 z (f a 1 v) := by + erw [CurveBundleMap.ofSections_infinity] + change ∑ j, (e v) j • i 1 z (f a 1 (e.symm (b j)))=i 1 z (f a 1 v) + let C : Tangent X (g.finite a) →L[ℂ] Tangent X (g.infinity z) := + (i 1 z).comp (f a 1) + change ∑ j, (e v) j • C (e.symm (b j)) = C v + simpa only [map_sum,map_smul] using congrArg C (heq v) + have hb : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + refine ⟨A,B,?_,Lf.continuationMap_self _ _ a,?_,?_,?_,?_⟩ + · apply ContinuousLinearMap.ext + intro v + erw [hAf] + exact congrArg (fun C : Tangent X (g.finite a) →L[ℂ] Tangent X (g.finite a) => C v) + (Lf.continuationMap_self _ _ a) + · intro z v + erw [hAf] + exact Lf.continuationMap_reverse _ _ a z v + · intro z v + erw [hAf] + exact Lf.continuationMap_reverse _ _ z a v + · intro z v + erw [hAi] + change f 1 a (i z 1 (i 1 z (f a 1 v)))=S.projector (g.finite a) v + erw [Li.continuationMap_reverse] + erw [← hb,Lf.continuationMap_fixed] + exact Lf.continuationMap_reverse _ _ a 1 v + · intro z v + erw [hAi] + change i 1 z (f a 1 (f 1 a (i z 1 v)))=S.projector (g.infinity z) v + erw [Lf.continuationMap_reverse] + rw [hb,Li.continuationMap_fixed] + exact Li.continuationMap_reverse _ _ z 1 v + +end SplitTangent.TangentSplitting + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/RationalVariation.lean b/lean/OAI/Geometry/SplitTangent/RationalVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3648fff52dfaed1a0cc5d8615a37b92703166bd2 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/RationalVariation.lean @@ -0,0 +1,197 @@ +import Mathlib +import OAI.Geometry.SplitTangent.RationalFamilies +import OAI.Geometry.SplitTangent.RationalFamilyCover +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.OpenManifold + +namespace OAI + +/-! Rational Variation. -/ + +noncomputable section +open Set Filter Topology IsManifold +open scoped ContDiff Manifold +universe u +namespace SplitTangent +open AnalyticZeroCover RationalParameters + + + +theorem RationallyConnected.exists_submersive_familyAlternative {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) + (hdim : 0 (hC d).to_subtype + let A := Σd, C d + let d (a : A) := a.2.val.dim + let U (a : A) : Set (Space (d a)) := a.2.val.domain + let f (a : A) := pairEvaluation e x₀ a.2.val + have hU (a : A) : IsOpen (U a) := a.2.val.isOpen_domain + have hf (a : A) (x) (hx : x∈U a) : + ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) x := by + rw [modelWithCornersSelf_prod] + exact pairEvaluation_holomorphicAt e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hx + have hcover : V ⊆ ⋃a,f a '' U a := by + intro v hv + obtain ⟨n,hn⟩ := mem_iUnion.mp (hcov hv) + obtain ⟨P,hP,x,hx,hfx⟩ := mem_iUnion₂.mp hn + exact mem_iUnion.mpr ⟨⟨n,⟨P,hP⟩⟩,x,hx,hfx⟩ + have hdim' : 0 (hWsub hz).1 + let T := OpenManifold.manifold.{u} W hW hWn + let G := family e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hW hWn hWP + refine ⟨T,OpenManifold.nonempty W hWn,G,?_⟩ + intro τ + let z := OpenManifold.val W τ + have hz : z∈W := τ.down.property + have hzf : ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) z := + hf a z (hWP hz) + have hsurj : Function.Surjective + (mfderiv 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) (f a) z) := + surjective_mfderiv_of_chart hzf y (hWsub hz).2.1 (hWsub hz).2.2 + have hv := (OpenManifold.val_mfderiv_bijective W hW hWn τ).2 + have hchain := mfderiv_comp τ (hzf.mdifferentiableAt (by decide)) + ((OpenManifold.val_holomorphic W hW hWn τ).mdifferentiableAt (by decide)) + rw [← modelWithCornersSelf_prod] + change Function.Surjective (mfderiv (ModelWithCorners (OpenManifold.manifold.{u} W hW hWn)) + 𝓘(ℂ,Model X × Model X) + ((f a) ∘ (fun τ : (OpenManifold.manifold.{u} W hW hWn).Carrier => OpenManifold.val W τ)) τ) + rw [hchain] + exact hsurj.comp hv + + + +theorem TangentSplitting.integrable_of_rationallyConnected {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 2≤X.dim) (S : TangentSplitting X) : + Integrable X S.first ∧ Integrable X S.second := by + obtain ⟨T,hT,G,hs⟩ := hRC.exists_submersive_familyAlternative e (by omega) + let := hT + exact G.integrable_both_of_submersive e S hs + +end SplitTangent + +namespace SplitTangent +open AnalyticZeroCover RationalParameters + + + +theorem RationallyConnected.exists_submersive_family {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) + (hdim : 0 (hC d).to_subtype + let A := Σd, C d + let d (a : A) := a.2.val.dim + let U (a : A) : Set (Space (d a)) := a.2.val.domain + let f (a : A) := pairEvaluation e x₀ a.2.val + have hU (a : A) : IsOpen (U a) := a.2.val.isOpen_domain + have hf (a : A) (x) (hx : x∈U a) : + ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) x := by + rw [modelWithCornersSelf_prod] + exact pairEvaluation_holomorphicAt e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hx + have hcover : V ⊆ ⋃a,f a '' U a := by + intro v hv + obtain ⟨n,hn⟩ := mem_iUnion.mp (hcov hv) + obtain ⟨P,hP,x,hx,hfx⟩ := mem_iUnion₂.mp hn + exact mem_iUnion.mpr ⟨⟨n,⟨P,hP⟩⟩,x,hx,hfx⟩ + have hdim' : 0 (hWsub hz).1 + let T := OpenManifold.manifold.{u} W hW hWn + let G := family e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hW hWn hWP + refine ⟨T,OpenManifold.nonempty W hWn,G,?_⟩ + intro τ + let z := OpenManifold.val W τ + have hz : z∈W := τ.down.property + have hzf : ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) z := + hf a z (hWP hz) + have hsurj : Function.Surjective + (mfderiv 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) (f a) z) := + surjective_mfderiv_of_chart hzf y (hWsub hz).2.1 (hWsub hz).2.2 + have hv := (OpenManifold.val_mfderiv_bijective W hW hWn τ).2 + have hchain := mfderiv_comp τ (hzf.mdifferentiableAt (by decide)) + ((OpenManifold.val_holomorphic W hW hWn τ).mdifferentiableAt (by decide)) + rw [← modelWithCornersSelf_prod] + change Function.Surjective (mfderiv (ModelWithCorners (OpenManifold.manifold.{u} W hW hWn)) + 𝓘(ℂ,Model X × Model X) + ((f a) ∘ (fun τ : (OpenManifold.manifold.{u} W hW hWn).Carrier => OpenManifold.val W τ)) τ) + rw [hchain] + exact hsurj.comp hv + +end SplitTangent + +namespace SplitTangent + + +def IntegrabilityStatement : Prop := + ∀ (X : ComplexManifold.{u}), ConnectedSpace X.Carrier → CompactSpace X.Carrier → + 2 ≤ X.dim → ∀ e : ProjectiveEmbedding X, RationallyConnected e → + ∀ S : TangentSplitting X, Integrable X S.first ∧ Integrable X S.second + +theorem integrability_main : IntegrabilityStatement.{u} := by + intro X hconn hcompact hdim e hRC S + let := hconn + let := hcompact + exact S.integrable_of_rationallyConnected e hRC hdim +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/SmoothLeafManifold.lean b/lean/OAI/Geometry/SplitTangent/SmoothLeafManifold.lean new file mode 100644 index 0000000000000000000000000000000000000000..f80027aba408ece90e2ccfaa3a2eedf9d9a154ec --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/SmoothLeafManifold.lean @@ -0,0 +1,109 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.SmoothLeafQuotient + +namespace OAI + +/-! Smooth Leaf Manifold. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (M : LeafJetAtlas S.swap) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 ⟨i,D,hr⟩) + +include M in +lemma smoothLeafLocus_dense : Dense (L.smoothLeafLocus e hRC hdim) := by + have hd := (L.regularLeafPairs_dense M e hRC hdim).preimage (L.isOpenMap_leafPair M e hRC hdim) + have hsub : L.leafPair M e hRC hdim ⁻¹' L.regularLeafPairs M e hRC hdim ⊆ + L.leafQuotient e hRC hdim ⁻¹' L.smoothLeafLocus e hRC hdim := by + intro x hx + obtain ⟨D,hD⟩ := L.exists_quotientChartData_of_regular e hRC hdim M hx + exact ⟨x,D,hD⟩ + intro q + obtain ⟨x,rfl⟩ := L.surjective_leafQuotient e hRC hdim q + apply closure_mono (image_preimage_subset (L.leafQuotient e hRC hdim) + (L.smoothLeafLocus e hRC hdim)) + exact (image_closure_subset_closure_image (L.continuous_leafQuotient e hRC hdim)) + ⟨x,hd.mono hsub x,rfl⟩ + +namespace QuotientChartData +variable {L e hRC hdim} {i : X.Carrier} (D : L.QuotientChartData e hRC hdim i) + +lemma transition_holomorphic {j : X.Carrier} (D' : L.QuotientChartData e hRC hdim j) + {b : S.SecondModel i} (hb : b∈(D.chart.symm.trans D'.chart).source) : + ContDiffAt ℂ ω (D'.chart ∘ D.chart.symm) b := by + have ht : (D.a,b)∈(L.chart i).chart.target := D.rectangle ⟨D.mem_U,hb.1⟩ + have hi := ((L.chart i).inverse_holomorphicAt ht).comp b + (contMDiffAt_const.prodMk_space contMDiffAt_id) + exact ((D'.chart_comp_quotient_contMDiffAt hb.2).comp b hi).contDiffAt + +variable (x₀ : X.Carrier) +def quotientRankEquiv (_D : L.QuotientChartData e hRC hdim i) : S.SecondModel i ≃L[ℂ] (Fin (Module.finrank ℂ (S.second x₀)) → ℂ) := + ContinuousLinearEquiv.ofFinrankEq (by + have hi := (L.chart i).swap.first_finrank (by + rw [AlignedProductChart.swap_source] + exact L.mem_source i) + have he := M.first_rank_eq i x₀ + rw [S.swap_first] at hi he + simpa only [Module.finrank_fintype_fun_eq_card,Fintype.card_fin] using hi.symm.trans he) + +def normalized : OpenPartialHomeomorph (L.CompactLeafSpace e hRC hdim) + (Fin (Module.finrank ℂ (S.second x₀)) → ℂ) := + D.chart.trans (D.quotientRankEquiv M x₀).toHomeomorph.toOpenPartialHomeomorph + +lemma normalized_source : (D.normalized M x₀).source=D.chart.source := by + ext q + exact ⟨fun h => h.1,fun h => ⟨h,Set.mem_univ _⟩⟩ + +lemma normalized_comp_quotient_contMDiffAt {x : X.Carrier} + (hx : L.leafQuotient e hRC hdim x∈(D.normalized M x₀).source) : + ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,Fin (Module.finrank ℂ (S.second x₀)) → ℂ) ω + (D.normalized M x₀ ∘ L.leafQuotient e hRC hdim) x := + (D.quotientRankEquiv M x₀).contDiff.contMDiff.contMDiffAt.comp x + (D.chart_comp_quotient_contMDiffAt hx.1) + +def localSection (a : Fin (Module.finrank ℂ (S.second x₀)) → ℂ) : X.Carrier := + (L.chart i).chart.symm (D.a,(D.quotientRankEquiv M x₀).symm a) + +lemma normalized_inverse (a : Fin (Module.finrank ℂ (S.second x₀)) → ℂ) : + (D.normalized M x₀).symm a=L.leafQuotient e hRC hdim (D.localSection M x₀ a) := rfl + +lemma localSection_holomorphic {a : Fin (Module.finrank ℂ (S.second x₀)) → ℂ} + (ha : a∈(D.normalized M x₀).target) : + ContMDiffAt 𝓘(ℂ,Fin (Module.finrank ℂ (S.second x₀)) → ℂ) (ModelWithCorners X) ω + (D.localSection M x₀) a := by + apply ((L.chart i).inverse_holomorphicAt (D.rectangle (show (D.a,(D.quotientRankEquiv M x₀).symm a)∈D.U ×ˢ D.V from ⟨D.mem_U,ha.2⟩))).comp a + exact contMDiffAt_const.prodMk_space (D.quotientRankEquiv M x₀).symm.contDiff.contMDiff.contMDiffAt + +lemma normalized_transition_holomorphic {j : X.Carrier} (D' : L.QuotientChartData e hRC hdim j) + {a : Fin (Module.finrank ℂ (S.second x₀)) → ℂ} + (ha : a∈((D.normalized M x₀).symm.trans (D'.normalized M x₀)).source) : + ContDiffAt ℂ ω (D'.normalized M x₀ ∘ (D.normalized M x₀).symm) a := by + have hi := D.localSection_holomorphic M x₀ ha.1 + have hf := D'.normalized_comp_quotient_contMDiffAt M x₀ + (show L.leafQuotient e hRC hdim (D.localSection M x₀ a)∈(D'.normalized M x₀).source from ha.2) + exact (hf.comp a hi).contDiffAt + +end QuotientChartData +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/SwappedProductChart.lean b/lean/OAI/Geometry/SplitTangent/SwappedProductChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..00fd8e509f081193b4645349439100cc89a69b61 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/SwappedProductChart.lean @@ -0,0 +1,81 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Swapped Product Chart. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.AlignedProductChart +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + +def swap (P : AlignedProductChart S A B) : AlignedProductChart S.swap B A := by + let c := ContinuousLinearEquiv.prodComm ℂ A B + let Q := P.chart.trans c.toHomeomorph.toOpenPartialHomeomorph + have hsource {y : X.Carrier} (hy : y∈Q.source) : y∈P.chart.source := hy.1 + have htarget {y : B × A} (hy : y∈Q.target) : c.symm y∈P.chart.target := hy.2 + have hd {y : X.Carrier} (hy : y∈Q.source) : + mfderiv (ModelWithCorners X) 𝓘(ℂ,B × A) Q y= + c.toContinuousLinearMap.comp (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y) := by + change mfderiv (ModelWithCorners X) 𝓘(ℂ,B × A) (c ∘ P.chart) y=_ + rw [mfderiv_comp y ((c.contDiff (n := ω)).contMDiff.contMDiffAt.mdifferentiableAt (by simp)) + ((P.holomorphicAt (hsource hy)).mdifferentiableAt (by simp)),mfderiv_eq_fderiv, + ContinuousLinearEquiv.fderiv] + rfl + refine { chart := Q + holomorphic := ?_ + inverse_holomorphic := ?_ + first := ?_ + second := ?_ } + · intro y hy + exact (c.contDiff.contMDiff.contMDiffAt.comp y (P.holomorphicAt (hsource hy))).contMDiffWithinAt + · intro y hy + exact ((P.inverse_holomorphicAt (htarget hy)).comp y + c.symm.contDiff.contMDiff.contMDiffAt).contMDiffWithinAt + · intro y hy + rw [S.swap_first,hd hy] + change Submodule.map (c.toLinearMap.comp + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap) (S.second y)=_ + erw [Submodule.map_comp,P.second y (hsource hy)] + ext p + constructor + · rintro ⟨v,hv,rfl⟩ + exact hv + · intro hp + exact ⟨p.swap,hp,Prod.swap_swap p⟩ + · intro y hy + rw [S.swap_second,hd hy] + change Submodule.map (c.toLinearMap.comp + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart y).toLinearMap) (S.first y)=_ + erw [Submodule.map_comp,P.first y (hsource hy)] + ext p + constructor + · rintro ⟨v,hv,rfl⟩ + exact hv + · intro hp + exact ⟨p.swap,hp,Prod.swap_swap p⟩ + +@[simp] lemma swap_apply (P : AlignedProductChart S A B) (y : X.Carrier) : + P.swap.chart y=(P.chart y).swap := rfl +@[simp] lemma swap_symm_apply (P : AlignedProductChart S A B) (y : B × A) : + P.swap.chart.symm y=P.chart.symm y.swap := rfl +@[simp] lemma swap_source (P : AlignedProductChart S A B) : P.swap.chart.source=P.chart.source := by + ext y + change (y∈P.chart.source ∧ P.chart y∈Set.univ) ↔ y∈P.chart.source + simp +@[simp] lemma swap_target (P : AlignedProductChart S A B) (y : B × A) : + y∈P.swap.chart.target ↔ y.swap∈P.chart.target := by + change (y∈Set.univ ∧ y.swap∈P.chart.target) ↔ y.swap∈P.chart.target + simp + +end SplitTangent.AlignedProductChart + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/SymmetricConormalBound.lean b/lean/OAI/Geometry/SplitTangent/SymmetricConormalBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..3f9bb705b14fbfc8e11fdb7dde07c2af461e9106 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/SymmetricConormalBound.lean @@ -0,0 +1,92 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.GlobalTensorVanishing +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.TensorSectionSpace +import OAI.Geometry.SplitTangent.TensorSpanning + +namespace OAI + +/-! Symmetric Conormal Bound. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent +namespace symmetricSupportedTensors +open DiagonalRationality +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {S : TangentSplitting X} + {d m r : ℕ} + + +def contractionJet (σ : Fin r → CurveTangentSection g) : + symmetricSupportedTensors g S (d : ℤ) m →ₗ[ℂ] + (SymmetricIndex.Sorted r m → Fin (d+1) → ℂ) := + LinearMap.pi fun j => (sectionJet (d : ℤ) d).comp + ((tensorSectionSpace.contract (σ ∘ j.val)).comp + (symmetricSupportedTensors g S (d : ℤ) m).subtype) + +theorem contractionJet_injective (σ : Fin r → CurveTangentSection g) + (hσ : ∀j z,(σ j).finite z∈S.first (g.finite z)) + (hspan : ∀v∈S.first (g.finite 1),∃a : Fin r → ℂ,∑j,a j • (σ j).finite 1=v) : + Function.Injective (contractionJet (S := S) (d := d) (m := m) σ) := by + let : AddCommGroup (symmetricSupportedTensors g S (d : ℤ) m) := + Module.addCommMonoidToAddCommGroup ℂ + apply (injective_iff_map_eq_zero (contractionJet (S := S) (d := d) (m := m) σ)).mpr + intro A hA + have hc : ∀j : SymmetricIndex.Sorted r m,(tensorSectionSpace.toTensor A.val).contract (σ ∘ j.val)=0 := by + intro j + apply sectionJet_injective d + have he := congrFun hA j + simpa only [contractionJet,LinearMap.pi_apply,LinearMap.comp_apply, + Submodule.subtype_apply,tensorSectionSpace.contract,map_zero,Pi.zero_apply,LinearMap.coe_mk,AddHom.coe_mk] using he + have hc' : ∀j : Fin m → Fin r,(tensorSectionSpace.toTensor A.val).contract (σ ∘ j)=0 := by + intro j + apply lineSections_ext + funext z + apply SymmetricIndex.zero_of_sorted (fun v => A.val.val.1 z v) + (fun j => (σ j).finite z) (A.property.2.2.1 z) _ j + intro k + exact congrArg (fun s : lineSections (d : ℤ) => s.val.1 z) (hc k) + have hf := (tensorSectionSpace.toTensor A.val).finite_zero_of_spanning_sections S σ hσ hspan A.property.1 hc' + have hi := (tensorSectionSpace.toTensor A.val).infinity_zero_of_finite_zero hf + apply Subtype.ext + apply Subtype.ext + exact Prod.ext (funext hf) (funext hi) + + + +theorem finite_and_finrank_le (hg : PointedGenerated g S.first) (d m : ℕ) : + Module.Finite ℂ (symmetricSupportedTensors g S (d : ℤ) m) ∧ + Module.finrank ℂ (symmetricSupportedTensors g S (d : ℤ) m) ≤ + (Module.finrank ℂ (S.first (g.finite 1))+m-1).choose m * (d+1) := by + obtain ⟨σ,hσ,hσi,hσ0,hspan⟩ := hg.exists_basis_sections + have hj := contractionJet_injective (d := d) (m := m) σ hσ hspan + let : Module.Finite ℂ (symmetricSupportedTensors g S (d : ℤ) m) := + Module.Finite.of_injective _ hj + refine ⟨inferInstance,?_⟩ + have hb := LinearMap.finrank_le_finrank_of_injective hj + have hcard := SymmetricIndex.card_le (Module.finrank ℂ (S.first (g.finite 1))) m + exact hb.trans (by + simpa only [Module.finrank_pi_fintype,Module.finrank_fin_fun,Module.finrank_self,Nat.mul_one,Finset.sum_const,Finset.card_univ,smul_eq_mul,Fintype.card_fin] + using Nat.mul_le_mul_right (d+1) hcard) + + +theorem eq_zero_of_degree_lt_order (hg : PointedGenerated g S.first) (hdm : d < m) + (A : symmetricSupportedTensors g S (d : ℤ) m) : A=0 := by + have hf := (tensorSectionSpace.toTensor A.val).finite_zero_of_pointedGenerated S hg hdm A.property.1 + have hi := (tensorSectionSpace.toTensor A.val).infinity_zero_of_finite_zero hf + apply Subtype.ext + apply Subtype.ext + exact Prod.ext (funext hf) (funext hi) + +end symmetricSupportedTensors +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TangentCurveLeaf.lean b/lean/OAI/Geometry/SplitTangent/TangentCurveLeaf.lean new file mode 100644 index 0000000000000000000000000000000000000000..40150d860495a2b26e3300c699fa20d4522a00d2 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TangentCurveLeaf.lean @@ -0,0 +1,69 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.LeafPlaques +import OAI.Geometry.SplitTangent.LeafTopology +import OAI.Geometry.SplitTangent.LeafGermIdentity +import OAI.Geometry.SplitTangent.TangentRationalChains + +namespace OAI + +/-! Tangent Curve Leaf. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + +lemma tangent_curve_eventually_related {f : ℂ → X.Carrier} + (hf : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω f) + (ht : ∀z,mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) f z (1 : ℂ)∈S.first (f z)) (z : ℂ) : + ∀ᶠ w in 𝓝 z,L.plaques.Related (f z) (f w) := by + let P := L.chart (f z) + have hz : f z∈P.chart.source := L.mem_source _ + have htz : P.chart (f z)∈P.chart.target := P.chart.map_source hz + obtain ⟨U,V,hU,hUc,hV,hUV,hrect⟩ := UniformPlaqueSlices.connected_rectangle + (P.chart.open_target.mem_nhds htz) + have hc := (P.holomorphicAt hz).continuousAt.comp (hf z).continuousAt + have hs : ∀ᶠ w in 𝓝 z,f w∈P.chart.source := + (hf z).continuousAt.preimage_mem_nhds (P.chart.open_source.mem_nhds hz) + have hpair : ∀ᶠ w in 𝓝 z,P.chart (f w)∈U ×ˢ V := + hc.preimage_mem_nhds ((hU.prod hV).mem_nhds hUV) + filter_upwards [hs,hpair,P.tangent_curve_snd_eventually hf hz ht] with w hws hwUV hwb + have hh := L.plaques.related_in_rectangle hUc hrect hUV.1 hwUV.1 hUV.2 + have hw : P.chart.symm ((P.chart (f w)).1,(P.chart (f z)).2)=f w := by + rw [←hwb,Prod.mk.eta,P.chart.left_inv hws] + change L.plaques.Related (P.chart.symm ((P.chart (f z)).1,(P.chart (f z)).2)) + (P.chart.symm ((P.chart (f w)).1,(P.chart (f z)).2)) at hh + rwa [Prod.mk.eta,P.chart.left_inv hz,hw] at hh + +lemma tangent_curve_same_leaf {f : ℂ → X.Carrier} + (hf : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω f) + (ht : ∀z,mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) f z (1 : ℂ)∈S.first (f z)) (z w : ℂ) : + f w∈L.leaf (f z) := by + have hlc : IsLocallyConstant (fun q => L.leaf (f q)) := by + apply (IsLocallyConstant.iff_eventually_eq _).mpr + intro q + filter_upwards [L.tangent_curve_eventually_related hf ht q] with t ht + exact L.plaques.leaf_eq_of_mem (Relation.ReflTransGen.single ht) + rw [hlc.apply_eq_of_preconnectedSpace z w] + exact Relation.ReflTransGen.refl + +lemma tangent_rational_curve_finite {g : RationalCurve X} (ht : g.TangentTo S.first) (z : ℂ) : + g.finite z∈L.leaf (g.finite 1) := + L.tangent_curve_same_leaf g.finite_holomorphic ht.1 1 z + +lemma tangent_rational_curve_infinity {g : RationalCurve X} (ht : g.TangentTo S.first) (z : ℂ) : + g.infinity z∈L.leaf (g.finite 1) := by + have hh := L.tangent_curve_same_leaf g.infinity_holomorphic ht.2 1 z + have he : g.finite 1=g.infinity 1 := by simpa using g.overlap 1 one_ne_zero + rwa [←he] at hh + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TangentRationalChains.lean b/lean/OAI/Geometry/SplitTangent/TangentRationalChains.lean new file mode 100644 index 0000000000000000000000000000000000000000..c1c62d19925472171a3ce88fc44112308ad0fac0 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TangentRationalChains.lean @@ -0,0 +1,140 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxTransportBase +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.RationalFamilyCover + +namespace OAI + +/-! Tangent Rational Chains. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold +universe u +namespace SplitTangent + + + +def RationalCurve.TangentTo {X : ComplexManifold.{u}} (g : RationalCurve X) + (D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)) : Prop := + (∀z, mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.finite z (1 : ℂ) ∈ D (g.finite z)) ∧ + (∀z, mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) g.infinity z (1 : ℂ) ∈ D (g.infinity z)) + +namespace TangentBox +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} {g : RationalCurve X} + (B : TangentBox S g) + + +def horizontal (b : Bool) (t : ℂ) : RationalCurve X where + finite z := B.chart false b (z,t) + infinity z := B.chart true b (z,t) + finite_holomorphic := (B.holomorphic false b).comp + ((contDiff_id.prodMk contDiff_const : ContDiff ℂ ω (fun z : ℂ => (z,t))).contMDiff) + infinity_holomorphic := (B.holomorphic true b).comp + ((contDiff_id.prodMk contDiff_const : ContDiff ℂ ω (fun z : ℂ => (z,t))).contMDiff) + overlap z hz := by + have h := B.overlap false b true b (z,t) ⟨fun _ => hz,fun h => (h rfl).elim⟩ + simpa [ReciprocalCharts.changeChart,ReciprocalCharts.coord] using h + +lemma horizontal_derivative (a b : Bool) (s t : ℂ) : + mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) (fun z => B.chart a b (z,t)) s (1 : ℂ)= + mfderiv 𝓘(ℂ,ℂ × ℂ) (ModelWithCorners X) (B.chart a b) (s,t) (1,0) := by + have hd : HasFDerivAt (fun w : ℂ => (w,t)) + ((ContinuousLinearMap.id ℂ ℂ).prod (0 : ℂ →L[ℂ] ℂ)) s := + (hasFDerivAt_id s).prodMk (hasFDerivAt_const t s) + have hm : MDifferentiableAt 𝓘(ℂ,ℂ) 𝓘(ℂ,ℂ × ℂ) (fun w : ℂ => (w,t)) s := + hd.differentiableAt.mdifferentiableAt + have hchain := mfderiv_comp s ((B.holomorphic a b (s,t)).mdifferentiableAt (by simp)) hm + change mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) + ((B.chart a b) ∘ (fun w : ℂ => (w,t))) s (1 : ℂ)=_ + rw [hchain,mfderiv_eq_fderiv,hd.fderiv] + rfl + +lemma horizontal_tangent (b : Bool) (t : ℂ) : (B.horizontal b t).TangentTo S.first := by + constructor <;> intro z + · change mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) (fun z => B.chart false b (z,t)) z (1 : ℂ)∈_ + rw [B.horizontal_derivative] + exact (B.tangency false b (z,t)).1 + · change mfderiv 𝓘(ℂ,ℂ) (ModelWithCorners X) (fun z => B.chart true b (z,t)) z (1 : ℂ)∈_ + rw [B.horizontal_derivative] + exact (B.tangency true b (z,t)).1 + +lemma vertical_rational_tangent (a : Bool) (s : ℂ) : (B.vertical a s).TangentTo S.second := + ⟨fun z => B.vertical_tangent a false s z,fun z => B.vertical_tangent a true s z⟩ + +end TangentBox + + +def TangentRationalRelated {X : ComplexManifold.{u}} + (D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)) (x y : X.Carrier) : Prop := + ∃g : RationalCurve X, g.TangentTo D ∧ ∃a b : OnePoint ℂ, g.value a=x ∧ g.value b=y + + + +def TangentChainRelated {X : ComplexManifold.{u}} + (D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)) := + Relation.ReflTransGen (TangentRationalRelated D) + +lemma TangentRationalRelated.symm {X : ComplexManifold.{u}} + {D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)} {x y : X.Carrier} + (h : TangentRationalRelated D x y) : TangentRationalRelated D y x := by + obtain ⟨g,hg,a,b,ha,hb⟩ := h + exact ⟨g,hg,b,a,hb,ha⟩ + + + +theorem TangentSplitting.two_tangent_curves_of_rational + {X : ComplexManifold.{u}} [CompactSpace X.Carrier] (S : TangentSplitting X) (e : ProjectiveEmbedding X) + (g : RationalCurve X) (a b : ℂ) : + ∃z, TangentRationalRelated S.first (g.finite a) z ∧ + TangentRationalRelated S.second z (g.finite b) := by + obtain ⟨B⟩ := S.exists_projective_tangent_box e g + refine ⟨B.chart false false (b,a), ?_, ?_⟩ + · refine ⟨B.horizontal false a,B.horizontal_tangent false a, + (a : OnePoint ℂ),(b : OnePoint ℂ),?_,rfl⟩ + exact B.finite_diagonal a + · refine ⟨B.vertical false b,B.vertical_rational_tangent false b, + (a : OnePoint ℂ),(b : OnePoint ℂ),rfl,?_⟩ + exact B.finite_diagonal b + +lemma TangentChainRelated.refl {X : ComplexManifold.{u}} + (D : ∀ x : X.Carrier, Submodule ℂ (Tangent X x)) (x : X.Carrier) : + TangentChainRelated D x x := Relation.ReflTransGen.refl + +lemma TangentChainRelated.trans {X : ComplexManifold.{u}} + {D : ∀ x : X.Carrier, Submodule ℂ (Tangent X x)} {x y z : X.Carrier} + (hxy : TangentChainRelated D x y) (hyz : TangentChainRelated D y z) : + TangentChainRelated D x z := Relation.ReflTransGen.trans hxy hyz + +lemma TangentChainRelated.symm {X : ComplexManifold.{u}} + {D : ∀ x : X.Carrier, Submodule ℂ (Tangent X x)} {x y : X.Carrier} + (h : TangentChainRelated D x y) : TangentChainRelated D y x := by + induction h with + | refl => exact .refl _ _ + | @tail y z _ hyz ih => + exact (Relation.ReflTransGen.single hyz.symm).trans ih + +def tangentChainSetoid {X : ComplexManifold.{u}} + (D : ∀ x : X.Carrier, Submodule ℂ (Tangent X x)) : Setoid X.Carrier where + r := TangentChainRelated D + iseqv := ⟨.refl D, fun h => h.symm, fun h k => h.trans k⟩ + + + +theorem TangentSplitting.general_mixed_tangent_curves + {X : ComplexManifold.{u}} [CompactSpace X.Carrier] (S : TangentSplitting X) + (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) : + ∃ U : Set (X.Carrier × X.Carrier), IsZariskiOpenPair e U ∧ U.Nonempty ∧ Dense U ∧ + ∀ xy ∈ U, ∃ z, TangentRationalRelated S.first xy.1 z ∧ + TangentRationalRelated S.second z xy.2 := by + obtain ⟨U,hUz,hUn,hUd,hU⟩ := hRC + refine ⟨U,hUz,hUn,hUd,?_⟩ + intro xy hxy + obtain ⟨g,h0,h1⟩ := RationallyConnected.fixed_endpoints hU hxy + simpa only [h0,h1] using S.two_tangent_curves_of_rational e g 0 1 + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TensorSectionSpace.lean b/lean/OAI/Geometry/SplitTangent/TensorSectionSpace.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1f93ee6837943ede3827bf22d0151bfaab1094f --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TensorSectionSpace.lean @@ -0,0 +1,148 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.TwistedCurveTensor + +namespace OAI + +/-! Tensor Section Space. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent + +@[simp] lemma tangentTensorCoordinates_zero {X : ComplexManifold.{u}} {m : ℕ} + (g : ℂ → X.Carrier) (z₀ : ℂ) : + tangentTensorCoordinates (m := m) g 0 z₀=0 := by + ext z v + rfl + +@[simp] lemma tangentTensorCoordinates_add {X : ComplexManifold.{u}} {m : ℕ} + (g : ℂ → X.Carrier) (A B : ℂ → TangentTensor X m) (z₀ : ℂ) : + tangentTensorCoordinates g (A+B) z₀= + tangentTensorCoordinates g A z₀+tangentTensorCoordinates g B z₀ := by + ext z v + rfl + +@[simp] lemma tangentTensorCoordinates_smul {X : ComplexManifold.{u}} {m : ℕ} + (g : ℂ → X.Carrier) (c : ℂ) (A : ℂ → TangentTensor X m) (z₀ : ℂ) : + tangentTensorCoordinates g (c • A) z₀=c • tangentTensorCoordinates g A z₀ := by + ext z v + rfl + + +def tensorSectionSpace {X : ComplexManifold.{u}} (g : RationalCurve X) (d : ℤ) (m : ℕ) : + Submodule ℂ ((ℂ → TangentTensor X m) × (ℂ → TangentTensor X m)) where + carrier := {A | (∀z,AnalyticAt ℂ (tangentTensorCoordinates g.finite A.1 z) z) ∧ + (∀z,AnalyticAt ℂ (tangentTensorCoordinates g.infinity A.2 z) z) ∧ + ∀z : ℂ,z≠0 → A.1 z=z^d • A.2 z⁻¹} + zero_mem' := by + refine ⟨fun z => ?_,fun z => ?_,fun z hz => ?_⟩ + · simp only [Prod.fst_zero,tangentTensorCoordinates_zero] + change AnalyticAt ℂ (fun _ : ℂ => (0 : TangentTensor X m)) z + exact analyticAt_const + · simp only [Prod.snd_zero,tangentTensorCoordinates_zero] + change AnalyticAt ℂ (fun _ : ℂ => (0 : TangentTensor X m)) z + exact analyticAt_const + · simp + add_mem' := by + intro A B hA hB + refine ⟨fun z => ?_,fun z => ?_,fun z hz => ?_⟩ + · simpa using (hA.1 z).add (hB.1 z) + · simpa using (hA.2.1 z).add (hB.2.1 z) + · change A.1 z+B.1 z=z^d • (A.2 z⁻¹+B.2 z⁻¹) + rw [hA.2.2 z hz,hB.2.2 z hz,smul_add] + smul_mem' := by + intro c A hA + refine ⟨fun z => ?_,fun z => ?_,fun z hz => ?_⟩ + · simpa using (hA.1 z).const_smul (c := c) + · simpa using (hA.2.1 z).const_smul (c := c) + · change c • A.1 z=z^d • (c • A.2 z⁻¹) + rw [hA.2.2 z hz,smul_comm] + +namespace tensorSectionSpace +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {d : ℤ} {m : ℕ} + +def toTensor (A : tensorSectionSpace g d m) : TwistedCurveTensor g d m where + finite := A.val.1 + infinity := A.val.2 + finite_holomorphic := A.property.1 + infinity_holomorphic := A.property.2.1 + overlap := A.property.2.2 + + +def contract (σ : Fin m → CurveTangentSection g) : + tensorSectionSpace g d m →ₗ[ℂ] DiagonalRationality.lineSections d where + toFun A := (toTensor A).contract σ + map_add' A B := by + apply DiagonalRationality.lineSections_ext + rfl + map_smul' c A := by + apply DiagonalRationality.lineSections_ext + rfl + +end tensorSectionSpace + + + +def symmetricSupportedTensors {X : ComplexManifold.{u}} (g : RationalCurve X) + (S : TangentSplitting X) (d : ℤ) (m : ℕ) : Submodule ℂ (tensorSectionSpace g d m) where + carrier := {A | (∀z v,A.val.1 z (fun i => S.projector (g.finite z) (v i))=A.val.1 z v) ∧ + (∀z v,A.val.2 z (fun i => S.projector (g.infinity z) (v i))=A.val.2 z v) ∧ + (∀z v (p : Equiv.Perm (Fin m)),A.val.1 z (v ∘ p)=A.val.1 z v) ∧ + (∀z v (p : Equiv.Perm (Fin m)),A.val.2 z (v ∘ p)=A.val.2 z v)} + zero_mem' := ⟨fun _ _ => rfl,fun _ _ => rfl,fun _ _ _ => rfl,fun _ _ _ => rfl⟩ + add_mem' := by + intro A B hA hB + refine ⟨fun z v => ?_,fun z v => ?_,fun z v p => ?_,fun z v p => ?_⟩ + · change A.val.1 z _+B.val.1 z _=A.val.1 z v+B.val.1 z v + rw [hA.1,hB.1] + · change A.val.2 z _+B.val.2 z _=A.val.2 z v+B.val.2 z v + rw [hA.2.1,hB.2.1] + · change A.val.1 z _+B.val.1 z _=A.val.1 z v+B.val.1 z v + rw [hA.2.2.1,hB.2.2.1] + · change A.val.2 z _+B.val.2 z _=A.val.2 z v+B.val.2 z v + rw [hA.2.2.2,hB.2.2.2] + smul_mem' := by + intro c A hA + refine ⟨fun z v => ?_,fun z v => ?_,fun z v p => ?_,fun z v p => ?_⟩ + · change c • A.val.1 z _=c • A.val.1 z v + rw [hA.1] + · change c • A.val.2 z _=c • A.val.2 z v + rw [hA.2.1] + · change c • A.val.1 z _=c • A.val.1 z v + rw [hA.2.2.1] + · change c • A.val.2 z _=c • A.val.2 z v + rw [hA.2.2.2] + +namespace PointedGenerated +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {S : TangentSplitting X} + +theorem exists_basis_sections (h : PointedGenerated g S.first) : + ∃σ : Fin (Module.finrank ℂ (S.first (g.finite 1))) → CurveTangentSection g, + (∀j z,(σ j).finite z∈S.first (g.finite z)) ∧ + (∀j z,(σ j).infinity z∈S.first (g.infinity z)) ∧ + (∀j,(σ j).finite 0=0) ∧ + ∀v∈S.first (g.finite 1),∃a : Fin (Module.finrank ℂ (S.first (g.finite 1))) → ℂ, + ∑j,a j • (σ j).finite 1=v := by + classical + let : FiniteDimensional ℂ (Tangent X (g.finite 1)) := + inferInstanceAs (FiniteDimensional ℂ (Model X)) + let b := Module.finBasis ℂ (S.first (g.finite 1)) + choose σ hσf hσi hσ0 hσ1 using fun j => h (b j).val (b j).property + refine ⟨σ,hσf,hσi,hσ0,?_⟩ + intro v hv + refine ⟨fun j => b.repr ⟨v,hv⟩ j,?_⟩ + simpa only [hσ1,Submodule.coe_sum,Submodule.coe_smul] using + congrArg Subtype.val (b.sum_repr ⟨v,hv⟩) + +end PointedGenerated +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TensorSpanning.lean b/lean/OAI/Geometry/SplitTangent/TensorSpanning.lean new file mode 100644 index 0000000000000000000000000000000000000000..a22e79eb3a22ade0ca322acdfcde0bd65ad5288a --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TensorSpanning.lean @@ -0,0 +1,167 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.GlobalTensorVanishing +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.RationalTrivialization +import OAI.Geometry.SplitTangent.TwistedCurveTensor + +namespace OAI + +/-! Tensor Spanning. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent +namespace TwistedCurveTensor +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {d : ℤ} {m : ℕ} + + + +theorem infinity_zero_of_finite_zero (A : TwistedCurveTensor g d m) + (h : ∀z,A.finite z=0) : ∀z,A.infinity z=0 := by + have ho {z : ℂ} (hz : z≠0) : A.infinity z=0 := by + have he := A.overlap z⁻¹ (inv_ne_zero hz) + rw [h,inv_inv] at he + exact (smul_eq_zero.mp he.symm).resolve_left (zpow_ne_zero _ (inv_ne_zero hz)) + have hall : (Set.univ : Set ℂ)⊆{z | A.infinity z=0} := by + apply AnalyticContinuation.subset_of_local_analytic_equations + (F := TangentTensor X m) isPreconnected_univ + · intro z hz + refine ⟨tangentTensorCoordinates g.infinity A.infinity z,A.infinity_holomorphic z,?_⟩ + let t := trivializationAt (Model X) (Tangent X) (g.infinity z) + have hbase : g.infinity z∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + filter_upwards [g.infinity_holomorphic.continuous.continuousAt.preimage_mem_nhds + (t.open_baseSet.mem_nhds hbase)] with w hw + exact (tangentTensorCoordinates_zero_iff hw).symm + · refine ⟨1,Set.mem_univ _,mem_interior_iff_mem_nhds.mpr ?_⟩ + exact (eventually_ne_nhds (one_ne_zero : (1:ℂ)≠0)).mono fun z hz => ho hz + exact fun z => hall (Set.mem_univ z) + + + +theorem finite_zero_of_spanning_sections (A : TwistedCurveTensor g d m) + (S : TangentSplitting X) {r : ℕ} (σ : Fin r → CurveTangentSection g) + (hσ : ∀j z,(σ j).finite z∈S.first (g.finite z)) + (hspan : ∀v∈S.first (g.finite 1),∃a : Fin r → ℂ,∑j,a j • (σ j).finite 1=v) + (hSupport : ∀z v,A.finite z (fun i => S.projector (g.finite z) (v i))=A.finite z v) + (hcontract : ∀j : Fin m → Fin r,A.contract (σ ∘ j)=0) : ∀z,A.finite z=0 := by + classical + let t := trivializationAt (Model X) (Tangent X) (g.finite 1) + let c := chartAt (Model X) (g.finite 1) + let b := Pi.basisFun ℂ (Fin X.dim) + let w (j : Fin r) (z : ℂ) := + (t (⟨g.finite z,(σ j).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + let M (z : ℂ) : (Fin r → ℂ) →L[ℂ] Model X := + ∑j,(ContinuousLinearMap.proj j).smulRight (w j z) + let P (z : ℂ) := S.coordinateProjector (g.finite 1) (c (g.finite z)) + have hMb : ∀z j,M z ((Pi.basisFun ℂ (Fin r)) j)=w j z := by + intro z j + simp [M,Pi.basisFun_apply] + have hM : ContinuousAt M 1 := by + apply tendsto_finsetSum + intro j hj + exact (ContinuousLinearMap.smulRightL ℂ (Fin r → ℂ) (Model X) + (ContinuousLinearMap.proj j)).continuous.continuousAt.comp + (section_coordinates_analytic (σ j).finite_holomorphic 1).continuousAt + have hP : ContinuousAt P 1 := by + have hc : AnalyticAt ℂ (c ∘ g.finite) (1 : ℂ) := + TangentSplitting.coordinateCurve_analytic g.finite_holomorphic (g.finite 1) (mem_chart_source _ _) + exact ((S.coordinateProjector_analytic (g.finite 1) _ + (c.map_source (mem_chart_source _ _))).comp (f := c ∘ g.finite) (x := (1 : ℂ)) hc).continuousAt + have hbase : ∀ᶠz in 𝓝 (1 : ℂ),g.finite z∈t.baseSet := + g.finite_holomorphic.continuous.continuousAt.preimage_mem_nhds + (t.open_baseSet.mem_nhds (FiberBundle.mem_baseSet_trivializationAt' _)) + have hPw : ∀z,g.finite z∈t.baseSet → ∀j,P z (w j z)=w j z := by + intro z hz j + change S.coordinateProjector (g.finite 1) (c (g.finite z)) + (t (⟨g.finite z,(σ j).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2=_ + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz,S.coordinateProjector_fixed _ hz, + (S.mem_first_iff _ _).mp (hσ j z)] + exact t.continuousLinearMapAt_apply_of_mem ℂ hz _ + have hspan' : ∀j : Fin X.dim, ∃a : Fin r → ℂ,M 1 a=P 1 (b j) := by + intro j + obtain ⟨a,ha⟩ := hspan (S.projector (g.finite 1) (t.symmL ℂ (g.finite 1) (b j))) ⟨_,rfl⟩ + refine ⟨a,?_⟩ + have hz : g.finite 1∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + have he := congrArg (t.continuousLinearMapAt ℂ (g.finite 1)) ha + simp only [map_sum,map_smul] at he + change M 1 a=S.coordinateProjector (g.finite 1) (c (g.finite 1)) (b j) + have hproj : S.coordinateProjector (g.finite 1) (c (g.finite 1)) (b j)= + t.continuousLinearMapAt ℂ (g.finite 1) + (S.projector (g.finite 1) (t.symmL ℂ (g.finite 1) (b j))) := by + have hh := S.coordinateProjector_fixed (g.finite 1) hz + (t.symmL ℂ (g.finite 1) (b j)) + change S.coordinateProjector (g.finite 1) (c (g.finite 1)) + (t.continuousLinearMapAt ℂ (g.finite 1) (t.symmL ℂ (g.finite 1) (b j)))=_ at hh + rw [t.continuousLinearMapAt_symmL hz] at hh + exact hh + rw [hproj] + rw [←he] + simp only [M,sum_apply,ContinuousLinearMap.smulRight_apply] + congr 1 + funext k + rw [t.continuousLinearMapAt_apply_of_mem ℂ hz] + rfl + choose a ha using hspan' + let K : Model X →L[ℂ] (Fin r → ℂ) := + ∑j,(ContinuousLinearMap.proj j).smulRight (a j) + have hK : ∀j,K (b j)=a j := by intro j; simp [K,b,Pi.basisFun_apply] + have hx : (M 1).comp K=P 1 := by + apply ContinuousLinearMap.coe_injective + apply b.ext + intro j + change M 1 (K (b j))=P 1 (b j) + rw [hK,ha] + have hMK : ContinuousAt (fun z => (M z).comp K) 1 := hM.clm_comp continuousAt_const + have hPP : ∀ᶠz in 𝓝 (1 : ℂ),∀v,P z (P z v)=P z v := by + filter_upwards [hbase] with z hz + exact S.coordinateProjector_idempotent _ (c.map_source hz) + have hPM : ∀ᶠz in 𝓝 (1 : ℂ),∀v,P z ((M z).comp K v)=(M z).comp K v := by + filter_upwards [hbase] with z hz + intro v + simp only [ContinuousLinearMap.comp_apply,M,sum_apply, + ContinuousLinearMap.smulRight_apply,map_sum,map_smul,hPw z hz] + have hRange := ProjectorSpanning.eventually_range_eq hP hMK hx hPP hPM + apply A.finite_zero_of_eventually (z₀ := 1) + filter_upwards [hbase,hRange] with z hz hRange + let B := tangentTensorCoordinates g.finite A.finite 1 z + have hB : ∀j : Fin m → Fin r,B (fun i => M z ((Pi.basisFun ℂ (Fin r)) (j i)))=0 := by + intro j + have hv := congrArg (fun s : DiagonalRationality.lineSections d => s.val.1 z) (hcontract j) + change A.finite z (fun i => (σ (j i)).finite z)=0 at hv + have he (i : Fin m) : t.symmL ℂ (g.finite z) (M z ((Pi.basisFun ℂ (Fin r)) (j i))) = + (σ (j i)).finite z := by + rw [hMb] + change t.symmL ℂ (g.finite z) (t (⟨g.finite z,(σ (j i)).finite z⟩ : + TangentBundle (ModelWithCorners X) X.Carrier)).2=_ + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz,t.symmL_continuousLinearMapAt hz] + change A.finite z (fun i => t.symmL ℂ (g.finite z) + (M z ((Pi.basisFun ℂ (Fin r)) (j i)))) = 0 + exact (congrArg (A.finite z) (funext he)).trans hv + apply ContinuousMultilinearMap.ext + intro v + rw [← hSupport z v] + have hv : ∀i,t.continuousLinearMapAt ℂ (g.finite z) (S.projector (g.finite z) (v i))∈ + LinearMap.range (M z).toLinearMap := by + intro i + have he : t.continuousLinearMapAt ℂ (g.finite z) (S.projector (g.finite z) (v i))∈ + LinearMap.range ((M z).comp K).toLinearMap := by + rw [hRange] + exact ⟨t.continuousLinearMapAt ℂ (g.finite z) (v i),S.coordinateProjector_fixed _ hz _⟩ + obtain ⟨a,ha⟩ := he + exact ⟨K a,ha⟩ + have h := ProjectorSpanning.multilinear_zero_of_basis_range (M z) B hB _ hv + change A.finite z (fun i => t.symmL ℂ (g.finite z) + (t.continuousLinearMapAt ℂ (g.finite z) (S.projector (g.finite z) (v i))))=0 at h + simpa only [t.symmL_continuousLinearMapAt hz,zero_apply] using h + +end TwistedCurveTensor +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TensorVanishing.lean b/lean/OAI/Geometry/SplitTangent/TensorVanishing.lean new file mode 100644 index 0000000000000000000000000000000000000000..13b0c4816b079c3a79c0392843668fcfbf5b7dcc --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TensorVanishing.lean @@ -0,0 +1,4882 @@ +import Mathlib +import OAI.Geometry.SplitTangent.BoxMonomials +import OAI.Geometry.SplitTangent.FiniteOpenMaps +import OAI.Geometry.SplitTangent.RationalFamilies +import OAI.Geometry.SplitTangent.GenericFiniteCovering +import OAI.Geometry.SplitTangent.HolomorphicLocalDiffeomorph +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.LeadingJetProduct +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.OpenManifold +import OAI.Geometry.SplitTangent.PolynomialSpecialization +import OAI.Geometry.SplitTangent.FormalBoxes +import OAI.Geometry.SplitTangent.DenseRationalVariation + +namespace OAI + +/-! Tensor Vanishing. -/ + +noncomputable section +open Set Filter +open scoped Topology ContDiff +namespace HolomorphicFrobenius +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + +def InvolutiveAt (P : E → E →L[ℂ] E) (x : E) : Prop := + ∀ V W : E → E, AnalyticAt ℂ V x → AnalyticAt ℂ W x → + (∀ᶠ y in 𝓝 x, V y∈LinearMap.range (P y).toLinearMap) → + (∀ᶠ y in 𝓝 x, W y∈LinearMap.range (P y).toLinearMap) → + ∀ᶠ y in 𝓝 x, VectorField.lieBracket ℂ V W y∈LinearMap.range (P y).toLinearMap + +end HolomorphicFrobenius + +namespace SplitTangent.ProductTransition +variable {A B C D : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + [NormedAddCommGroup C] [NormedSpace ℂ C] + [NormedAddCommGroup D] [NormedSpace ℂ D] + +lemma eventually_factors_snd {f : A × B → C} {x : A × B} + (hf : ∀ᶠ y in 𝓝 x, DifferentiableAt ℂ f y) + (hz : ∀ᶠ y in 𝓝 x, ∀a, fderiv ℂ f y (a,0)=0) : + ∀ᶠ y in 𝓝 x, f y=f (x.1,y.2) := by + obtain ⟨r,hr,hs⟩ := Metric.mem_nhds_iff.mp (hf.and hz) + have hball : ∀a∈Metric.ball x.1 r, ∀b∈Metric.ball x.2 r, + DifferentiableAt ℂ f (a,b) ∧ ∀v, fderiv ℂ f (a,b) (v,0)=0 := by + intro a ha b hb + exact hs (by simpa only [Metric.mem_ball,Prod.dist_eq,max_lt_iff] using And.intro ha hb) + filter_upwards [Metric.ball_mem_nhds x hr] with y hy + have hab : y.1∈Metric.ball x.1 r ∧ y.2∈Metric.ball x.2 r := by + simpa only [Metric.mem_ball, Prod.dist_eq, max_lt_iff] using hy + have ha := hab.1 + have hb := hab.2 + have hD (a : A) (h : a∈Metric.ball x.1 r) : + HasFDerivAt (fun t => f (t,y.2)) (0 : A →L[ℂ] C) a := by + have he : (fderiv ℂ f (a,y.2)).comp + ((ContinuousLinearMap.id ℂ A).prod (0 : A →L[ℂ] B))=0 := by + ext v + exact (hball a h y.2 hb).2 v + have hp : HasFDerivAt (fun t : A => (t,y.2)) + ((ContinuousLinearMap.id ℂ A).prod (0 : A →L[ℂ] B)) a := + (hasFDerivAt_id a).prodMk (hasFDerivAt_const y.2 a) + simpa only [he,Function.comp_def] using (hball a h y.2 hb).1.hasFDerivAt.comp a hp + exact Metric.isOpen_ball.is_const_of_fderiv_eq_zero + (convex_ball x.1 r).isPreconnected (fun a h => (hD a h).differentiableAt.differentiableWithinAt) + (fun a h => (hD a h).fderiv) ha (Metric.mem_ball_self hr) + +lemma eventually_factors_fst {f : A × B → C} {x : A × B} + (hf : ∀ᶠ y in 𝓝 x, DifferentiableAt ℂ f y) + (hz : ∀ᶠ y in 𝓝 x, ∀b, fderiv ℂ f y (0,b)=0) : + ∀ᶠ y in 𝓝 x, f y=f (y.1,x.2) := by + have hsw : Tendsto (Prod.swap : B × A → A × B) (𝓝 x.swap) (𝓝 x) := + continuous_swap.continuousAt + have hd : ∀ᶠ y in 𝓝 x.swap, DifferentiableAt ℂ (f ∘ Prod.swap) y := by + filter_upwards [hsw.eventually hf] with y hy + exact hy.comp y (ContinuousLinearEquiv.prodComm ℂ B A).differentiableAt + have hd0 : ∀ᶠ y in 𝓝 x.swap, ∀b, + fderiv ℂ (f ∘ Prod.swap) y (b,0)=0 := by + filter_upwards [hsw.eventually hf,hsw.eventually hz] with y hy hz + intro b + rw [fderiv_comp y hy (ContinuousLinearEquiv.prodComm ℂ B A).differentiableAt] + change fderiv ℂ f y.swap (fderiv ℂ (ContinuousLinearEquiv.prodComm ℂ B A) y (b,0))=0 + rw [ContinuousLinearEquiv.fderiv] + exact hz b + have h := eventually_factors_snd hd hd0 + have hsw' : Tendsto (Prod.swap : A × B → B × A) (𝓝 x) (𝓝 x.swap) := + continuous_swap.continuousAt + simpa using hsw'.eventually h + + +theorem eventually_product [CompleteSpace C] [CompleteSpace D] {f : A × B → C × D} {x : A × B} + (hf : AnalyticAt ℂ f x) + (haxes : ∀ᶠ y in 𝓝 x, + (∀a, (fderiv ℂ f y (a,0)).2=0) ∧ + (∀b, (fderiv ℂ f y (0,b)).1=0)) : + ∀ᶠ y in 𝓝 x, f y=((f (y.1,x.2)).1,(f (x.1,y.2)).2) := by + have hd := hf.eventually_analyticAt.mono (fun y hy => hy.differentiableAt) + have hfst : ∀ᶠ y in 𝓝 x, DifferentiableAt ℂ (fun y => (f y).1) y := + hd.mono (fun y hy => hy.fst) + have hsnd : ∀ᶠ y in 𝓝 x, DifferentiableAt ℂ (fun y => (f y).2) y := + hd.mono (fun y hy => hy.snd) + have hfst0 : ∀ᶠ y in 𝓝 x, ∀b, fderiv ℂ (fun y => (f y).1) y (0,b)=0 := by + filter_upwards [hd,haxes] with y hy ha + intro b + rw [fderiv.fst hy] + exact ha.2 b + have hsnd0 : ∀ᶠ y in 𝓝 x, ∀a, fderiv ℂ (fun y => (f y).2) y (a,0)=0 := by + filter_upwards [hd,haxes] with y hy ha + intro a + rw [fderiv.snd hy] + exact ha.1 a + filter_upwards [eventually_factors_fst hfst hfst0,eventually_factors_snd hsnd hsnd0] with y hy hz + exact Prod.ext hy hz + +end SplitTangent.ProductTransition + +open Set Filter Topology Bundle +open scoped Manifold ContDiff +universe u +namespace SplitTangent +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + +structure AlignedProductChart (S : TangentSplitting X) + (A B : Type*) [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] where + chart : OpenPartialHomeomorph X.Carrier (A × B) + holomorphic : ContMDiffOn (ModelWithCorners X) 𝓘(ℂ,A × B) ω chart chart.source + inverse_holomorphic : ContMDiffOn 𝓘(ℂ,A × B) (ModelWithCorners X) ω chart.symm chart.target + first : ∀y∈chart.source, + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) chart y).toLinearMap (S.first y)= + LinearMap.ker (ContinuousLinearMap.snd ℂ A B).toLinearMap + second : ∀y∈chart.source, + Submodule.map (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) chart y).toLinearMap (S.second y)= + LinearMap.ker (ContinuousLinearMap.fst ℂ A B).toLinearMap + +namespace AlignedProductChart +variable {A B C D : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] + [NormedAddCommGroup C] [NormedSpace ℂ C] + [NormedAddCommGroup D] [NormedSpace ℂ D] + +lemma mdifferentiable (P : AlignedProductChart S A B) : + P.chart.MDifferentiable (ModelWithCorners X) 𝓘(ℂ,A × B) := + ⟨P.holomorphic.mdifferentiableOn (by simp),P.inverse_holomorphic.mdifferentiableOn (by simp)⟩ + +lemma holomorphicAt (P : AlignedProductChart S A B) {y : X.Carrier} + (hy : y∈P.chart.source) : ContMDiffAt (ModelWithCorners X) 𝓘(ℂ,A × B) ω P.chart y := + P.holomorphic.contMDiffAt (P.chart.open_source.mem_nhds hy) + +lemma inverse_holomorphicAt (P : AlignedProductChart S A B) {y : A × B} + (hy : y∈P.chart.target) : ContMDiffAt 𝓘(ℂ,A × B) (ModelWithCorners X) ω P.chart.symm y := + P.inverse_holomorphic.contMDiffAt (P.chart.open_target.mem_nhds hy) + +lemma inverse_first (P : AlignedProductChart S A B) {y : A × B} + (hy : y∈P.chart.target) (a : A) : + mfderiv 𝓘(ℂ,A × B) (ModelWithCorners X) P.chart.symm y (a,0) ∈ S.first (P.chart.symm y) := by + have hp := P.chart.map_target hy + have ha : (a,0)∈Submodule.map + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (P.chart.symm y)).toLinearMap + (S.first (P.chart.symm y)) := by rw [P.first _ hp]; rfl + obtain ⟨v,hv,he⟩ := ha + let L : Model X →L[ℂ] A × B := + mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (P.chart.symm y) + let R (z : A × B) : (A × B) →L[ℂ] Model X := + mfderiv 𝓘(ℂ,A × B) (ModelWithCorners X) P.chart.symm z + have hi : R (P.chart (P.chart.symm y)) (L v)=v := + DFunLike.congr_fun (P.mdifferentiable.symm_comp_deriv hp) v + have hi2 : R y (L v)=v := + (congrArg (fun z => R z (L v)) (P.chart.right_inv hy)).symm.trans hi + have hi3 : R y (a,0)=v := (congrArg (R y) he.symm).trans hi2 + exact hi3.symm ▸ hv + +lemma inverse_second (P : AlignedProductChart S A B) {y : A × B} + (hy : y∈P.chart.target) (b : B) : + mfderiv 𝓘(ℂ,A × B) (ModelWithCorners X) P.chart.symm y (0,b) ∈ S.second (P.chart.symm y) := by + have hp := P.chart.map_target hy + have ha : (0,b)∈Submodule.map + (mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (P.chart.symm y)).toLinearMap + (S.second (P.chart.symm y)) := by rw [P.second _ hp]; rfl + obtain ⟨v,hv,he⟩ := ha + let L : Model X →L[ℂ] A × B := + mfderiv (ModelWithCorners X) 𝓘(ℂ,A × B) P.chart (P.chart.symm y) + let R (z : A × B) : (A × B) →L[ℂ] Model X := + mfderiv 𝓘(ℂ,A × B) (ModelWithCorners X) P.chart.symm z + have hi : R (P.chart (P.chart.symm y)) (L v)=v := + DFunLike.congr_fun (P.mdifferentiable.symm_comp_deriv hp) v + have hi2 : R y (L v)=v := + (congrArg (fun z => R z (L v)) (P.chart.right_inv hy)).symm.trans hi + have hi3 : R y (0,b)=v := (congrArg (R y) he.symm).trans hi2 + exact hi3.symm ▸ hv + + + +theorem transition_axes (P : AlignedProductChart S A B) + (Q : AlignedProductChart S C D) {y : A × B} + (hy : y∈P.chart.target) (hq : P.chart.symm y∈Q.chart.source) : + ∀ᶠ z in 𝓝 y, + (∀a, (fderiv ℂ (Q.chart ∘ P.chart.symm) z (a,0)).2=0) ∧ + (∀b, (fderiv ℂ (Q.chart ∘ P.chart.symm) z (0,b)).1=0) := by + filter_upwards [P.chart.open_target.mem_nhds hy, + (P.inverse_holomorphicAt hy).continuousAt.preimage_mem_nhds (Q.chart.open_source.mem_nhds hq)] + with z hz hqz + have hc := mfderiv_comp z + ((Q.holomorphicAt hqz).mdifferentiableAt (by simp)) + ((P.inverse_holomorphicAt hz).mdifferentiableAt (by simp)) + rw [mfderiv_eq_fderiv] at hc + constructor + · intro a + have hm := Submodule.mem_map_of_mem + (f := (mfderiv (ModelWithCorners X) 𝓘(ℂ,C × D) Q.chart (P.chart.symm z)).toLinearMap) + (P.inverse_first hz a) + rw [Q.first _ hqz] at hm + rw [hc] + exact hm + · intro b + have hm := Submodule.mem_map_of_mem + (f := (mfderiv (ModelWithCorners X) 𝓘(ℂ,C × D) Q.chart (P.chart.symm z)).toLinearMap) + (P.inverse_second hz b) + rw [Q.second _ hqz] at hm + rw [hc] + exact hm + + + +theorem transition_product [CompleteSpace C] [CompleteSpace D] + (P : AlignedProductChart S A B) (Q : AlignedProductChart S C D) {y : A × B} + (hy : y∈P.chart.target) (hq : P.chart.symm y∈Q.chart.source) : + ∀ᶠ z in 𝓝 y, (Q.chart ∘ P.chart.symm) z= + (((Q.chart ∘ P.chart.symm) (z.1,y.2)).1, + ((Q.chart ∘ P.chart.symm) (y.1,z.2)).2) := by + have ha : AnalyticAt ℂ (Q.chart ∘ P.chart.symm) y := + ((Q.holomorphicAt hq).comp y (P.inverse_holomorphicAt hy)).contDiffAt.analyticAt + exact ProductTransition.eventually_product ha (P.transition_axes Q hy hq) + +end AlignedProductChart + + + + +end SplitTangent + +open Set Filter Topology Bundle +open scoped Manifold ContDiff +namespace SplitTangent +variable {X : ComplexManifold.{u}} + +abbrev chartDerivative (x y : X.Carrier) : Tangent X y →L[ℂ] Model X := + mfderiv (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) y + +lemma chartDerivative_isInvertible (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) : + (chartDerivative x y).IsInvertible := by + have h := isInvertible_mfderiv_extChartAt (I := ModelWithCorners X) (x := x) + (y := y) (by simpa using hy) + simp only [ModelWithCorners, extChartAt, OpenPartialHomeomorph.extend, + PartialEquiv.coe_trans, ModelWithCorners.toPartialEquiv_coe, + OpenPartialHomeomorph.toFun_eq_coe, modelWithCornersSelf_coe, Function.id_comp] at h + convert h using 1 + rfl + +lemma chartDerivative_inverse (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) : + (chartDerivative x y).inverse= + (trivializationAt (Model X) (Tangent X) x).symmL ℂ y := by + have ht := TangentBundle.continuousLinearMapAt_trivializationAt (I := ModelWithCorners X) hy + change (trivializationAt (Model X) (Tangent X) x).continuousLinearMapAt ℂ y= + chartDerivative x y at ht + rw [← ht] + apply ContinuousLinearMap.inverse_eq + · apply ContinuousLinearMap.ext + intro v + exact Bundle.Trivialization.continuousLinearMapAt_symmL (R := ℂ) + (trivializationAt (Model X) (Tangent X) x) hy v + · apply ContinuousLinearMap.ext + intro v + exact Bundle.Trivialization.symmL_continuousLinearMapAt (R := ℂ) + (trivializationAt (Model X) (Tangent X) x) hy v + +lemma chartPullback_holomorphicAt (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) {V : Model X → Model X} + (hV : AnalyticAt ℂ V ((chartAt (Model X) x) y)) : + ContMDiffAt (ModelWithCorners X) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun a => (⟨a,VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) + (chartAt (Model X) x) V a⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) y := by + have hv : ContMDiffAt 𝓘(ℂ,Model X) (𝓘(ℂ,Model X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨z,V z⟩ : TangentBundle 𝓘(ℂ,Model X) (Model X))) ((chartAt (Model X) x) y) := + contMDiffAt_vectorSpace_iff_contDiffAt.mpr hV.contDiffAt + have hc := contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hy + exact hv.mpullback_vectorField_preimage hc (chartDerivative_isInvertible x hy) (by simp) + +lemma chartPullback_bracket (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) {V W : Model X → Model X} + (hV : AnalyticAt ℂ V ((chartAt (Model X) x) y)) + (hW : AnalyticAt ℂ W ((chartAt (Model X) x) y)) : + VectorField.mlieBracket (ModelWithCorners X) + (VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) V) + (VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) W) y= + (chartDerivative x y).inverse + (VectorField.lieBracket ℂ V W ((chartAt (Model X) x) y)) := by + have hv : ContMDiffAt 𝓘(ℂ,Model X) (𝓘(ℂ,Model X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨z,V z⟩ : TangentBundle 𝓘(ℂ,Model X) (Model X))) ((chartAt (Model X) x) y) := + contMDiffAt_vectorSpace_iff_contDiffAt.mpr hV.contDiffAt + have hw : ContMDiffAt 𝓘(ℂ,Model X) (𝓘(ℂ,Model X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨z,W z⟩ : TangentBundle 𝓘(ℂ,Model X) (Model X))) ((chartAt (Model X) x) y) := + contMDiffAt_vectorSpace_iff_contDiffAt.mpr hW.contDiffAt + have hc := contMDiffAt_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) hy + have hh := VectorField.mpullback_mlieBracket (hv.mdifferentiableAt (by simp)) + (hw.mdifferentiableAt (by simp)) hc (by simp) + have he : VectorField.mlieBracket 𝓘(ℂ,Model X) V W=VectorField.lieBracket ℂ V W := by + funext a + unfold VectorField.mlieBracket + erw [VectorField.mlieBracketWithin_eq_lieBracketWithin, + VectorField.lieBracketWithin_univ] + rw [he] at hh + exact hh.symm + +namespace TangentSplitting +variable (S : TangentSplitting X) + +lemma coordinateProjector_range_iff (x : X.Carrier) {y : X.Carrier} + (hy : y∈(chartAt (Model X) x).source) (v : Model X) : + v∈LinearMap.range (S.coordinateProjector x ((chartAt (Model X) x) y)).toLinearMap ↔ + (chartDerivative x y).inverse v∈S.first y := by + let D : Tangent X y →L[ℂ] Model X := + mfderiv (ModelWithCorners X) 𝓘(ℂ,Model X) (chartAt (Model X) x) y + have hD : D.IsInvertible := chartDerivative_isInvertible x hy + have ht := TangentBundle.continuousLinearMapAt_trivializationAt (I := ModelWithCorners X) hy + change (trivializationAt (Model X) (Tangent X) x).continuousLinearMapAt ℂ y=D at ht + have hp := S.coordinateProjector_fixed x hy (D.inverse v) + rw [ht,hD.self_apply_inverse] at hp + rw [S.mem_first_iff] + constructor + · rintro ⟨w,hw⟩ + change S.coordinateProjector x ((chartAt (Model X) x) y) w=v at hw + have hf : S.coordinateProjector x ((chartAt (Model X) x) y) v=v := by + rw [← hw,S.coordinateProjector_idempotent x ((chartAt (Model X) x).map_source hy)] + apply hD.injective + change D (S.projector y (D.inverse v))=D (D.inverse v) + rw [← hp,hf,hD.self_apply_inverse] + · intro hf + change S.projector y (D.inverse v)=D.inverse v at hf + refine ⟨v,?_⟩ + change S.coordinateProjector x ((chartAt (Model X) x) y) v=v + rw [hp,hf,hD.self_apply_inverse] + + + +theorem coordinateProjector_involutive (hI : Integrable X S.first) + (x : X.Carrier) {z : Model X} (hz : z∈(chartAt (Model X) x).target) : + HolomorphicFrobenius.InvolutiveAt (S.coordinateProjector x) z := by + intro V W hV hW hPV hPW + obtain ⟨O,hOsub,hO,hzO⟩ := mem_nhds_iff.mp + (hV.eventually_analyticAt.and (hW.eventually_analyticAt.and (hPV.and hPW))) + let c := chartAt (Model X) x + let U := c.source∩c ⁻¹' O + have hU : IsOpen U := c.isOpen_inter_preimage hO + let V' := VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) c V + let W' := VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) c W + have hv' : HolomorphicSectionOn X V' U := by + intro y hy + exact (chartPullback_holomorphicAt x hy.1 (hOsub hy.2).1).contMDiffWithinAt + have hw' : HolomorphicSectionOn X W' U := by + intro y hy + exact (chartPullback_holomorphicAt x hy.1 (hOsub hy.2).2.1).contMDiffWithinAt + have hpv' : ∀y∈U, V' y∈S.first y := by + intro y hy + exact (S.coordinateProjector_range_iff x hy.1 _).mp (hOsub hy.2).2.2.1 + have hpw' : ∀y∈U, W' y∈S.first y := by + intro y hy + exact (S.coordinateProjector_range_iff x hy.1 _).mp (hOsub hy.2).2.2.2 + filter_upwards [hO.mem_nhds hzO,c.open_target.mem_nhds hz] with a ha hat + have hay : c (c.symm a)=a := c.right_inv hat + have hy : c.symm a∈c.source := c.map_target hat + have hyU : c.symm a∈U := ⟨hy,by change c (c.symm a)∈O; rwa [hay]⟩ + have hb := hI U hU V' W' hv' hw' hpv' hpw' (c.symm a) hyU + rw [VectorField.mlieBracketWithin_of_isOpen hU hyU] at hb + have hVa : AnalyticAt ℂ V (c (c.symm a)) := hay.symm ▸ (hOsub ha).1 + have hWa : AnalyticAt ℂ W (c (c.symm a)) := hay.symm ▸ (hOsub ha).2.1 + have he := chartPullback_bracket x hy hVa hWa + change VectorField.mlieBracket (ModelWithCorners X) V' W' (c.symm a)=_ at he + rw [he] at hb + have hh := (S.coordinateProjector_range_iff x hy _).mpr hb + simpa only [show (chartAt (Model X) x) (c.symm a)=a from hay] using hh + + + +lemma coordinateProjector_swap (x : X.Carrier) {z : Model X} + (hz : z∈(chartAt (Model X) x).target) : + S.swap.coordinateProjector x z=ContinuousLinearMap.id ℂ (Model X)-S.coordinateProjector x z := by + let t := trivializationAt (Model X) (Tangent X) x + have hy : (chartAt (Model X) x).symm z∈t.baseSet := (chartAt (Model X) x).map_target hz + apply ContinuousLinearMap.ext + intro v + change t.continuousLinearMapAt ℂ _ (S.swap.projector _ (t.symmL ℂ _ v))= + v-t.continuousLinearMapAt ℂ _ (S.projector _ (t.symmL ℂ _ v)) + change t.continuousLinearMapAt ℂ _ (t.symmL ℂ _ v-S.projector _ (t.symmL ℂ _ v))=_ + rw [map_sub,t.continuousLinearMapAt_symmL hy] + +end TangentSplitting +end SplitTangent + +namespace HolomorphicFrobenius +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] +lemma InvolutiveAt.congr {P Q : E → E →L[ℂ] E} {x : E} + (hP : InvolutiveAt P x) (hPQ : P=ᶠ[𝓝 x] Q) : InvolutiveAt Q x := by + intro V W hV hW hVm hWm + have hVm' : ∀ᶠ a in 𝓝 x, V a∈LinearMap.range (P a).toLinearMap := by + filter_upwards [hPQ,hVm] with a ha hv + rwa [ha] + have hWm' : ∀ᶠ a in 𝓝 x, W a∈LinearMap.range (P a).toLinearMap := by + filter_upwards [hPQ,hWm] with a ha hw + rwa [ha] + filter_upwards [hPQ,hP V W hV hW hVm' hWm'] with a ha hb + rwa [← ha] +end HolomorphicFrobenius + +universe v w + + + + + +open Set Filter Topology + + + + + +section +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + +namespace SplitTangent + +attribute [instance] ComplexManifold.topology ComplexManifold.charts + ComplexManifold.holomorphicAtlas ComplexManifold.hausdorff + ComplexManifold.secondCountable + +open Filter Topology +namespace TangentSplitting +variable {X : ComplexManifold.{u}} (S : TangentSplitting X) + +theorem bracketTensor_eq_zero_of_integrable_firstAlternative (hI : Integrable X S.first) : + ∀ x, S.bracketTensor x = 0 := by + intro x + ext v w + let V := FiberBundle.extend (Model X) v + let W := FiberBundle.extend (Model X) w + obtain ⟨U, hUn, hVU⟩ := FiberBundle.exists_contMDiffOn_extend + (k := ω) (ModelWithCorners X) (Model X) v + obtain ⟨U', hUn', hWU'⟩ := FiberBundle.exists_contMDiffOn_extend + (k := ω) (ModelWithCorners X) (Model X) w + obtain ⟨O, hOsub, hO, hxO⟩ := _root_.mem_nhds_iff.mp (Filter.inter_mem hUn hUn') + have hV : HolomorphicSectionOn X V O := hVU.mono (fun y hy => (hOsub hy).1) + have hW : HolomorphicSectionOn X W O := hWU'.mono (fun y hy => (hOsub hy).2) + have hmem := hI O hO (S.projectField V) (S.projectField W) + (S.holomorphicSectionOn_projectField hV) (S.holomorphicSectionOn_projectField hW) + (fun y _ => ⟨V y,rfl⟩) (fun y _ => ⟨W y,rfl⟩) x hxO + rw [S.mem_first_iff_complement_eq_zero, + VectorField.mlieBracketWithin_of_isOpen hO hxO] at hmem + have he := S.bracketTensor_apply + ((hV x hxO).contMDiffAt (hO.mem_nhds hxO) |>.mdifferentiableAt (by simp)) + ((hW x hxO).contMDiffAt (hO.mem_nhds hxO) |>.mdifferentiableAt (by simp)) + simpa [V, W, bracketOperation, hmem] using he + +end TangentSplitting + +end SplitTangent + +open scoped Topology +open Filter + +end + +open Filter Topology Set +open scoped ContDiff + +open Filter Topology Set + +open scoped Manifold LinearAlgebra.Projectivization +open Bundle + +open Filter Topology + + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle + + + +open scoped Manifold ContDiff LinearAlgebra.Projectivization +open Set Bundle Filter Topology +namespace SplitTangent + + + +namespace FormalCauchy + +variable {V : Type*} [AddCommGroup V] [Module ℂ V] + +instance (U : Set ℂ) : CoeFun (AnalyticFunction U) (fun _ => ℂ → ℂ) := ⟨Subtype.val⟩ + +open scoped MvPowerSeries.WithPiTopology + +end FormalCauchy +end SplitTangent + +open Set Filter Topology + +open Filter Topology + +section FiniteBaseImport +open Polynomial +namespace SplitTangent.RationalSurface + +local instance tensorVanishingDecidableEqRatFunc : DecidableEq K := Classical.decEq K + +variable {ι : Type*} [Fintype ι] + +end SplitTangent.RationalSurface + +end FiniteBaseImport + +open Filter Topology + +namespace SplitTangent.ProjectiveEmbedding +section +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) + +theorem cone_local_equationsAlternative [CompactSpace X.Carrier] {v : Fin (e.N+1) → ℂ} + (hv : v ≠ 0) (hvX : ∃ x, e.Incidence x v) : + ∃ D : (Fin (e.N+1) → ℂ) → (Fin (e.N+1) → ℂ), AnalyticAt ℂ D v ∧ + ∀ᶠ w in 𝓝 v, (∃ x, e.Incidence x w) ↔ D w = 0 := by + obtain ⟨x,hx⟩ := hvX + obtain ⟨i,hi⟩ := Function.ne_iff.mp (e.map x).rep_nonzero + change (e.map x).rep i ≠ 0 at hi + have hvi : v i ≠ 0 := by + intro hz + apply hv + ext j + rw [(e.incidence_iff_coordinates hi).mp hx j,hz,zero_mul] + rfl + let c := chartAt (Model X) x + let H := e.withinChart i x + let n := e.normalize i + have hcx : x ∈ c.source := mem_chart_source (Model X) x + have hn : n v = H (c x) := by + rw [e.incidence_iff_normalize hi hvi] at hx + simpa [H,withinChart,c] using hx + have hH : AnalyticAt ℂ H (c x) := e.withinChart_analytic i x hcx hi + obtain ⟨r,hr,hr0,hri⟩ := AnalyticRetraction.exists_left_inverse hH + (e.withinChart_immersion i x hcx hi) + have hrn : AnalyticAt ℂ (r ∘ n) v := (hn ▸ hr).comp (e.normalize_analytic hvi) + have hrn0 : r (n v) = c x := hn ▸ hr0 + have heq : ∀ᶠ y in 𝓝 x, y ∈ c.source ∧ (e.map y).rep i ≠ 0 ∧ + r (projectiveCoordinates i (e.map y)) = c y := by + have hri' := (c.continuousAt hcx).eventually hri + filter_upwards [c.open_source.mem_nhds hcx,(e.open_patch i).mem_nhds hi,hri'] with y hy hiy hry + refine ⟨hy,hiy,?_⟩ + change r (projectiveCoordinates i (e.map (c.symm (c y)))) = c y at hry + rwa [c.left_inv hy] at hry + obtain ⟨U,hUsub,hU,hxU⟩ := _root_.mem_nhds_iff.mp heq + have hloc := e.incidence_localizes hv hx hU hxU + have hH' : AnalyticAt ℂ H ((r ∘ n) v) := by simpa only [Function.comp_apply,hrn0] using hH + have hR : AnalyticAt ℂ (fun w => H (r (n w))) v := hH'.comp hrn + let D := fun w => H (r (n w)) - n w + refine ⟨D,hR.sub (e.normalize_analytic hvi),?_⟩ + have hc : ContinuousAt (fun w => c.symm (r (n w))) v := by + apply (c.continuousAt_symm (c.map_source hcx)).comp_of_eq hrn.continuousAt + exact hrn0 + have hx0 : c.symm (r (n v)) = x := by rw [hrn0,c.left_inv hcx] + have hp : ∀ᶠ w in 𝓝 v, (e.map (c.symm (r (n w)))).rep i ≠ 0 := + hc.eventually (hx0 ▸ (e.open_patch i).mem_nhds hi) + have hni : ∀ᶠ w in 𝓝 v, w i ≠ 0 := (continuous_apply i).continuousAt.eventually_ne hvi + filter_upwards [hloc,hp,hni] with w hw hpw hiw + change (∃ y, e.Incidence y w) ↔ H (r (n w)) - n w = 0 + rw [sub_eq_zero] + constructor + · rintro ⟨y,hy⟩ + obtain ⟨hcy,hiy,hry⟩ := hUsub (hw y hy) + have hnw : n w = projectiveCoordinates i (e.map y) := + (e.incidence_iff_normalize hiy hiw).mp hy + rw [hnw,hry] + exact congrArg (projectiveCoordinates i ∘ e.map) (c.left_inv hcy) + · intro h + refine ⟨c.symm (r (n w)),(e.incidence_iff_normalize hpw hiw).mpr ?_⟩ + exact h.symm + +end + +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + +theorem exists_local_liftAlternative [CompactSpace X.Carrier] {x : X.Carrier} + {v : Fin (e.N+1) → ℂ} (hv : v ≠ 0) (hx : e.Incidence x v) : + ∃ L : (Fin (e.N+1) → ℂ) → X.Carrier, + ContMDiffAt 𝓘(ℂ,Fin (e.N+1) → ℂ) (ModelWithCorners X) ω L v ∧ + ∀ᶠ w in 𝓝 v, ∀ y, e.Incidence y w → L w = y := by + obtain ⟨i,hi⟩ := Function.ne_iff.mp (e.map x).rep_nonzero + change (e.map x).rep i ≠ 0 at hi + have hvi : v i ≠ 0 := by + intro hz + apply hv + ext j + rw [(e.incidence_iff_coordinates hi).mp hx j,hz,zero_mul] + rfl + let c := chartAt (Model X) x + let H := e.withinChart i x + let n := e.normalize i + have hcx : x ∈ c.source := mem_chart_source (Model X) x + have hn : n v = H (c x) := by + rw [e.incidence_iff_normalize hi hvi] at hx + simpa [H,withinChart,c] using hx + have hH : AnalyticAt ℂ H (c x) := e.withinChart_analytic i x hcx hi + obtain ⟨r,hr,hr0,hri⟩ := AnalyticRetraction.exists_left_inverse hH + (e.withinChart_immersion i x hcx hi) + have hrn : AnalyticAt ℂ (r ∘ n) v := (hn ▸ hr).comp (e.normalize_analytic hvi) + have hrn0 : r (n v) = c x := hn ▸ hr0 + have heq : ∀ᶠ y in 𝓝 x, y ∈ c.source ∧ (e.map y).rep i ≠ 0 ∧ + r (projectiveCoordinates i (e.map y)) = c y := by + have hri' := (c.continuousAt hcx).eventually hri + filter_upwards [c.open_source.mem_nhds hcx,(e.open_patch i).mem_nhds hi,hri'] with y hy hiy hry + refine ⟨hy,hiy,?_⟩ + change r (projectiveCoordinates i (e.map (c.symm (c y)))) = c y at hry + rwa [c.left_inv hy] at hry + obtain ⟨U,hUsub,hU,hxU⟩ := _root_.mem_nhds_iff.mp heq + have hloc := e.incidence_localizes hv hx hU hxU + refine ⟨c.symm ∘ (r ∘ n),?_,?_⟩ + · have hc := contMDiffAt_symm_of_mem_maximalAtlas + (IsManifold.chart_mem_maximalAtlas (I := ModelWithCorners X) (n := ω) x) + (c.map_source hcx) + exact hc.comp_of_eq hrn.contDiffAt.contMDiffAt hrn0 + · have hni : ∀ᶠ w in 𝓝 v, w i ≠ 0 := (continuous_apply i).continuousAt.eventually_ne hvi + filter_upwards [hloc,hni] with w hw hiw y hy + obtain ⟨hcy,hiy,hry⟩ := hUsub (hw y hy) + have hnw : n w = projectiveCoordinates i (e.map y) := + (e.incidence_iff_normalize hiy hiw).mp hy + dsimp only [Function.comp_apply] + rw [hnw,hry,c.left_inv hcy] + +end SplitTangent.ProjectiveEmbedding + +open Filter Topology Metric Set + + + +open MvPowerSeries + +open Filter Topology Set Metric + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff + + + +open Set Filter Topology +open scoped ContDiff ENNReal + + + +open Set Filter Topology +open scoped ContDiff ENNReal + + + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold + + + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold + + + + + +open Set Filter Topology +open scoped ContDiff ENNReal + +namespace HolomorphicFlow +variable {K E F : Type*} [TopologicalSpace K] [CompactSpace K] + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + + +def pointwiseMultilinear {n : ℕ} (p : ContinuousMultilinearMap ℂ (fun _ : Fin n => E) F) : + MultilinearMap ℂ (fun _ : Fin n => C(K,E)) C(K,F) where + toFun v := ⟨fun s => p (fun i => v i s), + p.cont.comp (continuous_pi fun i => (v i).continuous)⟩ + map_update_add' v i a b := by + ext s + have he (w : C(K,E)) : (fun j => Function.update v i w j s) = + Function.update (fun j => v j s) i (w s) := by + funext j; by_cases h : j=i <;> simp [h] + simpa only [ContinuousMap.coe_mk, ContinuousMap.add_apply, he] using + p.map_update_add (fun j => v j s) i (a s) (b s) + map_update_smul' v i a b := by + ext s + have he (w : C(K,E)) : (fun j => Function.update v i w j s) = + Function.update (fun j => v j s) i (w s) := by + funext j; by_cases h : j=i <;> simp [h] + simpa only [ContinuousMap.coe_mk, ContinuousMap.smul_apply, he] using + p.map_update_smul (fun j => v j s) i a (b s) + +lemma pointwiseMultilinear_bound {n : ℕ} + (p : ContinuousMultilinearMap ℂ (fun _ : Fin n => E) F) + (v : Fin n → C(K,E)) : + ‖pointwiseMultilinear p v‖ ≤ ‖p‖ * ∏i, ‖v i‖ := by + apply (ContinuousMap.norm_le _ (by positivity)).mpr + intro s + change ‖p (fun i => v i s)‖ ≤ _ + exact p.le_opNorm _ |>.trans (mul_le_mul_of_nonneg_left + (Finset.prod_le_prod₀ (fun _ _ => norm_nonneg _) (fun i _ => (v i).norm_coe_le_norm s)) + (norm_nonneg p)) + +def pointwiseCoefficient {n : ℕ} + (p : ContinuousMultilinearMap ℂ (fun _ : Fin n => E) F) : + ContinuousMultilinearMap ℂ (fun _ : Fin n => C(K,E)) C(K,F) := + (pointwiseMultilinear (K := K) p).mkContinuous ‖p‖ (pointwiseMultilinear_bound (K := K) p) + +@[simp] theorem pointwiseCoefficient_apply {n : ℕ} + (p : ContinuousMultilinearMap ℂ (fun _ : Fin n => E) F) + (v : Fin n → C(K,E)) (s : K) : pointwiseCoefficient p v s = p (fun i => v i s) := rfl + +lemma pointwiseCoefficient_norm {n : ℕ} + (p : ContinuousMultilinearMap ℂ (fun _ : Fin n => E) F) : + ‖pointwiseCoefficient (K := K) p‖ ≤ ‖p‖ := + (pointwiseMultilinear (K := K) p).mkContinuous_norm_le (norm_nonneg p) (pointwiseMultilinear_bound (K := K) p) + +def pointwiseSeries (p : FormalMultilinearSeries ℂ E F) : + FormalMultilinearSeries ℂ C(K,E) C(K,F) := fun n => pointwiseCoefficient (p n) + +lemma pointwiseSeries_radius (p : FormalMultilinearSeries ℂ E F) : + p.radius ≤ (pointwiseSeries (K := K) p).radius := by + apply iSup_le + intro r + apply iSup_le + intro C + apply iSup_le + intro h + apply FormalMultilinearSeries.le_radius_of_bound _ C + intro n + exact (mul_le_mul_of_nonneg_right (pointwiseCoefficient_norm (K := K) (p n)) + (by positivity)).trans (h n) + +variable [CompleteSpace F] + +lemma pointwiseSeries_sum {p : FormalMultilinearSeries ℂ E F} {v : C(K,E)} + (hv : v ∈ Metric.eball 0 p.radius) (s : K) : + (pointwiseSeries p).sum v s = p.sum (v s) := by + have hv' : v ∈ Metric.eball 0 (pointwiseSeries (K := K) p).radius := + Metric.eball_subset_eball (pointwiseSeries_radius p) hv + have h := ((pointwiseSeries (K := K) p).hasSum hv').mapL (ContinuousMap.evalCLM ℂ s) + simpa only [ContinuousMap.evalCLM_apply, pointwiseSeries, pointwiseCoefficient_apply, + FormalMultilinearSeries.sum] using h.tsum_eq.symm + + + +theorem exists_analytic_path_map {f : E → F} {x₀ : E} (hf : AnalyticAt ℂ f x₀) : + ∃ N : C(K,E) → C(K,F), AnalyticAt ℂ N 0 ∧ + ∀ᶠ v in 𝓝 0, ∀ s, N v s = f (x₀ + v s) := by + obtain ⟨p,r,hp⟩ := hf + let N := (pointwiseSeries (K := K) p).sum + have hr : 0 < (pointwiseSeries (K := K) p).radius := + hp.r_pos.trans_le (hp.r_le.trans (pointwiseSeries_radius (K := K) p)) + refine ⟨N,((pointwiseSeries (K := K) p).hasFPowerSeriesOnBall hr).analyticAt,?_⟩ + filter_upwards [Metric.eball_mem_nhds (0 : C(K,E)) hp.r_pos] with v hv + intro s + have hvs : v s ∈ Metric.eball 0 r := by + simp only [Metric.mem_eball, edist_zero_right] at hv ⊢ + have hn : ‖v s‖₊ ≤ ‖v‖₊ := v.norm_coe_le_norm s + have hn' : (‖v s‖₊ : ℝ≥0∞) ≤ (‖v‖₊ : ℝ≥0∞) := ENNReal.coe_le_coe.mpr hn + exact lt_of_le_of_lt hn' hv + exact (pointwiseSeries_sum (K := K) (p := p) (Metric.eball_subset_eball hp.r_le hv) s).trans + (hp.sum hvs).symm + +end HolomorphicFlow + + + +open Set Filter Topology MeasureTheory +open scoped ContDiff +namespace HolomorphicFlow +abbrev Time := Set.Icc (0 : ℝ) 1 +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + +def constantPath : E →L[ℂ] C(Time,E) where + toFun x := ContinuousMap.const Time x + map_add' x y := by ext; rfl + map_smul' a x := by ext; rfl + cont := ContinuousMap.continuous_const' + +omit [CompleteSpace E] in +@[simp] lemma constantPath_apply (x : E) (s : Time) : constantPath x s = x := rfl + + +def extendPath (u : C(Time,E)) : ℝ → E := fun s => u (projIcc 0 1 (by norm_num) s) + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma extendPath_continuous (u : C(Time,E)) : Continuous (extendPath u) := + u.continuous.comp continuous_projIcc + +omit [NormedSpace ℂ E] [CompleteSpace E] in +@[simp] lemma extendPath_val (u : C(Time,E)) (s : Time) : extendPath u s = u s := by + simp [extendPath] + + +def volterraPath (u : C(Time,E)) : C(Time,E) where + toFun s := ∫ t in (0 : ℝ)..s.1, extendPath u t + continuous_toFun := by + have hc : Continuous (fun s : ℝ => ∫t in (0 : ℝ)..s, extendPath u t) := + continuous_iff_continuousAt.mpr fun s => + (intervalIntegral.integral_hasDerivAt_right + ((extendPath_continuous u).intervalIntegrable 0 s) + (extendPath_continuous u).stronglyMeasurable.stronglyMeasurableAtFilter + (extendPath_continuous u).continuousAt).continuousAt + exact hc.comp continuous_subtype_val + +lemma volterraPath_bound (u : C(Time,E)) : ‖volterraPath u‖ ≤ ‖u‖ := by + apply (ContinuousMap.norm_le _ (norm_nonneg u)).mpr + intro s + change ‖∫t in (0 : ℝ)..s.1, extendPath u t‖ ≤ ‖u‖ + calc + _ ≤ ‖u‖ * |s.1 - 0| := intervalIntegral.norm_integral_le_of_norm_le_const + (fun t _ => u.norm_coe_le_norm (projIcc 0 1 (by norm_num) t)) + _ ≤ ‖u‖ := by + rw [sub_zero,abs_of_nonneg s.property.1] + exact mul_le_of_le_one_right (norm_nonneg u) s.property.2 + +def volterraLinear : C(Time,E) →ₗ[ℂ] C(Time,E) where + toFun := volterraPath + map_add' u v := by + ext s + change (∫t in (0 : ℝ)..s.1, extendPath (u+v) t) = _ + simpa only [extendPath, ContinuousMap.add_apply, volterraPath, ContinuousMap.coe_mk] + using intervalIntegral.integral_add + ((extendPath_continuous u).intervalIntegrable 0 s.1) + ((extendPath_continuous v).intervalIntegrable 0 s.1) + map_smul' a u := by + ext s + change (∫t in (0 : ℝ)..s.1, extendPath (a • u) t) = _ + simpa only [extendPath, ContinuousMap.smul_apply, volterraPath, ContinuousMap.coe_mk, RingHom.id_apply] + using intervalIntegral.integral_smul a (extendPath u) + + + +def volterra : C(Time,E) →L[ℂ] C(Time,E) := + (volterraLinear (E := E)).mkContinuous 1 (by intro u; simpa only [one_mul, volterraLinear, LinearMap.coe_mk, AddHom.coe_mk] using volterraPath_bound u) + +@[simp] lemma volterra_apply (u : C(Time,E)) (s : Time) : + volterra u s = ∫t in (0 : ℝ)..s.1, extendPath u t := rfl + +@[simp] lemma volterra_zero (u : C(Time,E)) : volterra u ⟨0, by constructor <;> norm_num⟩ = 0 := by + simp + +lemma volterra_hasDerivAt (u : C(Time,E)) (s : ℝ) : + HasDerivAt (fun r => ∫t in (0 : ℝ)..r, extendPath u t) (extendPath u s) s := by + exact intervalIntegral.integral_hasDerivAt_right + ((extendPath_continuous u).intervalIntegrable 0 s) + (extendPath_continuous u).stronglyMeasurable.stronglyMeasurableAtFilter + (extendPath_continuous u).continuousAt + +end HolomorphicFlow + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFlow +variable {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + + + +theorem analytic_implicit_of_snd {H : A × B → B} (hH : AnalyticAt ℂ H 0) + (hzero : H 0=0) (hder : fderiv ℂ H 0 = ContinuousLinearMap.snd ℂ A B) : + ∃ g : A → B, AnalyticAt ℂ g 0 ∧ g 0=0 ∧ + (∀ᶠ a in 𝓝 0, H (a,g a)=0) ∧ + (∀ᶠ z : A × B in 𝓝 0, H z=0 ↔ g z.1=z.2) := by + let φ : ImplicitFunctionData ℂ (A × B) B A := + { leftFun := H + leftDeriv := ContinuousLinearMap.snd ℂ A B + rightFun := Prod.fst + rightDeriv := ContinuousLinearMap.fst ℂ A B + pt := 0 + hasStrictFDerivAt_leftFun := by + rw [← hder] + exact (hH.contDiffAt (n := ω)).hasStrictFDerivAt (by simp) + hasStrictFDerivAt_rightFun := hasStrictFDerivAt_fst + range_leftDeriv := LinearMap.range_eq_top.mpr (fun b => ⟨(0,b),rfl⟩) + range_rightDeriv := LinearMap.range_eq_top.mpr (fun a => ⟨(a,0),rfl⟩) + isCompl_ker := by + change IsCompl (LinearMap.ker (LinearMap.snd ℂ A B)) + (LinearMap.ker (LinearMap.fst ℂ A B)) + rw [LinearMap.ker_snd,LinearMap.ker_fst] + exact LinearMap.isCompl_range_inl_inr } + have hbase : φ.prodFun φ.pt = (0,0) := by + simp [φ,ImplicitFunctionData.prodFun,hzero] + have hana : AnalyticAt ℂ φ.implicitFunction.uncurry (0,0) := by + rw [← hbase] + exact (φ.contDiffAt_implicitFunction hH.contDiffAt contDiffAt_fst (by simp)).analyticAt + let F : A → A × B := fun a => φ.implicitFunction 0 a + let g : A → B := fun a => (F a).2 + have hF : AnalyticAt ℂ F 0 := + hana.comp (analyticAt_const.prod analyticAt_id) + have hval : F 0=0 := by + have hh := mem_of_mem_nhds φ.implicitFunction_apply_image + simpa [φ,hzero,F] using hh + have hgood : ∀ᶠ a in 𝓝 (0 : A), H (F a)=0 ∧ (F a).1=a := by + have he := φ.prodFun_implicitFunction + rw [hbase] at he + have ht : Tendsto (fun a : A => ((0 : B),a)) (𝓝 0) (𝓝 (0,0)) := (continuous_const.prodMk continuous_id).continuousAt + filter_upwards [ht.eventually he] with a ha + exact ⟨congrArg Prod.fst ha,congrArg Prod.snd ha⟩ + refine ⟨g,analyticAt_snd.comp hF,congrArg Prod.snd hval,?_,?_⟩ + · filter_upwards [hgood] with a ha + have he : (a,g a)=F a := Prod.ext ha.2.symm rfl + rw [he] + exact ha.1 + · have ht : Tendsto (Prod.fst : A × B → A) (𝓝 0) (𝓝 0) := continuous_fst.continuousAt + filter_upwards [φ.leftFun_eq_iff_implicitFunction,ht.eventually hgood] with z hz hg + have hz' : H z=0 ↔ F z.1=z := by + change H z=H 0 ↔ φ.implicitFunction (H 0) z.1=z at hz + rwa [hzero] at hz + constructor + · intro hh + exact congrArg Prod.snd (hz'.mp hh) + · intro hh + apply hz'.mpr + exact Prod.ext hg.2 hh + +end HolomorphicFlow + + + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFlow +variable {E B : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + + + +theorem analytic_integral_equation_unique (C : E →L[ℂ] B) {Φ : B → B} + (hΦ : AnalyticAt ℂ Φ 0) : + ∃ u : ℂ × E → B, AnalyticAt ℂ u 0 ∧ u 0=0 ∧ + (∀ᶠ a in 𝓝 0, u a = C a.2 + a.1 • Φ (u a)) ∧ + (∀ᶠ z : (ℂ × E) × B in 𝓝 0, + z.2 = C z.1.2 + z.1.1 • Φ z.2 ↔ u z.1=z.2) := by + let Q := Φ 0 + let L : (ℂ × E) × B → B := fun z => C z.1.2 + z.1.1 • Q + z.2 + have hL : AnalyticAt ℂ L 0 := + (((C.analyticAt _).comp (analyticAt_snd.comp analyticAt_fst)).add + ((analyticAt_fst.comp analyticAt_fst).smul analyticAt_const)).add analyticAt_snd + have hL0 : L 0=0 := by simp [L] + let R : (ℂ × E) × B → B := fun z => Φ (L z)-Q + have hR : AnalyticAt ℂ R 0 := by + have hΦL : AnalyticAt ℂ Φ (L 0) := hL0.symm ▸ hΦ + exact (hΦL.comp hL).sub analyticAt_const + have hR0 : R 0=0 := by simp [R,hL0,Q] + let H : (ℂ × E) × B → B := fun z => z.2-z.1.1 • R z + have hH : AnalyticAt ℂ H 0 := + analyticAt_snd.sub ((analyticAt_fst.comp analyticAt_fst).smul hR) + have hH0 : H 0=0 := by simp [H] + have hd : fderiv ℂ H 0 = ContinuousLinearMap.snd ℂ (ℂ × E) B := by + have ht : HasFDerivAt (fun z : (ℂ × E) × B => z.1.1) + ((ContinuousLinearMap.fst ℂ ℂ E).comp (ContinuousLinearMap.fst ℂ (ℂ × E) B)) 0 := + hasFDerivAt_fst.comp _ hasFDerivAt_fst + have hh := hasFDerivAt_snd.sub (ht.smul hR.differentiableAt.hasFDerivAt) + simpa only [hR0, Prod.fst_zero, zero_smul, Pi.smul_def', Pi.sub_def, H, + ContinuousLinearMap.smulRight_zero, add_zero, sub_zero] using hh.fderiv + obtain ⟨w,hw,hw0,he,huniq⟩ := analytic_implicit_of_snd hH hH0 hd + let u : ℂ × E → B := fun a => C a.2 + a.1 • Q + w a + have hu : AnalyticAt ℂ u 0 := + (((C.analyticAt _).comp analyticAt_snd).add (analyticAt_fst.smul analyticAt_const)).add hw + refine ⟨u,hu,by simp [u,hw0],?_,?_⟩ + · filter_upwards [he] with a ha + change w a-a.1 • (Φ (u a)-Q)=0 at ha + have ha' : w a = a.1 • Φ (u a)-a.1 • Q := by + rw [← smul_sub] + exact sub_eq_zero.mp ha + calc + u a = C a.2 + a.1 • Q + w a := rfl + _ = C a.2 + a.1 • Φ (u a) := by rw [ha']; abel + · let G : (ℂ × E) × B → (ℂ × E) × B := + fun z => (z.1,z.2-(C z.1.2+z.1.1 • Q)) + have hG : Continuous G := by dsimp [G]; fun_prop + have hG0 : G 0=0 := by simp [G] + have ht : Tendsto G (𝓝 0) (𝓝 0) := by + have hh : Tendsto G (𝓝 0) (𝓝 (G 0)) := hG.continuousAt + simpa only [hG0] using hh + filter_upwards [ht.eventually huniq] with z hz + have hLG : L (G z)=z.2 := by dsimp [L,G]; abel + have hHG : H (G z)=z.2-(C z.1.2+z.1.1 • Φ z.2) := by + dsimp only [H,R] + rw [hLG] + dsimp only [G] + rw [smul_sub] + abel + have heq : H (G z)=0 ↔ z.2=C z.1.2+z.1.1 • Φ z.2 := by + rw [hHG,sub_eq_zero] + have heq' : w (G z).1=(G z).2 ↔ u z.1=z.2 := by + change w z.1=z.2-(C z.1.2+z.1.1 • Q) ↔ + (C z.1.2+z.1.1 • Q)+w z.1=z.2 + rw [eq_sub_iff_add_eq,add_comm (w z.1)] + exact heq.symm.trans (hz.trans heq') + + +theorem analytic_integral_equation (C : E →L[ℂ] B) {Φ : B → B} + (hΦ : AnalyticAt ℂ Φ 0) : + ∃ u : ℂ × E → B, AnalyticAt ℂ u 0 ∧ u 0=0 ∧ + (∀ᶠ a in 𝓝 0, u a = C a.2 + a.1 • Φ (u a)) := by + obtain ⟨u,hu,hu0,he,_⟩ := analytic_integral_equation_unique C hΦ + exact ⟨u,hu,hu0,he⟩ + +end HolomorphicFlow + + + +open Set Filter Topology MeasureTheory +open scoped ContDiff +namespace HolomorphicFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + +def PathEquation (f : E → E) (x₀ : E) (a : ℂ × E) (v : C(Time,E)) : Prop := + ∀ s : Time, v s = a.2 + a.1 • ∫r in (0 : ℝ)..s.1, f (x₀ + extendPath v r) + +lemma pathEquation_iff {f : E → E} {x₀ : E} {a : ℂ × E} + {v Nv : C(Time,E)} (hNv : ∀s, Nv s=f (x₀+v s)) : + PathEquation f x₀ a v ↔ v=constantPath a.2+a.1 • volterra Nv := by + have he (r : ℝ) : extendPath Nv r=f (x₀+extendPath v r) := hNv _ + rw [ContinuousMap.ext_iff] + simp only [PathEquation,ContinuousMap.add_apply,constantPath_apply, + ContinuousMap.smul_apply,volterra_apply,he] + + + +theorem exists_analytic_paths {f : E → E} {x₀ : E} (hf : AnalyticAt ℂ f x₀) : + ∃ u : ℂ × E → C(Time,E), AnalyticAt ℂ u 0 ∧ u 0=0 ∧ + (∀ᶠ a in 𝓝 0, PathEquation f x₀ a (u a)) ∧ + (∀ᶠ z : (ℂ × E) × C(Time,E) in 𝓝 0, + PathEquation f x₀ z.1 z.2 ↔ u z.1=z.2) := by + obtain ⟨N,hN,hNa⟩ := exists_analytic_path_map (K := Time) hf + let Φ : C(Time,E) → C(Time,E) := fun v => volterra (N v) + have hΦ : AnalyticAt ℂ Φ 0 := ((volterra (E := E)).analyticAt (N 0)).comp hN + obtain ⟨u,hu,hu0,he,huniq⟩ := analytic_integral_equation_unique (constantPath (E := E)) hΦ + have ht : Tendsto u (𝓝 0) (𝓝 0) := hu0 ▸ hu.continuousAt + refine ⟨u,hu,hu0,?_,?_⟩ + · filter_upwards [he,ht.eventually hNa] with a ha hna + exact (pathEquation_iff hna).mpr ha + · have ht' : Tendsto (Prod.snd : (ℂ × E) × C(Time,E) → C(Time,E)) + (𝓝 0) (𝓝 0) := continuous_snd.continuousAt + filter_upwards [huniq,ht'.eventually hNa] with z hz hna + exact (pathEquation_iff hna).trans hz + + +omit [CompleteSpace E] in +lemma PathEquation.zero {f : E → E} {x₀ : E} {a : ℂ × E} {v : C(Time,E)} + (h : PathEquation f x₀ a v) : v ⟨0,by constructor <;> norm_num⟩=a.2 := by + simpa only [intervalIntegral.integral_same, smul_zero, add_zero] using + h ⟨0,by constructor <;> norm_num⟩ + + +omit [CompleteSpace E] in +lemma PathEquation.at_zero_time {f : E → E} {x₀ x : E} {v : C(Time,E)} + (h : PathEquation f x₀ (0,x) v) : v=constantPath x := by + ext s + simpa using h s + +end HolomorphicFlow + + + +open Set Filter Topology MeasureTheory +open scoped ContDiff +namespace HolomorphicFlow +variable {K E : Type*} [TopologicalSpace K] [CompactSpace K] + [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma eventually_pointwise {P : E → Prop} {x₀ : E} (hP : ∀ᶠ x in 𝓝 x₀, P x) : + ∀ᶠ v : C(K,E) in 𝓝 0, ∀s, P (x₀+v s) := by + obtain ⟨r,hr,hsub⟩ := Metric.mem_nhds_iff.mp hP + filter_upwards [Metric.ball_mem_nhds (0 : C(K,E)) hr] with v hv + intro s + apply hsub + simp only [Metric.mem_ball,dist_zero_right] at hv + simp only [Metric.mem_ball,dist_eq_norm,add_sub_cancel_left] + exact (v.norm_coe_le_norm s).trans_lt hv + +lemma eventually_continuous_integrand {f : E → E} {x₀ : E} (hf : AnalyticAt ℂ f x₀) : + ∀ᶠ v : C(Time,E) in 𝓝 0, Continuous (fun r : ℝ => f (x₀+extendPath v r)) := by + filter_upwards [eventually_pointwise hf.eventually_analyticAt] with v hv + apply continuous_iff_continuousAt.mpr + intro r + have hf' : ContinuousAt f (x₀+extendPath v r) := + (hv (projIcc 0 1 (by norm_num) r)).continuousAt + have hg : ContinuousAt (fun r : ℝ => x₀+extendPath v r) r := + (continuous_const.add (extendPath_continuous v)).continuousAt + exact hf'.tendsto.comp hg.tendsto + + +def realizedPath (f : E → E) (x₀ : E) (a : ℂ × E) (v : C(Time,E)) (r : ℝ) : E := + x₀+a.2+a.1 • ∫s in (0 : ℝ)..r, f (x₀+extendPath v s) + +omit [CompleteSpace E] in +lemma PathEquation.realized_eq {f : E → E} {x₀ : E} {a : ℂ × E} {v : C(Time,E)} + (h : PathEquation f x₀ a v) (s : Time) : realizedPath f x₀ a v s.1=x₀+v s := by + rw [h s] + exact add_assoc _ _ _ + +lemma realizedPath_hasDerivAt {f : E → E} {x₀ : E} {a : ℂ × E} {v : C(Time,E)} + (hc : Continuous (fun r : ℝ => f (x₀+extendPath v r))) (r : ℝ) : + HasDerivAt (realizedPath f x₀ a v) (a.1 • f (x₀+extendPath v r)) r := by + exact ((intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 r) + hc.stronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt).const_smul a.1).const_add _ + +end HolomorphicFlow + + + +open Set Filter Topology MeasureTheory +open scoped ContDiff +namespace HolomorphicFlow +section +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + +def scaleTime (c s : Time) : Time := ⟨c.1*s.1, + ⟨mul_nonneg c.property.1 s.property.1, + (mul_le_mul_of_nonneg_left s.property.2 c.property.1).trans + (by simpa using c.property.2)⟩⟩ + +def rescale (c : Time) (v : C(Time,E)) : C(Time,E) where + toFun s := v (scaleTime c s) + continuous_toFun := v.continuous.comp + ((continuous_const.mul continuous_subtype_val).subtype_mk _) + +omit [NormedSpace ℂ E] [CompleteSpace E] in +@[simp] lemma rescale_apply (c s : Time) (v : C(Time,E)) : + HolomorphicFlow.rescale c v s = v (scaleTime c s) := rfl + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma rescale_norm (c : Time) (v : C(Time,E)) : ‖HolomorphicFlow.rescale c v‖ ≤ ‖v‖ := + (ContinuousMap.norm_le _ (norm_nonneg v)).mpr fun _ => v.norm_coe_le_norm _ + +def scaleParameter (c : Time) (a : ℂ × E) : ℂ × E := (c.1 • a.1,a.2) + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma scaleParameter_norm (c : Time) (a : ℂ × E) : + ‖scaleParameter c a‖ ≤ ‖a‖ := by + simp only [scaleParameter,Prod.norm_def,norm_smul,Real.norm_of_nonneg c.property.1] + exact max_le_max (mul_le_of_le_one_left (norm_nonneg a.1) c.property.2) le_rfl + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma extendPath_rescale (c s : Time) (v : C(Time,E)) {r : ℝ} + (hr : r∈Icc 0 s.1) : extendPath (HolomorphicFlow.rescale c v) r=extendPath v (c.1*r) := by + have hr' : r∈Icc (0 : ℝ) 1 := ⟨hr.1,hr.2.trans s.property.2⟩ + have hcr : c.1*r∈Icc (0 : ℝ) 1 := (scaleTime c ⟨r,hr'⟩).property + simp only [extendPath,projIcc_of_mem _ hr',projIcc_of_mem _ hcr, + rescale_apply,scaleTime] + +omit [CompleteSpace E] in +lemma PathEquation.rescale {f : E → E} {x₀ : E} {a : ℂ × E} {v : C(Time,E)} + (h : PathEquation f x₀ a v) (c : Time) : + PathEquation f x₀ (scaleParameter c a) (HolomorphicFlow.rescale c v) := by + intro s + change v (scaleTime c s)=a.2+(c.1 • a.1) • _ + rw [h (scaleTime c s)] + change a.2+a.1 • (∫r in (0 : ℝ)..c.1*s.1, f (x₀+extendPath v r)) = _ + by_cases hc : c.1=0 + · simp [hc] + · have hi : (∫r in (0 : ℝ)..c.1*s.1, f (x₀+extendPath v r)) = + c.1 • (∫r in (0 : ℝ)..s.1, f (x₀+extendPath v (c.1*r))) := by + rw [intervalIntegral.integral_comp_mul_left (fun r => f (x₀+extendPath v r)) hc] + simp only [smul_smul,mul_inv_cancel₀ hc,one_smul,mul_zero] + rw [hi] + have hj : (∫r in (0 : ℝ)..s.1, f (x₀+extendPath v (c.1*r))) = + ∫r in (0 : ℝ)..s.1, f (x₀+extendPath (HolomorphicFlow.rescale c v) r) := by + apply intervalIntegral.integral_congr + intro r hr + rw [Set.uIcc_of_le s.property.1] at hr + exact congrArg (fun w : E => f (x₀+w)) (extendPath_rescale c s v hr).symm + rw [hj,smul_comm,smul_assoc] + +end + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + + +omit [CompleteSpace E] in +theorem eventually_rescale {f : E → E} {x₀ : E} {u : ℂ × E → C(Time,E)} + (hu : ContinuousAt u 0) (hu0 : u 0=0) + (he : ∀ᶠ a in 𝓝 0, PathEquation f x₀ a (u a)) + (huniq : ∀ᶠ z : (ℂ × E) × C(Time,E) in 𝓝 0, + PathEquation f x₀ z.1 z.2 ↔ u z.1=z.2) : + ∀ᶠ a in 𝓝 0, ∀c : Time, u (scaleParameter c a)=rescale c (u a) := by + obtain ⟨ε,hε,hsub⟩ := Metric.mem_nhds_iff.mp huniq + have ht : Tendsto u (𝓝 0) (𝓝 0) := by + have hh : Tendsto u (𝓝 0) (𝓝 (u 0)) := hu + simpa only [hu0] using hh + filter_upwards [Metric.ball_mem_nhds (0 : ℂ × E) hε, + ht.eventually (Metric.ball_mem_nhds (0 : C(Time,E)) hε),he] with a ha hua hea + intro c + have hz : (scaleParameter c a,rescale c (u a))∈Metric.ball 0 ε := by + simp only [Metric.mem_ball,dist_zero_right] at ha hua + simp only [Metric.mem_ball,dist_zero_right,Prod.norm_def] + exact max_lt ((scaleParameter_norm c a).trans_lt ha) ((rescale_norm c (u a)).trans_lt hua) + exact (hsub hz).mp (hea.rescale c) + +end HolomorphicFlow + + + +open Set Filter Topology MeasureTheory +open scoped ContDiff +namespace HolomorphicFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + +abbrev finalTime : Time := ⟨1, by constructor <;> norm_num⟩ + +def endpoint (x₀ : E) (u : ℂ × E → C(Time,E)) (a : ℂ × E) : E := + x₀+u a finalTime + +omit [CompleteSpace E] in +lemma endpoint_analytic {x₀ : E} {u : ℂ × E → C(Time,E)} + (hu : AnalyticAt ℂ u 0) : AnalyticAt ℂ (endpoint x₀ u) 0 := by + have hv : AnalyticAt ℂ (fun v : C(Time,E) => v finalTime) (u 0) := + (ContinuousMap.evalCLM ℂ finalTime).analyticAt (u 0) + exact analyticAt_const.add (hv.comp hu) + +lemma rescale_endpoint_derivative {f : E → E} {x₀ : E} + {u : ℂ × E → C(Time,E)} {a : ℂ × E} + (hA : AnalyticAt ℂ (endpoint x₀ u) a) + (he : PathEquation f x₀ a (u a)) + (hc : Continuous (fun r : ℝ => f (x₀+extendPath (u a) r))) + (hs : ∀c : Time, u (scaleParameter c a)=rescale c (u a)) : + fderiv ℂ (endpoint x₀ u) a (a.1,0)=a.1 • f (endpoint x₀ u a) := by + let c : ℝ → ℂ × E := fun r => (r • a.1,a.2) + have hca : c 1=a := by simp [c] + have hcd : HasDerivAt c (a.1,0) 1 := by + simpa only [one_smul,id_eq,c] using ((hasDerivAt_id (1 : ℝ)).smul_const a.1).prodMk + (hasDerivAt_const (1 : ℝ) a.2) + have hd : HasDerivAt ((endpoint x₀ u) ∘ c) + (fderiv ℂ (endpoint x₀ u) a (a.1,0)) (1 : ℝ) := by + have hdf : HasFDerivAt (endpoint x₀ u) + (fderiv ℂ (endpoint x₀ u) a) (c 1) := hca.symm ▸ hA.differentiableAt.hasFDerivAt + exact (hdf.restrictScalars ℝ).comp_hasDerivAt 1 hcd + have heq (r : ℝ) (hr : r∈Icc 0 1) : + ((endpoint x₀ u) ∘ c) r=realizedPath f x₀ a (u a) r := by + let s : Time := ⟨r,hr⟩ + have hd := he.realized_eq s + rw [hd] + change x₀+u (scaleParameter s a) finalTime=x₀+u a s + rw [hs s] + congr 1 + change u a (scaleTime s finalTime)=u a s + congr 1 + apply Subtype.ext + simp [scaleTime] + have hr := (realizedPath_hasDerivAt (a := a) hc 1).hasDerivWithinAt (s := Icc 0 1) + have hr' := hr.congr heq (heq 1 (by constructor <;> norm_num)) + have hud : UniqueDiffWithinAt ℝ (Icc (0 : ℝ) 1) 1 := + uniqueDiffOn_Icc (show (0 : ℝ)<1 by norm_num) 1 (by constructor <;> norm_num) + have hh := hd.hasDerivWithinAt.derivWithin hud + have hh' := hr'.derivWithin hud + have hend : extendPath (u a) (1 : ℝ)=u a finalTime := extendPath_val (u a) finalTime + exact hh.symm.trans (by simpa only [hend,endpoint] using hh') + +lemma rescale_endpoint_time_derivative {f : E → E} {x₀ : E} + {u : ℂ × E → C(Time,E)} {a : ℂ × E} + (hA : AnalyticAt ℂ (endpoint x₀ u) a) + (he : PathEquation f x₀ a (u a)) + (hc : Continuous (fun r : ℝ => f (x₀+extendPath (u a) r))) + (hs : ∀c : Time, u (scaleParameter c a)=rescale c (u a)) (ha : a.1≠0) : + fderiv ℂ (endpoint x₀ u) a (1,0)=f (endpoint x₀ u a) := by + apply smul_right_injective E ha + have hh := rescale_endpoint_derivative hA he hc hs + have hv : ((a.1,0) : ℂ × E)=a.1 • (1,0) := by simp + rwa [hv,map_smul] at hh + + +omit [NormedSpace ℂ E] [CompleteSpace E] in +lemma eq_of_nonzero_time {F G : ℂ × E → E} {a : ℂ × E} + (hF : ContinuousAt F a) (hG : ContinuousAt G a) + (he : ∀ᶠ b in 𝓝 a, b.1≠0 → F b=G b) : F a=G a := by + have hc : Tendsto (fun z : ℂ => (z,a.2)) (𝓝 a.1) (𝓝 a) := by + have hh : ContinuousAt (fun z : ℂ => (z,a.2)) a.1 := + (continuous_id.prodMk continuous_const).continuousAt + simpa only [Prod.mk.eta] using hh.tendsto + apply tendsto_nhds_unique_of_frequently_eq (hF.tendsto.comp hc) (hG.tendsto.comp hc) + have hfreq : ∃ᶠ z : ℂ in 𝓝 a.1, z≠0 := + mem_closure_iff_frequently.mp ((dense_compl_singleton (0 : ℂ)) a.1) + exact (hfreq.and_eventually (hc.eventually he)).mono fun z hz => hz.2 hz.1 + + + +theorem exists_analytic_flow {f : E → E} {x₀ : E} (hf : AnalyticAt ℂ f x₀) : + ∃ F : ℂ × E → E, AnalyticAt ℂ F 0 ∧ F 0=x₀ ∧ + (∀ᶠ x in 𝓝 (0 : E), F (0,x)=x₀+x) ∧ + (∀ᶠ a in 𝓝 0, HasDerivAt (fun t : ℂ => F (t,a.2)) (f (F a)) a.1) := by + obtain ⟨u,hu,hu0,he,huniq⟩ := exists_analytic_paths hf + let F := endpoint x₀ u + have hF : AnalyticAt ℂ F 0 := endpoint_analytic hu + have hF0 : F 0=x₀ := by simp [F,endpoint,hu0] + have ht : Tendsto u (𝓝 0) (𝓝 0) := by simpa only [hu0] using hu.continuousAt.tendsto + have hs := eventually_rescale hu.continuousAt hu0 he huniq + have hnonzero : ∀ᶠ a in 𝓝 0, a.1≠0 → fderiv ℂ F a (1,0)=f (F a) := by + filter_upwards [hF.eventually_analyticAt,he,hs, + ht.eventually (eventually_continuous_integrand hf)] with a ha hea hsa hca + exact rescale_endpoint_time_derivative ha hea hca hsa + have hfF : AnalyticAt ℂ (fun a => f (F a)) 0 := + (hF0.symm ▸ hf).comp hF + have hEval : AnalyticAt ℂ (fun L : (ℂ × E) →L[ℂ] E => L (1,0)) (fderiv ℂ F 0) := + (ContinuousLinearMap.apply ℂ E ((1,0) : ℂ × E)).analyticAt _ + have hD : AnalyticAt ℂ (fun a => fderiv ℂ F a (1,0)) 0 := hEval.comp hF.fderiv + have hderiv : ∀ᶠ a in 𝓝 0, fderiv ℂ F a (1,0)=f (F a) := by + filter_upwards [hD.eventually_analyticAt,hfF.eventually_analyticAt, + hnonzero.eventually_nhds] with a ha hb heq + exact eq_of_nonzero_time ha.continuousAt hb.continuousAt heq + refine ⟨F,hF,hF0,?_,?_⟩ + · have hz : Tendsto (fun x : E => ((0 : ℂ),x)) (𝓝 0) (𝓝 0) := + continuous_const.continuousAt.prodMk continuous_id.continuousAt + filter_upwards [hz.eventually he] with x hx + have hp := hx.at_zero_time + simp [F,endpoint,hp,constantPath_apply] + · filter_upwards [hF.eventually_analyticAt,hderiv] with a ha hd + have hc : HasDerivAt (fun t : ℂ => (t,a.2)) (1,0) a.1 := + (hasDerivAt_id a.1).prodMk (hasDerivAt_const a.1 a.2) + simpa only [Function.comp_def,Prod.mk.eta,hd] using + ha.differentiableAt.hasFDerivAt.comp_hasDerivAt a.1 hc + +end HolomorphicFlow + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + +def initialDerivative (v : E) : (ℂ × E) →L[ℂ] E := + (ContinuousLinearMap.fst ℂ ℂ E).smulRight v + ContinuousLinearMap.snd ℂ ℂ E + +omit [CompleteSpace E] in +@[simp] lemma initialDerivative_apply (v : E) (a : ℂ × E) : + initialDerivative v a=a.1 • v+a.2 := rfl + + + +omit [CompleteSpace E] in +lemma flow_initial_derivative {F : ℂ × E → E} {x₀ v : E} + (hF : AnalyticAt ℂ F 0) + (hi : ∀ᶠ x in 𝓝 (0 : E), F (0,x)=x₀+x) + (ht : HasDerivAt (fun t : ℂ => F (t,0)) v 0) : + HasFDerivAt F (initialDerivative v) 0 := by + let D := fderiv ℂ F 0 + have hd := hF.differentiableAt.hasFDerivAt + have htd : HasDerivAt (fun t : ℂ => F (t,0)) (D (1,0)) 0 := + hd.comp_hasDerivAt 0 ((hasDerivAt_id (0 : ℂ)).prodMk (hasDerivAt_const 0 (0 : E))) + have hDv : D (1,0)=v := htd.deriv.symm.trans ht.deriv + have hid : HasFDerivAt (fun x : E => F (0,x)) (ContinuousLinearMap.id ℂ E) 0 := + ((hasFDerivAt_id (0 : E)).const_add x₀).congr_of_eventuallyEq hi + have hdi : HasFDerivAt (fun x : E => F (0,x)) + (D.comp (ContinuousLinearMap.inr ℂ ℂ E)) 0 := + hd.comp 0 (ContinuousLinearMap.inr ℂ ℂ E).hasFDerivAt + have hDix (x : E) : D (0,x)=x := + congrArg (fun L : E →L[ℂ] E => L x) (hdi.unique hid) + have hdeq : D=initialDerivative v := by + apply ContinuousLinearMap.ext + intro a + have hp : a=a.1 • ((1,0) : ℂ × E)+(0,a.2) := by simp + rw [hp,map_add,map_smul,hDv,hDix] + simp + exact hdeq ▸ hd + + +def transverseParameters : (ℂ × E) →L[ℂ] (ℂ × (ℂ × E)) := + (ContinuousLinearMap.fst ℂ ℂ E).prod + ((0 : (ℂ × E) →L[ℂ] ℂ).prod (ContinuousLinearMap.snd ℂ ℂ E)) + +omit [CompleteSpace E] in +@[simp] lemma transverseParameters_apply (a : ℂ × E) : + transverseParameters a=(a.1,(0,a.2)) := rfl + + + +theorem exists_normalized_flow_box {f : ℂ × E → ℂ × E} + (hf : AnalyticAt ℂ f 0) (hf0 : f 0=(1,0)) : + ∃ Φ : OpenPartialHomeomorph (ℂ × E) (ℂ × E), + (0 : ℂ × E)∈Φ.source ∧ Φ 0=0 ∧ AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + (∀ᶠ a in 𝓝 0, fderiv ℂ Φ a (1,0)=f (Φ a)) := by + obtain ⟨F,hF,hF0,hi,ht⟩ := exists_analytic_flow hf + have ht0 : HasDerivAt (fun t : ℂ => F (t,0)) (1,0) 0 := by + have hh := ht.self_of_nhds + change HasDerivAt (fun t : ℂ => F (t,0)) (f (F 0)) 0 at hh + simpa only [hF0,hf0] using hh + have hDF := flow_initial_derivative hF hi ht0 + let L := transverseParameters (E := E) + let ψ : ℂ × E → ℂ × E := F ∘ L + have hFL : AnalyticAt ℂ F (L 0) := by simpa only [map_zero] using hF + have hψ : AnalyticAt ℂ ψ 0 := hFL.comp (L.analyticAt 0) + have hψ0 : ψ 0=0 := by simpa [ψ] using hF0 + have hd : HasFDerivAt ψ (ContinuousLinearEquiv.refl ℂ (ℂ × E) : + (ℂ × E) →L[ℂ] (ℂ × E)) 0 := by + have hDFL : HasFDerivAt F (initialDerivative ((1,0) : ℂ × E)) (L 0) := by + simpa only [map_zero] using hDF + have hh := hDFL.comp (0 : ℂ × E) L.hasFDerivAt + have heq : (initialDerivative ((1,0) : ℂ × E)).comp L= + (ContinuousLinearEquiv.refl ℂ (ℂ × E) : (ℂ × E) →L[ℂ] (ℂ × E)) := by + ext a <;> simp [L,initialDerivative_apply] + exact heq ▸ hh + let hc : ContDiffAt ℂ ω ψ 0 := hψ.contDiffAt + let Φ := hc.toOpenPartialHomeomorph ψ hd (by simp) + have hΦ : (Φ : (ℂ × E) → ℂ × E)=ψ := rfl + have hΦa : AnalyticAt ℂ Φ.symm 0 := by + have hh := (hc.to_localInverse hd (by simp)).analyticAt + rwa [hψ0] at hh + refine ⟨Φ,hc.mem_toOpenPartialHomeomorph_source hd (by simp),hψ0,hψ,hΦa,?_⟩ + have hl : Tendsto L (𝓝 0) (𝓝 0) := by + have hh : Tendsto L (𝓝 0) (𝓝 (L 0)) := L.continuous.continuousAt + simpa only [L.map_zero] using hh + filter_upwards [hl.eventually ht,hψ.eventually_analyticAt] with a hta ha + have hta' : HasDerivAt (fun t : ℂ => Φ (t,a.2)) (f (Φ a)) a.1 := hta + have htda : HasDerivAt (fun t : ℂ => Φ (t,a.2)) (fderiv ℂ Φ a (1,0)) a.1 := + ha.differentiableAt.hasFDerivAt.comp_hasDerivAt a.1 + ((hasDerivAt_id a.1).prodMk (hasDerivAt_const a.1 a.2)) + exact htda.deriv.symm.trans hta'.deriv + +end HolomorphicFlow + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + +lemma norm_real_smul_le {r : ℝ} (hr : r∈Icc (0:ℝ) 1) (z : ℂ) : ‖r • z‖≤‖z‖ := by + rw [norm_smul, Real.norm_eq_abs,abs_of_nonneg hr.1] + exact mul_le_of_le_one_left (norm_nonneg z) hr.2 + + + +theorem ode_unique_germ {f : E → E} {g h : ℂ → E} + (hf : ContDiffAt ℂ 1 f (g 0)) (hg : ContinuousAt g 0) (hh : ContinuousAt h 0) + (hi : g 0=h 0) + (hgd : ∀ᶠ t in 𝓝 (0:ℂ), HasDerivAt g (f (g t)) t) + (hhd : ∀ᶠ t in 𝓝 (0:ℂ), HasDerivAt h (f (h t)) t) : + g =ᶠ[𝓝 (0:ℂ)] h := by + obtain ⟨K,U,hU,hLip⟩ := hf.exists_lipschitzOnWith + have hgm : ∀ᶠ t in 𝓝 (0:ℂ), g t∈U := hg.preimage_mem_nhds hU + have hhm : ∀ᶠ t in 𝓝 (0:ℂ), h t∈U := hh.preimage_mem_nhds (hi ▸ hU) + obtain ⟨ε,hε,hball⟩ := Metric.mem_nhds_iff.mp (hgd.and (hhd.and (hgm.and hhm))) + filter_upwards [Metric.ball_mem_nhds (0:ℂ) hε] with z hz + have hz' : ‖z‖<ε := by simpa using hz + have hm (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : r • z∈Metric.ball (0:ℂ) ε := by + simpa using (norm_real_smul_le hr z).trans_lt hz' + have hp (r : ℝ) (hr : r∈Icc (0:ℝ) 1) := hball (hm r hr) + let v : ℝ → E → E := fun _ x => z • f x + have gd (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : + HasDerivAt (fun s : ℝ => g (s • z)) (v r (g (r • z))) r := by + have ht : HasDerivAt (fun s : ℝ => s • z) z r := + by simpa only [id_eq,one_smul] using (hasDerivAt_id r).smul_const z + have hd := ((hp r hr).1.hasFDerivAt.restrictScalars ℝ).comp_hasDerivAt r ht + simpa [v,ContinuousLinearMap.smulRight_apply,Function.comp_def] using hd + have hd (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : + HasDerivAt (fun s : ℝ => h (s • z)) (v r (h (r • z))) r := by + have ht : HasDerivAt (fun s : ℝ => s • z) z r := + by simpa only [id_eq,one_smul] using (hasDerivAt_id r).smul_const z + have hd := ((hp r hr).2.1.hasFDerivAt.restrictScalars ℝ).comp_hasDerivAt r ht + simpa [v,ContinuousLinearMap.smulRight_apply,Function.comp_def] using hd + have he := ODE_solution_unique_of_mem_Icc_right + (v := v) (s := fun _ => U) (K := ‖z‖₊*K) + (fun _ _ => (lipschitzWith_smul z).comp_lipschitzOnWith hLip) + (fun r hr => (gd r hr).continuousAt.continuousWithinAt) + (fun r hr => (gd r ⟨hr.1,hr.2.le⟩).hasDerivWithinAt) + (fun r hr => (hp r ⟨hr.1,hr.2.le⟩).2.2.1) + (fun r hr => (hd r hr).continuousAt.continuousWithinAt) + (fun r hr => (hd r ⟨hr.1,hr.2.le⟩).hasDerivWithinAt) + (fun r hr => (hp r ⟨hr.1,hr.2.le⟩).2.2.2) + (by simpa using hi) + simpa using he (show (1:ℝ)∈Icc (0:ℝ) 1 by constructor <;> norm_num) + + + +theorem ode_unique_parameter_germ {P : Type*} [NormedAddCommGroup P] + {f : E → E} {g h : ℂ × P → E} + (hf : ContDiffAt ℂ 1 f (g 0)) (hg : ContinuousAt g 0) (hh : ContinuousAt h 0) + (hi : ∀ᶠ x in 𝓝 (0:P), g (0,x)=h (0,x)) + (hgd : ∀ᶠ a in 𝓝 (0:ℂ×P), HasDerivAt (fun t => g (t,a.2)) (f (g a)) a.1) + (hhd : ∀ᶠ a in 𝓝 (0:ℂ×P), HasDerivAt (fun t => h (t,a.2)) (f (h a)) a.1) : + g =ᶠ[𝓝 (0:ℂ×P)] h := by + obtain ⟨K,U,hU,hLip⟩ := hf.exists_lipschitzOnWith + have hi0 : g 0=h 0 := hi.self_of_nhds + have hgm : ∀ᶠ a in 𝓝 (0:ℂ×P), g a∈U := hg.preimage_mem_nhds hU + have hhm : ∀ᶠ a in 𝓝 (0:ℂ×P), h a∈U := hh.preimage_mem_nhds (hi0 ▸ hU) + have hia : ∀ᶠ a in 𝓝 (0:ℂ×P), g (0,a.2)=h (0,a.2) := by + have hs : Tendsto (Prod.snd : ℂ×P → P) (𝓝 0) (𝓝 0) := continuous_snd.continuousAt + exact hs.eventually hi + obtain ⟨ε,hε,hball⟩ := Metric.mem_nhds_iff.mp + (hgd.and (hhd.and (hgm.and (hhm.and hia)))) + filter_upwards [Metric.ball_mem_nhds (0:ℂ×P) hε] with a ha + have ha' : ‖a‖<ε := by simpa using ha + have hm (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : (r • a.1,a.2)∈Metric.ball (0:ℂ×P) ε := by + have hn : ‖(r • a.1,a.2)‖≤‖a‖ := by + simp only [Prod.norm_def] + exact max_le_max (norm_real_smul_le hr a.1) le_rfl + simpa using hn.trans_lt ha' + have hp (r : ℝ) (hr : r∈Icc (0:ℝ) 1) := hball (hm r hr) + let v : ℝ → E → E := fun _ x => a.1 • f x + have gd (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : + HasDerivAt (fun s : ℝ => g (s • a.1,a.2)) (v r (g (r • a.1,a.2))) r := by + have ht : HasDerivAt (fun s : ℝ => s • a.1) a.1 r := by + simpa only [id_eq,one_smul] using (hasDerivAt_id r).smul_const a.1 + have hd := ((hp r hr).1.hasFDerivAt.restrictScalars ℝ).comp_hasDerivAt r ht + simpa [v,ContinuousLinearMap.smulRight_apply,Function.comp_def] using hd + have hd (r : ℝ) (hr : r∈Icc (0:ℝ) 1) : + HasDerivAt (fun s : ℝ => h (s • a.1,a.2)) (v r (h (r • a.1,a.2))) r := by + have ht : HasDerivAt (fun s : ℝ => s • a.1) a.1 r := by + simpa only [id_eq,one_smul] using (hasDerivAt_id r).smul_const a.1 + have hd := ((hp r hr).2.1.hasFDerivAt.restrictScalars ℝ).comp_hasDerivAt r ht + simpa [v,ContinuousLinearMap.smulRight_apply,Function.comp_def] using hd + have he := ODE_solution_unique_of_mem_Icc_right + (v := v) (s := fun _ => U) (K := ‖a.1‖₊*K) + (fun _ _ => (lipschitzWith_smul a.1).comp_lipschitzOnWith hLip) + (fun r hr => (gd r hr).continuousAt.continuousWithinAt) + (fun r hr => (gd r ⟨hr.1,hr.2.le⟩).hasDerivWithinAt) + (fun r hr => (hp r ⟨hr.1,hr.2.le⟩).2.2.1) + (fun r hr => (hd r hr).continuousAt.continuousWithinAt) + (fun r hr => (hd r ⟨hr.1,hr.2.le⟩).hasDerivWithinAt) + (fun r hr => (hp r ⟨hr.1,hr.2.le⟩).2.2.2.1) + (by simpa using (hball ha).2.2.2.2) + simpa using he (show (1:ℝ)∈Icc (0:ℝ) 1 by constructor <;> norm_num) + +end HolomorphicFlow + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFlow +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + +lemma analytic_fderiv {D : Type*} [NormedAddCommGroup D] [NormedSpace ℂ D] + {F : D → E} {a : D} (hF : AnalyticAt ℂ F a) : AnalyticAt ℂ (fderiv ℂ F) a := + ((hF.contDiffAt (n := ω)).fderiv_right (m := ω) (by simp)).analyticAt + + + +lemma variational_equation_at {F : ℂ × E → E} {f : E → E} {a : ℂ × E} + (hF : AnalyticAt ℂ F a) (hf : DifferentiableAt ℂ f (F a)) + (he : (fun b => fderiv ℂ F b (1,0)) =ᶠ[𝓝 a] (fun b => f (F b))) (v : E) : + HasDerivAt (fun t : ℂ => fderiv ℂ F (t,a.2) (0,v)) + (fderiv ℂ f (F a) (fderiv ℂ F a (0,v))) a.1 := by + have hD := (analytic_fderiv hF).differentiableAt.hasFDerivAt + have hE : HasFDerivAt (fun b => fderiv ℂ F b (1,0)) + ((ContinuousLinearMap.apply ℂ E ((1,0) : ℂ × E)).comp + (fderiv ℂ (fderiv ℂ F) a)) a := + (ContinuousLinearMap.apply ℂ E ((1,0) : ℂ × E)).hasFDerivAt.comp a hD + have hC := hf.hasFDerivAt.comp a hF.differentiableAt.hasFDerivAt + have heD := (hE.congr_of_eventuallyEq he.symm).unique hC + have hev := congrArg (fun L : (ℂ × E) →L[ℂ] E => L (0,v)) heD + have hsym := (hF.contDiffAt (n := ω)).isSymmSndFDerivAt_of_omega + have hd := hD.comp_hasDerivAt a.1 + ((hasDerivAt_id a.1).prodMk (hasDerivAt_const a.1 a.2)) + have hd' := hd.clm_apply (hasDerivAt_const a.1 ((0,v) : ℂ × E)) + have hv : fderiv ℂ (fderiv ℂ F) a (1,0) (0,v)= + fderiv ℂ f (F a) (fderiv ℂ F a (0,v)) := by + rw [hsym (1,0) (0,v)] + exact hev + simpa only [Function.comp_def,map_zero,add_zero,hv,id_eq] using hd' + + +def jetField (f : E → E) (a : E × E) : E × E := + (f a.1,fderiv ℂ f a.1 a.2) + +lemma jetField_analytic {f : E → E} {x v : E} (hf : AnalyticAt ℂ f x) : + AnalyticAt ℂ (jetField f) (x,v) := by + have hd : ContDiffAt ℂ ω (fun a : E × E => fderiv ℂ f a.1) (x,v) := + ((analytic_fderiv hf).contDiffAt (n := ω)).comp (x,v) contDiffAt_fst + exact ((hf.contDiffAt.comp (x,v) contDiffAt_fst).prodMk + (hd.clm_apply contDiffAt_snd)).analyticAt + +lemma initial_spatial_derivative {F : ℂ × E → E} {x₀ : E} + (hF : AnalyticAt ℂ F 0) (hi : ∀ᶠ x in 𝓝 (0:E), F (0,x)=x₀+x) : + ∀ᶠ x in 𝓝 (0:E), ∀v : E, fderiv ℂ F (0,x) (0,v)=v := by + have ht : Tendsto (fun x : E => ((0,x) : ℂ × E)) (𝓝 0) (𝓝 0) := + (continuous_const.prodMk continuous_id).continuousAt + have hi' : (fun x => F (0,x)) =ᶠ[𝓝 (0:E)] (fun x => x₀+x) := hi + filter_upwards [ht.eventually hF.eventually_analyticAt,hi'.eventuallyEq_nhds] with x hFx hix + have hd := hFx.differentiableAt.hasFDerivAt.comp x + (ContinuousLinearMap.inr ℂ ℂ E).hasFDerivAt + have he : HasFDerivAt (fun x : E => F (0,x)) (ContinuousLinearMap.id ℂ E) x := + ((hasFDerivAt_id x).const_add x₀).congr_of_eventuallyEq hix + intro v + exact congrArg (fun L : E →L[ℂ] E => L v) (hd.unique he) + + + +theorem flow_preserves_commuting {F : ℂ × E → E} {f g : E → E} {x₀ : E} + (hf : AnalyticAt ℂ f x₀) (hg : AnalyticAt ℂ g x₀) + (hF : AnalyticAt ℂ F 0) (hF0 : F 0=x₀) + (hi : ∀ᶠ x in 𝓝 (0:E), F (0,x)=x₀+x) + (ht : ∀ᶠ a in 𝓝 (0:ℂ×E), HasDerivAt (fun t => F (t,a.2)) (f (F a)) a.1) + (hcomm : ∀ᶠ x in 𝓝 x₀, VectorField.lieBracket ℂ f g x=0) : + ∀ᶠ a in 𝓝 (0:ℂ×E), fderiv ℂ F a (0,g (x₀+a.2))=g (F a) := by + let G : ℂ × E → E × E := fun a => (F a,fderiv ℂ F a (0,g (x₀+a.2))) + let H : ℂ × E → E × E := fun a => (F a,g (F a)) + have hFt : Tendsto F (𝓝 0) (𝓝 x₀) := by simpa only [hF0] using hF.continuousAt.tendsto + have eqPDE : (fun b => fderiv ℂ F b (1,0)) =ᶠ[𝓝 (0:ℂ×E)] (fun b => f (F b)) := by + filter_upwards [hF.eventually_analyticAt,ht] with a ha hta + have htd := ha.differentiableAt.hasFDerivAt.comp_hasDerivAt a.1 + ((hasDerivAt_id a.1).prodMk (hasDerivAt_const a.1 a.2)) + exact htd.unique hta + have hG : AnalyticAt ℂ G 0 := by + have htrans : AnalyticAt ℂ (fun a : ℂ×E => x₀+a.2) 0 := analyticAt_const.add analyticAt_snd + have hg' : AnalyticAt ℂ (fun a : ℂ×E => g (x₀+a.2)) 0 := by + have hh : AnalyticAt ℂ g (x₀+(0:ℂ×E).2) := by simpa using hg + exact AnalyticAt.comp (f := fun a : ℂ×E => x₀+a.2) hh htrans + exact (hF.contDiffAt.prodMk + ((analytic_fderiv hF).contDiffAt.clm_apply + (contDiffAt_const.prodMk hg'.contDiffAt))).analyticAt + have hH : AnalyticAt ℂ H 0 := by + have hgF : AnalyticAt ℂ g (F 0) := hF0.symm ▸ hg + exact (hF.contDiffAt.prodMk ((hgF.comp hF).contDiffAt)).analyticAt + have hinit : ∀ᶠ x in 𝓝 (0:E), G (0,x)=H (0,x) := by + filter_upwards [hi,initial_spatial_derivative hF hi] with x hix hdix + simp only [G,H,hdix,hix] + have hG0 : G 0=(x₀,g x₀) := by + have hh := (initial_spatial_derivative hF hi).self_of_nhds + change (F 0,fderiv ℂ F (0,0) (0,g (x₀+0)))=(x₀,g x₀) + rw [hF0,hh,add_zero] + have hjet : ContDiffAt ℂ 1 (jetField f) (G 0) := by + rw [hG0] + exact (jetField_analytic hf).contDiffAt + have hGD : ∀ᶠ a in 𝓝 (0:ℂ×E), + HasDerivAt (fun t => G (t,a.2)) (jetField f (G a)) a.1 := by + filter_upwards [hF.eventually_analyticAt,hFt.eventually hf.eventually_analyticAt, + eqPDE.eventuallyEq_nhds,ht] with a hFa hfa hEa hta + exact hta.prodMk (variational_equation_at hFa hfa.differentiableAt hEa (g (x₀+a.2))) + have hHD : ∀ᶠ a in 𝓝 (0:ℂ×E), + HasDerivAt (fun t => H (t,a.2)) (jetField f (H a)) a.1 := by + filter_upwards [hFt.eventually hg.eventually_analyticAt,hFt.eventually hcomm,ht] + with a hga hca hta + have he : fderiv ℂ g (F a) (f (F a))=fderiv ℂ f (F a) (g (F a)) := + sub_eq_zero.mp hca + have hd := hga.differentiableAt.hasFDerivAt.comp_hasDerivAt a.1 hta + rw [he] at hd + exact hta.prodMk hd + have hh := ode_unique_parameter_germ hjet hG.continuousAt hH.continuousAt hinit hGD hHD + exact hh.mono fun a ha => congrArg Prod.snd ha + +end HolomorphicFlow + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + + + +def graphField (A : E × F → E →L[ℂ] F) (v : E) (a : E × F) : E × F := + (v,A a v) + +def graphSpace (A : E × F → E →L[ℂ] F) (a : E × F) : Submodule ℂ (E × F) := + LinearMap.range ((ContinuousLinearMap.id ℂ E).prod (A a)).toLinearMap + +omit [CompleteSpace E] [CompleteSpace F] in +lemma mem_graphSpace {A : E × F → E →L[ℂ] F} {a w : E × F} : + w∈graphSpace A a ↔ w.2=A a w.1 := by + constructor + · rintro ⟨v,hv⟩ + cases hv + rfl + · intro hw + exact ⟨w.1,Prod.ext rfl hw.symm⟩ + +omit [CompleteSpace E] in +lemma graphField_analytic {A : E × F → E →L[ℂ] F} {a : E × F} + (hA : AnalyticAt ℂ A a) (v : E) : AnalyticAt ℂ (graphField A v) a := + (contDiffAt_const.prodMk (hA.contDiffAt.clm_apply contDiffAt_const)).analyticAt + +omit [CompleteSpace E] in +lemma graphField_fderiv_fst {A : E × F → E →L[ℂ] F} {a : E × F} + (hA : AnalyticAt ℂ A a) (v : E) (w : E × F) : + (fderiv ℂ (graphField A v) a w).1=0 := by + have hd := (graphField_analytic hA v).differentiableAt.hasFDerivAt.fst + have hc : HasFDerivAt (fun a : E×F => (graphField A v a).1) (0 : (E×F) →L[ℂ] E) a := + hasFDerivAt_const v a + exact congrArg (fun L : (E×F) →L[ℂ] E => L w) (hd.unique hc) + + + +omit [CompleteSpace E] in +lemma graphField_commute {A : E × F → E →L[ℂ] F} {a : E × F} + (hA : AnalyticAt ℂ A a) (v w : E) + (hm : VectorField.lieBracket ℂ (graphField A v) (graphField A w) a∈graphSpace A a) : + VectorField.lieBracket ℂ (graphField A v) (graphField A w) a=0 := by + have hz : (VectorField.lieBracket ℂ (graphField A v) (graphField A w) a).1=0 := by + simp only [VectorField.lieBracket,Prod.fst_sub,graphField_fderiv_fst hA,sub_self] + apply Prod.ext + · exact hz + · rw [(mem_graphSpace.mp hm),hz,map_zero] + rfl + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +def horizontalProjection : (E×F) →L[ℂ] (E×F) := + (ContinuousLinearMap.fst ℂ E F).prod 0 + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma horizontalProjection_apply (a : E×F) : + horizontalProjection a=(a.1,0) := rfl + +def projectorStraightener (P : (E×F) →L[ℂ] (E×F)) : (E×F) →L[ℂ] (E×F) := + P * horizontalProjection + (1-P)*(1-horizontalProjection) + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma projectorStraightener_horizontal : + projectorStraightener (horizontalProjection : (E×F) →L[ℂ] (E×F))=1 := by + apply ContinuousLinearMap.ext + intro a + apply Prod.ext <;> simp [projectorStraightener] + +omit [CompleteSpace E] [CompleteSpace F] in +lemma projector_straightener_intertwine {P : (E×F) →L[ℂ] (E×F)} (hP : P*P=P) : + P*projectorStraightener P=projectorStraightener P*horizontalProjection := by + have hH : (horizontalProjection : (E×F) →L[ℂ] (E×F))*horizontalProjection=horizontalProjection := by + ext a <;> simp + have hPC : P*(1-P)=0 := by rw [mul_sub,mul_one,hP,sub_self] + have hCH : (1-horizontalProjection)*horizontalProjection= + (0 : (E×F) →L[ℂ] (E×F)) := by rw [sub_mul,one_mul,hH,sub_self] + calc + P*projectorStraightener P=P*horizontalProjection := by + rw [projectorStraightener,mul_add,← mul_assoc,hP,← mul_assoc,hPC,zero_mul,add_zero] + _=projectorStraightener P*horizontalProjection := by + rw [projectorStraightener,add_mul,mul_assoc,hH,mul_assoc,hCH,mul_zero,add_zero] + +def firstBlock (P : (E×F) →L[ℂ] (E×F)) : E →L[ℂ] E := + (ContinuousLinearMap.fst ℂ E F).comp (P.comp (ContinuousLinearMap.inl ℂ E F)) + +def secondBlock (P : (E×F) →L[ℂ] (E×F)) : E →L[ℂ] F := + (ContinuousLinearMap.snd ℂ E F).comp (P.comp (ContinuousLinearMap.inl ℂ E F)) + +def projectorGraph (P : (E×F) →L[ℂ] (E×F)) : E →L[ℂ] F := + (secondBlock P).comp (Ring.inverse (firstBlock P)) + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma firstBlock_horizontal : + firstBlock (horizontalProjection : (E×F) →L[ℂ] (E×F))=1 := by ext a; rfl + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma secondBlock_horizontal : + secondBlock (horizontalProjection : (E×F) →L[ℂ] (E×F))=0 := by ext a; rfl + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma projectorGraph_horizontal : + projectorGraph (horizontalProjection : (E×F) →L[ℂ] (E×F))=0 := by + simp [projectorGraph] + +lemma firstBlock_analytic {G : Type*} [NormedAddCommGroup G] [NormedSpace ℂ G] + {P : G → (E×F) →L[ℂ] (E×F)} {x : G} (hP : AnalyticAt ℂ P x) : + AnalyticAt ℂ (fun x => firstBlock (P x)) x := + (contDiffAt_const.clm_comp (hP.contDiffAt.clm_comp contDiffAt_const)).analyticAt + +lemma secondBlock_analytic {G : Type*} [NormedAddCommGroup G] [NormedSpace ℂ G] + {P : G → (E×F) →L[ℂ] (E×F)} {x : G} (hP : AnalyticAt ℂ P x) : + AnalyticAt ℂ (fun x => secondBlock (P x)) x := + (contDiffAt_const.clm_comp (hP.contDiffAt.clm_comp contDiffAt_const)).analyticAt + +lemma projectorGraph_analytic {G : Type*} [NormedAddCommGroup G] [NormedSpace ℂ G] + {P : G → (E×F) →L[ℂ] (E×F)} {x : G} (hP : AnalyticAt ℂ P x) + (hP0 : P x=horizontalProjection) : + AnalyticAt ℂ (fun x => projectorGraph (P x)) x := by + have hi : AnalyticAt ℂ (fun x => Ring.inverse (firstBlock (P x))) x := by + have hi0 : AnalyticAt ℂ (Ring.inverse : (E →L[ℂ] E) → E →L[ℂ] E) (firstBlock (P x)) := by + rw [hP0,firstBlock_horizontal] + exact analyticAt_inverse (𝕜 := ℂ) (1 : (E →L[ℂ] E)ˣ) + exact hi0.comp (f := fun x => firstBlock (P x)) (firstBlock_analytic hP) + exact ((secondBlock_analytic hP).contDiffAt.clm_comp hi.contDiffAt).analyticAt + +lemma projector_range_eq_graph {P : (E×F) →L[ℂ] (E×F)} (hP : P*P=P) + (hQ : IsUnit (projectorStraightener P)) (hR : IsUnit (firstBlock P)) : + LinearMap.range P.toLinearMap=graphSpace (fun _ : E×F => projectorGraph P) 0 := by + have hQi := (ContinuousLinearMap.isUnit_iff_bijective.mp hQ).1 + have hQs := (ContinuousLinearMap.isUnit_iff_bijective.mp hQ).2 + have hRi := (ContinuousLinearMap.isUnit_iff_bijective.mp hR).1 + have hRinv := Ring.mul_inverse_cancel _ hR + have hRinvl := Ring.inverse_mul_cancel _ hR + have hQH (u : E) : projectorStraightener P (u,0)=P (u,0) := by + simp [projectorStraightener] + ext w + rw [mem_graphSpace] + constructor + · rintro ⟨v,hv⟩ + have hPw : P w=w := by + rw [← hv] + exact congrArg (fun L : (E×F) →L[ℂ] (E×F) => L v) hP + obtain ⟨z,hz⟩ := hQs w + have hHz : horizontalProjection z=z := hQi (by + have hh := congrArg (fun L : (E×F) →L[ℂ] (E×F) => L z) + (projector_straightener_intertwine hP) + simpa only [mul_apply_eq_comp,hz,hPw] using hh.symm) + have hz2 : z.2=0 := (congrArg Prod.snd hHz).symm + have hw : w=P (z.1,0) := by + have hze : z=(z.1,0) := Prod.ext rfl hz2 + rw [hze,hQH] at hz + exact hz.symm + have hw1 : w.1=firstBlock P z.1 := congrArg Prod.fst hw + have hw2 : w.2=secondBlock P z.1 := congrArg Prod.snd hw + rw [hw2,projectorGraph,ContinuousLinearMap.comp_apply,hw1] + have hh := congrArg (fun L : E →L[ℂ] E => L z.1) hRinvl + simpa only [mul_apply_eq_comp,one_apply_eq_self] using + congrArg (secondBlock P) hh.symm + · intro hw + refine ⟨((Ring.inverse (firstBlock P)) w.1,0),?_⟩ + apply Prod.ext + · have hh := congrArg (fun L : E →L[ℂ] E => L w.1) hRinv + exact hh + · exact hw.symm + + + +theorem exists_projector_graph + {P : E×F → (E×F) →L[ℂ] (E×F)} (hP : AnalyticAt ℂ P 0) + (hP0 : P 0=horizontalProjection) + (hid : ∀ᶠ a in 𝓝 (0:E×F), P a*P a=P a) : + ∃ A : E×F → E →L[ℂ] F, AnalyticAt ℂ A 0 ∧ A 0=0 ∧ + ∀ᶠ a in 𝓝 (0:E×F), LinearMap.range (P a).toLinearMap=graphSpace A a := by + refine ⟨fun a => projectorGraph (P a),projectorGraph_analytic hP hP0,?_,?_⟩ + · simp only [hP0,projectorGraph_horizontal] + have hQ : AnalyticAt ℂ (fun a => projectorStraightener (P a)) 0 := + (hP.mul analyticAt_const).add ((analyticAt_const.sub hP).mul + (analyticAt_const.sub analyticAt_const)) + have hQ0 : IsUnit (projectorStraightener (P 0)) := by simp [hP0] + have hR0 : IsUnit (firstBlock (P 0)) := by simp [hP0] + have hQn := hQ.continuousAt.preimage_mem_nhds (Units.isOpen.mem_nhds hQ0) + have hRn := (firstBlock_analytic hP).continuousAt.preimage_mem_nhds + (Units.isOpen.mem_nhds hR0) + filter_upwards [hid,hQn,hRn] with a ha hqa hra + exact projector_range_eq_graph ha hqa hra + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] +variable {n : ℕ} +abbrev FrameModel (n : ℕ) (F : Type*) := (Fin n → ℂ) × F + +def horizontalBasis (i : Fin n) : FrameModel n F := (Pi.single i 1,0) + +def timeCoordinate (i : Fin n) : FrameModel n F →L[ℂ] ℂ := + (ContinuousLinearMap.proj i).comp (ContinuousLinearMap.fst ℂ (Fin n → ℂ) F) + +omit [CompleteSpace F] in +@[simp] lemma timeCoordinate_apply (i : Fin n) (a : FrameModel n F) : + timeCoordinate i a=a.1 i := rfl + +omit [CompleteSpace F] in +@[simp] lemma timeCoordinate_basis (i j : Fin n) : + timeCoordinate (F := F) i (horizontalBasis j)=if i=j then 1 else 0 := by + simp [horizontalBasis,Pi.single_apply] + +lemma flow_comp_fderiv {D E : Type*} [NormedAddCommGroup D] [NormedSpace ℂ D] + [NormedAddCommGroup E] [NormedSpace ℂ E] + {Φ : ℂ × E → E} {ψ : D → E} (c : D →L[ℂ] ℂ) {a : D} + (hΦ : DifferentiableAt ℂ Φ (c a,ψ a)) (hψ : DifferentiableAt ℂ ψ a) (v : D) : + fderiv ℂ (fun x => Φ (c x,ψ x)) a v= + fderiv ℂ Φ (c a,ψ a) (c v,fderiv ℂ ψ a v) := by + have hd := hΦ.hasFDerivAt.comp a (c.hasFDerivAt.prodMk hψ.hasFDerivAt) + exact congrArg (fun L : D →L[ℂ] E => L v) hd.fderiv + +lemma flow_time_fderiv {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + {Φ : ℂ × E → E} {f : E → E} {a : ℂ × E} + (hΦ : DifferentiableAt ℂ Φ a) + (ht : HasDerivAt (fun t => Φ (t,a.2)) (f (Φ a)) a.1) : + fderiv ℂ Φ a (1,0)=f (Φ a) := by + have hd := hΦ.hasFDerivAt.comp_hasDerivAt a.1 + ((hasDerivAt_id a.1).prodMk (hasDerivAt_const a.1 a.2)) + exact hd.unique ht + + + +theorem exists_partial_frame_coordinates + (V : Fin n → FrameModel n F → FrameModel n F) + (hV : ∀i, AnalyticAt ℂ (V i) 0) + (hcomm : ∀i j, ∀ᶠ x in 𝓝 (0:FrameModel n F), VectorField.lieBracket ℂ (V i) (V j) x=0) + (s : Finset (Fin n)) : + ∃ ψ : FrameModel n F → FrameModel n F, + AnalyticAt ℂ ψ 0 ∧ ψ 0=0 ∧ + (∀ᶠ y in 𝓝 (0:F), ψ (0,y)=(0,y)) ∧ + ∀j, ∀ᶠ a in 𝓝 (0:FrameModel n F), + fderiv ℂ ψ a (horizontalBasis j)=if j∈s then V j (ψ a) else 0 := by + classical + induction s using Finset.induction_on with + | empty => + let L : FrameModel n F →L[ℂ] FrameModel n F := + (0 : FrameModel n F →L[ℂ] (Fin n → ℂ)).prod (ContinuousLinearMap.snd ℂ _ _) + refine ⟨L,L.analyticAt 0,L.map_zero,?_,?_⟩ + · exact Filter.Eventually.of_forall fun y => rfl + · intro j + exact Filter.Eventually.of_forall fun a => by simp [L,horizontalBasis] + | @insert i s his ih => + obtain ⟨ψ,hψ,hψ0,hψi,hψd⟩ := ih + obtain ⟨Φ,hΦ,hΦ0,hΦi,hΦt⟩ := HolomorphicFlow.exists_analytic_flow (hV i) + let c := timeCoordinate (F := F) i + let q : FrameModel n F → ℂ × FrameModel n F := fun a => (c a,ψ a) + let θ : FrameModel n F → FrameModel n F := Φ ∘ q + have hq0 : q 0=0 := by simp [q,hψ0] + have hq : AnalyticAt ℂ q 0 := (c.contDiff.contDiffAt.prodMk hψ.contDiffAt).analyticAt + have hθ : AnalyticAt ℂ θ 0 := hΦ.comp_of_eq hq hq0 + have hθ0 : θ 0=0 := by simp [θ,hq0,hΦ0] + have hqt : Tendsto q (𝓝 0) (𝓝 0) := by simpa only [hq0] using hq.continuousAt.tendsto + have hψt : Tendsto (fun y : F => ψ (0,y)) (𝓝 0) (𝓝 0) := by + have h₁ : Tendsto (fun y : F => ((0,y) : FrameModel n F)) (𝓝 0) (𝓝 0) := + (continuous_const.prodMk continuous_id).continuousAt + have h₂ : Tendsto ψ (𝓝 0) (𝓝 0) := by simpa only [hψ0] using hψ.continuousAt.tendsto + exact h₂.comp h₁ + refine ⟨θ,hθ,hθ0,?_,?_⟩ + · filter_upwards [hψi,hψt.eventually hΦi] with y hy hiy + simpa [θ,q,c,hy] using hiy + · intro j + have hp := HolomorphicFlow.flow_preserves_commuting (hV i) (hV j) + hΦ hΦ0 hΦi hΦt (hcomm i j) + filter_upwards [hψ.eventually_analyticAt,hqt.eventually hΦ.eventually_analyticAt, + hψd j,hqt.eventually hp,hqt.eventually hΦt] with a hψa hΦa hda hpa hta + change fderiv ℂ (fun a => Φ (c a,ψ a)) a (horizontalBasis j)=_ + rw [flow_comp_fderiv c hΦa.differentiableAt hψa.differentiableAt,hda] + by_cases hij : i=j + · subst j + have hci : c (horizontalBasis i)=1 := by + change timeCoordinate i (horizontalBasis (F := F) i)=1 + rw [timeCoordinate_basis,ite_eq_left rfl] + simp only [hci,his,ite_false,Finset.mem_insert_self,ite_true] + exact flow_time_fderiv hΦa.differentiableAt hta + · have hcj : c (horizontalBasis j)=0 := by + change timeCoordinate i (horizontalBasis (F := F) j)=0 + rw [timeCoordinate_basis,ite_eq_right hij] + rw [hcj] + by_cases hjs : j∈s + · simp only [hjs,ite_true,Finset.mem_insert_of_mem hjs] + simpa only [zero_add,q,θ,Function.comp_def] using hpa + · have hji : j≠i := Ne.symm hij + simp only [hjs,Finset.mem_insert, hji,false_or,↓reduceIte] + exact map_zero _ + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] +variable {n : ℕ} + +omit [CompleteSpace F] in +lemma sum_horizontalBasis (v : Fin n → ℂ) : + (∑i, v i • horizontalBasis (F := F) i)=((v,0) : FrameModel n F) := by + apply Prod.ext + · ext j + simp [horizontalBasis,Pi.single_apply,Finset.sum_apply,Prod.fst_sum] + · simp [horizontalBasis,Prod.snd_sum] + +omit [CompleteSpace F] in +lemma eq_id_of_basis_and_transverse (D : FrameModel n F →L[ℂ] FrameModel n F) + (hD : ∀i, D (horizontalBasis i)=horizontalBasis i) + (hT : ∀v : F, D (0,v)=(0,v)) : D=ContinuousLinearMap.id ℂ (FrameModel n F) := by + have hh (v : Fin n → ℂ) : D (v,0)=(v,0) := by + rw [← sum_horizontalBasis (F := F) v,map_sum] + simp only [map_smul,hD] + apply ContinuousLinearMap.ext + intro a + have he : a=(a.1,0)+(0,a.2) := by simp + rw [he,map_add,hh,hT] + rfl + +omit [CompleteSpace F] in +lemma frame_initial_derivative {ψ : FrameModel n F → FrameModel n F} + (hψ : AnalyticAt ℂ ψ 0) + (hi : ∀ᶠ y in 𝓝 (0:F), ψ (0,y)=(0,y)) + (hD : ∀i, fderiv ℂ ψ 0 (horizontalBasis i)=horizontalBasis i) : + HasFDerivAt ψ (ContinuousLinearEquiv.refl ℂ (FrameModel n F) : + FrameModel n F →L[ℂ] FrameModel n F) 0 := by + have ht := hψ.differentiableAt.hasFDerivAt.comp (0:F) + (ContinuousLinearMap.inr ℂ (Fin n → ℂ) F).hasFDerivAt + have hid : HasFDerivAt (fun y : F => ψ (0,y)) + (ContinuousLinearMap.inr ℂ (Fin n → ℂ) F) 0 := + (ContinuousLinearMap.inr ℂ (Fin n → ℂ) F).hasFDerivAt.congr_of_eventuallyEq hi + have hT (v : F) : fderiv ℂ ψ 0 (0,v)=(0,v) := + congrArg (fun L : F →L[ℂ] FrameModel n F => L v) (ht.unique hid) + have he := eq_id_of_basis_and_transverse _ hD hT + change HasFDerivAt ψ (ContinuousLinearMap.id ℂ (FrameModel n F)) 0 + rw [← he] + exact hψ.differentiableAt.hasFDerivAt + + + +theorem exists_commuting_frame_chart_strong + (V : Fin n → FrameModel n F → FrameModel n F) + (hV : ∀i, AnalyticAt ℂ (V i) 0) + (hV0 : ∀i, V i 0=horizontalBasis i) + (hcomm : ∀i j, ∀ᶠ x in 𝓝 (0:FrameModel n F), VectorField.lieBracket ℂ (V i) (V j) x=0) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + fderiv ℂ Φ 0=ContinuousLinearMap.id ℂ (FrameModel n F) ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), ∀i, + fderiv ℂ Φ a (horizontalBasis i)=V i (Φ a) := by + obtain ⟨ψ,hψ,hψ0,hi,hD⟩ := exists_partial_frame_coordinates V hV hcomm Finset.univ + have hDi (i : Fin n) : fderiv ℂ ψ 0 (horizontalBasis i)=horizontalBasis i := by + simpa only [Finset.mem_univ,ite_true,hψ0,hV0] using (hD i).self_of_nhds + have hd := frame_initial_derivative hψ hi hDi + let hc : ContDiffAt ℂ ω ψ 0 := hψ.contDiffAt + let Φ := hc.toOpenPartialHomeomorph ψ hd (by simp) + have hΦa : AnalyticAt ℂ Φ.symm 0 := by + have hh := (hc.to_localInverse hd (by simp)).analyticAt + rwa [hψ0] at hh + refine ⟨Φ,hc.mem_toOpenPartialHomeomorph_source hd (by simp),hψ0,hψ,hΦa,hd.fderiv,?_⟩ + have hh := Filter.eventually_all.mpr hD + change ∀ᶠ a in 𝓝 (0:FrameModel n F), ∀ i, fderiv ℂ ψ a (horizontalBasis i)=V i (ψ a) + exact hh.mono fun a ha i => by simpa only [Finset.mem_univ,ite_true] using ha i + +theorem exists_commuting_frame_chart + (V : Fin n → FrameModel n F → FrameModel n F) + (hV : ∀i, AnalyticAt ℂ (V i) 0) + (hV0 : ∀i, V i 0=horizontalBasis i) + (hcomm : ∀i j, ∀ᶠ x in 𝓝 (0:FrameModel n F), VectorField.lieBracket ℂ (V i) (V j) x=0) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), ∀i, + fderiv ℂ Φ a (horizontalBasis i)=V i (Φ a) := by + obtain ⟨Φ,h0,h00,hΦ,hΦs,_,hD⟩ := exists_commuting_frame_chart_strong V hV hV0 hcomm + exact ⟨Φ,h0,h00,hΦ,hΦs,hD⟩ + + + +theorem exists_graph_frobenius_chart_strong + (A : FrameModel n F → (Fin n → ℂ) →L[ℂ] F) + (hA : AnalyticAt ℂ A 0) (hA0 : A 0=0) + (hInv : ∀i j : Fin n, ∀ᶠ a in 𝓝 (0:FrameModel n F), + VectorField.lieBracket ℂ (graphField A (Pi.single i 1)) + (graphField A (Pi.single j 1)) a∈graphSpace A a) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + fderiv ℂ Φ 0=ContinuousLinearMap.id ℂ (FrameModel n F) ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), ∀v : Fin n → ℂ, + fderiv ℂ Φ a (v,0)=(v,A (Φ a) v) := by + let V : Fin n → FrameModel n F → FrameModel n F := fun i => graphField A (Pi.single i 1) + have hV (i : Fin n) : AnalyticAt ℂ (V i) 0 := graphField_analytic hA _ + have hV0 (i : Fin n) : V i 0=horizontalBasis i := by simp [V,graphField,hA0,horizontalBasis] + have hc (i j : Fin n) : ∀ᶠ a in 𝓝 (0:FrameModel n F), VectorField.lieBracket ℂ (V i) (V j) a=0 := by + filter_upwards [hA.eventually_analyticAt,hInv i j] with a ha hia + exact graphField_commute ha _ _ hia + obtain ⟨Φ,hΦ0,hΦ00,hΦ,hΦs,hD0,hΦd⟩ := exists_commuting_frame_chart_strong V hV hV0 hc + refine ⟨Φ,hΦ0,hΦ00,hΦ,hΦs,hD0,?_⟩ + filter_upwards [hΦd] with a ha + intro v + have he := sum_horizontalBasis (F := F) v + rw [← he,map_sum] + simp only [map_smul,ha] + let L : (Fin n → ℂ) →L[ℂ] FrameModel n F := (ContinuousLinearMap.id ℂ _).prod (A (Φ a)) + change ∑i, v i • L (Pi.single i 1)=L v + simp only [← map_smul,← map_sum] + congr 1 + ext j + simp [Pi.single_apply,Finset.sum_apply] + +theorem exists_graph_frobenius_chart + (A : FrameModel n F → (Fin n → ℂ) →L[ℂ] F) + (hA : AnalyticAt ℂ A 0) (hA0 : A 0=0) + (hInv : ∀i j : Fin n, ∀ᶠ a in 𝓝 (0:FrameModel n F), + VectorField.lieBracket ℂ (graphField A (Pi.single i 1)) + (graphField A (Pi.single j 1)) a∈graphSpace A a) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), ∀v : Fin n → ℂ, + fderiv ℂ Φ a (v,0)=(v,A (Φ a) v) := by + obtain ⟨Φ,h0,h00,hΦ,hΦs,_,hD⟩ := exists_graph_frobenius_chart_strong A hA hA0 hInv + exact ⟨Φ,h0,h00,hΦ,hΦs,hD⟩ + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + + + + + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] +variable {n : ℕ} + +omit [CompleteSpace F] in +lemma image_horizontal_eq_graph {A : FrameModel n F → (Fin n → ℂ) →L[ℂ] F} + {a : FrameModel n F} {D : FrameModel n F →L[ℂ] FrameModel n F} + (hD : ∀v : Fin n → ℂ, D (v,0)=(v,A a v)) : + Submodule.map D.toLinearMap + (LinearMap.ker (ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).toLinearMap)=graphSpace A a := by + ext w + constructor + · rintro ⟨v,hv,rfl⟩ + have hv0 : v.2=0 := hv + have hve : v=(v.1,0) := Prod.ext rfl hv0 + change D v ∈ graphSpace A a + rw [hve,hD] + exact mem_graphSpace.mpr rfl + · intro hw + refine ⟨(w.1,0),rfl,?_⟩ + change D (w.1,0)=w + rw [hD] + exact Prod.ext rfl (mem_graphSpace.mp hw).symm + + + +theorem exists_normalized_projector_frobenius_strong + {P : FrameModel n F → FrameModel n F →L[ℂ] FrameModel n F} + (hP : AnalyticAt ℂ P 0) (hP0 : P 0=horizontalProjection) + (hid : ∀ᶠ a in 𝓝 (0:FrameModel n F), P a*P a=P a) + (hInv : InvolutiveAt P 0) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + fderiv ℂ Φ 0=ContinuousLinearMap.id ℂ (FrameModel n F) ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), + Submodule.map (fderiv ℂ Φ a).toLinearMap + (LinearMap.ker (ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).toLinearMap)= + LinearMap.range (P (Φ a)).toLinearMap := by + obtain ⟨A,hA,hA0,hgraph⟩ := exists_projector_graph hP hP0 hid + have hm (v : Fin n → ℂ) : ∀ᶠ a in 𝓝 (0:FrameModel n F), + graphField A v a∈LinearMap.range (P a).toLinearMap := by + filter_upwards [hgraph] with a ha + rw [ha] + exact mem_graphSpace.mpr rfl + have hc (i j : Fin n) : ∀ᶠ a in 𝓝 (0:FrameModel n F), + VectorField.lieBracket ℂ (graphField A (Pi.single i 1)) + (graphField A (Pi.single j 1)) a∈graphSpace A a := by + have hh := hInv (graphField A (Pi.single i 1)) (graphField A (Pi.single j 1)) + (graphField_analytic hA _) (graphField_analytic hA _) (hm _) (hm _) + filter_upwards [hh,hgraph] with a ha hga + rwa [← hga] + obtain ⟨Φ,hΦ0,hΦ00,hΦ,hΦs,hD0,hΦd⟩ := exists_graph_frobenius_chart_strong A hA hA0 hc + refine ⟨Φ,hΦ0,hΦ00,hΦ,hΦs,hD0,?_⟩ + have ht : Tendsto Φ (𝓝 0) (𝓝 0) := by + have hh : Tendsto Φ (𝓝 0) (𝓝 (Φ 0)) := hΦ.continuousAt + rwa [hΦ00] at hh + filter_upwards [hΦd,ht.eventually hgraph] with a ha hga + rw [hga] + exact image_horizontal_eq_graph ha + +theorem exists_normalized_projector_frobenius + {P : FrameModel n F → FrameModel n F →L[ℂ] FrameModel n F} + (hP : AnalyticAt ℂ P 0) (hP0 : P 0=horizontalProjection) + (hid : ∀ᶠ a in 𝓝 (0:FrameModel n F), P a*P a=P a) + (hInv : InvolutiveAt P 0) : + ∃ Φ : OpenPartialHomeomorph (FrameModel n F) (FrameModel n F), + (0 : FrameModel n F)∈Φ.source ∧ Φ 0=0 ∧ + AnalyticAt ℂ Φ 0 ∧ AnalyticAt ℂ Φ.symm 0 ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), + Submodule.map (fderiv ℂ Φ a).toLinearMap + (LinearMap.ker (ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).toLinearMap)= + LinearMap.range (P (Φ a)).toLinearMap := by + obtain ⟨Φ,h0,h00,hΦ,hΦs,_,hD⟩ := exists_normalized_projector_frobenius_strong hP hP0 hid hInv + exact ⟨Φ,h0,h00,hΦ,hΦs,hD⟩ + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +section +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace E] [CompleteSpace F] + +def affineCoordinates (L : E ≃L[ℂ] F) (a : E) (x : E) : F := L (x-a) +def affineUncoordinates (L : E ≃L[ℂ] F) (a : E) (y : F) : E := a+L.symm y + +def changedProjector (L : E ≃L[ℂ] F) (a : E) (P : E → E →L[ℂ] E) + (y : F) : F →L[ℂ] F := L.toContinuousLinearMap.comp + ((P (affineUncoordinates L a y)).comp L.symm.toContinuousLinearMap) + +def liftedField (L : E ≃L[ℂ] F) (a : E) (V : F → F) (x : E) : E := + L.symm (V (affineCoordinates L a x)) + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma affineCoordinates_uncoordinates (L : E ≃L[ℂ] F) (a : E) (y : F) : + affineCoordinates L a (affineUncoordinates L a y)=y := by + simp [affineCoordinates,affineUncoordinates] + +omit [CompleteSpace E] [CompleteSpace F] in +@[simp] lemma affineUncoordinates_coordinates (L : E ≃L[ℂ] F) (a x : E) : + affineUncoordinates L a (affineCoordinates L a x)=x := by + simp [affineCoordinates,affineUncoordinates] + +omit [CompleteSpace E] [CompleteSpace F] in +lemma affineCoordinates_hasFDerivAt (L : E ≃L[ℂ] F) (a x : E) : + HasFDerivAt (affineCoordinates L a) L.toContinuousLinearMap x := by + change HasFDerivAt (fun x => L (x-a)) L.toContinuousLinearMap x + simpa only [Function.comp_def, id_eq, ContinuousLinearMap.comp_id] using + L.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const a) + +omit [CompleteSpace E] [CompleteSpace F] in +lemma affineUncoordinates_hasFDerivAt (L : E ≃L[ℂ] F) (a : E) (y : F) : + HasFDerivAt (affineUncoordinates L a) L.symm.toContinuousLinearMap y := + L.symm.hasFDerivAt.const_add a + +omit [CompleteSpace E] [CompleteSpace F] in +lemma affineCoordinates_analytic (L : E ≃L[ℂ] F) (a x : E) : + AnalyticAt ℂ (affineCoordinates L a) x := + L.toContinuousLinearMap.analyticAt _ |>.comp (analyticAt_id.sub analyticAt_const) + +omit [CompleteSpace E] [CompleteSpace F] in +lemma affineUncoordinates_analytic (L : E ≃L[ℂ] F) (a : E) (y : F) : + AnalyticAt ℂ (affineUncoordinates L a) y := + analyticAt_const.add (L.symm.toContinuousLinearMap.analyticAt _) + +omit [CompleteSpace E] [CompleteSpace F] in +lemma liftedField_analytic (L : E ≃L[ℂ] F) (a x : E) {V : F → F} + (hV : AnalyticAt ℂ V (affineCoordinates L a x)) : + AnalyticAt ℂ (liftedField L a V) x := + L.symm.toContinuousLinearMap.analyticAt _ |>.comp + (hV.comp (affineCoordinates_analytic L a x)) + +omit [CompleteSpace E] [CompleteSpace F] in +lemma liftedField_hasFDerivAt (L : E ≃L[ℂ] F) (a x : E) {V : F → F} + (hV : DifferentiableAt ℂ V (affineCoordinates L a x)) : + HasFDerivAt (liftedField L a V) + (L.symm.toContinuousLinearMap.comp + ((fderiv ℂ V (affineCoordinates L a x)).comp L.toContinuousLinearMap)) x := + L.symm.hasFDerivAt.comp x (hV.hasFDerivAt.comp x (affineCoordinates_hasFDerivAt L a x)) + +omit [CompleteSpace E] [CompleteSpace F] in +lemma liftedField_bracket (L : E ≃L[ℂ] F) (a x : E) {V W : F → F} + (hV : DifferentiableAt ℂ V (affineCoordinates L a x)) + (hW : DifferentiableAt ℂ W (affineCoordinates L a x)) : + VectorField.lieBracket ℂ (liftedField L a V) (liftedField L a W) x= + L.symm (VectorField.lieBracket ℂ V W (affineCoordinates L a x)) := by + rw [VectorField.lieBracket, (liftedField_hasFDerivAt L a x hW).fderiv, + (liftedField_hasFDerivAt L a x hV).fderiv] + simp [liftedField,VectorField.lieBracket] + +omit [CompleteSpace E] [CompleteSpace F] in +lemma mem_changedProjector_range_iff (L : E ≃L[ℂ] F) (a : E) + (P : E → E →L[ℂ] E) (y v : F) : + v∈LinearMap.range (changedProjector L a P y).toLinearMap ↔ + L.symm v∈LinearMap.range (P (affineUncoordinates L a y)).toLinearMap := by + constructor + · rintro ⟨w,hw⟩ + refine ⟨L.symm w,?_⟩ + have hh := congrArg L.symm hw + simpa [changedProjector] using hh + · rintro ⟨w,hw⟩ + refine ⟨L w,?_⟩ + change L (P (affineUncoordinates L a y) (L.symm (L w)))=v + change P (affineUncoordinates L a y) w=L.symm v at hw + simp only [ContinuousLinearEquiv.symm_apply_apply,hw,ContinuousLinearEquiv.apply_symm_apply] + +omit [CompleteSpace F] in +lemma changedProjector_analytic (L : E ≃L[ℂ] F) (a : E) + {P : E → E →L[ℂ] E} (hP : AnalyticAt ℂ P a) : + AnalyticAt ℂ (changedProjector L a P) 0 := by + have hP' : AnalyticAt ℂ P (affineUncoordinates L a 0) := by + simpa [affineUncoordinates] using hP + exact (contDiffAt_const.clm_comp ((hP'.comp + (affineUncoordinates_analytic L a 0)).contDiffAt.clm_comp contDiffAt_const)).analyticAt + + + +omit [CompleteSpace E] in +theorem InvolutiveAt.changed (L : E ≃L[ℂ] F) (a : E) + {P : E → E →L[ℂ] E} (hI : InvolutiveAt P a) : + InvolutiveAt (changedProjector L a P) 0 := by + intro V W hV hW hVm hWm + have hcoord : Tendsto (affineCoordinates L a) (𝓝 a) (𝓝 0) := by + have hh : Tendsto (affineCoordinates L a) (𝓝 a) (𝓝 (affineCoordinates L a a)) := + (affineCoordinates_analytic L a a).continuousAt + simpa only [affineCoordinates,sub_self,map_zero] using hh + have hunc : Tendsto (affineUncoordinates L a) (𝓝 0) (𝓝 a) := by + have hh := (affineUncoordinates_analytic L a 0).continuousAt + simpa [ContinuousAt,affineUncoordinates] using hh + have hVL : AnalyticAt ℂ (liftedField L a V) a := + liftedField_analytic L a a (by simpa [affineCoordinates] using hV) + have hWL : AnalyticAt ℂ (liftedField L a W) a := + liftedField_analytic L a a (by simpa [affineCoordinates] using hW) + have hm (U : F → F) (hUm : ∀ᶠ y in 𝓝 (0:F), + U y∈LinearMap.range (changedProjector L a P y).toLinearMap) : + ∀ᶠ x in 𝓝 a, liftedField L a U x∈LinearMap.range (P x).toLinearMap := by + filter_upwards [hcoord.eventually hUm] with x hx + have hh := (mem_changedProjector_range_iff L a P _ _).mp hx + simpa [liftedField] using hh + have hb := hI _ _ hVL hWL (hm V hVm) (hm W hWm) + filter_upwards [hunc.eventually hb,hV.eventually_analyticAt,hW.eventually_analyticAt] + with y hy hya hyb + apply (mem_changedProjector_range_iff L a P y _).mpr + have hh := liftedField_bracket L a (affineUncoordinates L a y) + (V := V) (W := W) (by simpa using hya.differentiableAt) + (by simpa using hyb.differentiableAt) + rw [hh] at hy + simpa only [affineCoordinates_uncoordinates] using hy + +end + + + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] + + + +def projectorDecomposition (P : E →L[ℂ] E) (hP : ∀ v, P (P v)=P v) : + E ≃L[ℂ] ((LinearMap.range P.toLinearMap) × (LinearMap.ker P.toLinearMap)) := + ({ toFun := fun v => (⟨P v,⟨v,rfl⟩⟩,⟨v-P v,by + change P (v-P v)=0 + rw [map_sub,hP,sub_self]⟩) + invFun := fun w => (w.1:E)+(w.2:E) + left_inv := fun v => add_sub_cancel _ _ + right_inv := by + intro w + have hfix : P w.1=w.1 := by + obtain ⟨v,hv⟩ := w.1.2 + change P v=(w.1:E) at hv + rw [← hv,hP] + have hz : P w.2=0 := w.2.2 + apply Prod.ext <;> apply Subtype.ext + · simp [map_add,hfix,hz] + · simp [map_add,hfix,hz] + map_add' := by + intro v w + apply Prod.ext <;> apply Subtype.ext <;> simp [map_add] + abel + map_smul' := by + intro c v + apply Prod.ext <;> apply Subtype.ext <;> simp [map_smul,smul_sub] + } : E ≃ₗ[ℂ] ((LinearMap.range P.toLinearMap) × (LinearMap.ker P.toLinearMap))).toContinuousLinearEquiv + +@[simp] lemma projectorDecomposition_apply (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (v : E) : + ((projectorDecomposition P hP v).1:E)=P v ∧ + ((projectorDecomposition P hP v).2:E)=v-P v := ⟨rfl,rfl⟩ + +@[simp] lemma projectorDecomposition_project (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (v : E) : + projectorDecomposition P hP (P v)=((projectorDecomposition P hP v).1,0) := by + apply Prod.ext <;> apply Subtype.ext + · exact hP v + · change P v-P (P v)=0 + rw [hP,sub_self] + + + +def projectorCoordinates (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) : + E ≃L[ℂ] ((Fin (Module.finrank ℂ (LinearMap.range P.toLinearMap)) → ℂ) × + (Fin (Module.finrank ℂ (LinearMap.ker P.toLinearMap)) → ℂ)) := + (projectorDecomposition P hP).trans + (((Module.finBasis ℂ (LinearMap.range P.toLinearMap)).equivFun.toContinuousLinearEquiv).prodCongr + ((Module.finBasis ℂ (LinearMap.ker P.toLinearMap)).equivFun.toContinuousLinearEquiv)) + +lemma projectorCoordinates_project (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (v : E) : + projectorCoordinates P hP (P v)=((projectorCoordinates P hP v).1,0) := by + simp [projectorCoordinates,projectorDecomposition_project] + +lemma projectorCoordinates_project_symm (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (w : (Fin (Module.finrank ℂ (LinearMap.range P.toLinearMap)) → ℂ) × + (Fin (Module.finrank ℂ (LinearMap.ker P.toLinearMap)) → ℂ)) : + projectorCoordinates P hP (P ((projectorCoordinates P hP).symm w))=(w.1,0) := by + rw [projectorCoordinates_project,ContinuousLinearEquiv.apply_symm_apply] + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + +lemma localHomeomorph_fderiv_left_inverse (Φ : OpenPartialHomeomorph E F) {a : E} + (ha : a∈Φ.source) (hΦ : DifferentiableAt ℂ Φ a) + (hΦs : DifferentiableAt ℂ Φ.symm (Φ a)) : + (fderiv ℂ Φ.symm (Φ a)).comp (fderiv ℂ Φ a)=ContinuousLinearMap.id ℂ E := by + have he : (fun x => Φ.symm (Φ x))=ᶠ[𝓝 a] id := by + filter_upwards [Φ.open_source.mem_nhds ha] with x hx + exact Φ.left_inv hx + have hd := hΦs.hasFDerivAt.comp a hΦ.hasFDerivAt + exact hd.fderiv.symm.trans ((he.fderiv_eq).trans (fderiv_id)) + +lemma localHomeomorph_fderiv_right_inverse (Φ : OpenPartialHomeomorph E F) {a : E} + (ha : a∈Φ.source) (hΦ : DifferentiableAt ℂ Φ a) + (hΦs : DifferentiableAt ℂ Φ.symm (Φ a)) : + (fderiv ℂ Φ a).comp (fderiv ℂ Φ.symm (Φ a))=ContinuousLinearMap.id ℂ F := by + have hh := localHomeomorph_fderiv_left_inverse Φ.symm (Φ.map_source ha) hΦs + (by simpa only [Φ.left_inv ha,OpenPartialHomeomorph.symm_symm] using hΦ) + simpa only [Φ.left_inv ha,OpenPartialHomeomorph.symm_symm] using hh + +variable [CompleteSpace F] {n : ℕ} + + + +theorem exists_normalized_leaf_submersion + {P : FrameModel n F → FrameModel n F →L[ℂ] FrameModel n F} + (hP : AnalyticAt ℂ P 0) (hP0 : P 0=horizontalProjection) + (hid : ∀ᶠ a in 𝓝 (0:FrameModel n F), P a*P a=P a) + (hInv : InvolutiveAt P 0) : + ∃ q : FrameModel n F → F, AnalyticAt ℂ q 0 ∧ q 0=0 ∧ + fderiv ℂ q 0=ContinuousLinearMap.snd ℂ (Fin n → ℂ) F ∧ + ∀ᶠ a in 𝓝 (0:FrameModel n F), + LinearMap.ker (fderiv ℂ q a).toLinearMap=LinearMap.range (P a).toLinearMap := by + obtain ⟨Φ,h0,h00,hΦ,hΦs,hD0,hD⟩ := + exists_normalized_projector_frobenius_strong hP hP0 hid hInv + have h0t : (0:FrameModel n F)∈Φ.target := by simpa only [h00] using Φ.map_source h0 + have hi0 : Φ.symm 0=0 := by simpa only [h00] using Φ.left_inv h0 + let q : FrameModel n F → F := fun a => (Φ.symm a).2 + have hq : AnalyticAt ℂ q 0 := + (ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).analyticAt _ |>.comp hΦs + have hDs0 : fderiv ℂ Φ.symm 0=ContinuousLinearMap.id ℂ (FrameModel n F) := by + have hh := localHomeomorph_fderiv_left_inverse Φ h0 hΦ.differentiableAt + (by simpa only [h00] using hΦs.differentiableAt) + simpa only [h00,hD0,ContinuousLinearMap.comp_id] using hh + refine ⟨q,hq,?_,?_,?_⟩ + · simp only [q,hi0,Prod.snd_zero] + · have hd := (ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).hasFDerivAt.comp 0 + hΦs.differentiableAt.hasFDerivAt + have hh : fderiv ℂ q 0=(ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).comp (fderiv ℂ Φ.symm 0) := hd.fderiv + simpa only [hDs0,ContinuousLinearMap.comp_id] using hh + have ht : Tendsto Φ.symm (𝓝 0) (𝓝 0) := by + have hh : Tendsto Φ.symm (𝓝 0) (𝓝 (Φ.symm 0)) := hΦs.continuousAt + rwa [hi0] at hh + filter_upwards [Φ.open_target.mem_nhds h0t,hΦs.eventually_analyticAt, + ht.eventually hΦ.eventually_analyticAt,ht.eventually hD] with b hb hbs hba hbd + have hab : Φ (Φ.symm b)=b := Φ.right_inv hb + have hsrc := Φ.map_target hb + have hl := localHomeomorph_fderiv_left_inverse Φ hsrc hba.differentiableAt + (by simpa only [hab] using hbs.differentiableAt) + have hr := localHomeomorph_fderiv_right_inverse Φ hsrc hba.differentiableAt + (by simpa only [hab] using hbs.differentiableAt) + rw [hab] at hl hr hbd + have hdq : fderiv ℂ q b=(ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).comp + (fderiv ℂ Φ.symm b) := + ((ContinuousLinearMap.snd ℂ (Fin n → ℂ) F).hasFDerivAt.comp b + hbs.differentiableAt.hasFDerivAt).fderiv + rw [← hbd] + ext v + constructor + · intro hv + refine ⟨fderiv ℂ Φ.symm b v,?_,?_⟩ + · change (fderiv ℂ Φ.symm b v).2=0 + change fderiv ℂ q b v=0 at hv + rw [hdq] at hv + exact hv + · exact congrArg (fun L : FrameModel n F →L[ℂ] FrameModel n F => L v) hr + · rintro ⟨w,hw,rfl⟩ + change fderiv ℂ q b (fderiv ℂ Φ (Φ.symm b) w)=0 + rw [hdq] + change (fderiv ℂ Φ.symm b (fderiv ℂ Φ (Φ.symm b) w)).2=0 + have hh := congrArg (fun L : FrameModel n F →L[ℂ] FrameModel n F => L w) hl + change fderiv ℂ Φ.symm b (fderiv ℂ Φ (Φ.symm b) w)=w at hh + rw [hh] + exact hw + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +section +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] + +omit [FiniteDimensional ℂ E] in +lemma changedProjector_idempotent {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] + (L : E ≃L[ℂ] F) (a : E) {P : E → E →L[ℂ] E} {y : F} + (hP : ∀v, P (affineUncoordinates L a y) (P (affineUncoordinates L a y) v)= + P (affineUncoordinates L a y) v) : + changedProjector L a P y*changedProjector L a P y=changedProjector L a P y := by + apply ContinuousLinearMap.ext + intro v + change L (P (affineUncoordinates L a y) (L.symm + (L (P (affineUncoordinates L a y) (L.symm v)))))= + L (P (affineUncoordinates L a y) (L.symm v)) + rw [ContinuousLinearEquiv.symm_apply_apply,hP] + + + +theorem exists_leaf_submersion {P : E → E →L[ℂ] E} {x : E} + (hP : AnalyticAt ℂ P x) + (hid : ∀ᶠ a in 𝓝 x, ∀v, P a (P a v)=P a v) + (hI : InvolutiveAt P x) : + ∃ q : E → (Fin (Module.finrank ℂ (LinearMap.ker (P x).toLinearMap)) → ℂ), + AnalyticAt ℂ q x ∧ q x=0 ∧ Function.Surjective (fderiv ℂ q x) ∧ + ∀ᶠ a in 𝓝 x, + LinearMap.ker (fderiv ℂ q a).toLinearMap=LinearMap.range (P a).toLinearMap := by + let hpx := hid.self_of_nhds + let L := projectorCoordinates (P x) hpx + let Q := changedProjector L x P + have hQ : AnalyticAt ℂ Q 0 := changedProjector_analytic L x hP + have hQ0 : Q 0=horizontalProjection := by + apply ContinuousLinearMap.ext + intro w + change L (P (affineUncoordinates L x 0) (L.symm w))=(w.1,0) + simp only [affineUncoordinates,map_zero,add_zero] + exact projectorCoordinates_project_symm (P x) hpx w + have hunc : Tendsto (affineUncoordinates L x) (𝓝 0) (𝓝 x) := by + have hh : Tendsto (affineUncoordinates L x) (𝓝 0) (𝓝 (affineUncoordinates L x 0)) := + (affineUncoordinates_analytic L x 0).continuousAt + simpa only [affineUncoordinates,map_zero,add_zero] using hh + have hQid : ∀ᶠ a in 𝓝 0, Q a*Q a=Q a := + (hunc.eventually hid).mono fun a ha => changedProjector_idempotent L x ha + obtain ⟨q,hq,hq0,hdq,hker⟩ := exists_normalized_leaf_submersion hQ hQ0 hQid + (hI.changed L x) + let q' := q ∘ affineCoordinates L x + have hcoord0 : affineCoordinates L x x=0 := by simp [affineCoordinates] + have hqa : AnalyticAt ℂ q (affineCoordinates L x x) := hcoord0.symm ▸ hq + have hq' : AnalyticAt ℂ q' x := hqa.comp (affineCoordinates_analytic L x x) + have hdq' : fderiv ℂ q' x=(ContinuousLinearMap.snd ℂ _ _).comp L.toContinuousLinearMap := by + have hh := hqa.differentiableAt.hasFDerivAt.comp x (affineCoordinates_hasFDerivAt L x x) + simpa only [hcoord0,hdq] using hh.fderiv + refine ⟨q',hq',?_,?_,?_⟩ + · change q (affineCoordinates L x x)=0 + rw [hcoord0,hq0] + · rw [hdq'] + intro v + refine ⟨L.symm (0,v),?_⟩ + simp + have hct : Tendsto (affineCoordinates L x) (𝓝 x) (𝓝 0) := by + have hh : Tendsto (affineCoordinates L x) (𝓝 x) (𝓝 (affineCoordinates L x x)) := + (affineCoordinates_analytic L x x).continuousAt + rwa [hcoord0] at hh + filter_upwards [hct.eventually hq.eventually_analyticAt,hct.eventually hker] with a ha hka + have hda := ha.differentiableAt.hasFDerivAt.comp a (affineCoordinates_hasFDerivAt L x a) + ext v + change fderiv ℂ q' a v=0 ↔ v∈LinearMap.range (P a).toLinearMap + have hder : fderiv ℂ q' a=(fderiv ℂ q (affineCoordinates L x a)).comp L.toContinuousLinearMap := + hda.fderiv + rw [hder] + change L v∈LinearMap.ker (fderiv ℂ q (affineCoordinates L x a)).toLinearMap ↔ _ + rw [hka,mem_changedProjector_range_iff] + simp only [ContinuousLinearEquiv.symm_apply_apply,affineUncoordinates_coordinates] + +end + + + +variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [NormedAddCommGroup G] [NormedSpace ℂ G] + +lemma range_complementary_projector (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) : + LinearMap.range (ContinuousLinearMap.id ℂ E-P).toLinearMap=LinearMap.ker P.toLinearMap := by + ext v + constructor + · rintro ⟨w,rfl⟩ + change P (w-P w)=0 + rw [map_sub,hP,sub_self] + · intro hv + refine ⟨v,?_⟩ + change v-P v=v + have hh : P v=0 := hv + rw [hh,sub_zero] + +lemma complementary_projector_idempotent (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) (v : E) : + (ContinuousLinearMap.id ℂ E-P) ((ContinuousLinearMap.id ℂ E-P) v)= + (ContinuousLinearMap.id ℂ E-P) v := by + change (v-P v)-P (v-P v)=v-P v + rw [map_sub,hP,sub_self,sub_zero] + + + +lemma complementary_quotients_bijective (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (A : E →L[ℂ] F) (B : E →L[ℂ] G) + (hA : Function.Surjective A) (hB : Function.Surjective B) + (hkA : LinearMap.ker A.toLinearMap=LinearMap.ker P.toLinearMap) + (hkB : LinearMap.ker B.toLinearMap=LinearMap.range P.toLinearMap) : + Function.Bijective (A.prod B) := by + have hAP (v : E) : A (P v)=A v := by + have hh : v-P v∈LinearMap.ker P.toLinearMap := by + change P (v-P v)=0 + rw [map_sub,hP,sub_self] + rw [← hkA] at hh + change A (v-P v)=0 at hh + rw [map_sub,sub_eq_zero] at hh + exact hh.symm + have hBP (v : E) : B (P v)=0 := by + have hh : P v∈LinearMap.range P.toLinearMap := ⟨v,rfl⟩ + rw [← hkB] at hh + exact hh + constructor + · apply (A.prod B).toLinearMap.ker_eq_bot.mp + apply le_antisymm _ bot_le + intro v hv + have ha : A v=0 := congrArg Prod.fst hv + have hb : B v=0 := congrArg Prod.snd hv + have hpv : P v=0 := by + have hh : v∈LinearMap.ker A.toLinearMap := ha + rw [hkA] at hh + exact hh + have hr : v∈LinearMap.range P.toLinearMap := by rw [← hkB]; exact hb + obtain ⟨w,hw⟩ := hr + change P w=v at hw + change v=0 + rw [← hw] at hpv ⊢ + rwa [hP] at hpv + · rintro ⟨u,v⟩ + obtain ⟨a,ha⟩ := hA u + obtain ⟨b,hb⟩ := hB v + refine ⟨P a+(b-P b),?_⟩ + apply Prod.ext + · change A (P a+(b-P b))=u + rw [map_add,map_sub,hAP,hAP,sub_self,add_zero,ha] + · change B (P a+(b-P b))=v + rw [map_add,map_sub,hBP,hBP,sub_zero,zero_add,hb] + +lemma image_range_projector_of_quotients (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (A : E →L[ℂ] F) (B : E →L[ℂ] G) + (hA : Function.Surjective A) + (hkA : LinearMap.ker A.toLinearMap=LinearMap.ker P.toLinearMap) + (hkB : LinearMap.ker B.toLinearMap=LinearMap.range P.toLinearMap) : + Submodule.map (A.prod B).toLinearMap (LinearMap.range P.toLinearMap)= + LinearMap.ker (ContinuousLinearMap.snd ℂ F G).toLinearMap := by + ext w + constructor + · rintro ⟨v,hv,rfl⟩ + change B v=0 + rwa [← hkB] at hv + · intro hw + have hw0 : w.2=0 := hw + obtain ⟨v,hv⟩ := hA w.1 + refine ⟨P v,⟨v,rfl⟩,?_⟩ + apply Prod.ext + · change A (P v)=w.1 + have hh : v-P v∈LinearMap.ker P.toLinearMap := by + change P (v-P v)=0 + rw [map_sub,hP,sub_self] + rw [← hkA] at hh + change A (v-P v)=0 at hh + rw [map_sub,sub_eq_zero] at hh + exact hh.symm.trans hv + · change B (P v)=w.2 + rw [hw0] + have hh : P v∈LinearMap.range P.toLinearMap := ⟨v,rfl⟩ + rwa [← hkB] at hh + +lemma image_kernel_projector_of_quotients (P : E →L[ℂ] E) (hP : ∀v, P (P v)=P v) + (A : E →L[ℂ] F) (B : E →L[ℂ] G) + (hB : Function.Surjective B) + (hkA : LinearMap.ker A.toLinearMap=LinearMap.ker P.toLinearMap) + (hkB : LinearMap.ker B.toLinearMap=LinearMap.range P.toLinearMap) : + Submodule.map (A.prod B).toLinearMap (LinearMap.ker P.toLinearMap)= + LinearMap.ker (ContinuousLinearMap.fst ℂ F G).toLinearMap := by + ext w + constructor + · rintro ⟨v,hv,rfl⟩ + change A v=0 + rwa [← hkA] at hv + · intro hw + have hw0 : w.1=0 := hw + obtain ⟨v,hv⟩ := hB w.2 + have hpk : v-P v∈LinearMap.ker P.toLinearMap := by + change P (v-P v)=0 + rw [map_sub,hP,sub_self] + refine ⟨v-P v,hpk,?_⟩ + apply Prod.ext + · change A (v-P v)=w.1 + rw [hw0] + rwa [← hkA] at hpk + · change B (v-P v)=w.2 + have hh : P v∈LinearMap.range P.toLinearMap := ⟨v,rfl⟩ + rw [← hkB] at hh + change B (P v)=0 at hh + rw [map_sub,hh,sub_zero,hv] + +end HolomorphicFrobenius + + + +open Set Filter Topology +open scoped ContDiff +namespace HolomorphicFrobenius +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [FiniteDimensional ℂ E] + +abbrev FirstQuotient (P : E → E →L[ℂ] E) (x : E) := + Fin (Module.finrank ℂ (LinearMap.ker (ContinuousLinearMap.id ℂ E-P x).toLinearMap)) → ℂ +abbrev SecondQuotient (P : E → E →L[ℂ] E) (x : E) := + Fin (Module.finrank ℂ (LinearMap.ker (P x).toLinearMap)) → ℂ + + + +theorem exists_local_product_chart {P : E → E →L[ℂ] E} {x : E} + (hP : AnalyticAt ℂ P x) + (hid : ∀ᶠ a in 𝓝 x, ∀v, P a (P a v)=P a v) + (hI : InvolutiveAt P x) + (hIc : InvolutiveAt (fun a => ContinuousLinearMap.id ℂ E-P a) x) : + ∃ Φ : OpenPartialHomeomorph E (FirstQuotient P x × SecondQuotient P x), + x∈Φ.source ∧ Φ x=0 ∧ AnalyticAt ℂ Φ x ∧ AnalyticAt ℂ Φ.symm 0 ∧ + ∀ᶠ a in 𝓝 x, + Submodule.map (fderiv ℂ Φ a).toLinearMap (LinearMap.range (P a).toLinearMap)= + LinearMap.ker (ContinuousLinearMap.snd ℂ (FirstQuotient P x) (SecondQuotient P x)).toLinearMap ∧ + Submodule.map (fderiv ℂ Φ a).toLinearMap (LinearMap.ker (P a).toLinearMap)= + LinearMap.ker (ContinuousLinearMap.fst ℂ (FirstQuotient P x) (SecondQuotient P x)).toLinearMap := by + have hPc : AnalyticAt ℂ (fun a => ContinuousLinearMap.id ℂ E-P a) x := analyticAt_const.sub hP + have hidc : ∀ᶠ a in 𝓝 x, ∀v, (ContinuousLinearMap.id ℂ E-P a) + ((ContinuousLinearMap.id ℂ E-P a) v)=(ContinuousLinearMap.id ℂ E-P a) v := + hid.mono fun a ha => complementary_projector_idempotent (P a) ha + obtain ⟨q₂,hq₂,hq₂0,hs₂,hk₂⟩ := exists_leaf_submersion hP hid hI + obtain ⟨q₁,hq₁,hq₁0,hs₁,hk₁⟩ := exists_leaf_submersion hPc hidc hIc + let ψ : E → FirstQuotient P x × SecondQuotient P x := fun a => (q₁ a,q₂ a) + have hψ : AnalyticAt ℂ ψ x := hq₁.prod hq₂ + have hψ0 : ψ x=0 := Prod.ext hq₁0 hq₂0 + have hdψ : fderiv ℂ ψ x=(fderiv ℂ q₁ x).prod (fderiv ℂ q₂ x) := + (hq₁.differentiableAt.hasFDerivAt.prodMk hq₂.differentiableAt.hasFDerivAt).fderiv + have hker₁ : LinearMap.ker (fderiv ℂ q₁ x).toLinearMap=LinearMap.ker (P x).toLinearMap := + hk₁.self_of_nhds.trans (range_complementary_projector _ hid.self_of_nhds) + have hbij : Function.Bijective (fderiv ℂ ψ x) := by + rw [hdψ] + exact complementary_quotients_bijective (P x) hid.self_of_nhds _ _ hs₁ hs₂ hker₁ hk₂.self_of_nhds + let L : E ≃L[ℂ] (FirstQuotient P x × SecondQuotient P x) := + (LinearEquiv.ofBijective (fderiv ℂ ψ x).toLinearMap hbij).toContinuousLinearEquiv + have hd : HasFDerivAt ψ (L : E →L[ℂ] (FirstQuotient P x × SecondQuotient P x)) x := + hψ.differentiableAt.hasFDerivAt + let hc : ContDiffAt ℂ ω ψ x := hψ.contDiffAt + let Φ := hc.toOpenPartialHomeomorph ψ hd (by simp) + have hΦ : (Φ : E → FirstQuotient P x × SecondQuotient P x)=ψ := rfl + have hxΦ : x∈Φ.source := hc.mem_toOpenPartialHomeomorph_source hd (by simp) + have hΦs : AnalyticAt ℂ Φ.symm 0 := by + have hh := (hc.to_localInverse hd (by simp)).analyticAt + rwa [hψ0] at hh + refine ⟨Φ,hxΦ,hψ0,hψ,hΦs,?_⟩ + have ht : Tendsto Φ (𝓝 x) (𝓝 0) := by + have hh : Tendsto Φ (𝓝 x) (𝓝 (Φ x)) := hψ.continuousAt + rwa [show Φ x=0 from hψ0] at hh + filter_upwards [Φ.open_source.mem_nhds hxΦ,hψ.eventually_analyticAt, + ht.eventually hΦs.eventually_analyticAt,hq₁.eventually_analyticAt, + hq₂.eventually_analyticAt,hk₁,hk₂,hid] with a ha hpa hpsa h₁ h₂ hk₁a hk₂a hida + have hdr := localHomeomorph_fderiv_right_inverse Φ ha hpa.differentiableAt hpsa.differentiableAt + have hsur : Function.Surjective (fderiv ℂ Φ a) := by + intro w + refine ⟨fderiv ℂ Φ.symm (Φ a) w,?_⟩ + exact congrArg (fun D : (FirstQuotient P x × SecondQuotient P x) →L[ℂ] + (FirstQuotient P x × SecondQuotient P x) => D w) hdr + have hdpa : fderiv ℂ Φ a=(fderiv ℂ q₁ a).prod (fderiv ℂ q₂ a) := + (h₁.differentiableAt.hasFDerivAt.prodMk h₂.differentiableAt.hasFDerivAt).fderiv + have hs₁a : Function.Surjective (fderiv ℂ q₁ a) := by + intro v + obtain ⟨w,hw⟩ := hsur (v,0) + rw [hdpa] at hw + exact ⟨w,congrArg Prod.fst hw⟩ + have hs₂a : Function.Surjective (fderiv ℂ q₂ a) := by + intro v + obtain ⟨w,hw⟩ := hsur (0,v) + rw [hdpa] at hw + exact ⟨w,congrArg Prod.snd hw⟩ + have hka : LinearMap.ker (fderiv ℂ q₁ a).toLinearMap=LinearMap.ker (P a).toLinearMap := + hk₁a.trans (range_complementary_projector _ hida) + rw [hdpa] + exact ⟨image_range_projector_of_quotients (P a) hida _ _ hs₁a hka hk₂a, + image_kernel_projector_of_quotients (P a) hida _ _ hs₂a hka hk₂a⟩ + +end HolomorphicFrobenius + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff +namespace SplitTangent +variable {X : ComplexManifold.{u}} + +namespace TangentSplitting +variable (S : TangentSplitting X) + +theorem coordinateProjector_involutiveAlternative (hI : Integrable X S.first) + (x : X.Carrier) {z : Model X} (hz : z∈(chartAt (Model X) x).target) : + HolomorphicFrobenius.InvolutiveAt (S.coordinateProjector x) z := by + intro V W hV hW hPV hPW + obtain ⟨O,hOsub,hO,hzO⟩ := _root_.mem_nhds_iff.mp + (hV.eventually_analyticAt.and (hW.eventually_analyticAt.and (hPV.and hPW))) + let c := chartAt (Model X) x + let U := c.source∩c ⁻¹' O + have hU : IsOpen U := c.isOpen_inter_preimage hO + let V' := VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) c V + let W' := VectorField.mpullback (ModelWithCorners X) 𝓘(ℂ,Model X) c W + have hv' : HolomorphicSectionOn X V' U := by + intro y hy + exact (chartPullback_holomorphicAt x hy.1 (hOsub hy.2).1).contMDiffWithinAt + have hw' : HolomorphicSectionOn X W' U := by + intro y hy + exact (chartPullback_holomorphicAt x hy.1 (hOsub hy.2).2.1).contMDiffWithinAt + have hpv' : ∀y∈U, V' y∈S.first y := by + intro y hy + exact (S.coordinateProjector_range_iff x hy.1 _).mp (hOsub hy.2).2.2.1 + have hpw' : ∀y∈U, W' y∈S.first y := by + intro y hy + exact (S.coordinateProjector_range_iff x hy.1 _).mp (hOsub hy.2).2.2.2 + filter_upwards [hO.mem_nhds hzO,c.open_target.mem_nhds hz] with a ha hat + have hay : c (c.symm a)=a := c.right_inv hat + have hy : c.symm a∈c.source := c.map_target hat + have hyU : c.symm a∈U := ⟨hy,by change c (c.symm a)∈O; rwa [hay]⟩ + have hb := hI U hU V' W' hv' hw' hpv' hpw' (c.symm a) hyU + rw [VectorField.mlieBracketWithin_of_isOpen hU hyU] at hb + have hVa : AnalyticAt ℂ V (c (c.symm a)) := hay.symm ▸ (hOsub ha).1 + have hWa : AnalyticAt ℂ W (c (c.symm a)) := hay.symm ▸ (hOsub ha).2.1 + have he := chartPullback_bracket x hy hVa hWa + change VectorField.mlieBracket (ModelWithCorners X) V' W' (c.symm a)=_ at he + rw [he] at hb + have hh := (S.coordinateProjector_range_iff x hy _).mpr hb + simpa only [show (chartAt (Model X) x) (c.symm a)=a from hay] using hh + +end TangentSplitting +end SplitTangent + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter +open scoped Topology + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open scoped Topology ENNReal +open Filter Function +namespace SplitTangent.LeadingJet +variable {E F G : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [NormedAddCommGroup G] [NormedSpace ℂ G] + +lemma composition_leading (p : FormalMultilinearSeries ℂ F G) + (q : FormalMultilinearSeries ℂ E F) (m : ℕ) + (hp : ∀n, n < m → p n=0) (v : Fin m → E) : + (p.comp q) m v=p m (fun i => q 1 (fun _ => v i)) := by + classical + simp only [FormalMultilinearSeries.comp,sum_apply] + rw [Finset.sum_eq_single (Composition.ones m)] + · rw [FormalMultilinearSeries.compAlongComposition_apply] + apply p.congr (Composition.ones_length m) + intro i him him' + simp only [FormalMultilinearSeries.applyComposition_ones] + rfl + · intro c hc hne + have hlt : c.length < m := lt_of_le_of_ne c.length_le + (fun he => hne (Composition.eq_ones_iff_length.mpr he)) + rw [FormalMultilinearSeries.compAlongComposition_apply,hp _ hlt] + rfl + · simp + +def cut (p : FormalMultilinearSeries ℂ E F) (m : ℕ) : FormalMultilinearSeries ℂ E F := + fun n => if n < m then 0 else p n + +lemma cut_hasFPowerSeries [CompleteSpace F] {f : E → F} + {p : FormalMultilinearSeries ℂ E F} {x : E} {r : ℝ≥0∞} + (h : HasFPowerSeriesOnBall f p x r) (m : ℕ) + (hf : ∀n, n < m → iteratedFDeriv ℂ n f x=0) : + HasFPowerSeriesOnBall f (cut p m) x r := by + have hz (n : ℕ) (hn : n < m) (v : E) : p n (fun _ => v)=0 := by + have he := h.factorial_smul v n + rw [hf n hn,zero_apply,← Nat.cast_smul_eq_nsmul ℂ] at he + exact (smul_eq_zero.mp he).resolve_left (Nat.cast_ne_zero.mpr n.factorial_ne_zero) + refine ⟨h.r_le.trans (FormalMultilinearSeries.radius_le_of_le ?_),h.r_pos,?_⟩ + · intro n + dsimp only [cut] + split_ifs <;> simp + · intro v hv + apply (h.hasSum hv).congr + intro t + apply Finset.sum_congr rfl + intro n hn + dsimp only [cut] + split_ifs with hn + · simp [hz n hn v] + · rfl + + + +theorem iteratedFDeriv_comp_of_lower_zero [CompleteSpace F] [CompleteSpace G] + {f : F → G} {g : E → F} {x : E} (hf : AnalyticAt ℂ f (g x)) + (hg : AnalyticAt ℂ g x) (m : ℕ) + (hzero : ∀n, n < m → iteratedFDeriv ℂ n f (g x)=0) : + iteratedFDeriv ℂ m (f ∘ g) x= + (iteratedFDeriv ℂ m f (g x)).compContinuousLinearMap (fun _ => fderiv ℂ g x) := by + obtain ⟨p,r,hp⟩ := hf + obtain ⟨q,s,hq⟩ := hg + have hp' := cut_hasFPowerSeries hp m hzero + obtain ⟨t,ht⟩ := hp'.hasFPowerSeriesAt.comp hq.hasFPowerSeriesAt + have hq1 (v : E) : q 1 (fun _ => v)=fderiv ℂ g x v := by + simpa using hq.factorial_smul v 1 + apply ContinuousMultilinearMap.ext + intro v + rw [ht.iteratedFDeriv_eq_sum_of_completeSpace] + change _ = iteratedFDeriv ℂ m f (g x) (fun i => fderiv ℂ g x (v i)) + rw [hp.iteratedFDeriv_eq_sum_of_completeSpace] + apply Finset.sum_congr rfl + intro σ hσ + rw [composition_leading _ _ m (fun n hn => by simp [cut,hn])] + simp only [cut,lt_self_iff_false,ite_false,hq1] + +end SplitTangent.LeadingJet + + + +open Set Filter +open scoped Topology ContDiff +namespace SplitTangent.LeadingJet +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +lemma iteratedFDeriv_smul_zeroAlternative {f : E → F} {u : E → ℂ} {x : E} + (hf : AnalyticAt ℂ f x) (hu : AnalyticAt ℂ u x) (m : ℕ) + (hu0 : u x=0) (hz : ∀n,n < m → iteratedFDeriv ℂ n f x=0) : + iteratedFDeriv ℂ m (fun y => u y • f y) x=0 := by + obtain ⟨s,hsub,hs,hxs⟩ := _root_.mem_nhds_iff.mp + (hu.eventually_analyticAt.and hf.eventually_analyticAt) + have hu' : ContDiffOn ℂ ω u s := fun y hy => (hsub hy).1.contDiffAt.contDiffWithinAt + have hf' : ContDiffOn ℂ ω f s := fun y hy => (hsub hy).2.contDiffAt.contDiffWithinAt + have hb := norm_iteratedFDerivWithin_smul_le hu' hf' hs.uniqueDiffOn hxs + (n := m) (by simp only [le_top]) + have he (n : ℕ) (g : E → F) : iteratedFDerivWithin ℂ n g s x=iteratedFDeriv ℂ n g x := + iteratedFDerivWithin_of_isOpen n hs hxs + have heu (n : ℕ) : iteratedFDerivWithin ℂ n u s x=iteratedFDeriv ℂ n u x := + iteratedFDerivWithin_of_isOpen n hs hxs + simp only [he,heu] at hb + have hs0 : (∑i∈Finset.range (m+1), (m.choose i : ℝ)*‖iteratedFDeriv ℂ i u x‖* + ‖iteratedFDeriv ℂ (m-i) f x‖)=0 := by + apply Finset.sum_eq_zero + intro i hi + have him : i ≤ m := Finset.mem_range_succ_iff.mp hi + by_cases hi0 : i=0 + · subst i + rw [norm_iteratedFDeriv_zero,hu0,norm_zero,mul_zero,zero_mul] + · rw [hz (m-i) (by omega),norm_zero,mul_zero] + rw [hs0] at hb + exact norm_le_zero_iff.mp hb + +end SplitTangent.LeadingJet + + + +open Set Filter +open scoped Topology ContDiff +namespace SplitTangent.HorizontalJet +section +variable {A B C D F : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + [NormedAddCommGroup C] [NormedSpace ℂ C] [CompleteSpace C] + [NormedAddCommGroup D] [NormedSpace ℂ D] [CompleteSpace D] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +def value (f : A × B → F) (x : A × B) (m : ℕ) : + ContinuousMultilinearMap ℂ (fun _ : Fin m => A × B) F := + (iteratedFDeriv ℂ m (fun a => f (a,x.2)) x.1).compContinuousLinearMap + (fun _ => ContinuousLinearMap.fst ℂ A B) + +omit [CompleteSpace A] [CompleteSpace B] [CompleteSpace F] in +lemma slice_analytic {f : A × B → F} {x : A × B} (hf : AnalyticAt ℂ f x) : + AnalyticAt ℂ (fun a => f (a,x.2)) x.1 := + hf.comp (analyticAt_id.prod analyticAt_const) + +omit [CompleteSpace A] [CompleteSpace B] [CompleteSpace F] in +lemma value_eq_zero_iff (f : A × B → F) (x : A × B) (m : ℕ) : + value f x m=0 ↔ iteratedFDeriv ℂ m (fun a => f (a,x.2)) x.1=0 := by + constructor + · intro h + ext v + exact congrArg (fun T => T (fun i => (v i,0))) h + · intro h + ext v + simp [value,h] + +omit [CompleteSpace A] [CompleteSpace B] [CompleteSpace F] in +lemma value_congr {f g : A × B → F} {x : A × B} + (h : f =ᶠ[𝓝 x] g) (m : ℕ) : value f x m=value g x m := by + have ht : Tendsto (fun a : A => (a,x.2)) (𝓝 x.1) (𝓝 x) := + continuousAt_id.prodMk continuousAt_const + have he : (fun a => f (a,x.2)) =ᶠ[𝓝 x.1] (fun a => g (a,x.2)) := ht.eventually h + unfold value + rw [(he.iteratedFDeriv ℂ m).self_of_nhds] + +omit [CompleteSpace A] [CompleteSpace B] in +lemma value_smul {f : A × B → F} {v : A × B → ℂ} {x : A × B} + (hf : AnalyticAt ℂ f x) (hv : AnalyticAt ℂ v x) (m : ℕ) + (hz : ∀n,n < m → value f x n=0) : + value (fun y => v y • f y) x m=v x • value f x m := by + unfold value + rw [LeadingJet.iteratedFDeriv_smul_of_lower_zero (slice_analytic hf) (slice_analytic hv) m + (fun n hn => (value_eq_zero_iff f x n).mp (hz n hn))] + rfl + + + +omit [CompleteSpace A] [CompleteSpace B] in +theorem value_comp {f : C × D → F} {T : A × B → C × D} {x : A × B} + (hf : AnalyticAt ℂ f (T x)) (hT : AnalyticAt ℂ T x) + (haxes : ∀ᶠ y in 𝓝 x, + (∀a, (fderiv ℂ T y (a,0)).2=0) ∧ (∀b, (fderiv ℂ T y (0,b)).1=0)) + (m : ℕ) (hz : ∀n,n < m → value f (T x) n=0) : + value (f ∘ T) x m = + (value f (T x) m).compContinuousLinearMap (fun _ => fderiv ℂ T x) := by + let g : A → C := fun a => (T (a,x.2)).1 + have hg : AnalyticAt ℂ g x.1 := analyticAt_fst.comp (slice_analytic hT) + have he : (fun a => (f ∘ T) (a,x.2)) =ᶠ[𝓝 x.1] + ((fun c => f (c,(T x).2)) ∘ g) := by + have ht : Tendsto (fun a : A => (a,x.2)) (𝓝 x.1) (𝓝 x) := + continuousAt_id.prodMk continuousAt_const + filter_upwards [ht.eventually (ProductTransition.eventually_product hT haxes)] with a ha + change f (T (a,x.2))=f ((T (a,x.2)).1,(T x).2) + congr 1 + + have hcomp := LeadingJet.iteratedFDeriv_comp_of_lower_zero + (g := g) (x := x.1) (slice_analytic hf) hg m + (fun n hn => (value_eq_zero_iff f (T x) n).mp (hz n hn)) + have hder : fderiv ℂ g x.1= + (ContinuousLinearMap.fst ℂ C D).comp ((fderiv ℂ T x).comp + ((ContinuousLinearMap.id ℂ A).prod (0 : A →L[ℂ] B))) := by + have hp : HasFDerivAt (fun a : A => (a,x.2)) + ((ContinuousLinearMap.id ℂ A).prod (0 : A →L[ℂ] B)) x.1 := + (hasFDerivAt_id x.1).prodMk (hasFDerivAt_const x.2 x.1) + exact ((hT.differentiableAt.hasFDerivAt.comp x.1 hp).fst).fderiv + have hdblock (v : A × B) : (fderiv ℂ T x (v.1,0)).1=(fderiv ℂ T x v).1 := by + have hx0 := haxes.self_of_nhds.2 v.2 + have heq : v=(v.1,0)+(0,v.2) := by simp + conv_rhs => rw [heq,map_add,Prod.fst_add,hx0,add_zero] + ext w + dsimp only [value,ContinuousMultilinearMap.compContinuousLinearMap_apply] + rw [(he.iteratedFDeriv ℂ m).self_of_nhds,hcomp] + simp only [ContinuousMultilinearMap.compContinuousLinearMap_apply,hder, + ContinuousLinearMap.comp_apply,ContinuousLinearMap.prod_apply,ContinuousLinearMap.id_apply, + zero_apply] + change (iteratedFDeriv ℂ m (fun a => f (a,(T x).2)) (T x).1) + (fun i => (fderiv ℂ T x ((w i).1,0)).1) = + (iteratedFDeriv ℂ m (fun a => f (a,(T x).2)) (T x).1) + (fun i => (fderiv ℂ T x (w i)).1) + congr 1 + funext i + exact hdblock (w i) + + + +omit [CompleteSpace A] [CompleteSpace B] in +theorem eventually_zero_of_all_zero {f : A × B → F} {x : A × B} + (hf : AnalyticAt ℂ f x) (hz : ∀m,value f x m=0) : + (fun a => f (a,x.2)) =ᶠ[𝓝 x.1] 0 := by + obtain ⟨p,r,hp⟩ := slice_analytic hf + have hp0 (n : ℕ) (v : A) : p n (fun _ => v)=0 := by + have he := hp.factorial_smul v n + rw [(value_eq_zero_iff f x n).mp (hz n),zero_apply, + ←Nat.cast_smul_eq_nsmul ℂ] at he + exact (smul_eq_zero.mp he).resolve_left (Nat.cast_ne_zero.mpr n.factorial_ne_zero) + have heq : ∀y∈Metric.eball x.1 r, f (y,x.2)=0 := by + intro y hy + have hv : y-x.1∈Metric.eball 0 r := by + change edist (y-x.1) 0 < r + change edist y x.1 < r at hy + simpa [edist_eq_enorm_sub] using hy + have h := hp.hasSum hv + simp only [hp0] at h + have hh := h.unique hasSum_zero + simpa using hh + exact Filter.mem_of_superset (Metric.eball_mem_nhds x.1 hp.r_pos) heq + +end + +variable {E G H A B F : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup G] [NormedSpace ℂ G] + [NormedAddCommGroup H] [NormedSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +lemma iterated_comp_linear {f : G → H} (L : E →L[ℂ] G) {x : E} + (hf : AnalyticAt ℂ f (L x)) (m : ℕ) : + iteratedFDeriv ℂ m (f ∘ L) x= + (iteratedFDeriv ℂ m f (L x)).compContinuousLinearMap (fun _ => L) := by + obtain ⟨p,r,hp⟩ := hf + have hq := hp.compContinuousLinearMap (u := L) + ext w + rw [hq.iteratedFDeriv_eq_sum_of_completeSpace] + change _ = iteratedFDeriv ℂ m f (L x) (fun i => L (w i)) + rw [hp.iteratedFDeriv_eq_sum_of_completeSpace] + rfl + + + +omit [CompleteSpace A] [CompleteSpace B] in +lemma value_eq_total {f : A × B → F} {x : A × B} (hf : AnalyticAt ℂ f x) + (m : ℕ) : value f x m=(iteratedFDeriv ℂ m f x).compContinuousLinearMap + (fun _ => (ContinuousLinearMap.fst ℂ A B).prod (0 : A × B →L[ℂ] B)) := by + let L : A →L[ℂ] A × B := (ContinuousLinearMap.id ℂ A).prod (0 : A →L[ℂ] B) + let h : A × B → F := fun v => f (v+(0,x.2)) + have hh : AnalyticAt ℂ h (L x.1) := by + have hx : L x.1 + (0,x.2) = x := by simp [L] + have hf' : AnalyticAt ℂ f (L x.1+(0,x.2)) := by simpa only [hx] using hf + have hc : AnalyticAt ℂ (fun v : A × B => v+(0,x.2)) (L x.1) := + analyticAt_id.add analyticAt_const + exact AnalyticAt.comp (g := f) (f := fun v : A × B => v+(0,x.2)) hf' hc + have he := iterated_comp_linear L hh m + have heq : h ∘ L = (fun a => f (a,x.2)) := by + funext a + simp [h,L] + rw [heq] at he + ext w + change iteratedFDeriv ℂ m (fun a => f (a,x.2)) x.1 (fun i => (w i).1) = _ + rw [he] + simp only [ContinuousMultilinearMap.compContinuousLinearMap_apply] + change iteratedFDeriv ℂ m (fun v : A × B => f (v+(0,x.2))) (x.1,0) + (fun i => ((w i).1,0)) = iteratedFDeriv ℂ m f x (fun i => ((w i).1,0)) + rw [iteratedFDeriv_comp_add_right] + simp + +omit [CompleteSpace A] [CompleteSpace B] in +theorem analytic_value {f : A × B → F} {x : A × B} (hf : AnalyticAt ℂ f x) + (m : ℕ) : AnalyticAt ℂ (fun y => value f y m) x := by + obtain ⟨U,hUsub,hU,hUx⟩ := _root_.mem_nhds_iff.mp hf.eventually_analyticAt + have hfU : AnalyticOnNhd ℂ f U := fun y hy => hUsub hy + have hi := hfU.iteratedFDeriv m x hUx + let L : (A × B) →L[ℂ] A × B := (ContinuousLinearMap.fst ℂ A B).prod (0 : A × B →L[ℂ] B) + have ha := (ContinuousMultilinearMap.compContinuousLinearMapL (F := F) + (fun _ : Fin m => L)).analyticAt _ |>.comp hi + apply ha.congr + filter_upwards [hU.mem_nhds hUx] with y hy + exact (value_eq_total (hfU y hy) m).symm + +omit [CompleteSpace A] [CompleteSpace B] in +lemma value_symmetric {f : A × B → F} {x : A × B} (hf : AnalyticAt ℂ f x) + (m : ℕ) (w : Fin m → A × B) (σ : Equiv.Perm (Fin m)) : + value f x m (w ∘ σ)=value f x m w := + (slice_analytic hf).contDiffAt.iteratedFDeriv_comp_perm (fun i => (w i).1) σ + + + +omit [CompleteSpace A] [CompleteSpace B] in +lemma analytic_parameter_value [CompleteSpace E] + {f : E × (A × B) → F} {g : E → A × B} {z₀ : E} + (hf : AnalyticAt ℂ f (z₀,g z₀)) (hg : AnalyticAt ℂ g z₀) (m : ℕ) : + AnalyticAt ℂ (fun z => value (fun y => f (z,y)) (g z) m) z₀ := by + let h : A × (E × B) → F := fun w => f (w.2.1,(w.1,w.2.2)) + have hh : AnalyticAt ℂ h ((g z₀).1,(z₀,(g z₀).2)) := + AnalyticAt.comp (g := f) (f := fun w : A × (E × B) => (w.2.1,(w.1,w.2.2))) + hf ((analyticAt_fst.comp analyticAt_snd).prod + (analyticAt_fst.prod (analyticAt_snd.comp analyticAt_snd))) + have hp : AnalyticAt ℂ (fun z => ((g z).1,(z,(g z).2))) z₀ := + (analyticAt_fst.comp hg).prod (analyticAt_id.prod (analyticAt_snd.comp hg)) + have hv := AnalyticAt.comp (g := fun y => value h y m) + (f := fun z => ((g z).1,(z,(g z).2))) (analytic_value hh m) hp + let L : A × B →L[ℂ] A × (E × B) := + (ContinuousLinearMap.fst ℂ A B).prod + ((0 : A × B →L[ℂ] E).prod (ContinuousLinearMap.snd ℂ A B)) + have he := (ContinuousMultilinearMap.compContinuousLinearMapL (F := F) + (fun _ : Fin m => L)).analyticAt _ |>.comp hv + convert he using 1 + ext z w + rfl + +end SplitTangent.HorizontalJet + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Set Filter +open scoped Topology ContDiff +namespace SplitTangent.HorizontalJet +variable {E G H A B F : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup G] [NormedSpace ℂ G] + [NormedAddCommGroup H] [NormedSpace ℂ H] [CompleteSpace H] + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +omit [CompleteSpace A] [CompleteSpace B] in +theorem analytic_valueAlternative {f : A × B → F} {x : A × B} (hf : AnalyticAt ℂ f x) + (m : ℕ) : AnalyticAt ℂ (fun y => value f y m) x := by + obtain ⟨U,hUsub,hU,hUx⟩ := _root_.mem_nhds_iff.mp hf.eventually_analyticAt + have hfU : AnalyticOnNhd ℂ f U := fun y hy => hUsub hy + have hi := hfU.iteratedFDeriv m x hUx + let L : (A × B) →L[ℂ] A × B := (ContinuousLinearMap.fst ℂ A B).prod (0 : A × B →L[ℂ] B) + have ha := (ContinuousMultilinearMap.compContinuousLinearMapL (F := F) + (fun _ : Fin m => L)).analyticAt _ |>.comp hi + apply ha.congr + filter_upwards [hU.mem_nhds hUx] with y hy + exact (value_eq_total (hfU y hy) m).symm + +end SplitTangent.HorizontalJet + + + + + +open Set Filter Topology +namespace SplitTangent.PositiveTensor + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + + + +omit [CompleteSpace E] in +theorem contraction_order {m : ℕ} + (A : ℂ → ContinuousMultilinearMap ℂ (fun _ : Fin m => E) ℂ) + (hA : AnalyticAt ℂ A 0) (v : Fin m → ℂ → E) + (hv : ∀i, AnalyticAt ℂ (v i) 0) (hv0 : ∀i, v i 0 = 0) : + (m : ℕ∞) ≤ analyticOrderAt (fun z => A z (fun i => v i z)) 0 := by + let w : Fin m → ℂ → E := fun i => dslope (v i) 0 + have hw : ∀i, AnalyticAt ℂ (w i) 0 := by + intro i + obtain ⟨p,hp⟩ := hv i + exact ⟨_,hp.has_fpower_series_dslope_fslope⟩ + have ha : AnalyticAt ℂ (fun z => A z (fun i => v i z)) 0 := + (ContinuousLinearMap.id ℂ + (ContinuousMultilinearMap ℂ (fun _ : Fin m => E) ℂ)).analyticAt_uncurry_of_multilinear.comp + (hA.prod (AnalyticAt.pi hv)) + have hb : AnalyticAt ℂ (fun z => A z (fun i => w i z)) 0 := + (ContinuousLinearMap.id ℂ + (ContinuousMultilinearMap ℂ (fun _ : Fin m => E) ℂ)).analyticAt_uncurry_of_multilinear.comp + (hA.prod (AnalyticAt.pi hw)) + apply (natCast_le_analyticOrderAt ha).2 + refine ⟨fun z => A z (fun i => w i z),hb,Filter.Eventually.of_forall fun z => ?_⟩ + have he : (fun i => v i z) = fun i => z • w i z := by + funext i + simpa [w] using (sub_smul_dslope_of_zero (hv0 i) z).symm + rw [he,ContinuousMultilinearMap.map_smul_univ] + simp + +open DiagonalRationality + + +theorem lineSection_zero_of_order {d m : ℕ} (s : lineSections (d : ℤ)) + (hdm : d < m) (hm : (m : ℕ∞) ≤ analyticOrderAt s.val.1 0) : s = 0 := by + apply sectionJet_injective d + rw [map_zero] + ext i + change iteratedDeriv i.val s.val.1 0 = 0 + exact (natCast_le_analyticOrderAt_iff_iteratedDeriv_eq_zero + (s.property.1.analyticAt 0)).mp hm i.val (lt_of_lt_of_le i.isLt (by omega)) + + + +omit [CompleteSpace E] in +theorem lineSection_zero_of_contraction {d m : ℕ} (hdm : d < m) + (s : lineSections (d : ℤ)) + (A : ℂ → ContinuousMultilinearMap ℂ (fun _ : Fin m => E) ℂ) + (hA : AnalyticAt ℂ A 0) (v : Fin m → ℂ → E) + (hv : ∀i, AnalyticAt ℂ (v i) 0) (hv0 : ∀i, v i 0 = 0) + (hs : s.val.1 =ᶠ[𝓝 0] fun z => A z (fun i => v i z)) : s = 0 := by + apply lineSection_zero_of_order s hdm + rw [analyticOrderAt_congr hs] + exact contraction_order A hA v hv hv0 + +end SplitTangent.PositiveTensor + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + +open Set Filter Topology Bundle +open scoped ContDiff Manifold + + + +open Set Filter Topology Bundle +open scoped ContDiff Manifold + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators +namespace MvPolynomial +open scoped _root_.MvPolynomial + +lemma contMDiffAt_eval_comp {σ E H M : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] [TopologicalSpace H] + (I : ModelWithCorners ℂ E H) [TopologicalSpace M] [ChartedSpace H M] + (p : MvPolynomial σ ℂ) {v : M → σ → ℂ} {x : M} + (hv : ∀i,ContMDiffAt I 𝓘(ℂ,ℂ) ω (fun y => v y i) x) : + ContMDiffAt I 𝓘(ℂ,ℂ) ω (fun y => _root_.MvPolynomial.eval (v y) p) x := by + induction p using MvPolynomial.induction_on with + | C a => simpa only [_root_.MvPolynomial.eval_C] using (contMDiffAt_const (c := a)) + | add p q hp hq => + have he : (fun y => _root_.MvPolynomial.eval (v y) (p+q)) = ((fun y => _root_.MvPolynomial.eval (v y) p)+(fun y => _root_.MvPolynomial.eval (v y) q)) := by + funext y + exact _root_.MvPolynomial.eval_add + rw [he] + exact hp.add hq + | mul_X p i hp => + have he : (fun y => _root_.MvPolynomial.eval (v y) (p*_root_.MvPolynomial.X i)) = ((fun y => _root_.MvPolynomial.eval (v y) p)*(fun y => v y i)) := by + funext y + simp only [_root_.MvPolynomial.eval_mul,_root_.MvPolynomial.eval_X,Pi.mul_apply] + rw [he] + exact hp.mul (hv i) + +lemma IsHomogeneous.eval_scale {σ : Type*} [Fintype σ] + {p : MvPolynomial σ ℂ} {k : ℕ} (hp : p.IsHomogeneous k) + (c : ℂ) (v : σ → ℂ) : _root_.MvPolynomial.eval (c • v) p=c^k*_root_.MvPolynomial.eval v p := by + classical + rw [_root_.MvPolynomial.eval_eq',_root_.MvPolynomial.eval_eq'] + change (∑m∈p.support,p.coeff m * ∏i,(c*v i)^(m i))=_ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m hm + have hn : (∑i,m i)=k := by + rw [hp.degree_eq_sum_deg_support hm] + symm + exact Finset.sum_subset (Finset.subset_univ _) (fun i _ hi => Finsupp.notMem_support_iff.mp hi) + simp only [mul_pow,Finset.prod_mul_distrib,Finset.prod_pow_eq_pow_sum,hn] + ring + +end MvPolynomial + + + + + +open Set Filter Topology +namespace AnalyticGermContinuation +variable {A : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] + +def LocallyAnalyticZeroSet (Z T : Set A) : Prop := ∀a∈T, + ∃(r : ℝ),0 hUV ⟨hsub ht.1,ht.2⟩⟩ + + + +theorem exists_slices (Q : OpenPartialHomeomorph (A × B) (A × B)) + {x : A × B} (hx : x∈Q.source) (hsecond : ∀z,(Q z).2=z.2) + {U : Set A} {V : Set B} (hU : IsOpen U) (hV : IsOpen V) (hxUV : x∈U ×ˢ V) : + ∃ U' V',IsOpen U' ∧ IsPreconnected U' ∧ IsOpen V' ∧ + (Q x).1∈U' ∧ x.2∈V' ∧ V'⊆V ∧ U' ×ˢ V' ⊆ Q.target ∧ + ∀a∈U',∀b∈V',Q.symm (a,b)∈U ×ˢ V ∧ (Q.symm (a,b)).2=b := by + have hT := Q.map_source hx + have hinv : Q.symm ⁻¹' (U ×ˢ V)∈𝓝 (Q x) := + (Q.symm.continuousAt hT).preimage_mem_nhds (by + rw [Q.left_inv hx] + exact (hU.prod hV).mem_nhds hxUV) + obtain ⟨U',V',hU',hUc,hV',hx',hsub⟩ := connected_rectangle + (Filter.inter_mem (Q.open_target.mem_nhds hT) hinv) + refine ⟨U',V'∩V,hU',hUc,hV'.inter hV,hx'.1,?_,inter_subset_right,?_,?_⟩ + · exact ⟨hsecond x ▸ hx'.2,hxUV.2⟩ + · intro t ht + exact (hsub ⟨ht.1,ht.2.1⟩).1 + · intro a ha b hb + have ht := hsub (show (a,b)∈U' ×ˢ V' from ⟨ha,hb.1⟩) + refine ⟨ht.2,?_⟩ + have he := congrArg Prod.snd (Q.right_inv ht.1) + rwa [hsecond] at he + +end UniformPlaqueSlices + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + +open scoped Manifold ContDiff BigOperators +namespace HolomorphicDeterminant +variable {E H M : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [TopologicalSpace H] (I : ModelWithCorners ℂ E H) + [TopologicalSpace M] [ChartedSpace H M] {n : ℕ} +lemma contMDiffAt_det {v : M → Matrix (Fin n) (Fin n) ℂ} {x : M} + (h : ∀i j,ContMDiffAt I 𝓘(ℂ,ℂ) ω (fun t => v t i j) x) : + ContMDiffAt I 𝓘(ℂ,ℂ) ω (fun t => Matrix.det (v t)) x := by + classical + simp only [Matrix.det_apply'] + apply ContMDiffAt.sum + intro σ hσ + apply contMDiffAt_const.mul + apply ContMDiffAt.prod + intro i hi + exact h _ _ +end HolomorphicDeterminant + + + + + +open Set +open scoped BigOperators +namespace FiniteSampling + +lemma exists_nonsingular_samples {A : Type*} {n : ℕ} + (v : A → Fin n → ℂ) + (h : ∀c : Fin n → ℂ,c≠0 → ∃a,∑i,v a i*c i≠0) : + ∃s : Fin n → A, Matrix.det (fun i j => v (s i) j)≠0 := by + classical + let l : A → Module.Dual ℂ (Fin n → ℂ) := fun a => dotProductEquiv ℂ (Fin n) (v a) + have htop : Submodule.span ℂ (Set.range l)=⊤ := by + apply Submodule.span_eq_top_of_ne_zero + intro c hc + obtain ⟨a,ha⟩ := h c hc + exact ⟨l a,⟨a,rfl⟩,ha⟩ + have hdim : Module.finrank ℂ (Submodule.span ℂ (Set.range l))=n := by + rw [htop,finrank_top,←(dotProductEquiv ℂ (Fin n)).finrank_eq] + simp + have H := Submodule.exists_fun_fin_finrank_span_eq ℂ (Set.range l) + rw [hdim] at H + obtain ⟨f,hf,hspan,hlin⟩ := H + choose s hs using hf + refine ⟨s,?_⟩ + have hli : LinearIndependent ℂ (fun i => v (s i)) := by + have hh := hlin.map' (dotProductEquiv ℂ (Fin n)).symm.toLinearMap + (LinearMap.ker_eq_bot.mpr (dotProductEquiv ℂ (Fin n)).symm.injective) + convert! hh using 1 + funext i + change v (s i)=(dotProductEquiv ℂ (Fin n)).symm (f i) + rw [←hs i] + exact ((dotProductEquiv ℂ (Fin n)).symm_apply_apply (v (s i))).symm + exact Matrix.nonsingular_iff_det_ne_zero.mp (Matrix.Nonsingular.of_linearIndependent_row hli) + +lemma relation_iff_det_zero {A : Type*} {n : ℕ} (v : A → Fin n → ℂ) : + (∃c : Fin n → ℂ,c≠0 ∧ ∀a,∑i,v a i*c i=0) ↔ + ∀s : Fin n → A,Matrix.det (fun i j => v (s i) j)=0 := by + classical + constructor + · rintro ⟨c,hc,hz⟩ s + by_contra hd + have hinj := Matrix.mulVec_injective_of_det_ne_zero hd + apply hc + apply hinj + ext i + change (∑j,v (s i) j*c j)=(Matrix.mulVec (fun i j => v (s i) j) (0 : Fin n → ℂ)) i + simp [Matrix.mulVec,dotProduct,hz] + · intro h + by_contra hn + push Not at hn + obtain ⟨s,hs⟩ := exists_nonsingular_samples v hn + exact hs (h s) + +end FiniteSampling + + + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + +open Set Filter Topology +namespace SplitTangent.ProjectorSpanning +variable {E B : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [TopologicalSpace B] + + + +theorem eventually_range_eq {P M : B → E →L[ℂ] E} {x : B} + (hP : ContinuousAt P x) (hM : ContinuousAt M x) (hx : M x=P x) + (hPP : ∀ᶠy in 𝓝 x, ∀v,P y (P y v)=P y v) + (hPM : ∀ᶠy in 𝓝 x, ∀v,P y (M y v)=M y v) : + ∀ᶠy in 𝓝 x,LinearMap.range (M y).toLinearMap=LinearMap.range (P y).toLinearMap := by + let L : B → E →L[ℂ] E := fun y => M y+1-P y + have hL : ContinuousAt L x := (hM.add continuousAt_const).sub hP + have hLx : L x=1 := by simp [L,hx] + have hInv : ∀ᶠy in 𝓝 x,IsUnit (L y) := + hL.preimage_mem_nhds (Units.isOpen.mem_nhds (by rw [hLx]; exact isUnit_one)) + filter_upwards [hInv,hPP,hPM] with y hy hPP hPM + apply le_antisymm + · rintro v ⟨w,rfl⟩ + exact ⟨M y w,hPM w⟩ + · rintro v ⟨w,rfl⟩ + obtain ⟨a,ha⟩ := (ContinuousLinearMap.isUnit_iff_bijective.mp hy).2 w + refine ⟨a,?_⟩ + rw [←ha] + change M y a=P y (M y a+a-P y a) + rw [map_sub,map_add,hPM a,hPP a] + abel + + + +omit [CompleteSpace E] in +theorem multilinear_zero_of_basis_range {n m : ℕ} + (M : (Fin n → ℂ) →L[ℂ] E) + (A : ContinuousMultilinearMap ℂ (fun _ : Fin m => E) ℂ) + (hA : ∀j : Fin m → Fin n,A (fun i => M ((Pi.basisFun ℂ (Fin n)) (j i)))=0) + (v : Fin m → E) (hv : ∀i,v i∈LinearMap.range M.toLinearMap) : A v=0 := by + classical + let C := A.compContinuousLinearMap (fun _ => M) + have hz : C.toMultilinearMap=0 := by + apply Module.Basis.ext_multilinear (fun _ : Fin m => Pi.basisFun ℂ (Fin n)) + exact hA + choose w hw using hv + have hc := congrArg (fun A : MultilinearMap ℂ (fun _ : Fin m => Fin n → ℂ) ℂ => A w) hz + change A (fun i => M (w i))=0 at hc + have he : (fun i => M (w i))=v := funext hw + rwa [he] at hc + +end SplitTangent.ProjectorSpanning + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Function +namespace SplitTangent.SymmetricIndex + + + +abbrev Sorted (r m : ℕ) := {j : Fin m → Fin r // Monotone j} + +def toSym {r m : ℕ} (j : Sorted r m) : Sym (Fin r) m := + ⟨(List.ofFn j.val : Multiset (Fin r)),by simp⟩ + +theorem toSym_injective {r m : ℕ} : Function.Injective (@toSym r m) := by + intro j k he + have hp : List.Perm (List.ofFn j.val) (List.ofFn k.val) := + Quotient.exact (congrArg Subtype.val he) + apply Subtype.ext + exact List.ofFn_injective (hp.eq_of_pairwise' + j.property.sortedLE_ofFn.pairwise k.property.sortedLE_ofFn.pairwise) + +theorem card_le (r m : ℕ) : Fintype.card (Sorted r m)≤(r+m-1).choose m := by + simpa only [Sym.card_sym_eq_choose,Fintype.card_fin] using + Fintype.card_le_of_injective (@toSym r m) toSym_injective + +def sort {r m : ℕ} (j : Fin m → Fin r) : Sorted r m := + ⟨j ∘ Tuple.sort j,Tuple.monotone_sort j⟩ + + +theorem zero_of_sorted {r m : ℕ} {V W : Type*} [Zero W] + (A : (Fin m → V) → W) (σ : Fin r → V) + (hA : ∀(v : Fin m → V) (p : Equiv.Perm (Fin m)),A (v ∘ p)=A v) + (h : ∀j : Sorted r m,A (σ ∘ j.val)=0) : ∀j : Fin m → Fin r,A (σ ∘ j)=0 := by + intro j + rw [←hA (σ ∘ j) (Tuple.sort j)] + exact h (sort j) + +end SplitTangent.SymmetricIndex + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +namespace SeparatedQuotientFiltration +variable {K V : Type*} [Field K] [AddCommGroup V] [Module K V] + (F : ℕ → Submodule K V) (hF : Antitone F) + +abbrev zeroPart : Submodule K V := ⨅m,F m +abbrev Space := V ⧸ zeroPart F +abbrev stage (m : ℕ) : Submodule K (Space F) := (F m).map (zeroPart F).mkQ + +lemma zeroPart_le (m : ℕ) : zeroPart F ≤ F m := iInf_le F m +include hF in +lemma stage_antitone : Antitone (stage F) := fun _ _ h => Submodule.map_mono (hF h) + +def project (m : ℕ) : F m →ₗ[K] stage F m where + toFun v := ⟨(zeroPart F).mkQ v,⟨v,v.property,rfl⟩⟩ + map_add' _ _ := Subtype.ext (map_add _ _ _) + map_smul' _ _ := Subtype.ext (map_smul _ _ _) + +lemma project_surjective (m : ℕ) : Function.Surjective (project F m) := by + intro w + obtain ⟨v,hv,he⟩ := w.property + exact ⟨⟨v,hv⟩,Subtype.ext he⟩ + +lemma project_zero_iff (m : ℕ) (v : F m) : project F m v=0 ↔ v.val∈zeroPart F := by + change (⟨(zeroPart F).mkQ v,_⟩ : stage F m)=0 ↔ _ + rw [Subtype.ext_iff] + exact Submodule.Quotient.mk_eq_zero _ + +lemma separated (w : Space F) (hw : ∀m,w∈stage F m) : w=0 := by + obtain ⟨v,rfl⟩ := (zeroPart F).mkQ_surjective w + apply (Submodule.Quotient.mk_eq_zero _).mpr + refine (Submodule.mem_iInf _).mpr fun m => ?_ + obtain ⟨b,hb,he⟩ := hw m + have hvb : v-b∈zeroPart F := (Submodule.Quotient.eq _).mp he.symm + have hdiff : v-b∈F m := zeroPart_le F m hvb + simpa only [sub_add_cancel] using (F m).add_mem hdiff hb + +variable {G : ℕ → Type*} [∀m,AddCommGroup (G m)] [∀m,Module K (G m)] + (L : ∀m,F m →ₗ[K] G m) + (hker : ∀m v,L m v=0 ↔ v.val∈F (m+1)) + +include hker in +lemma descends (m : ℕ) : LinearMap.ker (project F m) ≤ LinearMap.ker (L m) := by + intro v hv + exact (hker m v).mpr (zeroPart_le F (m+1) ((project_zero_iff F m v).mp hv)) + +def leading (m : ℕ) : stage F m →ₗ[K] G m := + ((LinearMap.ker (project F m)).liftQ (L m) (descends F L hker m)).comp + ((project F m).quotKerEquivOfSurjective (project_surjective F m)).symm.toLinearMap + +@[simp] lemma leading_project (m : ℕ) (v : F m) : + leading F L hker m (project F m v)=L m v := by + simp [leading] + +lemma leading_kernel (m : ℕ) (w : stage F m) : + leading F L hker m w=0 ↔ w.val∈stage F (m+1) := by + obtain ⟨v,rfl⟩ := project_surjective F m w + rw [leading_project,hker] + constructor + · intro hv + exact ⟨v,hv,rfl⟩ + · rintro ⟨b,hb,he⟩ + have hd : v.val-b∈zeroPart F := (Submodule.Quotient.eq _).mp he.symm + exact sub_add_cancel v.val b ▸ (F (m+1)).add_mem (zeroPart_le F (m+1) hd) hb + +end SeparatedQuotientFiltration + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +open Set Filter Topology +namespace AnalyticFlatFamily +variable {E A F : Type*} + [NormedAddCommGroup E] [NormedSpace ℂ E] [CompleteSpace E] + [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup F] [NormedSpace ℂ F] [CompleteSpace F] + +omit [CompleteSpace A] in +lemma germ_zero_of_derivatives {f : A → F} {a : A} (hf : AnalyticAt ℂ f a) + (hz : ∀m,iteratedFDeriv ℂ m f a=0) : f =ᶠ[𝓝 a] 0 := by + obtain ⟨p,r,hp⟩ := hf + have hp0 (n : ℕ) (v : A) : p n (fun _ => v)=0 := by + have he := hp.factorial_smul v n + rw [hz n,zero_apply,←Nat.cast_smul_eq_nsmul ℂ] at he + exact (smul_eq_zero.mp he).resolve_left (Nat.cast_ne_zero.mpr n.factorial_ne_zero) + apply Filter.mem_of_superset (Metric.eball_mem_nhds a hp.r_pos) + intro y hy + have hv : y-a∈Metric.eball 0 r := by + change edist (y-a) 0 < r + change edist y a < r at hy + simpa [edist_eq_enorm_sub] using hy + have h := hp.hasSum hv + simp only [hp0] at h + simpa using h.unique hasSum_zero + + + +omit [CompleteSpace E] [CompleteSpace A] in +theorem joint_germ_zero {f : E × A → F} {c : E → A} {z₀ : E} + (hf : AnalyticAt ℂ f (z₀,c z₀)) (hc : ContinuousAt c z₀) + (hz : ∀ᶠ z in 𝓝 z₀,(fun a => f (z,a)) =ᶠ[𝓝 (c z)] 0) : + f =ᶠ[𝓝 (z₀,c z₀)] 0 := by + obtain ⟨r,hr,ha⟩ := hf.exists_ball_analyticOnNhd + have hc' : ∀ᶠ z in 𝓝 z₀,c z∈Metric.ball (c z₀) r := + hc.eventually (Metric.ball_mem_nhds _ hr) + have hz' : ∀ᶠ z in 𝓝 z₀,∀a∈Metric.ball (c z₀) r,f (z,a)=0 := by + filter_upwards [hz,hc',Metric.ball_mem_nhds z₀ hr] with z hzg hcz hzz + have hs : AnalyticOnNhd ℂ (fun a => f (z,a)) (Metric.ball (c z₀) r) := by + intro a haz + have hp : (z,a)∈Metric.ball (z₀,c z₀) r := by + simpa only [Metric.mem_ball,Prod.dist_eq,max_lt_iff] using And.intro hzz haz + exact (ha (z,a) hp).comp (analyticAt_const.prod analyticAt_id) + exact hs.eqOn_zero_of_preconnected_of_eventuallyEq_zero + (convex_ball (c z₀) r).isPreconnected hcz hzg + have h1 : Tendsto (Prod.fst : E × A → E) (𝓝 (z₀,c z₀)) (𝓝 z₀) := continuousAt_fst + have h2 : Tendsto (Prod.snd : E × A → A) (𝓝 (z₀,c z₀)) (𝓝 (c z₀)) := continuousAt_snd + filter_upwards [h1.eventually hz',h2.eventually (Metric.ball_mem_nhds _ hr)] with q hq1 hq2 + exact hq1 q.2 hq2 + +end AnalyticFlatFamily + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped BigOperators +namespace PolynomialCoefficientGerms + +lemma coefficients_zero {n : ℕ} (c : Fin n → ℂ) (z₀ : ℂ) + (h : (fun z : ℂ => ∑i : Fin n,z^i.val*c i) =ᶠ[𝓝 z₀] 0) : ∀i,c i=0 := by + classical + let p : Polynomial ℂ := ∑i : Fin n,Polynomial.monomial i.val (c i) + have hroot : {z : ℂ | p.IsRoot z}∈𝓝 z₀ := by + filter_upwards [h] with z hz + simpa only [p,Polynomial.IsRoot,Polynomial.eval_finsetSum,Polynomial.eval_monomial,mul_comm,Pi.zero_apply] + using hz + have hp : p=0 := p.eq_zero_of_infinite_isRoot (infinite_of_mem_nhds z₀ hroot) + intro i + have hh := congrArg (fun q : Polynomial ℂ => q.coeff i.val) hp + simpa only [p,Polynomial.finsetSum_coeff,Polynomial.coeff_monomial, + Polynomial.coeff_zero,Fin.val_inj,Finset.sum_ite_eq',Finset.mem_univ,ite_true] using hh + + + +theorem coefficient_germs {A : Type*} [TopologicalSpace A] {a₀ : A} {n : ℕ} + (c : Fin n → A → ℂ) (z₀ : ℂ) + (h : (fun q : ℂ × A => ∑i : Fin n,q.1^i.val*c i q.2) =ᶠ[𝓝 (z₀,a₀)] 0) : + ∀i,c i =ᶠ[𝓝 a₀] 0 := by + obtain ⟨U,hU,V,hV,hUV⟩ := mem_nhds_prod_iff.mp h + intro i + filter_upwards [hV] with a ha + apply coefficients_zero (fun j => c j a) z₀ (i := i) + filter_upwards [hU] with z hz + exact hUV (show (z,a)∈U ×ˢ V from ⟨hz,ha⟩) + +end PolynomialCoefficientGerms + + + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +namespace LinearKernelDimension +variable {K V W U : Type*} [Field K] + [AddCommGroup V] [Module K V] [AddCommGroup W] [Module K W] + [AddCommGroup U] [Module K U] + +def factor (f : V →ₗ[K] W) (g : V →ₗ[K] U) (h : f.ker ≤ g.ker) : + f.range →ₗ[K] U := + (f.ker.liftQ g h).comp f.quotKerEquivRange.symm.toLinearMap + +@[simp] lemma factor_apply (f : V →ₗ[K] W) (g : V →ₗ[K] U) (h : f.ker ≤ g.ker) (v : V) : + factor f g h (f.rangeRestrict v)=g v := by + change (f.ker.liftQ g h) (f.quotKerEquivRange.symm (f.rangeRestrict v))=g v + have he : f.quotKerEquivRange (f.ker.mkQ v)=f.rangeRestrict v := rfl + rw [←he,LinearEquiv.symm_apply_apply] + rfl + +theorem finite_and_bound [Module.Finite K W] (f : V →ₗ[K] W) (g : V →ₗ[K] U) + (h : f.ker ≤ g.ker) (hg : Function.Surjective g) : + Module.Finite K U ∧ Module.finrank K U ≤ Module.finrank K W := by + have hs : Function.Surjective (factor f g h) := by + intro u + obtain ⟨v,rfl⟩ := hg u + exact ⟨f.rangeRestrict v,factor_apply f g h v⟩ + let : Module.Finite K U := Module.Finite.of_surjective (factor f g h) hs + exact ⟨inferInstance,(LinearMap.finrank_le_finrank_of_surjective hs).trans + (Submodule.finrank_le f.range)⟩ + +end LinearKernelDimension + + + + + +namespace PolynomialGrowthArithmetic + +lemma cancel_graph_dimension (k d r n : ℕ) + (h : (k+1)*n ≤ (k+k*d+r).choose r*(k+k*d+1)) : + n ≤ (d+r+1)^r*(d+1)*(k+1)^r := by + have h₁ : k+k*d+r ≤ (d+r+1)*(k+1) := by nlinarith + have h₂ : k+k*d+1 ≤ (d+1)*(k+1) := by nlinarith + have hb := h.trans (Nat.mul_le_mul + ((Nat.choose_le_pow _ _).trans (Nat.pow_le_pow_left h₁ r)) h₂) + have he : ((d+r+1)*(k+1))^r*((d+1)*(k+1)) = + (k+1)*((d+r+1)^r*(d+1)*(k+1)^r) := by rw [mul_pow]; ring + rw [he] at hb + exact Nat.le_of_mul_le_mul_left hb (by omega) + +lemma box_exceeds (C r : ℕ) : ∃t : ℕ, + C*((r+1)*t+1)^r < (t+1)^(r+1) := by + let t := C*(r+1)^r+1 + refine ⟨t,?_⟩ + have ha : (r+1)*t+1 ≤ (r+1)*(t+1) := by nlinarith + have hb : C*(r+1)^r < t+1 := by dsimp [t]; omega + calc + C*((r+1)*t+1)^r ≤ C*((r+1)*(t+1))^r := + Nat.mul_le_mul_left _ (Nat.pow_le_pow_left ha r) + _ = (C*(r+1)^r)*(t+1)^r := by rw [mul_pow]; ring + _ < (t+1)*(t+1)^r := Nat.mul_lt_mul_of_pos_right hb (by positivity) + _ = (t+1)^(r+1) := by rw [pow_succ]; ring + +end PolynomialGrowthArithmetic + + + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +open scoped BigOperators +namespace BoxMonomials +open _root_.MvPolynomial + +def homogeneousAlternative {σ : Type*} {m t : ℕ} (j : σ) (v : Fin m → σ) (e : Box m t) : + homogeneousSubmodule σ ℂ (m*t) := + ⟨MvPolynomial.X j^(m*t-∑i,(e i).val)*∏i,MvPolynomial.X (v i)^(e i).val,by + apply (mem_homogeneousSubmodule _ _).mpr + have h₁ := isHomogeneous_X_pow (R := ℂ) j (m*t-∑i,(e i).val) + have h₂ := IsHomogeneous.prod Finset.univ (fun i => (MvPolynomial.X (v i) : MvPolynomial σ ℂ)^(e i).val) + (fun i => (e i).val) (fun i _ => isHomogeneous_X_pow _ _) + simpa only [Nat.sub_add_cancel (degree_le e)] using h₁.mul h₂⟩ + +end BoxMonomials + + + +open scoped BigOperators +namespace BoxMonomials +open _root_.MvPolynomial + + + +def homogeneousForms {σ : Type*} {m t : ℕ} + (D : homogeneousSubmodule σ ℂ 1) (H : Fin m → homogeneousSubmodule σ ℂ 1) + (e : Box m t) : homogeneousSubmodule σ ℂ (m*t) := + ⟨D.val^(m*t-∑i,(e i).val)*∏i,(H i).val^(e i).val,by + apply (mem_homogeneousSubmodule _ _).mpr + have hD : D.val.IsHomogeneous 1 := (mem_homogeneousSubmodule _ _).mp D.property + have hH : ∀i,(H i).val.IsHomogeneous 1 := + fun i => (mem_homogeneousSubmodule _ _).mp (H i).property + have h₁ : (D.val^(m*t-∑i,(e i).val)).IsHomogeneous (m*t-∑i,(e i).val) := by + simpa using hD.pow (m*t-∑i,(e i).val) + have h₂ := IsHomogeneous.prod Finset.univ (fun i => (H i).val^(e i).val) + (fun i => (e i).val) (fun i _ => by simpa using (hH i).pow (e i).val) + simpa only [Nat.sub_add_cancel (degree_le e)] using h₁.mul h₂⟩ + +lemma eval_homogeneousForms {σ : Type*} {m t : ℕ} + (D : homogeneousSubmodule σ ℂ 1) (H : Fin m → homogeneousSubmodule σ ℂ 1) + (e : Box m t) (x : σ → ℂ) (hD : eval x D.val≠0) : + eval x (homogeneousForms D H e).val = (eval x D.val)^(m*t)* + eval (fun i => eval x (H i).val/eval x D.val) (affine e) := by + classical + simp only [homogeneousForms,eval_mul,map_pow,map_prod,eval_affine,div_pow, + Finset.prod_div_distrib,Finset.prod_pow_eq_pow_sum] + rw [pow_sub₀ _ hD (degree_le e)] + field_simp + +end BoxMonomials + + + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + + + +open Set Filter Topology +open scoped ContDiff +namespace RectangularInverse +variable {A B V : Type*} + [NormedAddCommGroup A] [NormedSpace ℂ A] [FiniteDimensional ℂ A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [FiniteDimensional ℂ B] + [NormedAddCommGroup V] [NormedSpace ℂ V] [FiniteDimensional ℂ V] + +omit [FiniteDimensional ℂ A] in +lemma exists_continuous_left_inverse (D : A →L[ℂ] V) (hi : Function.Injective D) : + ∃p : V →L[ℂ] A,p.comp D=ContinuousLinearMap.id ℂ A := by + obtain ⟨p,hp⟩ := D.toLinearMap.exists_leftInverse_of_injective (LinearMap.ker_eq_bot.mpr hi) + refine ⟨p.toContinuousLinearMap,?_⟩ + ext a + exact LinearMap.congr_fun hp a + +omit [FiniteDimensional ℂ A] [FiniteDimensional ℂ B] in +lemma triangular_bijective (D : A × B →L[ℂ] A) + (hD : ∀a,D (a,0)=a) : Function.Bijective (D.prod (ContinuousLinearMap.snd ℂ A B)) := by + have he (a : A) (b : B) : D (a,b)=a+D (0,b) := by + have hd := D.map_add (a,0) (0,b) + simpa only [Prod.mk_add_mk,add_zero,zero_add,hD] using hd + constructor + · intro x y h + have hb := congrArg Prod.snd h + have ha := congrArg Prod.fst h + change x.2=y.2 at hb + change D x=D y at ha + change D (x.1,x.2)=D (y.1,y.2) at ha + rw [he x.1 x.2,he y.1 y.2,hb] at ha + exact Prod.ext (add_right_cancel ha) hb + · intro y + refine ⟨(y.1-D (0,y.2),y.2),?_⟩ + apply Prod.ext + · change D (y.1-D (0,y.2),y.2)=y.1 + rw [he,sub_add_cancel] + · rfl + + + +theorem exists_chart {f : A × B → V} {x : A × B} (hf : AnalyticAt ℂ f x) + (hi : Function.Injective ((fderiv ℂ f x).comp (ContinuousLinearMap.inl ℂ A B))) : + ∃(p : V →L[ℂ] A) (Q : OpenPartialHomeomorph (A × B) (A × B)), + x∈Q.source ∧ (∀z,Q z=(p (f z),z.2)) ∧ + AnalyticAt ℂ Q x ∧ AnalyticAt ℂ Q.symm (Q x) := by + obtain ⟨p,hp⟩ := exists_continuous_left_inverse _ hi + let ψ : A × B → A × B := fun z => (p (f z),z.2) + have hψ : AnalyticAt ℂ ψ x := ((p.analyticAt (f x)).comp hf).prod analyticAt_snd + have hdψ : fderiv ℂ ψ x=((p.comp (fderiv ℂ f x)).prod (ContinuousLinearMap.snd ℂ A B)) := + ((p.hasFDerivAt.comp x hf.differentiableAt.hasFDerivAt).prodMk + (ContinuousLinearMap.snd ℂ A B).hasFDerivAt).fderiv + have hbij : Function.Bijective (fderiv ℂ ψ x) := by + rw [hdψ] + apply triangular_bijective + intro a + exact DFunLike.congr_fun hp a + let E := (LinearEquiv.ofBijective (fderiv ℂ ψ x).toLinearMap hbij).toContinuousLinearEquiv + have hd : HasFDerivAt ψ (E : A × B →L[ℂ] A × B) x := hψ.differentiableAt.hasFDerivAt + let hc : ContDiffAt ℂ ω ψ x := hψ.contDiffAt + let Q := hc.toOpenPartialHomeomorph ψ hd (by simp) + refine ⟨p,Q,hc.mem_toOpenPartialHomeomorph_source hd (by simp),fun _ => rfl,hψ,?_⟩ + exact (hc.to_localInverse hd (by simp)).analyticAt + +end RectangularInverse + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators +namespace PolynomialSpecialization +open _root_.MvPolynomial + +lemma eval_analyticAtAlternative {σ : Type*} [Fintype σ] (p : MvPolynomial σ ℂ) (x : σ → ℂ) : + AnalyticAt ℂ (fun y => eval y p) x := by + induction p using MvPolynomial.induction_on with + | C c => simpa only [eval_C] using (analyticAt_const (v := c) (x := x)) + | add p q hp hq => + have he : (fun y => eval y (p+q))=((fun y => eval y p)+(fun y => eval y q)) := by + funext y + exact eval_add + rw [he] + exact hp.add hq + | mul_X p i hp => + have he : (fun y => eval y (p*MvPolynomial.X i))=((fun y => eval y p)*(fun y => y i)) := by + funext y + simp only [eval_mul,eval_X,Pi.mul_apply] + rw [he] + exact hp.mul ((ContinuousLinearMap.proj i : (σ → ℂ) →L[ℂ] ℂ).analyticAt x) + +end PolynomialSpecialization + + + + + +open Set Filter Topology +namespace PolynomialSpecialization +open _root_.MvPolynomial +variable {σ ι A B Y : Type*} [Fintype σ] [Fintype ι] + [NormedAddCommGroup A] [NormedSpace ℂ A] + + + +theorem finite_transversal + (T : Set B) {U : Set A} (hU : IsOpen U) (hne : U.Nonempty) + (E : A ≃L[ℂ] (σ → ℂ)) (lift : A → B → Y) + (coord : Y → ι → ℂ) (first : Y → σ → ℂ) + (hfirst : ∀a∈U,∀b∈T,first (lift a b)=E a) + (hinj : ∀a∈U,Set.InjOn (fun b => coord (lift a b)) T) + (p : ι → MvPolynomial (Option σ) ℂ) (hp : ∀i,p i≠0) + (hroot : ∀a∈U,∀b∈T,∀i, + eval (fun t => Option.elim t (coord (lift a b) i) (first (lift a b))) (p i)=0) : + T.Finite := by + obtain ⟨a,ha,hn⟩ := generic_specialization p hp (E.isOpenMap U hU) (hne.image E) + obtain ⟨c,hc,hca⟩ := ha + apply finite_fiber T (fun b => coord (lift c b)) (hinj c hc) + (fun i => Polynomial.map (eval a) (optionEquivLeft ℂ σ (p i))) hn + intro b hb i + have hr := hroot c hc b hb i + rw [hfirst c hc b hb,hca,optionEquivLeft_elim_eval] at hr + exact hr + +end PolynomialSpecialization + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology +open scoped Manifold ContDiff + +namespace HolomorphicLocalDiffeomorph +section +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] +variable {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] + [ChartedSpace E M] [ChartedSpace F N] + [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] + + + +theorem of_analytic_partial_homeomorphAlternative (φ : OpenPartialHomeomorph M N) + {x : M} (hx : x∈φ.source) + (hφ : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ x) + (hφs : ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm (φ x)) : + IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ x := by + have he : ∀ᶠ y in 𝓝 x, + ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω φ y ∧ + ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm (φ y) := + ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).1 hφ).and + (hφ.continuousAt.eventually ((contMDiffAt_iff_contMDiffAt_nhds (by simp)).1 hφs)) + obtain ⟨U,hUsub,hU,hxU⟩ := _root_.mem_nhds_iff.mp he + let ψ := φ.restrOpen U hU + let Φ : PartialDiffeomorph 𝓘(ℂ,E) 𝓘(ℂ,F) M N ω := { + ψ.toPartialEquiv with + open_source := ψ.open_source + open_target := ψ.open_target + contMDiffOn_toFun := by + intro y hy + exact (hUsub hy.2).1.contMDiffWithinAt + contMDiffOn_invFun := by + intro y hy + have hz : φ.symm y∈ψ.source := ψ.map_target hy + have hh := (hUsub hz.2).2 + change ContMDiffWithinAt 𝓘(ℂ,F) 𝓘(ℂ,E) ω φ.symm ψ.target y + simpa only [φ.right_inv hy.1] using hh.contMDiffWithinAt } + exact ⟨Φ,⟨hx,hxU⟩,fun _ _ => rfl⟩ + +end + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] +variable {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] + [ChartedSpace E M] [ChartedSpace F N] + [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] + +omit [IsManifold 𝓘(ℂ, E) ω M] [IsManifold 𝓘(ℂ, F) ω N] in +theorem congr_eventuallyAlternative {f g : M → N} {x : M} + (hf : IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x) + (he : f=ᶠ[𝓝 x]g) : IsLocalDiffeomorphAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω g x := by + obtain ⟨φ,hx,hφ⟩ := hf + obtain ⟨U,hUsub,hU,hxU⟩ := _root_.mem_nhds_iff.mp he + let ψ := φ.toOpenPartialHomeomorph.restrOpen U hU + let Φ : PartialDiffeomorph 𝓘(ℂ,E) 𝓘(ℂ,F) M N ω := { + ψ.toPartialEquiv with + open_source := ψ.open_source + open_target := ψ.open_target + contMDiffOn_toFun := φ.contMDiffOn_toFun.mono inter_subset_left + contMDiffOn_invFun := φ.contMDiffOn_invFun.mono inter_subset_left } + refine ⟨Φ,⟨hx,hxU⟩,?_⟩ + intro y hy + exact (hUsub hy.2).symm.trans (hφ hy.1) + +end HolomorphicLocalDiffeomorph + + + + + +open Set Filter Topology +open scoped Manifold ContDiff +namespace HolomorphicLocalDiffeomorph +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] + [NormedAddCommGroup F] [NormedSpace ℂ F] + [FiniteDimensional ℂ E] [FiniteDimensional ℂ F] +variable {M N : Type*} [TopologicalSpace M] [TopologicalSpace N] + [ChartedSpace E M] [ChartedSpace F N] + [IsManifold 𝓘(ℂ,E) ω M] [IsManifold 𝓘(ℂ,F) ω N] + +lemma map_nhds_of_surjective_mfderiv {f : M → N} {x : M} + (hf : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f x) + (hs : Function.Surjective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f x)) : + Filter.map f (𝓝 x)=𝓝 (f x) := by + let c := chartAt E x + let d := chartAt F (f x) + have hc : x∈c.source := mem_chart_source E x + have hd : f x∈d.source := mem_chart_source F (f x) + have hcs : c.symm (c x)=x := c.left_inv hc + have hdl := chart_local hd + have hcsl := chart_symm_local (c.map_source hc) + let g : E → F := d ∘ f ∘ c.symm + have hfcs : ContMDiffAt 𝓘(ℂ,E) 𝓘(ℂ,F) ω f (c.symm (c x)) := by simpa only [hcs] + have hinner := hfcs.comp (c x) hcsl.contMDiffAt + have hdcs : ContMDiffAt 𝓘(ℂ,F) 𝓘(ℂ,F) ω d (f (c.symm (c x))) := by + simpa only [hcs] using hdl.contMDiffAt + have hg : ContDiffAt ℂ ω g (c x) := (hdcs.comp (c x) hinner).contDiffAt + have hsg : Function.Surjective (fderiv ℂ g (c x)) := by + rw [←mfderiv_eq_fderiv] + change Function.Surjective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) (d ∘ (f ∘ c.symm)) (c x)) + rw [mfderiv_comp (c x) (f := f ∘ c.symm) (g := d) (hdcs.mdifferentiableAt (by simp)) + (hinner.mdifferentiableAt (by simp)), + mfderiv_comp (c x) (f := c.symm) (g := f) (hfcs.mdifferentiableAt (by simp)) + (hcsl.mdifferentiableAt (by simp))] + have hs' : Function.Surjective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f (c.symm (c x))) := by + rw [hcs] + exact hs + have hd' : Function.Surjective (mfderiv 𝓘(ℂ,F) 𝓘(ℂ,F) d (f (c.symm (c x)))) := by + rw [hcs] + exact (hdl.mfderivToContinuousLinearEquiv (by simp)).surjective + exact hd'.comp (hs'.comp (hcsl.mfderivToContinuousLinearEquiv (by simp)).surjective) + have hgmap := (hg.hasStrictFDerivAt (by simp)).map_nhds_eq_of_surj (LinearMap.range_eq_top.mpr hsg) + have he : (d.symm ∘ g ∘ c)=ᶠ[𝓝 x] f := by + filter_upwards [c.open_source.mem_nhds hc, + hf.continuousAt.preimage_mem_nhds (d.open_source.mem_nhds hd)] with y hy hfy + change d.symm (d (f (c.symm (c y))))=f y + rw [c.left_inv hy,d.left_inv hfy] + rw [←Filter.map_congr he,←Filter.map_map,←Filter.map_map,c.map_nhds_eq hc,hgmap] + have heq : g (c x)=d (f x) := by simp only [g,Function.comp_apply,hcs] + rw [heq,d.symm.map_nhds_eq (d.map_source hd),d.left_inv hd] + +lemma isOpenMap_of_surjective_mfderiv {f : M → N} + (hf : ContMDiff 𝓘(ℂ,E) 𝓘(ℂ,F) ω f) + (hs : ∀x,Function.Surjective (mfderiv 𝓘(ℂ,E) 𝓘(ℂ,F) f x)) : IsOpenMap f := + isOpenMap_iff_nhds_le.mpr (fun x => (map_nhds_of_surjective_mfderiv (hf x) (hs x)).ge) + +end HolomorphicLocalDiffeomorph + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology IsManifold +open scoped ContDiff Manifold +namespace SplitTangent +open AnalyticZeroCover RationalParameters + +theorem RationallyConnected.exists_submersive_family_in_openAlternative {X : ComplexManifold.{u}} + [CompactSpace X.Carrier] (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) + (hdim : 0 (hC d).to_subtype + let A := Σd, C d + let d (a : A) := a.2.val.dim + let f (a : A) := pairEvaluation e x₀ a.2.val + let U (a : A) : Set (Space (d a)) := a.2.val.domain ∩ (f a) ⁻¹' V₀ + have hU (a : A) : IsOpen (U a) := by + apply isOpen_iff_mem_nhds.mpr + intro x hx + exact Filter.inter_mem (a.2.val.isOpen_domain.mem_nhds hx.1) + ((pairEvaluation_holomorphicAt e x₀ a.2.val + (hCP a.1 a.2.val a.2.property) hx.1).continuousAt.preimage_mem_nhds (hV₀.mem_nhds hx.2)) + have hf (a : A) (x) (hx : x∈U a) : + ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) x := by + rw [modelWithCornersSelf_prod] + exact pairEvaluation_holomorphicAt e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hx.1 + have hcover : V∩V₀ ⊆ ⋃a,f a '' U a := by + intro v hv + obtain ⟨n,hn⟩ := mem_iUnion.mp (hcov hv.1) + obtain ⟨P,hP,x,hx,hfx⟩ := mem_iUnion₂.mp hn + exact mem_iUnion.mpr ⟨⟨n,⟨P,hP⟩⟩,x,⟨hx,by + change pairEvaluation e x₀ P x ∈ V₀ + rw [hfx] + exact hv.2⟩,hfx⟩ + have hdim' : 0 (hWsub hz).1 + let T := OpenManifold.manifold.{u} W hW hWn + let G := family e x₀ a.2.val (hCP a.1 a.2.val a.2.property) hW hWn (fun z hz => (hWP hz).1) + refine ⟨T,OpenManifold.nonempty W hWn,G,?_,?_⟩ + · intro τ + exact (hWP τ.down.property).2 + intro τ + let z := OpenManifold.val W τ + have hz : z∈W := τ.down.property + have hzf : ContMDiffAt 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) ω (f a) z := + hf a z (hWP hz) + have hsurj : Function.Surjective + (mfderiv 𝓘(ℂ,Space (d a)) 𝓘(ℂ,Model X × Model X) (f a) z) := + surjective_mfderiv_of_chart hzf y (hWsub hz).2.1 (hWsub hz).2.2 + have hv := (OpenManifold.val_mfderiv_bijective W hW hWn τ).2 + have hchain := mfderiv_comp τ (hzf.mdifferentiableAt (by decide)) + ((OpenManifold.val_holomorphic W hW hWn τ).mdifferentiableAt (by decide)) + rw [← modelWithCornersSelf_prod] + change Function.Surjective (mfderiv (ModelWithCorners (OpenManifold.manifold.{u} W hW hWn)) + 𝓘(ℂ,Model X × Model X) + ((f a) ∘ (fun τ : (OpenManifold.manifold.{u} W hW hWn).Carrier => OpenManifold.val W τ)) τ) + rw [hchain] + exact hsurj.comp hv + +end SplitTangent + + + + + +open Set Filter Topology +open scoped ContDiff Manifold + + + + + +open Set Filter Topology +open scoped ContDiff Manifold BigOperators + + + +open Set Filter Topology +open scoped Manifold ContDiff BigOperators + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + +open Set Filter Topology TopologicalSpace + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff BigOperators + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff BigOperators + + + +open Set Filter Topology + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +namespace FiniteOpenMaps +variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] + [T2Space X] (f : X → Y) (ho : IsOpenMap f) + (hfin : ∀ y, (f ⁻¹' {y}).Finite) + +omit [TopologicalSpace X] [T2Space X] in +lemma constantCardLocus_isOpenAlternative : IsOpen (constantCardLocus f) := by + apply isOpen_iff_mem_nhds.mpr + intro y hy + obtain ⟨U,hsub,hU,hyU⟩ := _root_.mem_nhds_iff.mp hy + apply Filter.mem_of_superset (hU.mem_nhds hyU) + intro z hz + change ∀ᶠ w in 𝓝 z, fiberCard f w=fiberCard f z + filter_upwards [hU.mem_nhds hz] with w hw + exact (hsub hw).trans (hsub hz).symm + +end FiniteOpenMaps + + + + + +open Set Filter Topology +namespace FiniteOpenMaps +variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y] + [T2Space X] (f : X → Y) (ho : IsOpenMap f) + (hfin : ∀ y, (f ⁻¹' {y}).Finite) + +include ho hfin in +lemma locally_injective_of_card_constantAlternative (hf : Continuous f) {x : X} + (hx : f x∈constantCardLocus f) : + ∃ U : Set X, IsOpen U ∧ x∈U ∧ Set.InjOn f U := by + classical + obtain ⟨N,hNs,hNo,hxN⟩ := _root_.mem_nhds_iff.mp hx + obtain ⟨U,hU,hdis⟩ := (hfin (f x)).t2_separation + let V : Set Y := N ∩ ⋂k∈f ⁻¹' {f x}, f '' U k + have hVo : IsOpen V := hNo.inter + ((hfin (f x)).isOpen_biInter (fun k _ => ho _ (hU k).2)) + have hxV : f x∈V := ⟨hxN,Set.mem_iInter₂.mpr fun k hk => ⟨k,(hU k).1,hk⟩⟩ + refine ⟨U x ∩ f ⁻¹' V,(hU x).2.inter (hVo.preimage hf),⟨(hU x).1,hxV⟩,?_⟩ + intro a ha b hb hab + exact unique_in_branch f hfin hdis ha.2.2 (le_of_eq (hNs ha.2.1)) rfl + ha.1 hb.1 rfl hab.symm + +end FiniteOpenMaps + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff +namespace SplitTangent + + + +lemma holomorphicAt_tangentMapAlternative {X Y : ComplexManifold.{u}} + {f : X.Carrier → Y.Carrier} {x : X.Carrier} + (hf : ContMDiffAt (ModelWithCorners X) (ModelWithCorners Y) ω f x) + (v : Tangent X x) : + ContMDiffAt ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) + ((ModelWithCorners Y).prod 𝓘(ℂ,Model Y)) ω + (tangentMap (ModelWithCorners X) (ModelWithCorners Y) f) + (⟨x,v⟩ : TangentBundle (ModelWithCorners X) X.Carrier) := by + obtain ⟨s,hs,hfs⟩ := (contMDiffAt_iff_contMDiffOn_nhds (by simp : (ω : WithTop ℕ∞)≠(∞ : WithTop ℕ∞))).mp hf + obtain ⟨U,hUs,hU,hxU⟩ := _root_.mem_nhds_iff.mp hs + have hFU := hfs.mono hUs + have hTU := hFU.contMDiffOn_tangentMapWithin (m := ω) (by simp) hU.uniqueMDiffOn + have hπ : Continuous (fun p : TangentBundle (ModelWithCorners X) X.Carrier => p.proj) := + (contMDiff_proj (IB := ModelWithCorners X) (n := ω) (TangentSpace (ModelWithCorners X))).continuous + have hn : (fun p : TangentBundle (ModelWithCorners X) X.Carrier => p.proj) ⁻¹' U ∈ + 𝓝 (⟨x,v⟩ : TangentBundle (ModelWithCorners X) X.Carrier) := + hπ.continuousAt.preimage_mem_nhds (hU.mem_nhds hxU) + apply (hTU.contMDiffAt hn).congr_of_eventuallyEq + filter_upwards [hn] with p hp + exact (tangentMapWithin_eq_tangentMap (hU.uniqueMDiffOn p.proj hp) + ((hFU.contMDiffAt (hU.mem_nhds hp)).mdifferentiableAt (by simp))).symm + +end SplitTangent + + + + + +open Set Filter Topology Bundle +open scoped Manifold ContDiff + + + + + +open Set Filter Topology +open scoped Manifold ContDiff + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TransverseDiscrete.lean b/lean/OAI/Geometry/SplitTangent/TransverseDiscrete.lean new file mode 100644 index 0000000000000000000000000000000000000000..4fd7d43cd149900a17d7731c358e0ee292e57f8e --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TransverseDiscrete.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.AllCompactLeaves + +namespace OAI + +/-! Transverse Discrete. -/ + +noncomputable section +open Set Filter Topology +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} (L : LeafJetAtlas S) + {A B : Type*} [NormedAddCommGroup A] [NormedSpace ℂ A] [CompleteSpace A] + [NormedAddCommGroup B] [NormedSpace ℂ B] [CompleteSpace B] + +omit [CompleteSpace A] [CompleteSpace B] +lemma transverse_isolated (P : AlignedProductChart S A B) + {Z : Set X.Carrier} {a : A} {b : B} (ht : (a,b)∈P.chart.target) + (h : L.plaques.LocallySinglePlaque Z (P.chart.symm (a,b))) : + ∀ᶠ c in 𝓝 b,P.chart.symm (a,c)∈Z → c=b := by + obtain ⟨i,U,V,hU,_,hV,_,hys,hyUV,huniq⟩ := h + let Q := L.chart i + let f : B → X.Carrier := fun c => P.chart.symm (a,c) + have hp : Tendsto (fun c : B => (a,c)) (𝓝 b) (𝓝 (a,b)) := + continuousAt_const.prodMk continuousAt_id + have hf : ContinuousAt f b := (P.chart.symm.continuousAt ht).comp hp + have hQ : ∀ᶠ c in 𝓝 b,f c∈Q.chart.source := + hf.preimage_mem_nhds (Q.chart.open_source.mem_nhds hys) + have hUV : ∀ᶠ c in 𝓝 b,Q.chart (f c)∈U ×ˢ V := + (ContinuousAt.comp (f := f) (g := Q.chart) (Q.chart.continuousAt hys) hf).preimage_mem_nhds ((hU.prod hV).mem_nhds hyUV) + have hT : ∀ᶠ c in 𝓝 b,(a,c)∈P.chart.target := + hp.eventually (P.chart.open_target.mem_nhds ht) + have hprod := hp.eventually (P.transition_product Q ht hys) + filter_upwards [hQ,hUV,hT,hprod] with c hc hcUV hct hpc hcz + have hs : (Q.chart (f c)).2=(Q.chart (f b)).2 := huniq _ hcz hc hcUV + have hfst : (Q.chart (f c)).1=(Q.chart (f b)).1 := by + simpa only [Function.comp_apply,f] using + congrArg (fun p : S.FirstModel i × S.SecondModel i => p.1) hpc + have he : f c=f b := Q.chart.injOn hc hys (Prod.ext hfst hs) + have he' := congrArg (fun y => (P.chart y).2) he + simpa only [f,P.chart.right_inv ht,P.chart.right_inv hct] using he' + +lemma transverse_leaf_isDiscrete [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (e : ProjectiveEmbedding X) (hRC : RationallyConnected e) (hdim : 0 P.chart.symm (a,b)) K := by + intro b hb + exact ((P.chart.symm.continuousAt (hT b hb)).comp + (continuousAt_const.prodMk continuousAt_id)).continuousWithinAt + let : CompactSpace K := isCompact_iff_compactSpace.mp hK + have hs : Continuous (fun b : K => P.chart.symm (a,b.val)) := + continuousOn_iff_continuous_domRestrict.mp hf + have hC : IsCompact {b : K | P.chart.symm (a,b.val)∈L.leaf x} := + ((L.all_leaf_isClosed e hRC hdim x).preimage hs).isCompact + have hc : IsCompact {b∈K | P.chart.symm (a,b)∈L.leaf x} := by + convert hC.image continuous_subtype_val using 1 + ext b + constructor + · intro hb + exact ⟨⟨b,hb.1⟩,hb.2,rfl⟩ + · rintro ⟨c,hc,rfl⟩ + exact ⟨c.property,hc⟩ + exact hc.finite ((L.transverse_leaf_isDiscrete e hRC hdim P x a).mono + (fun b hb => ⟨hT b hb.1,hb.2⟩)) + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TransverseQuotient.lean b/lean/OAI/Geometry/SplitTangent/TransverseQuotient.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b4584b5cdbeca85d613905d9cd6b6b76e05a353 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TransverseQuotient.lean @@ -0,0 +1,100 @@ +import Mathlib +import OAI.Geometry.SplitTangent.LeafJetAtlas +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.CompactLeafQuotient +import OAI.Geometry.SplitTangent.TransverseDiscrete + +namespace OAI + +/-! Transverse Quotient. -/ + +noncomputable section +open Set Filter Topology TopologicalSpace +open scoped Manifold ContDiff +universe u +namespace SplitTangent.LeafJetAtlas +variable {X : ComplexManifold.{u}} {S : TangentSplitting X} + [CompactSpace X.Carrier] [ConnectedSpace X.Carrier] + (L : LeafJetAtlas S) (e : ProjectiveEmbedding X) + (hRC : RationallyConnected e) (hdim : 0 L.leafQuotient e hRC hdim ((L.chart i).chart.symm (a,b))) '' W := by + ext K + constructor + · rintro ⟨x,⟨⟨c,b⟩,⟨hc,hb⟩,rfl⟩,rfl⟩ + exact ⟨b,hb,L.leafQuotient_constant_plaque e hRC hdim i hUc hrect ha hc (hW hb)⟩ + · rintro ⟨b,hb,rfl⟩ + exact ⟨(L.chart i).chart.symm (a,b),⟨(a,b),⟨ha,hb⟩,rfl⟩,rfl⟩ + +def transverseQuotient (a : S.FirstModel i) (V : Set (S.SecondModel i)) : + V → L.CompactLeafSpace e hRC hdim := + fun b => L.leafQuotient e hRC hdim ((L.chart i).chart.symm (a,b.val)) + +lemma continuous_transverseQuotient {a : S.FirstModel i} + (hT : ∀b∈V,(a,b)∈(L.chart i).chart.target) : + Continuous (L.transverseQuotient e hRC hdim i a V) := by + have hs : Continuous (fun b : V => (L.chart i).chart.symm (a,b.val)) := by + apply continuous_iff_continuousAt.mpr + intro b + exact ((L.chart i).chart.symm.continuousAt (hT b.val b.property)).comp + (f := fun b : V => (a,b.val)) (x := b) + (continuousAt_const.prodMk continuous_subtype_val.continuousAt) + exact (L.continuous_leafQuotient e hRC hdim).comp hs + +lemma isOpenMap_transverseQuotient (hU : IsOpen U) (hUc : IsPreconnected U) (hV : IsOpen V) + (hrect : U ×ˢ V ⊆ (L.chart i).chart.target) {a : S.FirstModel i} (ha : a∈U) : + IsOpenMap (L.transverseQuotient e hRC hdim i a V) := by + intro W hW + let W' : Set (S.SecondModel i) := Subtype.val '' W + have hw : IsOpen W' := hV.isOpenMap_subtype_val W hW + have hwV : W'⊆V := fun b hb => by rcases hb with ⟨c,hc,rfl⟩; exact c.property + have hopen := L.isOpenMap_leafQuotient e hRC hdim _ + ((L.chart i).chart.symm.isOpen_image_of_subset_source (hU.prod hw) + (fun p hp => hrect ⟨hp.1,hwV hp.2⟩)) + rw [L.quotient_rectangle_image e hRC hdim i hUc hrect ha hwV] at hopen + convert hopen using 1 + simp only [W',Set.image_image,transverseQuotient] + rfl + +lemma transverseQuotient_fiber_isDiscrete {a : S.FirstModel i} + (hT : ∀b∈V,(a,b)∈(L.chart i).chart.target) (K : L.CompactLeafSpace e hRC hdim) : + IsDiscrete {b : S.SecondModel i | b∈V ∧ + L.leafQuotient e hRC hdim ((L.chart i).chart.symm (a,b))=K} := by + obtain ⟨x,hx⟩ := L.surjective_leafQuotient e hRC hdim K + subst K + apply (L.transverse_leaf_isDiscrete e hRC hdim (L.chart i) x a).mono + intro b hb + refine ⟨hT b hb.1,?_⟩ + exact (L.leafQuotient_eq_iff e hRC hdim _ _).mp hb.2.symm + +lemma transverseQuotient_fiber_finite {a : S.FirstModel i} + {K : Set (S.SecondModel i)} (hK : IsCompact K) + (hT : ∀b∈K,(a,b)∈(L.chart i).chart.target) (q : L.CompactLeafSpace e hRC hdim) : + {b∈K | L.leafQuotient e hRC hdim ((L.chart i).chart.symm (a,b))=q}.Finite := by + obtain ⟨x,hx⟩ := L.surjective_leafQuotient e hRC hdim q + subst q + convert L.finite_compact_transversal e hRC hdim (L.chart i) x a hK hT using 1 + ext b + simp only [Set.mem_ofPred_eq] + exact and_congr_right fun _ => + ⟨fun h => (L.leafQuotient_eq_iff e hRC hdim _ _).mp h.symm, + fun h => ((L.leafQuotient_eq_iff e hRC hdim _ _).mpr h).symm⟩ + +end SplitTangent.LeafJetAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/TwistedCurveTensor.lean b/lean/OAI/Geometry/SplitTangent/TwistedCurveTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..e56186cdefb162e7bf4998bd738c4f2db47d2365 --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/TwistedCurveTensor.lean @@ -0,0 +1,146 @@ +import Mathlib +import OAI.Geometry.SplitTangent.TensorVanishing +import OAI.Geometry.SplitTangent.BracketIntegrability +import OAI.Geometry.SplitTangent.Basic +import OAI.Geometry.SplitTangent.PositiveTangentCurves +import OAI.Geometry.SplitTangent.FormalBoxes + +namespace OAI + +/-! Twisted Curve Tensor. -/ + +noncomputable section +open Set Filter Topology Bundle +open scoped ContDiff Manifold +universe u +namespace SplitTangent + +abbrev TangentTensor (X : ComplexManifold.{u}) (m : ℕ) := + ContinuousMultilinearMap ℂ (fun _ : Fin m => Model X) ℂ + + +def tangentTensorCoordinates {X : ComplexManifold.{u}} {m : ℕ} + (g : ℂ → X.Carrier) (A : ℂ → TangentTensor X m) (z₀ : ℂ) (z : ℂ) : + TangentTensor X m := + (A z).compContinuousLinearMap (fun _ => + (trivializationAt (Model X) (Tangent X) (g z₀)).symmL ℂ (g z)) + + + +structure TwistedCurveTensor {X : ComplexManifold.{u}} (g : RationalCurve X) (d : ℤ) (m : ℕ) where + finite : ℂ → TangentTensor X m + infinity : ℂ → TangentTensor X m + finite_holomorphic : ∀z₀, AnalyticAt ℂ (tangentTensorCoordinates g.finite finite z₀) z₀ + infinity_holomorphic : ∀z₀, AnalyticAt ℂ (tangentTensorCoordinates g.infinity infinity z₀) z₀ + overlap : ∀z : ℂ, z≠0 → finite z = z^d • infinity z⁻¹ + + + +lemma section_coordinates_analytic {X : ComplexManifold.{u}} {g : ℂ → X.Carrier} + {v : ∀z, Tangent X (g z)} + (hv : ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier))) (z₀ : ℂ) : + AnalyticAt ℂ (fun z => + ((trivializationAt (Model X) (Tangent X) (g z₀)) + (⟨g z,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2) z₀ := by + let t := trivializationAt (Model X) (Tangent X) (g z₀) + have hz : g z₀∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + have hs : (⟨g z₀,v z₀⟩ : TangentBundle (ModelWithCorners X) X.Carrier)∈t.source := by + simpa only [t.mem_source] using hz + exact ((t.contMDiffAt_iff (f := fun z => (⟨g z,v z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)) hs).mp (hv z₀)).2.contDiffAt.analyticAt + +lemma tangentTensor_contract_analytic {X : ComplexManifold.{u}} {g : ℂ → X.Carrier} + (hg : ContMDiff 𝓘(ℂ,ℂ) (ModelWithCorners X) ω g) {m : ℕ} + {A : ℂ → TangentTensor X m} {z₀ : ℂ} + (hA : AnalyticAt ℂ (tangentTensorCoordinates g A z₀) z₀) + (v : Fin m → ∀z, Tangent X (g z)) + (hv : ∀i,ContMDiff 𝓘(ℂ,ℂ) ((ModelWithCorners X).prod 𝓘(ℂ,Model X)) ω + (fun z => (⟨g z,v i z⟩ : TangentBundle (ModelWithCorners X) X.Carrier))) : + AnalyticAt ℂ (fun z => A z (fun i => v i z)) z₀ := by + let t := trivializationAt (Model X) (Tangent X) (g z₀) + let w (i : Fin m) (z : ℂ) := (t (⟨g z,v i z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + have hw : ∀i,AnalyticAt ℂ (w i) z₀ := fun i => section_coordinates_analytic (hv i) z₀ + have ha : AnalyticAt ℂ (fun z => tangentTensorCoordinates g A z₀ z (fun i => w i z)) z₀ := + (ContinuousLinearMap.id ℂ (TangentTensor X m)).analyticAt_uncurry_of_multilinear.comp + (hA.prod (AnalyticAt.pi hw)) + apply ha.congr + have hz : g z₀∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + filter_upwards [(hg z₀).continuousAt.preimage_mem_nhds (t.open_baseSet.mem_nhds hz)] with z hz + symm + change A z (fun i => v i z) = A z (fun i => t.symmL ℂ (g z) (w i z)) + congr 1 + funext i + change v i z=t.symmL ℂ (g z) (t (⟨g z,v i z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz] + exact (t.symmL_continuousLinearMapAt hz _).symm + +namespace TwistedCurveTensor +open DiagonalRationality PositiveTensor +variable {X : ComplexManifold.{u}} {g : RationalCurve X} {d : ℤ} {m : ℕ} + + + +def contract (A : TwistedCurveTensor g d m) (σ : Fin m → CurveTangentSection g) : + lineSections d := + ⟨(fun z => A.finite z (fun i => (σ i).finite z), + fun z => A.infinity z (fun i => (σ i).infinity z)), + ⟨fun z => (tangentTensor_contract_analytic g.finite_holomorphic (A.finite_holomorphic z) + (fun i => (σ i).finite) (fun i => (σ i).finite_holomorphic)).differentiableAt, + fun z => (tangentTensor_contract_analytic g.infinity_holomorphic (A.infinity_holomorphic z) + (fun i => (σ i).infinity) (fun i => (σ i).infinity_holomorphic)).differentiableAt, + fun z hz => by + simp only [A.overlap z hz] + change z ^ d * (A.infinity z⁻¹) (fun i => (σ i).finite z) = _ + congr 2 + funext i + exact (σ i).overlap z hz⟩⟩ + + + +theorem contract_zero {d : ℕ} (A : TwistedCurveTensor g (d : ℤ) m) + (hdm : d < m) (σ : Fin m → CurveTangentSection g) + (hσ0 : ∀i,(σ i).finite 0=0) : A.contract σ=0 := by + let t := trivializationAt (Model X) (Tangent X) (g.finite 0) + let w (i : Fin m) (z : ℂ) := + (t (⟨g.finite z,(σ i).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + have hw : ∀i,AnalyticAt ℂ (w i) 0 := + fun i => section_coordinates_analytic (σ i).finite_holomorphic 0 + have hw0 : ∀i,w i 0=0 := by + intro i + change (t (⟨g.finite 0,(σ i).finite 0⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2=0 + rw [hσ0 i] + rw [← t.continuousLinearMapAt_apply_of_mem ℂ (FiberBundle.mem_baseSet_trivializationAt' (g.finite 0))] + exact map_zero _ + apply lineSection_zero_of_contraction hdm (A.contract σ) + (tangentTensorCoordinates g.finite A.finite 0) (A.finite_holomorphic 0) w hw hw0 + have hz : g.finite 0∈t.baseSet := FiberBundle.mem_baseSet_trivializationAt' _ + filter_upwards [g.finite_holomorphic.continuous.continuousAt.preimage_mem_nhds + (t.open_baseSet.mem_nhds hz)] with z hz + change A.finite z (fun i => (σ i).finite z)= + A.finite z (fun i => t.symmL ℂ (g.finite z) (w i z)) + congr 1 + funext i + change (σ i).finite z=t.symmL ℂ (g.finite z) + (t (⟨g.finite z,(σ i).finite z⟩ : TangentBundle (ModelWithCorners X) X.Carrier)).2 + rw [← t.continuousLinearMapAt_apply_of_mem ℂ hz] + exact (t.symmL_continuousLinearMapAt hz _).symm + + + +theorem vanish_on_generated_fiber {d : ℕ} (A : TwistedCurveTensor g (d : ℤ) m) + {D : ∀x : X.Carrier, Submodule ℂ (Tangent X x)} (hg : PointedGenerated g D) + (hdm : d < m) (v : Fin m → Tangent X (g.finite 1)) (hv : ∀i,v i∈D (g.finite 1)) : + A.finite 1 v=0 := by + classical + choose σ hσf hσi hσ0 hσ1 using fun i => hg (v i) (hv i) + have hs := A.contract_zero hdm σ hσ0 + have h := congrArg (fun s : lineSections (d : ℤ) => s.val.1 1) hs + change A.finite 1 (fun i => (σ i).finite 1)=0 at h + simpa only [hσ1] using h + +end TwistedCurveTensor +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/SplitTangent/ZariskiPairOpen.lean b/lean/OAI/Geometry/SplitTangent/ZariskiPairOpen.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee2e719eae7e5a9071b7ba820cb6ab917ae1d40e --- /dev/null +++ b/lean/OAI/Geometry/SplitTangent/ZariskiPairOpen.lean @@ -0,0 +1,88 @@ +import Mathlib +import OAI.Geometry.SplitTangent.Basic + +namespace OAI + +/-! Zariski Pair Open. -/ + +noncomputable section +open Set Filter Topology +open scoped ContDiff Manifold BigOperators +universe u +namespace SplitTangent + +lemma bihomogeneous_eval_scale {N a b : ℕ} (p : PairPolynomial N) + (hp : ∀ m∈p.support, (∑i : Fin (N+1),m (0,i))=a ∧ (∑i : Fin (N+1),m (1,i))=b) + (v : Fin 2 × Fin (N+1) → ℂ) (s t : ℂ) : + MvPolynomial.eval (fun k => (if k.1=0 then s else t)*v k) p = + (s^a*t^b)*MvPolynomial.eval v p := by + classical + rw [MvPolynomial.eval_eq',MvPolynomial.eval_eq'] + change (∑m∈p.support, p.coeff m * ∏k, ((if k.1=0 then s else t)*v k)^(m k)) = _ + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro m hm + simp only [mul_pow,Finset.prod_mul_distrib] + have he : (∏k : Fin 2 × Fin (N+1), (if k.1=0 then s else t)^(m k)) = s^a*t^b := by + rw [Fintype.prod_prod_type,Fin.prod_univ_two] + norm_num only [↓reduceIte,Fin.one_eq_zero_iff] + rw [Finset.prod_pow_eq_pow_sum,Finset.prod_pow_eq_pow_sum,(hp m hm).1,(hp m hm).2] + rw [he] + ring + +variable {X : ComplexManifold.{u}} (e : ProjectiveEmbedding X) + +lemma isOpen_pairEval_ne_zero (p : PairPolynomial e.N) (hp : Bihomogeneous p) : + IsOpen {xy | pairEval e p xy≠0} := by + classical + obtain ⟨a,b,hp⟩ := hp + apply isOpen_iff_mem_nhds.mpr + intro xy hxy + obtain ⟨i,hi⟩ := Function.ne_iff.mp (e.map xy.1).rep_nonzero + obtain ⟨j,hj⟩ := Function.ne_iff.mp (e.map xy.2).rep_nonzero + let q : X.Carrier × X.Carrier → ℂ := fun uv => MvPolynomial.eval + (fun k : Fin 2 × Fin (e.N+1) => if k.1=0 then projectiveCoordinates i (e.map uv.1) k.2 + else projectiveCoordinates j (e.map uv.2) k.2) p + have hq : ContinuousAt q xy := by + apply (MvPolynomial.continuous_eval p).continuousAt.comp + apply continuousAt_pi.mpr + intro k + split_ifs + · exact (continuous_apply k.2).continuousAt.comp + (((e.holomorphic i).continuousOn.continuousAt ((e.open_patch i).mem_nhds hi)).comp continuous_fst.continuousAt) + · exact (continuous_apply k.2).continuousAt.comp + (((e.holomorphic j).continuousOn.continuousAt ((e.open_patch j).mem_nhds hj)).comp continuous_snd.continuousAt) + have hscale (uv : X.Carrier × X.Carrier) : q uv = + ((e.map uv.1).rep i)⁻¹^a * ((e.map uv.2).rep j)⁻¹^b * pairEval e p uv := by + have hfun : (fun k : Fin 2 × Fin (e.N+1) => + if k.1=0 then projectiveCoordinates i (e.map uv.1) k.2 + else projectiveCoordinates j (e.map uv.2) k.2) = + (fun k : Fin 2 × Fin (e.N+1) => + (if k.1=0 then ((e.map uv.1).rep i)⁻¹ else ((e.map uv.2).rep j)⁻¹) * + (if k.1=0 then (e.map uv.1).rep k.2 else (e.map uv.2).rep k.2)) := by + funext k + split_ifs <;> rfl + change MvPolynomial.eval _ p = _ + rw [hfun] + exact bihomogeneous_eval_scale p hp _ _ _ + have hqne : q xy≠0 := by + rw [hscale] + exact mul_ne_zero (mul_ne_zero (pow_ne_zero a (inv_ne_zero hi)) (pow_ne_zero b (inv_ne_zero hj))) hxy + apply mem_of_superset (hq.eventually_ne hqne) + intro uv huv + change pairEval e p uv≠0 + intro he + exact huv (by rw [hscale,he,mul_zero]) + +theorem IsZariskiOpenPair.isOpen {U : Set (X.Carrier × X.Carrier)} (hU : IsZariskiOpenPair e U) : + IsOpen U := by + obtain ⟨S,hS,rfl⟩ := hU + have heq : {xy | ∃p∈S,pairEval e p xy≠0} = ⋃p∈S,{xy | pairEval e p xy≠0} := by ext; simp + rw [heq] + exact isOpen_iUnion (fun p => isOpen_iUnion (fun hp => isOpen_pairEval_ne_zero e p (hS p hp))) + +end SplitTangent + +end + +end OAI diff --git a/lean/OAI/Geometry/StableBernstein/Estimates/PuncturedSard.lean b/lean/OAI/Geometry/StableBernstein/Estimates/PuncturedSard.lean new file mode 100644 index 0000000000000000000000000000000000000000..6101fbf67f42328957934b4f187bcfd1ce47a82c --- /dev/null +++ b/lean/OAI/Geometry/StableBernstein/Estimates/PuncturedSard.lean @@ -0,0 +1,882 @@ +import Mathlib.Algebra.Module.LinearMap.DivisionRing +import Mathlib.Analysis.Calculus.ContDiff.Comp +import Mathlib.Analysis.Calculus.ContDiff.Operations +import Mathlib.Analysis.Calculus.ContDiff.RCLike +import Mathlib.Analysis.Calculus.Implicit +import Mathlib.Analysis.Calculus.Taylor +import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Geometry.Manifold.ContMDiff.Atlas +import Mathlib.Geometry.Manifold.MFDeriv.Atlas +import Mathlib.Geometry.Manifold.MFDeriv.FDeriv +import Mathlib.MeasureTheory.Function.Jacobian +import Mathlib.MeasureTheory.Measure.Lebesgue.Basic +import Mathlib.Tactic.IntervalCases +import Mathlib.Tactic.NormNum +import Mathlib.Topology.Compactness.Lindelof +import Mathlib.Topology.MetricSpace.HausdorffDimension +import OAI.Geometry.StableBernstein.Geometry.Geometry + +namespace OAI + +noncomputable section + +namespace StableBernstein.W30 +open Set +open scoped ContDiff BigOperators + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem iteratedDeriv_affine_line {f : E → ℝ} (hf : ContDiff ℝ 7 f) + (x v : E) (t : ℝ) (k : ℕ) (hk : k ≤ 7) : + iteratedDeriv k (fun s : ℝ => f (x + s • v)) t = + iteratedFDeriv ℝ k f (x + t • v) (fun _ => v) := by + let L : ℝ →L[ℝ] E := (ContinuousLinearMap.id ℝ ℝ).smulRight v + have hs : ContDiff ℝ 7 (fun z : E => f (x + z)) := + hf.comp (contDiff_const.add contDiff_id) + have h := L.iteratedFDeriv_comp_right hs t (i := k) (by exact_mod_cast hk) + rw [iteratedDeriv_eq_iteratedFDeriv] + simpa [Function.comp_def, L, iteratedFDeriv_comp_add_left, + ContinuousMultilinearMap.compContinuousLinearMap_apply] using + congrArg (fun T => T (fun _ : Fin k => (1 : ℝ))) h + +theorem taylorWithinEval_eq_of_flat (g : ℝ → ℝ) (s : Set ℝ) (a b : ℝ) + (n : ℕ) (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ n → iteratedDerivWithin k g s a = 0) : + taylorWithinEval g n s a b = g a := by + induction n with + | zero => simp + | succ n ih => + rw [taylorWithinEval_succ, ih (fun k hk hkn => hflat k hk (by omega)), + hflat (n + 1) (by omega) le_rfl] + simp + +theorem flat_taylor_bound_segment {f : E → ℝ} (hf : ContDiff ℝ 7 f) + (x y : E) (C : ℝ) + (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + (hbound : ∀ t ∈ Icc (0 : ℝ) 1, + ‖iteratedFDeriv ℝ 7 f (x + t • (y - x))‖ ≤ C) : + |f y - f x| ≤ C * ‖y - x‖ ^ 7 / 720 := by + let g : ℝ → ℝ := fun t => f (x + t • (y - x)) + have hg : ContDiff ℝ 7 g := + hf.comp (contDiff_const.add (contDiff_id.smul contDiff_const)) + have hd (k : ℕ) (hk : k ≤ 7) (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + iteratedDerivWithin k g (Icc (0 : ℝ) 1) t = + iteratedFDeriv ℝ k f (x + t • (y - x)) (fun _ => y - x) := by + rw [iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_Icc zero_lt_one) + ((hg.of_le (by exact_mod_cast hk)).contDiffAt) ht] + exact iteratedDeriv_affine_line hf x (y - x) t k hk + have hp : taylorWithinEval g 6 (Icc (0 : ℝ) 1) 0 1 = g 0 := by + apply taylorWithinEval_eq_of_flat + intro k hk hk6 + rw [hd k (by omega) 0 (by simp)] + simpa using congrArg (fun T => T (fun _ : Fin k => y - x)) (hflat k hk hk6) + have hC : ∀ t ∈ Icc (0 : ℝ) 1, + ‖iteratedDerivWithin 7 g (Icc (0 : ℝ) 1) t‖ ≤ C * ‖y - x‖ ^ 7 := by + intro t ht + rw [hd 7 le_rfl t ht] + calc + _ ≤ ‖iteratedFDeriv ℝ 7 f (x + t • (y - x))‖ * ‖y - x‖ ^ 7 := by + simpa using (iteratedFDeriv ℝ 7 f (x + t • (y - x))).le_opNorm + (fun _ : Fin 7 => y - x) + _ ≤ _ := mul_le_mul_of_nonneg_right (hbound t ht) (pow_nonneg (norm_nonneg _) _) + have h := taylor_mean_remainder_bound (f := g) (n := 6) + (a := 0) (b := 1) (x := 1) (C := C * ‖y - x‖ ^ 7) + zero_le_one hg.contDiffOn (by simp) hC + rw [hp] at h + simpa [g, Real.norm_eq_abs, Nat.factorial] using h + +theorem flat_taylor_bound_convex {f : E → ℝ} (hf : ContDiff ℝ 7 f) + {s : Set E} (hs : Convex ℝ s) {x y : E} (hx : x ∈ s) (hy : y ∈ s) + (C : ℝ) (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + (hbound : ∀ z ∈ s, ‖iteratedFDeriv ℝ 7 f z‖ ≤ C) : + |f y - f x| ≤ C * ‖y - x‖ ^ 7 / 720 := + flat_taylor_bound_segment hf x y C hflat fun _parameter ht => + hbound _ (hs.add_smul_sub_mem hx hy ht) + +theorem flat_taylor_bound_ball + {f : EuclideanSpace ℝ (Fin 6) → ℝ} (hf : ContDiff ℝ 7 f) + (x : EuclideanSpace ℝ (Fin 6)) {r : ℝ} (hr : 0 < r) + {y : EuclideanSpace ℝ (Fin 6)} (hy : y ∈ Metric.ball x r) (C : ℝ) + (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + (hbound : ∀ z ∈ Metric.ball x r, ‖iteratedFDeriv ℝ 7 f z‖ ≤ C) : + |f y - f x| ≤ C * ‖y - x‖ ^ 7 / 720 := + flat_taylor_bound_convex hf (convex_ball x r) (Metric.mem_ball_self hr) hy C hflat hbound + +end StableBernstein.W30 + +namespace Bernstein.Sard +open MeasureTheory Manifold Bundle Set Filter +open scoped Topology ContDiff +open StableBernstein.W01 + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + +def chartExceptionalValues (f : M → ℝ) (S : Set M) (c : M) : Set ℝ := + (f ∘ (extChartAt I6 c).symm) '' + {z | z ∈ (extChartAt I6 c).target ∧ (extChartAt I6 c).symm z ∈ S} + +theorem chartExceptionalValues_eq (f : M → ℝ) (S : Set M) (c : M) : + chartExceptionalValues f S c = f '' (S ∩ (extChartAt I6 c).source) := by + ext t + constructor + · rintro ⟨z, ⟨hz, hzS⟩, hzt⟩ + exact ⟨(extChartAt I6 c).symm z, + ⟨hzS, (extChartAt I6 c).map_target hz⟩, hzt⟩ + · rintro ⟨x, ⟨hxS, hx⟩, hxt⟩ + refine ⟨extChartAt I6 c x, ⟨(extChartAt I6 c).map_source hx, ?_⟩, ?_⟩ + · simpa only [(extChartAt I6 c).left_inv hx] using hxS + · simpa only [Function.comp_apply, (extChartAt I6 c).left_inv hx] using hxt + +theorem exists_countable_chart_exceptional_cover [SecondCountableTopology M] + (f : M → ℝ) (S : Set M) : + ∃ C : Set M, C.Countable ∧ f '' S = ⋃ c ∈ C, chartExceptionalValues f S c := by + obtain ⟨C, hC, hcover⟩ := countable_cover_nhds + (fun c : M => extChartAt_source_mem_nhds (I := I6) c) + refine ⟨C, hC, ?_⟩ + ext t + constructor + · rintro ⟨x, hxS, hxt⟩ + have hxcover : x ∈ ⋃ c ∈ C, (extChartAt I6 c).source := by + simpa only [hcover] using (mem_univ x) + obtain ⟨c, hc⟩ := mem_iUnion.mp hxcover + obtain ⟨hcC, hxc⟩ := mem_iUnion.mp hc + refine mem_iUnion.mpr ⟨c, mem_iUnion.mpr ⟨hcC, ?_⟩⟩ + rw [chartExceptionalValues_eq] + exact ⟨x, ⟨hxS, hxc⟩, hxt⟩ + · intro ht + obtain ⟨c, hc⟩ := mem_iUnion.mp ht + obtain ⟨_, htc⟩ := mem_iUnion.mp hc + rw [chartExceptionalValues_eq] at htc + obtain ⟨x, hx, hxt⟩ := htc + exact ⟨x, hx.1, hxt⟩ + +theorem exceptionalValues_null_of_chart_null [SecondCountableTopology M] + (f : M → ℝ) (S : Set M) + (hlocal : ∀ c : M, volume (chartExceptionalValues f S c) = 0) : + volume (f '' S) = 0 := by + obtain ⟨C, hC, hcover⟩ := exists_countable_chart_exceptional_cover f S + rw [hcover] + exact (measure_biUnion_null_iff hC).mpr (fun c _ => hlocal c) + +variable [IsManifold I6 ∞ M] + +theorem chart_fderiv_zero_of_mfderiv_zero (f : M → ℝ) + (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) (c : M) {z : E6} + (hz : z ∈ (extChartAt I6 c).target) + (hzero : mfderiv I6 𝓘(ℝ, ℝ) f ((extChartAt I6 c).symm z) = 0) : + fderiv ℝ (f ∘ (extChartAt I6 c).symm) z = 0 := by + have hinv : MDifferentiableAt I6 I6 (extChartAt I6 c).symm z := + (mdifferentiableWithinAt_extChartAt_symm (I := I6) hz).mdifferentiableAt (by simp) + have hchain := mfderiv_comp z + (hf.mdifferentiable (by simp) ((extChartAt I6 c).symm z)) hinv + rw [mfderiv_eq_fderiv, hzero, ContinuousLinearMap.zero_comp] at hchain + exact hchain + +theorem criticalValues_null_of_chart_criticalValues_null [SecondCountableTopology M] + (f : M → ℝ) (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) + (hlocal : ∀ c : M, volume ((f ∘ (extChartAt I6 c).symm) '' + {z | z ∈ (extChartAt I6 c).target ∧ + fderiv ℝ (f ∘ (extChartAt I6 c).symm) z = 0}) = 0) : + volume (f '' {x | mfderiv I6 𝓘(ℝ, ℝ) f x = 0}) = 0 := by + apply exceptionalValues_null_of_chart_null + intro c + apply measure_mono_null _ (hlocal c) + rintro t ⟨z, ⟨hz, hzero⟩, hzt⟩ + exact ⟨z, ⟨hz, chart_fderiv_zero_of_mfderiv_zero f hf c hz hzero⟩, hzt⟩ + +theorem ae_regularValues_of_chart_criticalValues_null [SecondCountableTopology M] + (f : M → ℝ) (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) + (hlocal : ∀ c : M, volume ((f ∘ (extChartAt I6 c).symm) '' + {z | z ∈ (extChartAt I6 c).target ∧ + fderiv ℝ (f ∘ (extChartAt I6 c).symm) z = 0}) = 0) : + ∀ᵐ t ∂(volume : Measure ℝ), ∀ x : M, + f x = t → Function.Surjective (mfderiv I6 𝓘(ℝ, ℝ) f x) := by + have hnull := criticalValues_null_of_chart_criticalValues_null f hf hlocal + filter_upwards [measure_eq_zero_iff_ae_notMem.mp hnull] with t ht x hxt + have hne : mfderiv I6 𝓘(ℝ, ℝ) f x ≠ 0 := by + intro hzero + exact ht ⟨x, hzero, hxt⟩ + exact (mfderiv I6 𝓘(ℝ, ℝ) f x).toLinearMap.surjective + (fun hzero => hne (ContinuousLinearMap.coe_injective hzero)) + +theorem ae_regularValues_of_scalarSard [SecondCountableTopology M] + (scalarSard : ∀ (U : Set E6), IsOpen U → ∀ (g : E6 → ℝ), + ContDiffOn ℝ ∞ g U → volume (g '' {z | z ∈ U ∧ fderiv ℝ g z = 0}) = 0) + (f : M → ℝ) (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) : + ∀ᵐ t ∂(volume : Measure ℝ), ∀ x : M, + f x = t → Function.Surjective (mfderiv I6 𝓘(ℝ, ℝ) f x) := by + apply ae_regularValues_of_chart_criticalValues_null f hf + intro c + apply scalarSard (extChartAt I6 c).target (isOpen_extChartAt_target c) + rw [← contMDiffOn_iff_contDiffOn] + exact hf.comp_contMDiffOn (contMDiffOn_extChartAt_symm c) + +end Bernstein.Sard + +namespace StableBernstein.W30 +open Set +open scoped ContDiff BigOperators +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem iteratedDeriv_affine_line_local {f : E → ℝ} {U : Set E} + (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + (x v : E) (t : ℝ) (ht : x + t • v ∈ U) (k : ℕ) (hk : k ≤ 7) : + iteratedDeriv k (fun s : ℝ => f (x + s • v)) t = + iteratedFDeriv ℝ k f (x + t • v) (fun _ => v) := by + let L : ℝ →L[ℝ] E := (ContinuousLinearMap.id ℝ ℝ).smulRight v + let S : Set E := (fun z : E => x + z) ⁻¹' U + have hS : IsOpen S := hU.preimage (continuous_const.add continuous_id) + have hLS : IsOpen (L ⁻¹' S) := hS.preimage L.continuous + have hs : ContDiffOn ℝ 7 (fun z : E => f (x + z)) S := + hf.comp (contDiff_const.add contDiff_id).contDiffOn (fun _ hz => hz) + have htS : L t ∈ S := ht + have h := L.iteratedFDerivWithin_comp_right hs hS.uniqueDiffOn + hLS.uniqueDiffOn htS (i := k) (by exact_mod_cast hk) + rw [(iteratedFDerivWithin_of_isOpen k hLS) htS, + (iteratedFDerivWithin_of_isOpen k hS) htS] at h + rw [iteratedDeriv_eq_iteratedFDeriv] + simpa [Function.comp_def, L, iteratedFDeriv_comp_add_left, + ContinuousMultilinearMap.compContinuousLinearMap_apply] using + congrArg (fun T => T (fun _ : Fin k => (1 : ℝ))) h + +theorem flat_taylor_bound_segment_local {f : E → ℝ} {U : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + (x y : E) (hseg : ∀ t ∈ Icc (0 : ℝ) 1, x + t • (y - x) ∈ U) (C : ℝ) + (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + (hbound : ∀ t ∈ Icc (0 : ℝ) 1, + ‖iteratedFDeriv ℝ 7 f (x + t • (y - x))‖ ≤ C) : + |f y - f x| ≤ C * ‖y - x‖ ^ 7 / 720 := by + let g : ℝ → ℝ := fun t => f (x + t • (y - x)) + have hga (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : ContDiffAt ℝ 7 g t := + (hf.contDiffAt (hU.mem_nhds (hseg t ht))).comp t + ((contDiff_const.add (contDiff_id.smul contDiff_const)).contDiffAt) + have hg : ContDiffOn ℝ 7 g (Icc (0 : ℝ) 1) := + fun t ht => (hga t ht).contDiffWithinAt + have hd (k : ℕ) (hk : k ≤ 7) (t : ℝ) (ht : t ∈ Icc (0 : ℝ) 1) : + iteratedDerivWithin k g (Icc (0 : ℝ) 1) t = + iteratedFDeriv ℝ k f (x + t • (y - x)) (fun _ => y - x) := by + rw [iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_Icc zero_lt_one) + ((hga t ht).of_le (by exact_mod_cast hk)) ht] + exact iteratedDeriv_affine_line_local hU hf x (y - x) t (hseg t ht) k hk + have hp : taylorWithinEval g 6 (Icc (0 : ℝ) 1) 0 1 = g 0 := by + apply taylorWithinEval_eq_of_flat + intro k hk hk6 + rw [hd k (by omega) 0 (by simp)] + simpa using congrArg (fun T => T (fun _ : Fin k => y - x)) (hflat k hk hk6) + have hC : ∀ t ∈ Icc (0 : ℝ) 1, + ‖iteratedDerivWithin 7 g (Icc (0 : ℝ) 1) t‖ ≤ C * ‖y - x‖ ^ 7 := by + intro t ht + rw [hd 7 le_rfl t ht] + calc + _ ≤ ‖iteratedFDeriv ℝ 7 f (x + t • (y - x))‖ * ‖y - x‖ ^ 7 := by + simpa using (iteratedFDeriv ℝ 7 f (x + t • (y - x))).le_opNorm + (fun _ : Fin 7 => y - x) + _ ≤ _ := mul_le_mul_of_nonneg_right (hbound t ht) (pow_nonneg (norm_nonneg _) _) + have h := taylor_mean_remainder_bound (f := g) (n := 6) + (a := 0) (b := 1) (x := 1) (C := C * ‖y - x‖ ^ 7) + zero_le_one hg (by simp) hC + rw [hp] at h + simpa [g, Real.norm_eq_abs, Nat.factorial] using h + +theorem flat_taylor_bound_convex_local {f : E → ℝ} {U : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + {s : Set E} (hs : Convex ℝ s) (hsU : s ⊆ U) {x y : E} (hx : x ∈ s) (hy : y ∈ s) + (C : ℝ) (hflat : ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + (hbound : ∀ z ∈ s, ‖iteratedFDeriv ℝ 7 f z‖ ≤ C) : + |f y - f x| ≤ C * ‖y - x‖ ^ 7 / 720 := + flat_taylor_bound_segment_local hU hf x y + (fun _parameter ht => hsU (hs.add_smul_sub_mem hx hy ht)) C hflat fun _parameter ht => + hbound _ (hs.add_smul_sub_mem hx hy ht) + +end StableBernstein.W30 + +namespace Bernstein.Sard +open Set Filter MeasureTheory +open scoped ContDiff + +theorem scalar_sard_one_dimensional (U : Set ℝ) (hU : IsOpen U) + (f : ℝ → ℝ) (hf : ContDiffOn ℝ 1 f U) : + volume (f '' {x | x ∈ U ∧ fderiv ℝ f x = 0}) = 0 := by + apply MeasureTheory.addHaar_image_eq_zero_of_det_fderivWithin_eq_zero + (f' := fderiv ℝ f) volume + · intro x hx + exact ((hf.differentiableOn_one.differentiableAt + (hU.mem_nhds hx.1)).hasFDerivAt).hasFDerivWithinAt + · intro x hx + rw [hx.2] + simp + +theorem scalar_sard_one_dimensional_deriv (U : Set ℝ) (hU : IsOpen U) + (f : ℝ → ℝ) (hf : ContDiffOn ℝ 1 f U) : + volume (f '' {x | x ∈ U ∧ deriv f x = 0}) = 0 := by + have heq : {x | x ∈ U ∧ deriv f x = 0} = + {x | x ∈ U ∧ fderiv ℝ f x = 0} := by + ext x + constructor + · rintro ⟨hx, hd⟩ + refine ⟨hx, ?_⟩ + apply ContinuousLinearMap.ext + intro v + rw [fderiv_eq_smul_deriv, hd] + simp + · rintro ⟨hx, hd⟩ + refine ⟨hx, ?_⟩ + rw [← fderiv_apply_one_eq_deriv, hd] + rfl + rw [heq] + exact scalar_sard_one_dimensional U hU f hf + +end Bernstein.Sard + +namespace StableBernstein.W30 +open Set MeasureTheory +open scoped ContDiff NNReal ENNReal Topology +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem sixFlat_holderOn_local {f : E → ℝ} {U : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + {s K : Set E} (hs : Convex ℝ s) (hsU : s ⊆ U) (hKs : K ⊆ s) + (hflat : ∀ x ∈ K, ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) (C : ℝ) (hC : 0 ≤ C) + (hbound : ∀ z ∈ s, ‖iteratedFDeriv ℝ 7 f z‖ ≤ C) : + HolderOnWith ⟨C / 720, div_nonneg hC (by norm_num)⟩ 7 f K := by + intro x hx y hy + have h := flat_taylor_bound_convex_local hU hf hs hsU (hKs hx) (hKs hy) C (hflat x hx) hbound + have hd : dist (f x) (f y) ≤ (C / 720) * dist x y ^ 7 := by + simpa [Real.dist_eq, dist_eq_norm, abs_sub_comm, norm_sub_rev, + div_mul_eq_mul_div] using h + have he := ENNReal.ofReal_le_ofReal hd + have hc720 : 0 ≤ C / 720 := div_nonneg hC (by norm_num) + rw [ENNReal.ofReal_mul hc720, ENNReal.ofReal_pow dist_nonneg, + ENNReal.ofReal_eq_coe_nnreal hc720] at he + simpa only [edist_dist, NNReal.coe_ofNat, ENNReal.rpow_natCast, ENNReal.rpow_ofNat, + NNReal.mk] using he + +theorem volume_image_sixFlat_local_eq_zero [FiniteDimensional ℝ E] + (hdim : (Module.finrank ℝ E : ℝ) < 7) {f : E → ℝ} {U : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + {s K : Set E} (hs : Convex ℝ s) (hsU : s ⊆ U) (hKs : K ⊆ s) + (hflat : ∀ x ∈ K, ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) (C : ℝ) (hC : 0 ≤ C) + (hbound : ∀ z ∈ s, ‖iteratedFDeriv ℝ 7 f z‖ ≤ C) : + volume (f '' K) = 0 := by + let : MeasurableSpace E := borel E + let : BorelSpace E := ⟨rfl⟩ + have hH := (sixFlat_holderOn_local hU hf hs hsU hKs hflat C hC hbound).hausdorffMeasure_image_le + (by norm_num : (0 : ℝ≥0) < 7) (d := 1) (by norm_num) + have hzero : (Measure.hausdorffMeasure 7 : Measure E) = 0 := + Real.hausdorffMeasure_of_finrank_lt (E := E) (d := 7) + hdim + have hz : volume (f '' K) ≤ 0 := by + simpa [MeasureTheory.hausdorffMeasure_real, hzero] using hH + exact le_antisymm hz zero_le + +theorem exists_ball_sixFlat_image_null [FiniteDimensional ℝ E] + (hdim : (Module.finrank ℝ E : ℝ) < 7) + {f : E → ℝ} {U K : Set E} (hU : IsOpen U) (hf : ContDiffOn ℝ 7 f U) + (hKU : K ⊆ U) + (hflat : ∀ x ∈ K, ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0) + {x : E} (hx : x ∈ K) : + ∃ r : ℝ, 0 < r ∧ volume (f '' (K ∩ Metric.ball x r)) = 0 := by + let C : ℝ := ‖iteratedFDeriv ℝ 7 f x‖ + 1 + have hC : 0 ≤ C := add_nonneg (norm_nonneg _) zero_le_one + have hc : ContinuousAt (fun z => ‖iteratedFDeriv ℝ 7 f z‖) x := + ((hf.contDiffAt (hU.mem_nhds (hKU hx))).continuousAt_iteratedFDeriv + (by norm_num)).norm + have he : {z : E | ‖iteratedFDeriv ℝ 7 f z‖ < C} ∈ 𝓝 x := + hc.eventually (gt_mem_nhds (lt_add_one _)) + obtain ⟨r, hr, hball⟩ := Metric.mem_nhds_iff.mp + (Filter.inter_mem (hU.mem_nhds (hKU hx)) he) + refine ⟨r, hr, ?_⟩ + apply volume_image_sixFlat_local_eq_zero hdim hU hf (convex_ball x r) + (fun _ hz => (hball hz).1) inter_subset_right + (fun z hz => hflat z hz.1) C hC + intro z hz + exact (hball hz).2.le + +end StableBernstein.W30 + +namespace Bernstein.Sard + +section +open Set Filter MeasureTheory +open scoped Topology ContDiff + +section FiniteDimensional +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [CompleteSpace E] + +omit [FiniteDimensional ℝ E] [CompleteSpace E] in +theorem regular_scalar_range [FiniteDimensional ℝ E] [CompleteSpace E] + (L : E →L[ℝ] ℝ) (hL : L ≠ 0) : L.range = ⊤ := by + apply LinearMap.range_eq_top.mpr + exact L.toLinearMap.surjective (fun h => hL (ContinuousLinearMap.coe_injective h)) + +theorem regular_scalar_kernel_dimension (L : E →L[ℝ] ℝ) (hL : L ≠ 0) : + Module.finrank ℝ L.ker + 1 = Module.finrank ℝ E := by + have hd := L.toLinearMap.finrank_range_add_finrank_ker + have hr := regular_scalar_range L hL + change L.toLinearMap.range = ⊤ at hr + rw [hr] at hd + simpa only [finrank_top, Module.finrank_self, Nat.add_comm] using hd + +theorem exists_smooth_regular_stratum_chart (U : Set E) (hU : IsOpen U) + (h : E → ℝ) (hh : ContDiffOn ℝ ∞ h U) (a : E) (ha : a ∈ U) + (_ha0 : h a = 0) (hreg : fderiv ℝ h a ≠ 0) : + ∃ (V : Set E) (W : Set (fderiv ℝ h a).ker) + (ψ : (fderiv ℝ h a).ker → E) (q : E → (fderiv ℝ h a).ker), + IsOpen V ∧ a ∈ V ∧ V ⊆ U ∧ IsOpen W ∧ + ContDiffOn ℝ ∞ ψ W ∧ MapsTo ψ W U ∧ + (∀ t ∈ W, h (ψ t) = 0 ∧ q (ψ t) = t) ∧ + (∀ x ∈ V, h x = 0 → q x ∈ W ∧ ψ (q x) = x) := by + let L := fderiv ℝ h a + have hr : L.range = ⊤ := regular_scalar_range L hreg + have hs : HasStrictFDerivAt h L a := + (hh.contDiffAt (hU.mem_nhds ha)).hasStrictFDerivAt (by simp) + let hker := L.ker_closedComplemented_of_finiteDimensional_range + let P : E →L[ℝ] L.ker := Classical.choose hker + let φ := hs.implicitFunctionDataOfComplemented h L hr hker + let e := φ.toOpenPartialHomeomorph + have hae : a ∈ e.source := φ.pt_mem_toOpenPartialHomeomorph_source + have hg : ContDiffOn ℝ ∞ φ.prodFun U := by + change ContDiffOn ℝ ∞ (fun x => (h x, P (x - a))) U + exact hh.prodMk + ((P.contDiff.comp (contDiff_id.sub contDiff_const)).contDiffOn) + have hcg : ContinuousAt (fderiv ℝ φ.prodFun) a := + (hg.continuousOn_fderiv_of_isOpen hU (by simp)).continuousAt (hU.mem_nhds ha) + obtain ⟨e₀, he₀⟩ := φ.isInvertible_fderiv_prodFun + have hpoint : φ.pt = a := rfl + have hnear : {x : E | ∃ A : E ≃L[ℝ] (ℝ × L.ker), + (A : E →L[ℝ] (ℝ × L.ker)) = fderiv ℝ φ.prodFun x} ∈ 𝓝 a := by + have H : Set.range ((↑) : (E ≃L[ℝ] (ℝ × L.ker)) → + E →L[ℝ] (ℝ × L.ker)) ∈ 𝓝 (fderiv ℝ φ.prodFun a) := by + simpa only [he₀, hpoint] using e₀.nhds + exact hcg.preimage_mem_nhds H + have hnbhd : {x : E | x ∈ U ∧ x ∈ e.source ∧ + ∃ A : E ≃L[ℝ] (ℝ × L.ker), + (A : E →L[ℝ] (ℝ × L.ker)) = fderiv ℝ φ.prodFun x} ∈ 𝓝 a := + inter_mem (hU.mem_nhds ha) (inter_mem (e.open_source.mem_nhds hae) hnear) + obtain ⟨V, hVs, hV, haV⟩ := mem_nhds_iff.mp hnbhd + have hVU : V ⊆ U := fun x hx => (hVs hx).1 + have hVe : V ⊆ e.source := fun x hx => (hVs hx).2.1 + let T := e.target ∩ e.symm ⁻¹' V + have hT : IsOpen T := e.isOpen_inter_preimage_symm hV + have hTsm : ContDiffOn ℝ ∞ e.symm T := by + intro p hp + obtain ⟨A, hA⟩ := (hVs hp.2).2.2 + have hd : HasFDerivAt e (A : E →L[ℝ] (ℝ × L.ker)) (e.symm p) := by + rw [hA] + exact ((hg.differentiableOn (by simp)).differentiableAt + (hU.mem_nhds (hVU hp.2))).hasFDerivAt + have hc : ContDiffAt ℝ ∞ e (e.symm p) := + hg.contDiffAt (hU.mem_nhds (hVU hp.2)) + exact (e.contDiffAt_symm hp.1 hd hc).contDiffWithinAt + let W : Set L.ker := (fun t : L.ker => ((0 : ℝ), t)) ⁻¹' T + let ψ : L.ker → E := fun t => e.symm (0, t) + let q : E → L.ker := fun x => (e x).2 + have hW : IsOpen W := hT.preimage (continuous_const.prodMk continuous_id) + have hψ : ContDiffOn ℝ ∞ ψ W := + hTsm.comp ((contDiff_const.prodMk contDiff_id).contDiffOn) (fun _ ht => ht) + refine ⟨V, W, ψ, q, hV, haV, hVU, hW, hψ, ?_, ?_, ?_⟩ + · intro t ht + exact hVU ht.2 + · intro t ht + have hi := e.right_inv ht.1 + constructor + · have hfirst := congrArg Prod.fst hi + change h (ψ t) = 0 at hfirst + exact hfirst + · change (e (e.symm (0, t))).2 = t + rw [hi] + · intro x hx hx0 + have hcoords : e x = (0, (e x).2) := by + apply Prod.ext + · change h x = 0 + exact hx0 + · rfl + have ht : (0, (e x).2) ∈ T := by + rw [← hcoords] + refine ⟨e.map_source (hVe hx), ?_⟩ + change e.symm (e x) ∈ V + rw [e.left_inv (hVe hx)] + exact hx + refine ⟨ht, ?_⟩ + change e.symm (0, (e x).2) = x + rw [← hcoords, e.left_inv (hVe hx)] + +end FiniteDimensional + +theorem restricted_fderiv_zero {E K : Type*} + [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup K] [NormedSpace ℝ K] + (U : Set E) (hU : IsOpen U) (W : Set K) (hW : IsOpen W) + (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) + (ψ : K → E) (hψ : ContDiffOn ℝ ∞ ψ W) (hmap : MapsTo ψ W U) + {t : K} (ht : t ∈ W) (hzero : fderiv ℝ f (ψ t) = 0) : + fderiv ℝ (f ∘ ψ) t = 0 := by + have hdf := (hf.differentiableOn (by simp)).differentiableAt (hU.mem_nhds (hmap ht)) + have hdψ := (hψ.differentiableOn (by simp)).differentiableAt (hW.mem_nhds ht) + rw [fderiv_comp t hdf hdψ, hzero, ContinuousLinearMap.zero_comp] + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [CompleteSpace E] + +theorem regular_stratum_local_image_null + (U : Set E) (hU : IsOpen U) (f h : E → ℝ) + (hf : ContDiffOn ℝ ∞ f U) (hh : ContDiffOn ℝ ∞ h U) + (S : Set E) (hcrit : ∀ x ∈ S, fderiv ℝ f x = 0) + (hlevel : ∀ x ∈ S, h x = 0) (a : E) (haU : a ∈ U) (haS : a ∈ S) + (hreg : fderiv ℝ h a ≠ 0) + (lowerSard : ∀ W : Set (fderiv ℝ h a).ker, IsOpen W → + ∀ g : (fderiv ℝ h a).ker → ℝ, ContDiffOn ℝ ∞ g W → + volume (g '' {t | t ∈ W ∧ fderiv ℝ g t = 0}) = 0) : + ∃ V : Set E, IsOpen V ∧ a ∈ V ∧ V ⊆ U ∧ volume (f '' (S ∩ V)) = 0 := by + obtain ⟨V, W, ψ, q, hV, haV, hVU, hW, hψ, hmap, _, hrep⟩ := + exists_smooth_regular_stratum_chart U hU h hh a haU (hlevel a haS) hreg + refine ⟨V, hV, haV, hVU, ?_⟩ + have hsm : ContDiffOn ℝ ∞ (f ∘ ψ) W := hf.comp hψ hmap + have hnull := lowerSard W hW (f ∘ ψ) hsm + apply measure_mono_null _ hnull + rintro r ⟨x, ⟨hxS, hxV⟩, hxr⟩ + obtain ⟨hqx, hψqx⟩ := hrep x hxV (hlevel x hxS) + refine ⟨q x, ⟨hqx, ?_⟩, ?_⟩ + · apply restricted_fderiv_zero U hU W hW f hf ψ hψ hmap hqx + simpa only [hψqx] using hcrit x hxS + · simpa only [Function.comp_apply, hψqx] using hxr + +omit [FiniteDimensional ℝ E] [CompleteSpace E] in +theorem contDiffOn_iteratedFDeriv_component [FiniteDimensional ℝ E] [CompleteSpace E] + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) + (k : ℕ) (v : Fin k → E) : + ContDiffOn ℝ ∞ (fun x => iteratedFDeriv ℝ k f x v) U := by + let ev : (E [×k]→L[ℝ] ℝ) →L[ℝ] ℝ := + ContinuousMultilinearMap.apply ℝ (fun _ : Fin k => E) ℝ v + intro x hx + have hd : ContDiffAt ℝ ∞ (iteratedFDeriv ℝ k f) x := + (hf.contDiffAt (hU.mem_nhds hx)).iteratedFDeriv_right + (WithTop.coe_le_coe.mpr (show (⊤ : ℕ∞) + (k : ℕ∞) ≤ ⊤ from le_top)) + exact (ev.contDiff.contDiffAt.comp x hd).contDiffWithinAt + +theorem derivative_component_stratum_local_image_null + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) + (k : ℕ) (v : Fin k → E) (S : Set E) + (hcrit : ∀ x ∈ S, fderiv ℝ f x = 0) + (hflat : ∀ x ∈ S, iteratedFDeriv ℝ k f x = 0) + (a : E) (haU : a ∈ U) (haS : a ∈ S) + (hreg : fderiv ℝ (fun x => iteratedFDeriv ℝ k f x v) a ≠ 0) + (lowerSard : ∀ W : Set (fderiv ℝ (fun x => iteratedFDeriv ℝ k f x v) a).ker, + IsOpen W → ∀ g : (fderiv ℝ (fun x => iteratedFDeriv ℝ k f x v) a).ker → ℝ, + ContDiffOn ℝ ∞ g W → volume (g '' {t | t ∈ W ∧ fderiv ℝ g t = 0}) = 0) : + ∃ V : Set E, IsOpen V ∧ a ∈ V ∧ V ⊆ U ∧ volume (f '' (S ∩ V)) = 0 := by + apply regular_stratum_local_image_null U hU f + (fun x => iteratedFDeriv ℝ k f x v) hf + (contDiffOn_iteratedFDeriv_component U hU f hf k v) S hcrit + (fun x hx => by rw [hflat x hx]; rfl) a haU haS hreg lowerSard + +end + +section +open Set MeasureTheory +open scoped ContDiff + +theorem scalar_sard_finrank_one + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + (hdim : Module.finrank ℝ E = 1) (U : Set E) (hU : IsOpen U) + (f : E → ℝ) (hf : ContDiffOn ℝ 1 f U) : + volume (f '' {x | x ∈ U ∧ fderiv ℝ f x = 0}) = 0 := by + let e : E ≃L[ℝ] ℝ := ContinuousLinearEquiv.ofFinrankEq (by simpa using hdim) + let W : Set ℝ := e.symm ⁻¹' U + have hW : IsOpen W := hU.preimage e.symm.continuous + have hsm : ContDiffOn ℝ 1 (f ∘ e.symm) W := + hf.comp e.symm.contDiff.contDiffOn (fun _ ht => ht) + have hnull := scalar_sard_one_dimensional W hW (f ∘ e.symm) hsm + apply measure_mono_null _ hnull + rintro r ⟨x, ⟨hx, hdx⟩, hxr⟩ + refine ⟨e x, ⟨?_, ?_⟩, ?_⟩ + · change e.symm (e x) ∈ U + simpa only [e.symm_apply_apply] using hx + · have hdf := hf.differentiableOn_one.differentiableAt (hU.mem_nhds hx) + have hdf' : DifferentiableAt ℝ f (e.symm (e x)) := by + simpa only [e.symm_apply_apply] using hdf + rw [fderiv_comp (e x) hdf' e.symm.differentiableAt, + e.symm_apply_apply, hdx, ContinuousLinearMap.zero_comp] + · simpa only [Function.comp_apply, e.symm_apply_apply] using hxr + +theorem exists_regular_iteratedFDeriv_component + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) + (a : E) (ha : a ∈ U) (k : ℕ) + (hne : iteratedFDeriv ℝ (k + 1) f a ≠ 0) : + ∃ v : Fin k → E, fderiv ℝ (fun x => iteratedFDeriv ℝ k f x v) a ≠ 0 := by + by_contra hnone + push Not at hnone + apply hne + have hD : DifferentiableAt ℝ (iteratedFDeriv ℝ k f) a := + ((hf.contDiffAt (hU.mem_nhds ha)).iteratedFDeriv_right + (m := ∞) + (WithTop.coe_le_coe.mpr (show (⊤ : ℕ∞) + (k : ℕ∞) ≤ ⊤ from le_top))).differentiableAt (by simp) + apply ContinuousMultilinearMap.ext + intro m + rw [iteratedFDeriv_succ_apply_left] + let ev : (E [×k]→L[ℝ] ℝ) →L[ℝ] ℝ := + ContinuousMultilinearMap.apply ℝ (fun _ : Fin k => E) ℝ (Fin.tail m) + have heval : fderiv ℝ (fun x => iteratedFDeriv ℝ k f x (Fin.tail m)) a = + ev.comp (fderiv ℝ (iteratedFDeriv ℝ k f) a) := + (ev.hasFDerivAt.comp a hD.hasFDerivAt).fderiv + have hz := congrArg (fun L : E →L[ℝ] ℝ => L (m 0)) (hnone (Fin.tail m)) + rw [heval] at hz + exact hz + +theorem image_null_of_locally_image_null + {E : Type*} [TopologicalSpace E] [SecondCountableTopology E] + (f : E → ℝ) (S : Set E) + (hlocal : ∀ a ∈ S, ∃ V : Set E, IsOpen V ∧ a ∈ V ∧ + volume (f '' (S ∩ V)) = 0) : volume (f '' S) = 0 := by + choose V hV haV hnull using fun a : S => hlocal a a.property + obtain ⟨C, hC, hcover⟩ := TopologicalSpace.isOpen_iUnion_countable V hV + have hsub : f '' S ⊆ ⋃ a ∈ C, f '' (S ∩ V a) := by + rintro r ⟨x, hx, hxr⟩ + have hxV : x ∈ ⋃ a : S, V a := mem_iUnion.mpr ⟨⟨x, hx⟩, haV ⟨x, hx⟩⟩ + rw [← hcover] at hxV + obtain ⟨a, ha⟩ := mem_iUnion.mp hxV + obtain ⟨haC, hxa⟩ := mem_iUnion.mp ha + exact mem_iUnion.mpr ⟨a, mem_iUnion.mpr ⟨haC, ⟨x, ⟨hx, hxa⟩, hxr⟩⟩⟩ + exact measure_mono_null hsub ((measure_biUnion_null_iff hC).mpr (fun a _ => hnull a)) + +theorem nonflat_stratum_image_null + {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [CompleteSpace E] [SecondCountableTopology E] + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) + (k : ℕ) (S : Set E) (hSU : S ⊆ U) + (hcrit : ∀ x ∈ S, fderiv ℝ f x = 0) + (hflat : ∀ x ∈ S, iteratedFDeriv ℝ k f x = 0) + (hnext : ∀ x ∈ S, iteratedFDeriv ℝ (k + 1) f x ≠ 0) + (lowerSard : ∀ L : E →L[ℝ] ℝ, L ≠ 0 → + ∀ W : Set L.ker, IsOpen W → ∀ g : L.ker → ℝ, + ContDiffOn ℝ ∞ g W → volume (g '' {t | t ∈ W ∧ fderiv ℝ g t = 0}) = 0) : + volume (f '' S) = 0 := by + apply image_null_of_locally_image_null f S + intro a ha + obtain ⟨v, hv⟩ := exists_regular_iteratedFDeriv_component U hU f hf a (hSU ha) k + (hnext a ha) + obtain ⟨V, hV, haV, _, hnull⟩ := derivative_component_stratum_local_image_null + U hU f hf k v S hcrit hflat a (hSU ha) ha hv (lowerSard _ hv) + exact ⟨V, hV, haV, hnull⟩ + +end + +open Set MeasureTheory Manifold +open scoped ContDiff Topology +universe u + +section Strata +variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def sixFlatSet (U : Set E) (f : E → ℝ) : Set E := + {x | x ∈ U ∧ ∀ k : ℕ, 1 ≤ k → k ≤ 6 → iteratedFDeriv ℝ k f x = 0} + +def nonflatCriticalStratum (U : Set E) (f : E → ℝ) (k : ℕ) : Set E := + {x | x ∈ U ∧ fderiv ℝ f x = 0 ∧ iteratedFDeriv ℝ k f x = 0 ∧ + iteratedFDeriv ℝ (k + 1) f x ≠ 0} + +theorem criticalSet_subset_sixFlat_union_strata (U : Set E) (f : E → ℝ) : + {x | x ∈ U ∧ fderiv ℝ f x = 0} ⊆ + sixFlatSet U f ∪ ⋃ i : Fin 5, nonflatCriticalStratum U f (i.val + 1) := by + intro x hx + have h1 : iteratedFDeriv ℝ 1 f x = 0 := by + apply ContinuousMultilinearMap.ext + intro v + rw [iteratedFDeriv_one_apply, hx.2] + rfl + by_cases h2 : iteratedFDeriv ℝ 2 f x = 0 + · by_cases h3 : iteratedFDeriv ℝ 3 f x = 0 + · by_cases h4 : iteratedFDeriv ℝ 4 f x = 0 + · by_cases h5 : iteratedFDeriv ℝ 5 f x = 0 + · by_cases h6 : iteratedFDeriv ℝ 6 f x = 0 + · left + refine ⟨hx.1, ?_⟩ + intro k hk1 hk6 + interval_cases k <;> assumption + · right + exact mem_iUnion.mpr ⟨⟨4, by decide⟩, hx.1, hx.2, h5, h6⟩ + · right + exact mem_iUnion.mpr ⟨⟨3, by decide⟩, hx.1, hx.2, h4, h5⟩ + · right + exact mem_iUnion.mpr ⟨⟨2, by decide⟩, hx.1, hx.2, h3, h4⟩ + · right + exact mem_iUnion.mpr ⟨⟨1, by decide⟩, hx.1, hx.2, h2, h3⟩ + · right + exact mem_iUnion.mpr ⟨⟨0, by decide⟩, hx.1, hx.2, h1, h2⟩ + +theorem sixFlatSet_image_null [FiniteDimensional ℝ E] [SecondCountableTopology E] + (hdim : (Module.finrank ℝ E : ℝ) < 7) + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' sixFlatSet U f) = 0 := by + apply image_null_of_locally_image_null f (sixFlatSet U f) + intro x hx + have hf7 : ContDiffOn ℝ 7 f U := hf.of_le + (WithTop.coe_le_coe.mpr (show (7 : ℕ∞) ≤ ⊤ from le_top)) + obtain ⟨r, hr, hnull⟩ := StableBernstein.W30.exists_ball_sixFlat_image_null + hdim hU hf7 (fun _ hz => hz.1) (fun z hz => hz.2) hx + exact ⟨Metric.ball x r, Metric.isOpen_ball, Metric.mem_ball_self hr, hnull⟩ +end Strata + +theorem scalar_sard_finrank_eq (n : ℕ) : + ∀ (E : Type u) [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [CompleteSpace E] [SecondCountableTopology E], + Module.finrank ℝ E = n → n ≤ 6 → + ∀ (U : Set E), IsOpen U → ∀ (f : E → ℝ), ContDiffOn ℝ ∞ f U → + volume (f '' {x | x ∈ U ∧ fderiv ℝ f x = 0}) = 0 := by + induction n using Nat.strong_induction_on with + | h n ih => + intro E instN instS instF instC inst2 hdim hn U hU f hf + by_cases hn0 : n = 0 + · have : Subsingleton E := Module.finrank_zero_iff.mp (hdim.trans hn0) + have hz : volume ({f 0} : Set ℝ) = 0 := measure_singleton _ + apply measure_mono_null _ hz + rintro t ⟨x, _, hxt⟩ + simpa only [mem_singleton_iff, Subsingleton.elim x 0] using hxt.symm + · have hlower : ∀ L : E →L[ℝ] ℝ, L ≠ 0 → + ∀ W : Set L.ker, IsOpen W → ∀ g : L.ker → ℝ, + ContDiffOn ℝ ∞ g W → volume (g '' {t | t ∈ W ∧ fderiv ℝ g t = 0}) = 0 := by + intro L hL W hW g hg + have hk := regular_scalar_kernel_dimension L hL + rw [hdim] at hk + have hkn : Module.finrank ℝ L.ker < n := by omega + have hk6 : Module.finrank ℝ L.ker ≤ 6 := by omega + exact ih (Module.finrank ℝ L.ker) hkn L.ker rfl hk6 W hW g hg + have hflat : volume (f '' sixFlatSet U f) = 0 := by + apply sixFlatSet_image_null _ U hU f hf + have : Module.finrank ℝ E ≤ 6 := by simpa only [hdim] using hn + exact lt_of_le_of_lt (Nat.cast_le.mpr this) (by norm_num) + have hstrata : ∀ i : Fin 5, + volume (f '' nonflatCriticalStratum U f (i.val + 1)) = 0 := by + intro i + apply nonflat_stratum_image_null U hU f hf (i.val + 1) + (nonflatCriticalStratum U f (i.val + 1)) + (fun _ hx => hx.1) (fun _ hx => hx.2.1) + (fun _ hx => hx.2.2.1) (fun _ hx => hx.2.2.2) hlower + have hnull : volume (f '' sixFlatSet U f ∪ + ⋃ i : Fin 5, f '' nonflatCriticalStratum U f (i.val + 1)) = 0 := + measure_union_null hflat (measure_iUnion_null_iff.mpr hstrata) + apply measure_mono_null _ hnull + rintro t ⟨x, hx, hxt⟩ + rcases criticalSet_subset_sixFlat_union_strata U f hx with hxf | hxs + · exact Or.inl ⟨x, hxf, hxt⟩ + · obtain ⟨i, hxi⟩ := mem_iUnion.mp hxs + exact Or.inr (mem_iUnion.mpr ⟨i, x, hxi, hxt⟩) + +theorem scalar_sard_finrank_le_six + {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [CompleteSpace E] [SecondCountableTopology E] + (hdim : Module.finrank ℝ E ≤ 6) + (U : Set E) (hU : IsOpen U) (f : E → ℝ) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ fderiv ℝ f x = 0}) = 0 := + scalar_sard_finrank_eq (Module.finrank ℝ E) E rfl hdim U hU f hf + +theorem scalar_sard_E6 (U : Set StableBernstein.W01.E6) (hU : IsOpen U) + (f : StableBernstein.W01.E6 → ℝ) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ fderiv ℝ f x = 0}) = 0 := + scalar_sard_finrank_le_six (by simp only [StableBernstein.W01.source_dimension, le_refl]) U hU f hf + +open StableBernstein.W01 + +theorem manifold_ae_regularValues + {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + [IsManifold I6 ∞ M] [SecondCountableTopology M] + (f : M → ℝ) (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) : + ∀ᵐ t ∂(volume : Measure ℝ), ∀ x : M, + f x = t → Function.Surjective (mfderiv I6 𝓘(ℝ, ℝ) f x) := + ae_regularValues_of_scalarSard scalar_sard_E6 f hf + +theorem manifold_ae_noncritical_values + {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + [IsManifold I6 ∞ M] [SecondCountableTopology M] + (f : M → ℝ) (hf : ContMDiff I6 𝓘(ℝ, ℝ) ∞ f) : + ∀ᵐ t ∂(volume : Measure ℝ), ∀ x : M, + f x = t → mfderiv I6 𝓘(ℝ, ℝ) f x ≠ 0 := by + filter_upwards [manifold_ae_regularValues f hf] with t ht x hxt hzero + obtain ⟨v, hv⟩ := ht x hxt (1 : ℝ) + rw [hzero] at hv + change (0 : ℝ) = 1 at hv + exact zero_ne_one hv + +end Bernstein.Sard + +open MeasureTheory Manifold Set Filter +open scoped Topology ContDiff +namespace StableBernstein.W26 +open W01 + +universe u +variable {M : Type u} [TopologicalSpace M] [T1Space M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] + +def puncturedCriticalSet (o : M) (f : M → ℝ) : Set M := + {x | x ≠ o ∧ mfderiv I6 𝓘(ℝ, ℝ) f x = 0} + +def poleCriticalSet (o : M) (f : M → ℝ) : Set M := + {o} ∪ puncturedCriticalSet o f + +theorem chart_fderiv_zero_of_punctured (o : M) (f : M → ℝ) + (hf : ContMDiffOn I6 𝓘(ℝ, ℝ) ∞ f ({o}ᶜ : Set M)) (c : M) {z : E6} + (hz : z ∈ (extChartAt I6 c).target) (hne : (extChartAt I6 c).symm z ≠ o) + (hzero : mfderiv I6 𝓘(ℝ, ℝ) f ((extChartAt I6 c).symm z) = 0) : + fderiv ℝ (f ∘ (extChartAt I6 c).symm) z = 0 := by + have hinv : MDifferentiableAt I6 I6 (extChartAt I6 c).symm z := + (mdifferentiableWithinAt_extChartAt_symm (I := I6) hz).mdifferentiableAt (by simp) + have hdf : MDifferentiableAt I6 𝓘(ℝ, ℝ) f ((extChartAt I6 c).symm z) := + (hf.mdifferentiableOn (by simp)).mdifferentiableAt + (isOpen_compl_singleton.mem_nhds (by simpa using hne)) + have hchain := mfderiv_comp z hdf hinv + rw [mfderiv_eq_fderiv, hzero, ContinuousLinearMap.zero_comp] at hchain + exact hchain + +variable [SecondCountableTopology M] + +theorem punctured_critical_values_null (o : M) (f : M → ℝ) + (hf : ContMDiffOn I6 𝓘(ℝ, ℝ) ∞ f ({o}ᶜ : Set M)) : + volume (f '' puncturedCriticalSet o f) = 0 := by + apply Bernstein.Sard.exceptionalValues_null_of_chart_null + intro c + let U : Set E6 := (extChartAt I6 c).target ∩ (extChartAt I6 c).symm ⁻¹' ({o}ᶜ : Set M) + have hU : IsOpen U := by + apply isOpen_iff_mem_nhds.mpr + intro z hz + exact inter_mem ((isOpen_extChartAt_target (I := I6) c).mem_nhds hz.1) + ((continuousAt_extChartAt_symm'' hz.1).preimage_mem_nhds + (isOpen_compl_singleton.mem_nhds hz.2)) + have hcomp : ContDiffOn ℝ ∞ (f ∘ (extChartAt I6 c).symm) U := by + rw [← contMDiffOn_iff_contDiffOn] + exact hf.comp ((contMDiffOn_extChartAt_symm c).mono inter_subset_left) inter_subset_right + have hnull := Bernstein.Sard.scalar_sard_E6 U hU (f ∘ (extChartAt I6 c).symm) hcomp + apply measure_mono_null _ hnull + rintro t ⟨z, ⟨hz, hcrit⟩, hzt⟩ + refine ⟨z, ⟨⟨hz, hcrit.1⟩, ?_⟩, hzt⟩ + exact chart_fderiv_zero_of_punctured o f hf c hz hcrit.1 hcrit.2 + +theorem pole_critical_values_null (o : M) (f : M → ℝ) + (hf : ContMDiffOn I6 𝓘(ℝ, ℝ) ∞ f ({o}ᶜ : Set M)) : + volume (f '' poleCriticalSet o f) = 0 := by + rw [poleCriticalSet, image_union, image_singleton] + exact measure_union_null (measure_singleton _) (punctured_critical_values_null o f hf) + +def poleCriticalCarrier (o : M) (f : M → ℝ) : Set ℝ := + toMeasurable volume (f '' poleCriticalSet o f) + +omit [T1Space M] [IsManifold I6 ∞ M] [SecondCountableTopology M] in +theorem measurableSet_poleCriticalCarrier + [T1Space M] [IsManifold I6 ∞ M] [SecondCountableTopology M] (o : M) (f : M → ℝ) : + MeasurableSet (poleCriticalCarrier o f) := measurableSet_toMeasurable _ _ + +theorem poleCriticalCarrier_null (o : M) (f : M → ℝ) + (hf : ContMDiffOn I6 𝓘(ℝ, ℝ) ∞ f ({o}ᶜ : Set M)) : + volume (poleCriticalCarrier o f) = 0 := by + rw [poleCriticalCarrier, measure_toMeasurable] + exact pole_critical_values_null o f hf + +omit [T1Space M] [IsManifold I6 ∞ M] [SecondCountableTopology M] in +theorem mapsTo_poleCriticalCarrier + [T1Space M] [IsManifold I6 ∞ M] [SecondCountableTopology M] (o : M) (f : M → ℝ) : + MapsTo f (poleCriticalSet o f) (poleCriticalCarrier o f) := by + intro x hx + exact subset_toMeasurable volume _ ⟨x, hx, rfl⟩ + +end StableBernstein.W26 + +end + +end OAI diff --git a/lean/OAI/Geometry/StableBernstein/Geometry/Geometry.lean b/lean/OAI/Geometry/StableBernstein/Geometry/Geometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ee198ee5cd3122e16aab02a3e6cd00b47d3ed10 --- /dev/null +++ b/lean/OAI/Geometry/StableBernstein/Geometry/Geometry.lean @@ -0,0 +1,87 @@ +import Mathlib.Analysis.InnerProductSpace.PiL2 +import Mathlib.Analysis.Normed.Module.FiniteDimension +import Mathlib.Geometry.Manifold.ContMDiff.Basic +import Mathlib.Geometry.Manifold.MFDeriv.Basic +import Mathlib.Geometry.Manifold.VectorBundle.Riemannian +import Mathlib.Geometry.Manifold.VectorBundle.Tangent +import Mathlib.Tactic.Linarith +import OAI.Geometry.StableBernstein.Model + +namespace OAI + +noncomputable section +open scoped ContDiff +open Manifold + +namespace StableBernstein.W01 + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + +attribute [local instance] coordinateTangentNorm + +attribute [local instance] coordinateTangentNormedSpace + +lemma source_dimension : Module.finrank ℝ E6 = 6 := finrank_euclideanSpace_fin + +lemma ambient_dimension : Module.finrank ℝ E7 = 7 := finrank_euclideanSpace_fin + +lemma SmoothImmersion.mdifferentiable {F : M → E7} (hF : SmoothImmersion F) : + MDifferentiable I6 I7 F := hF.smooth.mdifferentiable (by simp) + +lemma inducedMetric_nonneg (F : M → E7) (x : M) (v : TangentSpace I6 x) : + 0 ≤ inducedMetric F x v v := real_inner_self_nonneg + +lemma inducedMetric_add_left (F : M → E7) (x : M) (u v w : TangentSpace I6 x) : + inducedMetric F x (u + v) w = inducedMetric F x u w + inducedMetric F x v w := by + simp [inducedMetric, inner_add_left] + +lemma inducedMetric_smul_left (F : M → E7) (x : M) (c : ℝ) (v w : TangentSpace I6 x) : + inducedMetric F x (c • v) w = c * inducedMetric F x v w := by + simp [inducedMetric, inner_smul_left] + +lemma SmoothImmersion.inducedMetric_self_eq_zero_iff {F : M → E7} + (hF : SmoothImmersion F) (x : M) (v : TangentSpace I6 x) : + inducedMetric F x v v = 0 ↔ v = 0 := by + constructor + · intro h + by_contra hv + exact (ne_of_gt (hF.inducedMetric_pos x v hv)) h + · rintro rfl + simp [inducedMetric] + +lemma secondFundamentalBilinear_apply (F ν : M → E7) (x : M) + (v w : TangentSpace I6 x) : + secondFundamentalBilinear F ν x v w = secondFundamentalForm F ν x v w := rfl + +lemma secondFundamentalForm_add_left (F ν : M → E7) (x : M) + (u v w : TangentSpace I6 x) : + secondFundamentalForm F ν x (u + v) w = + secondFundamentalForm F ν x u w + secondFundamentalForm F ν x v w := by + simp [secondFundamentalForm, inner_add_left, add_comm] + +lemma secondFundamentalForm_smul_left (F ν : M → E7) (x : M) + (c : ℝ) (v w : TangentSpace I6 x) : + secondFundamentalForm F ν x (c • v) w = + c * secondFundamentalForm F ν x v w := by + simp [secondFundamentalForm, inner_smul_left] + +lemma GlobalUnitNormal.normal_ne_zero {F ν : M → E7} (hν : GlobalUnitNormal F ν) + (x : M) : ν x ≠ 0 := by + intro h + have := hν.unit x + simp [h] at this + +lemma secondFundamentalForm_eq_zero_of_normal_derivative_eq_zero + (F ν : M → E7) (x : M) (h : differential ν x = 0) + (v w : TangentSpace I6 x) : secondFundamentalForm F ν x v w = 0 := by + simp [secondFundamentalForm, h] + +lemma SmoothImmersion.toRiemannianMetric_inner [IsManifold I6 ∞ M] + {F : M → E7} (hF : SmoothImmersion F) (x : M) (v w : TangentSpace I6 x) : + hF.toRiemannianMetric.inner x v w = inducedMetric F x v w := rfl + +end StableBernstein.W01 + +end + +end OAI diff --git a/lean/OAI/Geometry/StableBernstein/Model.lean b/lean/OAI/Geometry/StableBernstein/Model.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f2b1793a3655af0262edde64f04e12c623cc1e9 --- /dev/null +++ b/lean/OAI/Geometry/StableBernstein/Model.lean @@ -0,0 +1,680 @@ +import Mathlib + +namespace OAI + +noncomputable section + +namespace StableBernstein.W02 + +open MeasureTheory Manifold Bundle +open scoped Bundle ContDiff + +section +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H) + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [RiemannianBundle (fun x : M => TangentSpace I x)] + +def scalarDifferential (η : M → ℝ) (x : M) : TangentSpace I x →L[ℝ] ℝ := + (NormedSpace.fromTangentSpace (η x)).toContinuousLinearMap.comp + (mfderiv I 𝓘(ℝ, ℝ) η x) +def differentialEnergy (η : M → ℝ) (x : M) : ℝ := + ‖(scalarDifferential I η x)‖ ^ 2 +def IsSmoothCompactTest (η : M → ℝ) : Prop := + ContMDiff I 𝓘(ℝ, ℝ) ∞ η ∧ HasCompactSupport η + +end + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H) + {M : Type*} [TopologicalSpace M] [ChartedSpace H M] + [RiemannianBundle (fun x : M => TangentSpace I x)] +variable [MeasurableSpace M] + +def IntrinsicStability (μ : Measure M) (V : M → ℝ) : Prop := + ∀ η : M → ℝ, IsSmoothCompactTest I η → + (∫ x, V x * η x ^ 2 ∂μ) ≤ ∫ x, differentialEnergy I η x ∂μ + +end StableBernstein.W02 + +namespace StableBernstein.W01 + +open scoped ContDiff +open Manifold + +abbrev E6 := EuclideanSpace ℝ (Fin 6) +abbrev E7 := EuclideanSpace ℝ (Fin 7) +abbrev I6 := 𝓘(ℝ, E6) +abbrev I7 := 𝓘(ℝ, E7) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] +local instance coordinateTangentNorm (x : M) : NormedAddCommGroup (TangentSpace I6 x) := + inferInstanceAs (NormedAddCommGroup E6) +local instance coordinateTangentNormedSpace (x : M) : NormedSpace ℝ (TangentSpace I6 x) := + inferInstanceAs (NormedSpace ℝ E6) + +structure SmoothImmersion (F : M → E7) : Prop where + smooth : ContMDiff I6 I7 ∞ F + injective_differential (x : M) : Function.Injective (mfderiv I6 I7 F x) +def differential (F : M → E7) (x : M) : TangentSpace I6 x →L[ℝ] E7 := + (NormedSpace.fromTangentSpace (F x)).toContinuousLinearMap.comp (mfderiv I6 I7 F x) +lemma SmoothImmersion.differential_injective {F : M → E7} (hF : SmoothImmersion F) + (x : M) : Function.Injective (differential F x) := + (NormedSpace.fromTangentSpace (F x)).injective.comp (hF.injective_differential x) +structure GlobalUnitNormal (F ν : M → E7) : Prop where + smooth : ContMDiff I6 I7 ∞ ν + unit (x : M) : ‖ν x‖ = 1 + orthogonal (x : M) (v : TangentSpace I6 x) : + inner ℝ (ν x) (differential F x v) = 0 +def inducedMetric (F : M → E7) (x : M) (v w : TangentSpace I6 x) : ℝ := + inner ℝ (differential F x v) (differential F x w) +def inducedMetricBilinear (F : M → E7) (x : M) : + TangentSpace I6 x →L[ℝ] TangentSpace I6 x →L[ℝ] ℝ := + (innerSL ℝ (E := E7)).bilinearComp (differential F x) (differential F x) +lemma inducedMetricBilinear_apply (F : M → E7) (x : M) (v w : TangentSpace I6 x) : + inducedMetricBilinear F x v w = inducedMetric F x v w := rfl +lemma inducedMetric_symm (F : M → E7) (x : M) (v w : TangentSpace I6 x) : + inducedMetric F x v w = inducedMetric F x w v := real_inner_comm _ _ +lemma inducedMetric_self_eq_norm_sq (F : M → E7) (x : M) (v : TangentSpace I6 x) : + inducedMetric F x v v = ‖differential F x v‖ ^ 2 := real_inner_self_eq_norm_sq _ +lemma SmoothImmersion.inducedMetric_pos {F : M → E7} (hF : SmoothImmersion F) + (x : M) (v : TangentSpace I6 x) (hv : v ≠ 0) : 0 < inducedMetric F x v v := by + apply real_inner_self_pos.mpr + intro h + apply hv + apply hF.differential_injective x + simpa using h +def secondFundamentalForm (F ν : M → E7) (x : M) (v w : TangentSpace I6 x) : ℝ := + -inner ℝ (differential ν x v) (differential F x w) +def secondFundamentalBilinear (F ν : M → E7) (x : M) : + TangentSpace I6 x →L[ℝ] TangentSpace I6 x →L[ℝ] ℝ := + -(innerSL ℝ (E := E7)).bilinearComp (differential ν x) (differential F x) +def SmoothImmersion.toRiemannianMetric [IsManifold I6 ∞ M] + {F : M → E7} (hF : SmoothImmersion F) : + Bundle.RiemannianMetric (fun x : M ↦ TangentSpace I6 x) where + inner := inducedMetricBilinear F + symm := inducedMetric_symm F + pos := hF.inducedMetric_pos + continuousAt x := by + change ContinuousAt (fun v : TangentSpace I6 x ↦ + inner ℝ (differential F x v) (differential F x v)) 0 + exact ((differential F x).continuous.inner (differential F x).continuous).continuousAt + isVonNBounded x := by + let : FiniteDimensional ℝ (TangentSpace I6 x) := inferInstanceAs (FiniteDimensional ℝ E6) + apply (NormedSpace.isVonNBounded_iff ℝ).mpr + obtain ⟨K, _, hK⟩ := (differential F x).toLinearMap.injective_iff_antilipschitz.mp + (hF.differential_injective x) + apply (hK.isBounded_preimage (Metric.isBounded_ball (x := (0 : E7)) (r := 1))).subset + intro v hv + change inducedMetricBilinear F x v v < 1 at hv + change differential F x v ∈ Metric.ball (0 : E7) 1 + rw [Metric.mem_ball, dist_zero_right] + have hv' : ‖differential F x v‖ ^ 2 < 1 := by + simpa only [inducedMetricBilinear_apply, inducedMetric_self_eq_norm_sq] using hv + nlinarith [norm_nonneg (differential F x v)] +def HasInducedRiemannianMetric (F : M → E7) + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] : Prop := + ∀ (x : M) (v w : TangentSpace I6 x), + (Bundle.RiemannianBundle.g (E := fun x : M ↦ TangentSpace I6 x)).inner x v w = + inducedMetric F x v w +lemma SmoothImmersion.hasInducedRiemannianMetric [IsManifold I6 ∞ M] + {F : M → E7} (hF : SmoothImmersion F) : + letI : Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := + ⟨hF.toRiemannianMetric⟩ + HasInducedRiemannianMetric F := by + intro x v w + rfl + +end StableBernstein.W01 + +namespace StableBernstein.W18 + +open Set Metric +variable {X : Type*} [MetricSpace X] + +def ApproximateMidpoints (X : Type*) [MetricSpace X] : Prop := + ∀ x y : X, ∀ ε : ℝ, 0 < ε → ∃ z : X, + dist x z ≤ dist x y / 2 + ε ∧ dist z y ≤ dist x y / 2 + ε +theorem approximate_dyadic_split (hm : ApproximateMidpoints X) (x y : X) (n : ℕ) : + ∀ ε : ℝ, 0 < ε → ∃ z : X, + dist x z ≤ (1 - (1 / 2 : ℝ) ^ n) * dist x y + ε ∧ + dist z y ≤ (1 / 2 : ℝ) ^ n * dist x y + ε := by + induction n with + | zero => + intro ε hε + refine ⟨x, ?_, ?_⟩ <;> simp only [pow_zero, sub_self, zero_mul, one_mul, dist_self] <;> + linarith + | succ n ih => + intro ε hε + obtain ⟨z, hxz, hzy⟩ := ih (ε / 4) (by linarith) + obtain ⟨w, hzw, hwy⟩ := hm z y (ε / 4) (by linarith) + refine ⟨w, ?_, ?_⟩ + · have ht := dist_triangle x z w + rw [pow_succ] + nlinarith + · rw [pow_succ] + nlinarith +theorem compact_closedBall_extend [LocallyCompactSpace X] + (hm : ApproximateMidpoints X) {x : X} {r : ℝ} (hr : 0 < r) + (hc : IsCompact (closedBall x r)) : + ∃ δ : ℝ, 0 < δ ∧ IsCompact (closedBall x (r + δ)) := by + obtain ⟨τ, hτ, hcompact⟩ := hc.exists_isCompact_cthickening + obtain ⟨n, hn⟩ := exists_pow_lt_of_lt_one + (div_pos hτ (mul_pos (by norm_num : (0 : ℝ) < 4) hr)) + (by norm_num : (1 / 2 : ℝ) < 1) + let q : ℝ := (1 / 2 : ℝ) ^ n + have hq : 0 < q := pow_pos (by norm_num) n + have hq1 : q ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hqr : q * r < τ / 4 := by + have h := (lt_div_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 4) hr)).1 hn + dsimp [q] + nlinarith + let δ : ℝ := q * r / 4 + have hδ : 0 < δ := div_pos (mul_pos hq hr) (by norm_num) + have hδeq : 4 * δ = q * r := by dsimp [δ]; ring + refine ⟨δ, hδ, hcompact.of_isClosed_subset isClosed_closedBall ?_⟩ + intro y hy + have hy' : dist x y ≤ r + δ := mem_closedBall'.1 hy + obtain ⟨z, hxz, hzy⟩ := approximate_dyadic_split hm x y n δ hδ + change dist x z ≤ (1 - q) * dist x y + δ at hxz + change dist z y ≤ q * dist x y + δ at hzy + have hxmul := mul_le_mul_of_nonneg_left hy' (sub_nonneg.mpr hq1) + have hymul := mul_le_mul_of_nonneg_left hy' hq.le + have hqδ := mul_le_mul_of_nonneg_right hq1 hδ.le + have hqδ0 := mul_nonneg hq.le hδ.le + have hz : z ∈ closedBall x r := mem_closedBall'.2 (by nlinarith) + have hdist : dist z y ≤ τ := by nlinarith + exact mem_cthickening_of_dist_le y z τ (closedBall x r) hz + (by simpa only [dist_comm] using hdist) +theorem totallyBounded_closedBall_of_compact_smaller + (hm : ApproximateMidpoints X) {x : X} {r : ℝ} (hr : 0 < r) + (hsmall : ∀ s : ℝ, s < r → IsCompact (closedBall x s)) : + TotallyBounded (closedBall x r) := by + apply Metric.totallyBounded_iff.2 + intro ε hε + obtain ⟨n, hn⟩ := exists_pow_lt_of_lt_one + (div_pos hε (mul_pos (by norm_num : (0 : ℝ) < 8) hr)) + (by norm_num : (1 / 2 : ℝ) < 1) + let q : ℝ := (1 / 2 : ℝ) ^ n + have hq : 0 < q := pow_pos (by norm_num) n + have hq1 : q ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hqr : q * r < ε / 8 := by + have h := (lt_div_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 8) hr)).1 hn + dsimp [q] + nlinarith + let s : ℝ := r - q * r / 2 + have hs : s < r := by dsimp [s]; nlinarith [mul_pos hq hr] + obtain ⟨t, _, ht, hcover⟩ := (hsmall s hs).finite_cover_balls (by linarith : 0 < ε / 2) + refine ⟨t, ht, ?_⟩ + intro y hy + have hy' : dist x y ≤ r := mem_closedBall'.1 hy + have hδ : 0 < q * r / 4 := div_pos (mul_pos hq hr) (by norm_num) + obtain ⟨z, hxz, hzy⟩ := approximate_dyadic_split hm x y n (q * r / 4) hδ + change dist x z ≤ (1 - q) * dist x y + q * r / 4 at hxz + change dist z y ≤ q * dist x y + q * r / 4 at hzy + have hxmul := mul_le_mul_of_nonneg_left hy' (sub_nonneg.mpr hq1) + have hymul := mul_le_mul_of_nonneg_left hy' hq.le + have hz : z ∈ closedBall x s := by + apply mem_closedBall'.2 + dsimp [s] + nlinarith [mul_pos hq hr] + have hnear : dist y z < ε / 2 := by + rw [dist_comm] + nlinarith + obtain ⟨w, hw, hwz⟩ : ∃ w ∈ t, z ∈ ball w (ε / 2) := by + obtain ⟨w, hw⟩ := mem_iUnion.1 (hcover hz) + obtain ⟨hwt, hwz⟩ := mem_iUnion.1 hw + exact ⟨w, hwt, hwz⟩ + refine mem_iUnion.2 ⟨w, mem_iUnion.2 ⟨hw, ?_⟩⟩ + apply mem_ball.2 + have hzw : dist z w < ε / 2 := mem_ball.1 hwz + have htri := dist_triangle y z w + linarith +theorem compact_closedBall_of_compact_smaller [CompleteSpace X] + (hm : ApproximateMidpoints X) {x : X} {r : ℝ} (hr : 0 < r) + (hsmall : ∀ s : ℝ, s < r → IsCompact (closedBall x s)) : + IsCompact (closedBall x r) := + isCompact_iff_totallyBounded_isComplete.2 + ⟨totallyBounded_closedBall_of_compact_smaller hm hr hsmall, + isClosed_closedBall.isComplete⟩ +theorem properSpace_of_complete_locallyCompact_approximateMidpoints + [CompleteSpace X] [LocallyCompactSpace X] (hm : ApproximateMidpoints X) : + ProperSpace X := by + constructor + intro x r + by_contra hbad + let S : Set ℝ := {s | IsCompact (closedBall x s)} + obtain ⟨r₀, hr₀, hc₀⟩ := Metric.exists_isCompact_closedBall x + have hne : S.Nonempty := ⟨r₀, hc₀⟩ + have hb : BddAbove S := by + refine ⟨r, ?_⟩ + intro s hs + by_contra hnot + have hrs : r ≤ s := (lt_of_not_ge hnot).le + exact hbad (hs.of_isClosed_subset isClosed_closedBall (closedBall_subset_closedBall hrs)) + let R : ℝ := sSup S + have hR : 0 < R := lt_of_lt_of_le hr₀ (le_csSup hb hc₀) + have hcR : IsCompact (closedBall x R) := by + apply compact_closedBall_of_compact_smaller hm hR + intro s hs + obtain ⟨t, ht, hst⟩ := exists_lt_of_lt_csSup hne hs + exact ht.of_isClosed_subset isClosed_closedBall (closedBall_subset_closedBall hst.le) + obtain ⟨δ, hδ, hcδ⟩ := compact_closedBall_extend hm hR hcR + have hle : R + δ ≤ R := le_csSup hb hcδ + linarith + +end StableBernstein.W18 + +namespace StableBernstein.W04 +open Set MeasureTheory + +theorem exists_half_speed_integral (v : ℝ → ℝ) (hv : Continuous v) + (hn : ∀ t, 0 ≤ v t) : + ∃ t ∈ Icc (0 : ℝ) 1, + (∫ s in Icc 0 t, v s) = (∫ s in Icc 0 1, v s) / 2 := by + have hp : ContinuousOn (fun t => ∫ s in Icc 0 t, v s) (Icc (0 : ℝ) 1) := + intervalIntegral.continuousOn_primitive_Icc hv.integrableOn_Icc + have hnonneg : 0 ≤ ∫ s in Icc (0 : ℝ) 1, v s := integral_nonneg hn + have hzero : (∫ s in Icc (0 : ℝ) 0, v s) = 0 := by simp + have htarget : (∫ s in Icc (0 : ℝ) 1, v s) / 2 ∈ + Icc (∫ s in Icc (0 : ℝ) 0, v s) (∫ s in Icc (0 : ℝ) 1, v s) := by + rw [hzero] + constructor <;> linarith + exact intermediate_value_Icc zero_le_one hp htarget + +end StableBernstein.W04 + +namespace StableBernstein.W01 + +section + +open scoped ContDiff Bundle +open Manifold + +section +variable {M : Type*} [MetricSpace M] [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + +structure CompleteInducedMetric (F : M → E7) : Prop where + metric_induced : HasInducedRiemannianMetric F + metric_smooth : IsContMDiffRiemannianBundle I6 ∞ E6 (fun x : M ↦ TangentSpace I6 x) + distance_is_path_length : IsRiemannianManifold I6 M + complete : CompleteSpace M +lemma CompleteInducedMetric.edist_eq {F : M → E7} (h : CompleteInducedMetric F) + (x y : M) : edist x y = riemannianEDist I6 x y := + h.distance_is_path_length.out x y +instance tangentFiniteDimensional (x : M) : FiniteDimensional ℝ (TangentSpace I6 x) := + inferInstanceAs (FiniteDimensional ℝ E6) + +end + +variable {M : Type*} [MetricSpace M] [ChartedSpace E6 M] [manifold : IsManifold I6 ∞ M] + [riemannian : Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] +local instance tangentCompleteSpace (x : M) : CompleteSpace (TangentSpace I6 x) := + FiniteDimensional.complete ℝ (TangentSpace I6 x) + +omit manifold riemannian in +lemma tangent_dimension [IsManifold I6 ∞ M] + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + (x : M) : Module.finrank ℝ (TangentSpace I6 x) = 6 := + finrank_euclideanSpace_fin +def tangentOrthonormalBasis (x : M) : OrthonormalBasis (Fin 6) ℝ (TangentSpace I6 x) := + (stdOrthonormalBasis ℝ (TangentSpace I6 x)).reindex (finCongr (tangent_dimension x)) +def shapeOperator (F ν : M → E7) (x : M) : + TangentSpace I6 x →L[ℝ] TangentSpace I6 x := + InnerProductSpace.continuousLinearMapOfBilin (𝕜 := ℝ) (secondFundamentalBilinear F ν x) +def meanCurvatureTrace (F ν : M → E7) (x : M) : ℝ := + LinearMap.trace ℝ (TangentSpace I6 x) (shapeOperator F ν x).toLinearMap +def Minimal (F ν : M → E7) : Prop := ∀ x, meanCurvatureTrace F ν x = 0 +def curvatureNormSqInBasis (F ν : M → E7) (x : M) + {ι : Type*} [Fintype ι] (b : OrthonormalBasis ι ℝ (TangentSpace I6 x)) : ℝ := + ∑ i, ∑ j, secondFundamentalForm F ν x (b i) (b j) ^ 2 +def curvatureNormSq (F ν : M → E7) (x : M) : ℝ := + curvatureNormSqInBasis F ν x (tangentOrthonormalBasis x) + +end + +open scoped ContDiff Topology +open Manifold Bundle ContinuousLinearMap + +section +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] [IsManifold I6 ∞ M] +local instance smoothPullbackTangentNorm (x : M) : NormedAddCommGroup (TangentSpace I6 x) := + inferInstanceAs (NormedAddCommGroup E6) +local instance smoothPullbackTangentNormedSpace (x : M) : NormedSpace ℝ (TangentSpace I6 x) := + inferInstanceAs (NormedSpace ℝ E6) + +def differentialPairingBilinear (F G : M → E7) (x : M) : + TangentSpace I6 x →L[ℝ] TangentSpace I6 x →L[ℝ] ℝ := + (innerSL ℝ (E := E7)).bilinearComp (differential F x) (differential G x) +lemma contMDiff_differentialPairing (F G : M → E7) + (hF : ContMDiff I6 I7 ∞ F) (hG : ContMDiff I6 I7 ∞ G) : + ContMDiff I6 (I6.prod 𝓘(ℝ, E6 →L[ℝ] E6 →L[ℝ] ℝ)) ∞ + (fun x ↦ TotalSpace.mk' (E6 →L[ℝ] E6 →L[ℝ] ℝ) x + (differentialPairingBilinear F G x)) := by + intro x₀ + rw [contMDiffAt_section] + simp only [hom_trivializationAt_apply] + let DF := inTangentCoordinates I6 I7 id F (mfderiv I6 I7 F) x₀ + let DG := inTangentCoordinates I6 I7 id G (mfderiv I6 I7 G) x₀ + have hDF : ContMDiffAt I6 𝓘(ℝ, E6 →L[ℝ] E7) ∞ DF x₀ := + (hF x₀).mfderiv_const (by simp) + have hDG : ContMDiffAt I6 𝓘(ℝ, E6 →L[ℝ] E7) ∞ DG x₀ := + (hG x₀).mfderiv_const (by simp) + let realInner : E7 →L[ℝ] E7 →L[ℝ] ℝ := innerSL ℝ + have hB : ContMDiffAt I6 𝓘(ℝ, E6 →L[ℝ] E6 →L[ℝ] ℝ) ∞ + (fun x ↦ realInner.bilinearComp (DF x) (DG x)) x₀ := by + convert (hDG.clm_precomp (F₃ := ℝ)).clm_comp + ((contMDiffAt_const (c := realInner)).clm_comp hDF) using 1 + ext x v w + rfl + apply hB.congr_of_eventuallyEq + filter_upwards [(trivializationAt E6 (TangentSpace I6 (M := M)) x₀).open_baseSet.mem_nhds + (FiberBundle.mem_baseSet_trivializationAt E6 (TangentSpace I6 (M := M)) x₀)] with x hx + ext v w + rw [inCoordinates_apply_eq₂ hx hx (Set.mem_univ _)] + simp [realInner, DF, DG, inTangentCoordinates, inCoordinates, differentialPairingBilinear, differential, + NormedSpace.fromTangentSpace, tangentSpaceCastModel] + exact congrArg₂ (fun (u z : TangentSpace I6 x) => + inner ℝ (differential F x u) (differential G x z)) + (Trivialization.symmL_apply (R := ℝ) _ hx v).symm + (Trivialization.symmL_apply (R := ℝ) _ hx w).symm +lemma contMDiff_inducedMetricBilinear (F : M → E7) (hF : ContMDiff I6 I7 ∞ F) : + ContMDiff I6 (I6.prod 𝓘(ℝ, E6 →L[ℝ] E6 →L[ℝ] ℝ)) ∞ + (fun x ↦ TotalSpace.mk' (E6 →L[ℝ] E6 →L[ℝ] ℝ) x (inducedMetricBilinear F x)) := + contMDiff_differentialPairing F F hF hF + +end + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] [IsManifold I6 ∞ M] +open scoped Bundle + +lemma HasInducedRiemannianMetric.isContMDiffRiemannianBundle + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + {F : M → E7} (hmetric : HasInducedRiemannianMetric F) (hF : SmoothImmersion F) : + IsContMDiffRiemannianBundle I6 ∞ E6 (fun x : M ↦ TangentSpace I6 x) := + ⟨inducedMetricBilinear F, contMDiff_inducedMetricBilinear F hF.smooth, hmetric⟩ + +end StableBernstein.W01 + +namespace StableBernstein.W04 + +open Manifold MeasureTheory Set Filter +open scoped Bundle ContDiff ENNReal NNReal Topology +open W01 +variable {M : Type*} [MetricSpace M] [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + +theorem induced_continuousRiemannianBundle {F : M → E7} (hg : CompleteInducedMetric F) : + IsContinuousRiemannianBundle E6 (fun x : M ↦ TangentSpace I6 x) := by + obtain ⟨g, hcont, heq⟩ := hg.metric_smooth.exists_contMDiff + exact ⟨⟨g, hcont.continuous, heq⟩⟩ +theorem continuous_intrinsic_speed {F : M → E7} (hg : CompleteInducedMetric F) + {γ : ℝ → M} (hγ : ContMDiff 𝓘(ℝ, ℝ) I6 1 γ) : + Continuous (fun t => ‖mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ)‖) := by + let := induced_continuousRiemannianBundle hg + have hsection : Continuous (fun t : ℝ => + (⟨t, (1 : ℝ)⟩ : TangentBundle 𝓘(ℝ, ℝ) ℝ)) := + (tangentBundleModelSpaceHomeomorph 𝓘(ℝ, ℝ)).symm.continuous.comp + (continuous_id.prodMk continuous_const) + have hv : Continuous (fun t : ℝ => + (⟨γ t, mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ)⟩ : TangentBundle I6 M)) := + (hγ.continuous_tangentMap le_rfl).comp hsection + have hi : Continuous (fun t => inner ℝ + (mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ)) (mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ))) := + hv.inner_bundle hv + simpa only [norm_eq_sqrt_real_inner, Function.comp_def] using Real.continuous_sqrt.comp hi +theorem pathELength_eq_ofReal_speed_integral {F : M → E7} (hg : CompleteInducedMetric F) + {γ : ℝ → M} (hγ : ContMDiff 𝓘(ℝ, ℝ) I6 1 γ) (a b : ℝ) : + pathELength I6 γ a b = ENNReal.ofReal + (∫ t in Icc a b, ‖mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ)‖) := by + rw [pathELength_eq_lintegral_mfderiv_Icc] + simp_rw [← ofReal_norm] + exact (ofReal_integral_eq_lintegral_ofReal + (continuous_intrinsic_speed hg hγ).integrableOn_Icc + (Eventually.of_forall fun _ => norm_nonneg _)).symm +theorem induced_approximateMidpoints {F : M → E7} (hg : CompleteInducedMetric F) : + W18.ApproximateMidpoints M := by + intro x y ε hε + have hpositive : 0 < dist x y + ε := add_pos_of_nonneg_of_pos dist_nonneg hε + have hr : riemannianEDist I6 x y < ENNReal.ofReal (dist x y + ε) := by + rw [← hg.edist_eq, edist_dist] + exact (ENNReal.ofReal_lt_ofReal_iff hpositive).mpr (by linarith) + obtain ⟨γ, hx, hy, hγ, hlen, _, _⟩ := + exists_lt_locally_constant_of_riemannianEDist_lt hr (show (0 : ℝ) < 1 from zero_lt_one) + let v : ℝ → ℝ := fun t => ‖mfderiv 𝓘(ℝ, ℝ) I6 γ t (1 : ℝ)‖ + let L : ℝ → ℝ → ℝ := fun a b => ∫ t in Icc a b, v t + have hv : Continuous v := continuous_intrinsic_speed hg hγ + have hvnonneg : ∀ t, 0 ≤ v t := fun _ => norm_nonneg _ + have hLnonneg (a b : ℝ) : 0 ≤ L a b := integral_nonneg hvnonneg + have hlength (a b : ℝ) : pathELength I6 γ a b = ENNReal.ofReal (L a b) := + pathELength_eq_ofReal_speed_integral hg hγ a b + obtain ⟨t, ht, hhalf⟩ := exists_half_speed_integral v hv hvnonneg + change L 0 t = L 0 1 / 2 at hhalf + have htotal : L 0 1 < dist x y + ε := by + apply (ENNReal.ofReal_lt_ofReal_iff hpositive).mp + simpa only [hlength] using hlen + have hadd := pathELength_add (I := I6) (γ := γ) ht.1 ht.2 + rw [hlength 0 t, hlength t 1, hlength 0 1, + ← ENNReal.ofReal_add (hLnonneg 0 t) (hLnonneg t 1)] at hadd + have haddReal := congrArg ENNReal.toReal hadd + rw [ENNReal.toReal_ofReal (add_nonneg (hLnonneg 0 t) (hLnonneg t 1)), + ENNReal.toReal_ofReal (hLnonneg 0 1)] at haddReal + have hleft := riemannianEDist_le_pathELength hγ.contMDiffOn hx rfl ht.1 + have hright := riemannianEDist_le_pathELength hγ.contMDiffOn rfl hy ht.2 + rw [← hg.edist_eq, edist_dist, hlength 0 t] at hleft + rw [← hg.edist_eq, edist_dist, hlength t 1] at hright + have hleftReal := (ENNReal.ofReal_le_ofReal_iff (hLnonneg 0 t)).mp hleft + have hrightReal := (ENNReal.ofReal_le_ofReal_iff (hLnonneg t 1)).mp hright + refine ⟨γ t, ?_, ?_⟩ <;> linarith +theorem induced_properSpace {F : M → E7} (hg : CompleteInducedMetric F) : ProperSpace M := by + let : CompleteSpace M := hg.complete + let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace E6 M + exact W18.properSpace_of_complete_locallyCompact_approximateMidpoints + (induced_approximateMidpoints hg) + +end StableBernstein.W04 + +namespace StableBernstein.W03 + +open Manifold Set Bundle +open scoped ContDiff Topology Bundle +open StableBernstein.W01 + +theorem edist_lt_top_of_preconnected {X : Type*} [PseudoEMetricSpace X] + [PreconnectedSpace X] (x y : X) : edist x y < ⊤ := by + have hcl : IsClopen (Metric.eball y ⊤) := + ⟨Metric.isClosed_eball_top, Metric.isOpen_eball⟩ + have hall : Metric.eball y ⊤ = univ := + hcl.eq_univ ⟨y, Metric.mem_eball_self (by simp)⟩ + have hx : x ∈ Metric.eball y ⊤ := by rw [hall]; trivial + exact hx + +open StableBernstein.W01 +variable {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + [IsManifold I6 ∞ M] [hausdorff : T2Space M] [preconnected : PreconnectedSpace M] + +omit hausdorff preconnected in +theorem inducedRiemannianBundle_continuous [T2Space M] [PreconnectedSpace M] + {F : M → E7} (hF : SmoothImmersion F) : + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + IsContinuousRiemannianBundle E6 (fun x : M ↦ TangentSpace I6 x) := by + let : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + exact ⟨inducedMetricBilinear F, + (contMDiff_inducedMetricBilinear F hF.smooth).continuous, fun _ _ _ ↦ rfl⟩ +@[reducible] def canonicalInducedMetricSpace {F : M → E7} (hF : SmoothImmersion F) : MetricSpace M := by + letI : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace E6 M + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + letI : IsContinuousRiemannianBundle E6 (fun x : M ↦ TangentSpace I6 x) := + inducedRiemannianBundle_continuous hF + letI : EMetricSpace M := EMetricSpace.ofRiemannianMetric I6 M + exact EMetricSpace.toMetricSpace (fun x y ↦ (edist_lt_top_of_preconnected x y).ne) +theorem canonicalInducedMetricSpace_edist {F : M → E7} (hF : SmoothImmersion F) : + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + letI : MetricSpace M := canonicalInducedMetricSpace hF + ∀ x y : M, edist x y = riemannianEDist I6 x y := by + intro x y + rfl +theorem canonicalInducedMetricSpace_isRiemannian {F : M → E7} (hF : SmoothImmersion F) : + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + letI : MetricSpace M := canonicalInducedMetricSpace hF + IsRiemannianManifold I6 M := by + let : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + let : MetricSpace M := canonicalInducedMetricSpace hF + exact ⟨canonicalInducedMetricSpace_edist hF⟩ +def CanonicallyCompleteInducedMetric {F : M → E7} (hF : SmoothImmersion F) : Prop := + letI : MetricSpace M := canonicalInducedMetricSpace hF + CompleteSpace M +theorem completeInducedMetric_of_canonical_complete {F : M → E7} (hF : SmoothImmersion F) + (hcomplete : CanonicallyCompleteInducedMetric hF) : + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + letI : MetricSpace M := canonicalInducedMetricSpace hF + CompleteInducedMetric F := by + let : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + let : MetricSpace M := canonicalInducedMetricSpace hF + exact ⟨hF.hasInducedRiemannianMetric, + hF.hasInducedRiemannianMetric.isContMDiffRiemannianBundle hF, + canonicalInducedMetricSpace_isRiemannian hF, hcomplete⟩ + +end StableBernstein.W03 + +namespace StableBernstein + +open scoped ContDiff Bundle +open Manifold +universe u +open W01 W02 + +def FullConclusion {M : Type*} [TopologicalSpace M] [ChartedSpace E6 M] + (F ν : M → E7) : Prop := + (∀ (x : M) (v w : TangentSpace I6 x), secondFundamentalForm F ν x v w = 0) ∧ + ∃ P : AffineSubspace ℝ E7, + Module.finrank ℝ P.direction = 6 ∧ Set.range F = (P : Set E7) + +end StableBernstein + +namespace StableBernstein.W02 + +section + +open MeasureTheory Manifold Matrix +open scoped Bundle ContDiff ENNReal +open StableBernstein.W01 +variable {M : Type*} [MetricSpace M] [MeasurableSpace M] [BorelSpace M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [Bundle.RiemannianBundle (fun x : M => TangentSpace I6 x)] + +def inverseChartBasisVector (x : M) (y : E6) (i : Fin 6) : + TangentSpace I6 ((extChartAt I6 x).symm y) := + mfderiv I6 I6 (extChartAt I6 x).symm y + ((NormedSpace.fromTangentSpace y).symm (EuclideanSpace.single i 1)) +def chartMetricMatrix (F : M → E7) (x : M) (y : E6) : Matrix (Fin 6) (Fin 6) ℝ := + fun i j => inducedMetric F ((extChartAt I6 x).symm y) + (inverseChartBasisVector x y i) (inverseChartBasisVector x y j) +def chartVolumeDensity (F : M → E7) (x : M) (y : E6) : ℝ := + Real.sqrt (Matrix.det (chartMetricMatrix F x y)) + +end + +open MeasureTheory Manifold Bundle Set Filter +open scoped Bundle ContDiff Topology ENNReal + +section +open StableBernstein.W01 +variable {M : Type*} [MetricSpace M] [MeasurableSpace M] [BorelSpace M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [RiemannianBundle (fun x : M => TangentSpace I6 x)] + +def chartInverseExtension (x : M) : E6 → M := by + classical + exact (extChartAt I6 x).target.piecewise (extChartAt I6 x).symm (fun _ => x) +def chartRiemannianMeasure (F : M → E7) (x : M) : Measure M := + Measure.map (chartInverseExtension x) + ((volume.restrict (extChartAt I6 x).target).withDensity + (fun y => ENNReal.ofReal (chartVolumeDensity F x y))) + +end + +open StableBernstein.W01 +variable {M : Type*} [MetricSpace M] [measurable : MeasurableSpace M] [borel : BorelSpace M] + [ChartedSpace E6 M] [manifold : IsManifold I6 ∞ M] + [riemannian : RiemannianBundle (fun x : M => TangentSpace I6 x)] + [SecondCountableTopology M] [Nonempty M] + +omit measurable borel manifold riemannian in +lemma exists_countable_chart_cover [MeasurableSpace M] [BorelSpace M] + [IsManifold I6 ∞ M] [RiemannianBundle (fun x : M => TangentSpace I6 x)] : + ∃ c : ℕ → M, (⋃ n, (extChartAt I6 (c n)).source) = univ := by + obtain ⟨s, hsc, hsU⟩ := countable_cover_nhds + (fun x : M => (isOpen_extChartAt_source (I := I6) x).mem_nhds (mem_extChartAt_source x)) + have hsne : s.Nonempty := by + by_contra h + rw [Set.not_nonempty_iff_eq_empty.mp h] at hsU + exact Set.empty_ne_univ (by simpa using hsU) + obtain ⟨c, hc⟩ := hsc.exists_eq_range hsne + refine ⟨c, ?_⟩ + simpa only [hc, biUnion_range] using hsU +def volumeChartCenters : ℕ → M := Classical.choose (exists_countable_chart_cover (M := M)) +def volumeChartPiece (n : ℕ) : Set M := + disjointed (fun n => (extChartAt I6 (volumeChartCenters (M := M) n)).source) n +def riemannianVolume (F : M → E7) : Measure M := + Measure.sum (fun n => (chartRiemannianMeasure F (volumeChartCenters n)).restrict (volumeChartPiece n)) + +end StableBernstein.W02 + +namespace StableBernstein + +open Manifold +open scoped ContDiff Bundle +open W01 W02 +universe u + +def RiemannianGeometricStability {M : Type u} + [MetricSpace M] [MeasurableSpace M] [BorelSpace M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [SecondCountableTopology M] [Nonempty M] + [Bundle.RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + (F ν : M → E7) : Prop := + IntrinsicStability I6 (riemannianVolume F) (curvatureNormSq F ν) + +end StableBernstein + +open Manifold Bundle +open scoped ContDiff Bundle +namespace StableBernstein +open W01 W02 W03 +universe u + +theorem secondCountable_of_complete_induced_metric + {M : Type u} [MetricSpace M] [ChartedSpace E6 M] [IsManifold I6 ∞ M] + [RiemannianBundle (fun x : M ↦ TangentSpace I6 x)] + {F : M → E7} (hmetric : CompleteInducedMetric F) : SecondCountableTopology M := by + let : ProperSpace M := W04.induced_properSpace hmetric + infer_instance +theorem canonical_complete_secondCountable + {M : Type u} [TopologicalSpace M] [T2Space M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] [PreconnectedSpace M] + {F : M → E7} (hF : SmoothImmersion F) + (hc : CanonicallyCompleteInducedMetric hF) : SecondCountableTopology M := by + let : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + let : MetricSpace M := canonicalInducedMetricSpace hF + exact secondCountable_of_complete_induced_metric + (completeInducedMetric_of_canonical_complete hF hc) +def IntrinsicStableBernstein : Prop := + ∀ (M : Type u) [TopologicalSpace M] [T2Space M] + [ChartedSpace E6 M] [IsManifold I6 ∞ M] [Nonempty M] [ConnectedSpace M] + (F ν : M → E7) (hF : SmoothImmersion F) + (hc : CanonicallyCompleteInducedMetric hF), + letI : RiemannianBundle (fun x : M ↦ TangentSpace I6 x) := ⟨hF.toRiemannianMetric⟩ + letI : MetricSpace M := canonicalInducedMetricSpace hF + letI : MeasurableSpace M := borel M + letI : BorelSpace M := ⟨rfl⟩ + letI : SecondCountableTopology M := canonical_complete_secondCountable hF hc + GlobalUnitNormal F ν → Minimal F ν → RiemannianGeometricStability F ν → + FullConclusion F ν + +end StableBernstein + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/All.lean b/lean/OAI/Geometry/SurfaceImmersion/All.lean new file mode 100644 index 0000000000000000000000000000000000000000..f56de5533dec93ecebe95443e2df5dac871d3fe5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/All.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasCombinedCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasGoodPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.ChartImmersionReplacement +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateImmersionReplacement +import OAI.Geometry.SurfaceImmersion.Atlas.FinitePhaseCurveDefiners +import OAI.Geometry.SurfaceImmersion.Atlas.GenericIndependentPhases +import OAI.Geometry.SurfaceImmersion.Atlas.GeometricAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentExactPhase +import OAI.Geometry.SurfaceImmersion.Atlas.LocalAnsatzMetricLimit +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryAvoidance +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryMatching +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedAngularJets +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialFreeSplit +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialOverlapCancellation +import OAI.Geometry.SurfaceImmersion.Correction.CompactPolynomialSolver +import OAI.Geometry.SurfaceImmersion.Correction.CorrectedPolynomialRootMean +import OAI.Geometry.SurfaceImmersion.Correction.ExactCorrectionConvergence +import OAI.Geometry.SurfaceImmersion.Correction.ExplicitGlobalQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAdjustedMean +import OAI.Geometry.SurfaceImmersion.Correction.FiniteCombinedMean +import OAI.Geometry.SurfaceImmersion.Correction.IndependentPhaseMean +import OAI.Geometry.SurfaceImmersion.Correction.InitialLocalCorrection +import OAI.Geometry.SurfaceImmersion.Correction.LinearChartedMeanData +import OAI.Geometry.SurfaceImmersion.Correction.MixedPeriodicMean +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrectorSystem +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedRootMean +import OAI.Geometry.SurfaceImmersion.Correction.PhasePrimitiveMeanRealization +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialForcedBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFreeModes +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInitialCorrection +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanError +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialScaleSelection +import OAI.Geometry.SurfaceImmersion.Correction.SmoothedMetricStepBounds +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasAdjustedMean +import OAI.Geometry.SurfaceImmersion.Correction.UniformRootMean +import OAI.Geometry.SurfaceImmersion.Geometry.RadialMetricAlgebra +import OAI.Geometry.SurfaceImmersion.Geometry.CompactActualFrame +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorIntrinsicPreservation +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteBoundaryStartingFamily +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCurveTransverse +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderInputStep +import OAI.Geometry.SurfaceImmersion.Geometry.InteriorDensityCompact +import OAI.Geometry.SurfaceImmersion.Geometry.LinearGeometricLocalStep +import OAI.Geometry.SurfaceImmersion.Geometry.LocalAnsatzNormalGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.LocalTensorTarget +import OAI.Geometry.SurfaceImmersion.Geometry.LongitudinalSurfaceTwist +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizationBounds +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizationStability +import OAI.Geometry.SurfaceImmersion.Geometry.RealizeTransverseHomotopy +import OAI.Geometry.SurfaceImmersion.Geometry.SlowOrderSchedule +import OAI.Geometry.SurfaceImmersion.Geometry.TensorGlobalAmplitudes +import OAI.Geometry.SurfaceImmersion.Geometry.UniformAngularNormal +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverDomain +import OAI.Geometry.SurfaceImmersion.Main +import OAI.Geometry.SurfaceImmersion.Primitive.ActualAnalyticSurfaceLoop +import OAI.Geometry.SurfaceImmersion.Primitive.BlendedNormalizedLoop +import OAI.Geometry.SurfaceImmersion.Primitive.CircularActualCrossings +import OAI.Geometry.SurfaceImmersion.Primitive.CircularCurveCover +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFamilyWeights +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrimitiveBoundaryStep +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrimitiveRealization +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPrimitiveSupport +import OAI.Geometry.SurfaceImmersion.Primitive.CorrectedCircularFamily +import OAI.Geometry.SurfaceImmersion.Primitive.ExactCircularCurves +import OAI.Geometry.SurfaceImmersion.Primitive.ExactOriginalProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPhasePrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.ExactPrimitiveMetric +import OAI.Geometry.SurfaceImmersion.Primitive.FinitePeriodicExpansion +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCircularActualCrossings +import OAI.Geometry.SurfaceImmersion.Primitive.LocalCircularCurveCover +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicIntegralOperator +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicSupport +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveNormalRealization +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedAnalyticProfiles +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedCircularSurfaceLoop +import OAI.Geometry.SurfaceImmersion.Primitive.PreparedFixedFrameLoop +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCycleMetrics +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveGeometricApproximation +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSlowIncrement +import OAI.Geometry.SurfaceImmersion.Primitive.ProfileCrossingPath +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceFiniteCurveLoop +import OAI.Geometry.SurfaceImmersion.Primitive.UniformCircularRealization +import OAI.Geometry.SurfaceImmersion.Primitive.UniformCircularStartingFamily +import OAI.Geometry.SurfaceImmersion.Whitney.CollarVelocityFamily +import OAI.Geometry.SurfaceImmersion.Whitney.CompactPairC1Regularization +import OAI.Geometry.SurfaceImmersion.Whitney.CompactPairRegularization +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapArcCoordinates +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisFactor +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapDisjointCharts +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapNormalizedRectangle +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleArcExceptionalTimes +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleChartReparametrization +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleImageCoordinates +import OAI.Geometry.SurfaceImmersion.Whitney.EmbeddedAxisCollar +import OAI.Geometry.SurfaceImmersion.Whitney.FinitePairPointRegularization +import OAI.Geometry.SurfaceImmersion.Whitney.FinitePairProtectedRegularization +import OAI.Geometry.SurfaceImmersion.Whitney.GeometricBoundaryCollar +import OAI.Geometry.SurfaceImmersion.Whitney.OrientedArcJoin +import OAI.Geometry.SurfaceImmersion.Whitney.PreparedCrosscapSourcePath +import OAI.Geometry.SurfaceImmersion.Whitney.RegularDoubleLocusImmersion +import OAI.Geometry.SurfaceImmersion.Whitney.RegularDoublePointNormalForm +import OAI.Geometry.SurfaceImmersion.Whitney.RegularHomotopyCollar +import OAI.Geometry.SurfaceImmersion.Whitney.RegularInteriorDoubleArc +import OAI.Geometry.SurfaceImmersion.Whitney.RegularSheetDoubleChart +import OAI.Geometry.SurfaceImmersion.Whitney.SameSideCollarHomotopy +import OAI.Geometry.SurfaceImmersion.Whitney.ScaledCrosscapCancellation +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothRelativeFrame +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothSurfaceDoubleArc +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceExactCollar diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ActualPhaseGoodness.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ActualPhaseGoodness.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a69b7a9597c2188e6e9cebba52a24f5ade78a9a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ActualPhaseGoodness.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GlobalPhaseGerms +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Atlas.QualitativePhaseTransfer +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets + +namespace OAI + +/-! Pure global phases remain good when read in any overlapping atlas +chart. This supplies the geometric input to the compact weight choice. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial (planeCoordinateIsometry) +open JetPolynomial.Perturbation (modeSupport) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem linearAtlasPhase_unit_read_good {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (Q : A.centers → PhaseBasis) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hpure : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (a : A.centers × Fin 3) (k : A.centers) + {p : M} (hpa : p ∈ tsupport (A.weight a.1)) (hpk : p ∈ tsupport (A.weight k)) : + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p)) + (phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q (fun _ _ => 1) a)) + (coordinateChart (k : M) p)) := by + have hpA : p ∈ (coordinateChart (a.1 : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support a.1 hpa + have hpK : p ∈ (coordinateChart (k : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support k hpk + have hxA : coordinateChart (a.1 : M) p ∈ + (modeSupport (A.chartWeightCompact a.1) : Set SmallModes.Base) := by + exact ⟨chart (a.1 : M) p,⟨p,hpa,rfl⟩,rfl⟩ + have heA := A.vectorPlaneRead_eventually_coordinateMap F a.1 (houter a.1) hpa + have hdA := heA.fderiv_eq (𝕜 := ℝ) + have hsA := (realSecondTensor_eventuallyEq heA).eq_of_nhds + have hi := hImm a.1 _ hxA + have hg := hpure a.1 a.2 _ hxA + change fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead a.1 F) (coordinateChart (a.1 : M) p) = + fderiv ℝ (coordinateMap F (a.1 : M)) (coordinateChart (a.1 : M) p) at hdA + change realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead a.1 F) (coordinateChart (a.1 : M) p) = + realSecondTensor (coordinateMap F (a.1 : M)) (coordinateChart (a.1 : M) p) at hsA + rw [hdA] at hi + rw [hsA] at hg + have ht := actual_phase_good_at hF (a.1 : M) (k : M) hpK hpA ((Q a.1).ξ a.2) + (gramDet_ne_zero_of_injective _ hi) hg + have heK := A.vectorPlaneRead_eventually_coordinateMap F k (houter k) hpk + have hsK := (realSecondTensor_eventuallyEq heK).eq_of_nhds + change realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p) = + realSecondTensor (coordinateMap F (k : M)) (coordinateChart (k : M) p) at hsK + rw [hsK,A.linearAtlasPhase_read_phaseDerivative Q (fun _ _ => 1) a k houter hpa hpk, + one_smul] + exact ht + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..6129d549334142a40205a0c900bbf5c891a851e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasIncrement.lean @@ -0,0 +1,169 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SelectedGridGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.GridGeometricIncrement + +namespace OAI + +/-! Actual polynomial increments selected uniformly near a fast atlas map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes +lemma phaseCatalog_inverse_bound (V : Finset Base) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ ξ ∈ V, ∀ hξ : ξ ≠ 0, + ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ D := by + classical + let f := fun ξ : Base => if hξ : ξ ≠ 0 then ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ else 0 + have hf (ξ : Base) : 0 ≤ f ξ := by dsimp [f]; split_ifs <;> positivity + refine ⟨1+∑ ξ ∈ V, f ξ,le_add_of_nonneg_right (Finset.sum_nonneg (fun ξ _ => hf ξ)),?_⟩ + intro ξ hξ hn + have hh := Finset.single_le_sum (fun η (_ : η ∈ V) => hf η) hξ + have he : f ξ = ‖(phaseEquiv ξ hn).symm.toContinuousLinearMap‖ := dite_eq_left hn + rw [he] at hh + linarith +end ClosedSurfaceR4.PhaseGeometry + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry PhaseGrid +local instance anchoredIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredIncrementSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_atlas_increment (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ r : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < r ∧ + ∀ FJ Y : ℕ → ℝ → ℝ, + (∀ m, HasPolynomialBound (FJ m)) → (∀ m, HasPolynomialBound (Y m)) → + (∀ m x, 1 ≤ x → 1 ≤ FJ m x) → (∀ m x, 1 ≤ x → 1 ≤ Y m x) → ∀ q : ℕ, + ∃ e : ℕ, ∃ E : ℝ, ∃ P Q : ℕ → ℝ → ℝ, 1 ≤ E ∧ + (∀ m, HasPolynomialBound (P m)) ∧ (∀ m, HasPolynomialBound (Q m)) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + ∀ G : M → Space, A.ReadJetBall z F G → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i m l, l ≤ m+3 → WeightedEstimates.WeightedBound univ 1 l + (FJ m z⁻¹/(s : ℝ)^(l-2)) (spaceCoordinates ∘ A.vectorPlaneRead i G)) → + (τ/s) ≤ min 1 ((r-r/2)/(2*(E*(z⁻¹)^e))) → + ∀ f : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (f y)) → + (∀ y v v', f y v v' = f y v' v) → + (∀ y, ‖A.tensorEncode f y-A.tensorEncode g.inner y‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (Y m z⁻¹) f) → + ∀ δ : ℝ, 0 < δ → δ ≤ τ → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m (P m z⁻¹*(δ*τ)) U) ∧ + (∀ m, A.TensorWeightedBound τ m (Q m z⁻¹*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (G+U)-inducedTensor G-δ^2 • f)) := by + classical + obtain ⟨stock,weights,z₀,K,C,ε,W,κ,hz₀,hz₀1,hK,hC,hε,hW,hκ,hselect⟩ := + A.anchored_atlas_phases g houter R c B b hc hB hb + obtain ⟨_,H,_,_,_,hH,_,hHnorm,_⟩ := A.metric_plane_read_bounds g + let V : Finset SmallModes.Base := stock.biUnion (fun P => + Finset.univ.biUnion (fun j : Fin 3 => weights.image (fun w => w • P.ξ j))) + obtain ⟨D₁,hD₁,hDinv⟩ := phaseCatalog_inverse_bound V + let D := 1+4/c+8/(ε*b) + have hD : 0 < D := by dsimp [D]; positivity + have hgramD : 4/c ≤ D := by + have hh : 0 ≤ 8/(ε*b) := by positivity + dsimp [D]; linarith + have hnormalD : 8/(ε*b) ≤ D := by + have hh : 0 ≤ 4/c := by positivity + dsimp [D]; linarith + obtain ⟨r,hr,hstep⟩ := A.grid_geometric_increment g V houter + (by positivity : 0 < ε/4) hκ (half_pos hb) (half_pos hε) + (zero_le_one.trans hC) (mul_nonneg (zero_le_one.trans hC) (zero_le_one.trans hH)) hK.le hD + refine ⟨z₀,r,hz₀,hz₀1,hr,?_⟩ + intro FJ Y hFJ hY hFJ1 hY1 q + let M₀ := 1+2*D+C+W*C+D₁ + have hM₀ : 0 ≤ M₀ := by dsimp [M₀]; positivity + let J := fun m x => FJ m x+M₀ + have hJ (m : ℕ) : HasPolynomialBound (J m) := (hFJ m).add (polynomialBound_const hM₀) + have hJ1 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ J m x := by + have hh := hFJ1 m x hx + dsimp [J]; linarith + obtain ⟨e,E,P,Q,hE,hP,hQ,hbuild⟩ := hstep J Y hJ hY hJ1 hY1 q + refine ⟨e,E,P,Q,hE,hP,hQ,?_⟩ + intro z hz hzsmall F hF hFb hFm G hG τ s hτ hs hτs hs1 hjets hsmall f hf hsym hnear hfsize δ hδ hδτ + obtain ⟨a,Pa,ξ,w,hstock,hweights,hcard,hcover,hPa,hw,hpoint,hpairs⟩ := + hselect z hz hzsmall F hF hFb hFm + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + have hpt : A.SelectedGridPointMargins g z a Pa G c b ε := hpoint G hG + have hV (l : A.GridPhaseIndex a) : w (A.gridPhaseLabel l) • ξ (A.gridPhaseLabel l) ∈ V := by + rcases l with ⟨i,k,j⟩ + change w (i,k.val,j) • ξ (i,k.val,j) ∈ V + rw [(hPa i k j).1] + exact Finset.mem_biUnion.mpr ⟨Pa i k,hstock i k, + Finset.mem_biUnion.mpr ⟨j,Finset.mem_univ _,Finset.mem_image.mpr ⟨w (i,k.val,j),hweights _,rfl⟩⟩⟩ + have hgeom := A.selected_grid_cover_geometry hz hc hcover hpt + have hcell := A.selected_grid_cell_geometry hε hb (zero_le_one.trans hC) w hpt + (fun i k j => (hPa i k j).2.1) hw + have hJbig (m : ℕ) : 2*D ≤ J m z⁻¹ ∧ C ≤ J m z⁻¹ ∧ W*C ≤ J m z⁻¹ ∧ D₁ ≤ J m z⁻¹ := by + have hj := hFJ1 m z⁻¹ hx + have hd0 := hD.le + have hc0 := zero_le_one.trans hC + have hwc := mul_nonneg hW.le hc0 + have hdi := zero_le_one.trans hD₁ + dsimp [J,M₀] + constructor + · linarith + constructor + · linarith + constructor <;> linarith + apply hbuild z hz (hzsmall.trans hz₀1) a hcard hcover Pa ξ w + (fun i k j => (hPa i k j).1) (fun l => (hw l).1) hV + (fun i k j => (hPa i k j).2.2) + (fun i k j y => by + calc + (Pa i k).Q j (A.tensorPlaneRead i g.inner y) ≤ + ‖(Pa i k).Q j (A.tensorPlaneRead i g.inner y)‖ := Real.le_norm_self _ + _ ≤ ‖(Pa i k).Q j‖*‖A.tensorPlaneRead i g.inner y‖ := ContinuousLinearMap.le_opNorm _ _ + _ ≤ C*H := mul_le_mul (hPa i k j).2.2 (hHnorm i y) + (norm_nonneg _) (zero_le_one.trans hC)) + (fun i k j y hy => (hcell i k j y hy).1) G hG.1 + (A.selected_grid_pure_geometry hc hb houter ξ (fun i k j => (hPa i k j).1) hpt) + (hpairs G hG) (fun i y hy => (hgeom i y hy).1) + (fun i y hy => (hgeom i y hy).2.1) + (fun i y hy => (hgeom i y hy).2.2.trans hgramD) + (fun i k j y hy => ⟨(hcell i k j y hy).2.1,(hcell i k j y hy).2.2.1.trans hnormalD⟩) + τ s hτ hs hτs hs1 (fun m => ⟨(hJbig m).1,(hJbig m).2.1⟩) + (fun i k j m => ⟨?_,?_⟩) (fun i m l hl => ?_) hsmall f hf hsym hnear hfsize δ hδ hδτ + · have hw0 : 0 ≤ w (i,k.val,j) := zero_le_one.trans (hw _).1 + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hw0] + exact ((mul_le_mul_of_nonneg_left (hPa i k j).2.1 hw0).trans + (mul_le_mul_of_nonneg_right (hw _).2 (zero_le_one.trans hC))).trans (hJbig m).2.2.1 + · intro hn + have hv := hV ⟨i,k,j⟩ + change w (i,k.val,j) • ξ (i,k.val,j) ∈ V at hv + rw [(hPa i k j).1] at hv + exact (hDinv _ hv hn).trans (hJbig m).2.2.2 + · apply (hjets i m l hl).mono_const + apply div_le_div_of_nonneg_right _ (pow_nonneg hs.le _) + dsimp [J] + linarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0c6308d6444628449fc60032a5c2bcb2eb5ca18 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredAtlasPhases.lean @@ -0,0 +1,181 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AnchoredGridPhases +import OAI.Geometry.SurfaceImmersion.Atlas.AnchoredGridCover +import OAI.Geometry.SurfaceImmersion.Atlas.MetricReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.GridCellGeometry +import OAI.Geometry.Immersion.ClosedSurface.GoodAtlas + +namespace OAI + +/-! Phase catalogs for a fixed smoothing atlas, using geometry only on its weight supports. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes WeightedEstimates PhaseGeometry PhaseGrid +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def ReadJetBall (z : ℝ) (F G : M → Space) : Prop := + ContMDiff planeModel spaceModel ∞ G ∧ ∀ i x, + x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) x- + firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ≤ z^4 ∧ + ‖secondJetTriple (spaceCoordinates ∘ A.vectorPlaneRead i F) x- + secondJetTriple (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ≤ z^4 + +lemma readJetBall_self (z : ℝ) {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) : + A.ReadJetBall z F F := by + refine ⟨hF,fun i x hx => ?_⟩ + simp only [sub_self,norm_zero] + exact ⟨by positivity,by positivity⟩ + +omit [CompactSpace M] in +lemma read_gram_eq_atlas (F : M → Space) (i : A.centers) + (houter : ∀ p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight i)) : + NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) (coordinateChart (i : M) p)).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i F) (coordinateChart (i : M) p)).2 = + atlasGram F (i : M) p := by + have he := (A.vectorPlaneRead_eventually_coordinateMap F i houter hp).fderiv_eq (𝕜 := ℝ) + change NormalFrame.gramDet + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry (chart (i : M) p)) SmallModes.dx) + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) (planeCoordinateIsometry (chart (i : M) p)) SmallModes.dy) = _ + exact + congrArg (fun L : SmallModes.Base →L[ℝ] RVec 4 => NormalFrame.gramDet (L SmallModes.dx) (L SmallModes.dy)) he + +omit [CompactSpace M] in +lemma read_second_eq_atlas (F : M → Space) (i : A.centers) + (houter : ∀ p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight i)) : + realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (coordinateChart (i : M) p) = + atlasSecondTensor F (i : M) p := + (realSecondTensor_eventuallyEq (A.vectorPlaneRead_eventually_coordinateMap F i houter hp)).eq_of_nhds + +theorem anchored_atlas_phases (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ phaseStock : Finset PhaseBasis, ∃ weightStock : Finset ℝ, + ∃ z₀ K C ε W κ : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < K ∧ 1 ≤ C ∧ + 0 < ε ∧ 0 < W ∧ 0 < κ ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + ∃ (s : A.centers → Finset Index) (P : ∀ i, (s i) → PhaseBasis) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ), + (∀ i a, P i a ∈ phaseStock) ∧ (∀ a, w a ∈ weightStock) ∧ + (∑ i, ((s i).card : ℝ)) ≤ K/z^12 ∧ + (∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion (s i) (z^6)) ∧ + (∀ i a j, ξ (i,a.val,j) = (P i a).ξ j ∧ + ‖(P i a).ξ j‖ ≤ C ∧ ‖(P i a).Q j‖ ≤ C) ∧ + (∀ a, 1 ≤ w a ∧ w a ≤ W) ∧ + (∀ G, A.ReadJetBall z F G → ∀ i (a : s i) x, + x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + x ∈ tsupport (cutoff (z^6) a.val) → + c/4 ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).2 ∧ + b/2 ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ∧ ∀ j, + ε/2 ≤ (P i a).Q j (A.tensorPlaneRead i g.inner x) ∧ + (ε/4)*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ≤ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) + (-((P i a).ξ j).2,((P i a).ξ j).1)‖ ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) ((P i a).ξ j)) ∧ + (∀ G, A.ReadJetBall z F G → + AtlasPairMargins (fun i : A.centers => (i : M)) A.weight s (z^6) κ ξ w G) := by + classical + obtain ⟨T,L,hT,hT0,hTd,hL,hTrange,_,hLip⟩ := A.metric_plane_read_bounds g + obtain ⟨stock,ε,C,δ,z₁,W₁,κ₁,hε,hC,hδ,hz₁,hz₁1,_hW₁,_hκ₁,hselect⟩ := + anchored_polynomial_grid_phases hT hT0 hTd R c B b L hc hB hb (zero_le_one.trans hL) + obtain ⟨weightStock,W,κ,hW,hκ,hweight⟩ := + atlas_phase_weight_constants_with_catalog (fun i : A.centers => (i : M)) A.weight + (fun i => by simpa only [chart_source] using A.weight_support i) + (fun i => (isClosed_tsupport _).isCompact) (C := C) + (by positivity : 0 < ε/4) (M → Space) + choose zi Ki hzi hzi1 hKi hgrid using fun i : A.centers => + compact_anchored_polynomial_grid (modeSupport (A.chartWeightCompact i)).isCompact + obtain ⟨z₂,hz₂,hz₂1,hz₂i⟩ := finite_positive_threshold zi hzi + let K : ℝ := 1+∑ i, Ki i + have hK : 0 < K := by + have hh := Finset.sum_nonneg (s := Finset.univ) (fun i _ => (hKi i).le) + change 0 < 1+∑ i : A.centers, Ki i + linarith + refine ⟨stock,weightStock,min z₁ z₂,K,C,ε,W,κ,lt_min hz₁ hz₂, + (min_le_left _ _).trans hz₁1,hK,hC,hε,hW,hκ,?_⟩ + intro z hz hzsmall F hF hFb hFm + choose s hcard hcover hanchors using fun i : A.centers => + hgrid i z hz ((hzsmall.trans (min_le_right _ _)).trans (hz₂i i)) + have hchoose (i : A.centers) := hselect z hz (hzsmall.trans (min_le_left _ _)) + (spaceCoordinates ∘ A.vectorPlaneRead i F) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) (hFb i) + (A.tensorPlaneRead i g.inner) (hLip i) (s i) (by + intro a ha + obtain ⟨x,hx,hd⟩ := hanchors i a ha + exact ⟨x,hd,(hFm i x hx).1,(hFm i x hx).2.1,(hFm i x hx).2.2,hTrange i x hx⟩) + choose P wlocal hPstock hPB hwlocal hpoint hlocalPair using hchoose + let ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base := fun a => + if ha : a.2.1 ∈ s a.1 then (P a.1 ⟨a.2.1,ha⟩).ξ a.2.2 else SmallModes.dx + have hξ (a : AtlasCellPhase (ι := A.centers)) : ‖ξ a‖ ≤ C := by + dsimp [ξ] + split_ifs with ha + · exact (hPB a.1 ⟨a.2.1,ha⟩ a.2.2).1 + · simpa [SmallModes.dx,Prod.norm_def] using hC + have hpt (G : M → Space) (hG : A.ReadJetBall z F G) (i : A.centers) (a : s i) + (x : SmallModes.Base) (hx : x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (ha : x ∈ tsupport (cutoff (z^6) a.val)) := + hpoint i a x (spaceCoordinates ∘ A.vectorPlaneRead i G) (A.tensorPlaneRead i g.inner x) + ha (hG.2 i x hx).1 (hG.2 i x hx).2 (by simpa using hδ.le) + let family : (M → Space) → M → Space := fun G => if A.ReadJetBall z F G then G else F + have hfamily (G : M → Space) : A.ReadJetBall z F (family G) := by + dsimp [family] + split_ifs with h + · exact h + · exact A.readJetBall_self z hF + have hmarg (G : M → Space) (a : AtlasCellPhase (ι := A.centers)) (p : M) + (ha : atlasActive (fun i : A.centers => (i : M)) A.weight s (z^6) a p) : + atlasGram (family G) (a.1 : M) p ≠ 0 ∧ atlasSecondTensor (family G) (a.1 : M) p ≠ 0 ∧ + (ε/4)*‖atlasSecondTensor (family G) (a.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor (family G) (a.1 : M) p) (-(ξ a).2,(ξ a).1)‖ := by + have hp := refinedCutoff_tsupport_outer (a.1 : M) (A.weight a.1) (s a.1) (z^6) a.2.1 ha.2 + have hx : coordinateChart (a.1 : M) p ∈ + (modeSupport (A.chartWeightCompact a.1) : Set SmallModes.Base) := + ⟨chart (a.1 : M) p,⟨p,hp,rfl⟩,rfl⟩ + have hcutt := normalizedCutoff_tsupport (s a.1) (z^6) a.2.1 + (refinedCutoff_tsupport_inner (a.1 : M) + (by simpa only [chart_source] using A.weight_support a.1) (s a.1) (z^6) a.2.1 ha.2) + have hh := hpt (family G) (hfamily G) a.1 ⟨a.2.1,ha.1⟩ _ hx hcutt + rw [A.read_gram_eq_atlas (family G) a.1 (houter a.1) hp, + A.read_second_eq_atlas (family G) a.1 (houter a.1) hp] at hh + refine ⟨ne_of_gt ((by positivity : 0 < c/4).trans_le hh.1), + norm_pos_iff.mp ((half_pos hb).trans_le hh.2.1),?_⟩ + simpa only [ξ,dite_eq_left ha.1] using (hh.2.2 a.2.2).2.1 + obtain ⟨w,hwStock,hw,hpairs⟩ := hweight (z^6) (pow_pos hz _) s ξ hξ family + (fun G => (hfamily G).1) hmarg + refine ⟨s,P,ξ,w,hPstock,hwStock,?_,hcover,?_,hw,hpt,?_⟩ + · calc + (∑ i, ((s i).card : ℝ)) ≤ ∑ i, Ki i/z^12 := Finset.sum_le_sum (fun i _ => hcard i) + _ = (∑ i, Ki i)/z^12 := (Finset.sum_div _ _ _).symm + _ ≤ K/z^12 := div_le_div_of_nonneg_right (by + change (∑ i : A.centers, Ki i) ≤ 1+∑ i : A.centers, Ki i + linarith) (pow_pos hz _).le + · intro i a j + exact ⟨by simp only [ξ,dite_eq_left a.property],hPB i a j⟩ + · intro G hG a d j p had ha hd hp + have he : family G = G := ite_eq_left hG + simpa only [he] using hpairs G a d j p had ha hd hp + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..0842ee287137aaa3a5cab94e5809a0db526ff4c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridCover.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.Immersion.ClosedSurface.CompactPartition + +namespace OAI + +/-! Finite polynomial grids with every selected cell anchored on the compact set. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PhaseGrid + + theorem compact_anchored_polynomial_grid {K : Set Base} (hK : IsCompact K) : + ∃ z₀ C : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < C ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∃ s : Finset Index, + (s.card : ℝ) ≤ C/z^12 ∧ K ⊆ coverRegion s (z^6) ∧ + (∀ a ∈ s, ∃ x ∈ K, ‖x-z^6 • center a‖ ≤ 3*z^6) := by + classical + obtain ⟨z₀,C,hz₀,hz₀1,hC,hgrid⟩ := + compact_subpatch_polynomial_grid hK isOpen_univ (subset_univ _) + refine ⟨z₀,C,hz₀,hz₀1,hC,?_⟩ + intro z hz hzsmall + obtain ⟨s,hcard,hcover,_⟩ := hgrid z hz hzsmall + let t := s.filter (fun a => ∃ x ∈ K, x ∈ cell (z^6) 1 a) + refine ⟨t,?_,?_,?_⟩ + · exact (show (t.card : ℝ) ≤ (s.card : ℝ) by + exact_mod_cast Finset.card_le_card (Finset.filter_subset _ _)).trans hcard + · intro x hx + obtain ⟨a,ha,hxa⟩ := hcover x hx + exact mem_iUnion.mpr ⟨a,mem_iUnion.mpr ⟨Finset.mem_filter.mpr ⟨ha,x,hx,hxa⟩,hxa⟩⟩ + · intro a ha + obtain ⟨_,x,hx,hxa⟩ := Finset.mem_filter.mp ha + refine ⟨x,hx,?_⟩ + have hd := norm_sub_center_lt hxa + have hp := pow_pos hz 6 + nlinarith + +end ClosedSurfaceR4.PhaseGrid + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..f01a288f3616391144e18d2fe8b69012fae7f8f8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AnchoredGridPhases.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AnchoredCellGeometry +import OAI.Geometry.Immersion.ClosedSurface.GridPhases + +namespace OAI + +/-! Grid phases selected at support anchors, with a fixed finite phase catalog. -/ +noncomputable section +open Set Complex Bundle Manifold +open scoped ContDiff Matrix Topology Manifold BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes WeightedEstimates Set + +theorem anchored_polynomial_grid_phases {T : Set PhaseMean.Tensor} + (hT : IsCompact T) (hT0 : ∀ H ∈ T, 0 < H 0) + (hTd : ∀ H ∈ T, 0 < H 0*H 2-(H 1)^2) + (R c A b K : ℝ) (hc : 0 < c) (hA : 0 ≤ A) (hb : 0 < b) (hK : 0 ≤ K) : + ∃ stock : Finset PhaseBasis, ∃ ε C δ z₀ W κ : ℝ, + 0 < ε ∧ 1 ≤ C ∧ 0 < δ ∧ 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < W ∧ 0 < κ ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → + ∀ F : RField 4, ContDiff ℝ ∞ F → WeightedBound univ z 3 A F → + ∀ H : Base → PhaseMean.Tensor, + (∀ x y, ‖H y-H x‖ ≤ K*‖y-x‖) → + ∀ s : Finset PhaseGrid.Index, + (∀ a ∈ s, ∃ x : Base, ‖x-z^6 • PhaseGrid.center a‖ ≤ 3*z^6 ∧ + ‖firstJetPair F x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet (firstJetPair F x).1 (firstJetPair F x).2 ∧ + b ≤ ‖realSecondTensor F x‖ ∧ H x ∈ T) → + ∃ (P : {a // a ∈ s} → PhaseBasis) (w : {a // a ∈ s} × Fin 3 → ℝ), + (∀ a, P a ∈ stock) ∧ + (∀ a i, ‖(P a).ξ i‖ ≤ C ∧ ‖(P a).Q i‖ ≤ C) ∧ + (∀ a, 1 ≤ w a ∧ w a ≤ W) ∧ + (∀ a y G H', y ∈ tsupport (PhaseGrid.cutoff (z^6) a.val) → + ‖firstJetPair F y-firstJetPair G y‖ ≤ z^4 → + ‖secondJetTriple F y-secondJetTriple G y‖ ≤ z^4 → ‖H'-H y‖ ≤ δ → + c/4 ≤ NormalFrame.gramDet (firstJetPair G y).1 (firstJetPair G y).2 ∧ + b/2 ≤ ‖realSecondTensor G y‖ ∧ ∀ i, ε/2 ≤ (P a).Q i H' ∧ + (ε/4)*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) (-((P a).ξ i).2,((P a).ξ i).1)‖ ∧ + Good (realSecondTensor G y) ((P a).ξ i)) ∧ + (∀ a d y G, a ≠ d → y ∈ tsupport (PhaseGrid.cutoff (z^6) a.1.val) → + y ∈ tsupport (PhaseGrid.cutoff (z^6) d.1.val) → + ‖firstJetPair F y-firstJetPair G y‖ ≤ z^4 → + ‖secondJetTriple F y-secondJetTriple G y‖ ≤ z^4 → + κ*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2+w d • (P d.1).ξ d.2).2,(w a • (P a.1).ξ a.2+w d • (P d.1).ξ d.2).1)‖ ∧ + κ*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2-w d • (P d.1).ξ d.2).2,(w a • (P a.1).ξ a.2-w d • (P d.1).ξ d.2).1)‖ ∧ + Good (realSecondTensor G y) (w a • (P a.1).ξ a.2+w d • (P d.1).ξ d.2) ∧ + Good (realSecondTensor G y) (w a • (P a.1).ξ a.2-w d • (P d.1).ξ d.2)) := by + classical + obtain ⟨stock,ε,C,δ,z₀,hε,hC,hδ,hz₀,hz₀1,hstock,hcell⟩ := + anchored_polynomial_cell_phases hT hT0 hTd R c A b K hc hA hb hK + obtain ⟨d,k,hd,hk,hm⟩ := universal_relative_length_margin (n := 4) (C := C) (by positivity : 0 < ε/4) + + + let aa : ℝ := 1+1/d + let WW : ℝ := aa^(Fintype.card PhaseGrid.Label) + have haa : 1 ≤ aa := by dsimp [aa]; linarith [one_div_pos.mpr hd] + have haa0 : 0 < aa := zero_lt_one.trans_le haa + have had : 1 < d*aa := by dsimp [aa]; rw [mul_add,mul_one,mul_one_div_cancel hd.ne']; linarith + refine ⟨stock,ε,C,δ,z₀,WW,k,hε,hC,hδ,hz₀,hz₀1,pow_pos haa0 _,hk,?_⟩ + intro z hz hzsmall F hF hFbound H hHLip s hanchors + let I := {a // a ∈ s} + choose anchor hdist hjet hgram hnormal htarget using + fun a : I => hanchors a.val a.property + have hselection (a : I) := hcell z hz hzsmall F hF hFbound H (anchor a) + (hjet a) (hgram a) (hnormal a) (htarget a) (hHLip (anchor a)) + choose P hPs hP using hselection + let w (a : I × Fin 3) : ℝ := aa^(PhaseGrid.phaseLabel (a.1.val,a.2)).val + have hw (a : I × Fin 3) : 1 ≤ w a ∧ w a ≤ WW := + ⟨one_le_pow₀ haa,pow_le_pow_right₀ haa (PhaseGrid.phaseLabel (a.1.val,a.2)).isLt.le⟩ + have hpoint (a : I) (y : Base) (G : RField 4) (H' : PhaseMean.Tensor) + (hy : y ∈ tsupport (PhaseGrid.cutoff (z^6) a.val)) + (h1 : ‖firstJetPair F y-firstJetPair G y‖ ≤ z^4) + (h2 : ‖secondJetTriple F y-secondJetTriple G y‖ ≤ z^4) (hh : ‖H'-H y‖ ≤ δ) := + hP a y G H' (by + have hy := cutoff_distance_to_center (pow_pos hz 6) a.val hy + calc + ‖y-anchor a‖ ≤ ‖y-z^6 • PhaseGrid.center a.val‖+ + ‖z^6 • PhaseGrid.center a.val-anchor a‖ := by + simpa only [dist_eq_norm] using dist_triangle y (z^6 • PhaseGrid.center a.val) (anchor a) + _ = ‖y-z^6 • PhaseGrid.center a.val‖+ + ‖anchor a-z^6 • PhaseGrid.center a.val‖ := by rw [norm_sub_rev (z^6 • PhaseGrid.center a.val)] + _ ≤ 6*z^6 := by linarith [hdist a]) h1 h2 hh + refine ⟨P,w,hPs,fun a i => hstock (P a) (hPs a) i,hw,?_,?_⟩ + · intro a y G H' hy h1 h2 hh + obtain ⟨hg,hB,hi⟩ := hpoint a y G H' hy h1 h2 hh + exact ⟨hg,hB,fun i => ⟨(hi i).1,(hi i).2.1,(hi i).2.2.2⟩⟩ + · intro a e y G hae hay hey h1 h2 + have haB := hpoint a.1 y G (H y) hay h1 h2 (by simpa using hδ.le) + have heB := hpoint e.1 y G (H y) hey h1 h2 (by simpa using hδ.le) + have hBn : realSecondTensor G y ≠ 0 := norm_ne_zero_iff.mp (ne_of_gt ((half_pos hb).trans_le haB.2.1)) + have ordered (a e : I × Fin 3) + (ha : y ∈ tsupport (PhaseGrid.cutoff (z^6) a.1.val)) + (he : y ∈ tsupport (PhaseGrid.cutoff (z^6) e.1.val)) + (hlt : (PhaseGrid.phaseLabel (a.1.val,a.2)).val < (PhaseGrid.phaseLabel (e.1.val,e.2)).val) : + k*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2+w e • (P e.1).ξ e.2).2,(w a • (P a.1).ξ a.2+w e • (P e.1).ξ e.2).1)‖ ∧ + k*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2-w e • (P e.1).ξ e.2).2,(w a • (P a.1).ξ a.2-w e • (P e.1).ξ e.2).1)‖ := by + have hmargin := ((hpoint e.1 y G (H y) he h1 h2 (by simpa using hδ.le)).2.2 e.2).2.1 + exact power_weight_length_pairs _ _ _ haa had + (fun t ht => hm _ _ _ hBn (hstock (P e.1) (hPs e.1) e.2).1 + (hstock (P a.1) (hPs a.1) a.2).1 hmargin t ht.le) hlt + have hne : (a.1.val,a.2) ≠ (e.1.val,e.2) := by + intro heq + have hfirst : a.1.val = e.1.val := congrArg (fun p : PhaseGrid.Index × Fin 3 => p.1) heq + have hsecond : a.2 = e.2 := congrArg (fun p : PhaseGrid.Index × Fin 3 => p.2) heq + exact hae (Prod.ext (Subtype.ext hfirst) hsecond) + have hlab := PhaseGrid.distinct_labels_on_intersection (pow_pos hz _) hne hay hey + have hnv : (PhaseGrid.phaseLabel (a.1.val,a.2)).val ≠ (PhaseGrid.phaseLabel (e.1.val,e.2)).val := + fun heq => hlab (Fin.ext heq) + have hlen : + k*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2+w e • (P e.1).ξ e.2).2,(w a • (P a.1).ξ a.2+w e • (P e.1).ξ e.2).1)‖ ∧ + k*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) + (-(w a • (P a.1).ξ a.2-w e • (P e.1).ξ e.2).2,(w a • (P a.1).ξ a.2-w e • (P e.1).ξ e.2).1)‖ := by + rcases lt_or_gt_of_ne hnv with hlt | hgt + · exact ordered a e hay hey hlt + · obtain ⟨hp,hm⟩ := ordered e a hey hay hgt + refine ⟨by simpa only [add_comm] using hp,?_⟩ + have heq : w e • (P e.1).ξ e.2-w a • (P a.1).ξ a.2 = -(w a • (P a.1).ξ a.2-w e • (P e.1).ξ e.2) := by abel + simpa only [heq,norm_secondQuadratic_rotated_neg] using hm + have hpos : 0 < k*‖realSecondTensor G y‖ := mul_pos hk (norm_pos_iff.mpr hBn) + exact ⟨hlen.1,hlen.2,good_of_direction_length_pos _ _ (hpos.trans_le hlen.1), + good_of_direction_length_pos _ _ (hpos.trans_le hlen.2)⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c1d651724fc436941def56c257570e40e98858b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeReadBounds.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformSeed +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! Uniform slow-scale bounds on every chart reading of the actual complex amplitudes. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance ampReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance ampReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance ampReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance ampReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance ampReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance ampReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_amplitude_reads + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (q m : ℕ) (C : ℝ) (hC : 0 ≤ C) : + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + ∃ B : ℝ, 1 ≤ B ∧ ∀ {τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + A.TensorWeightedBound s N C u → + ∀ k i j, WeightedEstimates.WeightedBound univ s m (B*(δ*τ)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u i j)) := by + classical + dsimp only + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i + (PolynomialSolveData.inputOrder (P := P i) q m) + let C' := fun i => max 1 (D i*C) + choose B hB hb using fun (i : A.centers) (j : Fin 3) => + uniform_charted_seed_bound (R := R) (p i j) hρ q m (C' i) + choose E hE he using fun k i : A.centers => + A.localize_outer_restore_bound (V := Fin 4 → ℂ) k i m + let Q := fun a : A.centers × A.centers × Fin 3 => E a.1 a.2.1 * B a.2.1 a.2.2 + have hQ (a) : 0 ≤ Q a := mul_nonneg (hE a.1 a.2.1) (zero_le_one.trans (hB a.2.1 a.2.2)) + have htotal : 0 ≤ ∑ a, Q a := Finset.sum_nonneg (fun a _ => hQ a) + refine ⟨1+∑ a, Q a,by linarith,?_⟩ + intro τ s d hd hτ hs hτs hs1 δ hδ u hu hball hbu k i j + have horder : PolynomialSolveData.inputOrder (P := P i) q m ≤ N := Finset.le_sup + (f := fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) (Finset.mem_univ i) + have hlocal := (hread i u s C hs hs1 hC hu (fun k => (hbu k).mono_order horder)).mono_const + (le_max_right 1 (D i*C)) + have hseed := hb i j ((d i).data j) (hd i j) hτ hs hτs hs1 (le_refl 0) + (by simpa only [zero_div,add_zero] using (div_le_one₀ hs).mpr hτs) δ hδ + (A.tensorPlaneRead i u) (zero_le_one.trans (le_max_left _ _)) + (A.tensorPlaneRead_smooth i hu) (hball i) hlocal + have hout := he k i ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)) s + (B i j*(δ*τ)) hs hs1 (mul_nonneg (zero_le_one.trans (hB i j)) (mul_nonneg hδ hτ.le)) + (((d i).data j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff hseed + have hplane := weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth k (A.freeGlobalAmplitude_smooth d hρ δ q u i j)) hout + change WeightedEstimates.WeightedBound univ s m (E k i*(B i j*(δ*τ))) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u i j)) at hplane + apply hplane.mono_const + have ht : E k i*B i j ≤ ∑ a, Q a := + Finset.single_le_sum (fun a _ => hQ a) (Finset.mem_univ (k,i,j)) + calc + E k i*(B i j*(δ*τ)) = (E k i*B i j)*(δ*τ) := by ring + _ ≤ (1+∑ a, Q a)*(δ*τ) := + mul_le_mul_of_nonneg_right (by linarith) (mul_nonneg hδ hτ.le) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c9a914077e5baae580c08094a8604880427f011 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasAmplitudeSupport.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasDifferential + +namespace OAI + +/-! Actual global free amplitudes retain the original geometric supports. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma freeGlobalAmplitude_tsupport + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (i : A.centers) (j : Fin 3) : + tsupport (A.freeGlobalAmplitude d hρ δ q u i j) ⊆ tsupport (A.weight i) := by + have hs := (coordinateAmplitude_support + ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u))).trans (hK i j) + have hh := A.restore_plane_tsupport i + (coordinateAmplitude ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u))) hs + simpa only [freeGlobalAmplitude,coordinateAmplitude,Function.comp_def, + LinearIsometryEquiv.symm_apply_apply] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasBackgroundLowerBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasBackgroundLowerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf9429e2221d78d9b1a71943e93ae06326bd0e66 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasBackgroundLowerBound.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricLowerBound +import OAI.Geometry.SurfaceImmersion.Atlas.MetricReadBounds +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPullbackNorm +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas + +namespace OAI + +/-! The fixed coordinate lower bound dominates any fixed smooth background +metric. Both constants are chosen before the finite preparation set. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +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 coordinateChart_differential (i : A.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) : + mfderiv planeModel 𝓘(ℝ,SmallModes.Base) (coordinateChart (i : M)) p = + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + (surfaceDifferential (chart (i : M)) p) := by + have he : (coordinateChart (i : M) : M → SmallModes.Base) = + planeCoordinateIsometry ∘ (chart (i : M)) := rfl + have hleft : MDifferentiable 𝓘(ℝ,Base) 𝓘(ℝ,SmallModes.Base) planeCoordinateIsometry := + (planeCoordinateIsometry.contDiff (n := (∞ : ℕ∞ω))).contMDiff.mdifferentiable (by simp) + have hh := mfderiv_comp p hleft.mdifferentiableAt + ((chart_mdifferentiable (i : M)).mdifferentiableAt hp) + rw [mfderiv_eq_fderiv] at hh + have hd : fderiv ℝ planeCoordinateIsometry (chart (i : M) p) = + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap := + planeCoordinateIsometry.toContinuousLinearEquiv.hasFDerivAt.fderiv + rw [hd] at hh + rw [he] + exact hh + +theorem uniform_background_metric_lower_bound (g : SmoothMetric M) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + ∃ δ c : ℝ, 0 < δ ∧ 0 < c ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → A.WeightedBound 1 1 δ (G-F) → + ∀ (p : M) (v : TangentSpace planeModel p), + c*g.inner p v v ≤ inducedForm G p v v := by + obtain ⟨δ,a,hδ,ha,hlower⟩ := A.uniform_coordinate_metric_lower_bound hF hImm + obtain ⟨T,B,_,_,_,hB,_,hbound,_⟩ := A.metric_plane_read_bounds g + refine ⟨δ,a^2/(4*B+1),hδ,div_pos (sq_pos_of_pos ha) (by positivity),?_⟩ + intro G hG hclose 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 hmetric : g.inner p v v ≤ (4*B)*‖u‖^2 := by + have hcoord : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i hp + rw [← coordinateMetric_pullback_chart g (i : M) hcoord v v, + ← A.tensorPlaneRead_metric_on_weight g i hp,A.coordinateChart_differential i (A.weight_support i hp)] + change PhaseMean.evaluate _ (planeCoordinateIsometry u) (planeCoordinateIsometry u) ≤ _ + calc + _ ≤ ‖PhaseMean.evaluate _ (planeCoordinateIsometry u) (planeCoordinateIsometry u)‖ := le_abs_self _ + _ ≤ 4*‖A.tensorPlaneRead i g.inner (planeCoordinateIsometry (chart (i : M) p))‖* + ‖planeCoordinateIsometry u‖*‖planeCoordinateIsometry u‖ := PhaseMean.norm_evaluate_le _ _ _ + _ ≤ (4*B)*‖u‖^2 := by + rw [planeCoordinateIsometry.norm_map] + nlinarith [mul_nonneg (sub_nonneg.mpr (hbound i (planeCoordinateIsometry (chart (i : M) p)))) + (sq_nonneg ‖u‖)] + have hL := hlower G hG hclose i (chart (i : M) p) (mem_image_of_mem _ hi) u + have he : fderiv ℝ (A.vectorChartRead i G) (chart (i : M) p) u = + surfaceDifferential G p v := by + rw [A.vectorChartRead_differential i hG hp] + rfl + rw [he] at hL + have hsq : a^2*‖u‖^2 ≤ ‖surfaceDifferential G p v‖^2 := by + nlinarith [mul_nonneg ha.le (norm_nonneg u),norm_nonneg (surfaceDifferential G p v)] + have hc : 0 ≤ a^2/(4*B+1) := by positivity + have hcomp : a^2/(4*B+1)*g.inner p v v ≤ a^2*‖u‖^2 := by + calc + _ ≤ a^2/(4*B+1)*((4*B)*‖u‖^2) := mul_le_mul_of_nonneg_left hmetric hc + _ = (a^2*((4*B)*‖u‖^2))/(4*B+1) := by ring + _ ≤ a^2*‖u‖^2 := by + apply (div_le_iff₀ (by positivity : 0 < 4*B+1)).2 + nlinarith [mul_nonneg (sq_nonneg a) (sq_nonneg ‖u‖)] + exact hcomp.trans (by simpa only [inducedForm,real_inner_self_eq_norm_sq] using hsq) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCatalogCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCatalogCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c2485ab42d88f0f05a85ee5ce3c6e36c49b9a8f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCatalogCancellation.lean @@ -0,0 +1,153 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCorrectionAssembly +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCatalogCancellation + +namespace OAI + +/-! Assemble actual local supported corrections. Atlas constants are chosen before the phase family and its cardinality. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance catalogAtlasCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance catalogAtlasCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance catalogAtlasCancellationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance catalogAtlasCancellationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance catalogAtlasCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance catalogAtlasCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem finite_catalog_atlas_cancellation + (Γ : A.centers → Finset (SmallModes.Base → ℝ)) + (hΓ : ∀ i φ, φ ∈ Γ i → ContDiff ℝ ∞ φ) + {ε b D : ℝ} (hε : 0 < ε) (hb : 0 < b) (hD : 1 ≤ D) (hDB : (ε*b)⁻¹ ≤ D) + (B : ℕ → ℝ → ℝ) (hB : ∀ m, RealModes.HasPolynomialBound (B m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q : ℕ) : + ∃ (d : ℕ → ℕ) (E : ℕ → ℝ), (∀ m, 1 ≤ E m) ∧ + ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)], + ∀ x : ℝ, 1 ≤ x → + ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → SmallModes.Base → ℝ), + (∀ i j, φ i j ∈ Γ i) → + ∀ K : (i : A.centers) → ι i → TopologicalSpace.Compacts SmallModes.Base, + (∀ i j, (K i j : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + (∀ i j y, y ∈ (K i j : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) y)) → + (∀ i j y, y ∈ (K i j : Set SmallModes.Base) → + b ≤ ‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y‖) → + (∀ i j y, y ∈ (K i j : Set SmallModes.Base) → + ε*‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y‖ ≤ + ‖PhaseGeometry.secondQuadratic + (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + (-(phaseDerivative (φ i j) y).2,(phaseDerivative (φ i j) y).1)‖) → + (∀ i j y, y ∈ (K i j : Set SmallModes.Base) → + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead i F) y))⁻¹‖ ≤ D) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i m j, j ≤ m+3 → WeightedEstimates.WeightedBound univ 1 j + (B m x/(s : ℝ)^(j-2)) (spaceCoordinates ∘ A.vectorPlaneRead i F)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (K i j), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (E m*x^(d m)*(∑ i : A.centers, ∑ j, supportedWeightedSeminorm (K i j) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1)*(E m*x^(d m))*(∑ i : A.centers, ∑ j, + supportedWeightedSeminorm (K i j) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j))) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i y => ∑ j, + QuadraticMean.displacement τ (φ i j) (target i j) y))) := by + classical + choose e C hC solve using fun i : A.centers => + PhaseGeometry.finite_catalog_polynomial_cancellation (Γ i) (hΓ i) + (modeSupport (A.chartWeightCompact i)) hε hb hD hDB B hB hB1 q + obtain ⟨Dv,Dt,hDv,hDt,assemble⟩ := A.uniform_local_correction_assembly + let S := fun m x => ∑ i : A.centers, C i m*x^(e i m) + have hS (m : ℕ) : RealModes.HasPolynomialBound (S m) := + RealModes.HasPolynomialBound.sum Finset.univ + (fun i : A.centers => fun x => C i m*x^(e i m)) (fun i _ => + (RealModes.polynomialBound_const (zero_le_one.trans (hC i m))).mul + (RealModes.polynomialBound_id.pow (e i m))) + let H := fun m x => (Dv m+Dt m+1)*S m x + have hH (m : ℕ) : RealModes.HasPolynomialBound (H m) := + (RealModes.polynomialBound_const (by linarith [hDv m,hDt m])).mul (hS m) + choose d E hE hpoly using hH + have hSn (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 0 ≤ S m x := + Finset.sum_nonneg (fun i _ => mul_nonneg (zero_le_one.trans (hC i m)) + (pow_nonneg (zero_le_one.trans hx) _)) + have hlocal (i : A.centers) (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : C i m*x^(e i m) ≤ S m x := + Finset.single_le_sum (fun j _ => mul_nonneg (zero_le_one.trans (hC j m)) + (pow_nonneg (zero_le_one.trans hx) (e j m))) (Finset.mem_univ i) + have hrestore (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : + Dv m*S m x ≤ E m*x^(d m) ∧ Dt m*S m x ≤ E m*x^(d m) := by + constructor + · exact (mul_le_mul_of_nonneg_right (by linarith [hDt m] : Dv m ≤ Dv m+Dt m+1) + (hSn m x hx)).trans (hpoly m x hx).2 + · exact (mul_le_mul_of_nonneg_right (by linarith [hDv m] : Dt m ≤ Dv m+Dt m+1) + (hSn m x hx)).trans (hpoly m x hx).2 + refine ⟨d,E,hE,?_⟩ + intro ι inst x hx F hF φ hφ K hK hImm hnormal hrel hgram τ s hτ hs hτs hs1 hFj target + have hsolve (i : A.centers) (j : ι i) := solve i x hx (φ i j) (hφ i j) + (A.jetChartMap_smooth i hF) (K i j) (hK i j) + (by simpa only [A.jetChartMap_plane] using hImm i j) + (by simpa only [A.jetChartMap_plane] using hnormal i j) + (by simpa only [A.jetChartMap_plane] using hrel i j) + (by simpa only [A.jetChartMap_plane] using hgram i j) + τ s hτ hs hτs hs1 (by simpa only [A.jetChartMap_plane] using hFj i) (target i j) + choose X hX hsp hv hr using hsolve + let N := fun i (j : ι i) m => supportedWeightedSeminorm (K i j) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) + let Cv := fun i (j : ι i) m => S m x*N i j m + let Ct := fun i (j : ι i) m => (τ/s)^(q+1)*S m x*N i j m + have hη : 0 ≤ (τ/(s : ℝ))^(q+1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hnv (i : A.centers) (j : ι i) (m : ℕ) : 0 ≤ Cv i j m := + mul_nonneg (hSn m x hx) (apply_nonneg _ _) + have hnt (i : A.centers) (j : ι i) (m : ℕ) : 0 ≤ Ct i j m := + mul_nonneg (mul_nonneg hη (hSn m x hx)) (apply_nonneg _ _) + obtain ⟨W,hW,hvW,hrW⟩ := assemble F hF φ (fun i j => hΓ i _ (hφ i j)) K hK + τ hτ (hτs.trans hs1) X hX hsp target Cv Ct hnv hnt + (fun i j m => (hv i j m).mono_const + (mul_le_mul_of_nonneg_right (hlocal i m x hx) (apply_nonneg _ _))) + (fun i j m => (by + have hh := hr i j m + simp only [A.jetChartMap_plane] at hh + exact hh.mono_const (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (hlocal i m x hx) hη) (apply_nonneg _ _)))) + refine ⟨W,hW,?_,?_⟩ + · intro m k + apply (hvW m k).mono_const + have he : (∑ i : A.centers, ∑ j, Cv i j m) = S m x*(∑ i : A.centers, ∑ j, N i j m) := by + simp only [Cv,Finset.mul_sum] + rw [he,← mul_assoc] + exact mul_le_mul_of_nonneg_right (hrestore m x hx).1 + (Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => apply_nonneg _ _))) + · intro m k + apply (hrW m k).mono_const + have he : (∑ i : A.centers, ∑ j, Ct i j m) = + ((τ/s)^(q+1)*S m x)*(∑ i : A.centers, ∑ j, N i j m) := by + simp only [Ct,Finset.mul_sum] + rw [he] + have hh := mul_le_mul_of_nonneg_left (hrestore m x hx).2 hη + have hnorm : 0 ≤ ∑ i : A.centers, ∑ j : ι i, N i j m := + Finset.sum_nonneg (fun (i : A.centers) _ => + Finset.sum_nonneg (fun (j : ι i) _ => (show 0 ≤ N i j m from apply_nonneg _ _))) + convert mul_le_mul_of_nonneg_right hh hnorm using 1; ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCombinedCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCombinedCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..74bcf2a6f0bbca4d570ee336be4e3ee57ed5a87d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCombinedCancellation.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCombinedModes + +namespace OAI + +/-! Cancel every nonzero quadratic phase of the actual global polynomial +metric using its derived local linearized solvers. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance combinedCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance combinedCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance combinedCancellationDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance combinedCancellationDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance combinedCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance combinedCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem global_polynomial_quadratic_cancellation + {n : A.centers → ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) : + ∃ (Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression) + (Dv Dt : ℕ → ℝ) (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ), + A.PolynomialQuadraticRepresentation P Q ∧ + A.PolynomialLinearRepresentation P Q ∧ + (∀ 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 : ℝ≥0) + (c : ∀ k l, PolynomialSolveData (Q k) ε (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.chartWeightCompact k) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ 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.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ k : A.centers, ∑ l, + (c k l).residual (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + (inducedTensor (spaceCoordinates.symm ∘ ∑ a, surfaceMode τ (φ a) (Z a))+ + A.atlasPolynomialQuadratic P ε F + (spaceCoordinates.symm ∘ ∑ a, surfaceMode τ (φ a) (Z a)))- + A.globalPolynomialQuadraticMean Q F ε τ φ Z)) := by + classical + obtain ⟨Q,Dv,Dt,hQ,hrep,hlin,hDv,hDt,hcancel⟩ := + A.atlas_polynomial_finite_cancellation (ι := fun _ => RealModes.QuadraticLabel ι) P hP + refine ⟨Q,Dv,Dt,hQ,hrep,hlin,hDv,hDt,?_⟩ + intro F hF φ Z hφ hZ ε τ s c hτ hs hτs hs1 hε hsmall q + obtain ⟨W,hW,hsize,hres⟩ := hcancel F hF (A.globalQuadraticPhase φ) + (fun i _ => A.chartWeightCompact i) ε τ s c hτ hs hτs hs1 hε hsmall + (fun _ _ => Subset.rfl) (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ) q + refine ⟨W,hW,hsize,?_⟩ + have he := A.global_modes_full_quadratic P Q hQ hrep F hF ε τ φ Z hφ hZ + dsimp only at he + intro m + rw [he] + have ha : linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + (A.globalPolynomialQuadraticMean Q F ε τ φ Z+ + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x))- + A.globalPolynomialQuadraticMean Q F ε τ φ Z = + linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x) := by abel + rw [ha] + exact hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCompactPhaseWeights.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCompactPhaseWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..6604cc194815e99f33618d7fa0fe955acaf927ee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasCompactPhaseWeights.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseWeights +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseNeighborhood +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! One frequency per global phase, chosen simultaneously on every chart overlap. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial.Perturbation (modeSupport) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Compactness selects frequencies before any target tensor or correction scale. +The same frequency works in every chart that meets the phase support. -/ +theorem exists_overlap_phase_weights {ι : Type*} [Finite ι] + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ι → M → ℝ) (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (S : ι → Set M) (hS : ∀ a, IsClosed (S a)) + (hImm : ∀ k p, p ∈ tsupport (A.weight k) → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p))) + (hgood : ∀ k a p, p ∈ tsupport (A.weight k) → p ∈ S a → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)) + (phaseDerivative (A.vectorPlaneRead k (φ a)) (coordinateChart (k : M) p))) : + ∃ w : ι → ℝ, (∀ a, 0 < w a) ∧ + ∀ k a b, a ≠ b → ∀ p, p ∈ tsupport (A.weight k) → p ∈ S a → p ∈ S b → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)) + (w a • phaseDerivative (A.vectorPlaneRead k (φ a)) (coordinateChart (k : M) p) + + w b • phaseDerivative (A.vectorPlaneRead k (φ b)) (coordinateChart (k : M) p)) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)) + (w a • phaseDerivative (A.vectorPlaneRead k (φ a)) (coordinateChart (k : M) p) - + w b • phaseDerivative (A.vectorPlaneRead k (φ b)) (coordinateChart (k : M) p)) := by + classical + let X := Σ k : A.centers, ↥(tsupport (A.weight k)) + let : ∀ k : A.centers, CompactSpace ↥(tsupport (A.weight k)) := + fun k => isCompact_iff_compactSpace.mp (isClosed_tsupport (A.weight k)).isCompact + let point : X → M := fun x => x.2.1 + have hpoint : Continuous point := continuous_sigma fun _ => continuous_subtype_val + let B : X → Fin 3 → RVec 4 := fun x => + realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead x.1 F) + (coordinateChart (x.1 : M) x.2.1) + let ξ : ι → X → Base := fun a x => + phaseDerivative (A.vectorPlaneRead x.1 (φ a)) (coordinateChart (x.1 : M) x.2.1) + have hc (k : A.centers) : Continuous + (fun p : ↥(tsupport (A.weight k)) => coordinateChart (k : M) p.1) := + (coordinateChart (k : M)).continuousOn.comp_continuous continuous_subtype_val + (fun p => by simpa only [coordinateChart_source,chart_source] using A.weight_support k p.2) + have hB : Continuous B := by + apply continuous_sigma + intro k + apply continuous_iff_continuousAt.mpr + intro p + exact ContinuousAt.comp (f := fun p : ↥(tsupport (A.weight k)) => + coordinateChart (k : M) p.1) ((contDiffAt_realSecondTensor + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth k hF)) _ + (gramDet_ne_zero_of_injective _ (hImm k p.1 p.2))).continuousAt) (hc k).continuousAt + have hξ (a : ι) : Continuous (ξ a) := continuous_sigma fun k => + (continuous_phaseDerivative (A.vectorPlaneRead_smooth k (hφ a))).comp (hc k) + let K : ι → ι → Set X := fun a b => point ⁻¹' (S a ∩ S b) + have hK (a b : ι) : IsCompact (K a b) := + ((hS a).inter (hS b)).preimage hpoint |>.isCompact + have hKs (a b : ι) : K a b = K b a := by simp only [K,inter_comm] + obtain ⟨w,hw,hpairs⟩ := finite_compact_good_weights K hK hKs B ξ hB hξ + (fun a _ _ x hx => hgood x.1 a x.2.1 x.2.2 hx.1) + refine ⟨w,hw,?_⟩ + intro k a b hab p hp hpa hpb + exact hpairs a b hab ⟨k,⟨p,hp⟩⟩ ⟨hpa,hpb⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasFiniteCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasFiniteCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..01d85115844eb26051599961d194c7e44677b7e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasFiniteCancellation.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasLinearizedMetric +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFacts +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialCancellation + +namespace OAI + +/-! Actual finite global metric-linear corrections assembled from local phase solvers. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance atlasSolveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasSolveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasSolveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasSolveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasSolveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasSolveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def jetChartMap (i : A.centers) (F : M → Space) : JetPolynomial.Base → JetPolynomial.Space := + spaceCoordinates ∘ A.vectorChartRead i F + +lemma jetChartMap_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : ContDiff ℝ ∞ (A.jetChartMap i F) := + spaceCoordinates.contDiff.comp (A.vectorChartRead_smooth i hF) + +omit [CompactSpace M] in +lemma jetChartMap_plane (i : A.centers) (F : M → Space) : + A.jetChartMap i F ∘ planeCoordinateIsometry.symm = spaceCoordinates ∘ A.vectorPlaneRead i F := rfl + +theorem atlas_finite_cancellation + {n : A.centers → ℕ} {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (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) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + {τ : ℝ} {s : ℝ≥0} + (c : ∀ i j, PolynomialSolveData (P i) 0 (A.jetChartMap i F) + (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), ∀ q : ℕ, + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (Dv m * ∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.global_linearized_residual_bound m + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro F hF φ K τ s c hτ hs hτs hs1 hK target q + have hsmall (i : A.centers) : τ/s + (0:ℝ)/τ^tensorLoss (P i) ≤ 1 := by + simpa only [zero_div,add_zero] using (div_le_one₀ hs).mpr hτs + choose X hX hsupport hsize hres using fun i : A.centers => + finite_polynomial_cancellation (P i) 0 (A.jetChartMap_smooth i hF) (φ i) (K i) (c i) + hτ hs hτs hs1 (le_refl 0) (hsmall i) (target i) q + have hsp (i : A.centers) : tsupport (X i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp (hsupport i hx) + exact hK i j hj + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := by + apply ContDiff.sum + intro j _ + exact contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((c i j).smoothPhase.comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hsz (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).size (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).size_nonneg (target i j) q m) + have hrr (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).residual (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).residual_nonneg + (by simpa only [zero_div,add_zero] using (div_nonneg hτ.le hs.le)) (target i j) q m) + refine ⟨A.vectorPlaneRestore X,A.vectorPlaneRestore_smooth X hX,?_,?_⟩ + · intro m + apply hv m X τ (∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hsz i m)) hX + intro i + exact (hsize i m).mono_const (Finset.single_le_sum (fun k _ => hsz k m) (Finset.mem_univ i)) + · intro m + apply ht m F hF X hX hsp T hT τ (∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hrr i m)) + intro i + have hr := hres i m + simp_rw [coordinateFullLinearized_unperturbed, A.jetChartMap_plane] at hr + exact hr.mono_const (Finset.single_le_sum (fun k _ => hrr k m) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGlobalQuadratic.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGlobalQuadratic.lean new file mode 100644 index 0000000000000000000000000000000000000000..dadaa8764eebda04572dca68c2895e36996c26bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGlobalQuadratic.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RestoredQuadratureMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRestoreFinite +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedMeanIdentity +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeMetricSplit + +namespace OAI + +/-! The global finite phase expansion has the quadratic mean determined by its phase data. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance globalFreeMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalFreeMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance globalFreeMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalFreeMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalFreeMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalFreeMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {n : A.centers → ℕ} + {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + +theorem atlas_global_zeroPhase + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.zeroPhaseSum τ + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x) = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) := by + classical + let Z₀ := fun (a : A.centers × Fin 3) => RealModes.phaseZeroTensor τ + (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + let T := fun (a : A.centers × Fin 3) (k : A.centers) (x : SmallModes.Base) => + (A.planeWeight k x)^2 • RealModes.phaseZeroTensor τ + (A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x + have ht (a : A.centers × Fin 3) : A.tensorPlaneRestore (T a) = + A.bundleRestore A.tensorTriv a.1 (fun y => fiberFromThree (Z₀ a (planeCoordinateIsometry y))) := by + have hs := (coordinateAmplitude_support + ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))).trans (hK a.1 a.2) + have hh := A.restored_zeroPhase a.1 τ (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + (((d a.1).solver a.2).smoothPhase.comp planeCoordinateIsometry.symm.contDiff) + ((((d a.1).data a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff.comp + planeCoordinateIsometry.symm.contDiff) hs + simpa only [T,Z₀,freeGlobalPhase,freeGlobalAmplitude,coordinatePhase,coordinateAmplitude, + Function.comp_def,LinearIsometryEquiv.symm_apply_apply] using hh + have he : (fun k x => (A.planeWeight k x)^2 • + RealModes.zeroPhaseSum τ + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x) = + ∑ a : A.centers × Fin 3, T a := by + funext k x + simp only [T,RealModes.zeroPhaseSum,Finset.smul_sum,Finset.sum_apply] + rw [he,A.tensorPlaneRestore_sum] + simp_rw [ht] + rw [Fintype.sum_prod_type] + funext p + simp only [tensorPlaneRestore,Finset.sum_apply] + apply Finset.sum_congr rfl + intro i _ + simp only [ChartedMeanFamilyData.quadraticMean_unperturbed,RealModes.zeroPhaseSum,Z₀, + bundleRestore,map_sum,Finset.smul_sum] + +def atlasGlobalNonzero + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ∀ x : M, CovariantTwoTensor x := by + classical + exact A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.nonzeroPhaseSum τ + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (fun a : A.centers × Fin 3 => A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x) + +theorem atlas_free_global_metric + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u) = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) + + A.atlasGlobalNonzero d hρ δ q u := by + classical + have hh := A.global_modes_metric τ + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d a.1 a.2) + (fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d a.1 a.2) + (fun a => A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2) + have he : (∑ a : A.centers × Fin 3, + surfaceMode τ (A.freeGlobalPhase d a.1 a.2) (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) = + A.atlasFreeOscillation d hρ δ q u := by + rw [Fintype.sum_prod_type] + exact (A.atlas_free_global_modes d hρ δ q u hK).symm + rw [he,A.atlas_global_zeroPhase d hρ δ q u hK] at hh + exact hh + +theorem atlas_quadratic_oscillation_eq_global + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.atlasFreeQuadraticOscillation d hρ δ q u = A.atlasGlobalNonzero d hρ δ q u := by + exact add_left_cancel ((A.atlas_free_metric_split d hρ δ q u hK).symm.trans + (A.atlas_free_global_metric d hρ δ q u hK)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGoodPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGoodPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..110e5f12e4a8c0b09c8174d45f9c786a5b93a221 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasGoodPhaseCancellation.lean @@ -0,0 +1,176 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformCompactPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! +Assemble compact good-phase corrections in the fixed atlas. All local +solvers and constants are constructed from immersion and good-phase geometry +before any target or scale is chosen. +-/ + +noncomputable section + +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance goodPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance goodPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance goodPhaseDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance goodPhaseDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance goodPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance goodPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas + +variable (A : SmoothingAtlas M) + +/-- Good phase geometry on the compact supports supplies an actual global +linear correction, with constants uniform over targets and both scales. -/ +theorem atlas_good_phase_cancellation + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) (q : ℕ) : + ∃ C D : (i : A.centers) → ι i → ℕ → ℝ, + (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j))) + (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ / s) ^ (q + 1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + have hlocal (i : A.centers) (j : ι i) := + PhaseGeometry.uniform_compact_good_phase_cancellation (A.jetChartMap_smooth i hF) + (hφ i j) (modeSupport (K i j)) + (by simpa only [A.jetChartMap_plane] using hImm i j) + (by simpa only [A.jetChartMap_plane] using hgood i j) q + choose Cv Ct hCv hCt solve using hlocal + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.global_linearized_residual_bound m + refine ⟨fun i j m => Dv m * Cv i j m, fun i j m => Dt m * Ct i j m, + fun i j m => mul_nonneg (hDv m) (hCv i j m), + fun i j m => mul_nonneg (hDt m) (hCt i j m), ?_⟩ + intro target τ s hτ hs hτs hs1 + choose X hX hsp hb hr using fun i j => solve i j (target i j) τ s hτ hs hτs hs1 + let Y : A.centers → RealModes.RField 4 := fun i x => ∑ j, X i j x + have hY (i : A.centers) : ContDiff ℝ ∞ (Y i) := + ContDiff.sum (fun j _ => hX i j) + have hYs (i : A.centers) : tsupport (Y i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + apply closure_minimal _ (modeSupport (A.chartWeightCompact i)).isCompact.isClosed + intro x hx + by_contra hn + apply hx + apply Finset.sum_eq_zero + intro j _ + exact image_eq_zero_of_notMem_tsupport (fun hxj => hn (hK i j (hsp i j hxj))) + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hd (i : A.centers) (j : ι i) : ContDiff ℝ ∞ + (QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) := + contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((hφ i j).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := ContDiff.sum (fun j _ => hd i j) + let v : A.centers → ℕ → ℝ := fun i m => ∑ j, Cv i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) + let t : A.centers → ℕ → ℝ := fun i m => ∑ j, Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) + have hvn (i : A.centers) (m : ℕ) : 0 ≤ v i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCv i j m) (apply_nonneg _ _)) + have htn (i : A.centers) (m : ℕ) : 0 ≤ t i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCt i j m) (apply_nonneg _ _)) + have hsize (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m (v i m) (Y i) := + WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ _ _ + (fun j _ => (hX i j).contDiffOn) (fun j _ => hb i j m) + have hlin (i : A.centers) : + RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i) = + fun x => ∑ j, RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) x := by + simpa only [coordinateFullLinearized_unperturbed, A.jetChartMap_plane] using + coordinateFullLinearized_sum emptyMetricPolynomial 0 (A.jetChartMap i F) + Finset.univ (X i) (hX i) + have hres (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m + ((τ / s) ^ (q + 1) * t i m) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i) + T i) := by + have he : (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i) + T i) = + fun x => ∑ j, (RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) x + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x) := by + funext x + rw [Pi.add_apply, hlin] + exact Finset.sum_add_distrib.symm + rw [he] + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ + (fun j => (τ / s) ^ (q + 1) * Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (fun j => RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) + (fun j _ => (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn + (hX i j).contDiffOn).add (hd i j).contDiffOn) + (fun j _ => by simpa only [A.jetChartMap_plane] using hr i j m) + simpa only [t, Finset.mul_sum, mul_assoc, Pi.add_apply] using hsum + refine ⟨A.vectorPlaneRestore Y, A.vectorPlaneRestore_smooth Y hY, ?_, ?_⟩ + · intro m + have hh := hv m Y τ (∑ i, v i m) hτ (hτs.trans hs1) + (Finset.sum_nonneg (fun i _ => hvn i m)) hY + (fun i => (hsize i m).mono_const + (Finset.single_le_sum (fun k _ => hvn k m) (Finset.mem_univ i))) + simpa only [v, Finset.mul_sum, mul_assoc] using hh + · intro m + have hη : 0 ≤ (τ / s) ^ (q + 1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hh := ht m F hF Y hY hYs T hT τ ((τ / s) ^ (q + 1) * ∑ i, t i m) + hτ (hτs.trans hs1) (mul_nonneg hη (Finset.sum_nonneg (fun i _ => htn i m))) + (fun i => (hres i m).mono_const (mul_le_mul_of_nonneg_left + (Finset.single_le_sum (fun k _ => htn k m) (Finset.mem_univ i)) hη)) + have he : Dt m * ((τ / s) ^ (q + 1) * ∑ i, t i m) = + (τ / s) ^ (q + 1) * ∑ i : A.centers, ∑ j, (Dt m * Ct i j m) * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) := by + calc + _ = (τ / s) ^ (q + 1) * (Dt m * ∑ i, t i m) := by ring + _ = _ := by simp only [t, Finset.mul_sum, mul_assoc] + rw [he] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasImmersionGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasImmersionGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..490bedf2ebd40cbfbb59ec50dc84fb816b041147 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasImmersionGeometry.lean @@ -0,0 +1,140 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases +import OAI.Geometry.Immersion.ClosedSurface.MetricBounds + +namespace OAI + +/-! Local good-phase geometry in any covering chart gives the intrinsic +immersion and nonzero second-form hypotheses for the next primitive. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology Matrix +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma coordinateMap_injective_of_immersion {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (q : M) {x : SmallModes.Base} (hx : x ∈ coordinateDomain q) : + Function.Injective (fderiv ℝ (coordinateMap F q) x) := by + have hi := ((coordinateInverse_smoothOn q) x hx).contMDiffAt + ((coordinateDomain_open q).mem_nhds hx) + have hm := (hF (coordinateInverse q x)).mdifferentiableAt (by simp) + have hic := hi.mdifferentiableAt (by simp) + have hd := mfderiv_comp x hm hic + rw [mfderiv_eq_fderiv] at hd + have hs : DifferentiableAt ℝ (F ∘ coordinateInverse q) x := + (hm.comp x hic).differentiableAt + change Function.Injective (fderiv ℝ (spaceCoordinates ∘ (F ∘ coordinateInverse q)) x) + rw [fderiv_comp x spaceCoordinates.differentiableAt hs,spaceCoordinates.fderiv,hd] + exact spaceCoordinates.injective.comp ((hI _).comp (coordinateInverse_mfderiv_injective q hx)) + +lemma nonzero_secondForm_of_chart_good {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (q p : M) + (hp : p ∈ (coordinateChart q).source) + (hI : Function.Injective (fderiv ℝ (coordinateMap F q) (coordinateChart q p))) + {ξ : SmallModes.Base} + (hg : Good (realSecondTensor (coordinateMap F q) (coordinateChart q p)) ξ) : + ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0 := by + let B := realSecondTensor (coordinateMap F q) (coordinateChart q p) + have hB : B ≠ 0 := by + intro h + exact hg.2 (by simp only [B,h,secondQuadratic,Pi.zero_apply,smul_zero,add_zero]) + have hbn : 0 < ‖B‖ := norm_pos_iff.mpr hB + have hqn : 0 < ‖secondQuadratic B (-ξ.2,ξ.1)‖ := norm_pos_iff.mpr hg.2 + let ε := ‖secondQuadratic B (-ξ.2,ξ.1)‖/‖B‖ + have hε : 0 < ε := div_pos hqn hbn + have hm : ε*‖B‖ ≤ ‖secondQuadratic B (-ξ.2,ξ.1)‖ := + le_of_eq (div_mul_cancel₀ _ hbn.ne') + have hpp : p ∈ (coordinateChart p).source := by + rw [coordinateChart_source] + exact mem_chart_source Plane p + have hx : coordinateCenter p ∈ (coordinateTransition q p).source := by + have hh := coordinateTransition_mem_chart q p hpp hp + simpa only [coordinateChart_apply,chartCoordinates_center] using hh + obtain ⟨d,C,hd,hC,hbound⟩ := coordinateTransition_compact_bounds q p + (isCompact_singleton (x := coordinateCenter p)) (singleton_subset_iff.mpr hx) + have hb := hbound (coordinateCenter p) (mem_singleton _) + have he : coordinateTransition q p (coordinateCenter p) = coordinateChart q p := by + have hh := coordinateTransition_apply_chart q p hpp + simpa only [coordinateChart_apply,chartCoordinates_center] using hh + have hD := gramDet_ne_zero_of_injective (fderiv ℝ (coordinateMap F q) (coordinateChart q p)) hI + have ht := actual_chart_phase_margin hF q p hx ξ hd hC hε + (by simpa only [he,coordDeriv] using hD) hb.1 hb.2 + (by simpa only [he] using hB) (by simpa only [he] using hm) + have hn : realSecondTensor (coordinateMap F p) (coordinateCenter p) ≠ 0 := ht.2.2.2 + by_contra! hzero + apply hn + funext i + fin_cases i + · exact hzero dx dx + · exact hzero dx dy + · exact hzero dy dy + +namespace FiniteOrderSmoothing.SmoothingAtlas +open JetPolynomial +variable [CompactSpace M] (A : SmoothingAtlas M) + +lemma immersion_of_planeRead_injective (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {p : M} + (hp : p ∈ tsupport (A.weight i)) + (hI : Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)))) : + Function.Injective (mfderiv planeModel spaceModel F p) := by + have hread : Function.Injective (fderiv ℝ (A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) := by + have he := (spaceCoordinates.hasFDerivAt.comp (planeCoordinateIsometry (chart (i : M) p)) + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) + (planeCoordinateIsometry (chart (i : M) p))).hasFDerivAt).fderiv + rw [he] at hI + intro v w hv + apply hI + exact congrArg spaceCoordinates hv + change Function.Injective (surfaceDifferential F p) + rw [A.vectorPlaneRead_differential i hF hp] + exact hread.comp (planeCoordinateIsometry.injective.comp + ((chart_mdifferentiable (i : M)).mfderiv_injective (A.weight_support i hp))) + +theorem geometry_of_chartwise_good {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hgeom : ∀ p : M, ∃ i : A.centers, p ∈ tsupport (A.weight i) ∧ + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + ∃ ξ : SmallModes.Base, + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) ξ) : + (∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) ∧ + (∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0) := by + constructor + · intro p + obtain ⟨i,hp,hi,_⟩ := hgeom p + exact A.immersion_of_planeRead_injective i hF hp hi + · intro p + obtain ⟨i,hp,hi,ξ,hg⟩ := hgeom p + have he := A.vectorPlaneRead_eventually_coordinateMap F i (houter i) hp + have hpoint : coordinateChart (i : M) p = planeCoordinateIsometry (chart (i : M) p) := by + rw [planeCoordinateIsometry_chart] + rfl + have hI : Function.Injective (fderiv ℝ (coordinateMap F (i : M)) + (coordinateChart (i : M) p)) := by + rw [hpoint,← he.fderiv_eq] + exact hi + have hgood : Good (realSecondTensor (coordinateMap F (i : M)) + (coordinateChart (i : M) p)) ξ := by + rw [hpoint,← (realSecondTensor_eventuallyEq he).eq_of_nhds] + exact hg + exact nonzero_secondForm_of_chart_good hF (i : M) p + (by simpa [coordinateChart_source,chart] using A.weight_support i hp) hI hgood + +end FiniteOrderSmoothing.SmoothingAtlas +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bc4469adcb1d3a20a3e380e43d1cce85d2db81c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementBound.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasIncrementIdentity +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedMeanIdentity +import OAI.Geometry.Immersion.ClosedSurface.FiniteIncrement + +namespace OAI + +/-! Quantitative assembly of the actual global free/forced metric increment. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.ChartedMeanFamilyData +open PhaseMean +lemma unperturbed_quadraticMean_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + {τ : ℝ} {s : ℝ≥0} {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanFamilyData P 0 τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : + ContDiff ℝ ∞ (d.quadraticMean hρ δ q f) := by + rw [d.quadraticMean_unperturbed] + exact RealModes.contDiff_zeroPhaseSum + (fun j => (d.solver j).smoothPhase.comp planeCoordinateIsometry.symm.contDiff) + (fun j => ((d.data j).freeAmplitude hρ δ q f).contDiff.comp planeCoordinateIsometry.symm.contDiff) τ +end ClosedSurfaceR4.JetPolynomial.Perturbation.ChartedMeanFamilyData + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance incrementBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance incrementBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance incrementBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance incrementBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance incrementBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance incrementBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_free_forced_increment_bound (m : ℕ) (A₀ B₀ : ℝ) (hA : 0 ≤ A₀) (hB : 0 ≤ B₀) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ {n : A.centers → ℕ} + {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (_hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (F V : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + (_hV : ContMDiff planeModel spaceModel ∞ V) (H : ∀ x : M, CovariantTwoTensor x) + (_hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p))), + 0 < τ → τ ≤ 1 → 0 ≤ δ → δ ≤ τ → ∀ C₁ C₂ C₃ : ℝ, + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + A.WeightedBound τ (m+1) (A₀*(δ*τ)) U → + A.WeightedBound τ (m+1) (B₀*δ^2) V → + A.TensorWeightedBound τ m C₁ (linearMetricTensor F U) → + A.TensorWeightedBound τ m C₂ (linearMetricTensor F V + A.atlasFreeQuadraticOscillation d hρ δ q u) → + A.TensorWeightedBound τ m C₃ + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H) → + A.TensorWeightedBound τ m (C₁+C₂+C₃+D*(δ^3/τ)) + (inducedTensor (F+(U+V)) - inducedTensor F - δ^2 • H) := by + obtain ⟨D,hD,hd⟩ := A.global_cubic_remainder_bound m A₀ B₀ hA hB + refine ⟨D,hD,?_⟩ + intro n P τ s r ρ R reference d hρ δ q u hK F V hF hV H hH hτ hτ1 hδ hδτ C₁ C₂ C₃ + dsimp only + intro hbU hbV h₁ h₂ h₃ + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := + spaceCoordinates.symm.contDiff.contMDiff.comp (A.atlasFreeOscillation_smooth d hρ δ q u) + let T := A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) + have hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p)) := + A.tensorPlaneRestore_smooth (fun i => (d i).unperturbed_quadraticMean_smooth hρ δ q _) + have hosceq : A.atlasFreeQuadraticOscillation d hρ δ q u = inducedTensor U - T := by + apply eq_sub_iff_add_eq.mpr + rw [add_comm] + exact (A.atlas_free_metric_split d hρ δ q u hK).symm + have hosc : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.atlasFreeQuadraticOscillation d hρ δ q u p)) := by + rw [hosceq] + exact (A.inducedTensor_smooth hU).sub_section hT + have hs₁ := A.linearMetricTensor_smooth hF hU + have hs₂ := (A.linearMetricTensor_smooth hF hV).add_section hosc + have hs₃ := hT.sub_section (hH.const_smul_section (a := δ^2)) + have hs₄ := (A.linearMetricTensor_smooth hU hV).add_section (A.inducedTensor_smooth hV) + have hh := A.tensorWeightedBound_add ((hs₁.add_section hs₂).add_section hs₃) hs₄ hτ.le + (A.tensorWeightedBound_add (hs₁.add_section hs₂) hs₃ hτ.le + (A.tensorWeightedBound_add hs₁ hs₂ hτ.le h₁ h₂) h₃) + (hd τ δ hτ hτ1 hδ hδτ U V hU hV hbU hbV) + have herr : inducedTensor (F+(U+V)) - inducedTensor F - δ^2 • H = + (linearMetricTensor F U + + (linearMetricTensor F V + A.atlasFreeQuadraticOscillation d hρ δ q u) + + (T - δ^2 • H)) + (linearMetricTensor U V + inducedTensor V) := by + calc + _ = linearMetricTensor F U + + (linearMetricTensor F V + A.atlasFreeQuadraticOscillation d hρ δ q u) + + (T - δ^2 • H) + linearMetricTensor U V + inducedTensor V := + A.atlas_free_forced_increment d hρ δ q u hK hF hV H + _ = _ := by rw [add_assoc] + change A.TensorWeightedBound τ m _ (inducedTensor (F+(U+V)) - inducedTensor F - δ^2 • H) + rw [herr] + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..216981eb64c8c343f94346058ae85a7da815588f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasIncrementIdentity.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeMetricSplit + +namespace OAI + +/-! Exact global metric error after the free and forced displacements. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean JetPolynomial.Perturbation + +local instance incrementMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance incrementMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance incrementMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance incrementMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance incrementMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance incrementMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {n : A.centers → ℕ} + {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + +theorem atlas_free_forced_increment + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {F V : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hV : ContMDiff planeModel spaceModel ∞ V) (H : ∀ x : M, CovariantTwoTensor x) : + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + inducedTensor (F+(U+V)) - inducedTensor F - δ^2 • H = + linearMetricTensor F U + + (linearMetricTensor F V + A.atlasFreeQuadraticOscillation d hρ δ q u) + + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H) + + linearMetricTensor U V + inducedTensor V := by + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := + spaceCoordinates.symm.contDiff.contMDiff.comp (A.atlasFreeOscillation_smooth d hρ δ q u) + have hm := A.atlas_free_metric_split d hρ δ q u hK + dsimp only + funext p + ext v w + have hmean := congrArg (fun t : ∀ x : M, CovariantTwoTensor x => t p v w) hm + have he := inducedForm_free_forced ((hF p).mdifferentiableAt (by simp)) + ((hU p).mdifferentiableAt (by simp)) ((hV p).mdifferentiableAt (by simp)) v w (δ^2 * H p v w) + change inducedForm U p v w = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) p v w + + A.atlasFreeQuadraticOscillation d hρ δ q u p v w at hmean + change inducedForm (F+(U+V)) p v w - inducedForm F p v w - δ^2 * H p v w = + linearMetricForm F U p v w + + (linearMetricForm F V p v w + A.atlasFreeQuadraticOscillation d hρ δ q u p v w) + + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) p v w - δ^2 * H p v w) + + linearMetricForm U V p v w + inducedForm V p v w + linarith only [he,hmean] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputBaseline.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputBaseline.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ea115cbaa1949be73fa4b30f0b581bdd2ade4fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputBaseline.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds + +namespace OAI + +/-! A fixed C2 neighborhood supplies the scale-independent input baseline. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +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 shifted_zero_bound_of_near {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ P : ℝ, 0 ≤ P ∧ ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ b : ℝ, A.WeightedBound 1 2 b (G-F) → + ∀ t : ℝ, A.ShiftedBound 2 0 t (P+b) G := by + obtain ⟨P,hP,hbase⟩ := A.exists_shifted_bound 2 0 hF + have hbase' : A.WeightedBound 1 2 P F := by + intro i j hj x _ + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hbase i j (by omega) x + refine ⟨P,hP,?_⟩ + intro G hG b hnear t + have hsum := A.weightedBound_add (hG.sub hF) hF zero_le_one hnear hbase' + change A.WeightedBound 1 2 (b+P) ((G-F)+F) at hsum + have he : (G-F)+F = G := by abel + rw [he] at hsum + intro i j hj x + have hj2 : j ≤ 2 := by omega + have hh := hsum i j hj2 x (mem_univ x) + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ, + Nat.sub_eq_zero_of_le hj2,pow_zero,add_comm] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..c52eefa10e255b7233efae838a9f7156391e406a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasInputPhaseCancellation.lean @@ -0,0 +1,144 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNearbyPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseStability + +namespace OAI + +/-! Uniform atlas cancellation from the global norms used in the iteration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputPhaseDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputPhaseDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_input_phase_cancellation_all_profiles + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → ∀ q : ℕ, + ∃ C D : (i : A.centers) → ι i → ℕ → ℝ, + (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (P m) G) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + choose E hE he using fun (i : A.centers) m => A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + choose E₀ hE₀ he₀ using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i 2 + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + obtain ⟨r,hr,hall⟩ := A.atlas_nearby_phase_cancellation_all_profiles F hF φ hφ K hK + hImm hgood + have hL₀ (i) : 0 ≤ L*E₀ i := mul_nonneg (norm_nonneg _) (hE₀ i) + obtain ⟨ρ,hρ,_,hρr⟩ := finite_positive_threshold + (fun a : (i : A.centers) × ι i => r a.1 a.2/(1+L*E₀ a.1)) + (fun a => div_pos (hr a.1 a.2) (by linarith [hL₀ a.1])) + refine ⟨ρ,hρ,?_⟩ + intro P hP q + let R := fun i m => L*E i m*P m + have hR (i m) : 0 ≤ R i m := mul_nonneg (mul_nonneg (norm_nonneg _) (hE i m)) (hP m) + obtain ⟨C,D,hC,hD,hsolve⟩ := hall R hR q + refine ⟨C,D,hC,hD,?_⟩ + intro G hG B hB hBρ hb τ s hτ hs hτs hs1 hp target + have hbnd (i j) : L*E₀ i*B < r i j := by + have hh := (lt_div_iff₀ (show 0 < 1+L*E₀ i by linarith [hL₀ i])).mp + (hBρ.trans_le (hρr ⟨i,j⟩)) + nlinarith + apply hsolve G hG (fun i _ => L*E₀ i*B) + (fun i _ => mul_nonneg (hL₀ i) hB) hbnd _ τ s hτ hs hτs hs1 _ target + · intro i _ + have hh := (he₀ i (G-F) 1 B zero_lt_one le_rfl hB (hG.sub hF) hb).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn + spaceCoordinates.toContinuousLinearMap + simp only [ContinuousLinearEquiv.coe_coe] at hh + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hh + have hsub : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [hsub] at hh + simpa only [L,mul_assoc] using hh + · intro i m j hj + have hh := (he i m G s (P m) hs hs1 (hP m) hG (hp m) j (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + simpa only [R,L,mul_assoc,mul_div_assoc,ContinuousLinearEquiv.coe_coe] using hh + +theorem atlas_input_phase_cancellation + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) (q : ℕ) : + ∃ (ρ : ℝ) (C D : (i : A.centers) → ι i → ℕ → ℝ), + 0 < ρ ∧ (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (P m) G) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + obtain ⟨ρ,hρ,hall⟩ := A.atlas_input_phase_cancellation_all_profiles F hF φ hφ K hK hImm hgood + obtain ⟨C,D,hC,hD,hcancel⟩ := hall P hP q + exact ⟨ρ,C,D,hρ,hC,hD,hcancel⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetCoordinateRelation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetCoordinateRelation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8ae4bc25d383a58a4f66d2a02e8c7991a0cfb345 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetCoordinateRelation.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTransition +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! The actual localized atlas maps on a coordinate overlap. The transition +scalar is the square of the outer cutoff. A nonzero partition weight gives +the needed equality of germs without any extra plateau hypothesis. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def transitionScalar (i j : A.centers) (x : Base) : ℝ := + (A.outer j ((chart (i : M)).symm x)) ^ 2 + +lemma transitionScalar_smoothOn (i j : A.centers) : + ContDiffOn ℝ ∞ (A.transitionScalar i j) (chart (i : M)).target := by + exact ((A.outer_smooth j).comp_contMDiffOn + (chart_symm_smooth (i : M))).contDiffOn.pow 2 + +lemma outer_eventually_one_of_weight_ne_zero (i : A.centers) {p : M} + (hp : A.weight i p ≠ 0) : + A.outer i =ᶠ[𝓝 p] (fun _ => 1) := by + have hn : ∀ᶠ q in 𝓝 p, A.weight i q ≠ 0 := + (isOpen_ne.preimage (A.weight_smooth i).continuous).mem_nhds hp + filter_upwards [hn] with q hq + exact A.outer_one i q (subset_tsupport (A.weight i) hq) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma vectorChartRead_transition (i j : A.centers) (G : M → V) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.vectorChartRead j G (transition (i : M) (j : M) x) = + A.transitionScalar i j x • A.vectorChartRead i G x := by + have hi : x ∈ (chart (i : M)).target := hx.1 + have hj : transition (i : M) (j : M) x ∈ (chart (j : M)).target := + (chart (j : M)).map_source hx.2 + have he : (chart (j : M)).symm (transition (i : M) (j : M) x) = + (chart (i : M)).symm x := + (chart (j : M)).left_inv hx.2 + simp only [vectorChartRead, localize, indicator_of_mem hi, indicator_of_mem hj, + he, ho, one_pow, one_smul, transitionScalar] + +lemma vectorChartRead_transition_eventually (i j : A.centers) (G : M → V) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + (fun y => A.vectorChartRead j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => A.transitionScalar i j y • A.vectorChartRead i G y) := by + have ho := (A.outer_eventually_one_of_weight_ne_zero i hw).comp_tendsto + ((chart (i : M)).continuousAt_symm hx.1) + filter_upwards [(transition (i : M) (j : M)).open_source.mem_nhds hx,ho] + with y hy hoy + exact A.vectorChartRead_transition i j G hy hoy + +lemma jetChartMap_transition (i j : A.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.jetChartMap j G (transition (i : M) (j : M) x) = + A.transitionScalar i j x • A.jetChartMap i G x := by + change spaceCoordinates (A.vectorChartRead j G (transition (i : M) (j : M) x)) = _ + rw [A.vectorChartRead_transition i j G hx ho] + exact map_smul spaceCoordinates _ _ + +lemma jetChartMap_transition_eventually (i j : A.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + (fun y => A.jetChartMap j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => A.transitionScalar i j y • A.jetChartMap i G y) := by + filter_upwards [A.vectorChartRead_transition_eventually i j G hx hw] with y hy + change spaceCoordinates (A.vectorChartRead j G (transition (i : M) (j : M) y)) = _ + rw [hy] + exact map_smul spaceCoordinates _ _ + +/-- The partition weight removes the boundary case where a germ equal to +one is unavailable. This identity holds on the whole transition domain. -/ +lemma weighted_jetChartMap_transition (i j : A.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) : + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.jetChartMap j G (transition (i : M) (j : M) x) = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + (A.transitionScalar i j x • A.jetChartMap i G x) := by + by_cases hw : A.weight i ((chart (i : M)).symm x) = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul] + · rw [A.jetChartMap_transition i j G hx + (A.outer_one i _ (subset_tsupport (A.weight i) hw))] + +/-- A fixed compact overlap has a globally smooth transition scalar. It +is chosen before the map, and retains both the weighted identity everywhere +and the unweighted identity of germs on the nonzero weight locus. -/ +theorem compact_jetChartMap_transition (i j : A.centers) {K : Set Base} + (hK : IsCompact K) (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ a : Base → ℝ, ContDiff ℝ ∞ a ∧ EqOn a (A.transitionScalar i j) U ∧ + (∀ (G : M → Space) (x : Base), x ∈ U → + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.jetChartMap j G (transition (i : M) (j : M) x) = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • (a x • A.jetChartMap i G x)) ∧ + (∀ (G : M → Space) (x : Base), x ∈ U → + A.weight i ((chart (i : M)).symm x) ≠ 0 → + (fun y => A.jetChartMap j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => a y • A.jetChartMap i G y)) := by + obtain ⟨U,hU,hKU,hUe,a,ha,he⟩ := CollarVelocity.compact_smooth_extension hK + (transition (i : M) (j : M)).open_source hKe + ((A.transitionScalar_smoothOn i j).mono (fun _ hx => hx.1)) + refine ⟨U,hU,hKU,hUe,a,ha,he,?_,?_⟩ + · intro G x hx + rw [he hx] + exact A.weighted_jetChartMap_transition i j G (hUe hx) + · intro G x hx hw + filter_upwards [A.jetChartMap_transition_eventually i j G (hUe hx) hw, + hU.mem_nhds hx] with y hy hyU + rw [he hyU] + exact hy + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..a85d57116eca91c70169995e6f08c9c49f74a218 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasJetReadBounds.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! Weighted bounds for the exact coordinate maps entering the polynomial metric. -/ +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 jetPlaneRead_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ τ C : ℝ, 0 < τ → τ ≤ 1 → 0 ≤ C → A.WeightedBound τ m C F → + WeightedEstimates.WeightedBound univ τ m (D*C) + (A.jetChartMap i F ∘ planeCoordinateIsometry.symm) := by + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) i m + refine ⟨‖spaceCoordinates.toContinuousLinearMap‖*D,mul_nonneg (norm_nonneg _) hD,?_⟩ + intro F hF τ C hτ hτ1 hC hb + rw [A.jetChartMap_plane] + have hh := (hd F τ C hτ hτ1 hC hF hb).linear uniqueDiffOn_univ hτ.le + (A.vectorPlaneRead_smooth i hF).contDiffOn spaceCoordinates.toContinuousLinearMap + simpa only [mul_assoc,ContinuousLinearEquiv.coe_coe] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLinearMapBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLinearMapBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2dc01e1d058877625b75da0f87f1abf60bc6198c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLinearMapBounds.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds + +namespace OAI + +/-! Fixed linear coordinate changes preserve the actual atlas norm. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates +variable {M V W : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup W] [NormedSpace ℝ W] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma localize_clm (p : M) (χ : M → ℝ) (L : V →L[ℝ] W) (F : M → V) : + localize p χ (L ∘ F) = L ∘ localize p χ F := by + funext x + by_cases hx : x ∈ (chart p).target <;> simp [localize,hx,map_smul] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma weightedBound_clm (L : V →L[ℝ] W) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) {s C : ℝ} {m : ℕ} + (hs : 0 ≤ s) (hb : A.WeightedBound s m C F) : + A.WeightedBound s m (‖L‖*C) (L ∘ F) := by + intro i + rw [localize_clm] + exact (hb i).linear uniqueDiffOn_univ hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hF).contDiffOn L + +lemma weightedBound_add {F G : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) (hG : ContMDiff planeModel 𝓘(ℝ,V) ∞ G) + {s C D : ℝ} {m : ℕ} (hs : 0 ≤ s) + (hbF : A.WeightedBound s m C F) (hbG : A.WeightedBound s m D G) : + A.WeightedBound s m (C+D) (F+G) := by + intro i + have he : localize (i : M) (A.weight i) (F+G) = + localize (i : M) (A.weight i) F + localize (i : M) (A.weight i) G := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> simp [localize,hx,smul_add] + change WeightedEstimates.WeightedBound univ s m (C+D) (localize (i : M) (A.weight i) (F+G)) + rw [he] + exact (hbF i).add uniqueDiffOn_univ hs + (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) hG).contDiffOn (hbG i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLowJetNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLowJetNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d8993b6f2f50f6afb4c0bb3f8ea354e888f815d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasLowJetNeighborhood.lean @@ -0,0 +1,66 @@ +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 lowJet_neighborhood_of_C2 (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {S : Set JetPolynomial.Base} (hS : IsOpen S) + {Q O : Set LowJet} (hQ : IsCompact Q) (hO : IsOpen O) (hQO : Q ⊆ O) + (hFQ : MapsTo (lowJet (A.jetChartMap i F)) 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)) S Q' := by + obtain ⟨r,Q',hr,hQ',_,hQ'O,hnear⟩ := exists_lowJet_segment_margin hQ hO hQO + obtain ⟨D,hD,hd⟩ := A.jetPlaneRead_bound i 2 + let ρ := r/(1+D) + 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 hc := weightedBound_comp_isometry planeCoordinateIsometry + ((A.jetChartMap_smooth i (hG.sub hF)).comp planeCoordinateIsometry.symm.contDiff) hdiff + have he : (A.jetChartMap i (G-F) ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i (G-F) := by + funext x + simp + change WeightedEstimates.WeightedBound univ 1 2 (D*ρ) + ((A.jetChartMap i (G-F) ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry) at hc + rw [he] at hc + have hc' : WeightedEstimates.WeightedBound S 1 2 (D*ρ) (A.jetChartMap i (G-F)) := + hc.restrict_open hS + have hsmall : D*ρ/1^2 ≤ r := by + dsimp [ρ] + have hh : r/(1+D)*(1+D) = r := div_mul_cancel₀ r (by positivity) + simp only [one_pow,div_one] + nlinarith [div_nonneg hr.le (show 0 ≤ 1+D by positivity)] + have hh := hnear hS (A.jetChartMap_smooth i hF) (A.jetChartMap_smooth i (hG.sub hF)) + hFQ zero_lt_one le_rfl (mul_nonneg hD hρ.le) hsmall hc' 1 ⟨by norm_num,le_rfl⟩ + have hsum : (fun p => A.jetChartMap i F p+(1 : ℝ) • A.jetChartMap i (G-F) p) = + A.jetChartMap i G := 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] using congrFun had.symm p + change MapsTo (lowJet (fun p => A.jetChartMap i F p+(1 : ℝ) • A.jetChartMap i (G-F) p)) S Q' at hh + exact Eq.mp (congrArg (fun f : JetPolynomial.Base → JetPolynomial.Space => MapsTo (lowJet f) S Q') hsum) hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2dff4847a4c247d9c2a6bff20e548788c4f3bf7b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricBounds.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalCubicRemainder + +namespace OAI + +/-! Smoothness and elementary norm operations for actual global metric tensors. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance metricBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +include A + +lemma inducedTensor_smooth {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (inducedTensor F p)) := by + rw [← A.metric_from_chart_reads hF] + apply A.tensorPlaneRestore_smooth + intro i + apply ((A.planeWeight_smooth i).pow 2).smul + exact contDiffOn_univ.mp (RealModes.contDiffOn_realMetricTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn) + +lemma linearMetricTensor_smooth {F G : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (linearMetricTensor F G p)) := by + rw [← A.linearMetric_from_chart_reads hF hG] + apply A.tensorPlaneRestore_smooth + intro i + apply ((A.planeWeight_smooth i).pow 2).smul + exact contDiffOn_univ.mp (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)).contDiffOn) + +lemma tensorWeightedBound_add {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 + change WeightedEstimates.WeightedBound univ s m (C+D) (A.bundleLocalize A.tensorTriv i (T+S)) + rw [A.bundleLocalize_add] + exact (hbT i).add 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) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..62d9c76a8f496b55bcd3eab4bb5349deb8734d6e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricExpansion.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RestoredMetricTensor + +namespace OAI + +/-! The metric of the actual global oscillation, including every cross term +between different atlas patches. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +local instance atlasMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def atlasMetricCross (f : A.centers → SmallModes.Base → Space) : ∀ p : M, CovariantTwoTensor p := by + classical + exact fun p => ∑ i : A.centers, ∑ j ∈ Finset.univ.erase i, + metricPairTensor (restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry)) + (restore (j : M) (A.outer j) (f j ∘ planeCoordinateIsometry)) p + +theorem vectorPlaneRestore_metric (f : A.centers → SmallModes.Base → Space) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (hsp : ∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (A.vectorPlaneRestore f) = + A.tensorPlaneRestore (fun i => RealModes.realMetricTensor (spaceCoordinates ∘ f i)) + + A.atlasMetricCross f := by + classical + unfold vectorPlaneRestore + rw [inducedTensor_finite_sum (fun i : A.centers => + restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry)) (fun i => restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) ((hf i).comp planeCoordinateIsometry.contDiff))] + apply congrArg₂ (·+·) _ rfl + funext p + apply Finset.sum_congr rfl + intro i _ + exact congrFun (A.restored_metric_tensor i (f i) (hf i) (hsp i)) p + +omit [CompactSpace M] in +lemma euclidean_vectorPlaneRestore (f : A.centers → SmallModes.Base → RealModes.RVec 4) : + spaceCoordinates.symm ∘ A.vectorPlaneRestore f = + A.vectorPlaneRestore (fun i => spaceCoordinates.symm ∘ f i) := by + funext p + simp only [vectorPlaneRestore,Function.comp_apply,Finset.sum_apply,map_sum] + apply Finset.sum_congr rfl + intro i _ + by_cases hp : p ∈ (chart (i : M)).source + · simp only [restore,indicator_of_mem hp,Function.comp_apply,map_smul] + · simp only [restore,indicator_of_notMem hp,map_zero] + +theorem euclidean_vectorPlaneRestore_metric + (f : A.centers → SmallModes.Base → RealModes.RVec 4) + (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (hsp : ∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ A.vectorPlaneRestore f) = + A.tensorPlaneRestore (fun i => RealModes.realMetricTensor (f i)) + + A.atlasMetricCross (fun i => spaceCoordinates.symm ∘ f i) := by + rw [A.euclidean_vectorPlaneRestore] + have hh := A.vectorPlaneRestore_metric (fun i => spaceCoordinates.symm ∘ f i) + (fun i => spaceCoordinates.symm.contDiff.comp (hf i)) + (fun i => (tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) (f i)).trans (hsp i)) + have he (i : A.centers) : spaceCoordinates ∘ (spaceCoordinates.symm ∘ f i) = f i := by + funext x + simp only [Function.comp_apply,ContinuousLinearEquiv.apply_symm_apply] + simpa only [he] using hh + +lemma atlasMetricCross_pair_zero (f : A.centers → SmallModes.Base → Space) + (hsp : ∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (i j : A.centers) {p : M} (hp : p ∉ tsupport (A.weight i) ∩ tsupport (A.weight j)) : + metricPairTensor (restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry)) + (restore (j : M) (A.outer j) (f j ∘ planeCoordinateIsometry)) p = 0 := by + apply metricPairTensor_zero_off_intersection + intro h + exact hp ⟨A.restore_plane_tsupport i (f i) (hsp i) h.1, + A.restore_plane_tsupport j (f j) (hsp j) h.2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..c78c54638440b821dd51638f251d02ec293d18bb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetFamily.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPositiveMetricJets +import OAI.Geometry.SurfaceImmersion.Geometry.UniformMetricPathBounds + +namespace OAI + +/-! Uniform compact first-jet families of actual atlas metric readings. +The constants depend on a fixed lower metric bound and C1 budget. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorPlaneRead_metric_lower (g h : SmoothMetric M) (c : ℝ) + (hlower : ∀ p v, c*g.inner p v v ≤ h.inner p v v) + (i : A.centers) {x : SmallModes.Base} + (hx : x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (v : SmallModes.Base) : + c*evaluate (A.tensorPlaneRead i g.inner x) v v ≤ + evaluate (A.tensorPlaneRead i h.inner x) v v := by + rw [A.tensorPlaneRead_metric g i hx,A.tensorPlaneRead_metric h i hx, + coordinateMetric_evaluate,coordinateMetric_evaluate] + exact hlower (coordinateInverse (i : M) x) + (mfderiv 𝓘(ℝ,SmallModes.Base) planeModel (coordinateInverse (i : M)) x v) + +theorem compact_metric_jet_family (g : SmoothMetric M) {c C : ℝ} + (hc : 0 < c) (hC : 0 ≤ C) : + ∃ J : Set MetricFirstJet, IsCompact J ∧ + (∀ j ∈ J, metricJetDet j ≠ 0) ∧ + ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 C h.inner → + (∀ p v, c*g.inner p v v ≤ h.inner p v v) → + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + (A.tensorPlaneRead i h.inner x,fderiv ℝ (A.tensorPlaneRead i h.inner) x) ∈ J := by + classical + obtain ⟨T,B,hT,hpos,hdet,_,hmem,_,_⟩ := A.metric_plane_read_bounds g + obtain ⟨d,hd,hdlower⟩ := compact_positive_tensor_lower_bound hT (by + intro H hH + exact (tensor_positive_iff H).mpr ⟨hpos H hH,hdet H hH⟩) + choose E hE hread using fun i : A.centers => A.tensorPlaneRead_bound i 1 + let R : ℝ := (∑ i, E i)*C + let J := positiveMetricJetRegion (c*d) R + refine ⟨J,positiveMetricJetRegion_compact _ _, + fun j hj => positiveMetricJetRegion_det (mul_pos hc hd) hj,?_⟩ + intro h hbound hlower i x hx + have hb := hread i h.inner 1 C zero_lt_one le_rfl hC h.contMDiff hbound + have hEi : E i ≤ ∑ k, E k := + Finset.single_le_sum (fun k _ => hE k) (Finset.mem_univ i) + have hv : ‖A.tensorPlaneRead i h.inner x‖ ≤ R := + (hb.norm_le (mem_univ x)).trans (mul_le_mul_of_nonneg_right hEi hC) + have hderiv : ‖fderiv ℝ (A.tensorPlaneRead i h.inner) x‖ ≤ R := by + have hb' := hb.deriv_le zero_lt_one (le_refl 1) (mem_univ x) + simp only [iteratedFDerivWithin_univ,one_pow,div_one,norm_iteratedFDeriv_one] at hb' + exact hb'.trans (mul_le_mul_of_nonneg_right hEi hC) + refine ⟨max_le hv hderiv,?_⟩ + intro v + calc + (c*d)*‖v‖^2 = c*(d*‖v‖^2) := by ring + _ ≤ c*evaluate (A.tensorPlaneRead i g.inner x) v v := + mul_le_mul_of_nonneg_left (hdlower _ (hmem i x hx) v) hc.le + _ ≤ evaluate (A.tensorPlaneRead i h.inner x) v v := + A.tensorPlaneRead_metric_lower g h c hlower i hx v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6026a05c42f11b87a71f1e186acf36b959009f8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricJetMargins.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricJetMargins +import OAI.Geometry.SurfaceImmersion.Correction.AtlasMetricLocalModel +import OAI.Geometry.SurfaceImmersion.Atlas.MetricAtlasReference +import OAI.Geometry.SurfaceImmersion.Atlas.UniformMetricPhaseGeometry + +namespace OAI + +/-! Uniform first-jet geometry of approximate isometries in a fixed atlas. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry JetPolynomial JetPolynomial.Perturbation +local instance metricJetsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricJetsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricJetsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricJetsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricJetsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricJetsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma modeSupport_subset_coordinateDomain (i : A.centers) : + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coordinateDomain (i : M) := by + rintro x ⟨y,⟨p,hp,rfl⟩,rfl⟩ + have hs : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i hp + rw [← coordinateChart_target] + exact (coordinateChart (i : M)).map_source hs + +lemma metricPlaneRead_on_support {V : M → Space} + (hV : ContMDiff planeModel spaceModel ∞ V) (i : A.centers) {x : SmallModes.Base} + (hx : x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i V) x = + A.tensorPlaneRead i (inducedTensor V) x := by + obtain ⟨y,hy,rfl⟩ := hx + rw [← A.jetChartMap_plane] + simpa only [tensorPlaneRead,Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] using + A.metric_read_on_support i hV hy + +/-- The constants depend on the prescribed metric and fixed atlas, not on +any derivatives of the approximate immersion. -/ +theorem metric_firstJet_margin (g : SmoothMetric M) : + ∃ ε R c : ℝ, 0 < ε ∧ 0 < R ∧ 0 < c ∧ + ∀ V : M → Space, ContMDiff planeModel spaceModel ∞ V → + ∀ b : ℝ, 0 ≤ b → b < ε → + A.TensorWeightedBound 1 0 b (inducedTensor V-g.inner) → + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i V) x‖ ≤ R ∧ + c ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i V) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i V) x).2 := by + let T : Set PhaseMean.Tensor := ⋃ i : A.centers, + A.tensorPlaneRead i g.inner '' (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) + have hT : IsCompact T := isCompact_iUnion (fun i => + (modeSupport (A.chartWeightCompact i)).isCompact.image (A.tensorPlaneRead_smooth i g.contMDiff).continuous) + have hpos : ∀ H ∈ T, 0 < H 0*H 2-(H 1)^2 := by + intro H hH + obtain ⟨i,hi⟩ := mem_iUnion.mp hH + obtain ⟨x,hx,rfl⟩ := hi + rw [A.tensorPlaneRead_metric g i hx] + exact (coordinateMetric_positive g (i : M) (A.modeSupport_subset_coordinateDomain i hx)).2 + obtain ⟨ε,R,c,hε,hR,hc,hmargin⟩ := compact_metric_firstJet_margin hT hpos + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i 0 + have heps (i : A.centers) : 0 < ε/(1+D i) := div_pos hε (by linarith [hD i]) + obtain ⟨ρ,hρ,_,hρall⟩ := finite_positive_threshold (fun i => ε/(1+D i)) heps + refine ⟨ρ,R,c,hρ,hR,hc,?_⟩ + intro V hV b hb hbρ hclose i x hx + apply hmargin (spaceCoordinates ∘ A.vectorPlaneRead i V) x (A.tensorPlaneRead i g.inner x) + (mem_iUnion.mpr ⟨i,mem_image_of_mem _ hx⟩) + have hlocal := hread i (inducedTensor V-g.inner) 1 b zero_lt_one le_rfl hb + ((A.inducedTensor_smooth hV).sub_section g.contMDiff) hclose + have hh := hlocal.norm_le (mem_univ x) + rw [A.tensorPlaneRead_sub] at hh + rw [A.metricPlaneRead_on_support hV i hx] + have hb' := (lt_div_iff₀ (by linarith [hD i] : 0 < 1+D i)).mp + (hbρ.trans_le (hρall i)) + exact hh.trans_lt (by nlinarith) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ec5b63e50cdbaefbedfcbe858a7ec4c0dcf4def --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLimit.lean @@ -0,0 +1,192 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCorrectionLimit +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalMetricStep +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanCoordinates + +namespace OAI + +/-! The normalized atlas defect controls the actual metric of the limit. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection + +local instance metricLimitFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricLimitFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance metricLimitDualAdd : + ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricLimitDualSmul : + ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricLimitSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricLimitSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +/-- The genuine finite atlas reconstruction carries coordinate convergence +to convergence in each tensor fiber. -/ +lemma tensor_tendsto_zero_of_encode + {H : ℕ → ∀ p : M, CovariantTwoTensor p} + (hH : ∀ i x, Tendsto (fun n => A.tensorEncode (H n) x i) atTop (𝓝 0)) + (p : M) : Tendsto (fun n => H n p) atTop (𝓝 0) := by + have hi (i : A.centers) : Tendsto + (fun n => A.bundleRestore A.tensorTriv i + (A.bundleLocalize A.tensorTriv i (H n)) p) atTop (𝓝 0) := by + have h := ((A.tensorTriv i).symmL ℝ p).continuous.tendsto 0 |>.comp + (hH i (chart (i : M) p)) + simpa only [Function.comp_apply, bundleRestore, tensorEncode, map_zero, smul_zero] using + h.const_smul (A.outer i p) + have hs := tendsto_finsetSum Finset.univ (fun i _ => hi i) + simpa only [A.bundle_sum_restore_localize A.tensorTriv A.tensorTriv_domain, + Finset.sum_const_zero] using hs + +omit [CompactSpace M] in +/-- A bounded normalized defect and a vanishing amplitude imply convergence +of the actual pullback metrics. No convergence of normalized defects is needed. -/ +theorem metric_tendsto_of_normalized_coordinates_bound + {G : ℕ → M → Space} {δ : ℕ → ℝ} {B : ℝ} + (target : ∀ p : M, CovariantTwoTensor p) + (hδ : ∀ n, δ n ≠ 0) (hδ0 : Tendsto δ atTop (𝓝 0)) + (hbound : ∀ n i x, + ‖A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x i- + A.tensorEncode target x i‖ ≤ B) + (p : M) (v w : TangentSpace planeModel p) : + Tendsto (fun n => inner ℝ (mfderiv planeModel spaceModel (G n) p v) + (mfderiv planeModel spaceModel (G n) p w)) atTop (𝓝 (target p v w)) := by + have hlocal (i : A.centers) (x : JetPolynomial.Base) : Tendsto + (fun n => A.tensorEncode (target-inducedTensor (G n)) x i) atTop (𝓝 0) := by + apply tendsto_zero_iff_norm_tendsto_zero.mpr + apply squeeze_zero (fun n => norm_nonneg _) + (fun n => show ‖A.tensorEncode (target-inducedTensor (G n)) x i‖ ≤ + (δ n)^2*(B+‖A.tensorEncode target x i‖) from ?_) + (by simpa only [zero_pow (by decide : 2 ≠ 0),zero_mul] using + (hδ0.pow 2).mul_const (B+‖A.tensorEncode target x i‖)) + have hb := hbound n i x + have hn : ‖A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x i‖ ≤ + B+‖A.tensorEncode target x i‖ := by + calc + _ = ‖(A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x i- + A.tensorEncode target x i)+A.tensorEncode target x i‖ := by rw [sub_add_cancel] + _ ≤ ‖A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x i- + A.tensorEncode target x i‖+‖A.tensorEncode target x i‖ := norm_add_le _ _ + _ ≤ B+‖A.tensorEncode target x i‖ := add_le_add hb le_rfl + have heq := congrArg (fun T => A.tensorEncode T x i) + (square_smul_normalizedTensorDefect target (hδ n) (G n)) + rw [A.tensorEncode_smul] at heq + change (δ n)^2 • A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x i = + A.tensorEncode (target-inducedTensor (G n)) x i at heq + rw [← heq,norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg (δ n))] + exact mul_le_mul_of_nonneg_left hn (sq_nonneg (δ n)) + have ht := A.tensor_tendsto_zero_of_encode hlocal p + have ht' : Tendsto (fun n => (target-inducedTensor (G n)) p : ℕ → TensorFiber) + atTop (𝓝 0) := ht + have hv := ((ContinuousLinearMap.apply ℝ (Plane →L[ℝ] ℝ) (show Plane from v)).continuous.tendsto 0).comp ht' + have hvw := ((ContinuousLinearMap.apply ℝ ℝ (show Plane from w)).continuous.tendsto 0).comp hv + have hmetric : Tendsto (fun n => target p v w- + (target-inducedTensor (G n)) p v w) atTop (𝓝 (target p v w-0)) := + tendsto_const_nhds.sub hvw + convert hmetric using 1 + · ext n + change inner ℝ (mfderiv planeModel spaceModel (G n) p v) + (mfderiv planeModel spaceModel (G n) p w) = + target p v w-(target p v w-inducedTensor (G n) p v w) + rw [sub_sub_cancel] + rfl + · simp + +omit [CompactSpace M] in +/-- The tensor weighted norm used by the correction step supplies the +coordinate bound required for metric convergence. -/ +theorem metric_tendsto_of_normalized_bound + {G : ℕ → M → Space} {δ s : ℕ → ℝ} {B : ℝ} + (target : ∀ p : M, CovariantTwoTensor p) + (hδ : ∀ n, δ n ≠ 0) (hδ0 : Tendsto δ atTop (𝓝 0)) + (hbound : ∀ n, A.TensorWeightedBound (s n) 0 B + (normalizedTensorDefect target (δ n) (G n)-target)) + (p : M) (v w : TangentSpace planeModel p) : + Tendsto (fun n => inner ℝ (mfderiv planeModel spaceModel (G n) p v) + (mfderiv planeModel spaceModel (G n) p w)) atTop (𝓝 (target p v w)) := by + apply A.metric_tendsto_of_normalized_coordinates_bound (B := B) target hδ hδ0 ?_ p v w + intro n i x + have hb := (hbound n i).norm_le (mem_univ x) + change ‖A.tensorEncode (normalizedTensorDefect target (δ n) (G n)-target) x i‖ ≤ B at hb + simpa only [A.tensorEncode_sub,Pi.sub_apply] using hb + +omit [CompactSpace M] in +/-- The encoded zeroth-order invariant of the iteration bounds the normalized +metric defect. -/ +theorem metric_tendsto_of_encoded_normalized_bound + {G : ℕ → M → Space} {δ : ℕ → ℝ} {B : ℝ} + (target : ∀ p : M, CovariantTwoTensor p) + (hδ : ∀ n, δ n ≠ 0) (hδ0 : Tendsto δ atTop (𝓝 0)) + (hbound : ∀ n x, + ‖A.tensorEncode (normalizedTensorDefect target (δ n) (G n)) x- + A.tensorEncode target x‖ ≤ B) + (p : M) (v w : TangentSpace planeModel p) : + Tendsto (fun n => inner ℝ (mfderiv planeModel spaceModel (G n) p v) + (mfderiv planeModel spaceModel (G n) p w)) atTop (𝓝 (target p v w)) := by + apply A.metric_tendsto_of_normalized_coordinates_bound (B := B) target hδ hδ0 ?_ p v w + intro n i x + exact (norm_le_pi_norm _ i).trans (hbound n x) + +/-- Actual atlas correction bounds and bounded normalized defects suffice +for an exact smooth isometric immersion at the series limit. -/ +theorem correction_limit_isometric + {F : M → Space} {U : ℕ → M → Space} {ρ δ s : ℕ → ℝ} {B : ℝ} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hU : ∀ n, ContMDiff planeModel spaceModel ∞ (U n)) + (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, A.WeightedBound 1 m (ρ n) (U n)) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (g : SmoothMetric M) (hδ : ∀ n, δ n ≠ 0) (hδ0 : Tendsto δ atTop (𝓝 0)) + (hdefect : ∀ n, A.TensorWeightedBound (s n) 0 B + (normalizedTensorDefect g.inner (δ n) (manifoldPartialMap F U n)-g.inner)) : + IsSmoothIsometricImmersion M g (manifoldLimitMap F U) := by + obtain ⟨hs,hd⟩ := A.correction_limit hF hU hρ hbound houter + refine ⟨hs,?_⟩ + intro p v w + have hv := ((ContinuousLinearMap.apply ℝ Space (show Plane from v)).continuous.tendsto _).comp (hd p) + have hw := ((ContinuousLinearMap.apply ℝ Space (show Plane from w)).continuous.tendsto _).comp (hd p) + exact tendsto_nhds_unique (hv.inner hw) + (A.metric_tendsto_of_normalized_bound g.inner hδ hδ0 hdefect p v w) + +/-- The stage invariant in encoded tensor coordinates produces the same +isometric limit directly. -/ +theorem correction_limit_isometric_of_encoded_bound + {F : M → Space} {U : ℕ → M → Space} {ρ δ : ℕ → ℝ} {B : ℝ} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hU : ∀ n, ContMDiff planeModel spaceModel ∞ (U n)) + (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, A.WeightedBound 1 m (ρ n) (U n)) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (g : SmoothMetric M) (hδ : ∀ n, δ n ≠ 0) (hδ0 : Tendsto δ atTop (𝓝 0)) + (hdefect : ∀ n x, + ‖A.tensorEncode (normalizedTensorDefect g.inner (δ n) (manifoldPartialMap F U n)) x- + A.tensorEncode g.inner x‖ ≤ B) : + IsSmoothIsometricImmersion M g (manifoldLimitMap F U) := by + obtain ⟨hs,hd⟩ := A.correction_limit hF hU hρ hbound houter + refine ⟨hs,?_⟩ + intro p v w + have hv := ((ContinuousLinearMap.apply ℝ Space (show Plane from v)).continuous.tendsto _).comp (hd p) + have hw := ((ContinuousLinearMap.apply ℝ Space (show Plane from w)).continuous.tendsto _).comp (hd p) + exact tendsto_nhds_unique (hv.inner hw) + (A.metric_tendsto_of_encoded_normalized_bound g.inner hδ hδ0 hdefect p v w) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLowerBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLowerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6c58f55bcfdee1dfdbf600f56881489e98b7687 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricLowerBound.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLinearLowerBound +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionApproximation +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! One lower bound for the coordinate differentials of every immersion +in a fixed C1 neighborhood. The coordinate cores cover the surface. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +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_coordinate_metric_lower_bound {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + ∃ δ c : ℝ, 0 < δ ∧ 0 < c ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → A.WeightedBound 1 1 δ (G-F) → + ∀ i : A.centers, ∀ x ∈ A.coordinateCore i, ∀ v : Base, + c*‖v‖ ≤ ‖fderiv ℝ (A.vectorChartRead i G) x v‖ := by + classical + have hcore (i : A.centers) : A.coordinateCore i ⊆ (A.chartWeightCompact i : Set Base) := by + rintro x ⟨p,hp,rfl⟩ + exact ⟨p,subset_tsupport _ (A.weightCore_nonzero i hp),rfl⟩ + have hdata (i : A.centers) : ∃ c : ℝ, 0 < c ∧ + ∀ x ∈ A.coordinateCore i, ∀ H : Base →L[ℝ] Space, + ‖H-fderiv ℝ (A.vectorChartRead i F) x‖ ≤ c → ∀ v, c*‖v‖ ≤ ‖H v‖ := by + have hcont := ((A.vectorChartRead_smooth i hF).fderiv_right (m := ∞) (by simp)).continuous + obtain ⟨c,hc,hbound⟩ := compact_injective_lower_bound + ((A.coordinateCore_compact i).image hcont) (by + rintro _ ⟨x,hx,rfl⟩ + rw [A.vectorChartRead_fderiv i hF (hcore i hx), + fderiv_comp_chart_symm (hF.of_le (by simp)) (i : M) (A.coordinateCore_target i hx)] + exact (hImm _).comp ((chart_mdifferentiable (i : M)).symm.mfderiv_injective + (A.coordinateCore_target i hx))) + exact ⟨c,hc,fun x hx => hbound _ (mem_image_of_mem _ hx)⟩ + choose c hc hb using hdata + choose R hR hr using fun i : A.centers => A.vectorChartRead_bound (V := Space) i 1 + obtain ⟨δ,hδ,_,hδi⟩ := finite_positive_threshold (fun i => c i/(R i+1)) + (fun i => div_pos (hc i) (by have := hR i; positivity)) + obtain ⟨a,ha,_,hai⟩ := finite_positive_threshold c hc + refine ⟨δ,a,hδ,ha,?_⟩ + intro G hG hclose i x hx v + have hread := hr i (G-F) 1 δ zero_lt_one le_rfl hδ.le (hG.sub hF) hclose + have hd := hread 1 le_rfl x (mem_univ x) + simp only [one_pow,one_mul,iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] at hd + have he : A.vectorChartRead i (G-F) = A.vectorChartRead i G-A.vectorChartRead i F := by + funext y + by_cases hy : y ∈ (chart (i : M)).target <;> + simp [vectorChartRead,localize,hy,smul_sub] + rw [he,fderiv_sub ((A.vectorChartRead_smooth i hG).differentiable (by simp) x) + ((A.vectorChartRead_smooth i hF).differentiable (by simp) x)] at hd + have hsize : R i*δ ≤ c i := by + have hRi := hR i + have he := (le_div_iff₀ (by positivity : 0 < R i+1)).mp (hδi i) + nlinarith + exact (mul_le_mul_of_nonneg_right (hai i) (norm_nonneg v)).trans + (hb i x hx _ (hd.trans hsize) v) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..79251a51e40431ce3ca0fc09f909939b2fce5b85 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricRead.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricChartReconstruction +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! On the active chart locus the local metric is exactly the chart read +of the induced global metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance metricReadExactFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricReadExactFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricReadExactDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricReadExactDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricReadExactSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricReadExactSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma metric_component_on_weight (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {p : M} + (hp : p ∈ tsupport (A.weight i)) : + A.bundleComponent A.tensorTriv i (inducedTensor F) p = + fiberFromThree (RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) := by + have hsource := A.weight_support i hp + let f : Base → TensorFiber := fun y => fiberFromThree + (RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry y)) + have he : A.bundleRestore A.tensorTriv i f p = inducedTensor F p := by + ext v w + rw [A.tensorRestore_apply i f hsource,A.outer_one i p hp,one_mul] + change fiberFromThree + (RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p w) = + inducedForm F p v w + rw [fiberFromThree_apply] + have hd := A.vectorPlaneRead_differential i hF hp + rw [A.plane_chart_differential i hsource] at hd + have hv := congrArg (fun L => L v) hd + have hw := congrArg (fun L => L w) hd + simp only [ContinuousLinearMap.comp_apply] at hv hw + rw [euclidean_metric_coordinate_value (A.vectorPlaneRead i F) + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _)] + exact congrArg₂ (inner ℝ) hv.symm hw.symm + have hc := congrArg ((A.tensorTriv i).continuousLinearMapAt ℝ p) he + simp only [bundleRestore,A.outer_one i p hp,one_smul, + (A.tensorTriv i).continuousLinearMapAt_symmL (A.tensorTriv_domain i hsource)] at hc + exact hc.symm + +lemma metric_read_on_weight (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {x : Base} + (hx : A.chartWeight i x ≠ 0) : + RealModes.realMetricTensor (A.jetChartMap i F ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry x) = A.tensorChartRead i (inducedTensor F) x := by + have hxt : x ∈ (chart (i : M)).target := by + by_contra hn + exact hx (by simp only [chartWeight,indicator_of_notMem hn]) + have hw : A.weight i ((chart (i : M)).symm x) ≠ 0 := by + simpa only [chartWeight,indicator_of_mem hxt] using hx + have hp := subset_tsupport (A.weight i) hw + have hread := A.tensorChartRead_on_weight i (inducedTensor F) hp + rw [(chart (i : M)).right_inv hxt,A.metric_component_on_weight i hF hp, + fiberToThree_fromThree,(chart (i : M)).right_inv hxt] at hread + exact hread.symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricReadGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricReadGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bafc76eebc87a61369bc9d6f9ab037905f16744 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasMetricReadGerms.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasReadGerms +import OAI.Geometry.SurfaceImmersion.Atlas.MetricAtlasReference + +namespace OAI + +/-! A metric atlas reading agrees as a germ with the actual coordinate +metric when the outer cutoff is locally one. This also identifies its +first derivative, as required by the connection estimates. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial PhaseMean +local instance metricReadGermFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricReadGermFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance metricReadGermDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricReadGermDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricReadGermSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricReadGermSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorPlaneRead_metric_outer_one (g : SmoothMetric M) (i : A.centers) + {p : M} (hp : p ∈ (chart (i : M)).source) (ho : A.outer i p = 1) : + A.tensorPlaneRead i g.inner (coordinateChart (i : M) p) = + coordinateMetric g (i : M) (coordinateChart (i : M) p) := by + change A.tensorChartRead i g.inner + (planeCoordinateIsometry.symm (planeCoordinateIsometry (chart (i : M) p))) = _ + rw [LinearIsometryEquiv.symm_apply_apply] + have hread : A.tensorChartRead i g.inner (chart (i : M) p) = + fiberToThree (A.bundleComponent A.tensorTriv i g.inner p) := by + change fiberToThree (localize (i : M) (A.outer i) + (A.bundleComponent A.tensorTriv i g.inner) (chart (i : M) p)) = _ + rw [localize_chart _ _ _ hp,ho] + simp only [one_pow,one_smul] + rw [hread] + ext k + rw [fiberToThree_apply,A.tensorComponent_metric g i hp] + simp only [ContinuousLinearEquiv.apply_symm_apply] + fin_cases k <;> simp [evaluate,firstDirection,secondDirection,SmallModes.dx,SmallModes.dy] + +lemma tensorPlaneRead_metric_germ (g : SmoothMetric M) (i : A.centers) + {p : M} (hp : p ∈ (chart (i : M)).source) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => (1 : ℝ))) : + A.tensorPlaneRead i g.inner =ᶠ[𝓝 (coordinateChart (i : M) p)] coordinateMetric g (i : M) := by + let e := coordinateChart (i : M) + have hps : p ∈ e.source := by simpa only [e,coordinateChart_source,chart_source] using hp + have hpt := e.map_source hps + have ht : Tendsto e.symm (𝓝 (e p)) (𝓝 p) := by + have hc := (e.continuousOn_symm _ hpt).continuousAt (e.open_target.mem_nhds hpt) + simpa only [e.left_inv hps] using hc.tendsto + filter_upwards [e.open_target.mem_nhds hpt,ho.comp_tendsto ht] with y hy hoy + have hq : e.symm y ∈ (chart (i : M)).source := by + simpa only [e,coordinateChart_source,chart_source] using e.map_target hy + have he := A.tensorPlaneRead_metric_outer_one g i hq hoy + change A.tensorPlaneRead i g.inner (e (e.symm y)) = coordinateMetric g (i : M) (e (e.symm y)) at he + simpa only [e.right_inv hy] using he + +lemma tensorPlaneRead_metric_firstJet (g : SmoothMetric M) (i : A.centers) + {p : M} (hp : p ∈ (chart (i : M)).source) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => (1 : ℝ))) : + (A.tensorPlaneRead i g.inner (coordinateChart (i : M) p), + fderiv ℝ (A.tensorPlaneRead i g.inner) (coordinateChart (i : M) p)) = + (coordinateMetric g (i : M) (coordinateChart (i : M) p), + fderiv ℝ (coordinateMetric g (i : M)) (coordinateChart (i : M) p)) := by + have he := A.tensorPlaneRead_metric_germ g i hp ho + exact Prod.ext he.eq_of_nhds he.fderiv_eq + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNearbyPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNearbyPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..4efdeaa5bd2f5bbb1008f612b695176a631d9927 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNearbyPhaseCancellation.lean @@ -0,0 +1,236 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformNearbyPhaseCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! +Atlas cancellation uniform over a neighborhood of a fixed immersion. +The reference geometry, per-chart shifted profiles and finite phase family +determine all constants before the varying map, target or scale is chosen. +-/ + +noncomputable section + +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance nearbyPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance nearbyPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance nearbyPhaseDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance nearbyPhaseDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance nearbyPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance nearbyPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas + +variable (A : SmoothingAtlas M) + +/-- Fixed good-phase geometry gives uniform global cancellation for nearby +maps with the specified shifted derivative profiles at the actual slow scale. -/ +theorem atlas_nearby_phase_cancellation_all_profiles + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + : ∃ ρ : (i : A.centers) → ι i → ℝ, (∀ i j, 0 < ρ i j) ∧ + ∀ (R : A.centers → ℕ → ℝ), (∀ i m, 0 ≤ R i m) → ∀ q : ℕ, + ∃ C D : (i : A.centers) → ι i → ℕ → ℝ, + (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) + (B : (i : A.centers) → ι i → ℝ), + (∀ i j, 0 ≤ B i j) → (∀ i j, B i j < ρ i j) → + (∀ i j, WeightedEstimates.WeightedBound univ 1 2 (B i j) + ((spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F))) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i m l, l ≤ m + 2 → WeightedEstimates.WeightedBound univ 1 l + (R i m / (s : ℝ) ^ (l - 2)) (spaceCoordinates ∘ A.vectorPlaneRead i G)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ / s) ^ (q + 1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + have hlocal (i : A.centers) (j : ι i) := + PhaseGeometry.uniform_nearby_good_phase_cancellation_all_profiles (A.jetChartMap_smooth i hF) + (hφ i j) (modeSupport (K i j)) + (by simpa only [A.jetChartMap_plane] using hImm i j) + (by simpa only [A.jetChartMap_plane] using hgood i j) + choose ρ hρ hall using hlocal + refine ⟨ρ,hρ,?_⟩ + intro R hR q + choose Cv Ct hCv hCt solve using fun i j => hall i j (R i) (hR i) q + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.global_linearized_residual_bound m + refine ⟨fun i j m => Dv m * Cv i j m, fun i j m => Dt m * Ct i j m, + fun i j m => mul_nonneg (hDv m) (hCv i j m), + fun i j m => mul_nonneg (hDt m) (hCt i j m), ?_⟩ + intro G hG B hB hBρ hnear τ s hτ hs hτs hs1 hprefix target + choose X hX hsp hb hr using fun i j => solve i j (A.jetChartMap i G) + (A.jetChartMap_smooth i hG) (B i j) (hB i j) (hBρ i j) + (by simpa only [A.jetChartMap_plane] using hnear i j) τ s hτ hs hτs hs1 + (by simpa only [A.jetChartMap_plane] using hprefix i) (target i j) + let Y : A.centers → RealModes.RField 4 := fun i x => ∑ j, X i j x + have hY (i : A.centers) : ContDiff ℝ ∞ (Y i) := + ContDiff.sum (fun j _ => hX i j) + have hYs (i : A.centers) : tsupport (Y i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + apply closure_minimal _ (modeSupport (A.chartWeightCompact i)).isCompact.isClosed + intro x hx + by_contra hn + apply hx + apply Finset.sum_eq_zero + intro j _ + exact image_eq_zero_of_notMem_tsupport (fun hxj => hn (hK i j (hsp i j hxj))) + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hd (i : A.centers) (j : ι i) : ContDiff ℝ ∞ + (QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) := + contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((hφ i j).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := ContDiff.sum (fun j _ => hd i j) + let v : A.centers → ℕ → ℝ := fun i m => ∑ j, Cv i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) + let t : A.centers → ℕ → ℝ := fun i m => ∑ j, Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) + have hvn (i : A.centers) (m : ℕ) : 0 ≤ v i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCv i j m) (apply_nonneg _ _)) + have htn (i : A.centers) (m : ℕ) : 0 ≤ t i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCt i j m) (apply_nonneg _ _)) + have hsize (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m (v i m) (Y i) := + WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ _ _ + (fun j _ => (hX i j).contDiffOn) (fun j _ => hb i j m) + have hlin (i : A.centers) : + RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) (Y i) = + fun x => ∑ j, RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i G) (X i j) x := by + simpa only [coordinateFullLinearized_unperturbed, A.jetChartMap_plane] using + coordinateFullLinearized_sum emptyMetricPolynomial 0 (A.jetChartMap i G) + Finset.univ (X i) (hX i) + have hres (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m + ((τ / s) ^ (q + 1) * t i m) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) (Y i) + T i) := by + have he : (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) (Y i) + T i) = + fun x => ∑ j, (RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i G) (X i j) x + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x) := by + funext x + rw [Pi.add_apply, hlin] + exact Finset.sum_add_distrib.symm + rw [he] + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ + (fun j => (τ / s) ^ (q + 1) * Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (fun j => RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) (X i j) + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) + (fun j _ => (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)).contDiffOn + (hX i j).contDiffOn).add (hd i j).contDiffOn) + (fun j _ => by simpa only [A.jetChartMap_plane] using hr i j m) + simpa only [t, Finset.mul_sum, mul_assoc, Pi.add_apply] using hsum + refine ⟨A.vectorPlaneRestore Y, A.vectorPlaneRestore_smooth Y hY, ?_, ?_⟩ + · intro m + have hh := hv m Y τ (∑ i, v i m) hτ (hτs.trans hs1) + (Finset.sum_nonneg (fun i _ => hvn i m)) hY + (fun i => (hsize i m).mono_const + (Finset.single_le_sum (fun k _ => hvn k m) (Finset.mem_univ i))) + simpa only [v, Finset.mul_sum, mul_assoc] using hh + · intro m + have hη : 0 ≤ (τ / s) ^ (q + 1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hh := ht m G hG Y hY hYs T hT τ ((τ / s) ^ (q + 1) * ∑ i, t i m) + hτ (hτs.trans hs1) (mul_nonneg hη (Finset.sum_nonneg (fun i _ => htn i m))) + (fun i => (hres i m).mono_const (mul_le_mul_of_nonneg_left + (Finset.single_le_sum (fun k _ => htn k m) (Finset.mem_univ i)) hη)) + have he : Dt m * ((τ / s) ^ (q + 1) * ∑ i, t i m) = + (τ / s) ^ (q + 1) * ∑ i : A.centers, ∑ j, (Dt m * Ct i j m) * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j) := by + calc + _ = (τ / s) ^ (q + 1) * (Dt m * ∑ i, t i m) := by ring + _ = _ := by simp only [t, Finset.mul_sum, mul_assoc] + rw [he] at hh + exact hh + +/-- Fixed good-phase geometry gives uniform global cancellation for nearby +maps with the specified shifted derivative profiles at the actual slow scale. -/ +theorem atlas_nearby_phase_cancellation + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + (R : A.centers → ℕ → ℝ) (hR : ∀ i m, 0 ≤ R i m) (q : ℕ) : + ∃ (ρ : (i : A.centers) → ι i → ℝ) + (C D : (i : A.centers) → ι i → ℕ → ℝ), + (∀ i j, 0 < ρ i j) ∧ (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) + (B : (i : A.centers) → ι i → ℝ), + (∀ i j, 0 ≤ B i j) → (∀ i j, B i j < ρ i j) → + (∀ i j, WeightedEstimates.WeightedBound univ 1 2 (B i j) + ((spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F))) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i m l, l ≤ m + 2 → WeightedEstimates.WeightedBound univ 1 l + (R i m / (s : ℝ) ^ (l - 2)) (spaceCoordinates ∘ A.vectorPlaneRead i G)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ / s) ^ (q + 1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + obtain ⟨ρ,hρ,hall⟩ := A.atlas_nearby_phase_cancellation_all_profiles F hF φ hφ K hK hImm hgood + obtain ⟨C,D,hC,hD,hcancel⟩ := hall R hR q + exact ⟨ρ,C,D,hρ,hC,hD,hcancel⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjection.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjection.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c1a491f09e24d3051d868be074e6a875e5d3dfa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjection.lean @@ -0,0 +1,252 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormal +import OAI.Geometry.SurfaceImmersion.Geometry.VectorPlaneRestore +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.Immersion.ClosedSurface.NormalProjection +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityFrame +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets +import OAI.Geometry.Immersion.ClosedSurface.SecondForms + +namespace OAI + +/-! Project a global ambient field to the normal bundle using the fixed +finite atlas. No orientation or global tangent frame is chosen. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +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 localizedNormalField (i : A.centers) (n : M → Space) : RField 4 := + spaceCoordinates ∘ localize (i : M) (A.weight i) n ∘ planeCoordinateIsometry.symm + +def localProjectedNormal (i : A.centers) (F n : M → Space) : RField 4 := fun x => + realNormalPart + (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (A.localizedNormalField i n x) + +lemma localizedNormalField_smooth (i : A.centers) {n : M → Space} + (hn : ContMDiff planeModel spaceModel ∞ n) : + ContDiff ℝ ∞ (A.localizedNormalField i n) := + spaceCoordinates.contDiff.comp + ((localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hn).comp + planeCoordinateIsometry.symm.contDiff) + +omit [CompactSpace M] in +lemma localizedNormalField_support (i : A.centers) (n : M → Space) : + tsupport (A.localizedNormalField i n) ⊆ tsupport (A.planeWeight i) := by + apply closure_mono + intro x hx + contrapose! hx + apply not_not.mpr + have hw : A.planeWeight i x = 0 := by + simpa only [Function.mem_support,not_not] using hx + clear hx + have hx := hw + dsimp [localizedNormalField] + by_cases hxt : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target + · simp only [planeWeight,chartWeight,Function.comp_apply,indicator_of_mem hxt] at hx + simp [localize,hxt,hx] + · simp [localize,hxt] + +lemma localProjectedNormal_smooth (i : A.centers) {F n : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hn : ContMDiff planeModel spaceModel ∞ n) + (hD : ∀ x ∈ tsupport (A.planeWeight i), + gramDet (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ≠ 0) : + ContDiff ℝ ∞ (A.localProjectedNormal i F n) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport (A.planeWeight i) + · exact contDiffAt_realNormalPart + (contDiff_real_coordDeriv (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) dx).contDiffAt + (contDiff_real_coordDeriv (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) dy).contDiffAt + (A.localizedNormalField_smooth i hn).contDiffAt (hD x hx) + · have hz : A.localizedNormalField i n =ᶠ[𝓝 x] 0 := + notMem_tsupport_iff_eventuallyEq.mp (fun hs => hx (A.localizedNormalField_support i n hs)) + apply (contDiffAt_const (c := (0 : RVec 4))).congr_of_eventuallyEq + filter_upwards [hz] with y hy + simp [localProjectedNormal,hy,realNormalPart] + +def projectedNormalField (F n : M → Space) : M → Space := + A.vectorPlaneRestore (fun i => spaceCoordinates.symm ∘ A.localProjectedNormal i F n) + +lemma projectedNormalField_smooth {F n : M → Space} + (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) : + ContMDiff planeModel spaceModel ∞ (A.projectedNormalField F n) := + A.vectorPlaneRestore_smooth _ (fun i => spaceCoordinates.symm.contDiff.comp + (A.localProjectedNormal_smooth i hF hn (hD i))) + +omit [CompactSpace M] in +lemma localProjectedNormal_zero (i : A.centers) (F n : M → Space) {x : SmallModes.Base} + (hx : A.planeWeight i x = 0) : A.localProjectedNormal i F n x = 0 := by + have hz : A.localizedNormalField i n x = 0 := by + dsimp [localizedNormalField] + by_cases hxt : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target + · simp only [planeWeight,chartWeight,Function.comp_apply,indicator_of_mem hxt] at hx + simp [localize,hxt,hx] + · simp [localize,hxt] + simp [localProjectedNormal,hz,realNormalPart] + +lemma vectorPlaneRead_fderiv_at_weight (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {p : M} (hp : p ∈ tsupport (A.weight i)) : + fderiv ℝ (A.vectorPlaneRead i F) (planeCoordinateIsometry (chart (i : M) p)) = + (mfderiv planeModel spaceModel F p).comp + ((mfderiv 𝓘(ℝ,JetPolynomial.Base) planeModel (chart (i : M)).symm + (chart (i : M) p)).comp planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap) := by + have hs := A.weight_support i hp + unfold vectorPlaneRead + rw [fderiv_comp _ ((A.vectorChartRead_smooth i hF).differentiable (by simp) _) + planeCoordinateIsometry.symm.differentiableAt] + simp only [LinearIsometryEquiv.symm_apply_apply,planeCoordinateIsometry.symm.fderiv] + rw [A.vectorChartRead_fderiv i hF ⟨p,hp,rfl⟩, + fderiv_comp_chart_symm (hF.of_le (by simp)) (i : M) ((chart (i : M)).map_source hs), + (chart (i : M)).left_inv hs] + rfl + +lemma vectorPlaneRead_normal (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : M → Space) + (hn : ∀ p v, inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (n p) = 0) + {p : M} (hp : p ∈ tsupport (A.weight i)) (u : SmallModes.Base) : + coordDeriv u (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)) ⬝ᵥ spaceCoordinates (n p) = 0 := by + rw [coordDeriv,fderiv_comp _ spaceCoordinates.differentiableAt + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _),spaceCoordinates.fderiv, + ContinuousLinearMap.comp_apply,A.vectorPlaneRead_fderiv_at_weight i hF hp] + change spaceCoordinates (surfaceDifferential F p _) ⬝ᵥ spaceCoordinates (n p) = 0 + rw [spaceCoordinates_dot] + exact hn p _ + +lemma localProjectedNormal_normal (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : M → Space) + (p : M) (hp : p ∈ tsupport (A.weight i)) + (hD : 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) + (v : TangentSpace planeModel p) : + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) + (spaceCoordinates.symm (A.localProjectedNormal i F n + (planeCoordinateIsometry (chart (i : M) p)))) = 0 := by + let x := planeCoordinateIsometry (chart (i : M) p) + let u := planeCoordinateIsometry (surfaceDifferential (chart (i : M)) p v) + have hd := congrArg (fun L : TangentSpace planeModel p →L[ℝ] Space => L v) + (A.vectorPlaneRead_differential i hF hp) + simp only [ContinuousLinearMap.comp_apply] at hd + have hc := fderiv_comp x spaceCoordinates.differentiableAt + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) x) + have hpj := realNormalPart_perp + (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (A.localizedNormalField i n x) hD + rw [← spaceCoordinates_dot,ContinuousLinearEquiv.apply_symm_apply] + change spaceCoordinates (surfaceDifferential F p v) ⬝ᵥ _ = 0 + rw [hd] + change spaceCoordinates (fderiv ℝ (A.vectorPlaneRead i F) x u) ⬝ᵥ + A.localProjectedNormal i F n x = 0 + have heval : coordDeriv u (spaceCoordinates ∘ A.vectorPlaneRead i F) x = + spaceCoordinates (fderiv ℝ (A.vectorPlaneRead i F) x u) := by + rw [coordDeriv,hc,spaceCoordinates.fderiv] + rfl + rw [← heval,coordDeriv_eq_basis] + simp only [add_dotProduct,smul_dotProduct,localProjectedNormal,hpj.1,hpj.2, + smul_eq_mul,mul_zero,add_zero] + +lemma projectedNormalField_normal {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : M → Space) + (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) + (p : M) (v : TangentSpace planeModel p) : + inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (A.projectedNormalField F n p) = 0 := by + classical + change inner ℝ (surfaceDifferential F p v) (A.projectedNormalField F n p) = 0 + unfold projectedNormalField vectorPlaneRestore + rw [Finset.sum_apply,inner_sum] + apply Finset.sum_eq_zero + intro i _ + by_cases hz : A.weight i p = 0 + · by_cases hs : p ∈ (chart (i : M)).source + · have hx : A.planeWeight i (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + simp [planeWeight,chartWeight,(chart (i : M)).map_source hs, + (chart (i : M)).left_inv hs,hz] + simp [restore,hs,A.localProjectedNormal_zero i F n hx] + · simp [restore,hs] + · have hp := subset_tsupport (A.weight i) hz + have hs := A.weight_support i hp + have hx : planeCoordinateIsometry (chart (i : M) p) ∈ tsupport (A.planeWeight i) := by + apply subset_tsupport + simpa [planeWeight,chartWeight,(chart (i : M)).map_source hs, + (chart (i : M)).left_inv hs] using hz + simp only [restore,indicator_of_mem hs,Function.comp_apply,real_inner_smul_right] + have hn := A.localProjectedNormal_normal i hF n p hp (hD i _ hx) v + change inner ℝ (surfaceDifferential F p v) + (spaceCoordinates.symm (A.localProjectedNormal i F n + (planeCoordinateIsometry (chart (i : M) p)))) = 0 at hn + rw [hn,mul_zero] + +lemma projectedNormalField_fixed {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : M → Space) + (hn : ∀ p v, inner ℝ (show Space from mfderiv planeModel spaceModel F p v) (n p) = 0) : + A.projectedNormalField F n = n := by + funext p + have he (i : A.centers) : + restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ A.localProjectedNormal i F n) ∘ planeCoordinateIsometry) p = + (A.weight i p)^2 • n p := by + by_cases hs : p ∈ (chart (i : M)).source + · simp only [restore,indicator_of_mem hs,Function.comp_apply] + by_cases hz : A.weight i p = 0 + · have hx : A.planeWeight i (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + simp [planeWeight,chartWeight,(chart (i : M)).map_source hs, + (chart (i : M)).left_inv hs,hz] + simp [A.localProjectedNormal_zero i F n hx,hz] + · have hp := subset_tsupport (A.weight i) hz + rw [A.outer_one i p hp,one_smul] + have hL : A.localizedNormalField i n (planeCoordinateIsometry (chart (i : M) p)) = + (A.weight i p)^2 • spaceCoordinates (n p) := by + simp [localizedNormalField,localize,(chart (i : M)).map_source hs, + (chart (i : M)).left_inv hs] + rw [localProjectedNormal,hL,(realNormalPart_linear _ _).map_smul, + realNormalPart_of_perp _ _ _ (A.vectorPlaneRead_normal i hF n hn hp dx) + (A.vectorPlaneRead_normal i hF n hn hp dy),map_smul, + ContinuousLinearEquiv.symm_apply_apply] + · have hz : A.weight i p = 0 := image_eq_zero_of_notMem_tsupport + (fun hp => hs (A.weight_support i hp)) + simp [restore,hs,hz] + simp only [projectedNormalField,vectorPlaneRestore,Finset.sum_apply,he, + ← Finset.sum_smul,A.partition,one_smul] + +/-- Normalize the actual global normal projection wherever it is nonzero. -/ +def projectedPreferredNormal {F n : M → Space} + (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, A.projectedNormalField F n p ≠ 0) : PreferredNormal F where + vector p := ‖A.projectedNormalField F n p‖⁻¹ • A.projectedNormalField F n p + smooth := by + have hP := A.projectedNormalField_smooth hF hn hD + intro p + have hi := ((contDiffAt_norm ℝ (n := (∞ : ℕ∞ω)) (hne p)).inv + (norm_ne_zero_iff.mpr (hne p))).contMDiffAt.comp p (hP p) + exact hi.smul (hP p) + unit p := by + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_norm,inv_mul_cancel₀ (norm_ne_zero_iff.mpr (hne p))] + normal p v := by + rw [real_inner_smul_right,A.projectedNormalField_normal hF n hD p v,mul_zero] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjectionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjectionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..88aba3130f467e9915b654c9bca433ebf3e31be5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalProjectionBounds.lean @@ -0,0 +1,165 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalProjection +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorNormalProjection + +namespace OAI + +/-! The atlas projection is a convex sum of the actual pointwise normal +projections. Local exterior estimates therefore pass to the global field. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SmallModes NormalFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def chartProjectedNormal (i : A.centers) (F n : M → Space) (p : M) : Space := + spaceCoordinates.symm (realNormalPart + (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) (spaceCoordinates (n p))) + +lemma localizedNormalField_at_source (i : A.centers) (n : M → Space) {p : M} + (hp : p ∈ (chart (i : M)).source) : + A.localizedNormalField i n (planeCoordinateIsometry (chart (i : M) p)) = + (A.weight i p)^2 • spaceCoordinates (n p) := by + simp [localizedNormalField,localize,(chart (i : M)).map_source hp, + (chart (i : M)).left_inv hp] + +lemma restored_localProjectedNormal (i : A.centers) (F n : M → Space) (p : M) : + restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ A.localProjectedNormal i F n) ∘ planeCoordinateIsometry) p = + (A.weight i p)^2 • A.chartProjectedNormal i F n p := by + by_cases hs : p ∈ (chart (i : M)).source + · simp only [restore,indicator_of_mem hs,Function.comp_apply] + by_cases hz : A.weight i p = 0 + · have hx : A.planeWeight i (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + simp [planeWeight,chartWeight,(chart (i : M)).map_source hs, + (chart (i : M)).left_inv hs,hz] + simp [A.localProjectedNormal_zero i F n hx,hz] + · have hp := subset_tsupport (A.weight i) hz + rw [A.outer_one i p hp,one_smul,localProjectedNormal, + A.localizedNormalField_at_source i n hs,(realNormalPart_linear _ _).map_smul, + map_smul] + rfl + · have hz : A.weight i p = 0 := image_eq_zero_of_notMem_tsupport + (fun hp => hs (A.weight_support i hp)) + simp [restore,hs,hz] + +lemma projectedNormalField_eq_sum (F n : M → Space) (p : M) : + A.projectedNormalField F n p = + ∑ i : A.centers, (A.weight i p)^2 • A.chartProjectedNormal i F n p := by + unfold projectedNormalField vectorPlaneRestore + rw [Finset.sum_apply] + apply Finset.sum_congr rfl + intro i _ + exact A.restored_localProjectedNormal i F n p + +lemma projectedNormalField_sub_eq (F n : M → Space) (p : M) : + A.projectedNormalField F n p - n p = + ∑ i : A.centers, (A.weight i p)^2 • (A.chartProjectedNormal i F n p - n p) := by + rw [A.projectedNormalField_eq_sum] + simp only [smul_sub,Finset.sum_sub_distrib,← Finset.sum_smul,A.partition,one_smul] + +/-- A local exterior error is not multiplied by the number of atlas +patches: the squared weights add to one. -/ +theorem projectedNormalField_sub_bound (F n : M → Space) (p : M) {ε : ℝ} + (hlocal : ∀ i : A.centers, A.weight i p ≠ 0 → + ‖A.chartProjectedNormal i F n p - n p‖ ≤ ε) : + ‖A.projectedNormalField F n p - n p‖ ≤ ε := by + rw [A.projectedNormalField_sub_eq] + calc + _ ≤ ∑ i : A.centers, ‖(A.weight i p)^2 • (A.chartProjectedNormal i F n p - n p)‖ := + norm_sum_le _ _ + _ ≤ ∑ i : A.centers, (A.weight i p)^2 * ε := by + apply Finset.sum_le_sum + intro i _ + by_cases hz : A.weight i p = 0 + · simp [hz] + · rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)] + exact mul_le_mul_of_nonneg_left (hlocal i hz) (sq_nonneg _) + _ = ε := by rw [← Finset.sum_mul,A.partition,one_mul] + +lemma projectedNormalField_ne_zero (F n : M → Space) (p : M) + (hn : ‖n p‖ = 1) (hclose : ‖A.projectedNormalField F n p - n p‖ < 1) : + A.projectedNormalField F n p ≠ 0 := by + intro hz + simp [hz,hn] at hclose + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +namespace ClosedSurfaceR4.GeometryPreservation +open RealModes NormalFrame VelocityFrame + +/-- Uniform stability of the unnormalized projection on a compact family +of old tangent frames. This is the estimate used before normalizing the +finite-atlas sum. -/ +theorem compact_raw_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)-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 he (x : X) : profileNormalPart (J x) = n x := + realNormalPart_of_perp _ _ _ (hAn x) (hBn x) + have hreg : Set.range J ⊆ regularBoundaryProfiles := by + rintro _ ⟨x,rfl⟩ + refine ⟨hD x,?_⟩ + rw [he] + intro hz + have hh := hunit x + norm_num [hz] at hh + have hK := isCompact_range hJ + obtain ⟨r,hr,hsub⟩ := hK.exists_cthickening_subset_open isOpen_regularBoundaryProfiles hreg + have hc : ContinuousOn profileNormalPart (Metric.cthickening r (Set.range J)) := + fun H hH => (contDiffAt_profileNormalPart (hsub hH).1).continuousAt.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 A' B' hA' hB' + let H : BoundaryProfile := ![A',B',n x,0,0] + have herr : ‖H-J x‖ < min r d := 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') + have hH : H ∈ Metric.cthickening r (Set.range J) := + Metric.thickening_subset_cthickening r (Set.range J) + (Metric.mem_thickening_iff.mpr ⟨J x,mem_range_self x,by + simpa only [dist_eq_norm] using herr.trans_le (min_le_left r d)⟩) + have hJ' : J x ∈ Metric.cthickening r (Set.range J) := + Metric.self_subset_cthickening (Set.range J) (mem_range_self x) + have hh := hclose H hH (J x) hJ' (by + simpa only [dist_eq_norm] using herr.trans_le (min_le_right r d)) + refine ⟨(hsub hH).1,?_⟩ + change ‖profileNormalPart H-n x‖ < ε + simpa only [dist_eq_norm,he] using hh + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2c184d3292ddca82f42caf77013ec656919252c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationBounds.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SafeRadialNormalization +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! A fixed C2 atlas budget for radial normalization. A smooth extension +through zero is used only outside the region contributing to localization. -/ +noncomputable section +open Set Metric Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets 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 normalized_localization_eq (i : A.centers) (H : M → Space) + (hH : ∀ p, (1/2 : ℝ) ≤ ‖H p‖) : + localize (i : M) (A.weight i) (radialNormalize ∘ H) = + fun x => (A.chartWeight i x)^2 • safeRadialNormalize (A.vectorChartRead i H x) := by + funext x + by_cases hx : x ∈ (chart (i : M)).target + · by_cases hw : A.weight i ((chart (i : M)).symm x) = 0 + · simp [localize,chartWeight,hx,hw] + · have hp := subset_tsupport (A.weight i) hw + have ho := A.outer_one i _ hp + simp only [vectorChartRead,localize,chartWeight,indicator_of_mem hx,ho,one_pow,one_smul, + Function.comp_apply] + rw [safeRadialNormalize_eq (hH _)] + · simp [localize,chartWeight,hx] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma radial_normalization_smooth {H : M → Space} + (hH : ContMDiff planeModel spaceModel ∞ H) (hb : ∀ p, (1/2 : ℝ) ≤ ‖H p‖) : + ContMDiff planeModel spaceModel ∞ (radialNormalize ∘ H) := by + have he : radialNormalize ∘ H = safeRadialNormalize ∘ H := by + funext p + exact (safeRadialNormalize_eq (hb p)).symm + rw [he] + exact safeRadialNormalize_smooth.contMDiff.comp hH + +lemma chartWeight_square_compact (i : A.centers) : + HasCompactSupport (fun x => (A.chartWeight i x)^2) := by + have hw : HasCompactSupport (A.chartWeight i) := + (A.chartWeightCompact i).isCompact.of_isClosed_subset (isClosed_tsupport _) + (A.supportedChartWeight i).tsupport_subset + apply hw.of_isClosed_subset (isClosed_tsupport _) + apply closure_mono + intro x hx hz + exact hx (by simp [hz]) + +lemma exists_weighted_bound (m : ℕ) {H : M → Space} + (hH : ContMDiff planeModel spaceModel ∞ H) : + ∃ C : ℝ, 0 ≤ C ∧ A.WeightedBound 1 m C H := by + classical + choose C hC hb using fun i : A.centers => compact_smooth_bound + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hH) + (localize_compact (i : M) (A.weight_support i) H) m + exact ⟨∑ i, C i,Finset.sum_nonneg (fun i _ => hC i),fun i => + (hb i).mono_const (Finset.single_le_sum (fun j _ => hC j) (Finset.mem_univ i))⟩ + +theorem radial_normalization_C2_budget (C : ℝ) (hC : 1 ≤ C) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ H : M → Space, + ContMDiff planeModel spaceModel ∞ H → (∀ p, (1/2 : ℝ) ≤ ‖H p‖) → + A.WeightedBound 1 2 C H → A.WeightedBound 1 2 D (radialNormalize ∘ H) := by + classical + have hlocal (i : A.centers) : ∃ D : ℝ, 0 ≤ D ∧ ∀ H : M → Space, + ContMDiff planeModel spaceModel ∞ H → (∀ p, (1/2 : ℝ) ≤ ‖H p‖) → + A.WeightedBound 1 2 C H → WeightedEstimates.WeightedBound univ 1 2 D + (localize (i : M) (A.weight i) (radialNormalize ∘ H)) := by + obtain ⟨R,hR,hr⟩ := A.vectorChartRead_bound (V := Space) i 2 + let E := max 1 (R*C) + have hE : 1 ≤ E := le_max_left _ _ + obtain ⟨B,hB,hb⟩ := compact_coefficient_bound uniqueDiffOn_univ + (isCompact_closedBall (0 : Space) E) (subset_univ _) + safeRadialNormalize_smooth.contDiffOn 2 + obtain ⟨W,hW,hw⟩ := compact_smooth_bound ((A.chartWeight_smooth i).pow 2) + (A.chartWeight_square_compact i) 2 + refine ⟨4*W*(2*B*E^2),by positivity,?_⟩ + intro H hH hnorm hHC + have hread : WeightedEstimates.WeightedBound univ 1 2 E (A.vectorChartRead i H) := + (hr H 1 C zero_lt_one le_rfl (zero_le_one.trans hC) hH hHC).mono_const (le_max_right _ _) + have hcomp := hread.comp uniqueDiffOn_univ uniqueDiffOn_univ zero_lt_one hE + (zero_le_one.trans hB) (A.vectorChartRead_smooth i hH).contDiffOn + safeRadialNormalize_smooth.contDiffOn (fun _ _ => mem_univ _) (by + intro j hj x hx + apply hb j hj (A.vectorChartRead i H x) + simpa only [mem_closedBall,dist_zero_right] using hread.norm_le (mem_univ x)) + rw [A.normalized_localization_eq i H hnorm] + convert hw.smul_real uniqueDiffOn_univ zero_le_one hW (by positivity) + ((A.chartWeight_smooth i).pow 2).contDiffOn + (safeRadialNormalize_smooth.comp (A.vectorChartRead_smooth i hH)).contDiffOn hcomp using 1 <;> norm_num + choose D hD hd using hlocal + refine ⟨∑ i, D i,Finset.sum_nonneg (fun i _ => hD i),?_⟩ + intro H hH hnorm hb i + exact (hd i H hH hnorm hb).mono_const + (Finset.single_le_sum (fun j _ => hD j) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5b8cd95181471bdd492701ace85a30d1257c42c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasNormalizationStability.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalizationBounds +import OAI.Geometry.SurfaceImmersion.Geometry.SafeNormalizationStability +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasUniformNorm +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! Small C1 perturbations of a spherical immersion remain small after +normalization, in the same fixed atlas norm. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SphericalJets 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 normalized_difference_localization (i : A.centers) (F Q : M → Space) + (hF : ∀ p, ‖F p‖ = 1) (hH : ∀ p, (1/2 : ℝ) ≤ ‖F p+Q p‖) : + localize (i : M) (A.weight i) (radialNormalize ∘ (F+Q)-F) = + fun x => (A.chartWeight i x)^2 • + (safeRadialNormalize (A.vectorChartRead i F x+A.vectorChartRead i Q x)- + safeRadialNormalize (A.vectorChartRead i F x)) := by + have he : radialNormalize ∘ F = F := by + funext p + simp [Function.comp_apply,radialNormalize,hF p] + have heF := A.normalized_localization_eq i F (fun p => by rw [hF]; norm_num) + rw [he] at heF + have heH := A.normalized_localization_eq i (F+Q) hH + have heR : A.vectorChartRead i (F+Q) = A.vectorChartRead i F+A.vectorChartRead i Q := + localize_add _ _ _ _ + have hs : localize (i : M) (A.weight i) (radialNormalize ∘ (F+Q)-F) = + localize (i : M) (A.weight i) (radialNormalize ∘ (F+Q)) - localize (i : M) (A.weight i) F := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> simp [localize,hx,smul_sub] + rw [hs,heH,heF,heR] + funext x + simp only [Pi.sub_apply,Pi.add_apply,smul_sub] + +omit [CompactSpace M] in +lemma weighted_perturbation_annulus {F Q : M → Space} (hF : ∀ p, ‖F p‖ = 1) + {δ : ℝ} (hδ : (Fintype.card A.centers : ℝ)*δ ≤ 1/2) + (hb : A.WeightedBound 1 1 δ Q) : ∀ p, (1/2 : ℝ) ≤ ‖F p+Q p‖ := by + intro p + have h0 : A.WeightedBound 1 0 δ Q := fun i => (hb i).mono_order (by omega) + have hn := (A.weightedBound_uniform_norm h0 p).trans hδ + have he : F p = (F p+Q p)-Q p := by abel + have ht := norm_sub_le (F p+Q p) (Q p) + rw [← he,hF] at ht + linarith + +theorem radial_normalization_C1_stability {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ Q : M → Space, ContMDiff planeModel spaceModel ∞ Q → + A.WeightedBound 1 1 δ Q → + (∀ p, (1/2 : ℝ) ≤ ‖F p+Q p‖) ∧ + A.WeightedBound 1 1 ε (radialNormalize ∘ (F+Q)-F) := by + classical + have hlocal (i : A.centers) : ∃ δ : ℝ, 0 < δ ∧ ∀ Q : M → Space, + ContMDiff planeModel spaceModel ∞ Q → A.WeightedBound 1 1 δ Q → + (∀ p, (1/2 : ℝ) ≤ ‖F p+Q p‖) → + WeightedEstimates.WeightedBound univ 1 1 ε + (localize (i : M) (A.weight i) (radialNormalize ∘ (F+Q)-F)) := by + obtain ⟨W,hW,hw⟩ := compact_smooth_bound ((A.chartWeight_smooth i).pow 2) + (A.chartWeight_square_compact i) 1 + obtain ⟨C,hC,hCbound⟩ := compact_smooth_bound (A.vectorChartRead_smooth i hF) + (localize_compact (i : M) (A.outer_support i) F) 1 + obtain ⟨η,hη,hstab⟩ := safe_normalization_C1_stability (A.vectorChartRead i F) + (A.vectorChartRead_smooth i hF) C hC hCbound + (div_pos hε (by positivity : 0 < 2*(W+1))) + obtain ⟨R,hR,hr⟩ := A.vectorChartRead_bound (V := Space) i 1 + refine ⟨η/(R+1),div_pos hη (by positivity),?_⟩ + intro Q hQ hb hnorm + have hread : WeightedEstimates.WeightedBound univ 1 1 η (A.vectorChartRead i Q) := by + apply (hr Q 1 (η/(R+1)) zero_lt_one le_rfl (by positivity) hQ hb).mono_const + have : R*(η/(R+1)) ≤ (R+1)*(η/(R+1)) := by gcongr; linarith + have he : (R+1)*(η/(R+1)) = η := by field_simp + rwa [he] at this + have hc := hstab (A.vectorChartRead i Q) (A.vectorChartRead_smooth i hQ) hread + rw [A.normalized_difference_localization i F Q hunit hnorm] + apply (hw.smul_real uniqueDiffOn_univ zero_le_one hW (by positivity) + ((A.chartWeight_smooth i).pow 2).contDiffOn + ((safeRadialNormalize_smooth.comp ((A.vectorChartRead_smooth i hF).add + (A.vectorChartRead_smooth i hQ))).sub + (safeRadialNormalize_smooth.comp (A.vectorChartRead_smooth i hF))).contDiffOn hc).mono_const + have he : 2*W*(ε/(2*(W+1))) ≤ 2*(W+1)*(ε/(2*(W+1))) := by gcongr; linarith + simpa only [pow_one,mul_div_cancel₀ ε (by positivity : 2*(W+1) ≠ 0)] using he + choose d hd hdb using hlocal + obtain ⟨δ₁,hδ₁,_,hδ₁i⟩ := finite_positive_threshold d hd + let δ := min (1/(2*((Fintype.card A.centers : ℝ)+1))) δ₁ + have hδ : 0 < δ := lt_min (by positivity) hδ₁ + have hδi (i : A.centers) : δ ≤ d i := (min_le_right _ _).trans (hδ₁i i) + refine ⟨δ,hδ,?_⟩ + intro Q hQ hb + have hnorm : ∀ p, (1/2 : ℝ) ≤ ‖F p+Q p‖ := by + apply A.weighted_perturbation_annulus hunit _ hb + have hδ0 : δ ≤ 1/(2*((Fintype.card A.centers : ℝ)+1)) := min_le_left _ _ + have hh := (le_div_iff₀ (by positivity : 0 < 2*((Fintype.card A.centers : ℝ)+1))).mp hδ0 + have hn : 0 ≤ (Fintype.card A.centers : ℝ) := by positivity + nlinarith + exact ⟨hnorm,fun i => hdb i Q hQ (fun j => (hb j).mono_const (hδi i)) hnorm⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterDomains.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d73cf31e1df6a7490a5a21a80f946ae578da293 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterDomains.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Bounded open coordinate domains containing every outer cutoff support. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold 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) + +theorem exists_outer_domains : + ∃ (U : A.centers → Set JetPolynomial.Base) (K : A.centers → Compacts JetPolynomial.Base), + (∀ i, IsOpen (U i)) ∧ (∀ i, U i ⊆ K i) ∧ + (∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U i) ∧ + (∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) := by + classical + have hc (i : A.centers) : IsCompact ((chart (i : M)) '' tsupport (A.outer i)) := + (isClosed_tsupport (A.outer i)).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (A.outer_support i)) + choose U hU hKU hUc _ using fun i => CollarVelocity.compact_open_thickening + (hc i) isOpen_univ (subset_univ _) + refine ⟨U,fun i => ⟨closure (U i),hUc i⟩,hU,fun _ => subset_closure,?_,hKU⟩ + intro i x hx + obtain ⟨p,hp,rfl⟩ := hx + apply hKU i + refine ⟨p,subset_tsupport (A.outer i) ?_,rfl⟩ + change A.outer i p ≠ 0 + rw [A.outer_one i p hp] + exact one_ne_zero + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterPlateau.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterPlateau.lean new file mode 100644 index 0000000000000000000000000000000000000000..8989fe14e558df9a4d01443c977ec9a52afb32db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasOuterPlateau.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PrescribedAtlasPatch + +namespace OAI + +/-! Enlarge one outer cutoff's plateau without changing any partition +weight or coordinate chart. -/ +noncomputable section +open Set Filter Function Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem enlarge_outer_plateau (i : A.centers) {K : Set M} + (hK : IsCompact K) (hKs : K ⊆ (chart (i : M)).source) + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) : + ∃ B : SmoothingAtlas M, ∃ hcenters : B.centers = A.centers, + (∀ j p, B.weight (hcenters.symm ▸ j) p = A.weight j p) ∧ + (∀ j p, p ∈ tsupport (B.weight j) → B.outer j =ᶠ[𝓝 p] (fun _ => 1)) ∧ + ∀ p ∈ K, B.outer (hcenters.symm ▸ i) =ᶠ[𝓝 p] (fun _ => 1) := by + classical + obtain ⟨W,hW,hKW,hWs⟩ := hK.exists_isOpen_closure_subset + ((chart (i : M)).open_source.mem_nhdsSet.mpr hKs) + obtain ⟨O,hO,hKO,hOW⟩ := hK.exists_isOpen_closure_subset (hW.mem_nhdsSet.mpr hKW) + obtain ⟨β,hβ,_,hβs,hβone⟩ := exists_contMDiff_support_eq_eq_one_iff + (I := planeModel) (n := (⊤ : ℕ∞)) hW isClosed_closure hOW + have hβsupport : tsupport β ⊆ (chart (i : M)).source := by + change closure (support β) ⊆ _ + rw [hβs] + exact hWs + have hβgerm : ∀ p ∈ K, β =ᶠ[𝓝 p] (fun _ => 1) := by + intro p hp + filter_upwards [hO.mem_nhds (hKO hp)] with y hy + exact (hβone y).mp (subset_closure hy) + let outer : A.centers → M → ℝ := fun j => + if j = i then fun p => A.outer j p + β p - A.outer j p * β p else A.outer j + have hsmooth (j : A.centers) : ContMDiff planeModel 𝓘(ℝ) ∞ (outer j) := by + by_cases hj : j = i + · have he : outer j = (A.outer j + β) - A.outer j * β := by funext p; simp [outer,hj] + rw [he] + exact ((A.outer_smooth j).add hβ).sub ((A.outer_smooth j).mul hβ) + · simpa only [outer,ite_eq_right hj] using A.outer_smooth j + have hsupp (j : A.centers) : tsupport (outer j) ⊆ (chart (j : M)).source := by + by_cases hj : j = i + · subst j + apply subset_trans (b := tsupport (A.outer i) ∪ tsupport β) ?_ + (union_subset (A.outer_support i) hβsupport) + apply closure_minimal _ ((isClosed_tsupport (A.outer i)).union (isClosed_tsupport β)) + · intro p hp + by_contra hh + have ho : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport (fun ho => hh (Or.inl ho)) + have hb : β p = 0 := image_eq_zero_of_notMem_tsupport (fun hb => hh (Or.inr hb)) + apply hp + simp [outer,ho,hb] + · simpa only [outer,ite_eq_right hj] using A.outer_support j + have hgerm (j : A.centers) (p : M) (hp : p ∈ tsupport (A.weight j)) : + outer j =ᶠ[𝓝 p] (fun _ => 1) := by + filter_upwards [houter j p hp] with x hx + by_cases hj : j = i + · subst j; simp [outer,hx] + · simp [outer,hj,hx] + let B : SmoothingAtlas M := ⟨A.centers,A.weight,outer,A.weight_smooth,A.weight_support, + hsmooth,hsupp,fun j p hp => (hgerm j p hp).eq_of_nhds,A.partition⟩ + refine ⟨B,rfl,fun _ _ => rfl,hgerm,?_⟩ + intro p hp + filter_upwards [hβgerm p hp] with x hx + change outer i x = 1 + simp [outer,hx] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseCatalog.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseCatalog.lean new file mode 100644 index 0000000000000000000000000000000000000000..66a55b9d09262c29c9cfe494fca112636a987c02 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseCatalog.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Atlas.QuadraticPhaseCatalog + +namespace OAI + +/-! Fixed finite catalogs for the actual restored global grid phases and +their readings in every atlas chart. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold BigOperators +namespace ClosedSurfaceR4.PhaseGeometry + +def weightedCovectorCatalog (P : Finset PhaseBasis) (W : Finset ℝ) : + Finset SmallModes.Base := by + classical + exact P.biUnion fun Q => W.biUnion fun w => Finset.univ.image (fun j : Fin 3 => w • Q.ξ j) + +lemma mem_weightedCovectorCatalog (P : Finset PhaseBasis) (W : Finset ℝ) + {Q : PhaseBasis} (hQ : Q ∈ P) {w : ℝ} (hw : w ∈ W) (j : Fin 3) : + w • Q.ξ j ∈ weightedCovectorCatalog P W := by + classical + exact Finset.mem_biUnion.mpr ⟨Q,hQ,Finset.mem_biUnion.mpr + ⟨w,hw,Finset.mem_image.mpr ⟨j,Finset.mem_univ _,rfl⟩⟩⟩ + +end ClosedSurfaceR4.PhaseGeometry +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def linearPhaseCatalog (V : Finset SmallModes.Base) : Finset (M → ℝ) := by + classical + exact Finset.univ.biUnion fun i : A.centers => V.image fun v => + restore (i : M) (A.outer i) (phaseLinear v ∘ planeCoordinateIsometry) + +lemma restored_linear_phase_mem_catalog (V : Finset SmallModes.Base) + (i : A.centers) {v : SmallModes.Base} (hv : v ∈ V) : + restore (i : M) (A.outer i) (phaseLinear v ∘ planeCoordinateIsometry) ∈ + A.linearPhaseCatalog V := by + classical + exact Finset.mem_biUnion.mpr ⟨i,Finset.mem_univ _,Finset.mem_image.mpr ⟨v,hv,rfl⟩⟩ + +lemma linearPhaseCatalog_smooth (V : Finset SmallModes.Base) : + ∀ f ∈ A.linearPhaseCatalog V, ContMDiff planeModel 𝓘(ℝ) ∞ f := by + classical + intro f hf + obtain ⟨i,_,hi⟩ := Finset.mem_biUnion.mp hf + obtain ⟨v,_,rfl⟩ := Finset.mem_image.mp hi + exact restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((phaseLinear v).contDiff.comp planeCoordinateIsometry.contDiff) + +lemma finiteGlobalPhase_mem_catalog (V : Finset SmallModes.Base) + {ι : A.centers → Type*} (φ : ∀ i, ι i → JetPolynomial.Base → ℝ) + (i : A.centers) (j : ι i) {v : SmallModes.Base} (hv : v ∈ V) + (hφ : coordinatePhase (φ i j) = phaseLinear v) : + A.finiteGlobalPhase (φ := φ) i j ∈ A.linearPhaseCatalog V := by + have he : φ i j = phaseLinear v ∘ planeCoordinateIsometry := by + funext x + have hh := congrFun hφ (planeCoordinateIsometry x) + simpa only [coordinatePhase,Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] using hh + simpa only [finiteGlobalPhase,he] using A.restored_linear_phase_mem_catalog V i hv + +def localQuadraticPhaseCatalog (V : Finset SmallModes.Base) (k : A.centers) : + Finset (SmallModes.Base → ℝ) := by + classical + exact RealModes.quadraticPhaseCatalog ((A.linearPhaseCatalog V).image (A.vectorPlaneRead k)) + +lemma globalQuadraticPhase_mem_catalog (V : Finset SmallModes.Base) + {ι : Type*} [Fintype ι] [DecidableEq ι] (φ : ι → M → ℝ) + (hφ : ∀ a, φ a ∈ A.linearPhaseCatalog V) (k : A.centers) + (l : RealModes.QuadraticLabel ι) : + coordinatePhase (A.globalQuadraticPhase φ k l) ∈ A.localQuadraticPhaseCatalog V k := by + classical + have he : coordinatePhase (A.globalQuadraticPhase φ k l) = + RealModes.quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l := by + funext x + simp only [coordinatePhase,globalQuadraticPhase,Function.comp_apply, + LinearIsometryEquiv.apply_symm_apply] + rw [he] + apply RealModes.quadraticPhase_mem_catalog + intro a + exact Finset.mem_image.mpr ⟨φ a,hφ a,rfl⟩ + +variable [CompactSpace M] + +lemma localQuadraticPhaseCatalog_smooth (V : Finset SmallModes.Base) (k : A.centers) : + ∀ f ∈ A.localQuadraticPhaseCatalog V k, ContDiff ℝ ∞ f := by + classical + apply RealModes.quadraticPhaseCatalog_smooth + intro f hf + obtain ⟨g,hg,rfl⟩ := Finset.mem_image.mp hf + exact A.vectorPlaneRead_smooth k (A.linearPhaseCatalog_smooth V g hg) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseChartBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseChartBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8865c14be0a3b1a7d2ce13ad66ae4adf84b22de3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseChartBounds.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseReadBounds + +namespace OAI + +/-! Fixed smooth phases have uniform directional-derivative bounds in every atlas chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance phaseChartReadBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseChartReadBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phaseChartReadBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseChartReadBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseChartReadBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseChartReadBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The coordinate derivatives used by the polynomial phase estimates obey +fixed profiles as the slow scale varies. -/ +theorem phase_chart_gradient_bound {ι : Type*} [Fintype ι] + (φ : ι → M → ℝ) (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) (m : ℕ) : + ∃ P : ℝ, 0 ≤ P ∧ ∀ k a (s : ℝ), 0 ≤ s → s ≤ 1 → ∀ v : Fin 2, + WeightedEstimates.WeightedBound univ s m P + (fun x => fderiv ℝ (A.vectorChartRead k (φ a)) x (coordinateVector v)) := by + classical + choose C hC hc using fun (k : A.centers) (a : ι) => compact_smooth_bound + (A.vectorChartRead_smooth k (hφ a)) + (localize_compact (k : M) (A.outer_support k) (φ a)) (m+1) + let P := ∑ k : A.centers, ∑ a : ι, C k a + have hP : 0 ≤ P := Finset.sum_nonneg (fun k _ => Finset.sum_nonneg (fun a _ => hC k a)) + refine ⟨P,hP,?_⟩ + intro k a s hs hs1 v + have hd := (hc k a).directional isOpen_univ (by norm_num : (0:ℝ)<1) + (A.vectorChartRead_smooth k (hφ a)).contDiffOn (coordinateVector v) + have hv : ‖coordinateVector v‖ = 1 := by simp only [coordinateVector,Pi.norm_single,norm_one] + have hd' := hd.mono_const (show ‖coordinateVector v‖*(C k a/1) ≤ C k a by rw [hv]; simp) + apply (hd'.shrink_scale hs hs1).mono_const + exact (Finset.single_le_sum (fun b _ => hC k b) (Finset.mem_univ a)).trans + (Finset.single_le_sum (fun j _ => Finset.sum_nonneg (fun b _ => hC j b)) (Finset.mem_univ k)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..81bc07d03e85c7bc7bac03b4808deb2a573becc0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseJetBounds.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! Weighted two-jet estimates in a fixed phase chart from the global input norm. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phaseChart_twoJet_bound (i : A.centers) + {T : SmallModes.Base → SmallModes.Base} (hT : ContDiff ℝ ∞ T) + (K : Compacts SmallModes.Base) {U : Set SmallModes.Base} + (hU : IsOpen U) (hUK : U ⊆ K) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (F : M → Space) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel spaceModel ∞ F → + A.ShiftedBound 2 m s C F → + WeightedEstimates.WeightedBound U s m (D*C) + (realTwoJet ((spaceCoordinates ∘ A.vectorPlaneRead i F) ∘ T)) := by + obtain ⟨B,hB,hb⟩ := A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + obtain ⟨E,hE,he⟩ := compact_realTwoJet_comp_prefix_bound hT K hU hUK m + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖*B + let D : ℝ := 1+E*L + have hL : 0 ≤ L := mul_nonneg (norm_nonneg _) hB + have hD : 1 ≤ D := le_add_of_nonneg_right (mul_nonneg (zero_le_one.trans hE) hL) + refine ⟨D,hD,?_⟩ + intro F s C hs hs1 hC hF hp + have hlocal := A.vectorPlaneRead_smooth i hF + have hprefix (j : ℕ) (hj : j ≤ m+2) : + WeightedEstimates.WeightedBound univ 1 j (L*C/s^(j-2)) + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + have hh := (hb F s C hs hs1 hC hF hp j (by omega)).linear + uniqueDiffOn_univ zero_le_one hlocal.contDiffOn spaceCoordinates.toContinuousLinearMap + simpa only [L,mul_div_assoc,mul_assoc,ContinuousLinearEquiv.coe_coe] using hh + have hh := he (spaceCoordinates ∘ A.vectorPlaneRead i F) + (spaceCoordinates.contDiff.comp hlocal) s (L*C) hs hs1 (mul_nonneg hL hC) hprefix + apply hh.mono_const + calc + E*(L*C) = (E*L)*C := (mul_assoc _ _ _).symm + _ ≤ D*C := mul_le_mul_of_nonneg_right (le_add_of_nonneg_left (by norm_num)) hC + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseNormalMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseNormalMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..df9f5a068c4f5c9f694ebd2012bd6ae127772969 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseNormalMargin.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseNormalTripleMargin +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveNormal + +namespace OAI + +/-! Uniform phase-chart normal margins on a fixed smoothing-atlas patch. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial RealModes SurfaceVelocityFamily.Loop +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phase_normal_margin (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hcover : (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ e.source) : + ∃ D : ℝ, 0 < D ∧ ∀ (V : M → Space), ContMDiff planeModel spaceModel ∞ V → + ∀ x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base), ∀ c : ℝ, 0 < c → + (let J := primitiveNormalTriple (A.vectorChartRead i V ∘ e.symm) (e x) + NormalFrame.gramDet (J 0) (J 1) ≠ 0 ∧ c < ‖realNormalPart (J 0) (J 1) (J 2)‖) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i V) + (planeCoordinateIsometry x)) ∧ + c/D < ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i V) + (planeCoordinateIsometry x)‖ := by + obtain ⟨D,hD,hd⟩ := compact_phase_normalTriple_margin e he hi + (A.chartWeightCompact i).isCompact hcover + refine ⟨D,hD,?_⟩ + intro V hV x hx c hc hn + have hh := hd (A.vectorChartRead i V) (A.vectorChartRead_smooth i hV) x hx c hc hn + have heq : spaceCoordinates ∘ A.vectorChartRead i V ∘ planeCoordinateIsometry.symm = + spaceCoordinates ∘ A.vectorPlaneRead i V := rfl + rwa [heq] at hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f67f48f67f30fcc75daf3e82e99092f445c37460 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseReadBounds.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! Fixed smooth phases have uniform directional-derivative bounds in every atlas chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance phaseReadBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseReadBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phaseReadBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseReadBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseReadBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseReadBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phase_read_gradient_bound {ι : Type*} [Fintype ι] + (φ : ι → M → ℝ) (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) (m : ℕ) : + ∃ P : ℝ, 0 ≤ P ∧ ∀ k a (s : ℝ), 0 ≤ s → s ≤ 1 → + ∀ v : SmallModes.Base, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m P + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a))) := by + classical + choose C hC hc using fun (k : A.centers) (a : ι) => compact_smooth_bound + (A.vectorChartRead_smooth k (hφ a)) + (localize_compact (k : M) (A.outer_support k) (φ a)) (m+1) + let P := ∑ k : A.centers, ∑ a : ι, C k a + have hP : 0 ≤ P := Finset.sum_nonneg (fun k _ => Finset.sum_nonneg (fun a _ => hC k a)) + refine ⟨P,hP,?_⟩ + intro k a s hs hs1 v hv + have hb := weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth k (hφ a)) (hc k a) + change WeightedEstimates.WeightedBound univ 1 (m+1) (C k a) (A.vectorPlaneRead k (φ a)) at hb + have hd := hb.directional isOpen_univ (by norm_num : (0:ℝ)<1) + (A.vectorPlaneRead_smooth k (hφ a)).contDiffOn v + have hsize : ‖v‖*(C k a/1) ≤ C k a := by + simpa only [div_one] using mul_le_of_le_one_left (hC k a) hv + have hd' := (hd.mono_const hsize).shrink_scale hs hs1 + apply hd'.mono_const + have h₁ : C k a ≤ ∑ b : ι, C k b := Finset.single_le_sum + (fun b _ => hC k b) (Finset.mem_univ a) + have h₂ : (∑ b : ι, C k b) ≤ P := Finset.single_le_sum + (fun j _ => Finset.sum_nonneg (fun b _ => hC j b)) (Finset.mem_univ k) + exact h₁.trans h₂ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..01afb384abf702a84c14621ab184fa2874566750 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPhaseStability.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseJetBounds + +namespace OAI + +/-! Fixed local good-phase charts persist under a global C2 perturbation. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial PhaseGeometry WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma vectorPlaneRead_sub {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + (i : A.centers) (F G : M → V) : + A.vectorPlaneRead i (F-G) = A.vectorPlaneRead i F - A.vectorPlaneRead i G := by + funext x + by_cases hx : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target <;> + simp [vectorPlaneRead,vectorChartRead,localize,hx,smul_sub] + +theorem phaseChart_global_C2_stability (i : A.centers) + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + {φ : SmallModes.Base → ℝ} + (e : GoodPhaseChart (spaceCoordinates ∘ A.vectorPlaneRead i F) φ) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ B : ℝ, 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + RealModeDomain ((spaceCoordinates ∘ A.vectorPlaneRead i G) ∘ e.chart.symm) + e.chart.target := by + obtain ⟨r,Q,hr,_,_,hnear⟩ := e.uniform_jet_neighborhood + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) i 2 + let L := ‖spaceCoordinates.toContinuousLinearMap‖*D + have hL : 0 ≤ L := mul_nonneg (norm_nonneg _) hD + have hLp : 0 < 1+L := by linarith + refine ⟨r/(1+L),div_pos hr hLp,?_⟩ + intro G hG B hB hBr hb + have hread := hd (G-F) 1 B zero_lt_one le_rfl hB (hG.sub hF) hb + have hlocal := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn spaceCoordinates.toContinuousLinearMap + simp only [ContinuousLinearEquiv.coe_coe] at hlocal + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hlocal + have he : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [he] at hlocal + have hsize : L*B < r := by + have hh : B*(1+L) < r := (lt_div_iff₀ hLp).mp hBr + nlinarith + exact (hnear (spaceCoordinates ∘ A.vectorPlaneRead i G) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) + (L*B) (mul_nonneg hL hB) hsize (by simpa only [L,mul_assoc] using hlocal)).2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasProjectionStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasProjectionStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbc8b8dc9a46d19b5ebd409265a9f811b72fbf61 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasProjectionStability.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectedNormalLocal +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! One tolerance controls normal projection through every chart of the finite atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +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) + +lemma compact_chart_projection_stability (i : A.centers) {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 : ∀ 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 : M → Space, ∀ p ∈ tsupport (A.weight i), + ‖coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p))- + coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))‖ < δ → + ‖coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p))- + coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))‖ < δ → + ‖A.chartProjectedNormal i G n p-n p‖ < ε := by + let S := {p : M // p ∈ tsupport (A.weight i)} + let : CompactSpace S := isCompact_iff_compactSpace.mp (isClosed_tsupport (A.weight i)).isCompact + let c : S → SmallModes.Base := fun p => planeCoordinateIsometry (chart (i : M) p.1) + have hc : Continuous c := planeCoordinateIsometry.continuous.comp + (((chart (i : M)).continuousOn.mono (A.weight_support i)).domRestrict) + have hread := spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF) + have hX := (contDiff_real_coordDeriv hread dx).continuous.comp hc + have hY := (contDiff_real_coordDeriv hread dy).continuous.comp hc + have hnn : Continuous (fun p : S => spaceCoordinates (n p.1)) := + spaceCoordinates.continuous.comp (hn.continuous.comp continuous_subtype_val) + let L := ‖spaceCoordinates.symm.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + obtain ⟨δ,hδ,hnear⟩ := GeometryPreservation.compact_raw_normal_projection hX hY hnn + (fun p => hD p.1 p.2) (fun p => by + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,hunit]; norm_num) + (fun p => A.vectorPlaneRead_normal i hF n hN p.2 dx) + (fun p => A.vectorPlaneRead_normal i hF n hN p.2 dy) (div_pos hε (by positivity : 0 < L+1)) + refine ⟨δ,hδ,?_⟩ + intro G p hp hx hy + have hh := (hnear ⟨p,hp⟩ _ _ hx hy).2 + let r := realNormalPart + (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i G) (c ⟨p,hp⟩)) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i G) (c ⟨p,hp⟩)) + (spaceCoordinates (n p))-spaceCoordinates (n p) + change ‖r‖ < ε/(L+1) at hh + have he : A.chartProjectedNormal i G n p-n p = spaceCoordinates.symm r := by + simp only [r,chartProjectedNormal,map_sub,ContinuousLinearEquiv.symm_apply_apply,c] + rw [he] + calc + ‖spaceCoordinates.symm r‖ ≤ L*‖r‖ := spaceCoordinates.symm.toContinuousLinearMap.le_opNorm r + _ ≤ (L+1)*‖r‖ := mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) + _ < (L+1)*(ε/(L+1)) := mul_lt_mul_of_pos_left hh (by positivity) + _ = ε := mul_div_cancel₀ _ (by positivity) + +theorem compact_atlas_projection_stability {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 : M → Space, ∀ p : M, + (∀ i : A.centers, A.weight i p ≠ 0 → ∀ v ∈ ({dx,dy} : Set SmallModes.Base), + ‖coordDeriv v (spaceCoordinates ∘ A.vectorPlaneRead i G) + (planeCoordinateIsometry (chart (i : M) p))- + coordDeriv v (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))‖ < δ) → + A.projectedNormalField G n p ≠ 0 ∧ + ‖A.unitProjectedNormalField G n p-n p‖ < ε := by + classical + let η := min (1/2 : ℝ) (ε/3) + have hη : 0 < η := lt_min (by norm_num) (by positivity) + have hi := fun i => A.compact_chart_projection_stability i hF hn hunit hN (hD i) hη + choose d hd hnear using hi + obtain ⟨δ,hδ,_,hle⟩ := finite_positive_threshold d hd + refine ⟨δ,hδ,?_⟩ + intro G p hp + have hh := A.unitProjectedNormalField_sub_bound (F := G) (p := p) (hunit p) + (lt_of_le_of_lt (min_le_left _ _) (by norm_num : (1/2:ℝ)<1)) (fun i hz => + (hnear i G p (subset_tsupport _ hz) + ((hp i hz dx (by simp)).trans_le (hle i)) + ((hp i hz dy (by simp)).trans_le (hle i))).le) + exact ⟨hh.1,hh.2.trans_lt (by have := min_le_right (1/2:ℝ) (ε/3); dsimp [η] at *; linarith)⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPureMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPureMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..603b19750019cfb928d57ba89338fa525eafdec0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasPureMargins.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.Immersion.ClosedSurface.AtlasWeights +import OAI.Geometry.Immersion.ClosedSurface.PhaseDifferentials + +namespace OAI + +/-! A uniform positive pure-phase margin after passage to another chart +of the fixed finite atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry PhaseGrid +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] {ι : Type*} [Fintype ι] + +theorem finite_atlas_pure_margin (p : ι → M) (ψ : ι → M → ℝ) + (hsource : ∀ i, tsupport (ψ i) ⊆ (chartAt Plane (p i)).source) + (hcompact : ∀ i, HasCompactSupport (ψ i)) {ε : ℝ} (hε : 0 < ε) : + ∃ e : ℝ, 0 < e ∧ ∀ (h : ℝ) (s : ι → Finset Index) + (ξ : AtlasCellPhase (ι := ι) → SmallModes.Base) + (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + (∀ a q, atlasActive p ψ s h a q → + atlasGram G (p a.1) q ≠ 0 ∧ atlasSecondTensor G (p a.1) q ≠ 0 ∧ + ε*‖atlasSecondTensor G (p a.1) q‖ ≤ + ‖secondQuadratic (atlasSecondTensor G (p a.1) q) (-(ξ a).2,(ξ a).1)‖) → + ∀ a j q, atlasActive p ψ s h a q → q ∈ tsupport (ψ j) → + e*‖atlasSecondTensor G (p j) q‖ ≤ + ‖secondQuadratic (atlasSecondTensor G (p j) q) + (-(atlasPhaseCovector (p a.1) (p j) (ξ a) q).2, + (atlasPhaseCovector (p a.1) (p j) (ξ a) q).1)‖ := by + obtain ⟨d,L,hd,hL,hbound⟩ := finite_atlas_transition_bounds p ψ hsource hcompact + let e := d^2*ε/(4*L^2) + have he : 0 < e := div_pos (mul_pos (sq_pos_of_pos hd) hε) + (mul_pos (by norm_num) (sq_pos_of_pos hL)) + refine ⟨e,he,?_⟩ + intro h s ξ G hG hlocal a j q ha hq + have hqa : q ∈ tsupport (ψ a.1) := + refinedCutoff_tsupport_outer (p a.1) (ψ a.1) (s a.1) h a.2.1 ha.2 + have hap : q ∈ (coordinateChart (p a.1)).source := by + rw [coordinateChart_source] + exact hsource a.1 hqa + have hjp : q ∈ (coordinateChart (p j)).source := by + rw [coordinateChart_source] + exact hsource j hq + have hc := hbound j a.1 (coordinateChart (p j) q) ⟨q,⟨hq,hqa⟩,rfl⟩ + have hl := hlocal a q ha + exact (actual_phase_margin_at hG (p a.1) (p j) hjp hap (ξ a) + hd hL hε hl.1 hc.1 hc.2 hl.2.1 hl.2.2).2.1 + +lemma atlasPhaseCovector_smul (q p : M) (ξ : SmallModes.Base) (w : ℝ) {a : M} + (hap : a ∈ (coordinateChart p).source) (haq : a ∈ (coordinateChart q).source) : + atlasPhaseCovector q p (w • ξ) a = w • atlasPhaseCovector q p ξ a := by + have he : atlasPhase q (w • ξ) = w • atlasPhase q ξ := by + funext z + simp only [atlasPhase,Function.comp_apply,phaseLinear_apply,Prod.smul_fst, + Prod.smul_snd,smul_eq_mul,Pi.smul_apply] + ring + unfold atlasPhaseCovector + rw [he] + change phaseDerivative (w • (atlasPhase q ξ ∘ (coordinateChart p).symm)) + (coordinateChart p a) = _ + exact phaseDerivative_const_smul (atlasPhase_in_chart_differentiable q p ξ hap haq) w + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..b7c827552da3edc570f69ab8ef87376f5ff19362 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticBounds.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Atlas.CutoffQuadraticBounds + +namespace OAI + +/-! Uniform delta-squared bounds for the actual global quadratic targets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance atlasQuadraticBoundsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasQuadraticBoundsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasQuadraticBoundsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasQuadraticBoundsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasQuadraticBoundsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasQuadraticBoundsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [Fintype ι] [DecidableEq ι] in +theorem globalQuadraticTarget_bound (k : A.centers) (m : ℕ) (A₀ P₀ : ℝ) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ (τ s δ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z 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 ι, WeightedEstimates.WeightedBound univ s m (B*δ^2) + (A.globalQuadraticTarget τ φ Z hφ hZ k l) := by + obtain ⟨B,hB,hb⟩ := cutoff_quadratic_bound (ι := ι) (A.supportedPlaneWeight k) m A₀ P₀ + refine ⟨B,hB,?_⟩ + intro τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ hA hP hz hp l + exact hb τ 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 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticTargets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticTargets.lean new file mode 100644 index 0000000000000000000000000000000000000000..82b6ca03edd851375c94bef8912105d8a5d4dc46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasQuadraticTargets.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasGlobalQuadratic +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! Actual supported quadratic targets for the global phase expansion. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance atlasQuadraticTargetsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasQuadraticTargetsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasQuadraticTargetsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasQuadraticTargetsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasQuadraticTargetsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasQuadraticTargetsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +def globalQuadraticPhase (φ : ι → M → ℝ) (k : A.centers) (l : RealModes.QuadraticLabel ι) : + JetPolynomial.Base → ℝ := + RealModes.quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l ∘ planeCoordinateIsometry + +omit [Fintype ι] [DecidableEq ι] in +lemma globalQuadraticPhase_smooth (φ : ι → M → ℝ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + ContDiff ℝ ∞ (A.globalQuadraticPhase φ k l) := + (RealModes.quadraticPhase_smooth (fun a => A.vectorPlaneRead_smooth k (hφ a)) l).comp + planeCoordinateIsometry.contDiff + +def globalQuadraticTarget (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + SupportedField (F := ComplexTensor) (modeSupport (A.chartWeightCompact k)) where + toFun := fun x => (A.planeWeight k x)^2 • RealModes.quadraticAmplitude τ + (fun a => A.vectorPlaneRead k (φ a)) (fun a => A.vectorPlaneRead k (Z a)) l x + contDiff' := ((A.planeWeight_smooth k).pow 2).smul + (RealModes.quadraticAmplitude_smooth (fun a => A.vectorPlaneRead_smooth k (hφ a)) + (fun a => A.vectorPlaneRead_smooth k (hZ a)) τ l) + zero_on_compl' := by + intro x hx + have hw := (A.supportedPlaneWeight k).zero_on_compl hx + change A.planeWeight k x = 0 at hw + simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul,Pi.zero_apply] + +theorem globalQuadraticTarget_expansion (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)) : + 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) = + A.tensorPlaneRestore (fun k x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ k l)) + (A.globalQuadraticTarget τ φ Z hφ hZ k l) x) := by + congr 1 + funext k x + rw [RealModes.nonzeroPhaseSum_eq_quadraticFamily] + simp only [Finset.smul_sum] + apply Finset.sum_congr rfl + intro l _ + change (A.planeWeight k x)^2 • QuadraticMean.realMode + (RealModes.quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l x / τ) + (RealModes.quadraticAmplitude τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) l x) = _ + simp only [QuadraticMean.displacement,coordinatePhase,globalQuadraticPhase, + Function.comp_apply,LinearIsometryEquiv.apply_symm_apply,globalQuadraticTarget] + exact (realMode_smul _ _ _).symm + +theorem 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 : ℝ≥0} + (c : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) (A.globalQuadraticPhase φ k l) + (A.chartWeightCompact k) τ 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.globalQuadraticTarget τ φ Z hφ hZ k l) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ k : A.centers, ∑ l, (c k l).residual (A.globalQuadraticTarget τ φ Z hφ hZ 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 c hτ hs hτs hs1 q + obtain ⟨W,hW,hsize,hres⟩ := h F hF (A.globalQuadraticPhase φ) + (fun k _ => A.chartWeightCompact k) c hτ hs hτs hs1 (fun _ _ => Subset.rfl) + (A.globalQuadraticTarget τ φ Z hφ hZ) 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/Atlas/AtlasReadGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasReadGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..857a2c9b0fb8cf552459e95daf817b6a1eedb897 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasReadGerms.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection + +namespace OAI + +/-! Atlas representatives agree on an open neighborhood whenever the outer +cutoff is locally one. This retains nonlinear compositions as genuine germs. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma vectorChartRead_germ (i : A.centers) (F : M → Space) {p : M} + (hp : p ∈ tsupport (A.weight i)) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => (1 : ℝ))) : + A.vectorChartRead i F =ᶠ[𝓝 (chart (i : M) p)] F ∘ (chart (i : M)).symm := by + have hps := A.weight_support i hp + have hpt := (chart (i : M)).map_source hps + have ht : Tendsto (chart (i : M)).symm (𝓝 (chart (i : M) p)) (𝓝 p) := by + have hc := ((chart (i : M)).continuousOn_symm _ hpt).continuousAt + ((chart (i : M)).open_target.mem_nhds hpt) + simpa only [(chart (i : M)).left_inv hps] using hc.tendsto + filter_upwards [(chart (i : M)).open_target.mem_nhds hpt,ho.comp_tendsto ht] with y hy he + change localize (i : M) (A.outer i) F y = _ + rw [localize,indicator_of_mem hy] + simp only [Function.comp_apply] at he ⊢ + rw [he,one_pow,one_smul] + +lemma localized_vectorChartRead_germ (i : A.centers) (F : M → Space) {p : M} + (hp : p ∈ tsupport (A.weight i)) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => (1 : ℝ))) : + localize (i : M) (A.weight i) F =ᶠ[𝓝 (chart (i : M) p)] + (fun y => (A.chartWeight i y)^2 • A.vectorChartRead i F y) := by + have hr := A.vectorChartRead_germ i F hp ho + filter_upwards [(chart (i : M)).open_target.mem_nhds + ((chart (i : M)).map_source (A.weight_support i hp)),hr] with y hy he + simp only [localize,chartWeight,indicator_of_mem hy] + rw [he] + rfl + +lemma vectorChartRead_normalize_germ (i : A.centers) (F : M → Space) {p : M} + (hp : p ∈ tsupport (A.weight i)) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => (1 : ℝ))) : + A.vectorChartRead i (SphericalJets.radialNormalize ∘ F) =ᶠ[𝓝 (chart (i : M) p)] + SphericalJets.radialNormalize ∘ A.vectorChartRead i F := by + have h₁ := A.vectorChartRead_germ i (SphericalJets.radialNormalize ∘ F) hp ho + have h₂ := A.vectorChartRead_germ i F hp ho + filter_upwards [h₁,h₂] with y h₁ h₂ + simp only [Function.comp_apply] at h₁ h₂ ⊢ + rw [h₁,h₂] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSecondFormMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSecondFormMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cdfe6d86af32f599c9070c7ab6dbc495adf7e69 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSecondFormMargin.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformSecondFormMargin +import OAI.Geometry.SurfaceImmersion.Atlas.UniformMetricPhaseGeometry + +namespace OAI + +/-! A single positive second-form margin for all fixed atlas supports and +all sufficiently C2-close maps. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry WeightedEstimates JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma compact_read_secondForm_C2_margin {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (i : A.centers) + (K : TopologicalSpace.Compacts SmallModes.Base) + (hI : ∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hB : ∀ x ∈ (K : Set SmallModes.Base), + realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x ≠ 0) : + ∃ ρ c : ℝ, 0 < ρ ∧ 0 < c ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → ∀ b : ℝ, 0 ≤ b → b < ρ → + A.WeightedBound 1 2 b (G-F) → ∀ x ∈ (K : Set SmallModes.Base), + c < ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ := by + obtain ⟨r,c,hr,hc,hmargin⟩ := compact_secondForm_C2_margin + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) K.isCompact hI hB + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) i 2 + let L := ‖spaceCoordinates.toContinuousLinearMap‖*D + have hL : 0 ≤ L := mul_nonneg (norm_nonneg _) hD + have hLp : 0 < 1+L := by linarith + refine ⟨r/(1+L),c,div_pos hr hLp,hc,?_⟩ + intro G hG b hb hbr hclose x hx + have hread := hd (G-F) 1 b zero_lt_one le_rfl hb (hG.sub hF) hclose + have hlocal := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn spaceCoordinates.toContinuousLinearMap + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hlocal + have he : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G)-(spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext y + exact map_sub spaceCoordinates _ _ + rw [he] at hlocal + have hsize : L*b < r := by + have hh := (lt_div_iff₀ hLp).mp hbr + nlinarith + exact (hmargin (spaceCoordinates ∘ A.vectorPlaneRead i G) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) (L*b) + (mul_nonneg hL hb) hsize (by simpa only [L,mul_assoc] using hlocal) x hx).2 + +end SmoothingAtlas +namespace MetricGoodPhaseData + +theorem uniform_secondForm_C2_margin {g : SmoothMetric M} {F : M → Space} + (data : MetricGoodPhaseData g F) (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ ρ c : ℝ, 0 < ρ ∧ 0 < c ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → ∀ b : ℝ, 0 ≤ b → b < ρ → + data.A.WeightedBound 1 2 b (G-F) → ∀ i x, + x ∈ (modeSupport (data.A.chartWeightCompact i) : Set SmallModes.Base) → + c < ‖realSecondTensor (spaceCoordinates ∘ data.A.vectorPlaneRead i G) x‖ := by + have hlocal (i : data.A.centers) := data.A.compact_read_secondForm_C2_margin hF i + (modeSupport (data.A.chartWeightCompact i)) (data.immersion i) (fun x hx => by + intro hz + have hh := (data.pure_good i 0 x hx).2 + simp only [hz,secondQuadratic,Pi.zero_apply,smul_zero,add_zero,ne_eq,not_true_eq_false] at hh) + choose ρ c hρ hc hmargin using hlocal + obtain ⟨ρ₀,hρ₀,_,hρall⟩ := finite_positive_threshold ρ hρ + obtain ⟨c₀,hc₀,_,hcall⟩ := finite_positive_threshold c hc + refine ⟨ρ₀,c₀,hρ₀,hc₀,?_⟩ + intro G hG b hb hbρ hclose i x hx + exact (hcall i).trans_lt (hmargin i G hG b hb (hbρ.trans_le (hρall i)) hclose x hx) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSelfTensorRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSelfTensorRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..2eb052b63378e59a45d92090bc6b03140f7ebdcd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSelfTensorRead.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasMetricLocalModel +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 +local instance selfReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance selfReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance selfReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance selfReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance selfReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance selfReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorChartRead_restore_self (i : A.centers) (f : Base → PhaseMean.Tensor) + {x : Base} (hx : x ∈ (chart (i : M)).target) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.tensorChartRead i (A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (f y))) x = f x := by + have hb := A.tensorTriv_domain i ((chart (i : M)).map_target hx) + change fiberToThree (localize (i : M) (A.outer i) + (A.bundleComponent A.tensorTriv i (A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (f y)))) x) = _ + rw [localize,indicator_of_mem hx] + simp only [ho,one_pow,one_smul,bundleComponent,bundleRestore, + (chart (i : M)).right_inv hx] + rw [(A.tensorTriv i).continuousLinearMapAt_symmL hb,fiberToThree_fromThree] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSphericalTensorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSphericalTensorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..bda166113c0a5a0f368788e185a5cdfd0db8357a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSphericalTensorBound.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.EuclideanChartRead +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalTensorBound + +namespace OAI + +/-! The tensors used for every finite-point correction have one bound, +fixed by the original immersion and its finite atlas. -/ +noncomputable section +open Set 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] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma euclideanChartRead_compact (i : A.centers) (F : M → Space) : + HasCompactSupport (A.euclideanChartRead i F) := + (localize_compact (i : M) (A.outer_support i) F).comp_homeomorph + (EuclideanSpace.equiv (Fin 2) ℝ).toHomeomorph + +theorem uniform_spherical_correction_tensor {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) : + ∃ K : ℝ, 0 ≤ K ∧ ∀ (i : A.centers) (p : M), A.weight i p ≠ 0 → + ‖sphericalSecondFormCLM (A.euclideanChartRead i F) (chartAt Plane (i : M) p)‖ ≤ K := by + classical + have hb (i : A.centers) : ∃ K : ℝ, 0 ≤ K ∧ ∀ p : M, A.weight i p ≠ 0 → + ‖sphericalSecondFormCLM (A.euclideanChartRead i F) (chartAt Plane (i : M) p)‖ ≤ K := by + let f := A.euclideanChartRead i F + have hf := A.euclideanChartRead_smooth i hF + have hc := A.euclideanChartRead_compact i F + have hd := hf.fderiv_right (m := ∞) (by simp) + have hdd := hd.fderiv_right (m := ∞) (by simp) + obtain ⟨C₁,h₁⟩ := hd.continuous.bounded_above_of_compact_support (hc.fderiv ℝ) + obtain ⟨C₂,h₂⟩ := hdd.continuous.bounded_above_of_compact_support ((hc.fderiv ℝ).fderiv ℝ) + have hC₁ : 0 ≤ C₁ := (norm_nonneg _).trans (h₁ 0) + have hC₂ : 0 ≤ C₂ := (norm_nonneg _).trans (h₂ 0) + refine ⟨C₂+C₁^2,by positivity,?_⟩ + intro p hp + apply norm_sphericalSecondFormCLM_of_bounds (h₁ _) (h₂ _) + have he := (A.euclideanChartRead_germ i F hp).eq_of_nhds + have hps : p ∈ (chartAt Plane (i : M)).source := by + simpa only [chart_source] using A.weight_support i (subset_tsupport _ hp) + simp only [Function.comp_apply,(chartAt Plane (i : M)).left_inv hps] at he + exact (congrArg norm he).trans (hunit p) + choose K hK hb using hb + refine ⟨∑ i, K i,Finset.sum_nonneg (fun i _ => hK i),?_⟩ + intro i p hp + exact (hb i p hp).trans (Finset.single_le_sum (fun j _ => hK j) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSupportedWeights.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSupportedWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..d14944a10f7c3571026f4b8d520bb67217dab7e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasSupportedWeights.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData + +namespace OAI + +/-! The atlas cutoffs as actual compactly supported fields, and their +transport to a phase chart with the required inverse-frequency factor. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Manifold Bundle PhaseMean WeightedEstimates +open JetPolynomial JetPolynomial.Perturbation + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def chartWeightCompact (i : A.centers) : Compacts JetPolynomial.Base := + ⟨(chart (i : M)) '' tsupport (A.weight i), + (isClosed_tsupport (A.weight i)).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (A.weight_support i))⟩ + +def supportedChartWeight (i : A.centers) : SupportedField (F := ℝ) (A.chartWeightCompact i) := + ⟨A.chartWeight i,A.chartWeight_smooth i,by + intro x hx + by_cases hxt : x ∈ (chart (i : M)).target + · change (chart (i : M)).target.indicator + (fun y => A.weight i ((chart (i : M)).symm y)) x = 0 + rw [indicator_of_mem hxt] + by_contra hn + exact hx ⟨(chart (i : M)).symm x,subset_tsupport (A.weight i) hn,(chart (i : M)).right_inv hxt⟩ + · exact indicator_of_notMem hxt _⟩ + +def supportedPlaneWeight (i : A.centers) : + SupportedField (F := ℝ) (modeSupport (A.chartWeightCompact i)) := + pushSupported planeCoordinateIsometry (A.chartWeightCompact i) (A.supportedChartWeight i) + +@[simp] lemma supportedPlaneWeight_apply (i : A.centers) (x : SmallModes.Base) : + A.supportedPlaneWeight i x = A.planeWeight i x := rfl + +def phaseWeightCutoff (i : A.centers) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e.symm e.target) + (hK : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ e.source) + (w : ℝ) : SupportedField (F := ℝ) (chartSupport e (modeSupport (A.chartWeightCompact i)) hK) := + w⁻¹ • chartPush e he (modeSupport (A.chartWeightCompact i)) hK (A.supportedPlaneWeight i) + +lemma phaseWeightCutoff_apply (i : A.centers) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e.symm e.target) + (hK : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ e.source) + (w : ℝ) {x : SmallModes.Base} (hx : x ∈ e.source) : + A.phaseWeightCutoff i e he hK w (e x) = A.planeWeight i x / w := by + change w⁻¹ * chartPush e he (modeSupport (A.chartWeightCompact i)) hK + (A.supportedPlaneWeight i) (e x) = _ + rw [chartPush_eval_source e he _ hK _ hx, A.supportedPlaneWeight_apply] + exact (div_eq_inv_mul _ _).symm + +lemma planeWeight_support_chart (i : A.centers) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (hK : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ e.source) : + tsupport (A.planeWeight i) ⊆ e.source := by + have hh := (A.supportedPlaneWeight i).tsupport_subset + have hsub : tsupport (A.planeWeight i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := hh + exact hsub.trans hK + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..e57f011cc9937eebd5a2b536a254c35045e29e3a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorDerivatives.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRestoreFinite +import Mathlib.Analysis.Calculus.Deriv.Prod +import Mathlib.Analysis.Calculus.Deriv.Mul + +namespace OAI + +/-! Differentiation in a real parameter commutes with the actual finite +atlas restoration and chart reading. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base planeCoordinateIsometry) +open PhaseMean +local instance tensorDerivativeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance tensorDerivativeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance tensorDerivativeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance tensorDerivativeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance tensorDerivativeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance tensorDerivativeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorPlaneRestore_hasDerivAt + {f : ℝ → A.centers → SmallModes.Base → Tensor} + {f' : A.centers → SmallModes.Base → Tensor} {s : ℝ} (p : M) + (hf : ∀ i, HasDerivAt (fun r => f r i (planeCoordinateIsometry (chart (i : M) p))) + (f' i (planeCoordinateIsometry (chart (i : M) p))) s) : + HasDerivAt (fun r => A.tensorPlaneRestore (f r) p) (A.tensorPlaneRestore f' p) s := by + have hi (i : A.centers) := + (((A.tensorTriv i).symmL ℝ p).hasFDerivAt.comp_hasDerivAt s + (fiberFromThree.hasFDerivAt.comp_hasDerivAt s (hf i))).const_smul (A.outer i p) + exact HasDerivAt.fun_sum (fun i _ => hi i) + +lemma tensorChartRead_hasDerivAt + {f : ℝ → ∀ p : M, CovariantTwoTensor p} + {f' : ∀ p : M, CovariantTwoTensor p} {s : ℝ} (i : A.centers) (x : Base) + (hf : HasDerivAt (fun r => f r ((chart (i : M)).symm x)) + (f' ((chart (i : M)).symm x)) s) : + HasDerivAt (fun r => A.tensorChartRead i (f r) x) (A.tensorChartRead i f' x) s := by + by_cases hx : x ∈ (chart (i : M)).target + · have hc := (((A.tensorTriv i).continuousLinearMapAt ℝ ((chart (i : M)).symm x)).hasFDerivAt).comp_hasDerivAt s hf + have h := fiberToThree.hasFDerivAt.comp_hasDerivAt s + (hc.const_smul ((A.outer i ((chart (i : M)).symm x))^2)) + simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_mem hx,bundleComponent] + convert h using 1 + funext r + rfl + · simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_notMem hx,map_zero] + exact hasDerivAt_const s 0 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorLocalBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorLocalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..66363c0dabc70147c34b4c6dec2a3db1199d8060 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorLocalBounds.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialValueBounds + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance tensorLocalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance tensorLocalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance tensorLocalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance tensorLocalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance tensorLocalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance tensorLocalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +/-- Compact coordinate bounds on the outer supports suffice for global restoration. -/ +theorem tensorPlaneRestore_bound_on_outer + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) + (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : A.centers → SmallModes.Base → Tensor), + (∀ i, ContDiff ℝ ∞ (f i)) → ∀ (s C : ℝ), 0 < s → s ≤ 1 → 0 ≤ C → + (∀ i, WeightedEstimates.WeightedBound (planeCoordinateIsometry.symm ⁻¹' U i) s m C (f i)) → + A.TensorWeightedBound s m (D*C) (A.tensorPlaneRestore f) := by + classical + choose K χ hχU hχone using fun i => A.polynomial_outer_cutoff i (hU i) (houter i) + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + let N : A.centers → ℝ := fun i => supportedWeightedSeminorm (K i) 1 m (χ i) + have hN (i) : 0 ≤ N i := apply_nonneg _ _ + let E : A.centers → ℝ := fun i => 2^m * N i + have hE (i) : 0 ≤ E i := mul_nonneg (by positivity) (hN i) + let E₀ := ∑ i : A.centers, E i + have hE₀ : 0 ≤ E₀ := Finset.sum_nonneg (fun i _ => hE i) + refine ⟨D*E₀,mul_nonneg hD hE₀,?_⟩ + intro f hf s C hs hs1 hC hb + let ψ : A.centers → SmallModes.Base → ℝ := fun i => (χ i) ∘ planeCoordinateIsometry.symm + let g : A.centers → SmallModes.Base → Tensor := fun i x => ψ i x • f i x + have hψ (i) : ContDiff ℝ ∞ (ψ i) := (χ i).contDiff.comp planeCoordinateIsometry.symm.contDiff + have hg (i) : ContDiff ℝ ∞ (g i) := (hψ i).smul (hf i) + have hψsp (i) : tsupport (ψ i) ⊆ planeCoordinateIsometry.symm ⁻¹' U i := by + apply (show tsupport (ψ i) ⊆ planeCoordinateIsometry.symm ⁻¹' tsupport (χ i) from ?_).trans + (preimage_mono (hχU i)) + apply closure_minimal _ ((isClosed_tsupport (χ i)).preimage planeCoordinateIsometry.symm.continuous) + intro x hx + exact subset_tsupport (χ i) hx + have hψb (i) : WeightedEstimates.WeightedBound univ s m (N i) (ψ i) := + weightedBound_comp_isometry planeCoordinateIsometry.symm (χ i).contDiff + ((weightedBound_of_supportedSeminorm (1 : ℝ≥0) m (χ i)).shrink_scale hs.le hs1) + have hgb (i) : WeightedEstimates.WeightedBound univ s m (E i*C) (g i) := by + let V := planeCoordinateIsometry.symm ⁻¹' U i + have hV : IsOpen V := (hU i).preimage planeCoordinateIsometry.symm.continuous + have hprod := ((hψb i).restrict_open hV).smul_real hV.uniqueDiffOn hs.le (hN i) hC + (hψ i).contDiffOn (hf i).contDiffOn (hb i) + exact hprod.extend_support hV + ((tsupport_smul_subset_left (ψ i) (f i)).trans (hψsp i)) (mul_nonneg (hE i) hC) + have hglobal (i) : WeightedEstimates.WeightedBound univ s m (E₀*C) (g i) := by + apply (hgb i).mono_const + exact mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ i)) hC + have hout := hd g s (E₀*C) hs hs1 (mul_nonneg hE₀ hC) hg hglobal + have heq : A.tensorPlaneRestore g = A.tensorPlaneRestore f := by + funext p + apply Finset.sum_congr rfl + intro i _ + by_cases hp : p ∈ tsupport (A.outer i) + · have hχp := hχone i p hp + change A.outer i p • (A.tensorTriv i).symmL ℝ p + (fiberFromThree ((χ i) (planeCoordinateIsometry.symm + (planeCoordinateIsometry (chart (i : M) p))) • f i + (planeCoordinateIsometry (chart (i : M) p)))) = _ + simp only [planeCoordinateIsometry.symm_apply_apply,hχp,one_smul] + rfl + · have hz : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport hp + simp only [bundleRestore,hz,zero_smul] + rw [heq] at hout + simpa only [mul_assoc] using hout + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..9875d96b8fb1639ebcdadf1a4be6e5dd16f1eadf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasTensorTransition.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartRead + +namespace OAI + +/-! The actual change of tensor coordinates for a restored atlas term. +Bundle restoration uses one outer cutoff, whereas chart reading uses the +square of its own cutoff. On the nonzero partition locus the latter is one. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +open PhaseMean + +local instance transitionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance transitionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance transitionDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance transitionDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance transitionSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance transitionSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorChartRead_bundleRestore_transition (i j : A.centers) (f : Base → TensorFiber) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.tensorChartRead i (A.bundleRestore A.tensorTriv j f) x = + A.outer j ((chart (i : M)).symm x) • + fiberToThree (A.bundleTransition A.tensorTriv i j x + (f (transition (i : M) (j : M) x))) := by + have hi : x ∈ (chart (i : M)).target := hx.1 + have hread := congrFun + (A.bundleCutoff_restore A.tensorTriv A.tensorTriv_domain i j (A.outer i) f) x + have hcut : localize (i : M) (A.outer i) (A.outer j) x = + A.outer j ((chart (i : M)).symm x) := by + simp only [localize,indicator_of_mem hi,ho,one_pow,one_smul] + change fiberToThree (A.bundleCutoff A.tensorTriv i (A.outer i) + (A.bundleRestore A.tensorTriv j f) x) = _ + rw [hread,hcut,map_smul] + +lemma tensorChartRead_bundleRestore_of_weight_ne_zero (i j : A.centers) + (f : Base → TensorFiber) {x : Base} + (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + A.tensorChartRead i (A.bundleRestore A.tensorTriv j f) x = + A.outer j ((chart (i : M)).symm x) • + fiberToThree (A.bundleTransition A.tensorTriv i j x + (f (transition (i : M) (j : M) x))) := + A.tensorChartRead_bundleRestore_transition i j f hx + (A.outer_one i _ (subset_tsupport (A.weight i) hw)) + +lemma tensorChartRead_bundleRestore_eventually (i j : A.centers) + (f : Base → TensorFiber) {x : Base} + (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + A.tensorChartRead i (A.bundleRestore A.tensorTriv j f) =ᶠ[𝓝 x] + (fun y => A.outer j ((chart (i : M)).symm y) • + fiberToThree (A.bundleTransition A.tensorTriv i j y + (f (transition (i : M) (j : M) y)))) := by + have ho := (A.outer_eventually_one_of_weight_ne_zero i hw).comp_tendsto + ((chart (i : M)).continuousAt_symm hx.1) + filter_upwards [(transition (i : M) (j : M)).open_source.mem_nhds hx,ho] + with y hy hoy + exact A.tensorChartRead_bundleRestore_transition i j f hy hoy + +/-- The three-coordinate form of the genuine tensor-bundle transition, +including the single cutoff used by restoration. -/ +def tensorRestoreTransition (i j : A.centers) (x : Base) : Tensor →L[ℝ] Tensor := + A.outer j ((chart (i : M)).symm x) • + fiberToThree.comp ((A.bundleTransition A.tensorTriv i j x).comp fiberFromThree) + +lemma tensorRestoreTransition_smoothOn (i j : A.centers) : + ContDiffOn ℝ ∞ (A.tensorRestoreTransition i j) + (transition (i : M) (j : M)).source := by + have hB := A.bundleTransition_smooth A.tensorTriv A.tensorTriv_domain i j + have hleft : ContDiffOn ℝ ∞ (fun _ : Base => fiberToThree) + (transition (i : M) (j : M)).source := contDiffOn_const + have hright : ContDiffOn ℝ ∞ (fun _ : Base => fiberFromThree) + (transition (i : M) (j : M)).source := contDiffOn_const + have ha : ContDiffOn ℝ ∞ (fun x : Base => A.outer j ((chart (i : M)).symm x)) + (chart (i : M)).target := + ((A.outer_smooth j).comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + exact (ha.mono (fun _ hx => hx.1)).smul (hleft.clm_comp (hB.clm_comp hright)) + +lemma tensorChartRead_restoreThree (i j : A.centers) (f : Base → Tensor) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.tensorChartRead i + (A.bundleRestore A.tensorTriv j (fun y => fiberFromThree (f y))) x = + A.tensorRestoreTransition i j x (f (transition (i : M) (j : M) x)) := by + rw [A.tensorChartRead_bundleRestore_transition i j _ hx ho] + rfl + +lemma weighted_tensorChartRead_restoreThree (i j : A.centers) (f : Base → Tensor) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) : + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.tensorChartRead i + (A.bundleRestore A.tensorTriv j (fun y => fiberFromThree (f y))) x = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.tensorRestoreTransition i j x (f (transition (i : M) (j : M) x)) := by + by_cases hw : A.weight i ((chart (i : M)).symm x) = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul] + · rw [A.tensorChartRead_restoreThree i j f hx + (A.outer_one i _ (subset_tsupport (A.weight i) hw))] + +/-- The finite-dimensional tensor transition extends smoothly off any +compact overlap. The extension is independent of the restored field. -/ +theorem compact_tensorRestoreTransition (i j : A.centers) {K : Set Base} + (hK : IsCompact K) (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ L : Base → Tensor →L[ℝ] Tensor, ContDiff ℝ ∞ L ∧ + EqOn L (A.tensorRestoreTransition i j) U ∧ + (∀ (f : Base → Tensor) (x : Base), x ∈ U → + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.tensorChartRead i + (A.bundleRestore A.tensorTriv j (fun y => fiberFromThree (f y))) x = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + L x (f (transition (i : M) (j : M) x))) := by + obtain ⟨U,hU,hKU,hUe,L,hL,he⟩ := CollarVelocity.compact_smooth_extension hK + (transition (i : M) (j : M)).open_source hKe + (A.tensorRestoreTransition_smoothOn i j) + refine ⟨U,hU,hKU,hUe,L,hL,he,?_⟩ + intro f x hx + rw [he hx] + exact A.weighted_tensorChartRead_restoreThree i j f (hUe hx) + +variable [CompactSpace M] + +theorem pair_tensorRestoreTransition (i j : A.centers) : + ∃ U : Set Base, IsOpen U ∧ A.pairSupport i j ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ L : Base → Tensor →L[ℝ] Tensor, ContDiff ℝ ∞ L ∧ + EqOn L (A.tensorRestoreTransition i j) U ∧ + (∀ (f : Base → Tensor) (x : Base), x ∈ U → + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + A.tensorChartRead i + (A.bundleRestore A.tensorTriv j (fun y => fiberFromThree (f y))) x = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + L x (f (transition (i : M) (j : M) x))) := + A.compact_tensorRestoreTransition i j (A.pairSupport_compact i j) + (A.pairSupport_transition i j) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasUniformNorm.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasUniformNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..f93dbca2a9af7dfbc40d4db2f45efe211410c560 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasUniformNorm.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionApproximation + +namespace OAI + +/-! Uniform value and first-jet consequences of the fixed atlas norms. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma weightedBound_uniform_norm {f : M → Space} {C : ℝ} + (hb : A.WeightedBound 1 0 C f) (p : M) : + ‖f p‖ ≤ (Fintype.card A.centers : ℝ)*C := by + have hpiece (i : A.centers) : ‖(A.weight i p)^2 • f p‖ ≤ C := by + by_cases hp : p ∈ (chart (i : M)).source + · have hh := (hb i).norm_le (mem_univ (chart (i : M) p)) + rw [localize_chart (i : M) (A.weight i) f hp] at hh + exact hh + · have hz : A.weight i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.weight_support i h)) + have hC : 0 ≤ C := (norm_nonneg _).trans ((hb i).norm_le (mem_univ 0)) + simpa [hz] using hC + have he : f p = ∑ i : A.centers, (A.weight i p)^2 • f p := by + rw [← Finset.sum_smul,A.partition,one_smul] + rw [he] + calc + _ ≤ ∑ i : A.centers, ‖(A.weight i p)^2 • f p‖ := norm_sum_le _ _ + _ ≤ ∑ _i : A.centers, C := Finset.sum_le_sum (fun i _ => hpiece i) + _ = (Fintype.card A.centers : ℝ)*C := by simp + +lemma weightedBound_C1 {f : M → Space} {C : ℝ} + (hb : A.WeightedBound 1 1 C f) : A.C1Bound C f := by + intro i x + refine ⟨(hb i).norm_le (mem_univ x),?_⟩ + have hh := hb i 1 le_rfl x (mem_univ x) + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ,norm_iteratedFDeriv_one] using hh + +variable [CompactSpace M] + +theorem weighted_immersion_tolerance {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) : + ∃ ε : ℝ, 0 < ε ∧ ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + A.WeightedBound 1 1 ε (G-F) → + ∀ p, Function.Injective (mfderiv planeModel spaceModel G p) := by + obtain ⟨ε,hε,hs⟩ := A.immersion_C1_tolerance (hF.of_le (by simp)) hI + exact ⟨ε,hε,fun G hG hb => hs G (hG.of_le (by simp)) (A.weightedBound_C1 hb)⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasWeightedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasWeightedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8749ab57fd3831acc6ae00ffcb76db2051700689 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AtlasWeightedBounds.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTransition + +namespace OAI + +/-! Fixed-atlas weighted norms and bounds for the actual restoration operator. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold WeightedEstimates +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +omit [IsManifold planeModel ∞ M] in +lemma localize_sum {ι : Type*} (b : Finset ι) (p : M) (ψ : M → ℝ) (f : ι → M → V) : + localize p ψ (∑ i ∈ b, f i) = fun x => ∑ i ∈ b, localize p ψ (f i) x := by + funext x + by_cases hx : x ∈ (chart p).target <;> + simp [localize, hx, Finset.sum_apply, Finset.smul_sum] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- A fixed finite family of localized coordinate norms. -/ +def WeightedBound (t : ℝ) (m : ℕ) (C : ℝ) (f : M → V) : Prop := + ∀ i : A.centers, WeightedEstimates.WeightedBound Set.univ t m C + (localize (i : M) (A.weight i) f) + +variable [CompactSpace M] + +/-- Restoring finitely many coordinate functions is bounded in every fixed +weighted atlas norm, uniformly in the input and the scale. -/ +theorem restoration_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : A.centers → Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (h i)) → + (∀ i, WeightedEstimates.WeightedBound Set.univ s m C (h i)) → + A.WeightedBound s m (D * C) (∑ i : A.centers, restore (i : M) (A.outer i) (h i)) := by + classical + choose D hD hbound using fun i j : A.centers => A.pair_weighted_bound (V := V) i j m + refine ⟨∑ i : A.centers, ∑ j : A.centers, D i j, + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hD i j)), ?_⟩ + intro h s C hs hs1 hC hh hb i + have hf (j : A.centers) : ContDiff ℝ ∞ + (localize (i : M) (A.weight i) (restore (j : M) (A.outer j) (h j))) := + localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) + (restore_smooth (j : M) (A.outer_smooth j) (A.outer_support j) (hh j)) + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hs.le + (Finset.univ : Finset A.centers) (fun j => D i j * C) + (fun j => localize (i : M) (A.weight i) (restore (j : M) (A.outer j) (h j))) + (fun j _ => (hf j).contDiffOn) + (fun j _ => hbound i j (h j) s C hs hs1 hC (hh j) (hb j)) + rw [localize_sum] + apply hsum.mono_const + rw [← Finset.sum_mul] + apply mul_le_mul_of_nonneg_right _ hC + exact Finset.single_le_sum + (fun k _ => Finset.sum_nonneg (fun j _ => hD k j)) (Finset.mem_univ i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/AxisParameterCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AxisParameterCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..527974d70bb9ac3e3aa2d15f247a0193533c80a8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/AxisParameterCoordinates.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapConnectingArc + +namespace OAI + +/-! A smooth change of the longitudinal coordinate, leaving the +transverse coordinate fixed. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def axisParameterCoordinates (e : ℝ ≃ₜ ℝ) : Base ≃ₜ Base where + toFun x := ![x 0,e.symm (x 1)] + invFun x := ![x 0,e (x 1)] + left_inv x := by ext i; fin_cases i <;> simp + right_inv x := by ext i; fin_cases i <;> simp + continuous_toFun := by + apply continuous_pi + intro i + fin_cases i + · simpa using continuous_apply (0:Fin 2) + · change Continuous (fun x : Base => e.symm (x 1)) + exact e.symm.continuous.comp (continuous_apply (1:Fin 2)) + continuous_invFun := by + apply continuous_pi + intro i + fin_cases i + · simpa using continuous_apply (0:Fin 2) + · change Continuous (fun x : Base => e (x 1)) + exact e.continuous.comp (continuous_apply (1:Fin 2)) + +lemma axisParameterCoordinates_smooth {e : ℝ ≃ₜ ℝ} + (he : ContDiff ℝ ∞ e.symm) : ContDiff ℝ ∞ (axisParameterCoordinates e) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · simpa [axisParameterCoordinates] using contDiff_apply ℝ ℝ (0:Fin 2) + · change ContDiff ℝ ∞ (fun x : Base => e.symm (x 1)) + simpa only [Function.comp_def] using he.comp (contDiff_apply ℝ ℝ (1:Fin 2)) + +lemma axisParameterCoordinates_inverse_smooth {e : ℝ ≃ₜ ℝ} + (he : ContDiff ℝ ∞ e) : ContDiff ℝ ∞ (axisParameterCoordinates e).symm := by + apply contDiff_pi.mpr + intro i + fin_cases i + · simpa [axisParameterCoordinates] using contDiff_apply ℝ ℝ (0:Fin 2) + · change ContDiff ℝ ∞ (fun x : Base => e (x 1)) + simpa only [Function.comp_def] using he.comp (contDiff_apply ℝ ℝ (1:Fin 2)) + +lemma axisParameterCoordinates_axis (e : ℝ ≃ₜ ℝ) (t : ℝ) : + axisParameterCoordinates e (crosscapAxis (e t)) = crosscapAxis t := by + ext i + fin_cases i <;> simp [axisParameterCoordinates,crosscapAxis_apply] + +lemma axisParameterCoordinates_inverse_apply (e : ℝ ≃ₜ ℝ) (x : Base) : + (axisParameterCoordinates e).symm x = ![x 0,e (x 1)] := rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleAtlasBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleAtlasBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..73afd5f180ac01e4483a96365a85ad83d91efc3e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleAtlasBounds.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothingTransition + +namespace OAI + +/-! Weighted atlas bounds for section restoration. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] + +def BundleWeightedBound (s : ℝ) (m : ℕ) (C : ℝ) (u : ∀ x, E x) : Prop := + ∀ i : A.centers, WeightedBound univ s m C (A.bundleLocalize e i u) + +lemma bundleLocalize_sum {ι : Type*} (b : Finset ι) (i : A.centers) (u : ι → ∀ x, E x) : + A.bundleLocalize e i (fun x => ∑ k ∈ b, u k x) = + fun x => ∑ k ∈ b, A.bundleLocalize e i (u k) x := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> + simp [bundleLocalize, localize, bundleComponent, hx, Finset.smul_sum] + +variable [ContMDiffVectorBundle ∞ F E planeModel] [CompactSpace M] +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +/-- A finite family of local sections can be restored with fixed weighted +bounds at every order. -/ +theorem bundle_restoration_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : A.centers → Base → F) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (h i)) → + (∀ i, WeightedBound univ s m C (h i)) → + A.BundleWeightedBound e s m (D * C) + (fun x => ∑ i : A.centers, A.bundleRestore e i (h i) x) := by + classical + choose D hD hbound using fun i j : A.centers => A.bundle_pair_weighted_bound e hdomain i j m + refine ⟨∑ i : A.centers, ∑ j : A.centers, D i j, + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hD i j)), ?_⟩ + intro h s C hs hs1 hC hh hb i + have hf (j : A.centers) : ContDiff ℝ ∞ + (A.bundleLocalize e i (A.bundleRestore e j (h j))) := + A.bundleLocalize_smooth e hdomain i (A.bundleRestore_smooth e hdomain j (hh j)) + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hs.le + (Finset.univ : Finset A.centers) (fun j => D i j * C) + (fun j => A.bundleLocalize e i (A.bundleRestore e j (h j))) + (fun j _ => (hf j).contDiffOn) + (fun j _ => hbound i j (h j) s C hs hs1 hC (hh j) (hb j)) + rw [A.bundleLocalize_sum] + apply hsum.mono_const + rw [← Finset.sum_mul] + apply mul_le_mul_of_nonneg_right _ hC + exact Finset.single_le_sum + (fun k _ => Finset.sum_nonneg (fun j _ => hD k j)) (Finset.mem_univ i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleCutoffCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleCutoffCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..80d3edc828dd50b794ea800679705bd02be2932f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/BundleCutoffCoordinates.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.BundleAtlasBounds + +namespace OAI + +/-! Reading a section with an arbitrary compact chart cutoff is bounded by +its atlas norm. This allows phase patches to use unweighted tensor values. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + [ContMDiffVectorBundle ∞ F E planeModel] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) + +def bundleCutoff (i : A.centers) (ψ : M → ℝ) (u : ∀ x, E x) : Base → F := + localize (i : M) ψ (A.bundleComponent e i u) + +include hdomain +omit [ContMDiffVectorBundle ∞ F E planeModel] in +lemma bundleCutoff_restore (i j : A.centers) (ψ : M → ℝ) (h : Base → F) : + A.bundleCutoff e i ψ (A.bundleRestore e j h) = + fun x => localize (i : M) ψ (A.outer j) x • A.bundleTransition e i j x + (h (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 + · have hbi := hdomain i ((chart (i : M)).map_target hi) + have hbj := hdomain j hj + simp only [bundleCutoff, bundleComponent, localize, indicator_of_mem hi, + bundleRestore, map_smul, bundleTransition] + rw [(e i).continuousLinearMapAt_apply_of_mem ℝ hbi, + (e j).symmL_apply (R := ℝ) hbj, + ← (e j).coordChangeL_apply (R := ℝ) (e i) ⟨hbj,hbi⟩, smul_smul] + rfl + · have hz : A.outer j ((chart (i : M)).symm x) = 0 := + image_eq_zero_of_notMem_tsupport (fun hp => hj (A.outer_support j hp)) + simp only [bundleCutoff, bundleComponent, localize, indicator_of_mem hi, + bundleRestore, hz, zero_smul, map_zero, smul_zero] + · simp only [bundleCutoff, localize, indicator_of_notMem hi, zero_smul] + +variable [CompactSpace M] + +lemma bundleCutoff_smooth (i : A.centers) {ψ : M → ℝ} + (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) + (hsupp : tsupport ψ ⊆ (chart (i : M)).source) {u : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) : + ContDiff ℝ ∞ (A.bundleCutoff e i ψ u) := + localize_smooth_on (i : M) hψ hsupp (A.bundleComponent_smooth_on e hdomain i hu) + +/-- Cutoff coordinates lose no derivatives and have constants independent of +both the section and its weighted scale. -/ +theorem bundleCutoff_bound (i : A.centers) {ψ : M → ℝ} + (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) + (hsupp : tsupport ψ ⊆ (chart (i : M)).source) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ x, E x) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x)) → A.BundleWeightedBound e s m C u → + WeightedBound univ s m (D * C) (A.bundleCutoff e i ψ u) := by + classical + have hb (j : A.centers) : ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → F) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ f → WeightedBound univ s m C f → + WeightedBound univ s m (D * C) (A.bundleCutoff e i ψ (A.bundleRestore e j f)) := by + let K : Set Base := (chart (i : M)) '' (tsupport ψ ∩ tsupport (A.outer j)) + have hK : IsCompact K := + ((isClosed_tsupport ψ).inter (isClosed_tsupport (A.outer j))).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ hx => hsupp hx.1)) + have hKO : K ⊆ (transition (i : M) (j : M)).source := by + rintro x ⟨p,⟨hp,hq⟩,rfl⟩ + refine ⟨(chart (i : M)).map_source (hsupp hp),?_⟩ + change (chart (i : M)).symm (chart (i : M) p) ∈ (chart (j : M)).source + rw [(chart (i : M)).left_inv (hsupp hp)] + exact A.outer_support j hq + obtain ⟨D,hD,hd⟩ := compact_localized_clm_composition_bound + (transition (i : M) (j : M)).open_source hK hKO + (localize_smooth (i : M) hψ hsupp (A.outer_smooth j)) + (localize_tsupport_inter (i : M) hsupp (A.outer j)) + (A.bundleTransition_smooth e hdomain i j) (transition_smooth (i : M) (j : M)) m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hbf + rw [A.bundleCutoff_restore e hdomain] + exact hd f s C hs hs1 hC hf hbf + choose D hD hd using hb + refine ⟨∑ j : A.centers, D j, Finset.sum_nonneg (fun j _ => hD j),?_⟩ + intro u s C hs hs1 hC hu hbu + have heq : A.bundleCutoff e i ψ u = fun x => ∑ j : A.centers, + A.bundleCutoff e i ψ (A.bundleRestore e j (A.bundleLocalize e j u)) x := by + have hu' : u = (fun p => ∑ j : A.centers, + A.bundleRestore e j (A.bundleLocalize e j u) p) := + (funext (A.bundle_sum_restore_localize e hdomain u)).symm + funext x + conv_lhs => rw [hu'] + by_cases hx : x ∈ (chart (i : M)).target <;> + simp [bundleCutoff, bundleComponent, localize, hx, Finset.smul_sum] + rw [heq, Finset.sum_mul] + apply WeightedBound.finset_sum uniqueDiffOn_univ hs.le + · intro j _ + exact (A.bundleCutoff_smooth e hdomain i hψ hsupp + (A.bundleRestore_smooth e hdomain j (A.bundleLocalize_smooth e hdomain j hu))).contDiffOn + · intro j _ + exact hd j (A.bundleLocalize e j u) s C hs hs1 hC + (A.bundleLocalize_smooth e hdomain j hu) (hbu j) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CatalogPhaseBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CatalogPhaseBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c8d5d6ea45808e759d9af6508ad121892665d73 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CatalogPhaseBounds.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseCatalog +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadPrefixBounds + +namespace OAI + +/-! Every restored phase in the fixed catalog has a common derivative +budget, independent of the selected grid and the fast scale. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology 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 linearPhaseCatalog_derivative_bounds (V : Finset SmallModes.Base) : + ∃ P : ℕ → ℝ, (∀ m, 1 ≤ P m) ∧ + ∀ φ ∈ A.linearPhaseCatalog V, ∀ k : A.centers, + ∀ (s : ℝ), 0 < s → s ≤ 1 → ∀ m v, ‖v‖ ≤ 1 → + WeightedEstimates.WeightedBound univ s m (P m) (SmallModes.coordDeriv v (A.vectorPlaneRead k φ)) := by + classical + choose C hC hc using fun (φ : A.linearPhaseCatalog V) m => + A.exists_shifted_bound 1 m (A.linearPhaseCatalog_smooth V φ.val φ.property) + choose D hD hd using fun (k : A.centers) m => + A.vectorPlaneRead_directional_prefix_bound (V := ℝ) k m + let C₀ := fun m => ∑ φ : A.linearPhaseCatalog V, C φ m + let D₀ := fun m => ∑ k : A.centers, D k m + have hC₀ (m : ℕ) : 0 ≤ C₀ m := Finset.sum_nonneg (fun φ _ => hC φ m) + have hD₀ (m : ℕ) : 0 ≤ D₀ m := Finset.sum_nonneg (fun k _ => hD k m) + refine ⟨fun m => 1+D₀ m*C₀ m,fun m => le_add_of_nonneg_right + (mul_nonneg (hD₀ m) (hC₀ m)),?_⟩ + intro φ hφ k s hs hs1 m v hv + let f : A.linearPhaseCatalog V := ⟨φ,hφ⟩ + have hscale : A.ShiftedBound 1 m s (C f m) φ := by + intro i j hj x + have hh := hc f m i j hj x + simp only [one_pow,one_mul] at hh + calc + _ ≤ 1*‖iteratedFDeriv ℝ j (localize (i : M) (A.weight i) φ) x‖ := + mul_le_mul_of_nonneg_right (pow_le_one₀ hs.le hs1) (norm_nonneg _) + _ ≤ C f m := by simpa only [one_mul] using hh + have hc' : C f m ≤ C₀ m := + Finset.single_le_sum (fun g _ => hC g m) (Finset.mem_univ f) + have hd' : D k m ≤ D₀ m := + Finset.single_le_sum (fun i _ => hD i m) (Finset.mem_univ k) + apply (hd k m φ s (C f m) hs hs1 (hC f m) + (A.linearPhaseCatalog_smooth V φ hφ) hscale v hv).mono_const + exact (mul_le_mul hd' hc' (hC f m) (hD₀ m)).trans + (le_add_of_nonneg_left zero_le_one) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredAtlasDifferentials.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredAtlasDifferentials.lean new file mode 100644 index 0000000000000000000000000000000000000000..eaa10b57ad90d4a287df228380f8a4198641fc3d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredAtlasDifferentials.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredConvexPhase +import OAI.Geometry.SurfaceImmersion.Geometry.CovectorPullbackParameters + +namespace OAI + +/-! Centered quadratic phase covectors expressed through actual chart +transitions, with the Jacobian nondegeneracy needed for parameter selection. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma centered_phaseDerivative_comp {f : CurvePlane → CurvePlane} + {x : CurvePlane} (hf : DifferentiableAt ℝ f x) (ell c : CurvePlane) (L : ℝ) : + phaseDerivative (centeredConvexPhase ell L c ∘ f) x = + pullCovector (fderiv ℝ f x) (ell+L • (f x-c)) := by + unfold phaseDerivative + rw [fderiv_comp x ((centeredConvexPhase_smooth ell L c).differentiable (by simp) _) hf, + (centeredConvexPhase_hasFDerivAt ell L c (f x)).fderiv] + rfl + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma coordinateTransition_det_ne (q p : M) {x : CurvePlane} + (hx : x ∈ (coordinateTransition q p).source) : + coordDet (fderiv ℝ (coordinateTransition q p) x) ≠ 0 := by + let e := coordinateTransition q p + exact coordDet_fderiv_ne_zero_of_local_inverse e.open_source e.open_target + (coordinateTransition_smoothOn q p) (coordinateTransition_symm_smoothOn q p) + e.mapsTo (fun y hy => e.left_inv hy) hx + +lemma actual_centered_phase_differential (q p : M) (ell c : CurvePlane) (L : ℝ) + {x : CurvePlane} (hx : x ∈ (coordinateTransition q p).source) : + phaseDerivative ((centeredConvexPhase ell L c ∘ coordinateChart q) ∘ + (coordinateChart p).symm) x = + pullCovector (fderiv ℝ (coordinateTransition q p) x) + (ell+L • (coordinateTransition q p x-c)) := by + change phaseDerivative (centeredConvexPhase ell L c ∘ coordinateTransition q p) x = _ + exact centered_phaseDerivative_comp + ((((coordinateTransition_smoothOn q p) x hx).contDiffAt + ((coordinateTransition q p).open_source.mem_nhds hx)).differentiableAt (by simp)) ell c L + +lemma actual_centered_phase_at (q p : M) (ell c : CurvePlane) (L : ℝ) {z : M} + (hzp : z ∈ (coordinateChart p).source) (hzq : z ∈ (coordinateChart q).source) : + phaseDerivative ((centeredConvexPhase ell L c ∘ coordinateChart q) ∘ + (coordinateChart p).symm) (coordinateChart p z) = + pullCovector (fderiv ℝ (coordinateTransition q p) (coordinateChart p z)) + (ell+L • (coordinateChart q z-c)) := by + rw [actual_centered_phase_differential q p ell c L (coordinateTransition_mem_chart q p hzp hzq), + coordinateTransition_apply_chart q p hzp] + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredConvexPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredConvexPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..acc927e80f4a01985307674fe9e8e21a8f814d8d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredConvexPhase.lean @@ -0,0 +1,282 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SpatialPhaseBasis + +namespace OAI + +/-! Convex phases centered at the actual coordinate center of a circular +patch. The connection is evaluated at the original point, so translation +of the phase does not silently translate the metric. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def centeredConvexPhase (ell : Base) (L : ℝ) (c p : Base) : ℝ := + convexQuadraticPhase ell L (p-c) + +lemma centeredConvexPhase_smooth (ell : Base) (L : ℝ) (c : Base) : + ContDiff ℝ ∞ (centeredConvexPhase ell L c) := + (convexQuadraticPhase_smooth ell L).comp (contDiff_id.sub contDiff_const) + +lemma centeredConvexPhase_hasFDerivAt (ell : Base) (L : ℝ) (c p : Base) : + HasFDerivAt (centeredConvexPhase ell L c) (phaseLinear (ell+L • (p-c))) p := by + have ht : HasFDerivAt (fun x : Base => x-c) (ContinuousLinearMap.id ℝ Base) p := + (hasFDerivAt_id p).sub_const c + simpa only [centeredConvexPhase,Function.comp_def,ContinuousLinearMap.comp_id] using! + (convexQuadraticPhase_hasFDerivAt ell L (p-c)).comp p ht + +lemma centeredConvexPhase_coordDeriv (ell : Base) (L : ℝ) (c p v : Base) : + coordDeriv v (centeredConvexPhase ell L c) p = phaseLinear (ell+L • (p-c)) v := + congrArg (fun f : Base →L[ℝ] ℝ => f v) + (centeredConvexPhase_hasFDerivAt ell L c p).fderiv + +lemma centeredConvexPhase_phaseDerivative (ell : Base) (L : ℝ) (c p : Base) : + phaseDerivative (centeredConvexPhase ell L c) p = ell+L • (p-c) := by + unfold phaseDerivative + rw [(centeredConvexPhase_hasFDerivAt ell L c p).fderiv] + ext <;> simp [phaseLinear_apply,dx,dy] + +lemma centeredConvexPhase_second (ell : Base) (L : ℝ) (c p v w : Base) : + coordDeriv v (coordDeriv w (centeredConvexPhase ell L c)) p = + L*(v.1*w.1+v.2*w.2) := by + have he : coordDeriv w (centeredConvexPhase ell L c) = + fun p => phaseLinear ell w+L*phaseLinear w (p-c) := by + funext q + rw [centeredConvexPhase_coordDeriv] + simp only [phaseLinear_apply,Prod.fst_add,Prod.snd_add,Prod.smul_fst,Prod.smul_snd, + smul_eq_mul] + ring + have ht : HasFDerivAt (fun x : Base => x-c) (ContinuousLinearMap.id ℝ Base) p := + (hasFDerivAt_id p).sub_const c + have hd : HasFDerivAt (fun x : Base => phaseLinear w (x-c)) (phaseLinear w) p := by + simpa only [Function.comp_def,ContinuousLinearMap.comp_id] using! + ((phaseLinear w).hasFDerivAt (x := p-c)).comp p ht + have hh := (hasFDerivAt_const (phaseLinear ell w) p).add (hd.const_mul L) + rw [he] + change (fderiv ℝ ((fun _ : Base => phaseLinear ell w)+ + fun x => L*phaseLinear w (x-c)) p) v = _ + rw [hh.fderiv] + simp only [smul_apply,smul_eq_mul,zero_add,phaseLinear_apply] + ring + +lemma centeredConvexPhase_regular {ell c p : Base} {L : ℝ} (hL : 0 ≤ L) + (hp : L*‖p-c‖ < ‖ell‖) : phaseDerivative (centeredConvexPhase ell L c) p ≠ 0 := by + rw [centeredConvexPhase_phaseDerivative] + intro he + have heq : ell = -(L • (p-c)) := eq_neg_of_add_eq_zero_left he + rw [heq,norm_neg,norm_smul,Real.norm_eq_abs,abs_of_nonneg hL] at hp + exact lt_irrefl _ hp + +lemma centeredConvexPhase_hessian (h : Base → PhaseMean.Tensor) (ell : Base) (L : ℝ) + (c p v w : Base) : + coordinateMetricHessian h (centeredConvexPhase ell L c) p v w = + L*(v.1*w.1+v.2*w.2)-phaseLinear (ell+L • (p-c)) + (connectionContract (metricConnectionAt (h p,fderiv ℝ h p)) v w) := by + rw [coordinateMetricHessian,centeredConvexPhase_second,centeredConvexPhase_phaseDerivative] + +theorem centeredConvexPhase_hessian_lower {h : Base → PhaseMean.Tensor} + {ell c p : Base} {L B K r : ℝ} (hL : 0 ≤ L) (hB : 0 ≤ B) + (hK : ‖ell‖ ≤ K) (hp : ‖p-c‖ ≤ r) + (hGamma : ∀ i, ‖metricConnectionAt (h p,fderiv ℝ h p) i‖ ≤ B) (v : Base) : + (L-4*B*(K+L*r))*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (centeredConvexPhase ell L c) p v v := by + have hg1 : |ell.1+L*(p-c).1| ≤ K+L*r := by + calc + _ ≤ |ell.1|+|L*(p-c).1| := abs_add_le _ _ + _ ≤ K+L*r := by + rw [abs_mul,abs_of_nonneg hL] + exact add_le_add ((norm_fst_le ell).trans hK) + (mul_le_mul_of_nonneg_left ((norm_fst_le (p-c)).trans hp) hL) + have hg2 : |ell.2+L*(p-c).2| ≤ K+L*r := by + calc + _ ≤ |ell.2|+|L*(p-c).2| := abs_add_le _ _ + _ ≤ K+L*r := by + rw [abs_mul,abs_of_nonneg hL] + exact add_le_add ((norm_snd_le ell).trans hK) + (mul_le_mul_of_nonneg_left ((norm_snd_le (p-c)).trans hp) hL) + obtain ⟨hc1,hc2⟩ := connectionContract_diagonal_bound hB hGamma v + let C := connectionContract (metricConnectionAt (h p,fderiv ℝ h p)) v v + have hdot : |phaseLinear (ell+L • (p-c)) C| ≤ + 4*B*(K+L*r)*(v.1^2+v.2^2) := by + have hk : 0 ≤ K+L*r := (abs_nonneg _).trans hg1 + calc + _ ≤ |ell.1+L*(p-c).1| * |C.1|+|ell.2+L*(p-c).2| * |C.2| := by + simpa only [phaseLinear_apply,Prod.fst_add,Prod.snd_add,Prod.smul_fst, + Prod.smul_snd,smul_eq_mul,abs_mul] using + abs_add_le ((ell.1+L*(p-c).1)*C.1) ((ell.2+L*(p-c).2)*C.2) + _ ≤ (K+L*r)*(2*B*(v.1^2+v.2^2))+ + (K+L*r)*(2*B*(v.1^2+v.2^2)) := + add_le_add (mul_le_mul hg1 hc1 (abs_nonneg _) hk) + (mul_le_mul hg2 hc2 (abs_nonneg _) hk) + _ = _ := by ring + rw [centeredConvexPhase_hessian] + have hh := (le_abs_self (phaseLinear (ell+L • (p-c)) C)).trans hdot + dsimp only [C] at hh + nlinarith + +/-- The metric-jet compact set fixes the same Hessian constants at every +center; the first metric jet is always taken at the actual point. -/ +theorem compact_uniform_centered_convex_phases {J : Set MetricFirstJet} + (hJ : IsCompact J) (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) + {K : ℝ} (hK : 0 ≤ K) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ + ∀ (h : Base → PhaseMean.Tensor) (ell c p : Base), ‖ell‖ ≤ K → ‖p-c‖ ≤ r → + (h p,fderiv ℝ h p) ∈ J → ∀ v : Base, + (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (centeredConvexPhase ell L c) p v v := by + obtain ⟨B,hB,hbound⟩ := compact_metricConnection_bound hJ hdet + let L := 16*(B+1)*(K+1) + let r := (16*(B+1))⁻¹ + have hBp : 0 < 16*(B+1) := by positivity + have hL : 0 < L := by dsimp [L]; positivity + have hr : 0 < r := inv_pos.mpr hBp + have hLr : L*r = K+1 := by + dsimp [L,r] + field_simp [hBp.ne'] + have hsmall : 4*B*(K+L*r) ≤ L/2 := by + rw [hLr] + dsimp [L] + nlinarith + refine ⟨L,r,hL,hr,fun h ell c p hell hp hj v => ?_⟩ + have hb := centeredConvexPhase_hessian_lower hL.le hB hell hp (hbound _ hj) v + nlinarith [mul_le_mul_of_nonneg_right hsmall (add_nonneg (sq_nonneg v.1) (sq_nonneg v.2))] + +/-- Exact positive phase coefficients and Hessian margins survive +independent linear perturbations on a disk centered anywhere. -/ +theorem compact_perturbed_centered_phase_margin (P : PhaseBasis) + {T : Set PhaseMean.Tensor} (hT : IsCompact T) + (hTpos : ∀ H ∈ T, ∀ i, 0 < P.Q i H) + {J : Set MetricFirstJet} (hJ : IsCompact J) + (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) : + ∃ L r eps : ℝ, 0 < L ∧ 0 < r ∧ 0 < eps ∧ + ∀ ell : Fin 3 → Base, ‖ell-P.ξ‖ < eps → ∀ c p : Base, ‖p-c‖ ≤ r → + let xi := fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p + admissiblePhaseCovectors P xi ∧ + (∀ H ∈ T, ∀ i, 0 < perturbedPhaseCoefficient P xi i H) ∧ + ∀ h : Base → PhaseMean.Tensor, (h p,fderiv ℝ h p) ∈ J → ∀ i v, + (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (centeredConvexPhase (ell i) L c) p v v := by + obtain ⟨eta,heta,hpert⟩ := compact_positive_phase_perturbation P hT hTpos + obtain ⟨L,r,hL,hr,hess⟩ := compact_uniform_centered_convex_phases hJ hdet + (show 0 ≤ ‖P.ξ‖+1 by positivity) + let r' := min r (eta/(4*L)) + let eps := min (eta/4) 1 + have hr' : 0 < r' := lt_min hr (div_pos heta (mul_pos (by norm_num) hL)) + have heps : 0 < eps := lt_min (by positivity) zero_lt_one + refine ⟨L,r',eps,hL,hr',heps,fun ell hell c p hp => ?_⟩ + dsimp only + have hnorm : ‖(fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p)-P.ξ‖ < eta := by + have hbound : ‖(fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p)-P.ξ‖ ≤ + ‖ell-P.ξ‖+L*‖p-c‖ := by + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro i + simp only [Pi.sub_apply,centeredConvexPhase_phaseDerivative] + calc + ‖ell i+L • (p-c)-P.ξ i‖ = ‖(ell i-P.ξ i)+L • (p-c)‖ := by congr 1; abel + _ ≤ ‖ell i-P.ξ i‖+‖L • (p-c)‖ := norm_add_le _ _ + _ ≤ ‖ell-P.ξ‖+L*‖p-c‖ := by + simpa only [Pi.sub_apply,norm_smul,Real.norm_eq_abs,abs_of_nonneg hL.le] using + add_le_add (norm_le_pi_norm (ell-P.ξ) i) (le_refl ‖L • (p-c)‖) + have hpbound : L*‖p-c‖ ≤ eta/4 := by + calc + _ ≤ L*(eta/(4*L)) := + mul_le_mul_of_nonneg_left (hp.trans (min_le_right _ _)) hL.le + _ = eta/4 := by field_simp [hL.ne'] + have hellbound : ‖ell-P.ξ‖ < eta/4 := hell.trans_le (min_le_left _ _) + linarith + obtain ⟨hinv,hnz,hpos⟩ := hpert _ hnorm + refine ⟨⟨hinv,hnz⟩,hpos,fun h hj i v => ?_⟩ + apply hess h (ell i) c p _ (hp.trans (min_le_left _ _)) hj v + calc + ‖ell i‖ ≤ ‖ell i-P.ξ i‖+‖P.ξ i‖ := by simpa using norm_add_le (ell i-P.ξ i) (P.ξ i) + _ ≤ ‖ell-P.ξ‖+‖P.ξ‖ := add_le_add (norm_le_pi_norm (ell-P.ξ) i) (norm_le_pi_norm P.ξ i) + _ ≤ ‖P.ξ‖+1 := by + have : ‖ell-P.ξ‖ < 1 := hell.trans_le (min_le_right _ _) + linarith + +def centeredSpatialBasis (P : PhaseBasis) (ell : Fin 3 → Base) (L : ℝ) + (c p : Base) : PhaseBasis := + resolvedPhaseBasis P (fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p) + +lemma centeredSpatialBasis_covectors (P : PhaseBasis) (ell : Fin 3 → Base) (L : ℝ) + (c p : Base) + (hp : admissiblePhaseCovectors P + (fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p)) : + (centeredSpatialBasis P ell L c p).ξ = + fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p := + resolvedPhaseBasis_covectors P hp + +lemma centeredSpatialBasis_coefficient_smoothAt (P : PhaseBasis) (ell : Fin 3 → Base) + (L : ℝ) (c : Base) {p : Base} + (hp : admissiblePhaseCovectors P + (fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p)) (i : Fin 3) : + ContDiffAt ℝ ∞ (fun x => (centeredSpatialBasis P ell L c x).Q i) p := by + have hs : ContDiffAt ℝ ∞ + (fun x : Base => fun j : Fin 3 => phaseDerivative (centeredConvexPhase (ell j) L c) x) p := by + apply contDiffAt_pi.mpr + intro j + simp only [centeredConvexPhase_phaseDerivative] + exact contDiffAt_const.add ((contDiffAt_id.sub contDiffAt_const).const_smul L) + exact resolvedPhaseBasis_coefficient_smoothAt P hs hp i + +/-- A single genuine phase chart contains the entire smaller centered disk. -/ +theorem centered_convex_phase_charts_on_disk (ell : Fin 3 → Base) + (hell : ∀ i, ell i ≠ 0) (c : Base) {L r₀ : ℝ} (hL : 0 ≤ L) (hr₀ : 0 < r₀) : + ∃ r : ℝ, 0 < r ∧ r ≤ r₀ ∧ + ∃ e : Fin 3 → OpenPartialHomeomorph Base Base, + (∀ i x, (e i x).1 = centeredConvexPhase (ell i) L c x) ∧ + (∀ i, ContDiff ℝ ∞ (e i) ∧ ContDiffOn ℝ ∞ (e i).symm (e i).target) ∧ + ∀ i p, ‖p-c‖ ≤ r → p ∈ (e i).source := by + have hcharts (i : Fin 3) : + ∃ e : OpenPartialHomeomorph Base Base, c ∈ e.source ∧ + (∀ x, (e x).1 = centeredConvexPhase (ell i) L c x) ∧ + ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + apply exists_smooth_phase_chart (centeredConvexPhase_smooth (ell i) L c) + apply centeredConvexPhase_regular hL + simpa only [sub_self,norm_zero,mul_zero] using norm_pos_iff.mpr (hell i) + choose e he0 hephase hesmooth heinverse using hcharts + let U : Set Base := ⋂ i, (e i).source + have hU : IsOpen U := isOpen_iInter_of_finite (fun i => (e i).open_source) + have hc : c ∈ U := mem_iInter.mpr he0 + obtain ⟨eps,heps,hball⟩ := Metric.isOpen_iff.mp hU c hc + refine ⟨min r₀ (eps/2),lt_min hr₀ (half_pos heps),min_le_left _ _, + e,hephase,fun i => ⟨hesmooth i,heinverse i⟩,?_⟩ + intro i p hp + have hpball : p ∈ Metric.ball c eps := by + rw [Metric.mem_ball,dist_eq_norm] + exact (hp.trans (min_le_right _ _)).trans_lt (by linarith) + exact mem_iInter.mp (hball hpball) i + +/-- The actual spatial basis has precisely the centered phase gradients, +positive tensor coefficients, and smoothly varying coefficient maps. -/ +theorem compact_centered_spatial_basis (P : PhaseBasis) + {T : Set PhaseMean.Tensor} (hT : IsCompact T) + (hTpos : ∀ H ∈ T, ∀ i, 0 < P.Q i H) + {J : Set MetricFirstJet} (hJ : IsCompact J) + (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) : + ∃ L r eps : ℝ, 0 < L ∧ 0 < r ∧ 0 < eps ∧ + ∀ ell : Fin 3 → Base, ‖ell-P.ξ‖ < eps → ∀ c p : Base, ‖p-c‖ ≤ r → + ((centeredSpatialBasis P ell L c p).ξ = + fun i => phaseDerivative (centeredConvexPhase (ell i) L c) p) ∧ + (∀ H ∈ T, ∀ i, 0 < (centeredSpatialBasis P ell L c p).Q i H) ∧ + (∀ i, ContDiffAt ℝ ∞ (fun x => (centeredSpatialBasis P ell L c x).Q i) p) ∧ + ∀ h : Base → PhaseMean.Tensor, (h p,fderiv ℝ h p) ∈ J → ∀ i v, + (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (centeredConvexPhase (ell i) L c) p v v := by + obtain ⟨L,r,eps,hL,hr,heps,hall⟩ := + compact_perturbed_centered_phase_margin P hT hTpos hJ hdet + refine ⟨L,r,eps,hL,hr,heps,fun ell hell c p hp => ?_⟩ + obtain ⟨hxi,hpos,hess⟩ := hall ell hell c p hp + refine ⟨centeredSpatialBasis_covectors P ell L c p hxi,?_, + fun i => centeredSpatialBasis_coefficient_smoothAt P ell L c hxi i,hess⟩ + intro H hH i + change 0 < (resolvedPhaseBasis P _).Q i H + rw [resolvedPhaseBasis_coefficients P hxi i] + exact hpos H hH i + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredParabolicChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredParabolicChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ac5ed9309af3c6b968e90df863b8e2f8cd95d84 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CenteredParabolicChart.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ParabolicPhaseChart +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseChart + +namespace OAI + +/-! One explicit nonlinear phase chart on a whole centered neighborhood. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def phaseCovectorSquare (ell : Base) : ℝ := ell.1^2+ell.2^2 + +lemma phaseCovectorSquare_pos {ell : Base} (hell : ell ≠ 0) : 0 < phaseCovectorSquare ell := + covector_length_sq_pos hell + +def centeredPhaseCoordinates (ell : Base) (hell : ell ≠ 0) (c : Base) : Base ≃ₜ Base := + (Homeomorph.addRight (-c)).trans (phaseEquiv ell hell).toHomeomorph + +lemma centeredPhaseCoordinates_apply (ell : Base) (hell : ell ≠ 0) (c x : Base) : + centeredPhaseCoordinates ell hell c x = phaseEquiv ell hell (x-c) := by + rfl + +lemma centeredPhaseCoordinates_smooth (ell : Base) (hell : ell ≠ 0) (c : Base) : + ContDiff ℝ ∞ (centeredPhaseCoordinates ell hell c) := + (phaseEquiv ell hell).contDiff.comp (contDiff_id.sub contDiff_const) + +lemma centeredPhaseCoordinates_inverse_smooth (ell : Base) (hell : ell ≠ 0) (c : Base) : + ContDiff ℝ ∞ (centeredPhaseCoordinates ell hell c).symm := by + change ContDiff ℝ ∞ (fun x => (phaseEquiv ell hell).symm x - -c) + exact (phaseEquiv ell hell).symm.contDiff.sub contDiff_const + +def centeredParabolicChart (ell : Base) (hell : ell ≠ 0) (L : ℝ) (hL : L ≠ 0) (c : Base) : + OpenPartialHomeomorph Base Base := + (centeredPhaseCoordinates ell hell c).transOpenPartialHomeomorph + (parabolicPhaseChart (L/phaseCovectorSquare ell) + (div_ne_zero hL (phaseCovectorSquare_pos hell).ne')) + +lemma centeredParabolicChart_phase (ell : Base) (hell : ell ≠ 0) (L : ℝ) (hL : L ≠ 0) + (c x : Base) : + (centeredParabolicChart ell hell L hL c x).1 = centeredConvexPhase ell L c x := by + change (parabolicPhaseMap (L/phaseCovectorSquare ell) (centeredPhaseCoordinates ell hell c x)).1 = _ + rw [centeredPhaseCoordinates_apply] + simp only [parabolicPhaseMap,phaseEquiv_apply,Prod.fst_sub,Prod.snd_sub, + centeredConvexPhase,convexQuadraticPhase,phaseLinear_apply,phaseCovectorSquare] + have hA : ell.1^2+ell.2^2 ≠ 0 := (phaseCovectorSquare_pos hell).ne' + field_simp [hA] + ring + +lemma centeredParabolicChart_smooth (ell : Base) (hell : ell ≠ 0) (L : ℝ) (hL : L ≠ 0) + (c : Base) : ContDiff ℝ ∞ (centeredParabolicChart ell hell L hL c) := + (parabolicPhaseMap_smooth _).comp (centeredPhaseCoordinates_smooth ell hell c) + +lemma centeredParabolicChart_inverse_smooth (ell : Base) (hell : ell ≠ 0) + (L : ℝ) (hL : L ≠ 0) (c : Base) : + ContDiffOn ℝ ∞ (centeredParabolicChart ell hell L hL c).symm + (centeredParabolicChart ell hell L hL c).target := by + exact (centeredPhaseCoordinates_inverse_smooth ell hell c).comp_contDiffOn + (parabolicPhaseInverse_smooth _) + +lemma centeredParabolicChart_source (ell : Base) (hell : ell ≠ 0) (L : ℝ) (hL : L ≠ 0) + (c x : Base) : + x ∈ (centeredParabolicChart ell hell L hL c).source ↔ + 0 < phaseCovectorSquare ell+L*phaseLinear ell (x-c) := by + change 0 < 1+(L/phaseCovectorSquare ell)*(phaseEquiv ell hell (x-c)).1 ↔ _ + rw [← mul_pos_iff_of_pos_left (phaseCovectorSquare_pos hell)] + have hh : phaseCovectorSquare ell*(1+(L/phaseCovectorSquare ell)*(phaseEquiv ell hell (x-c)).1) = + phaseCovectorSquare ell+L*phaseLinear ell (x-c) := by + change phaseCovectorSquare ell*(1+(L/phaseCovectorSquare ell)*phaseLinear ell (x-c)) = _ + field_simp [(phaseCovectorSquare_pos hell).ne'] + rw [hh] + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartDisplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartDisplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..9adfc7a75f5df80a30b1460cbaa8cc13d934e260 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartDisplacement.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartFullLinearization + +namespace OAI + +/-! Real displacements and tensor targets transported through a permitted +phase chart, with their actual support and size estimates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +variable (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + (K : Compacts SmallModes.Base) (hK : (K : Set SmallModes.Base) ⊆ e.source) + (φ : SmallModes.Base → ℝ) (hphase : ∀ x ∈ e.source, (e x).1 = φ x) + +include hphase in +lemma chart_displacement_eq_indicator (τ : ℝ) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) : + QuadraticMean.displacement τ φ (chartPull e he K hK Z) = + e.source.indicator (RealModes.realOsc τ Z ∘ e) := by + funext x + by_cases hx : x ∈ e.source + · rw [Set.indicator_of_mem hx] + change QuadraticMean.displacement τ φ (chartPull e he K hK Z) x = RealModes.realOsc τ Z (e x) + have hh := chart_displacement_pull e he K hK φ hphase τ Z (e.map_source hx) + simpa only [e.left_inv hx] using hh + · rw [Set.indicator_of_notMem hx] + apply RealModes.displacement_zero_value + rw [chartPull_apply, Set.indicator_of_notMem hx] + +lemma chart_displacement_smooth_support (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) : + ContDiff ℝ ∞ (QuadraticMean.displacement τ φ (chartPull e he K hK Z)) ∧ + tsupport (QuadraticMean.displacement τ φ (chartPull e he K hK Z)) ⊆ K := by + refine ⟨contDiffOn_univ.mp (RealModes.contDiffOn_displacement hφ.contDiffOn + (chartPull e he K hK Z).contDiff.contDiffOn τ), ?_⟩ + apply closure_minimal _ K.isCompact.isClosed + intro x hx + by_contra hn + exact hx (RealModes.displacement_zero_value τ φ ((chartPull e he K hK Z).zero_on_compl hn)) + +include hphase in +lemma chart_displacement_bound {s : ℝ≥0} {τ C J : ℝ} {m : ℕ} + (_hs : 0 < (s : ℝ)) (hτ : 0 < τ) (hτs : τ ≤ s) (hτ1 : τ ≤ 1) + (hC : 0 ≤ C) (hJ : 1 ≤ J) + (hcoords : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) + (hZ : supportedWeightedSeminorm (chartSupport e K hK) s m Z ≤ C) : + WeightedBound Set.univ τ m ((m.factorial : ℝ) * (2 ^ m * C) * J ^ m) + (QuadraticMean.displacement τ φ (chartPull e he K hK Z)) := by + have hr := RealModes.weighted_realOsc isOpen_univ hτ hτs hC Z.contDiff.contDiffOn + ((weightedBound_of_supportedSeminorm s m Z).mono_const hZ) + have hrs : ContDiffOn ℝ ∞ (RealModes.realOsc τ Z) e.target := + RealModes.contDiffOn_realOsc Z.contDiff.contDiffOn τ + have hc := (hr.restrict_open e.open_target).comp_coordinates e.open_source.uniqueDiffOn + e.open_target.uniqueDiffOn hτ hτ1 hJ (by positivity) he hrs (fun _ hx => e.map_source hx) hcoords + have hz : ∀ x ∈ e.source, x ∉ (K : Set SmallModes.Base) → RealModes.realOsc τ Z (e x) = 0 := by + intro x hx hn + rw [RealModes.realOsc_eq_displacement] + exact RealModes.displacement_zero_value τ Prod.fst (chartPull_zero e K hK Z x hx hn) + rw [chart_displacement_eq_indicator e he K hK φ hphase] + exact hc.indicator_of_support e.open_source K.isCompact.isClosed hK (by positivity) hz + +include hphase in +lemma chart_forcing_realization (τ : ℝ) (f : SupportedField (F := ComplexTensor) K) + {y : SmallModes.Base} (hy : y ∈ e.target) : + pullbackField e.symm y (QuadraticMean.displacement τ φ f (e.symm y)) = + RealModes.realOsc τ (tensorChartPush e hi K hK f) y := by + have hp := hphase (e.symm y) (e.map_target hy) + rw [e.right_inv hy] at hp + rw [RealModes.realOsc_eq_displacement] + change pullbackField e.symm y (QuadraticMean.realMode (φ (e.symm y) / τ) (f (e.symm y))) = + QuadraticMean.realMode (y.1 / τ) (tensorChartPush e hi K hK f y) + rw [tensorChartPush_apply, Set.indicator_of_mem hy, ← hp] + exact (realMode_complexPullback (fderiv ℝ e.symm y) _ _).symm + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartFullLinearization.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartFullLinearization.lean new file mode 100644 index 0000000000000000000000000000000000000000..64f368bb99d4b5fb61e6ea6e67c4af032b4092c7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartFullLinearization.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartRealization + +namespace OAI + +/-! The exact full conjugated linear operator in a local phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes + +lemma realOsc_add_value {n : ℕ} (τ : ℝ) (Z W : SmallModes.Field n) (p : SmallModes.Base) : + realOsc τ (Z + W) p = realOsc τ Z p + realOsc τ W p := by + ext k + simp [realOsc, SmallModes.oscillate, QuadraticMean.realPart, mul_add] + +lemma realLinearized_conjugated_value {n : ℕ} {F : RField n} {Z : SmallModes.Field n} + {p : SmallModes.Base} (hF : DifferentiableAt ℝ F p) (hZ : DifferentiableAt ℝ Z p) (τ : ℝ) : + realLinearizedTensor F (realOsc τ Z) p = + realOsc τ (SmallModes.conjugatedD τ (fun q => complexify (F q)) Z) p := by + have hr := realLinearized_residual hF hZ τ (0 : SmallModes.Tensor) + have hz : realOsc τ (0 : SmallModes.Tensor) p = 0 := by + ext k + simp [realOsc, SmallModes.oscillate, QuadraticMean.realPart] + rw [hz, sub_zero] at hr + have he : SmallModes.residual τ (fun q => complexify (F q)) 0 Z = + SmallModes.conjugatedD τ (fun q => complexify (F q)) Z := by + funext q + simp only [SmallModes.residual, Pi.zero_apply, sub_zero] + rwa [he] at hr + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +theorem phaseChartFullLinearization + (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) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e (modeSupport K) hKe)) + {y : SmallModes.Base} (hy : y ∈ e.target) : + let X := QuadraticMean.displacement τ (coordinatePhase φ) (chartPull e he (modeSupport K) hKe Z) + let F := (G ∘ planeCoordinateIsometry.symm) ∘ e.symm + let R := phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe + pullbackField e.symm y (coordinateFullLinearized P ε G X (e.symm y)) = + RealModes.realOsc τ (SmallModes.conjugatedD τ (fun p => RealModes.complexify (F p)) Z + (R Z : SmallModes.Tensor)) y := by + dsimp only + change pullbackField e.symm y + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) _ (e.symm y) + + coordinateRealLinearized P ε G _ 0 (e.symm y)) = _ + rw [map_add, chart_metric_linearized e he hi (modeSupport K) hKe + (hG.comp planeCoordinateIsometry.symm.contDiff) + (hφ.comp planeCoordinateIsometry.symm.contDiff) hphase τ Z hy, + phaseChartPolynomialOperator_realization hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe hphase Z hy] + have hF : DifferentiableAt ℝ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) y := + ((hG.comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) _).comp y + ((hi.contDiffAt (e.open_target.mem_nhds hy)).differentiableAt (by simp)) + rw [RealModes.realLinearized_conjugated_value hF (Z.contDiff.differentiable (by simp) y) τ, + RealModes.realOsc_add_value] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartGermImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartGermImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..aef6642e0408139880da4ddaf80a25dd6c7cc200 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartGermImmersion.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartMapReplacement + +namespace OAI + +/-! Immersion of a smooth coordinate representative is equivalent to +immersion of the represented 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] + +lemma chart_germ_immersion_iff (p : M) {q : M} (hq : q ∈ (chart p).source) + {g : M → ProjectionTarget 3} {G : Base → ProjectionTarget 3} + (hG : ContDiff ℝ ∞ G) (he : g =ᶠ[𝓝 q] G ∘ chart p) : + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g q) ↔ + Function.Injective (fderiv ℝ G (chart p q)) := by + have hGc : ContMDiff 𝓘(ℝ,Base) 𝓘(ℝ,ProjectionTarget 3) ∞ G := hG.contMDiff + rw [he.mfderiv_eq,mfderiv_comp q (hGc.mdifferentiable (by simp)).mdifferentiableAt + ((chart_mdifferentiable p).mdifferentiableAt hq),mfderiv_eq_fderiv] + change Function.Injective (fderiv ℝ G (chart p q) ∘ + mfderiv planeModel 𝓘(ℝ,Base) (chart p) q) ↔ _ + constructor + · intro hi + exact hi.of_comp_right ((chart_mdifferentiable p).mfderiv_surjective hq) + · intro hi + exact hi.comp ((chart_mdifferentiable p).mfderiv_injective hq) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartImmersionReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartImmersionReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b9913a7a130c536e531392a24317b59126e4339 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartImmersionReplacement.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartPushforward + +namespace OAI + +/-! Transplanting an actual compactly supported immersion replacement +through 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] + [IsManifold planeModel ∞ M] [T2Space M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem chart_immersion_replacement (p : M) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) ∞ f) + {f₀ F : Base → V} (hF : ContDiff ℝ ∞ F) (hf₀ : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport (F-f₀)) + (hs : tsupport (F-f₀) ⊆ (chart p).target) + {O : Set Base} (hO : IsOpen O) (hKO : tsupport (F-f₀) ⊆ O) + (hmatch : EqOn (f ∘ (chart p).symm) f₀ O) + (hIF : ∀ x, Function.Injective (fderiv ℝ F x)) + (hIf : ∀ q ∉ (chart p).symm '' tsupport (F-f₀), + Function.Injective (mfderiv planeModel 𝓘(ℝ,V) f q)) : + ∃ g : M → V, ContMDiff planeModel 𝓘(ℝ,V) ∞ g ∧ + (∀ q, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) g q)) ∧ + ∀ q ∉ (chart p).symm '' tsupport (F-f₀), g q = f q := by + let δ := F-f₀ + let g := f+chartPushforward p δ + have hg : ContMDiff planeModel 𝓘(ℝ,V) ∞ g := + hf.add (chartPushforward_smooth p (hF.sub hf₀) hc hs) + refine ⟨g,hg,?_,?_⟩ + · intro q + by_cases hq : q ∈ (chart p).symm '' tsupport δ + · obtain ⟨x,hx,rfl⟩ := hq + have ht := hs hx + have hsource := (chart p).map_target ht + have hxo : chart p ((chart p).symm x) ∈ O := by + rw [(chart p).right_inv ht] + exact hKO hx + have he : g =ᶠ[𝓝 ((chart p).symm x)] F ∘ chart p := by + filter_upwards [(chart p).open_source.mem_nhds hsource, + ((chart p).continuousAt hsource).preimage_mem_nhds (hO.mem_nhds hxo)] with y hy hOy + have hm := hmatch hOy + change f ((chart p).symm (chart p y)) = f₀ (chart p y) at hm + rw [(chart p).left_inv hy] at hm + change f y+chartPushforward p δ y = F (chart p y) + rw [chartPushforward_source p δ hy,hm] + exact add_sub_cancel _ _ + rw [he.mfderiv_eq] + have hFc : ContMDiff 𝓘(ℝ,Base) 𝓘(ℝ,V) ∞ F := hF.contMDiff + rw [mfderiv_comp _ (hFc.mdifferentiable (by simp)).mdifferentiableAt + ((chart_mdifferentiable p).mdifferentiableAt hsource),mfderiv_eq_fderiv] + exact (hIF _).comp ((chart_mdifferentiable p).mfderiv_injective hsource) + · have hn : q ∉ tsupport (chartPushforward p δ) := + fun h => hq (chartPushforward_tsupport p hc hs h) + have he : g =ᶠ[𝓝 q] f := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + change f y+chartPushforward p δ y = f y + rw [hy] + exact add_zero _ + rw [he.mfderiv_eq] + exact hIf q hq + · intro q hq + change f q+chartPushforward p δ q = f q + rw [chartPushforward_zero_off p δ hq,add_zero] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartMapReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartMapReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a16a5383d5d4e6e92f7544b4c8c64b92ab8af0a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartMapReplacement.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartPushforward +import OAI.Geometry.SurfaceImmersion.Geometry.GenericProjectionParameter + +namespace OAI + +/-! A compactly supported change of a coordinate representative produces +an actual global smooth map, retaining its local and exterior 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] + [IsManifold planeModel ∞ M] [T2Space M] + +theorem chart_map_replacement (p : M) {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {f₀ F : Base → ProjectionTarget 3} (hF : ContDiff ℝ ∞ F) (hf₀ : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport (F-f₀)) + (hs : tsupport (F-f₀) ⊆ (chart p).target) + {O : Set Base} (hO : IsOpen O) + (hmatch : EqOn (f ∘ (chart p).symm) f₀ O) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + (∀ q ∈ (chart p).source, chart p q ∈ O → + g =ᶠ[𝓝 q] F ∘ chart p) ∧ + ∀ q ∉ (chart p).symm '' tsupport (F-f₀), g =ᶠ[𝓝 q] f := by + let δ := F-f₀ + let g := f+chartPushforward p δ + refine ⟨g,hf.add (chartPushforward_smooth p (hF.sub hf₀) hc hs),?_,?_⟩ + · intro q hq hOq + filter_upwards [(chart p).open_source.mem_nhds hq, + ((chart p).continuousAt hq).preimage_mem_nhds (hO.mem_nhds hOq)] with y hy hOy + have hm := hmatch hOy + change f ((chart p).symm (chart p y)) = f₀ (chart p y) at hm + rw [(chart p).left_inv hy] at hm + change f y+chartPushforward p δ y = F (chart p y) + rw [chartPushforward_source p δ hy,hm] + exact add_sub_cancel _ _ + · intro q hq + have hn : q ∉ tsupport (chartPushforward p δ) := + fun h => hq (chartPushforward_tsupport p hc hs h) + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + change f y+chartPushforward p δ y = f y + rw [hy] + exact add_zero _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartPushforward.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartPushforward.lean new file mode 100644 index 0000000000000000000000000000000000000000..85dce1dd4b7eadec57dd215266a51db1d0cc1deb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartPushforward.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! Extension by zero of a compactly supported coordinate correction. -/ +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 {V : Type*} [NormedAddCommGroup V] + +def chartPushforward (p : M) (δ : Base → V) : M → V := + (chart p).source.indicator (δ ∘ chart p) + +lemma chartPushforward_source (p : M) (δ : Base → V) {q : M} + (hq : q ∈ (chart p).source) : chartPushforward p δ q = δ (chart p q) := + indicator_of_mem hq _ + +lemma chartPushforward_zero_off (p : M) (δ : Base → V) {q : M} + (hq : q ∉ (chart p).symm '' tsupport δ) : chartPushforward p δ q = 0 := by + by_cases hs : q ∈ (chart p).source + · rw [chartPushforward_source p δ hs] + apply image_eq_zero_of_notMem_tsupport + intro hz + exact hq ⟨chart p q,hz,(chart p).left_inv hs⟩ + · exact indicator_of_notMem hs _ + +variable [T2Space M] + +lemma chartPushforward_tsupport (p : M) {δ : Base → V} + (hc : HasCompactSupport δ) (hs : tsupport δ ⊆ (chart p).target) : + tsupport (chartPushforward p δ) ⊆ (chart p).symm '' tsupport δ := by + have hK : IsCompact ((chart p).symm '' tsupport δ) := + hc.image_of_continuousOn ((chart p).symm.continuousOn.mono hs) + apply closure_minimal _ hK.isClosed + intro q hq + by_contra hn + exact hq (chartPushforward_zero_off p δ hn) + +variable [IsManifold planeModel ∞ M] [NormedSpace ℝ V] + +lemma chartPushforward_smooth (p : M) {δ : Base → V} + (hd : ContDiff ℝ ∞ δ) (hc : HasCompactSupport δ) + (hs : tsupport δ ⊆ (chart p).target) : + ContMDiff planeModel 𝓘(ℝ,V) ∞ (chartPushforward p δ) := by + intro q + by_cases hq : q ∈ tsupport (chartPushforward p δ) + · obtain ⟨z,hz,rfl⟩ := chartPushforward_tsupport p hc hs hq + have hsource := (chart p).map_target (hs hz) + have hlocal := hd.contMDiff.contMDiffAt.comp _ + ((chart_smooth p).contMDiffAt ((chart p).open_source.mem_nhds hsource)) + apply hlocal.congr_of_eventuallyEq + filter_upwards [(chart p).open_source.mem_nhds hsource] with y hy + exact chartPushforward_source p δ hy + · exact contMDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hq) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartReadSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartReadSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6211418f602ff48ca0d56da8543e48fb18ce705 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartReadSupport.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.VectorChartRead + +namespace OAI + +/-! Coordinate readings retain the support of the global input. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +lemma tsupport_comp_preimage {X Y V : Type*} [TopologicalSpace X] [TopologicalSpace Y] [Zero V] + (f : X → V) (g : Y → X) (hg : Continuous g) : tsupport (f ∘ g) ⊆ g ⁻¹' tsupport f := by + apply closure_minimal _ ((isClosed_tsupport f).preimage hg) + intro y hy + exact subset_tsupport f hy + +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 vectorPlaneRead_support_on_weight (k : A.centers) (F : M → V) + {x : SmallModes.Base} (hx : x ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base)) + (hF : x ∈ tsupport (A.vectorPlaneRead k F)) : + (chart (k : M)).symm (planeCoordinateIsometry.symm x) ∈ tsupport F := by + obtain ⟨y,⟨p,hp,rfl⟩,rfl⟩ := hx + have hr := tsupport_comp_preimage (A.vectorChartRead k F) planeCoordinateIsometry.symm + planeCoordinateIsometry.symm.continuous hF + change planeCoordinateIsometry.symm (planeCoordinateIsometry (chart (k : M) p)) ∈ + tsupport (localize (k : M) (A.outer k) F) at hr + rw [LinearIsometryEquiv.symm_apply_apply] at hr + obtain ⟨q,⟨hq,hqF⟩,he⟩ := localize_tsupport_inter (k : M) (A.outer_support k) F hr + have hqp : q = p := (chart (k : M)).injOn (A.outer_support k hq) (A.weight_support k hp) he + subst q + simpa only [LinearIsometryEquiv.symm_apply_apply,(chart (k : M)).left_inv (A.weight_support k hp)] + using hqF + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartSecondFormBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartSecondFormBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..21ee3f1655196fcf5267b4c3d92883a4b11e74e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartSecondFormBounds.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.Immersion.ClosedSurface.AtlasMargins +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases + +namespace OAI + +/-! Second-form norms in two fixed overlapping surface charts are comparable +with constants independent of the immersion. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry + +theorem norm_realSecondTensor_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) : + ‖realSecondTensor (F ∘ φ) p‖ ≤ 4*‖realSecondTensor F (φ p)‖*‖fderiv ℝ φ p‖^2 := 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 : NormalFrame.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 := norm_realSecondTensor_comp_smooth hG.contDiff hΦ.contDiff p hDG + (by simpa only [eD] using hdet) + rw [(realSecondTensor_eventuallyEq hecomp).eq_of_nhds,eD,ep, + (realSecondTensor_eventuallyEq heG).eq_of_nhds] at hh + exact hh + +end ClosedSurfaceR4.RealModes +namespace ClosedSurfaceR4 +open SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem compact_overlap_secondTensor_bound {K : Set M} (hK : IsCompact K) (q p : M) + (hKp : K ⊆ (coordinateChart p).source) (hKq : K ⊆ (coordinateChart q).source) : + ∃ C : ℝ, 0 < C ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ a ∈ K, Function.Injective (fderiv ℝ (coordinateMap F q) (coordinateChart q a)) → + ‖realSecondTensor (coordinateMap F p) (coordinateChart p a)‖ ≤ + C*‖realSecondTensor (coordinateMap F q) (coordinateChart q a)‖ := by + obtain ⟨d,C,hd,hC,hbound⟩ := coordinateTransition_compact_bounds q p + (coordinateChart_compact_image hK p hKp) (coordinateChart_image_overlap q p hKp hKq) + refine ⟨4 * C ^ 2,by positivity,?_⟩ + intro F hF a ha hI + have hx := coordinateTransition_mem_chart q p (hKp ha) (hKq ha) + have hy := coordinateTransition_apply_chart q p (hKp ha) + have hb := hbound (coordinateChart p a) (mem_image_of_mem _ ha) + have hdet : coordDet (fderiv ℝ (coordinateTransition q p) (coordinateChart p a)) ≠ 0 := + abs_pos.mp (hd.trans_le hb.1) + have htarget : coordinateTransition q p (coordinateChart p a) ∈ coordinateDomain q := by + rw [hy,← coordinateChart_target] + exact (coordinateChart q).map_source (hKq ha) + have hh := norm_realSecondTensor_comp_on (coordinateTransition q p).open_source + (coordinateDomain_open q) (coordinateMap_smoothOn hF q) (coordinateTransition_smoothOn q p) + hx htarget (by simpa only [hy,coordDeriv] using gramDet_ne_zero_of_injective _ hI) hdet + rw [(realSecondTensor_eventuallyEq (coordinateMap_transition_eventuallyEq F q p hx)).eq_of_nhds, + hy] at hh + calc + _ ≤ 4*‖realSecondTensor (coordinateMap F q) (coordinateChart q a)‖* + ‖fderiv ℝ (coordinateTransition q p) (coordinateChart p a)‖^2 := hh + _ ≤ 4*‖realSecondTensor (coordinateMap F q) (coordinateChart q a)‖ * C ^ 2 := by gcongr; exact hb.2 + _ = _ := by ring + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedLeadingTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedLeadingTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..0089f952cba68b1bf780f4334d856a38bb44ba6f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedLeadingTensor.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamily + +namespace OAI + +/-! The leading tensors of the actual charted amplitudes are the prescribed +cutoff squares times phase-covector squares. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean + +lemma chartLeadingTensor_apply (b : SmallModes.Base → ℝ) (e : SmallModes.Base → SmallModes.Base) + (x : SmallModes.Base) (k : Fin 3) : + chartLeadingTensor b e x k = b (e x) ^ 2 * + (fderiv ℝ e x (firstDirection k)).1 * (fderiv ℝ e x (secondDirection k)).1 := by + change evaluate (fun i => b (e x) ^ 2 * (firstDirection i).1 * (secondDirection i).1) + (fderiv ℝ e x (firstDirection k)) (fderiv ℝ e x (secondDirection k)) = _ + simp [evaluate, firstDirection, secondDirection, SmallModes.dx, SmallModes.dy] + +namespace PolynomialSolveData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + +lemma phase_derivative {x : SmallModes.Base} (hx : x ∈ c.e.source) (v : SmallModes.Base) : + (fderiv ℝ c.e x v).1 = fderiv ℝ (coordinatePhase φ) x v := by + have he : (fun y => (c.e y).1) =ᶠ[nhds x] coordinatePhase φ := by + filter_upwards [c.e.open_source.mem_nhds hx] with y hy using c.phase y hy + have hd := (c.smoothForward.contDiffAt (c.e.open_source.mem_nhds hx)).differentiableAt (by simp) + rw [← he.fderiv_eq, fderiv.fst hd] + rfl + +lemma leadingField_apply (b : SupportedField (F := ℝ) c.chartCompact) (x : SmallModes.Base) : + c.leadingField b x = c.e.source.indicator (fun y k => b (c.e y) ^ 2 * + fderiv ℝ (coordinatePhase φ) y (firstDirection k) * + fderiv ℝ (coordinatePhase φ) y (secondDirection k)) x := by + by_cases hx : x ∈ c.e.source + · simp only [leadingField, realTensorChartPull_apply, Set.indicator_of_mem hx] + change chartLeadingTensor b c.e x = _ + ext k + rw [chartLeadingTensor_apply, c.phase_derivative hx, c.phase_derivative hx] + · simp only [leadingField, realTensorChartPull_apply, Set.indicator_of_notMem hx] + +end PolynomialSolveData + +namespace ChartedMeanData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference) + +lemma leading_apply (hρ : 0 < ρ) {A : SmallModes.Base → Tensor} + (hA : ContDiff ℝ ∞ A) (hball : InTrialBall Set.univ reference r A) (x : SmallModes.Base) : + d.leading hρ A x = c.e.source.indicator (fun y k => d.cutoff (c.e y) ^ 2 * + d.form (c.e y) (A y) * fderiv ℝ (coordinatePhase φ) y (firstDirection k) * + fderiv ℝ (coordinatePhase φ) y (secondDirection k)) x := by + change c.leadingField (d.amplitude hρ A) x = _ + rw [c.leadingField_apply] + by_cases hx : x ∈ c.e.source + · simp only [Set.indicator_of_mem hx] + have ha := c.trialAmplitude_apply d.cutoff d.form d.localBounds hρ hA.contDiffOn + (fun y _ => hball y (Set.mem_univ y)) (c.e x) + have hpos := coefficient_trial_range d.localBounds.invInto d.localBounds.margin + (fun y _ => hball y (Set.mem_univ y)) (c.e.map_source hx) + have hn : 0 ≤ coefficient d.form c.e.symm A (c.e x) := hρ.le.trans hpos.1 + have hn' : 0 ≤ d.form (c.e x) (A x) := by + simpa only [coefficient, c.e.left_inv hx] using hn + ext k + change c.trialAmplitude d.cutoff d.form d.localBounds hρ A (c.e x) ^ 2 * _ * _ = _ + rw [ha] + simp only [phaseAmplitude, mul_pow, coefficient, c.e.left_inv hx, Real.sq_sqrt hn'] + · simp only [Set.indicator_of_notMem hx] + +end ChartedMeanData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedPartitionLeading.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedPartitionLeading.lean new file mode 100644 index 0000000000000000000000000000000000000000..464ec99f2275efbf1ecef9a944bafcd719a7607e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedPartitionLeading.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedLeadingTensor +import OAI.Geometry.Immersion.ClosedSurface.PhaseStock +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases + +namespace OAI + +/-! A supported phase family has leading tensor equal to the cutoff square + times its input tensor. This is the local identity used by the global atlas. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean PhaseGeometry + +lemma covectorSquare_directions (ξ : SmallModes.Base) (k : Fin 3) : + covectorSquare ξ k = phaseLinear ξ (firstDirection k) * phaseLinear ξ (secondDirection k) := by + fin_cases k <;> simp [covectorSquare, firstDirection, secondDirection, phaseLinear_apply, + SmallModes.dx, SmallModes.dy] <;> ring + +theorem charted_cutoff_leading {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference) (hρ : 0 < ρ) + (χ : SmallModes.Base → ℝ) (Q : Tensor →L[ℝ] ℝ) (ξ : SmallModes.Base) (w : ℝ) + (hw : w ≠ 0) (hphase : coordinatePhase φ = phaseLinear (w • ξ)) + (hcutoff : ∀ x ∈ c.e.source, d.cutoff (c.e x) = χ x / w) + (hform : ∀ x ∈ c.e.source, d.form (c.e x) = Q) + (hsupport : tsupport χ ⊆ c.e.source) {A : SmallModes.Base → Tensor} + (hA : ContDiff ℝ ∞ A) (hball : InTrialBall Set.univ reference r A) (x : SmallModes.Base) : + d.leading hρ A x = (χ x)^2 • (Q (A x) • covectorSquare ξ) := by + rw [d.leading_apply hρ hA hball] + by_cases hx : x ∈ c.e.source + · rw [Set.indicator_of_mem hx] + have hd (v : SmallModes.Base) : fderiv ℝ (coordinatePhase φ) x v = w * phaseLinear ξ v := by + rw [hphase, (phaseLinear (w • ξ)).fderiv] + simp only [phaseLinear_apply, Prod.smul_fst, Prod.smul_snd, smul_eq_mul] + ring + ext k + simp only [hcutoff x hx, hform x hx, hd, Pi.smul_apply, smul_eq_mul, + covectorSquare_directions] + field_simp [hw] + · have hz : χ x = 0 := image_eq_zero_of_notMem_tsupport (fun h => hx (hsupport h)) + simp only [Set.indicator_of_notMem hx, hz, zero_pow (by decide : 2 ≠ 0), zero_smul] + +theorem charted_partition_leading {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Fin 3 → Base → ℝ} + {K : Fin 3 → Compacts Base} {s : ℝ≥0} + {c : ∀ j, PolynomialSolveData P ε G hG (φ j) (K j) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ j, ChartedMeanData (c j) r ρ R reference) (hρ : 0 < ρ) + (χ : SmallModes.Base → ℝ) (Q : PhaseBasis) (w : Fin 3 → ℝ) + (hw : ∀ j, w j ≠ 0) (hphase : ∀ j, coordinatePhase (φ j) = phaseLinear (w j • Q.ξ j)) + (hcutoff : ∀ j x, x ∈ (c j).e.source → (d j).cutoff ((c j).e x) = χ x / w j) + (hform : ∀ j x, x ∈ (c j).e.source → (d j).form ((c j).e x) = Q.Q j) + (hsupport : ∀ j, tsupport χ ⊆ (c j).e.source) {A : SmallModes.Base → Tensor} + (hA : ContDiff ℝ ∞ A) (hball : InTrialBall Set.univ reference r A) : + chartedFamilyLeading d hρ A = fun x => (χ x)^2 • A x := by + funext x + change (∑ j : Fin 3, (d j).leading hρ A x) = _ + simp_rw [charted_cutoff_leading _ hρ χ _ _ _ (hw _) (hphase _) (hcutoff _) (hform _) + (hsupport _) hA hball] + rw [← Finset.smul_sum, Q.decomposition] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..e917d68add2c054bc30a8b7a2ab0a7709f749236 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialAmplitude.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedCombinedMeanBounds +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedTrialAmplitude + +namespace OAI + +/-! Cutoff square-root trial amplitudes on the actual transported support. +These use the original tensor field and the inverse of its phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Q : SmallModes.Base → Tensor →L[ℝ] ℝ) + (h : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ Q c.e c.e.symm) + +def trialAmplitude (hρ : 0 < ρ) (A : SmallModes.Base → Tensor) : + SupportedField (F := ℝ) c.chartCompact := by + classical + exact if ha : ContDiffOn ℝ ∞ A c.e.source ∧ InTrialBall c.e.source reference r A then + supportedRootAmplitude h.domain.isOpen c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) ψ (coefficient Q c.e.symm 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 trialAmplitude_apply (hρ : 0 < ρ) {A : SmallModes.Base → Tensor} + (hA : ContDiffOn ℝ ∞ A c.e.source) (hball : InTrialBall c.e.source reference r A) + (y : SmallModes.Base) : + c.trialAmplitude ψ Q h hρ A y = phaseAmplitude ψ (coefficient Q c.e.symm A) y := by + classical + simp only [trialAmplitude, dite_eq_left (show ContDiffOn ℝ ∞ A c.e.source ∧ + InTrialBall c.e.source reference r A from ⟨hA,hball⟩)] + rfl + +theorem trialAmplitude_bounds + (d : Budgets c.e.source c.e.target s c.realMap ψ Q c.e c.e.symm) + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hρ : 0 < ρ) (m : ℕ) (C : ℝ) : + ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ (A B : SmallModes.Base → Tensor) (D : ℝ), 0 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ A c.e.source → ContDiffOn ℝ ∞ B c.e.source → + InTrialBall c.e.source reference r A → InTrialBall c.e.source reference r B → + WeightedBound c.e.source s m C A → WeightedBound c.e.source s m C B → + WeightedBound c.e.source s m D (A - B) → + supportedWeightedSeminorm c.chartCompact s m (c.trialAmplitude ψ Q h hρ A) ≤ A₀ ∧ + supportedWeightedSeminorm c.chartCompact s m (c.trialAmplitude ψ Q h hρ B) ≤ A₀ ∧ + supportedWeightedSeminorm c.chartCompact s m + (c.trialAmplitude ψ Q h hρ A - c.trialAmplitude ψ Q h hρ B) ≤ A₀ * inputFactor d m * D := by + obtain ⟨A₀,hA₀,ha⟩ := h.amplitude_bounds d hs hs1 hρ m 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 := c.trialAmplitude ψ Q h hρ A + let b := c.trialAmplitude ψ Q h hρ B + have heA : (a : SmallModes.Base → ℝ) = phaseAmplitude ψ (coefficient Q c.e.symm A) := + funext (c.trialAmplitude_apply ψ Q h hρ hA hballA) + have heB : (b : SmallModes.Base → ℝ) = phaseAmplitude ψ (coefficient Q c.e.symm B) := + funext (c.trialAmplitude_apply ψ Q h hρ hB hballB) + have hA0 : 0 ≤ A₀ := zero_le_one.trans hA₀ + have hD0 : 0 ≤ A₀ * inputFactor d m * D := mul_nonneg (mul_nonneg hA0 (inputFactor_nonneg d m)) hD + have hau : WeightedBound c.e.target s m A₀ a := by simpa only [heA] using hu + have hav : WeightedBound c.e.target s m A₀ b := by simpa only [heB] using hv + have had : WeightedBound c.e.target s m (A₀ * inputFactor d m * D) (a - b) := by + change WeightedBound c.e.target s m _ (fun x => a x - b x) + simpa only [heA, heB] using hd + have hsp := chartSupport_subset c.e (modeSupport K) c.supportChart + exact ⟨supportedSeminorm_le_of_weightedBound hs hA0 a + (hau.extend_support c.e.open_target (a.tsupport_subset.trans hsp) hA0), + supportedSeminorm_le_of_weightedBound hs hA0 b + (hav.extend_support c.e.open_target (b.tsupport_subset.trans hsp) hA0), + supportedSeminorm_le_of_weightedBound hs hD0 (a - b) + (had.extend_support c.e.open_target ((a - b).tsupport_subset.trans hsp) hD0)⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialMajorants.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialMajorants.lean new file mode 100644 index 0000000000000000000000000000000000000000..519d1b4cde2a0a3aeb38b642566a63ed3eeda766 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedTrialMajorants.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedTrialMean +import OAI.Geometry.SurfaceImmersion.Correction.FixedMeanSubstitution + +namespace OAI + +/-! The actual charted trial mean satisfies the finite-substitution +interface, with majorants chosen before the amplitude scale. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Q : SmallModes.Base → Tensor →L[ℝ] ℝ) + (h : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ Q c.e c.e.symm) + +theorem trialMean_majorants + (d : Budgets c.e.source c.e.target s c.realMap ψ Q c.e c.e.symm) + (hρ : 0 < ρ) {Q₀ : Set LowJet} (hQ : IsCompact Q₀) (hQO : Q₀ ⊆ c.O) + (q : ℕ) (B F : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hF : ∀ m, 0 ≤ F m) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (hGQ : Set.MapsTo (lowJet G) c.U Q₀) + (hGb : ∀ m, WeightedBound c.U s (m + tensorOrder P) (B m) (lowJet G)) + (hφb : ∀ m v, WeightedBound c.U s (m + tensorOrder P) (F m) + (fun x => fderiv ℝ φ x (coordinateVector v))) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r L + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (c.trialMean ψ Q h hρ δ q)) β κ := by + have hex (m : ℕ) (C : ℝ) := c.trialMean_estimates ψ Q h d hρ hQ hQO q m C (B m) (F m) + (hB m) (hF m) hτ hs hτs hs1 hε hε1 hsmall hGQ (hGb m) (hφb m) + choose β κ hβ hκ he using hex + refine ⟨β,κ,?_⟩ + intro δ hδ + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + apply rescaledMean_bounds isOpen_univ.uniqueDiffOn hη _ β κ + (fun m C _ => hβ m C) (fun m C _ => hκ m C) + · intro A _ _ + exact (c.combinedMeanField δ q (c.trialAmplitude ψ Q h hρ A)).contDiff.contDiffOn + · intro m C A hC hA hball hb + have hz : WeightedBound c.e.source s + (m + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1))) 0 (A - A) := by + apply (weightedBound_zero c.e.source s _ (F := Tensor)).congr + intro x _ + exact sub_self (A x) + exact (he m C δ hδ A A 0 (zero_le_one.trans hC) le_rfl + (hA.mono (Set.subset_univ _)) (hA.mono (Set.subset_univ _)) + (fun x _ => hball x (Set.mem_univ x)) (fun x _ => hball x (Set.mem_univ x)) + (hb.restrict_open c.e.open_source) (hb.restrict_open c.e.open_source) hz).1 + · intro m C D A B hC hD hA hB hballA hballB hbA hbB hbD + exact (he m C δ hδ A B D (zero_le_one.trans hC) hD + (hA.mono (Set.subset_univ _)) (hB.mono (Set.subset_univ _)) + (fun x _ => hballA x (Set.mem_univ x)) (fun x _ => hballB x (Set.mem_univ x)) + (hbA.restrict_open c.e.open_source) (hbB.restrict_open c.e.open_source) + (hbD.restrict_open c.e.open_source)).2 + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..e48c9be7d5f2da5645643f14edacdb47dacae8ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformAmplitude.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformTrialAmplitude +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedTrialAmplitude + +namespace OAI + +/-! Uniform bounds on the actual supported trial amplitudes. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_charted_trial_amplitude {V : Set SmallModes.Base} (hV : IsOpen V) + {ρ R : ℝ} (hρ : 0 < ρ) (m : ℕ) (A I Q Ψ : ℝ) + (hI : 1 ≤ I) (hQ : 1 ≤ Q) (hΨ : 1 ≤ Ψ) : + let J := 2 ^ m * Q * (m.factorial : ℝ) * I ^ m + ∃ A₀ : ℝ, 1 ≤ A₀ ∧ ∀ {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + {r : ℝ} {reference : SmallModes.Base → Tensor} + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Qf : SmallModes.Base → Tensor →L[ℝ] ℝ) + (h : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ Qf c.e c.e.symm) + (d : Budgets c.e.source c.e.target s c.realMap ψ Qf c.e c.e.symm), + c.e.target = V → d.inv m = I → d.forms m = Q → d.psi m = Ψ → + 0 < (s : ℝ) → s ≤ 1 → + ∀ (B C : SmallModes.Base → Tensor) (D : ℝ), 0 ≤ A → 0 ≤ D → + ContDiffOn ℝ ∞ B c.e.source → ContDiffOn ℝ ∞ C c.e.source → + InTrialBall c.e.source reference r B → InTrialBall c.e.source reference r C → + WeightedBound c.e.source s m A B → WeightedBound c.e.source s m A C → + WeightedBound c.e.source s m D (B - C) → + supportedWeightedSeminorm c.chartCompact s m (c.trialAmplitude ψ Qf h hρ B) ≤ A₀ ∧ + supportedWeightedSeminorm c.chartCompact s m (c.trialAmplitude ψ Qf h hρ C) ≤ A₀ ∧ + supportedWeightedSeminorm c.chartCompact s m + (c.trialAmplitude ψ Qf h hρ B - c.trialAmplitude ψ Qf h hρ C) ≤ A₀ * J * D := by + obtain ⟨A₀,hA₀,ha⟩ := uniform_local_amplitude_bounds (R := R) hV hρ m A I Q Ψ hI hQ hΨ + refine ⟨A₀,hA₀,?_⟩ + intro n P ε τ G hG φ K s c r reference ψ Qf h d hv hi hq hψ hs hs1 B C D hA hD hB hC + hballB hballC hbB hbC hbD + rw [← hv] at ha + obtain ⟨hu,hv',hd⟩ := ha c.e.source s r reference c.realMap ψ Qf c.e c.e.symm h d + hi hq hψ hs hs1 B C D hA hD hB hC hballB hballC hbB hbC hbD + let b := c.trialAmplitude ψ Qf h hρ B + let e := c.trialAmplitude ψ Qf h hρ C + have heb : (b : SmallModes.Base → ℝ) = RootMean.phaseAmplitude ψ (coefficient Qf c.e.symm B) := + funext (c.trialAmplitude_apply ψ Qf h hρ hB hballB) + have hec : (e : SmallModes.Base → ℝ) = RootMean.phaseAmplitude ψ (coefficient Qf c.e.symm C) := + funext (c.trialAmplitude_apply ψ Qf h hρ hC hballC) + let J := 2 ^ m * Q * (m.factorial : ℝ) * I ^ m + have hJ : 0 ≤ J := by dsimp [J]; positivity + have hA0 : 0 ≤ A₀ := zero_le_one.trans hA₀ + have hD0 : 0 ≤ A₀ * J * D := mul_nonneg (mul_nonneg hA0 hJ) hD + have hb : WeightedBound c.e.target s m A₀ b := by simpa only [heb] using hu + have he : WeightedBound c.e.target s m A₀ e := by simpa only [hec] using hv' + have hdiff : WeightedBound c.e.target s m (A₀ * J * D) (b - e) := by + change WeightedBound c.e.target s m _ (fun x => b x - e x) + simpa only [heb,hec] using hd + have hsp := chartSupport_subset c.e (modeSupport K) c.supportChart + exact ⟨supportedSeminorm_le_of_weightedBound hs hA0 b + (hb.extend_support c.e.open_target (b.tsupport_subset.trans hsp) hA0), + supportedSeminorm_le_of_weightedBound hs hA0 e + (he.extend_support c.e.open_target (e.tsupport_subset.trans hsp) hA0), + supportedSeminorm_le_of_weightedBound hs hD0 (b - e) + (hdiff.extend_support c.e.open_target ((b - e).tsupport_subset.trans hsp) hD0)⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformMajorants.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformMajorants.lean new file mode 100644 index 0000000000000000000000000000000000000000..781ef377af76265a1c555fb776eb8cb78cabad65 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformMajorants.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformTrialMean + +namespace OAI + +/-! Uniform finite-loss majorants for the actual mean operators. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_charted_majorants {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : ChartedMeanProfile P) {ρ R : ℝ} (hρ : 0 < ρ) (q : ℕ) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), p.Fits d → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r L + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (d.mean hρ δ q)) β κ := by + have hex (m : ℕ) (C : ℝ) := uniform_charted_trial_mean (R := R) p hρ q m C + choose β κ hβ hκ he using hex + refine ⟨β,κ,?_⟩ + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + apply rescaledMean_bounds isOpen_univ.uniqueDiffOn hη _ β κ + (fun m C _ => hβ m C) (fun m C _ => hκ m C) + · intro A _ _ + exact (c.combinedMeanField δ q (d.amplitude hρ A)).contDiff.contDiffOn + · intro m C A hC hA hball hb + have hz : WeightedBound c.e.source s + (m + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1))) 0 (A - A) := by + apply (weightedBound_zero c.e.source s _ (F := Tensor)).congr + intro x _ + exact sub_self (A x) + exact (he m C d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ A A 0 + (zero_le_one.trans hC) le_rfl + (hA.mono (Set.subset_univ _)) (hA.mono (Set.subset_univ _)) + (fun x _ => hball x (Set.mem_univ x)) (fun x _ => hball x (Set.mem_univ x)) + (hb.restrict_open c.e.open_source) (hb.restrict_open c.e.open_source) hz).1 + · intro m C D A B hC hD hA hB hballA hballB hbA hbB hbD + exact (he m C d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ A B D + (zero_le_one.trans hC) hD (hA.mono (Set.subset_univ _)) (hB.mono (Set.subset_univ _)) + (fun x _ => hballA x (Set.mem_univ x)) (fun x _ => hballB x (Set.mem_univ x)) + (hbA.restrict_open c.e.open_source) (hbB.restrict_open c.e.open_source) + (hbD.restrict_open c.e.open_source)).2 + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..1eb14e8543c9769a47ced8759b4c940031f7f9d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ChartedUniformSeed.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFree + +namespace OAI + +/-! Uniform slow-scale bounds for the original-coordinate free amplitudes, +as required by the quadratic target estimates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_charted_seed_bound {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : ChartedMeanProfile P) {ρ R : ℝ} (hρ : 0 < ρ) (q m : ℕ) (C : ℝ) : + ∃ B : ℝ, 1 ≤ B ∧ ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), p.Fits d → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 ≤ δ → + ∀ A : SmallModes.Base → Tensor, 0 ≤ C → ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + WeightedBound Set.univ s (PolynomialSolveData.inputOrder (P := P) q m) C A → + WeightedBound Set.univ s m (B * (δ * τ)) (d.freeAmplitude hρ δ q A) := by + let j := PolynomialSolveData.inputOrder (P := P) q m + obtain ⟨A₀,hA₀,ha⟩ := uniform_charted_trial_amplitude (R := R) p.openV hρ j C + (p.inv j) (p.forms j) (p.psi j) (p.oneLEInv j) (p.oneLEForms j) (p.oneLEPsi j) + let B₀ := (m.factorial : ℝ) * p.J m ^ m * + correctedSeedBudget (tensorOrder P) p.C p.D q m (p.normal j) + refine ⟨max 1 (B₀ * A₀),le_max_left _ _,?_⟩ + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + have hz : WeightedBound c.e.source s j 0 (A - A) := by + apply (weightedBound_zero c.e.source s j (F := Tensor)).congr + intro x _ + exact sub_self (A x) + obtain ⟨hu,_,_⟩ := ha c d.cutoff d.form d.localBounds d.budgets hd.target + (congrFun hd.inverse j) (congrFun hd.forms j) (congrFun hd.cutoff j) hs hs1 + A A 0 hC le_rfl hA.contDiffOn hA.contDiffOn + (fun x _ => hball x (Set.mem_univ x)) (fun x _ => hball x (Set.mem_univ x)) + (hbA.restrict_open c.e.open_source) (hbA.restrict_open c.e.open_source) hz + have hn : WeightedBound c.e.target s j (p.normal j) (freeNormal c.realMap) := by + simpa only [hd.normal] using d.budgets.normal_bound j + have hb := c.originalFreeSeed_bound hδ hτ hs hτs hs1 hε hsmall q m + (zero_le_one.trans hA₀) (zero_le_one.trans (p.oneLENormal j)) hn (d.amplitude hρ A) hu + have hb' : supportedWeightedSeminorm K s m (d.freeAmplitude hρ δ q A) ≤ + B₀ * A₀ * (δ * τ) := by + simpa only [ChartedMeanData.freeAmplitude,hd.coefficients,hd.perturbation,hd.coordinates,B₀] using hb + exact ((weightedBound_of_supportedSeminorm s m (d.freeAmplitude hρ δ q A)).mono_const hb').mono_const + (mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hδ hτ.le)) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CombinedTensorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CombinedTensorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b0780dcdb0f846f3c69a8ccd6685d135286915b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CombinedTensorBounds.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanTensor + +namespace OAI + +/-! Common-order estimates for the combined tensor mean on bounded supported +amplitudes, ready for substitution of the actual trial-field amplitudes. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes +open PhaseMean (firstDirection secondDirection firstDirection_norm secondDirection_norm) +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +theorem combinedSeedTensor_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ i l, (P i l).SmoothCoeffs O) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (_hG : ContDiff ℝ ∞ G) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + tensorLoss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + tensorOrder P) B₀ (lowJet G) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (b c : SupportedField (F := ℝ) (modeSupport K)) (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) b ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) c ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) (b - c) ≤ A * d → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (combinedMeanTensor P δ τ ε G hF h K hKV R q b) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => combinedMeanTensor P δ τ ε G hF h K hKV R q b x - + combinedMeanTensor P δ τ ε G hF h K hKV R q c x) := by + classical + have hex (i : Fin 3) := combinedSeedMean_bounds (L := L) hU hO hQ hQO (P i) (hP i) m B₀ hB₀ + hF h K hKU hKV B D hB hD q A N hA hN + choose E hE he using hex + refine ⟨∑ i, E i, Finset.sum_nonneg (fun i _ => hE i), ?_⟩ + intro G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hc R hR hbN b c d hd hbb hcc hbc + have ho (i : Fin 3) : order (P i) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ i) + have hl (i : Fin 3) : loss (P i) ≤ tensorLoss P := + Finset.le_sup (f := fun j => loss (P j)) (Finset.mem_univ i) + have hi (i : Fin 3) : m + order (P i) + 1 + (q + 1) * (L + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (L + 1) := by have := ho i; omega + have hb (i : Fin 3) := he i G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 ((hl i).trans hp) + hsmall hGQ (hGb.mono_order (Nat.add_le_add_left (ho i) m)) hc R hR + (hbN.mono_order (hi i)) b c d hd + ((supportedWeightedSeminorm_mono s (hi i) b).trans hbb) + ((supportedWeightedSeminorm_mono s (hi i) c).trans hcc) + ((supportedWeightedSeminorm_mono s (hi i) (b - c)).trans hbc) + (firstDirection i) (secondDirection i) (firstDirection_norm i) (secondDirection_norm i) + have hEsum : 0 ≤ ∑ i, E i := Finset.sum_nonneg (fun i _ => hE i) + have hsum (i : Fin 3) : E i ≤ ∑ j, E j := + Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ i) + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hsm (a : SupportedField (F := ℝ) (modeSupport K)) (i : Fin 3) : + ContDiff ℝ ∞ (combinedSeedMean (P i) δ τ ε G hF h K hKV R q a (firstDirection i) (secondDirection i)) := + combinedSeedMean_smooth hU hO (hP i) δ τ ε hG (fun _ hx => hQO (hGQ hx)) + hF h K hKU hKV R q a (firstDirection i) (secondDirection i) + constructor + · apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + · intro i + exact (hsm b i).contDiffOn + · intro i + exact (hb i).1.mono_const (mul_le_mul_of_nonneg_left (hsum i) hη) + · apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + · intro i + exact ((hsm b i).sub (hsm c i)).contDiffOn + · intro i + apply (hb i).2.mono_const + gcongr + exact hsum i + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCoordinatePullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCoordinatePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..595951831936f6f3bfe02933784a1c5056b21013 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCoordinatePullback.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Fixed smooth representatives of the coordinate transitions on each +compact overlap, with exact local inverses and polynomial tensor transport. -/ +noncomputable section +open Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.JetPolynomial + +/-- Both coordinate maps can be extended off a compact overlap. Their +actual inverse identities continue to hold as germs on a smaller open set. -/ +theorem compact_coordinate_representatives + (e : OpenPartialHomeomorph Base Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {K : Set Base} (hK : IsCompact K) (hKe : K ⊆ e.source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ U ⊆ e.source ∧ + ∃ T S : Base → Base, ContDiff ℝ ∞ T ∧ ContDiff ℝ ∞ S ∧ EqOn T e U ∧ + (∀ x ∈ U, S (T x) = x) ∧ + (∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) := by + obtain ⟨W,hW,hKW,hWe,T,hT,hTe⟩ := + CollarVelocity.compact_smooth_extension hK e.open_source hKe he + have himage : IsCompact (e '' K) := hK.image_of_continuousOn (e.continuousOn.mono hKe) + obtain ⟨V,hV,hKV,hVe,S,hS,hSe⟩ := + CollarVelocity.compact_smooth_extension himage e.open_target + (by rintro y ⟨x,hx,rfl⟩; exact e.map_source (hKe hx)) hi + let U := W ∩ T ⁻¹' V + have hU : IsOpen U := hW.inter (hV.preimage hT.continuous) + have hUK : K ⊆ U := by + intro x hx + refine ⟨hKW hx,?_⟩ + change T x ∈ V + rw [hTe (hKW hx)] + exact hKV (mem_image_of_mem e hx) + have hST : ∀ x ∈ U, S (T x) = x := by + intro x hx + rw [hSe hx.2,hTe hx.1,e.left_inv (hWe hx.1)] + refine ⟨U,hU,hUK,fun _ hx => hWe hx.1,T,S,hT,hS, + fun _ hx => hTe hx.1,hST,?_⟩ + intro x hx + have hn : T x ∈ S ⁻¹' W := by + change S (T x) ∈ W + rw [hST x hx] + exact hx.1 + filter_upwards [hV.mem_nhds hx.2,(hW.preimage hS.continuous).mem_nhds hn] with y hy hsy + change T (S y) = y + rw [hTe hsy,hSe hy,e.right_inv (hVe hy)] + +/-- Tensor polynomials have a fixed smooth expression on every compact +coordinate overlap; the expression is chosen before the map being evaluated. -/ +theorem compact_tensor_polynomial_pullback {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) + (e : OpenPartialHomeomorph Base Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {K : Set Base} (hK : IsCompact K) (hKe : K ⊆ e.source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ U ⊆ e.source ∧ + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (G H : Base → Space), ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → + (∀ x ∈ U, H x = G (e x)) → ∀ (ε t : ℝ) (x : Base), x ∈ U → + Perturbation.coordinatePolynomialValue P' ε H t (planeCoordinateIsometry x) = + tensorCoordinatePullbackValue e x + (Perturbation.coordinatePolynomialValue P ε G t + (planeCoordinateIsometry (e x))) := by + obtain ⟨U,hU,hKU,hUe,T,S,hT,hS,hTe,hST,hTS⟩ := + compact_coordinate_representatives e he hi hK hKe + refine ⟨U,hU,hKU,hUe, + Perturbation.tensorPolynomialCoordinatePullback P T S, + Perturbation.tensorPolynomialCoordinatePullback_smooth hP hT hS,?_⟩ + intro G H hG hH hrel ε t x hx + have hr : ∀ y ∈ U, H y = G (T y) := by + intro y hy + rw [hTe hy] + exact hrel y hy + have heq : T =ᶠ[𝓝 x] e := by + filter_upwards [hU.mem_nhds hx] with y hy + exact hTe hy + have hd : tensorCoordinatePullbackValue T x = tensorCoordinatePullbackValue e x := by + unfold tensorCoordinatePullbackValue tensorCoordinateDerivative + rw [heq.fderiv_eq] + simpa only [hTe hx,hd] using + Perturbation.tensorPolynomialCoordinatePullback_eval P hT hS hU hST hTS hG hH hr ε t hx + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCurvePhaseParameters.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCurvePhaseParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ef0db5253f5a49c5b22052642cdbce0a267478d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactCurvePhaseParameters.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCurveTangencies + +namespace OAI + +/-! On compact regular arcs the nondegenerate phase parameters form an +open dense set, suitable for independent choices in a finite product. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +local instance compactCurveVolumeHaar : (volume : Measure CurvePlane).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +def goodCompactCurvePhases (u v w : ℝ → CurvePlane) (L : ℝ) (K : Set ℝ) : Set CurvePlane := + {ell | ∀ t ∈ K, curvePhaseVelocity u v L t ell = 0 → + curvePhaseAcceleration u v w L t ell ≠ 0} + +theorem goodCompactCurvePhases_open (u v w : ℝ → CurvePlane) (L : ℝ) + (hu : Continuous u) (hv : Continuous v) (hw : Continuous w) + {K : Set ℝ} (hK : IsCompact K) : IsOpen (goodCompactCurvePhases u v w L K) := by + rw [isOpen_iff_mem_nhds] + intro ell hell + apply hK.eventually_forall_of_forall_eventually + intro t ht + let F : CurvePlane × ℝ → CurvePlane := fun z => + (curvePhaseVelocity u v L z.2 z.1,curvePhaseAcceleration u v w L z.2 z.1) + have hF : Continuous F := by + dsimp [F,curvePhaseVelocity,curvePhaseAcceleration] + fun_prop + have hne : F (ell,t) ≠ 0 := by + intro he + have hv0 : curvePhaseVelocity u v L t ell = 0 := congrArg Prod.fst he + have ha0 : curvePhaseAcceleration u v w L t ell = 0 := congrArg Prod.snd he + exact hell t ht hv0 ha0 + filter_upwards [hF.continuousAt.eventually_ne hne] with z hz + intro hv0 ha0 + apply hz + exact Prod.ext hv0 ha0 + +theorem goodCompactCurvePhases_dense + (u v w : ℝ → CurvePlane) (L : ℝ) (hu : ContDiff ℝ ∞ u) (hv : ContDiff ℝ ∞ v) + (hdu : ∀ t, HasDerivAt u (v t) t) (hdv : ∀ t, HasDerivAt v (w t) t) + (K : Set ℝ) (hregular : ∀ t ∈ K, v t ≠ 0) : + Dense (goodCompactCurvePhases u v w L K) := by + have hnull : volume (goodCompactCurvePhases u v w L K)ᶜ = 0 := by + apply measure_mono_null _ (curve_phase_all_degenerate_parameters_null u v w hu hv hdu hdv L) + intro ell hell + change ¬ (∀ t ∈ K, curvePhaseVelocity u v L t ell = 0 → + curvePhaseAcceleration u v w L t ell ≠ 0) at hell + push Not at hell + obtain ⟨t,ht,hcrit,hdeg⟩ := hell + exact ⟨t,hregular t ht,hcrit,hdeg⟩ + apply Measure.dense_of_ae (μ := (volume : Measure CurvePlane)) + rw [ae_iff] + exact hnull + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactLocalChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactLocalChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..78716692d2eb7e0be8b1dff4c8e67ce0f8bdc59c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactLocalChart.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalInjectivity +import Mathlib.Topology.OpenPartialHomeomorph.Basic + +namespace OAI + +/-! Compatible local charts near an injectively parameterized compact +set restrict to one actual open partial homeomorphism. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [T2Space Y] [Nonempty X] + +theorem compact_local_chart_with_property (R : OpenPartialHomeomorph X Y → Prop) {f : X → Y} (hf : Continuous f) + {K : Set X} (hK : IsCompact K) (hi : K.InjOn f) + (hloc : ∀ x ∈ K, ∃ e : OpenPartialHomeomorph X Y, + x ∈ e.source ∧ EqOn e f e.source ∧ R e) : + ∃ e : OpenPartialHomeomorph X Y, K ⊆ e.source ∧ (e : X → Y) = f ∧ + ∀ x ∈ e.source, ∃ d : OpenPartialHomeomorph X Y, x ∈ d.source ∧ EqOn d f d.source ∧ R d := by + classical + let S := {e : OpenPartialHomeomorph X Y // EqOn e f e.source ∧ R e} + let U : Set X := ⋃ e : S, e.val.source + have hU : IsOpen U := isOpen_iUnion fun e => e.val.open_source + have hKU : K ⊆ U := by + intro x hx + obtain ⟨e,hxe,he,hR⟩ := hloc x hx + exact mem_iUnion.mpr ⟨⟨e,he,hR⟩,hxe⟩ + obtain ⟨V,hV,hKV,hVI⟩ := compact_local_injectivity hf hK hi (by + intro x hx + obtain ⟨e,hxe,he,hR⟩ := hloc x hx + refine ⟨e.source,e.open_source,hxe,?_⟩ + intro y hy z hz hyz + exact e.injOn hy hz ((he hy).trans (hyz.trans (he hz).symm))) + let W := V ∩ U + have hW : IsOpen W := hV.inter hU + have hKW : K ⊆ W := subset_inter hKV hKU + have hWI : W.InjOn f := hVI.mono inter_subset_left + have hopen : ∀ A : Set X, IsOpen A → A ⊆ W → IsOpen (f '' A) := by + intro A hA hAW + have heq : f '' A = ⋃ e : S, e.val '' (A ∩ e.val.source) := by + ext y + constructor + · rintro ⟨x,hx,rfl⟩ + obtain ⟨e,hxe⟩ := mem_iUnion.mp (hAW hx).2 + exact mem_iUnion.mpr ⟨e,x,⟨hx,hxe⟩,e.property.1 hxe⟩ + · intro hy + obtain ⟨e,x,⟨hx,hxe⟩,hxy⟩ := mem_iUnion.mp hy + exact ⟨x,hx,(e.property.1 hxe).symm.trans hxy⟩ + rw [heq] + exact isOpen_iUnion fun e => e.val.isOpen_image_of_subset_source + (hA.inter e.val.open_source) inter_subset_right + let p := hWI.toPartialEquiv f W + have hpOpen : IsOpenMap (p.source.domRestrict p) := by + change IsOpenMap (W.domRestrict f) + intro A hA + have himage := hopen (Subtype.val '' A) (hW.isOpenMap_subtype_val A hA) + (by rintro x ⟨y,hy,rfl⟩; exact y.property) + change IsOpen ((fun x : W => f x) '' A) + simpa only [Set.image_image] using himage + let e := OpenPartialHomeomorph.ofContinuousOpenRestrict p hf.continuousOn hpOpen hW + refine ⟨e,hKW,rfl,?_⟩ + intro x hx + obtain ⟨d,hxd⟩ := mem_iUnion.mp hx.2 + exact ⟨d.val,hxd,d.property⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..64f9291b9a31a3d710f0841dedda7af88bcb2a13 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCancellation.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseSolvers +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedScaleNorm +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.DisplacementSum + +namespace OAI + +/-! Cancellation on an arbitrary compact support from actual good-phase geometry. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +/-- A single good phase on a compact support needs only finitely many local +phase charts. Their actual corrections cancel the original target at every +smaller wavelength, with one set of constants for that target. -/ +theorem compact_good_phase_cancellation + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) + (A : SupportedField (F := ComplexTensor) K) (q : ℕ) : + ∃ C D : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ K ∧ + (∀ m, WeightedBound univ τ m (C m) X) ∧ + (∀ m, WeightedBound univ τ m ((τ/s)^(q+1) * D m) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + obtain ⟨t,L,B,c,hLK,_,hsum⟩ := compact_phase_solvers hG hφ K hImm hgood A + let cbase := fun i : t => (c i).atUnperturbedScale 1 1 le_rfl + let C := fun m => ∑ i : t, (cbase i).sizeFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) + let D := fun m => ∑ i : t, (cbase i).residualFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) + have hn (i : t) (m : ℕ) : 0 ≤ (c i).norm (B i) m := apply_nonneg _ _ + refine ⟨C,D,?_,?_,?_⟩ + · intro m + exact Finset.sum_nonneg (fun i _ => mul_nonneg ((cbase i).sizeFactor_nonneg q m) (hn i _)) + · intro m + exact Finset.sum_nonneg (fun i _ => mul_nonneg ((cbase i).residualFactor_nonneg q m) (hn i _)) + · intro τ s hτ hs hτs hs1 + let d := fun i : t => (c i).atUnperturbedScale τ s hs1 + 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 _ : t => φ) L d hτ hs hτs hs1 le_rfl hsmall B q + have hnorm (i : t) (m : ℕ) : (d i).norm (B i) m ≤ (c i).norm (B i) m := + (c i).norm_atUnperturbedScale_le τ s hs hs1 (B i) m + have hsz (i : t) (m : ℕ) : (d i).size (B i) q m ≤ (cbase i).sizeFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) := by + rw [(d i).size_eq_factor] + exact mul_le_mul_of_nonneg_left (hnorm i _) ((cbase i).sizeFactor_nonneg q m) + have hres (i : t) (m : ℕ) : (d i).residual (B i) q m ≤ (τ/s)^(q+1) * + ((cbase i).residualFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m)) := by + rw [(d i).residual_eq_factor] + simp only [zero_div,add_zero] + calc + _ ≤ (τ/s)^(q+1) * (cbase i).residualFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) := + mul_le_mul_of_nonneg_left (hnorm i _) + (mul_nonneg (pow_nonneg (div_nonneg hτ.le hs.le) _) ((cbase i).residualFactor_nonneg q m)) + _ = _ := mul_assoc _ _ _ + have hdisp (x : SmallModes.Base) : + ∑ i : t, QuadraticMean.displacement τ (coordinatePhase φ) (B i) x = + QuadraticMean.displacement τ (coordinatePhase φ) A x := by + simp only [QuadraticMean.displacement] + rw [← QuadraticMean.realMode_sum,hsum] + refine ⟨X,hX,?_,?_,?_⟩ + · intro x hx + obtain ⟨i,hi⟩ := mem_iUnion.mp (hsp hx) + exact hLK i hi + · intro m + exact (hb m).mono_const (Finset.sum_le_sum (fun i _ => hsz i m)) + · intro m + have hbound : (∑ i : t, (d i).residual (B i) q m) ≤ (τ/s)^(q+1) * D m := by + calc + _ ≤ ∑ i : t, (τ/s)^(q+1) * ((cbase i).residualFactor q m * + (c i).norm (B i) (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m)) := + Finset.sum_le_sum (fun i _ => hres i m) + _ = _ := (Finset.mul_sum _ _ _).symm + 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/Atlas/CompactPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..f79fb7e6e40bbbcc0fa92e191c4f1edaf904f232 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseChart.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ExtendedPhaseChart +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A single smooth inverse representative on a neighborhood of a compact +phase-chart region, without changing its forward coordinate map. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +theorem extend_compact_chart_inverse (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {K : Set Base} (hK : IsCompact K) (hKe : K ⊆ e.source) : + ∃ d : OpenPartialHomeomorph Base Base, K ⊆ d.source ∧ + (d : Base → Base) = e ∧ d.source ⊆ e.source ∧ d.target ⊆ e.target ∧ + ContDiff ℝ ∞ d ∧ ContDiff ℝ ∞ d.symm := by + obtain ⟨W,hW,hKW,hWe,B,hB,hBE⟩ := CollarVelocity.compact_smooth_extension + (hK.image he.continuous) e.open_target (image_subset_iff.mpr (fun x hx => e.map_source (hKe hx))) hi + let d : OpenPartialHomeomorph Base Base := { + toFun := e + invFun := B + source := e.source ∩ e ⁻¹' W + target := e.target ∩ W + map_source' := fun x hx => ⟨e.map_source hx.1,hx.2⟩ + map_target' := by + intro y hy + rw [hBE hy.2] + refine ⟨e.map_target hy.1,?_⟩ + change e (e.symm y) ∈ W + simpa only [e.right_inv hy.1] using hy.2 + left_inv' := by + intro x hx + rw [hBE hx.2] + exact e.left_inv hx.1 + right_inv' := by + intro y hy + rw [hBE hy.2] + exact e.right_inv hy.1 + open_source := e.open_source.inter (hW.preimage he.continuous) + open_target := e.open_target.inter hW + continuousOn_toFun := he.continuous.continuousOn + continuousOn_invFun := hB.continuous.continuousOn + } + exact ⟨d,fun x hx => ⟨hKe hx,hKW (mem_image_of_mem e hx)⟩, + rfl,fun _ hx => hx.1,fun _ hx => hx.1,he,hB⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCurveVectors.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCurveVectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfb5793f33c1086ef191909621081f433d32589a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseCurveVectors.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionVectors + +namespace OAI + +/-! Smooth direction coefficients for the actual pieces of later curves +inside one fixed primitive disk. -/ +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] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +def inPhase (q : M) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (K : Set M) : Set Base := (surfacePhaseChart q e) '' (c.carrier ∩ K) + +omit [CompactSpace M] in +lemma inPhase_compact (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set M} (hK : IsCompact K) (hKs : K ⊆ (surfacePhaseChart q e).source) : + IsCompact (c.inPhase q e K) := + (c.compact.inter hK).image_of_continuousOn + ((surfacePhaseChart q e).continuousOn.mono (fun _ hp => hKs hp.2)) + +omit [CompactSpace M] [T2Space M] in +lemma inPhase_transition_target (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set M} (hKs : K ⊆ (surfacePhaseChart q e).source) : + c.inPhase q e K ⊆ (surfacePhaseTransition (c.index : M) c.phase q e).target := by + rintro _ ⟨p,hp,rfl⟩ + change surfacePhaseChart q e p ∈ + ((surfacePhaseChart (c.index : M) c.phase).symm.trans (surfacePhaseChart q e)).target + refine ⟨(surfacePhaseChart q e).map_source (hKs hp.2),?_⟩ + change (surfacePhaseChart q e).symm (surfacePhaseChart q e p) ∈ + (surfacePhaseChart (c.index : M) c.phase).source + rw [(surfacePhaseChart q e).left_inv (hKs hp.2)] + exact c.source hp.1 + +omit [CompactSpace M] [T2Space M] in +lemma coordinate_transition (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {p : M} (hp : p ∈ c.carrier) : + surfacePhaseTransition (c.index : M) c.phase q e (c.coordinate p) = surfacePhaseChart q e p := by + change surfacePhaseChart q e ((surfacePhaseChart (c.index : M) c.phase).symm + ((surfacePhaseChart (c.index : M) c.phase) p)) = _ + rw [(surfacePhaseChart (c.index : M) c.phase).left_inv (c.source hp)] + +omit [CompactSpace M] in +theorem inPhase_direction_coefficients (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {K : Set M} (hK : IsCompact K) (hKs : K ⊆ (surfacePhaseChart q e).source) : + ∃ b d : Base → ℝ, ContDiff ℝ ∞ b ∧ ContDiff ℝ ∞ d ∧ + (∀ x ∈ c.inPhase q e K, b x ≠ 0 ∨ d x ≠ 0) ∧ + ∀ p ∈ c.carrier ∩ K, + (b (surfacePhaseChart q e p),d (surfacePhaseChart q e p)) = + fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase q e) (c.coordinate p) dy := by + let T := surfacePhaseTransition (c.index : M) c.phase q e + obtain ⟨v,hv,hspec⟩ := compact_transverse_vector T + (surfacePhaseTransition_smooth (c.index : M) c.phase c.inverse_smooth q e he) + (surfacePhaseTransition_smooth q e hi (c.index : M) c.phase c.smooth) + (c.inPhase_compact q e hK hKs) (c.inPhase_transition_target q e hKs) + refine ⟨fun x => (v x).1,fun x => (v x).2,hv.fst,hv.snd,?_,?_⟩ + · intro x hx + by_contra hh + push Not at hh + exact (hspec x hx).2 (Prod.ext hh.1 hh.2) + · intro p hp + change v (surfacePhaseChart q e p) = _ + have hx : surfacePhaseChart q e p ∈ c.inPhase q e K := mem_image_of_mem _ hp + rw [(hspec _ hx).1] + have hxt : c.coordinate p ∈ T.source := by + refine ⟨(surfacePhaseChart (c.index : M) c.phase).map_source (c.source hp.1),?_⟩ + change (surfacePhaseChart (c.index : M) c.phase).symm + ((surfacePhaseChart (c.index : M) c.phase) p) ∈ (surfacePhaseChart q e).source + rw [(surfacePhaseChart (c.index : M) c.phase).left_inv (c.source hp.1)] + exact hKs hp.2 + rw [← c.coordinate_transition q e hp.1,T.left_inv hxt] + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseDiskTopology.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseDiskTopology.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b4819fca7008ae57277af8c5355f34ef0309007 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseDiskTopology.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularDiskTopology +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts + +namespace OAI + +/-! Compact primitive disks and their boundaries in the actual phase chart. -/ +noncomputable section +open Set Filter Manifold +open scoped Topology +namespace ClosedSurfaceR4 +open SmallModes +variable {M : Type*} [TopologicalSpace M] + +lemma compact_phase_disk_geometry (E : OpenPartialHomeomorph M Base) + {D : Set M} (hD : IsOpen D) (hK : IsCompact (closure D)) + (hS : closure D ⊆ E.source) : + IsOpen (E '' D) ∧ closure (E '' D) = E '' closure D ∧ + frontier (E '' D) = E '' frontier D ∧ IsCompact (closure (E '' D)) := by + have hSD : D ⊆ E.source := subset_trans subset_closure hS + have hI : E.IsImage D (E '' D) := by + intro p hp + constructor + · rintro ⟨q,hq,he⟩ + have hqp := E.injOn (hSD hq) hp he + exact hqp ▸ hq + · exact fun hpD => ⟨p,hpD,rfl⟩ + have hIE : E.target ∩ E '' D = E '' D := inter_eq_right.mpr (by + rintro _ ⟨p,hp,rfl⟩ + exact E.map_source (hSD hp)) + have hO : IsOpen (E '' D) := by + rw [← hIE] + exact hI.isOpen_iff.mp (E.open_source.inter hD) + have hC : IsCompact (E '' closure D) := hK.image_of_continuousOn (E.continuousOn.mono hS) + have hc : closure (E '' D) = E '' closure D := by + apply Subset.antisymm + · exact closure_minimal (image_mono subset_closure) hC.isClosed + · rintro _ ⟨p,hp,rfl⟩ + exact (hI.closure (hS hp)).mpr hp + have hf : frontier (E '' D) = E '' frontier D := by + rw [frontier,hO.interior_eq,hc,frontier,hD.interior_eq] + ext y + constructor + · rintro ⟨⟨p,hp,rfl⟩,hn⟩ + exact ⟨p,⟨hp,fun hpD => hn ⟨p,hpD,rfl⟩⟩,rfl⟩ + · rintro ⟨p,⟨hp,hn⟩,rfl⟩ + refine ⟨⟨p,hp,rfl⟩,?_⟩ + rintro ⟨q,hq,he⟩ + have hqp := E.injOn (hSD hq) (hS hp) he + exact hn (hqp ▸ hq) + exact ⟨hO,hc,hf,hc ▸ hC⟩ + +lemma compact_phase_boundary_neighborhood {D Ω G : Set Base} + (hD : IsOpen D) (hK : IsCompact (closure D)) + (hΩ : IsOpen Ω) (hDΩ : closure D ⊆ Ω) + (hG : IsOpen G) (hDG : frontier D ⊆ G) : + ∃ V : Set Base, IsOpen V ∧ IsCompact (closure V) ∧ closure D ⊆ V ∧ + closure V ⊆ Ω ∧ closure V \ D ⊆ G := by + have hcover : closure D ⊆ Ω ∩ (D ∪ G) := by + intro p hp + refine ⟨hDΩ hp,?_⟩ + by_cases hi : p ∈ D + · exact Or.inl hi + · exact Or.inr (hDG ⟨hp,by simpa only [hD.interior_eq] using hi⟩) + obtain ⟨V,hV,hKV,hVG⟩ := hK.exists_isOpen_closure_subset + ((hΩ.inter (hD.union hG)).mem_nhdsSet.mpr hcover) + obtain ⟨B,hB,hKB,hBc⟩ := exists_isOpen_superset_and_isCompact_closure hK + let W := V ∩ B + have hWV : closure W ⊆ closure V := closure_mono inter_subset_left + have hWB : closure W ⊆ closure B := closure_mono inter_subset_right + refine ⟨W,hV.inter hB,hBc.of_isClosed_subset isClosed_closure hWB, + fun p hp => ⟨hKV hp,hKB hp⟩,fun p hp => (hVG (hWV hp)).1,?_⟩ + intro p hp + exact (hVG (hWV hp.1)).2.resolve_left hp.2 + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2dd56b0e1394586f63e176e1d547a19eb89183e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseFamily.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseCover +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSupportedBounds +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSupportCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion + +namespace OAI + +/-! Retain the geometric charts when constructing the compact target split. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +structure CompactPhaseFamily (F : JetPolynomial.Base → JetPolynomial.Space) + (φ : JetPolynomial.Base → ℝ) (K : Compacts SmallModes.Base) where + centers : Finset K + charts : centers → GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ) + partition : PhasePartitions.CompactPhasePartition centers K (fun i => (charts i).chart.source) + +theorem exists_compactPhaseFamily + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (F ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) : Nonempty (CompactPhaseFamily F φ K) := by + obtain ⟨t,e,hcover⟩ := finite_good_phase_cover + (hF.comp planeCoordinateIsometry.symm.contDiff) + (hφ.comp planeCoordinateIsometry.symm.contDiff) K hImm hgood + obtain ⟨P⟩ := PhasePartitions.exists_compact_phase_partition K.isCompact + (fun i : t => (e i).chart.source) (fun i => (e i).chart.open_source) hcover + exact ⟨⟨t,e,P⟩⟩ + +namespace CompactPhaseFamily +variable {F : JetPolynomial.Base → JetPolynomial.Space} {φ : JetPolynomial.Base → ℝ} + {K : Compacts SmallModes.Base} (a : CompactPhaseFamily F φ K) + +def support (i : a.centers) : Compacts JetPolynomial.Base := + jetSupport (a.partition.pieceSupport i) + +def split (i : a.centers) : SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (a.support i)) := + (onModeSupportLM (a.partition.pieceSupport i)).comp (a.partition.splitSupportedLM i) + +lemma support_subset (i : a.centers) : (modeSupport (a.support i) : Set SmallModes.Base) ⊆ K := by + simpa only [support,modeSupport_jetSupport] using a.partition.pieceSupport_subset_original i + +lemma support_chart (i : a.centers) : + (modeSupport (a.support i) : Set SmallModes.Base) ⊆ (a.charts i).chart.source := by + simpa only [support,modeSupport_jetSupport] using a.partition.pieceSupport_subset_domain i + +lemma split_sum (f : SupportedField (F := ComplexTensor) K) (x : SmallModes.Base) : + ∑ i, a.split i f x = f x := a.partition.sum_splitSupported_apply f x + +lemma split_bound (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (m : ℕ) (i : a.centers) (f : SupportedField (F := ComplexTensor) K) : + supportedWeightedSeminorm (modeSupport (a.support i)) s m (a.split i f) ≤ + a.partition.splitConstant m * supportedWeightedSeminorm K s m f := by + change supportedWeightedSeminorm (modeSupport (jetSupport (a.partition.pieceSupport i))) s m + (onModeSupport (a.partition.pieceSupport i) (a.partition.splitSupported f i)) ≤ _ + rw [onModeSupport_seminorm _ s hs] + exact a.partition.splitSupported_uniform_bound m i s hs hs1 f + +end CompactPhaseFamily +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhasePartition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhasePartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..c6e5e5bbd0aa206949e021517012ab5dc6a14f97 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhasePartition.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.Immersion.ClosedSurface.OscillatoryModel +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! +Finite smooth partitions on the compact set on which a phase correction is +required. The coefficients have compact support inside the supplied open +phase domains. These are ordinary partition coefficients, so splitting a +tensor target does not require taking square roots. +-/ + +noncomputable section + +open Set Manifold TopologicalSpace +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.PhasePartitions + +open SmallModes (Base) + +/-- A finite smooth partition on a compact target set, with compact supports +subordinate to the prescribed phase domains. -/ +structure CompactPhasePartition (ι : Type*) [Fintype ι] + (K : Set Base) (U : ι → Set Base) where + weight : ι → Base → ℝ + smooth : ∀ i, ContDiff ℝ ∞ (weight i) + nonneg : ∀ i x, 0 ≤ weight i x + le_one : ∀ i x, weight i x ≤ 1 + compact_support : ∀ i, HasCompactSupport (weight i) + subordinate : ∀ i, tsupport (weight i) ⊆ U i + sum_eq_one : ∀ x ∈ K, ∑ i, weight i x = 1 + +namespace CompactPhasePartition + +variable {ι : Type*} [Fintype ι] {K : Set Base} {U : ι → Set Base} + +/-- The actual compact topological support of one partition coefficient. -/ +def supportCompact (P : CompactPhasePartition ι K U) (i : ι) : Compacts Base := + ⟨tsupport (P.weight i), P.compact_support i⟩ + +@[simp] theorem coe_supportCompact (P : CompactPhasePartition ι K U) (i : ι) : + (P.supportCompact i : Set Base) = tsupport (P.weight i) := rfl + +theorem supportCompact_subset (P : CompactPhasePartition ι K U) (i : ι) : + (P.supportCompact i : Set Base) ⊆ U i := P.subordinate i + +end CompactPhasePartition + +/-- A finite open cover of a compact subset of the phase plane admits compactly +supported smooth partition coefficients indexed by that same cover. -/ +theorem exists_compact_phase_partition {ι : Type*} [Fintype ι] + {K : Set Base} (hK : IsCompact K) (U : ι → Set Base) + (hU : ∀ i, IsOpen (U i)) (hcover : K ⊆ ⋃ i, U i) : + Nonempty (CompactPhasePartition ι K U) := by + classical + obtain ⟨r, hr⟩ := hK.isBounded.subset_ball (0 : Base) + let V : ι → Set Base := fun i => U i ∩ Metric.ball 0 r + have hV : ∀ i, IsOpen (V i) := fun i => (hU i).inter Metric.isOpen_ball + have hcoverV : K ⊆ ⋃ i, V i := by + intro x hx + obtain ⟨i, hi⟩ := mem_iUnion.mp (hcover hx) + exact mem_iUnion.mpr ⟨i, hi, hr hx⟩ + obtain ⟨ρ, hρ⟩ := SmoothPartitionOfUnity.exists_isSubordinate (𝓘(ℝ, Base)) + hK.isClosed V hV hcoverV + refine ⟨{ + weight := fun i => ρ i + smooth := fun i => (ρ i).contMDiff.contDiff + nonneg := ρ.nonneg + le_one := ρ.le_one + compact_support := ?_ + subordinate := fun i x hx => (hρ i hx).1 + sum_eq_one := ?_ }⟩ + · intro i + apply (isCompact_closedBall (0 : Base) r).of_isClosed_subset (isClosed_tsupport _) + intro x hx + exact Metric.ball_subset_closedBall ((hρ i hx).2) + · intro x hx + simpa only [finsum_eq_sum_of_fintype] using ρ.sum_eq_one hx + +/-- For a family of local phase domains, compactness first selects finitely +many domains and then constructs the supported partition on those domains. -/ +theorem exists_finite_compact_phase_partition {ι : Type*} + {K : Set Base} (hK : IsCompact K) (U : ι → Set Base) + (hU : ∀ i, IsOpen (U i)) (hcover : K ⊆ ⋃ i, U i) : + ∃ s : Finset ι, Nonempty (CompactPhasePartition s K (fun i => U i)) := by + classical + obtain ⟨s, hs⟩ := hK.elim_finite_subcover U hU hcover + refine ⟨s, exists_compact_phase_partition hK (fun i : s => U i) + (fun i => hU i) ?_⟩ + intro x hx + obtain ⟨i, hi, hxi⟩ := mem_iUnion₂.mp (hs hx) + exact mem_iUnion.mpr ⟨⟨i, hi⟩, hxi⟩ + +end ClosedSurfaceR4.PhasePartitions + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolverFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolverFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..619c8869572279d77b66c8cae0d79043f1d4263b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolverFamily.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseSolvers +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSupportedBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm + +namespace OAI + +/-! The compact phase cover, target split and solver constants precede the target. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem compact_phase_solver_family + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) : + ∃ (t : Finset K) (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) 1 1) + (I : t → ℕ → ℝ) (S : ℕ → ℝ), + (∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) ∧ + (∀ i m, (c i).D m = 0) ∧ (∀ i m, 1 ≤ I i m) ∧ + (∀ 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) ∧ + (∀ m, 1 ≤ S m) ∧ + (∀ (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) ∧ + (∀ A x, ∑ i, T i A x = A x) := by + classical + obtain ⟨t,e,hcover⟩ := finite_good_phase_cover + (hG.comp planeCoordinateIsometry.symm.contDiff) + (hφ.comp planeCoordinateIsometry.symm.contDiff) K hImm hgood + obtain ⟨P⟩ := PhasePartitions.exists_compact_phase_partition K.isCompact + (fun i : t => (e i).chart.source) (fun i => (e i).chart.open_source) hcover + let L := fun i : t => jetSupport (P.pieceSupport i) + let T : (i : t) → SupportedField (F := ComplexTensor) K →ₗ[ℝ] + SupportedField (F := ComplexTensor) (modeSupport (L i)) := + fun i => (onModeSupportLM (P.pieceSupport i)).comp (P.splitSupportedLM i) + have hs (i : t) : (modeSupport (L i) : Set SmallModes.Base) ⊆ (e i).chart.source := by + simpa only [L,modeSupport_jetSupport] using P.pieceSupport_subset_domain i + choose c hc hD using fun i : t => (e i).exists_unperturbed_solver hG hφ (L i) (hs i) + choose I hI hi using fun (i : t) m => compact_local_weighted_bound (e i).chart.open_target + isOpen_univ (e i).targetCompact.isCompact (e i).targetBound + (subset_univ _) (e i).smoothInverse.contDiffOn m + refine ⟨t,L,T,c,I,P.splitConstant,?_,hD,hI,?_,P.one_le_splitConstant,?_,?_⟩ + · intro i + simpa only [L,modeSupport_jetSupport] using P.pieceSupport_subset_original i + · intro i m j _ hj x hx + rw [hc i] at hx ⊢ + simpa only [one_pow,one_mul] using hi i m 1 zero_le_one le_rfl j hj x hx + · intro s hs hs1 m i A + change supportedWeightedSeminorm (modeSupport (jetSupport (P.pieceSupport i))) s m + (onModeSupport (P.pieceSupport i) (P.splitSupported A i)) ≤ _ + rw [onModeSupport_seminorm _ s hs] + exact P.splitSupported_uniform_bound m i s hs hs1 A + · intro A x + exact P.sum_splitSupported_apply A x + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolvers.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolvers.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c0801035112bbd357f809529eb88542b80e75fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseSolvers.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseTargetSplit +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseSolver +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSupportCoordinates + +namespace OAI + +/-! Actual finite phase solvers for a compactly supported tensor target. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +/-- Local good-phase geometry supplies all the solver data on a finite +support decomposition. There is no assumption of a chart on the entire support. -/ +theorem compact_phase_solvers + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) + (A : SupportedField (F := ComplexTensor) K) : + ∃ (t : Finset K) (L : t → Compacts JetPolynomial.Base) + (B : (i : t) → SupportedField (F := ComplexTensor) (modeSupport (L i))) + (c : (i : t) → PolynomialSolveData emptyMetricPolynomial 0 G hG φ (L i) 1 1), + (∀ i, (modeSupport (L i) : Set SmallModes.Base) ⊆ K) ∧ + (∀ i m, (c i).D m = 0) ∧ (∀ x, ∑ i, B i x = A x) := by + classical + obtain ⟨t,e,L,B,hLK,hLe,hsum⟩ := split_target_into_good_phase_charts + (hG.comp planeCoordinateIsometry.symm.contDiff) + (hφ.comp planeCoordinateIsometry.symm.contDiff) K hImm hgood A + have hs (i : t) : (modeSupport (jetSupport (L i)) : Set SmallModes.Base) ⊆ (e i).chart.source := by + simpa only [modeSupport_jetSupport] using hLe i + choose c hc hD using fun i : t => (e i).exists_unperturbed_solver hG hφ (jetSupport (L i)) (hs i) + refine ⟨t,fun i => jetSupport (L i),fun i => onModeSupport (L i) (B i),c,?_,hD,?_⟩ + · intro i + simpa only [modeSupport_jetSupport] using hLK i + · intro x + exact hsum x + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseWeights.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..13e808781be7f12d42a8fe89dc12a96d70463a20 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactPhaseWeights.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.Immersion.ClosedSurface.PhaseWeights + +namespace OAI + +/-! Positive frequency weights giving good sums and differences on the +actual compact pairwise phase supports. -/ +noncomputable section +open Set + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +theorem finite_set_compact_good_weights {ι X : Type*} [TopologicalSpace X] {n : ℕ} + (K : ι → ι → Set X) (hK : ∀ a b, IsCompact (K a b)) + (hKs : ∀ a b, K a b = K b a) + (B : X → Fin 3 → RVec n) (ξ : ι → X → Base) + (hB : Continuous B) (hξ : ∀ a, Continuous (ξ a)) + (hgood : ∀ a b, a ≠ b → ∀ x ∈ K a b, Good (B x) (ξ a x)) + (s : Finset ι) : + ∃ w : ι → ℝ, (∀ a ∈ s, 0 < w a) ∧ + ∀ a ∈ s, ∀ b ∈ s, a ≠ b → ∀ x ∈ K a b, + Good (B x) (w a • ξ a x + w b • ξ b x) ∧ + Good (B x) (w a • ξ a x - w b • ξ b x) := by + classical + induction s using Finset.induction_on with + | empty => + refine ⟨fun _ => 1, ?_, ?_⟩ <;> simp + | @insert a s ha ih => + obtain ⟨w, hw, hpairs⟩ := ih + let : ∀ b : {b // b ∈ s}, CompactSpace (K a b.1) := + fun b => isCompact_iff_compactSpace.mp (hK a b.1) + obtain ⟨lam, hlam, hdominant⟩ := exists_dominant_weight + (ι := {b // b ∈ s}) (X := fun b => K a b.1) + (fun _ x => B x.1) (fun _ x => ξ a x.1) (fun b x => ξ b.1 x.1) + (fun _ => hB.comp continuous_subtype_val) + (fun _ => (hξ a).comp continuous_subtype_val) + (fun b => (hξ b.1).comp continuous_subtype_val) + (fun b x => hgood a b.1 (fun hab => ha (hab.symm ▸ b.2)) x.1 x.2) + (fun b => w b.1) + let w' := Function.update w a lam + have hw'a : w' a = lam := Function.update_self a lam w + have hw'old (b : ι) (hb : b ∈ s) : w' b = w b := by + exact Function.update_of_ne (fun hba : b = a => ha (hba ▸ hb)) lam w + refine ⟨w', ?_, ?_⟩ + · intro b hb + rcases Finset.mem_insert.mp hb with hba | hb + · rw [hba,hw'a] + exact hlam + · rw [hw'old b hb] + exact hw b hb + · intro b hb c hc hbc x hx + rcases Finset.mem_insert.mp hb with hba | hb + · subst b + have hc' : c ∈ s := (Finset.mem_insert.mp hc).resolve_left hbc.symm + rw [hw'a, hw'old c hc'] + exact hdominant ⟨c,hc'⟩ ⟨x,hx⟩ + · rcases Finset.mem_insert.mp hc with hca | hc + · subst c + have hxa : x ∈ K a b := by rwa [hKs a b] + have hh := hdominant ⟨b,hb⟩ ⟨x,hxa⟩ + rw [hw'old b hb, hw'a] + refine ⟨?_, ?_⟩ + · simpa only [add_comm] using hh.1 + · simpa only [neg_sub] using good_neg hh.2 + · rw [hw'old b hb, hw'old c hc] + exact hpairs b hb c hc hbc x hx + +/-- One fixed positive weight for each member of an arbitrary finite +phase family makes all distinct pairwise sums and differences good on +their prescribed symmetric compact supports. -/ +theorem finite_compact_good_weights {ι X : Type*} [Finite ι] [TopologicalSpace X] {n : ℕ} + (K : ι → ι → Set X) (hK : ∀ a b, IsCompact (K a b)) + (hKs : ∀ a b, K a b = K b a) + (B : X → Fin 3 → RVec n) (ξ : ι → X → Base) + (hB : Continuous B) (hξ : ∀ a, Continuous (ξ a)) + (hgood : ∀ a b, a ≠ b → ∀ x ∈ K a b, Good (B x) (ξ a x)) : + ∃ w : ι → ℝ, (∀ a, 0 < w a) ∧ + ∀ a b, a ≠ b → ∀ x ∈ K a b, + Good (B x) (w a • ξ a x + w b • ξ b x) ∧ + Good (B x) (w a • ξ a x - w b • ξ b x) := by + classical + let : Fintype ι := Fintype.ofFinite ι + obtain ⟨w,hw,hpairs⟩ := finite_set_compact_good_weights K hK hKs B ξ hB hξ hgood + (Finset.univ : Finset ι) + exact ⟨w,fun a => hw a (Finset.mem_univ a), + fun a b => hpairs a (Finset.mem_univ a) b (Finset.mem_univ b)⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactTimeChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactTimeChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..a78a0149a890eb96650a7d3cd3b6b747206b67c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CompactTimeChart.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCompactCoordinateMap +import OAI.Geometry.SurfaceImmersion.Correction.CompactSurfaceSmoothExtension +import OAI.Geometry.SurfaceImmersion.Whitney.ArcTimeChartPartition + +namespace OAI + +/-! A regular coordinate map on a compact set gives a time chart, +retaining its prescribed longitudinal coordinate on the whole source. -/ +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_time_chart {K U : Set M} (hK : IsCompact K) + (hU : IsOpen U) (hKU : K ⊆ U) {f : M → Base} {F : M → ℝ} + (hf : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ f U) + (htime : ∀ x ∈ U, f x 1 = F x) (hi : K.InjOn f) + (hreg : ∀ x ∈ K, Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) f x)) : + ∃ c : SurfaceTimeChart F, K ⊆ c.coord.source ∧ EqOn c.coord f c.coord.source := by + obtain ⟨g,V,hg,hV,hKV,hVU,heq⟩ := compact_surface_smooth_extension hK hU hKU hf + have hgi : K.InjOn g := by + intro x hx y hy hxy + apply hi hx hy + simpa only [← heq (hKV hx),← heq (hKV hy)] using hxy + have hgr : ∀ x ∈ K, Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) g x) := by + intro x hx + rw [(heq.eventuallyEq_of_mem (hV.mem_nhds (hKV hx))).mfderiv_eq] + exact hreg x hx + obtain ⟨d,hKd,hd,hdi⟩ := surface_compact_coordinate_map hg hK hgi hgr + let e := d.restrOpen V hV + have hes : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ e e.source := by + change ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d (d.source ∩ V) + rw [hd] + exact hg.contMDiffOn + refine ⟨⟨e,hes,hdi.mono (fun _ hx => hx.1),?_⟩,?_,?_⟩ + · intro x hx + change d x 1 = F x + rw [hd,heq hx.2] + exact htime x (hVU hx.2) + · intro x hx + exact ⟨hKd hx,hKV hx⟩ + · intro x hx + change d x = f x + rw [hd] + exact heq hx.2 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexPhaseDecomposition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexPhaseDecomposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..93be5a177017816d31540d0fd5073808cbda9f78 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexPhaseDecomposition.lean @@ -0,0 +1,179 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexQuadraticPhase +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBasisPerturbation + +namespace OAI + +/-! The actual positive coefficient forms of the three convex phases. +The chart and cone radii are chosen together before a path metric. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def convexPhaseCovectors (P : PhaseBasis) (L : ℝ) (p : Base) : Fin 3 → Base := + fun i => P.ξ i + L • p + +lemma convexPhaseCovectors_smooth (P : PhaseBasis) (L : ℝ) : + ContDiff ℝ ∞ (convexPhaseCovectors P L) := by + apply contDiff_pi.mpr + intro i + exact contDiff_const.add (contDiff_id.const_smul L) + +lemma convexPhaseCovectors_eq_phaseDerivative (P : PhaseBasis) (L : ℝ) (p : Base) : + convexPhaseCovectors P L p = + fun i => phaseDerivative (convexQuadraticPhase (P.ξ i) L) p := by + funext i + exact (convexQuadraticPhase_phaseDerivative (P.ξ i) L p).symm + +lemma convexPhaseCovectors_dist (P : PhaseBasis) {L : ℝ} (hL : 0 ≤ L) (p : Base) : + ‖convexPhaseCovectors P L p - P.ξ‖ ≤ L * ‖p‖ := by + apply (pi_norm_le_iff_of_nonneg (mul_nonneg hL (norm_nonneg p))).mpr + intro i + simp only [convexPhaseCovectors, Pi.sub_apply, add_sub_cancel_left, norm_smul, + Real.norm_eq_abs, abs_of_nonneg hL, le_refl] + +def convexPhaseCoefficient (P : PhaseBasis) (L : ℝ) (p : Base) (i : Fin 3) : + PhaseMean.Tensor →L[ℝ] ℝ := + perturbedPhaseCoefficient P (convexPhaseCovectors P L p) i + +lemma convexPhaseCoefficient_smoothAt (P : PhaseBasis) (L : ℝ) {p : Base} + (hp : (perturbedPhaseOperator P (convexPhaseCovectors P L p)).IsInvertible) + (i : Fin 3) : + ContDiffAt ℝ ∞ (fun x => convexPhaseCoefficient P L x i) p := + (perturbedPhaseCoefficient_smoothAt P hp i).comp p + (convexPhaseCovectors_smooth P L).contDiffAt + +lemma convexPhaseCoefficient_decomposition (P : PhaseBasis) (L : ℝ) {p : Base} + (hp : (perturbedPhaseOperator P (convexPhaseCovectors P L p)).IsInvertible) + (H : PhaseMean.Tensor) : + ∑ i, convexPhaseCoefficient P L p i H • + covectorSquare (phaseDerivative (convexQuadraticPhase (P.ξ i) L) p) = H := by + simpa only [convexPhaseCoefficient, convexQuadraticPhase_phaseDerivative, + convexPhaseCovectors] using perturbedPhase_decomposition P hp H + +/-- One sufficiently small disk retains both the actual positive basis +coefficients and the positive metric Hessians for every fixed compact +family of admissible metric first jets. -/ +theorem compact_positive_convex_phase_charts (P : PhaseBasis) + {T : Set PhaseMean.Tensor} (hT : IsCompact T) + (hTpos : ∀ H ∈ T, ∀ i, 0 < P.Q i H) + {J : Set MetricFirstJet} (hJ : IsCompact J) + (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ + (∀ p : Base, ‖p‖ ≤ r → + (perturbedPhaseOperator P (convexPhaseCovectors P L p)).IsInvertible ∧ + (∀ H ∈ T, ∀ i, 0 < convexPhaseCoefficient P L p i H) ∧ + (∀ i, ContDiffAt ℝ ∞ (fun x => convexPhaseCoefficient P L x i) p)) ∧ + ∀ (h : Base → PhaseMean.Tensor) (p : Base), ‖p‖ ≤ r → + (h p,fderiv ℝ h p) ∈ J → ∀ i, + (∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian h (convexQuadraticPhase (P.ξ i) L) p v v) ∧ + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (∀ x, (e x).1 = convexQuadraticPhase (P.ξ i) L x) ∧ + ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + obtain ⟨eps,heps,hpert⟩ := compact_positive_phase_perturbation P hT hTpos + obtain ⟨L,r,hL,hr,hchart⟩ := finite_uniform_convex_phase_charts hJ hdet P.ξ P.nonzero + let r' := min r (eps / (2 * L)) + have hr' : 0 < r' := lt_min hr (div_pos heps (mul_pos (by norm_num) hL)) + refine ⟨L,r',hL,hr',?_,?_⟩ + · intro p hp + have hnorm : ‖convexPhaseCovectors P L p - P.ξ‖ < eps := by + calc + _ ≤ L * ‖p‖ := convexPhaseCovectors_dist P hL.le p + _ ≤ L * (eps / (2 * L)) := + mul_le_mul_of_nonneg_left (hp.trans (min_le_right _ _)) hL.le + _ = eps / 2 := by field_simp [hL.ne'] + _ < eps := by linarith + obtain ⟨hinv,_,hpos⟩ := hpert _ hnorm + exact ⟨hinv,hpos,fun i => convexPhaseCoefficient_smoothAt P L hinv i⟩ + · intro h p hp hj i + exact hchart h p (hp.trans (min_le_left _ _)) hj i + +/-- Shrinking once supplies a single chart for each entire closed disk, +instead of choosing a different local chart at each of its points. -/ +theorem convex_phase_charts_on_disk (P : PhaseBasis) {L r₀ : ℝ} + (hL : 0 ≤ L) (hr₀ : 0 < r₀) : + ∃ r : ℝ, 0 < r ∧ r ≤ r₀ ∧ + ∃ e : Fin 3 → OpenPartialHomeomorph Base Base, + (∀ i x, (e i x).1 = convexQuadraticPhase (P.ξ i) L x) ∧ + (∀ i, ContDiff ℝ ∞ (e i) ∧ ContDiffOn ℝ ∞ (e i).symm (e i).target) ∧ + ∀ i p, ‖p‖ ≤ r → p ∈ (e i).source := by + have hcharts (i : Fin 3) : + ∃ e : OpenPartialHomeomorph Base Base, (0 : Base) ∈ e.source ∧ + (∀ x, (e x).1 = convexQuadraticPhase (P.ξ i) L x) ∧ + ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + apply convexQuadraticPhase_chart hL + simpa only [norm_zero, mul_zero] using norm_pos_iff.mpr (P.nonzero i) + choose e he0 hephase hesmooth heinverse using hcharts + let U : Set Base := ⋂ i, (e i).source + have hU : IsOpen U := isOpen_iInter_of_finite (fun i => (e i).open_source) + have h0 : (0 : Base) ∈ U := mem_iInter.mpr he0 + obtain ⟨eps,heps,hball⟩ := Metric.isOpen_iff.mp hU 0 h0 + refine ⟨min r₀ (eps / 2),lt_min hr₀ (half_pos heps),min_le_left _ _, + e,hephase,fun i => ⟨hesmooth i,heinverse i⟩,?_⟩ + intro i p hp + have hpball : p ∈ Metric.ball (0 : Base) eps := by + rw [Metric.mem_ball,dist_zero_right] + exact (hp.trans (min_le_right _ _)).trans_lt (by linarith) + exact mem_iInter.mp (hball hpball) i + +/-- The cone and Hessian margins persist under small independent changes +of the linear parts, with the same quadratic coefficient and disk. -/ +theorem compact_perturbed_convex_phase_margin (P : PhaseBasis) + {T : Set PhaseMean.Tensor} (hT : IsCompact T) + (hTpos : ∀ H ∈ T, ∀ i, 0 < P.Q i H) + {J : Set MetricFirstJet} (hJ : IsCompact J) + (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) : + ∃ L r eps : ℝ, 0 < L ∧ 0 < r ∧ 0 < eps ∧ + ∀ ell : Fin 3 → Base, ‖ell-P.ξ‖ < eps → ∀ p : Base, ‖p‖ ≤ r → + let xi := fun i => phaseDerivative (convexQuadraticPhase (ell i) L) p + (perturbedPhaseOperator P xi).IsInvertible ∧ (∀ i, xi i ≠ 0) ∧ + (∀ H ∈ T, ∀ i, 0 < perturbedPhaseCoefficient P xi i H) ∧ + ∀ h : Base → PhaseMean.Tensor, (h p,fderiv ℝ h p) ∈ J → ∀ i v, + (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (convexQuadraticPhase (ell i) L) p v v := by + obtain ⟨eta,heta,hpert⟩ := compact_positive_phase_perturbation P hT hTpos + obtain ⟨L,r,hL,hr,hess⟩ := compact_uniform_convex_quadratic_phases hJ hdet + (show 0 ≤ ‖P.ξ‖+1 by positivity) + let r' := min r (eta/(4*L)) + let eps := min (eta/4) 1 + have hr' : 0 < r' := lt_min hr (div_pos heta (mul_pos (by norm_num) hL)) + have heps : 0 < eps := lt_min (by positivity) zero_lt_one + refine ⟨L,r',eps,hL,hr',heps,fun ell hell p hp => ?_⟩ + dsimp only + have hnorm : ‖(fun i => phaseDerivative (convexQuadraticPhase (ell i) L) p)-P.ξ‖ < eta := by + have hbound : ‖(fun i => phaseDerivative (convexQuadraticPhase (ell i) L) p)-P.ξ‖ ≤ + ‖ell-P.ξ‖+L*‖p‖ := by + apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr + intro i + simp only [Pi.sub_apply,convexQuadraticPhase_phaseDerivative] + calc + ‖ell i + L • p - P.ξ i‖ = ‖(ell i-P.ξ i)+L • p‖ := by congr 1; abel + _ ≤ ‖ell i-P.ξ i‖+‖L • p‖ := norm_add_le _ _ + _ ≤ ‖ell-P.ξ‖+L*‖p‖ := by + simpa only [Pi.sub_apply,norm_smul,Real.norm_eq_abs,abs_of_nonneg hL.le] using + add_le_add (norm_le_pi_norm (ell-P.ξ) i) (le_refl ‖L • p‖) + have hpbound : L*‖p‖ ≤ eta/4 := by + calc + _ ≤ L*(eta/(4*L)) := + mul_le_mul_of_nonneg_left (hp.trans (min_le_right _ _)) hL.le + _ = eta/4 := by field_simp [hL.ne'] + have hellbound : ‖ell-P.ξ‖ < eta/4 := hell.trans_le (min_le_left _ _) + linarith + obtain ⟨hinv,hnz,hpos⟩ := hpert _ hnorm + refine ⟨hinv,hnz,hpos,fun h hj i v => ?_⟩ + apply hess h (ell i) p _ (hp.trans (min_le_left _ _)) hj v + calc + ‖ell i‖ ≤ ‖ell i-P.ξ i‖+‖P.ξ i‖ := by simpa using norm_add_le (ell i-P.ξ i) (P.ξ i) + _ ≤ ‖ell-P.ξ‖+‖P.ξ‖ := add_le_add (norm_le_pi_norm (ell-P.ξ) i) (norm_le_pi_norm P.ξ i) + _ ≤ ‖P.ξ‖+1 := by + have : ‖ell-P.ξ‖ < 1 := hell.trans_le (min_le_right _ _) + linarith + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexQuadraticPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexQuadraticPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cb76ee1578d6498400d93b7cc888ae06c0f1c13 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ConvexQuadraticPhase.lean @@ -0,0 +1,295 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPhaseChart +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! The actual convex phases used in finite primitive preparation. Their +coordinate covariant Hessians are uniformly positive on a sufficiently +small disk when the metric connection has a fixed bound. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def convexQuadraticPhase (ell : Base) (L : ℝ) (p : Base) : ℝ := + phaseLinear ell p + (L / 2) * (p.1^2 + p.2^2) + +lemma convexQuadraticPhase_smooth (ell : Base) (L : ℝ) : + ContDiff ℝ ∞ (convexQuadraticPhase ell L) := by + exact (phaseLinear ell).contDiff.add + (contDiff_const.mul ((contDiff_fst.pow 2).add (contDiff_snd.pow 2))) + +lemma convexQuadraticPhase_hasFDerivAt (ell : Base) (L : ℝ) (p : Base) : + HasFDerivAt (convexQuadraticPhase ell L) (phaseLinear (ell + L • p)) p := by + have h1 := (ContinuousLinearMap.fst ℝ ℝ ℝ).hasFDerivAt (x := p) + have h2 := (ContinuousLinearMap.snd ℝ ℝ ℝ).hasFDerivAt (x := p) + have hh := (phaseLinear ell).hasFDerivAt (x := p) |>.add + (((h1.pow 2).add (h2.pow 2)).const_mul (L / 2)) + apply hh.congr_fderiv + apply ContinuousLinearMap.ext + intro v + simp only [add_apply, smul_apply, phaseLinear_apply, + ContinuousLinearMap.coe_fst', ContinuousLinearMap.coe_snd', + Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, + two_smul, smul_eq_mul] + ring + +lemma convexQuadraticPhase_coordDeriv (ell : Base) (L : ℝ) (p v : Base) : + coordDeriv v (convexQuadraticPhase ell L) p = phaseLinear (ell + L • p) v := by + exact congrArg (fun f : Base →L[ℝ] ℝ => f v) + (convexQuadraticPhase_hasFDerivAt ell L p).fderiv + +lemma convexQuadraticPhase_phaseDerivative (ell : Base) (L : ℝ) (p : Base) : + phaseDerivative (convexQuadraticPhase ell L) p = ell + L • p := by + unfold phaseDerivative + rw [(convexQuadraticPhase_hasFDerivAt ell L p).fderiv] + ext <;> simp [phaseLinear_apply, dx, dy] + +lemma convexQuadraticPhase_regular {ell p : Base} {L : ℝ} (hL : 0 ≤ L) + (hp : L * ‖p‖ < ‖ell‖) : phaseDerivative (convexQuadraticPhase ell L) p ≠ 0 := by + rw [convexQuadraticPhase_phaseDerivative] + intro he + have heq : ell = -(L • p) := eq_neg_of_add_eq_zero_left he + rw [heq, norm_neg, norm_smul, Real.norm_eq_abs, abs_of_nonneg hL] at hp + exact (lt_irrefl _ hp) + +theorem convexQuadraticPhase_chart {ell p : Base} {L : ℝ} (hL : 0 ≤ L) + (hp : L * ‖p‖ < ‖ell‖) : + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (∀ x, (e x).1 = convexQuadraticPhase ell L x) ∧ + ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := + exists_smooth_phase_chart (convexQuadraticPhase_smooth ell L) + (convexQuadraticPhase_regular hL hp) + +lemma convexQuadraticPhase_second (ell : Base) (L : ℝ) (p v w : Base) : + coordDeriv v (coordDeriv w (convexQuadraticPhase ell L)) p = + L * (v.1*w.1 + v.2*w.2) := by + have he : coordDeriv w (convexQuadraticPhase ell L) = + fun p => phaseLinear ell w + L * phaseLinear w p := by + funext q + rw [convexQuadraticPhase_coordDeriv] + simp only [phaseLinear_apply, Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, + smul_eq_mul] + ring + rw [he] + have hh := (hasFDerivAt_const (phaseLinear ell w) p).add + ((phaseLinear w).hasFDerivAt (x := p) |>.const_mul L) + change (fderiv ℝ ((fun _ : Base => phaseLinear ell w) + + fun p => L * phaseLinear w p) p) v = _ + rw [hh.fderiv] + simp only [smul_apply, smul_eq_mul, zero_add, phaseLinear_apply] + ring + +/-- A metric value together with its first coordinate derivative. -/ +abbrev MetricFirstJet := PhaseMean.Tensor × (Base →L[ℝ] PhaseMean.Tensor) + +def metricJetDet (J : MetricFirstJet) : ℝ := J.1 0 * J.1 2 - (J.1 1)^2 + +/-- The three symmetric Christoffel slots, with values in the coordinate +tangent plane, computed from the metric and its first derivatives. -/ +def metricConnectionAt (J : MetricFirstJet) : Fin 3 → Base := + let a : Fin 3 → ℝ := ![J.2 dx 0 / 2, J.2 dy 0 / 2, J.2 dy 1 - J.2 dx 2 / 2] + let b : Fin 3 → ℝ := ![J.2 dx 1 - J.2 dy 0 / 2, J.2 dx 2 / 2, J.2 dy 2 / 2] + fun i => ((J.1 2 * a i - J.1 1 * b i) / metricJetDet J, + (J.1 0 * b i - J.1 1 * a i) / metricJetDet J) + +lemma metricConnectionAt_contDiffAt {J : MetricFirstJet} (hJ : metricJetDet J ≠ 0) : + ContDiffAt ℝ ∞ metricConnectionAt J := by + apply contDiffAt_pi.mpr + intro i + fin_cases i <;> + simp only [metricConnectionAt, Matrix.cons_val_zero', Matrix.cons_val_succ'] <;> + unfold metricJetDet at * <;> fun_prop (disch := exact hJ) + +theorem compact_metricConnection_bound {K : Set MetricFirstJet} (hK : IsCompact K) + (hdet : ∀ J ∈ K, metricJetDet J ≠ 0) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ J ∈ K, ∀ i, ‖metricConnectionAt J i‖ ≤ B := by + obtain ⟨B,hB⟩ := hK.exists_bound_of_continuousOn + (fun J hJ => (metricConnectionAt_contDiffAt (hdet J hJ)).continuousAt.continuousWithinAt) + refine ⟨max 0 B, le_max_left _ _, fun J hJ i => ?_⟩ + exact (norm_le_pi_norm _ i).trans ((hB J hJ).trans (le_max_right _ _)) + +def connectionContract (Gamma : Fin 3 → Base) (v w : Base) : Base := + (v.1*w.1) • Gamma 0 + (v.1*w.2 + v.2*w.1) • Gamma 1 + (v.2*w.2) • Gamma 2 + +def coordinateMetricHessian (h : Base → PhaseMean.Tensor) (phi : Base → ℝ) + (p v w : Base) : ℝ := + coordDeriv v (coordDeriv w phi) p - + phaseLinear (phaseDerivative phi p) (connectionContract (metricConnectionAt (h p,fderiv ℝ h p)) v w) + +lemma convexQuadraticPhase_hessian (h : Base → PhaseMean.Tensor) (ell : Base) (L : ℝ) + (p v w : Base) : + coordinateMetricHessian h (convexQuadraticPhase ell L) p v w = + L * (v.1*w.1 + v.2*w.2) - phaseLinear (ell + L • p) + (connectionContract (metricConnectionAt (h p,fderiv ℝ h p)) v w) := by + rw [coordinateMetricHessian, convexQuadraticPhase_second, + convexQuadraticPhase_phaseDerivative] + +lemma coordinateMetricHessian_fst_dy (h : Base → PhaseMean.Tensor) (p : Base) : + coordinateMetricHessian h (Prod.fst : Base → ℝ) p dy dy = + -(metricConnectionAt (h p,fderiv ℝ h p) 2).1 := by + have he : convexQuadraticPhase dx 0 = (Prod.fst : Base → ℝ) := by + funext q + simp [convexQuadraticPhase, phaseLinear_apply, dx] + have hh := convexQuadraticPhase_hessian h dx 0 p dy dy + rw [he] at hh + simpa [connectionContract, phaseLinear_apply, dx, dy] using hh + +private lemma abs_quadratic_combination {a b c B x y : ℝ} (hB : 0 ≤ B) + (ha : |a| ≤ B) (hb : |b| ≤ B) (hc : |c| ≤ B) : + |x^2*a + (x*y+y*x)*b + y^2*c| ≤ 2*B*(x^2+y^2) := by + have hm : x*y+y*x = 2*x*y := by ring + rw [hm] + have h1 : |x^2*a| ≤ x^2*B := by + rw [abs_mul, abs_of_nonneg (sq_nonneg x)] + exact mul_le_mul_of_nonneg_left ha (sq_nonneg x) + have h2 : |2*x*y*b| ≤ 2 * |x| * |y| * B := by + simp only [abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] + exact mul_le_mul_of_nonneg_left hb (by positivity) + have h3 : |y^2*c| ≤ y^2*B := by + rw [abs_mul, abs_of_nonneg (sq_nonneg y)] + exact mul_le_mul_of_nonneg_left hc (sq_nonneg y) + have hxy : 2 * |x| * |y| ≤ x^2+y^2 := by + nlinarith [sq_nonneg (|x|-|y|), sq_abs x, sq_abs y] + have hmB := mul_le_mul_of_nonneg_right hxy hB + have htri := (abs_add_le (x^2*a+2*x*y*b) (y^2*c)).trans + (add_le_add (abs_add_le (x^2*a) (2*x*y*b)) le_rfl) + nlinarith + +lemma connectionContract_diagonal_bound {Gamma : Fin 3 → Base} {B : ℝ} + (hB : 0 ≤ B) (hGamma : ∀ i, ‖Gamma i‖ ≤ B) (v : Base) : + |(connectionContract Gamma v v).1| ≤ 2*B*(v.1^2+v.2^2) ∧ + |(connectionContract Gamma v v).2| ≤ 2*B*(v.1^2+v.2^2) := by + have h1 (i : Fin 3) : |(Gamma i).1| ≤ B := by + exact (norm_fst_le (Gamma i)).trans (hGamma i) + have h2 (i : Fin 3) : |(Gamma i).2| ≤ B := by + exact (norm_snd_le (Gamma i)).trans (hGamma i) + constructor + · simpa only [connectionContract, Prod.fst_add, Prod.smul_fst, smul_eq_mul, pow_two] using + (abs_quadratic_combination (x := v.1) (y := v.2) hB (h1 0) (h1 1) (h1 2)) + · simpa only [connectionContract, Prod.snd_add, Prod.smul_snd, smul_eq_mul, pow_two] using + (abs_quadratic_combination (x := v.1) (y := v.2) hB (h2 0) (h2 1) (h2 2)) + +theorem convexQuadraticPhase_hessian_lower {h : Base → PhaseMean.Tensor} + {ell p : Base} {L B K r : ℝ} (hL : 0 ≤ L) (hB : 0 ≤ B) + (hK : ‖ell‖ ≤ K) (hp : ‖p‖ ≤ r) + (hGamma : ∀ i, ‖metricConnectionAt (h p,fderiv ℝ h p) i‖ ≤ B) + (v : Base) : + (L - 4*B*(K+L*r)) * (v.1^2+v.2^2) ≤ + coordinateMetricHessian h (convexQuadraticPhase ell L) p v v := by + have hg1 : |ell.1+L*p.1| ≤ K+L*r := by + calc + _ ≤ |ell.1|+|L*p.1| := abs_add_le _ _ + _ ≤ K+L*r := by + rw [abs_mul, abs_of_nonneg hL] + exact add_le_add ((norm_fst_le ell).trans hK) + (mul_le_mul_of_nonneg_left ((norm_fst_le p).trans hp) hL) + have hg2 : |ell.2+L*p.2| ≤ K+L*r := by + calc + _ ≤ |ell.2|+|L*p.2| := abs_add_le _ _ + _ ≤ K+L*r := by + rw [abs_mul, abs_of_nonneg hL] + exact add_le_add ((norm_snd_le ell).trans hK) + (mul_le_mul_of_nonneg_left ((norm_snd_le p).trans hp) hL) + obtain ⟨hc1,hc2⟩ := connectionContract_diagonal_bound hB hGamma v + let C := connectionContract (metricConnectionAt (h p,fderiv ℝ h p)) v v + have hdot : |phaseLinear (ell+L • p) C| ≤ 4*B*(K+L*r)*(v.1^2+v.2^2) := by + have hk : 0 ≤ K+L*r := (abs_nonneg _).trans hg1 + calc + _ ≤ |ell.1+L*p.1| * |C.1| + |ell.2+L*p.2| * |C.2| := by + simpa only [phaseLinear_apply, Prod.fst_add, Prod.snd_add, Prod.smul_fst, + Prod.smul_snd, smul_eq_mul, abs_mul] using + abs_add_le ((ell.1+L*p.1)*C.1) ((ell.2+L*p.2)*C.2) + _ ≤ (K+L*r)*(2*B*(v.1^2+v.2^2)) + + (K+L*r)*(2*B*(v.1^2+v.2^2)) := + add_le_add (mul_le_mul hg1 hc1 (abs_nonneg _) hk) + (mul_le_mul hg2 hc2 (abs_nonneg _) hk) + _ = _ := by ring + rw [convexQuadraticPhase_hessian] + have hh := (le_abs_self (phaseLinear (ell+L • p) C)).trans hdot + dsimp only [C] at hh + nlinarith + +/-- The radius and quadratic coefficient are chosen from the connection +and linear-covector bounds, before the individual metric or point. -/ +theorem exists_uniform_convex_quadratic_phases {B K : ℝ} (hB : 0 ≤ B) (hK : 0 ≤ K) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ + ∀ (h : Base → PhaseMean.Tensor) (ell p : Base), ‖ell‖ ≤ K → ‖p‖ ≤ r → + (∀ i, ‖metricConnectionAt (h p,fderiv ℝ h p) i‖ ≤ B) → + ∀ v : Base, (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (convexQuadraticPhase ell L) p v v := by + let L := 16*(B+1)*(K+1) + let r := (16*(B+1))⁻¹ + have hBp : 0 < 16*(B+1) := by positivity + have hL : 0 < L := by dsimp [L]; positivity + have hr : 0 < r := inv_pos.mpr hBp + have hLr : L*r = K+1 := by + dsimp [L,r] + field_simp [hBp.ne'] + have hsmall : 4*B*(K+L*r) ≤ L/2 := by + rw [hLr] + dsimp [L] + nlinarith + refine ⟨L,r,hL,hr,fun h ell p hell hp hGamma v => ?_⟩ + have hb := convexQuadraticPhase_hessian_lower hL.le hB hell hp hGamma v + nlinarith [mul_le_mul_of_nonneg_right hsmall (add_nonneg (sq_nonneg v.1) (sq_nonneg v.2))] + +theorem compact_uniform_convex_quadratic_phases {J : Set MetricFirstJet} + (hJ : IsCompact J) (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) + {K : ℝ} (hK : 0 ≤ K) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ + ∀ (h : Base → PhaseMean.Tensor) (ell p : Base), ‖ell‖ ≤ K → ‖p‖ ≤ r → + (h p,fderiv ℝ h p) ∈ J → ∀ v : Base, + (L/2)*(v.1^2+v.2^2) ≤ + coordinateMetricHessian h (convexQuadraticPhase ell L) p v v := by + obtain ⟨B,hB,hbound⟩ := compact_metricConnection_bound hJ hdet + obtain ⟨L,r,hL,hr,hphase⟩ := exists_uniform_convex_quadratic_phases hB hK + exact ⟨L,r,hL,hr,fun h ell p hell hp hj v => hphase h ell p hell hp (hbound _ hj) v⟩ + +/-- One disk and one quadratic coefficient work for all three phase +covectors and every metric whose first jet belongs to the fixed compact +set. Each phase has positive Hessian and is a genuine local coordinate. -/ +theorem finite_uniform_convex_phase_charts {J : Set MetricFirstJet} + (hJ : IsCompact J) (hdet : ∀ j ∈ J, metricJetDet j ≠ 0) + (ell : Fin 3 → Base) (hell : ∀ i, ell i ≠ 0) : + ∃ L r : ℝ, 0 < L ∧ 0 < r ∧ + ∀ (h : Base → PhaseMean.Tensor) (p : Base), ‖p‖ ≤ r → + (h p,fderiv ℝ h p) ∈ J → ∀ i, + (∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian h (convexQuadraticPhase (ell i) L) p v v) ∧ + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (∀ x, (e x).1 = convexQuadraticPhase (ell i) L x) ∧ + ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + obtain ⟨L,r,hL,hr,hphase⟩ := compact_uniform_convex_quadratic_phases hJ hdet (norm_nonneg ell) + let a := Finset.univ.inf' Finset.univ_nonempty (fun i : Fin 3 => ‖ell i‖) + have ha : 0 < a := (Finset.lt_inf'_iff _).mpr + (fun i _ => norm_pos_iff.mpr (hell i)) + let r' := min r (a/(2*L)) + have hr' : 0 < r' := lt_min hr (div_pos ha (mul_pos (by norm_num) hL)) + refine ⟨L,r',hL,hr',fun h p hp hj i => ?_⟩ + have hp' : ‖p‖ ≤ r := hp.trans (min_le_left _ _) + have ha_i : a ≤ ‖ell i‖ := Finset.inf'_le _ (Finset.mem_univ i) + have hregular : L*‖p‖ < ‖ell i‖ := by + have hsmall : L*‖p‖ ≤ a/2 := by + calc + _ ≤ L*(a/(2*L)) := mul_le_mul_of_nonneg_left (hp.trans (min_le_right _ _)) hL.le + _ = a/2 := by field_simp [hL.ne'] + linarith + refine ⟨?_,convexQuadraticPhase_chart hL.le hregular⟩ + intro v hv + have hq0 : v.1^2+v.2^2 ≠ 0 := by + intro hz + obtain ⟨hv1,hv2⟩ := sq_add_sq_eq_zero.mp hz + exact hv (Prod.ext hv1 hv2) + have hq : 0 < v.1^2+v.2^2 := lt_of_le_of_ne + (add_nonneg (sq_nonneg v.1) (sq_nonneg v.2)) (Ne.symm hq0) + exact (mul_pos (half_pos hL) hq).trans_le + (hphase h (ell i) p (norm_le_pi_norm ell i) hp' hj v) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateAxisDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateAxisDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..02f5c0dfdadf74441a1fd5531da1f5a99b3c8b65 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateAxisDerivative.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SourceMapRepresentative + +namespace OAI + +/-! The coordinate representative has exactly the original map's axis velocity, +including both endpoints of the compact 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 {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma coordinate_axis_derivative (P : SmoothCompactArc planeModel M) + (c : OpenPartialHomeomorph M Base) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) ∞ f) {φ : Base → V} + (hφ : ContDiff ℝ ∞ φ) {U : Set Base} (hEq : EqOn φ (f ∘ c.symm) U) + (haxis : ∀ t ∈ Icc P.start P.finish, + P.curve t ∈ c.source ∧ c (P.curve t) = ![0,t]) + (hUaxis : ∀ t ∈ Icc P.start P.finish, (![0,t] : Base) ∈ U) + {t : ℝ} (ht : t ∈ Icc P.start P.finish) : + fderiv ℝ φ (![0,t] : Base) (![0,1] : Base) = deriv (f ∘ P.curve) t := by + have heq : EqOn (φ ∘ crosscapAxis) (f ∘ P.curve) (Icc P.start P.finish) := by + intro s hs + rw [Function.comp_apply,crosscapAxis_apply,hEq (hUaxis s hs)] + change f (c.symm (![0,s] : Base)) = f (P.curve s) + rw [← (haxis s hs).2,c.left_inv (haxis s hs).1] + have hD := ((hφ.differentiable (by simp) (crosscapAxis t)).hasFDerivAt).comp_hasDerivAt t + crosscapAxis.hasFDerivAt.hasDerivAt + have hD' := hD.hasDerivWithinAt.congr_of_mem (fun s hs => (heq hs).symm) ht + have hfD := ((hf.contMDiffAt.comp t + (P.smooth.contMDiffAt (P.domain_open.mem_nhds (P.interval_subset ht)))).contDiffAt.differentiableAt (by simp)).hasDerivAt + have hd := ((uniqueDiffOn_Icc P.start_lt_finish) t ht).eq_deriv (Icc P.start P.finish) + hfD.hasDerivWithinAt hD' + simpa only [crosscapAxis_apply] using hd.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateC1Bounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateC1Bounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8788a239d55e2c84e3c62d950fd5975d8ff8db04 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateC1Bounds.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoefficientCoordinates + +namespace OAI + +/-! Fixed atlas seminorms control ordinary values and first derivatives on +all the original compact chart supports. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + [NormedAddCommGroup V] [NormedSpace ℝ V] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem coordinate_C1_bound {D : ℝ} (hD : 0 ≤ D) : + ∃ E : ℝ, 1 ≤ E ∧ ∀ F : M → V, ContMDiff planeModel 𝓘(ℝ,V) ∞ F → + B.WeightedBound 1 1 D F → ∀ i p, p ∈ tsupport (B.weight i) → + ‖F p‖ ≤ E ∧ ‖fderiv ℝ (F ∘ (chart (i : M)).symm) (chart (i : M) p)‖ ≤ E := by + classical + choose R hR hread using fun i : B.centers => B.vectorChartRead_bound (V := V) i 1 + let E := 1+(∑ 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 hsum hD] + refine ⟨E,hE,?_⟩ + intro F hF hb i p hp + have h := hread i F 1 D zero_lt_one le_rfl hD hF hb + have hi : R i*D ≤ E := by + have hh := mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hR j) (Finset.mem_univ i)) hD + dsimp only [E] + linarith + have hv := (h.norm_le (mem_univ (chart (i : M) p))).trans hi + rw [B.vectorChartRead_on_support i F ⟨p,hp,rfl⟩, + (chart (i : M)).left_inv (B.weight_support i hp)] at hv + refine ⟨hv,?_⟩ + have hd := h.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 hd + rw [B.vectorChartRead_fderiv i hF ⟨p,hp,rfl⟩] at hd + exact hd.trans hi + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateGauss.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateGauss.lean new file mode 100644 index 0000000000000000000000000000000000000000..1b24f08245f3b5a28e74cc3d19a79412bcac4ea9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateGauss.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealMetricDerivatives + +namespace OAI + +/-! The coordinate Gauss identity, proved from Euclidean derivatives and the +explicit normal projection. Its right side depends only on the metric. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame + +/-- Pairing of tangent covectors by the inverse first fundamental form. -/ +def inverseMetricPair (E F G a b c d : ℝ) : ℝ := + (G*a*c-F*(a*d+b*c)+E*b*d)/(E*G-F^2) + +lemma normalPart_dot_normalPart (X Y U V : RVec 4) (hD : gramDet X Y ≠ 0) : + realNormalPart X Y U ⬝ᵥ realNormalPart X Y V = U ⬝ᵥ V- + inverseMetricPair (X ⬝ᵥ X) (X ⬝ᵥ Y) (Y ⬝ᵥ Y) + (X ⬝ᵥ U) (Y ⬝ᵥ U) (X ⬝ᵥ V) (Y ⬝ᵥ V) := by + have hperp := realNormalPart_perp X Y U hD + have hX : realNormalPart X Y U ⬝ᵥ X = 0 := (dotProduct_comm _ _).trans hperp.1 + have hY : realNormalPart X Y U ⬝ᵥ Y = 0 := (dotProduct_comm _ _).trans hperp.2 + have hcut : realNormalPart X Y U ⬝ᵥ realNormalPart X Y V = + realNormalPart X Y U ⬝ᵥ V := by + conv_lhs => arg 2; unfold realNormalPart + simp only [dotProduct_sub,dotProduct_smul,hX,hY,smul_eq_mul,mul_zero,sub_zero] + rw [hcut] + simp only [realNormalPart,inverseMetricPair,NormalFrame.gramDet,sub_dotProduct,smul_dotProduct, + smul_eq_mul] + ring + +/-- Gaussian curvature times the coordinate metric determinant. -/ +def coordinateGauss (E F G : Base → ℝ) (p : Base) : ℝ := + (2*coordDeriv dx (coordDeriv dy F) p- + coordDeriv dy (coordDeriv dy E) p-coordDeriv dx (coordDeriv dx G) p)/2- + inverseMetricPair (E p) (F p) (G p) + (coordDeriv dx E p/2) (coordDeriv dx F p-coordDeriv dy E p/2) + (coordDeriv dy F p-coordDeriv dx G p/2) (coordDeriv dy G p/2)+ + inverseMetricPair (E p) (F p) (G p) + (coordDeriv dy E p/2) (coordDeriv dx G p/2) + (coordDeriv dy E p/2) (coordDeriv dx G p/2) + +theorem gauss_metric_identity {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + realSecondForm F dx dx p ⬝ᵥ realSecondForm F dy dy p- + realSecondForm F dx dy p ⬝ᵥ realSecondForm F dx dy p = + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p := by + have hcomm : coordDeriv dy (coordDeriv dx F) = coordDeriv dx (coordDeriv dy F) := + funext fun q => real_second_coordDeriv_comm hF q dy dx + unfold realSecondForm + rw [normalPart_dot_normalPart _ _ _ _ hD,normalPart_dot_normalPart _ _ _ _ hD] + unfold coordinateGauss + rw [← raw_gauss_metric_identity hF p] + simp only [realMetric_partial hF,hcomm,realMetric,inverseMetricPair,dotProduct_comm] + ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateImmersionReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateImmersionReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..204844526f9a22b19bddcb9192bd4853f03b0c28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateImmersionReplacement.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinatePushforward + +namespace OAI + +/-! A supported immersion replacement in constructed smooth surface 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] [T2Space M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem coordinate_immersion_replacement (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + {f : M → V} (hf : ContMDiff planeModel 𝓘(ℝ,V) ∞ f) + {f₀ F : Base → V} (hF : ContDiff ℝ ∞ F) (hf₀ : ContDiff ℝ ∞ f₀) + (hc : HasCompactSupport (F-f₀)) (hs : tsupport (F-f₀) ⊆ c.target) + {O : Set Base} (hO : IsOpen O) (hKO : tsupport (F-f₀) ⊆ O) + (hmatch : EqOn (f ∘ c.symm) f₀ O) + (hIF : ∀ x ∈ tsupport (F-f₀), Function.Injective (fderiv ℝ F x)) + (hIf : ∀ q ∉ c.symm '' tsupport (F-f₀), + Function.Injective (mfderiv planeModel 𝓘(ℝ,V) f q)) : + ∃ g : M → V, ContMDiff planeModel 𝓘(ℝ,V) ∞ g ∧ + (∀ q, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) g q)) ∧ + (∀ q ∉ c.symm '' tsupport (F-f₀), g =ᶠ[𝓝 q] f) ∧ + ∀ q ∈ c.source, c q ∈ O → g =ᶠ[𝓝 q] F ∘ c := by + let δ := F-f₀ + let g := f+coordinatePushforward c δ + have hg : ContMDiff planeModel 𝓘(ℝ,V) ∞ g := + hf.add (coordinatePushforward_smooth c hcs (hF.sub hf₀) hc hs) + have hout : ∀ q ∉ c.symm '' tsupport δ, g =ᶠ[𝓝 q] f := by + intro q hq + have hn : q ∉ tsupport (coordinatePushforward c δ) := + fun h => hq (coordinatePushforward_tsupport c hc hs h) + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + change f y+coordinatePushforward c δ y = f y + rw [hy] + exact add_zero _ + have hin : ∀ q ∈ c.source, c q ∈ O → g =ᶠ[𝓝 q] F ∘ c := by + intro q hq hOq + filter_upwards [c.open_source.mem_nhds hq, + (c.continuousAt hq).preimage_mem_nhds (hO.mem_nhds hOq)] with y hy hOy + have hm := hmatch hOy + change f (c.symm (c y)) = f₀ (c y) at hm + rw [c.left_inv hy] at hm + change f y+coordinatePushforward c δ y = F (c y) + rw [coordinatePushforward_source c δ hy,hm] + exact add_sub_cancel _ _ + refine ⟨g,hg,?_,hout,hin⟩ + intro q + by_cases hq : q ∈ c.symm '' tsupport δ + · obtain ⟨x,hx,rfl⟩ := hq + have ht := hs hx + have hsource := c.map_target ht + have hcx : c (c.symm x) = x := c.right_inv ht + have hOcx : c (c.symm x) ∈ O := by rw [hcx]; exact hKO hx + rw [(hin _ hsource hOcx).mfderiv_eq] + have hFc : ContMDiff 𝓘(ℝ,Base) 𝓘(ℝ,V) ∞ F := hF.contMDiff + have hd : c.MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨hcs.mdifferentiableOn (by simp),hci.mdifferentiableOn (by simp)⟩ + rw [mfderiv_comp _ (hFc.mdifferentiable (by simp)).mdifferentiableAt + (hd.mdifferentiableAt hsource),mfderiv_eq_fderiv,hcx] + exact (hIF x hx).comp (hd.mfderiv_injective hsource) + · rw [(hout q hq).mfderiv_eq] + exact hIf q hq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateInverseGerm.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateInverseGerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..0312bd19932734d07e1fa9027b49753a7afb088f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateInverseGerm.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Local inverse charts agree with the inverse of the assembled chart +near every common source point. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] + +theorem coordinate_inverse_germ (e d : OpenPartialHomeomorph M Base) + {y : Base} (hy : y ∈ e.target) (hx : e.symm y ∈ d.source) + (heq : EqOn d e d.source) : + y ∈ d.target ∧ e.symm =ᶠ[𝓝 y] d.symm := by + have hvalue : d (e.symm y) = y := (heq hx).trans (e.right_inv hy) + have hyd : y ∈ d.target := hvalue ▸ d.map_source hx + refine ⟨hyd,?_⟩ + filter_upwards [e.open_target.mem_nhds hy, + e.symm.continuousAt hy |>.eventually (d.open_source.mem_nhds hx)] with z hz hzd + calc + e.symm z = d.symm (d (e.symm z)) := (d.left_inv hzd).symm + _ = d.symm (e (e.symm z)) := congrArg d.symm (heq hzd) + _ = d.symm z := congrArg d.symm (e.right_inv hz) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateIsometryMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateIsometryMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9358f9f76905e255a4a77ad49bff97b3e020415 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateIsometryMetric.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricConvexity + +namespace OAI + +/-! The ordinary coordinate metric of an isometric immersion is the +prescribed metric, independently of atlas partition weights. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma coordinateMap_metric_evaluate {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) (q : M) {x : Base} + (hx : x ∈ coordinateDomain q) (v w : Base) : + realMetric (coordinateMap F q) v w x = PhaseMean.evaluate (coordinateMetric g q x) v w := by + have hi := ((coordinateInverse_smoothOn q) x hx).contMDiffAt + ((coordinateDomain_open q).mem_nhds hx) + have hm := (hF.1 (coordinateInverse q x)).mdifferentiableAt (by simp) + have hic := hi.mdifferentiableAt (by simp) + have hd := mfderiv_comp x hm hic + rw [mfderiv_eq_fderiv] at hd + have hs : DifferentiableAt ℝ (F ∘ coordinateInverse q) x := (hm.comp x hic).differentiableAt + have he : fderiv ℝ (coordinateMap F q) x = spaceCoordinates.toContinuousLinearMap.comp + ((mfderiv planeModel spaceModel F (coordinateInverse q x)).comp + (mfderiv 𝓘(ℝ,Base) planeModel (coordinateInverse q) x)) := by + change fderiv ℝ (spaceCoordinates ∘ (F ∘ coordinateInverse q)) x = _ + rw [fderiv_comp x spaceCoordinates.differentiableAt hs,spaceCoordinates.fderiv,hd] + rfl + rw [coordinateMetric_evaluate] + change fderiv ℝ (coordinateMap F q) x v ⬝ᵥ fderiv ℝ (coordinateMap F q) x w = _ + rw [he] + let vv : TangentSpace 𝓘(ℝ,Base) x := v + let ww : TangentSpace 𝓘(ℝ,Base) x := w + let dv : TangentSpace planeModel (coordinateInverse q x) := + mfderiv 𝓘(ℝ,Base) planeModel (coordinateInverse q) x vv + let dw : TangentSpace planeModel (coordinateInverse q x) := + mfderiv 𝓘(ℝ,Base) planeModel (coordinateInverse q) x ww + change spaceCoordinates (mfderiv planeModel spaceModel F (coordinateInverse q x) dv) ⬝ᵥ + spaceCoordinates (mfderiv planeModel spaceModel F (coordinateInverse q x) dw) = g.inner _ dv dw + exact (spaceCoordinates_dot _ _).trans (hF.2 _ dv dw) + +lemma coordinateMap_metric {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) (q : M) {x : Base} + (hx : x ∈ coordinateDomain q) : + inducedCoordinateMetric (coordinateMap F q) x = coordinateMetric g q x := by + ext k + fin_cases k + · change realMetric (coordinateMap F q) dx dx x = coordinateMetric g q x 0 + simpa [PhaseMean.evaluate,dx,dy] using coordinateMap_metric_evaluate hF q hx dx dx + · change realMetric (coordinateMap F q) dx dy x = coordinateMetric g q x 1 + simpa [PhaseMean.evaluate,dx,dy] using coordinateMap_metric_evaluate hF q hx dx dy + · change realMetric (coordinateMap F q) dy dy x = coordinateMetric g q x 2 + simpa [PhaseMean.evaluate,dx,dy] using coordinateMap_metric_evaluate hF q hx dy dy + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateNonlinearBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateNonlinearBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9bf633ce19222334746671d7c99dfc82dcc6875 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateNonlinearBounds.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRealVariationBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIsometryBounds +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticInteraction + +namespace OAI + +/-! Coordinate realizations of the actual bilinear and cubic polynomial +terms in the nonlinear increment identity. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma coordinateQuadraticPolynomial_eq_cross {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (X : RealModes.RField 4) (t : ℝ) : + coordinateQuadraticPolynomial P ε G X t = fun p => (1 / 2 : ℝ) • + tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) (X ∘ planeCoordinateIsometry) t + (planeCoordinateIsometry.symm p) := by + funext p k + simp only [coordinateQuadraticPolynomial, tensorQuadraticCross, quadraticCross, + realVariation, Pi.smul_apply, smul_eq_mul] + simp_rw [mul_add, Finset.mul_sum] + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro l _ + ring + +lemma coordinateQuadraticInteraction_eq_cross {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (X Y : RealModes.RField 4) : + coordinateQuadraticInteraction P ε G X Y = fun p => + (RealModes.realLinearizedTensor X Y p + RealModes.realMetricTensor Y p) + + tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) (Y ∘ planeCoordinateIsometry) 0 + (planeCoordinateIsometry.symm p) + coordinateQuadraticPolynomial P ε G Y 0 p := by + funext p k + simp only [coordinateQuadraticInteraction, tensorQuadraticCross, quadraticCross, + realVariation, Pi.add_apply] + congr 1 + rw [← Finset.sum_add_distrib, Finset.mul_sum] + congr 1 + apply Finset.sum_congr rfl + intro l _ + ring + +lemma coordinateTaylorRemainder_eq_tensor {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (X : RealModes.RField 4) : + coordinateTaylorRemainder P ε G X = + tensorTaylorRemainder P ε G (X ∘ planeCoordinateIsometry) 0 ∘ planeCoordinateIsometry.symm := rfl + +theorem coordinateCross_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) + (s ε C D : ℝ), 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → 0 < D → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ X → ContDiff ℝ ∞ Y → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + tensorOrder P) B (lowJet G) → + WeightedBound Set.univ s (m + tensorOrder P) C X → + WeightedBound Set.univ s (m + tensorOrder P) D Y → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) s m (E * ε * C * D / s ^ tensorLoss P) + (tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) + (Y ∘ planeCoordinateIsometry) 0 ∘ planeCoordinateIsometry.symm) := by + obtain ⟨E,hE,he⟩ := tensorQuadraticCross_bound hU hQ P hP m B hB + refine ⟨E,hE,?_⟩ + intro G X Y s ε C D hs hs1 hε hε1 hC hD hG hX hY hGQ hGb hXb hYb + have hx := weightedBound_comp_isometry planeCoordinateIsometry hX hXb + have hy := weightedBound_comp_isometry planeCoordinateIsometry hY hYb + have hb := he G (X ∘ planeCoordinateIsometry) (Y ∘ planeCoordinateIsometry) + s ε C D hs hs1 hε hε1 hC hD hG (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) hGQ hGb + (fun j hj p hp => by + simpa only [iteratedFDerivWithin_of_isOpen j hU hp, iteratedFDerivWithin_univ] + using hx j hj p (Set.mem_univ p)) + (fun j hj p hp => by + simpa only [iteratedFDerivWithin_of_isOpen j hU hp, iteratedFDerivWithin_univ] + using hy j hj p (Set.mem_univ p)) 0 (by constructor <;> norm_num) + exact weightedBound_comp_isometry_on planeCoordinateIsometry.symm hU + (tensorQuadraticCross_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) ε 0) hb + +theorem coordinateTaylorRemainder_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) + (s ε C : ℝ), 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → + 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 s (m + tensorOrder P) B + (lowJet (fun p => G p + t • X (planeCoordinateIsometry p)))) → + WeightedBound Set.univ s (m + tensorOrder P) C X → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) s m + (E * ε * C ^ 3 / s ^ tensorLoss P) (coordinateTaylorRemainder P ε G X) := by + obtain ⟨E,hE,he⟩ := tensorTaylorRemainder_bound hU hQ P hP m B hB + refine ⟨E,hE,?_⟩ + intro G X s ε C hs hs1 hε hε1 hC hG hX hGQ hGb hXb + have hx := weightedBound_comp_isometry planeCoordinateIsometry hX hXb + have hb := he G (X ∘ planeCoordinateIsometry) s ε C hs hs1 hε hε1 hC hG + (hX.comp planeCoordinateIsometry.contDiff) hGQ hGb + (fun j hj p hp => by + simpa only [iteratedFDerivWithin_of_isOpen j hU hp, iteratedFDerivWithin_univ] + using hx j hj p (Set.mem_univ p)) 0 (by constructor <;> norm_num) + rw [coordinateTaylorRemainder_eq_tensor] + exact weightedBound_comp_isometry_on planeCoordinateIsometry.symm hU + (tensorTaylorRemainder_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) ε 0) hb + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinatePushforward.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinatePushforward.lean new file mode 100644 index 0000000000000000000000000000000000000000..7459544e70f566a77b08900591b1f5510bfd60a1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinatePushforward.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartPushforward + +namespace OAI + +/-! Extension of a supported coordinate change through any smooth surface +coordinate neighborhood, including the constructed crosscap coordinates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] +variable {V : Type*} [NormedAddCommGroup V] + +def coordinatePushforward (c : OpenPartialHomeomorph M Base) (δ : Base → V) : M → V := + c.source.indicator (δ ∘ c) + +lemma coordinatePushforward_source (c : OpenPartialHomeomorph M Base) + (δ : Base → V) {q : M} (hq : q ∈ c.source) : + coordinatePushforward c δ q = δ (c q) := indicator_of_mem hq _ + +lemma coordinatePushforward_zero_off (c : OpenPartialHomeomorph M Base) + (δ : Base → V) {q : M} (hq : q ∉ c.symm '' tsupport δ) : + coordinatePushforward c δ q = 0 := by + by_cases hs : q ∈ c.source + · rw [coordinatePushforward_source c δ hs] + apply image_eq_zero_of_notMem_tsupport + intro hz + exact hq ⟨c q,hz,c.left_inv hs⟩ + · exact indicator_of_notMem hs _ + +variable [T2Space M] + +lemma coordinatePushforward_tsupport (c : OpenPartialHomeomorph M Base) + {δ : Base → V} (hc : HasCompactSupport δ) (hs : tsupport δ ⊆ c.target) : + tsupport (coordinatePushforward c δ) ⊆ c.symm '' tsupport δ := by + have hK : IsCompact (c.symm '' tsupport δ) := + hc.image_of_continuousOn (c.continuousOn_symm.mono hs) + apply closure_minimal _ hK.isClosed + intro q hq + by_contra hn + exact hq (coordinatePushforward_zero_off c δ hn) + +variable [ChartedSpace Plane M] [NormedSpace ℝ V] + +lemma coordinatePushforward_smooth (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + {δ : Base → V} (hd : ContDiff ℝ ∞ δ) (hc : HasCompactSupport δ) + (hs : tsupport δ ⊆ c.target) : + ContMDiff planeModel 𝓘(ℝ,V) ∞ (coordinatePushforward c δ) := by + intro q + by_cases hq : q ∈ tsupport (coordinatePushforward c δ) + · obtain ⟨z,hz,rfl⟩ := coordinatePushforward_tsupport c hc hs hq + have hsource := c.map_target (hs hz) + have hlocal := hd.contMDiff.contMDiffAt.comp _ + (hcs.contMDiffAt (c.open_source.mem_nhds hsource)) + apply hlocal.congr_of_eventuallyEq + filter_upwards [c.open_source.mem_nhds hsource] with y hy + exact coordinatePushforward_source c δ hy + · exact contMDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hq) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateQuadraticExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateQuadraticExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..55270f8e2f7f481e280832fe3f3db192bd67311e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateQuadraticExpansion.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticFamily +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedResidual + +namespace OAI + +/-! Transport the polynomial quadratic expansion into the same coordinates +and phase labels as the metric quadratic expansion. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open MixedExpression ModulatedJets + +abbrev coordinatePhase (φ : Base → ℝ) : SmallModes.Base → ℝ := φ ∘ planeCoordinateIsometry.symm +abbrev coordinateAmplitude (H : Base → Fin 4 → ℂ) : SmallModes.Field 4 := H ∘ planeCoordinateIsometry.symm + +lemma coordinate_phase_value (τ : ℝ) (φ : Base → ℝ) (x : Base) : + QuadraticMean.phase (φ x / τ) = phase τ φ x := by + simp only [QuadraticMean.phase, phase, Complex.ofReal_div] + congr 1 + ring + +lemma real_oscillatorySum_coordinates {ι : Type*} [Fintype ι] + (τ : ℝ) (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) : + realField (oscillatorySum τ φ H) = + QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) ∘ planeCoordinateIsometry := by + funext x a + simp only [realField, oscillatorySum, Finset.sum_apply, Complex.re_sum, + QuadraticMean.sumDisplacement, Function.comp_apply, QuadraticMean.displacement, + QuadraticMean.realMode, QuadraticMean.realPart, coordinatePhase, coordinateAmplitude, + planeCoordinateIsometry.symm_apply_apply, Pi.smul_apply, smul_eq_mul, coordinate_phase_value] + +lemma coordinate_quadratic_phase {ι : Type*} (φ : ι → Base → ℝ) + (l : RealModes.QuadraticLabel ι) (x : SmallModes.Base) : + quadraticFamilyPhase φ l (planeCoordinateIsometry.symm x) = + RealModes.quadraticPhase (fun i => coordinatePhase (φ i)) l x := by + rcases l with i | ⟨i,j,b⟩ + · rfl + · cases b <;> rfl + +def coordinateQuadraticPolynomial {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X : RealModes.RField 4) (t : ℝ) : SmallModes.Base → Fin 3 → ℝ := + fun p k => ∑ l, ε ^ (l.val + 1) * ((1 / 2 : ℝ) * ((P k l).variations 1).eval + ![G, X ∘ planeCoordinateIsometry, X ∘ planeCoordinateIsometry, 0] (planeCoordinateIsometry.symm p,t)) + +def coordinateQuadraticMean {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) : + SmallModes.Base → Fin 3 → ℝ := + fun p k => ∑ i, quadraticMeanCoefficient (P k) ε G (φ i) (H i) τ t (planeCoordinateIsometry.symm p) + +def coordinateQuadraticCoefficient {n : ℕ} {ι : Type*} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) + (l : RealModes.QuadraticLabel ι) : SmallModes.Tensor := + fun p k => quadraticFamilyCoefficient (P k) ε G φ H τ t l (planeCoordinateIsometry.symm p) + +theorem coordinate_quadratic_polynomial_expansion {n : ℕ} {ι : Type*} + [Fintype ι] [DecidableEq ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) (τ t : ℝ) : + let X := QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + coordinateQuadraticPolynomial P ε G X t = + coordinateQuadraticMean P ε G φ H τ t + + fun p => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun i => coordinatePhase (φ i)) l) + (coordinateQuadraticCoefficient P ε G φ H τ t l) p := by + dsimp only + funext p k + unfold coordinateQuadraticPolynomial + rw [← real_oscillatorySum_coordinates τ φ H] + rw [quadratic_zero_phase_expansion (P k) ε G φ H hφ hH τ t (planeCoordinateIsometry.symm p), + quadraticOscillation_eq_family] + simp only [Pi.add_apply, Finset.sum_apply, coordinateQuadraticMean] + congr 1 + apply Finset.sum_congr rfl + intro l hl + simp only [QuadraticMean.displacement, QuadraticMean.realMode, QuadraticMean.realPart, + Pi.smul_apply, smul_eq_mul, coordinateQuadraticCoefficient] + rw [← coordinate_quadratic_phase φ l p] + exact congrArg Complex.re (congrArg (fun z : ℂ => z * + quadraticFamilyCoefficient (P k) ε G φ H τ t l (planeCoordinateIsometry.symm p)) + (coordinate_phase_value τ (quadraticFamilyPhase φ l) (planeCoordinateIsometry.symm p))).symm + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateRegularReplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateRegularReplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bdb1839d17d64808065889e7a233017b336c9e0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateRegularReplacement.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinatePushforward +import OAI.Geometry.SurfaceImmersion.Whitney.SourceMapRepresentative + +namespace OAI + +/-! A supported coordinate replacement preserving differential rank +preserves the exact regular locus on the original 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] [T2Space M] + +theorem coordinate_regular_replacement (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {φ Q : Base → ProjectionTarget 3} (hQ : ContDiff ℝ ∞ Q) + (hc : HasCompactSupport Q) {O : Set Base} (hO : IsOpen O) (hOt : O ⊆ c.target) + (hs : tsupport Q ⊆ O) (hmatch : EqOn φ (f ∘ c.symm) O) + (hrel : ∀ x ∈ tsupport Q, Function.Injective (fderiv ℝ (φ+Q) x) ↔ + Function.Injective (fderiv ℝ φ x)) : + ∃ g : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g ∧ + (∀ x, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) g x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) ∧ + (∀ x ∉ c.symm '' tsupport Q, g =ᶠ[𝓝 x] f) ∧ + ∀ x ∈ c.source, c x ∈ O → g =ᶠ[𝓝 x] (φ+Q) ∘ c := by + let g := f+coordinatePushforward c Q + have hg : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ g := + hf.add (coordinatePushforward_smooth c hcs hQ hc (hs.trans hOt)) + have hout : ∀ x ∉ c.symm '' tsupport Q, g =ᶠ[𝓝 x] f := by + intro x hx + have hn : x ∉ tsupport (coordinatePushforward c Q) := + fun h => hx (coordinatePushforward_tsupport c hc (hs.trans hOt) h) + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hn] with y hy + change f y+coordinatePushforward c Q y = f y + simp only [Pi.zero_apply] at hy + rw [hy,add_zero] + have hmatchG : EqOn (φ+Q) (g ∘ c.symm) O := by + intro x hx + have hxt := hOt hx + change φ x+Q x = f (c.symm x)+coordinatePushforward c Q (c.symm x) + rw [coordinatePushforward_source c Q (c.map_target hxt),c.right_inv hxt,hmatch hx] + rfl + refine ⟨g,hg,?_,hout,?_⟩ + · intro x + by_cases hx : x ∈ c.symm '' tsupport Q + · obtain ⟨z,hz,rfl⟩ := hx + have hzO := hs hz + have hiF := coordinate_representative_immersion_iff c hcs hci hf hO hOt hmatch hzO + have hiG := coordinate_representative_immersion_iff c hcs hci hg hO hOt hmatchG hzO + exact hiG.symm.trans ((hrel z hz).trans hiF) + · rw [(hout x hx).mfderiv_eq] + exact Iff.rfl + · intro x hx hcx + filter_upwards [c.open_source.mem_nhds hx, + (c.continuousAt hx).preimage_mem_nhds (hO.mem_nhds hcx)] with y hy hyO + have he := hmatchG hyO + change (φ+Q) (c y) = g (c.symm (c y)) at he + rw [c.left_inv hy] at he + exact he.symm + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateSardThree.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateSardThree.lean new file mode 100644 index 0000000000000000000000000000000000000000..ce42038057842483b169f3c8357de1cbc4b3e9bf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateSardThree.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PublishedInputs +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! The exact three-dimensional coordinate Sard and regular-fiber facts +needed for generic projections of a surface from four-space to three-space. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PublishedInputs + +abbrev SurfaceDirectionParameters := (Fin 2 → ℝ) × ℝ + +theorem smooth_coordinate_critical_values_null + (f : SurfaceDirectionParameters → ThreeSpace) + (U : Set SurfaceDirectionParameters) (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + have : ContinuousSMul ℝ SurfaceDirectionParameters := Prod.continuousSMul + let L : ThreeSpace ≃L[ℝ] SurfaceDirectionParameters := + ContinuousLinearEquiv.ofFinrankEq (by simp) + let C : Set SurfaceDirectionParameters := + {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)} + let g : ThreeSpace → ThreeSpace := f ∘ L + have hg (x : ThreeSpace) (hx : L x ∈ U) : + HasFDerivAt g ((fderiv ℝ f (L x)).comp L.toContinuousLinearMap) x := + ((hf.contDiffAt (hU.mem_nhds hx)).differentiableAt (by simp)).hasFDerivAt.comp x + L.hasFDerivAt + have hnull : volume (g '' (L ⁻¹' C)) = 0 := by + apply addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun x => (fderiv ℝ f (L x)).comp L.toContinuousLinearMap) + · intro x hx + exact (hg x hx.1).hasFDerivWithinAt + · intro x hx + rw [LinearMap.det_eq_zero_iff_ker_ne_bot,ne_eq,LinearMap.ker_eq_bot] + intro hinj + have hsurj := LinearMap.injective_iff_surjective.mp hinj + apply hx.2 + intro y + obtain ⟨z,hz⟩ := hsurj y + exact ⟨L z,hz⟩ + have he : g '' (L ⁻¹' C) = f '' C := 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 [g]⟩ + rwa [he] at hnull + +lemma regular_coordinate_point_locally_injective + {f : SurfaceDirectionParameters → ThreeSpace} + {U : Set SurfaceDirectionParameters} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) + {x : SurfaceDirectionParameters} (hx : x ∈ U) + (hreg : Function.Surjective (fderiv ℝ f x)) : + ∃ V : Set SurfaceDirectionParameters, IsOpen V ∧ x ∈ V ∧ V.InjOn f := by + have : ContinuousSMul ℝ SurfaceDirectionParameters := Prod.continuousSMul + have hdim : Module.finrank ℝ SurfaceDirectionParameters = Module.finrank ℝ ThreeSpace := by simp + have hinj : Function.Injective (fderiv ℝ f x) := + (LinearMap.injective_iff_surjective_of_finrank_eq_finrank hdim).mpr hreg + let L : SurfaceDirectionParameters ≃L[ℝ] ThreeSpace := + ContinuousLinearEquiv.ofBijective (fderiv ℝ f x) + (LinearMap.ker_eq_bot.mpr hinj) (LinearMap.range_eq_top.mpr hreg) + have hfx : ContDiffAt ℝ ∞ f x := hf.contDiffAt (hU.mem_nhds hx) + have hd : HasFDerivAt f L.toContinuousLinearMap x := + (hfx.differentiableAt (by simp)).hasFDerivAt + let e := hfx.toOpenPartialHomeomorph f hd (by simp) + exact ⟨e.source,e.open_source,hfx.mem_toOpenPartialHomeomorph_source hd (by simp),e.injOn⟩ + +theorem finite_compact_coordinate_regular_fiber + {f : SurfaceDirectionParameters → ThreeSpace} + {U : Set SurfaceDirectionParameters} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) + {K : Set SurfaceDirectionParameters} (hK : IsCompact K) (hKU : K ⊆ U) (y : ThreeSpace) + (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.of_isClosed_subset + ((hf.continuousOn.mono hKU).preimage_isClosed_of_isClosed hK.isClosed isClosed_singleton) + inter_subset_left + apply hcompact.finite + rw [isDiscrete_iff_forall_mem_exists_isOpen] + intro x hx + obtain ⟨V,hV,hxV,hVinj⟩ := regular_coordinate_point_locally_injective hU hf + (hKU hx.1) (hreg x hx.1 hx.2) + refine ⟨V,hV,?_⟩ + ext z + constructor + · rintro ⟨hzV,hzK,hzy⟩ + exact mem_singleton_iff.mpr (hVinj hzV hxV (hzy.trans hx.2.symm)) + · rintro rfl + exact ⟨hxV,hx⟩ + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTaylorIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTaylorIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..c277e91af3793fe6bb5582d74e31e7a750ef90f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTaylorIdentity.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CombinedQuadraticExpansion +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTaylorRemainder +import OAI.Geometry.SurfaceImmersion.Geometry.SecondVariationAlgebra + +namespace OAI + +/-! Exact Taylor identity for the metric plus its finite polynomial +perturbation, in the coordinates of the forced-mode construction. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def coordinatePolynomialValue {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (t : ℝ) : SmallModes.Base → PhaseMean.Tensor := + fun p k => ∑ l, ε ^ (l.val + 1) * (P k l).eval G (planeCoordinateIsometry.symm p,t) + +def coordinateMetricMap {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) : SmallModes.Base → PhaseMean.Tensor := + RealModes.realMetricTensor (G ∘ planeCoordinateIsometry.symm) + coordinatePolynomialValue P ε G 0 + +def coordinateFullQuadratic {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X : RealModes.RField 4) : SmallModes.Base → PhaseMean.Tensor := + RealModes.realMetricTensor X + coordinateQuadraticPolynomial P ε G X 0 + +def coordinateTaylorRemainder {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X : RealModes.RField 4) : SmallModes.Base → PhaseMean.Tensor := + fun p k => ∑ l, ε ^ (l.val + 1) * + (P k l).taylorRemainder G (X ∘ planeCoordinateIsometry) 0 (planeCoordinateIsometry.symm p) + +theorem coordinate_metric_taylor_identity {n : ℕ} (P : Fin 3 → Fin n → Expression) + (ε : ℝ) {G : Base → Space} {X : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hX : ContDiff ℝ ∞ X) : + coordinateMetricMap P ε (fun x => G x + X (planeCoordinateIsometry x)) - + coordinateMetricMap P ε G = + coordinateFullLinearized P ε G X + coordinateFullQuadratic P ε G X + + coordinateTaylorRemainder P ε G X := by + have hf : (fun x => G x + X (planeCoordinateIsometry x)) ∘ planeCoordinateIsometry.symm = + fun p => (G ∘ planeCoordinateIsometry.symm) p + X p := by + funext p + simp only [Function.comp_apply, planeCoordinateIsometry.apply_symm_apply] + funext p k + simp only [coordinateMetricMap, Pi.sub_apply, Pi.add_apply, hf] + rw [RealModes.realMetricTensor_add + ((hG.comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) p) + (hX.differentiable (by simp) p)] + simp only [coordinateFullLinearized, coordinateRealLinearized, coordinateFullQuadratic, + coordinateQuadraticPolynomial, coordinatePolynomialValue, coordinateTaylorRemainder, + linearized, Pi.add_apply, Expression.taylorRemainder] + simp only [second_diagonal_eq_pair _ hG (hX.comp planeCoordinateIsometry.contDiff), + mul_sub, Finset.sum_sub_distrib, Function.comp_apply] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTensorPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTensorPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..baa203b3314c3d5f6552a65f2a005c032b1b1be7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTensorPullback.lean @@ -0,0 +1,160 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinatePolynomialPullback +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialScalar + +namespace OAI + +/-! Pullback of finite tensor expressions under fixed coordinate changes. +The Jacobian factors, coefficient substitution, and higher jet atoms are +all constructed, so the evaluation identity assumes no tensor covariance. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators Matrix Topology + +namespace ClosedSurfaceR4.JetPolynomial + +abbrev TensorExpression := Fin 3 → Expression + +/-- The derivative of the coordinate map in the real pair coordinates +used by the three-component tensor representation. -/ +def tensorCoordinateDerivative (T : Base → Base) (x : Base) : + SmallModes.Base →L[ℝ] SmallModes.Base := + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + ((fderiv ℝ T x).comp + planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap) + +/-- Covariant pullback of a symmetric tensor by the actual derivative. -/ +def tensorCoordinatePullbackValue (T : Base → Base) (x : Base) : + PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + PhaseMean.pullback (tensorCoordinateDerivative T x) + +/-- The three Jacobian coefficients of one pulled-back tensor component. -/ +def tensorCoordinateJacobian (T : Base → Base) (k l : Fin 3) (x : Base) : ℝ := + let u := fderiv ℝ T x (planeCoordinateIsometry.symm (PhaseMean.firstDirection k)) + let v := fderiv ℝ T x (planeCoordinateIsometry.symm (PhaseMean.secondDirection k)) + ![u 0 * v 0,u 0 * v 1 + u 1 * v 0,u 1 * v 1] l + +lemma tensorCoordinateJacobian_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (k l : Fin 3) : ContDiff ℝ ∞ (tensorCoordinateJacobian T k l) := by + have hd (v : Base) (a : Fin 2) : ContDiff ℝ ∞ (fun x => fderiv ℝ T x v a) := + contDiff_pi.mp ((hT.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const) a + fin_cases l + · exact (hd _ 0).mul (hd _ 0) + · exact ((hd _ 0).mul (hd _ 1)).add ((hd _ 1).mul (hd _ 0)) + · exact (hd _ 1).mul (hd _ 1) + +lemma tensorCoordinateJacobian_sum (T : Base → Base) (x : Base) + (A : PhaseMean.Tensor) (k : Fin 3) : + (∑ l : Fin 3, tensorCoordinateJacobian T k l x * A l) = + tensorCoordinatePullbackValue T x A k := by + rw [Fin.sum_univ_three] + let u := fderiv ℝ T x (planeCoordinateIsometry.symm (PhaseMean.firstDirection k)) + let v := fderiv ℝ T x (planeCoordinateIsometry.symm (PhaseMean.secondDirection k)) + change u 0 * v 0 * A 0 + (u 0 * v 1 + u 1 * v 0) * A 1 + u 1 * v 1 * A 2 = + A 0 * u 0 * v 0 + A 1 * (u 0 * v 1 + u 1 * v 0) + A 2 * u 1 * v 1 + ring + +/-- Store a Jacobian factor as an actual smooth positional coefficient. -/ +def tensorJacobianCoefficient (T : Base → Base) (k l : Fin 3) : LowJet × ℝ → ℝ := + fun z => tensorCoordinateJacobian T k l (lowPosition z.1) + +lemma tensorJacobianCoefficient_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (k l : Fin 3) : ContDiff ℝ ∞ (tensorJacobianCoefficient T k l) := + (tensorCoordinateJacobian_smooth hT k l).comp (lowPosition.contDiff.comp contDiff_fst) + +namespace TensorExpression + +/-- Evaluation in the original coordinate chart. -/ +def eval (E : TensorExpression) (G : Base → Space) (z : Base × ℝ) : PhaseMean.Tensor := + fun k => (E k).eval G z + +/-- Pull back both the scalar jet expressions and their tensor basis. -/ +def coordinatePullback (E : TensorExpression) (T S : Base → Base) : TensorExpression := + fun k => Expression.sumFinset Finset.univ (fun l : Fin 3 => + (Expression.coeff (tensorJacobianCoefficient T k l)).mul ((E l).localCoordinatePullback T S)) + +lemma coordinatePullback_smooth {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {E : TensorExpression} (hE : ∀ k, (E k).SmoothCoeffs univ) (k : Fin 3) : + (coordinatePullback E T S k).SmoothCoeffs univ := by + apply Expression.smoothCoeffs_sumFinset + intro l _ + exact Expression.smoothCoeffs_mul (tensorJacobianCoefficient_smooth hT k l).contDiffOn + (Expression.localCoordinatePullback_smooth hT hS (hE l)) + +/-- An exact tensor evaluation identity from genuine local inverse germs +and the actual map relation. -/ +theorem coordinatePullback_eval {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) + (E : TensorExpression) (t : ℝ) {x : Base} (hx : x ∈ U) : + eval (coordinatePullback E T S) H (x,t) = + tensorCoordinatePullbackValue T x (eval E G (T x,t)) := by + funext k + change (Expression.sumFinset Finset.univ (fun l : Fin 3 => + (Expression.coeff (tensorJacobianCoefficient T k l)).mul ((E l).localCoordinatePullback T S))).eval + H (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,tensorJacobianCoefficient,lowPosition_lowJet] + simp_rw [Expression.localCoordinatePullback_eval hT hS hU hST hTS hG hH hrel _ t hx] + exact tensorCoordinateJacobian_sum T x (eval E G (T x,t)) k + +end TensorExpression + +namespace Perturbation + +/-- Apply the tensor coordinate transformation coefficient by coefficient +to a finite polynomial in the perturbation parameter. -/ +def tensorPolynomialCoordinatePullback {n : ℕ} (P : Fin 3 → Fin n → Expression) + (T S : Base → Base) : Fin 3 → Fin n → Expression := + fun k r => TensorExpression.coordinatePullback (fun l => P l r) T S k + +lemma tensorPolynomialCoordinatePullback_smooth {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {T S : Base → Base} (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + (k : Fin 3) (r : Fin n) : + (tensorPolynomialCoordinatePullback P T S k r).SmoothCoeffs univ := + TensorExpression.coordinatePullback_smooth hT hS (fun l => hP l r) k + +lemma coordinatePolynomialValue_eq_tensor_sum {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) (t : ℝ) (x : Base) : + coordinatePolynomialValue P ε G t (planeCoordinateIsometry x) = + ∑ r : Fin n, ε ^ (r.val+1) • TensorExpression.eval (fun k => P k r) G (x,t) := by + funext k + simp only [coordinatePolynomialValue,LinearIsometryEquiv.symm_apply_apply, + Finset.sum_apply,Pi.smul_apply,smul_eq_mul,TensorExpression.eval] + +/-- The three-component finite polynomial transforms covariantly under +smooth coordinate changes. -/ +theorem tensorPolynomialCoordinatePullback_eval {n : ℕ} + (P : Fin 3 → Fin n → Expression) {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) + (ε t : ℝ) {x : Base} (hx : x ∈ U) : + coordinatePolynomialValue (tensorPolynomialCoordinatePullback P T S) ε H t + (planeCoordinateIsometry x) = + tensorCoordinatePullbackValue T x + (coordinatePolynomialValue P ε G t (planeCoordinateIsometry (T 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.coordinatePullback_eval hT hS hU hST hTS hG hH hrel + (fun k => P k r) t hx + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTransverseDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTransverseDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..85644dfbaa8cfa036f607d9ca6df8e6846e5ebea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CoordinateTransverseDerivative.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateAxisDerivative +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapDerivativeNonzero + +namespace OAI + +/-! The transverse coordinate derivative never vanishes at a rank-one +crosscap whose longitudinal coordinate is the kernel. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma horizontal_ne_zero_of_vertical_zero (L : Base →L[ℝ] V) + (hL : L ≠ 0) (hv : L (![0,1] : Base) = 0) : L (![1,0] : Base) ≠ 0 := by + intro hh + apply hL + ext x + have hx : x = (x 0) • (![1,0] : Base) + (x 1) • (![0,1] : Base) := by + ext i + fin_cases i <;> simp + rw [hx,map_add,map_smul,map_smul,hh,hv] + simp + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma coordinate_representative_derivative_ne_zero (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + {f : M → V} (hf : ContMDiff planeModel 𝓘(ℝ,V) ∞ f) + {φ : Base → V} {U : Set Base} (hU : IsOpen U) (hUt : U ⊆ c.target) + (hEq : EqOn φ (f ∘ c.symm) U) {x : Base} (hx : x ∈ U) + (hn : mfderiv planeModel 𝓘(ℝ,V) f (c.symm x) ≠ 0) : fderiv ℝ φ x ≠ 0 := by + intro hz + apply hn + have hcD : c.symm.MDifferentiable 𝓘(ℝ,Base) planeModel := + ⟨hci.mdifferentiableOn (by simp),hcs.mdifferentiableOn (by simp)⟩ + have hsur := (hcD.mfderiv_bijective (hUt hx)).2 + rw [(hEq.eventuallyEq_of_mem (hU.mem_nhds hx)).fderiv_eq,← mfderiv_eq_fderiv, + mfderiv_comp x (hf.mdifferentiable (by simp) _) (hcD.mdifferentiableAt (hUt hx))] at hz + ext v + obtain ⟨w,rfl⟩ := hsur v + exact congrArg (fun L => L w) hz + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CorrectedSeedCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CorrectedSeedCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..fcf91ed7ebc0565775c7ddb2d6129bb5ccc1ba25 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CorrectedSeedCoordinates.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CorrectedNormalSeed +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeResidual + +namespace OAI + +/-! Transport the actual corrected normal seed to the polynomial jet coordinates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma inverse_supportedCoordinateEquiv_norm {A B F : Type*} + [NormedAddCommGroup A] [NormedSpace ℝ A] [NormedAddCommGroup B] [NormedSpace ℝ B] + [NormedAddCommGroup F] [NormedSpace ℝ F] + (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) {s : ℝ≥0} (hs : 0 < (s : ℝ)) (m : ℕ) + (f : SupportedField (F := F) (K.map e e.continuous)) : + supportedWeightedSeminorm K s m ((supportedCoordinateEquiv e K).symm f) = + supportedWeightedSeminorm (K.map e e.continuous) s m f := by + have hh := supportedCoordinateEquiv_norm e K hs m ((supportedCoordinateEquiv e K).symm f) + rw [LinearEquiv.apply_symm_apply] at hh + exact hh.symm + +namespace Perturbation +open RealModes SmallModes +variable {F : RField 4} {V : Set SmallModes.Base} + +def coordinateCorrectedSeed (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) : SupportedField (F := Fin 4 → ℂ) K := + (supportedCoordinateEquiv planeCoordinateIsometry K).symm + (correctedNormalSeed δ τ hF h (modeSupport K) hKV R q b) + +lemma coordinateCorrectedSeed_sub (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b c : SupportedField (F := ℝ) (modeSupport K)) : + coordinateCorrectedSeed δ τ hF h K hKV R q (b - c) = + coordinateCorrectedSeed δ τ hF h K hKV R q b - + coordinateCorrectedSeed δ τ hF h K hKV R q c := by + simp only [coordinateCorrectedSeed, correctedNormalSeed_sub, map_sub] + +lemma coordinateCorrectedSeed_bound (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + {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)) V s (m + 1) (B m)) + (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (hR : ∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) + (q m : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hbN : WeightedBound V s (m + (q + 1) * (L + 1)) N (freeNormal F)) + (b : SupportedField (F := ℝ) (modeSupport K)) + (hb : supportedWeightedSeminorm (modeSupport K) s (m + (q + 1) * (L + 1)) b ≤ A) : + supportedWeightedSeminorm K s m (coordinateCorrectedSeed δ τ hF h K hKV R q b) ≤ + correctedSeedBudget L B D q m N * A * (δ * τ) := by + rw [coordinateCorrectedSeed, inverse_supportedCoordinateEquiv_norm _ _ hs] + exact correctedNormalSeed_bound δ τ hF h (modeSupport K) hKV hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA hN hbN b hb + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e541c9a21e5a6be7ca106614ce664a623dc567e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasBounds.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! The fixed finite smoothing norms control any other fixed finite atlas. +This allows later curve charts to stay fixed as the isometric immersion changes. -/ +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 B : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma cross_localize_restore (i : B.centers) (j : A.centers) (h : Base → V) : + localize (i : M) (B.weight i) (restore (j : M) (A.outer j) h) = + fun x => localize (i : M) (B.weight i) (A.outer j) x • + h (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 hp => hj (A.outer_support j hp)) + 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 cross_localize_restore_bound (i : B.centers) (j : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ h → + WeightedEstimates.WeightedBound univ s m C h → + WeightedEstimates.WeightedBound univ s m (D*C) + (localize (i : M) (B.weight i) (restore (j : M) (A.outer j) h)) := by + let K := (chart (i : M)) '' (tsupport (B.weight 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 => B.weight_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 (B.weight_support i hp.1),?_⟩ + change (chart (i : M)).symm (chart (i : M) p) ∈ (chart (j : M)).source + rw [(chart (i : M)).left_inv (B.weight_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) (B.weight_smooth i) (B.weight_support i) (A.outer_smooth j)) + (localize_tsupport_inter (i : M) (B.weight_support i) (A.outer j)) + (transition_smooth (i : M) (j : M)) m + refine ⟨D,hD,?_⟩ + intro h s C hs hs1 hC hh hb + rw [A.cross_localize_restore B] + exact hd h s C hs hs1 hC hh hb + +theorem weightedBound_change_atlas (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 → B.WeightedBound s m (D*C) F := by + classical + choose D hD hd using fun (i : B.centers) (j : A.centers) => + A.cross_localize_restore_bound (V := V) B i j m + refine ⟨∑ i : B.centers, ∑ j : A.centers, D i j, + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hD i j)),?_⟩ + intro F s C hs hs1 hC hF hb i + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hs.le + (Finset.univ : Finset A.centers) (fun j => D i j*C) + (fun j => localize (i : M) (B.weight i) + (restore (j : M) (A.outer j) (localize (j : M) (A.weight j) F))) + (fun j _ => (localize_smooth (i : M) (B.weight_smooth i) (B.weight_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) + (fun j _ => hd i j _ s C hs hs1 hC + (localize_smooth (j : M) (A.weight_smooth j) (A.weight_support j) hF) (hb j)) + have he : localize (i : M) (B.weight i) F = fun x => ∑ j : A.centers, + localize (i : M) (B.weight i) + (restore (j : M) (A.outer j) (localize (j : M) (A.weight j) F)) x := by + conv_lhs => rw [← A.sum_restore_localize F] + exact localize_sum Finset.univ _ _ _ + rw [he] + apply hsum.mono_const + rw [← Finset.sum_mul] + apply mul_le_mul_of_nonneg_right _ hC + exact Finset.single_le_sum + (fun k _ => Finset.sum_nonneg (fun j _ => hD k j)) (Finset.mem_univ i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasExactGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasExactGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..c453d99ba8d251f88194d34fe4845f2695ad4a9e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasExactGeometry.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasBounds +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 crossExactGeometricFastFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossExactGeometricFastFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance crossExactGeometricFastDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossExactGeometricFastDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossExactGeometricFastSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossExactGeometricFastSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem exact_geometric_metric_with_property_in_atlas [T2Space M] (B₀ : SmoothingAtlas 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) ∧ + B₀.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 ⟨E,hE,hchange⟩ := A.weightedBound_change_atlas (V := Space) B₀ 2 + have hDpos : 0 < D := zero_lt_one.trans_le hD + have hK : 0 < D+E+1 := by positivity + obtain ⟨z,hz,hzcap,hz1,F,G,hF,hproperty,hG,hclose,hread,hgeom⟩ := + hall (min η ζ) (lt_min hη hζ) (D+E+1) hK + have hzη := hzcap.trans_le (min_le_left _ _) + have hzζ := hzcap.trans_le (min_le_right _ _) + have hcloseA : A.WeightedBound 1 2 (z^8/D) (G-F) := fun i => + (hclose i).mono_const (div_le_div_of_nonneg_left (pow_nonneg hz.le _) hDpos (by linarith)) + have hclose' : A.WeightedBound 1 2 ((z^2)^4/D) (G-F) := by + convert hcloseA 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,?_⟩ + have hbclose := hchange (G-F) 1 (z^8/(D+E+1)) zero_lt_one le_rfl + (div_nonneg (pow_nonneg hz.le _) hK.le) (hG.1.sub hF) hclose + intro i + apply (hbclose i).mono_const + rw [← mul_div_assoc] + apply (div_le_iff₀ hK).mpr + nlinarith [pow_nonneg hz.le 8] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasJetRelation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasJetRelation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0173cf5650ae8e7cd9cc5f1db416fdc8412b387 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasJetRelation.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation + +namespace OAI + +/-! Localized jets can be transported between independently chosen atlases. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +def cross_transitionScalar (i : A.centers) (j : B.centers) (x : Base) : ℝ := + (B.outer j ((chart (i : M)).symm x)) ^ 2 + +lemma cross_transitionScalar_smoothOn (i : A.centers) (j : B.centers) : + ContDiffOn ℝ ∞ (A.cross_transitionScalar B i j) (chart (i : M)).target := by + exact ((B.outer_smooth j).comp_contMDiffOn + (chart_symm_smooth (i : M))).contDiffOn.pow 2 + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma cross_vectorChartRead_transition (i : A.centers) (j : B.centers) (G : M → V) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + B.vectorChartRead j G (transition (i : M) (j : M) x) = + A.cross_transitionScalar B i j x • A.vectorChartRead i G x := by + have hi : x ∈ (chart (i : M)).target := hx.1 + have hj : transition (i : M) (j : M) x ∈ (chart (j : M)).target := + (chart (j : M)).map_source hx.2 + have he : (chart (j : M)).symm (transition (i : M) (j : M) x) = + (chart (i : M)).symm x := + (chart (j : M)).left_inv hx.2 + simp only [vectorChartRead, localize, indicator_of_mem hi, indicator_of_mem hj, + he, ho, one_pow, one_smul, cross_transitionScalar] + +lemma cross_vectorChartRead_transition_eventually (i : A.centers) (j : B.centers) (G : M → V) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + (fun y => B.vectorChartRead j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => A.cross_transitionScalar B i j y • A.vectorChartRead i G y) := by + have ho := (A.outer_eventually_one_of_weight_ne_zero i hw).comp_tendsto + ((chart (i : M)).continuousAt_symm hx.1) + filter_upwards [(transition (i : M) (j : M)).open_source.mem_nhds hx,ho] + with y hy hoy + exact A.cross_vectorChartRead_transition B i j G hy hoy + +lemma cross_jetChartMap_transition (i : A.centers) (j : B.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + B.jetChartMap j G (transition (i : M) (j : M) x) = + A.cross_transitionScalar B i j x • A.jetChartMap i G x := by + change spaceCoordinates (B.vectorChartRead j G (transition (i : M) (j : M) x)) = _ + rw [A.cross_vectorChartRead_transition B i j G hx ho] + exact map_smul spaceCoordinates _ _ + +lemma cross_jetChartMap_transition_eventually (i : A.centers) (j : B.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (hw : A.weight i ((chart (i : M)).symm x) ≠ 0) : + (fun y => B.jetChartMap j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => A.cross_transitionScalar B i j y • A.jetChartMap i G y) := by + filter_upwards [A.cross_vectorChartRead_transition_eventually B i j G hx hw] with y hy + change spaceCoordinates (B.vectorChartRead j G (transition (i : M) (j : M) y)) = _ + rw [hy] + exact map_smul spaceCoordinates _ _ + +/-- The partition weight removes the boundary case where a germ equal to +one is unavailable. This identity holds on the whole transition domain. -/ +lemma cross_weighted_jetChartMap_transition (i : A.centers) (j : B.centers) (G : M → Space) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) : + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + B.jetChartMap j G (transition (i : M) (j : M) x) = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + (A.cross_transitionScalar B i j x • A.jetChartMap i G x) := by + by_cases hw : A.weight i ((chart (i : M)).symm x) = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul] + · rw [A.cross_jetChartMap_transition B i j G hx + (A.outer_one i _ (subset_tsupport (A.weight i) hw))] + +/-- A fixed compact overlap has a globally smooth transition scalar. It +is chosen before the map, and retains both the weighted identity everywhere +and the unweighted identity of germs on the nonzero weight locus. -/ +theorem cross_compact_jetChartMap_transition (i : A.centers) (j : B.centers) {K : Set Base} + (hK : IsCompact K) (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ a : Base → ℝ, ContDiff ℝ ∞ a ∧ EqOn a (A.cross_transitionScalar B i j) U ∧ + (∀ (G : M → Space) (x : Base), x ∈ U → + (A.weight i ((chart (i : M)).symm x)) ^ 2 • + B.jetChartMap j G (transition (i : M) (j : M) x) = + (A.weight i ((chart (i : M)).symm x)) ^ 2 • (a x • A.jetChartMap i G x)) ∧ + (∀ (G : M → Space) (x : Base), x ∈ U → + A.weight i ((chart (i : M)).symm x) ≠ 0 → + (fun y => B.jetChartMap j G (transition (i : M) (j : M) y)) =ᶠ[𝓝 x] + (fun y => a y • A.jetChartMap i G y)) := by + obtain ⟨U,hU,hKU,hUe,a,ha,he⟩ := CollarVelocity.compact_smooth_extension hK + (transition (i : M) (j : M)).open_source hKe + ((A.cross_transitionScalar_smoothOn B i j).mono (fun _ hx => hx.1)) + refine ⟨U,hU,hKU,hUe,a,ha,he,?_,?_⟩ + · intro G x hx + rw [he hx] + exact A.cross_weighted_jetChartMap_transition B i j G (hUe hx) + · intro G x hx hw + filter_upwards [A.cross_jetChartMap_transition_eventually B i j G (hUe hx) hw, + hU.mem_nhds hx] with y hy hyU + rw [he hyU] + exact hy + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasOuterGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasOuterGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..703e95ff2ebbec6eb4614e52c89d4de4f383f965 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasOuterGeometry.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseOuterImmersion +import OAI.Geometry.SurfaceImmersion.Primitive.IntrinsicCrossingNaturality + +namespace OAI + +/-! The old and new analytic atlases represent the same immersion on a +common outer plateau, including all second forms and intrinsic crossings. -/ +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] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +lemma phase_germ_of_common_outer (i : A.centers) (j : B.centers) + (hc : (i : M) = (j : M)) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : Base} (hx : x ∈ (surfacePhaseChart (j : M) e).target) + (ho : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (j : M) e).symm x)] (fun _ => 1)) + (hw : B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0) : + A.phaseRealChartMap i e.symm F =ᶠ[𝓝 x] B.phaseRealChartMap j e.symm F := by + have hxA : x ∈ (surfacePhaseChart (i : M) e).target := by rwa [hc] + have hoA : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1) := by rwa [hc] + have hA := A.phaseRealChartMap_surface_germ_of_outer i e F hxA hoA + have hB := B.phaseRealChartMap_surface_germ j e F hx hw + rw [hc] at hA + exact hA.trans hB.symm + +lemma phase_second_of_common_outer (i : A.centers) (j : B.centers) + (hc : (i : M) = (j : M)) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : Base} (hx : x ∈ (surfacePhaseChart (j : M) e).target) + (ho : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (j : M) e).symm x)] (fun _ => 1)) + (hw : B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0) (v w : Base) : + realSecondForm (A.phaseRealChartMap i e.symm F) v w x = + realSecondForm (B.phaseRealChartMap j e.symm F) v w x := + (realSecondForm_eventuallyEq (A.phase_germ_of_common_outer B i j hc e F hx ho hw) v w).eq_of_nhds + +lemma phase_crossing_of_common_outer (i : A.centers) (j : B.centers) + (hc : (i : M) = (j : M)) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : Base} (hx : x ∈ (surfacePhaseChart (j : M) e).target) + (ho : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (j : M) e).symm x)] (fun _ => 1)) + (hw : B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0) (v w : Base) : + orderedCrossing (A.phaseRealChartMap i e.symm F) v w 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) = + orderedCrossing (B.phaseRealChartMap j e.symm F) v w x + (coordinateGaussianCurvature (realMetric (B.phaseRealChartMap j e.symm F) dx dx) + (realMetric (B.phaseRealChartMap j e.symm F) dx dy) + (realMetric (B.phaseRealChartMap j e.symm F) dy dy) x) := + orderedCrossing_intrinsic_germ (A.phase_germ_of_common_outer B i j hc e F hx ho hw) v w + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasShiftedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasShiftedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2efbe9b83d2be9b089617c002d952544784167c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasShiftedBounds.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasBounds +import OAI.Geometry.SurfaceImmersion.Correction.GlobalShiftedSmoothing + +namespace OAI + +/-! Changing the fixed atlas preserves the unweighted derivative prefix. -/ +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 B : SmoothingAtlas M) + +theorem shiftedBound_change_atlas (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 → B.ShiftedBound q m s (D*C) F := by + classical + choose D hD hd using fun j : ℕ => A.weightedBound_change_atlas (V := V) B j + refine ⟨∑ j ∈ Finset.range (q+m+1), D j,Finset.sum_nonneg (fun j _ => hD j),?_⟩ + intro F s C hs hs1 hC hF hb i j hj x + have hpow : 0 < s^(j-q) := pow_pos hs _ + have hh := hd j F 1 (C/s^(j-q)) zero_lt_one le_rfl (div_nonneg hC hpow.le) hF + (fun k => (hb k).prefix hs hs1 hC hj) + have hi := hh i j le_rfl x (mem_univ x) + simp only [one_pow,one_mul,iteratedFDerivWithin_univ] at hi + calc + _ ≤ s^(j-q)*(D j*(C/s^(j-q))) := mul_le_mul_of_nonneg_left hi hpow.le + _ = D j*C := by field_simp + _ ≤ (∑ k ∈ Finset.range (q+m+1),D k)*C := + mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun k _ => hD k) (Finset.mem_range.mpr (by omega))) hC + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe597ddfb9cd951f84b9bf940df10f1f82e9e387 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorBounds.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorTransition +import OAI.Geometry.SurfaceImmersion.Atlas.BundleAtlasBounds + +namespace OAI + +/-! Weighted tensor bounds persist when the finite correction atlas changes. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance crossTensorBoundFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossTensorBoundFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance crossTensorBoundDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossTensorBoundDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossTensorBoundSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossTensorBoundSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +lemma cross_tensor_localize_restore_bound (i : B.centers) (j : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : Base → TensorFiber) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ h → + WeightedEstimates.WeightedBound univ s m C h → + WeightedEstimates.WeightedBound univ s m (D*C) + (B.bundleLocalize B.tensorTriv i (A.bundleRestore A.tensorTriv j h)) := by + let L : Base → TensorFiber →L[ℝ] TensorFiber := fun x => + (A.tensorTriv j).coordChangeL ℝ (B.tensorTriv i) ((chart (i : M)).symm x) + have hL : ContDiffOn ℝ ∞ L (transition (i : M) (j : M)).source := by + apply ContMDiffOn.contDiffOn + apply (contMDiffOn_coordChangeL (A.tensorTriv j) (B.tensorTriv i)).comp + ((chart_symm_smooth (i : M)).mono (fun _ hx => hx.1)) + intro x hx + have hj : (chart (i : M)).symm x ∈ (chart (j : M)).source := hx.2 + exact ⟨A.tensorTriv_domain j hj,B.tensorTriv_domain i ((chart (i : M)).map_target hx.1)⟩ + have heq (h : Base → TensorFiber) : + B.bundleLocalize B.tensorTriv i (A.bundleRestore A.tensorTriv j h) = + fun x => localize (i : M) (B.weight i) (A.outer j) x • + L x (h (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 + · have hbi := B.tensorTriv_domain i ((chart (i : M)).map_target hi) + have hbj := A.tensorTriv_domain j hj + simp only [bundleLocalize,bundleComponent,localize,indicator_of_mem hi, + bundleRestore,map_smul] + rw [(B.tensorTriv i).continuousLinearMapAt_apply_of_mem ℝ hbi, + (A.tensorTriv j).symmL_apply (R := ℝ) hbj, + ← (A.tensorTriv j).coordChangeL_apply (R := ℝ) (B.tensorTriv i) ⟨hbj,hbi⟩,smul_smul] + rfl + · have hz : A.outer j ((chart (i : M)).symm x) = 0 := + image_eq_zero_of_notMem_tsupport (fun hh => hj (A.outer_support j hh)) + simp only [bundleLocalize,bundleComponent,localize,indicator_of_mem hi, + bundleRestore,hz,zero_smul,map_zero,smul_zero] + · simp only [bundleLocalize,localize,indicator_of_notMem hi,zero_smul] + obtain ⟨D,hD,hd⟩ := compact_localized_clm_composition_bound + (transition (i : M) (j : M)).open_source (B.cross_pairSupport_compact A i j) + (B.cross_pairSupport_transition A i j) + (localize_smooth (i : M) (B.weight_smooth i) (B.weight_support i) (A.outer_smooth j)) + (localize_tsupport_inter (i : M) (B.weight_support i) (A.outer j)) + hL (transition_smooth (i : M) (j : M)) m + refine ⟨D,hD,?_⟩ + intro h s C hs hs1 hC hh hb + rw [heq] + exact hd h s C hs hs1 hC hh hb + +theorem tensorWeightedBound_change_atlas (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ p : M, CovariantTwoTensor p) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + A.TensorWeightedBound s m C u → B.TensorWeightedBound s m (D*C) u := by + classical + choose D hD hd using fun (i : B.centers) (j : A.centers) => + A.cross_tensor_localize_restore_bound B i j m + refine ⟨∑ i : B.centers,∑ j : A.centers,D i j, + Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hD i j)),?_⟩ + intro u s C hs hs1 hC hu hb i + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hs.le + (Finset.univ : Finset A.centers) (fun j => D i j*C) + (fun j => B.bundleLocalize B.tensorTriv i + (A.bundleRestore A.tensorTriv j (A.bundleLocalize A.tensorTriv j u))) + (fun j _ => (B.bundleLocalize_smooth B.tensorTriv B.tensorTriv_domain i + (A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain j + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain j hu))).contDiffOn) + (fun j _ => hd i j _ s C hs hs1 hC + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain j hu) (hb j)) + have he : B.bundleLocalize B.tensorTriv i u = fun x => ∑ j : A.centers, + B.bundleLocalize B.tensorTriv i + (A.bundleRestore A.tensorTriv j (A.bundleLocalize A.tensorTriv j u)) x := by + have hu' : u = (fun p => ∑ j : A.centers, + A.bundleRestore A.tensorTriv j (A.bundleLocalize A.tensorTriv j u) p) := + (funext (A.bundle_sum_restore_localize A.tensorTriv A.tensorTriv_domain u)).symm + conv_lhs => rw [hu'] + exact B.bundleLocalize_sum B.tensorTriv Finset.univ i _ + change WeightedEstimates.WeightedBound univ s m _ (B.bundleLocalize B.tensorTriv i u) + rw [he] + apply hsum.mono_const + rw [← Finset.sum_mul] + apply mul_le_mul_of_nonneg_right _ hC + exact Finset.single_le_sum (fun k _ => Finset.sum_nonneg (fun j _ => hD k j)) (Finset.mem_univ i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..09520c0c10728df22a582075ddafa8b81bf63d7b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossAtlasTensorTransition.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasJetRelation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorTransition + +namespace OAI + +/-! Actual tensor transitions between independent smoothing atlases. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +open PhaseMean + +local instance crossTransitionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossTransitionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance crossTransitionDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossTransitionDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossTransitionSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossTransitionSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +def cross_tensorRestoreTransition (i : A.centers) (j : B.centers) (x : Base) : Tensor →L[ℝ] Tensor := + B.outer j ((chart (i : M)).symm x) • + fiberToThree.comp ((((B.tensorTriv j).coordChangeL ℝ (A.tensorTriv i) + ((chart (i : M)).symm x)) : TensorFiber →L[ℝ] TensorFiber).comp fiberFromThree) + +lemma cross_tensorRestoreTransition_smoothOn (i : A.centers) (j : B.centers) : + ContDiffOn ℝ ∞ (A.cross_tensorRestoreTransition B i j) + (transition (i : M) (j : M)).source := by + have hB : ContDiffOn ℝ ∞ + (fun x => ((B.tensorTriv j).coordChangeL ℝ (A.tensorTriv i) ((chart (i : M)).symm x) : TensorFiber →L[ℝ] TensorFiber)) + (transition (i : M) (j : M)).source := by + apply ContMDiffOn.contDiffOn + apply (contMDiffOn_coordChangeL (B.tensorTriv j) (A.tensorTriv i)).comp + ((chart_symm_smooth (i : M)).mono (fun _ hx => hx.1)) + intro x hx + exact ⟨B.tensorTriv_domain j hx.2,A.tensorTriv_domain i ((chart (i : M)).map_target hx.1)⟩ + have ha : ContDiffOn ℝ ∞ (fun x : Base => B.outer j ((chart (i : M)).symm x)) + (chart (i : M)).target := + ((B.outer_smooth j).comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + have hl : ContDiffOn ℝ ∞ (fun _ : Base => fiberToThree) + (transition (i : M) (j : M)).source := contDiffOn_const + have hr : ContDiffOn ℝ ∞ (fun _ : Base => fiberFromThree) + (transition (i : M) (j : M)).source := contDiffOn_const + exact (ha.mono (fun _ hx => hx.1)).smul (hl.clm_comp (hB.clm_comp hr)) + +lemma cross_tensorChartRead_restoreThree (i : A.centers) (j : B.centers) (f : Base → Tensor) + {x : Base} (hx : x ∈ (transition (i : M) (j : M)).source) + (ho : A.outer i ((chart (i : M)).symm x) = 1) : + A.tensorChartRead i (B.bundleRestore B.tensorTriv j (fun y => fiberFromThree (f y))) x = + A.cross_tensorRestoreTransition B i j x (f (transition (i : M) (j : M) x)) := by + have hxt : x ∈ (chart (i : M)).target := hx.1 + have hbi := A.tensorTriv_domain i ((chart (i : M)).map_target hx.1) + have hj : (chart (i : M)).symm x ∈ (chart (j : M)).source := hx.2 + have hbj := B.tensorTriv_domain j hj + simp only [tensorChartRead,Function.comp_apply,bundleCutoff,bundleComponent,localize, + indicator_of_mem hxt,bundleRestore,map_smul,ho,one_pow,one_smul] + rw [(A.tensorTriv i).continuousLinearMapAt_apply_of_mem ℝ hbi, + (B.tensorTriv j).symmL_apply (R := ℝ) hbj, + ← (B.tensorTriv j).coordChangeL_apply (R := ℝ) (A.tensorTriv i) ⟨hbj,hbi⟩] + rfl + +lemma cross_tensorChartRead_restore_zero (i : A.centers) (j : B.centers) (f : Base → TensorFiber) + {x : Base} (hx : x ∈ (chart (i : M)).target) + (hz : B.outer j ((chart (i : M)).symm x) = 0) : + A.tensorChartRead i (B.bundleRestore B.tensorTriv j f) x = 0 := by + simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_mem hx,bundleComponent,bundleRestore,hz,zero_smul,map_zero,smul_zero] + +theorem cross_compact_tensorRestoreTransition (i : A.centers) (j : B.centers) {K : Set Base} + (hK : IsCompact K) (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ L : Base → Tensor →L[ℝ] Tensor, ContDiff ℝ ∞ L ∧ + EqOn L (A.cross_tensorRestoreTransition B i j) U := + CollarVelocity.compact_smooth_extension hK (transition (i : M) (j : M)).open_source hKe + (A.cross_tensorRestoreTransition_smoothOn B i j) + +def cross_pairSupport (i : A.centers) (j : B.centers) : Set Base := + (chart (i : M)) '' (tsupport (A.weight i) ∩ tsupport (B.outer j)) + +variable [CompactSpace M] +lemma cross_pairSupport_compact (i : A.centers) (j : B.centers) : + IsCompact (A.cross_pairSupport B i j) := + ((isClosed_tsupport (A.weight i)).inter (isClosed_tsupport (B.outer j))).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ hx => A.weight_support i hx.1)) + +omit [CompactSpace M] in +lemma cross_pairSupport_transition (i : A.centers) (j : B.centers) : + A.cross_pairSupport B i j ⊆ (transition (i : M) (j : M)).source := by + rintro x ⟨p,⟨hp,hq⟩,rfl⟩ + have hp' := A.weight_support i hp + refine ⟨(chart (i : M)).map_source hp',?_⟩ + change (chart (i : M)).symm (chart (i : M) p) ∈ (chart (j : M)).source + rw [(chart (i : M)).left_inv hp'] + exact B.outer_support j hq + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossPhaseExteriorControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossPhaseExteriorControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..008bf97462deacc13effe63e7bdd49893ba50cbf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CrossPhaseExteriorControl.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasBounds +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorControl +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureNormal +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal + +namespace OAI + +/-! Exterior control in a fixed curve chart, while the analytic construction +and projected normal use the current immersion's smoothing atlas. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes GeometryPreservation +variable {M X : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem cross_phase_exterior_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)) + (i : B.centers) {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {ε : ℝ} (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) (P : Set JetPolynomial.Base), + (∀ y ∈ P, T y ∈ (chart (i : M)).target) → + (∀ y ∈ P, (chart (i : M)).symm (T y) ∈ O) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ p ∈ closure O, ∀ q ∈ closure P ∩ S, + A.projectedNormalField W n.vector p ≠ 0 ∧ + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector p)-spaceCoordinates (n.vector p)‖ < ε ∧ + ‖realBoundaryProfile (B.phaseRealChartMap i T W) 1 (baseEquiv q)- + realBoundaryProfile (B.phaseRealChartMap i T F) 1 (baseEquiv q)‖ < ε := by + obtain ⟨D,hD,hbound⟩ := B.phase_exterior_profile_bound_closure i hT hS hSc + obtain ⟨E,hE,hchange⟩ := A.weightedBound_change_atlas (V := Space) B 2 + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + have hLp : 0 < L+1 := by positivity + obtain ⟨r,hr,hnorm⟩ := A.exterior_projected_normal_close_closure hF n.smooth n.unit n.normal + (fun j y hy => A.planeRead_gram_of_immersion hF hI houter j hy) (div_pos hε hLp) + have hDE : 0 ≤ D*E := mul_nonneg hD hE + refine ⟨min r (ε/(D*E+1)),lt_min hr (div_pos hε (by positivity)),?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV O P hP hPO hext p hp q hq + obtain ⟨hne,hnear⟩ := hnorm G V W hG hV hW b c hb hc + (hbc.trans_le (min_le_left _ _)) hGF hWV O hext p hp + have hprof := hbound F G V W hF hG hV hW (E*b) (E*c) (mul_nonneg hE hb) (mul_nonneg hE hc) + (hchange (G-F) 1 b zero_lt_one le_rfl hb (hG.sub hF) hGF) + (hchange (W-V) 1 c zero_lt_one le_rfl hc (hW.sub hV) hWV) + P hP (fun y hy => hext _ (hPO y hy)) q hq + have hsmall : D*(E*b+E*c) < ε := by + have ht := (lt_div_iff₀ (by positivity : 0 < D*E+1)).mp + (hbc.trans_le (min_le_right _ _)) + have hbc0 : 0 ≤ b+c := add_nonneg hb hc + nlinarith + refine ⟨hne,?_,hprof.trans_lt hsmall⟩ + 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 hnear hLp + _ = ε := mul_div_cancel₀ _ hLp.ne' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseCriticalValues.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseCriticalValues.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e2bafc19a742fffadbc20059803e9453ba6eb77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseCriticalValues.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CurvePhaseParameterGraph + +namespace OAI + +/-! Degenerate tangencies along a curve form a null set of linear phase +parameters. The first-coordinate chart of the critical equation suffices +where the first velocity component is nonzero. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +local instance curvePlaneVolumeHaar : (volume : Measure CurvePlane).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +lemma curvePhaseParameterGraph_differentiableAt {u v : ℝ → CurvePlane} {L : ℝ} + {x : CurvePlane} (hu : DifferentiableAt ℝ u x.1) (hv : DifferentiableAt ℝ v x.1) + (hspeed : (v x.1).1 ≠ 0) : + DifferentiableAt ℝ (curvePhaseParameterGraph u v L) x := by + have huc : DifferentiableAt ℝ (fun z : CurvePlane => u z.1) x := + hu.comp x differentiableAt_fst + have hvc : DifferentiableAt ℝ (fun z : CurvePlane => v z.1) x := + hv.comp x differentiableAt_fst + have hsnd : DifferentiableAt ℝ (Prod.snd : CurvePlane → ℝ) x := differentiableAt_snd + have hnum : DifferentiableAt ℝ (fun z : CurvePlane => + -z.2*(v z.1).2-L*((u z.1).1*(v z.1).1+(u z.1).2*(v z.1).2)) x := + (hsnd.neg.mul hvc.snd).sub + (((huc.fst.mul hvc.fst).add (huc.snd.mul hvc.snd)).const_mul L) + have hquot := hnum.mul (hvc.fst.inv hspeed) + convert hquot.prodMk hsnd using 1 + funext z + simp only [curvePhaseParameterGraph,Pi.mul_apply,Pi.inv_apply,div_eq_mul_inv] + +lemma curvePhaseParameterGraph_singular {u v w : ℝ → CurvePlane} {L t : ℝ} + {ell : CurvePlane} (hu : HasDerivAt u (v t) t) (hv : HasDerivAt v (w t) t) + (hspeed : (v t).1 ≠ 0) + (hcrit : curvePhaseVelocity u v L t ell = 0) + (hdeg : curvePhaseAcceleration u v w L t ell = 0) : + ¬ Function.Surjective (fderiv ℝ (curvePhaseParameterGraph u v L) (t,ell.2)) := by + have hdiff := curvePhaseParameterGraph_differentiableAt (L := L) (x := (t,ell.2)) + hu.differentiableAt hv.differentiableAt hspeed + have hline : HasDerivAt (fun s : ℝ => (s,ell.2)) (1,0) t := + (hasDerivAt_id t).prodMk (hasDerivAt_const t ell.2) + have hchain := hdiff.hasFDerivAt.comp_hasDerivAt t hline + have hz := curvePhaseParameterGraph_deriv_zero hu hv hspeed hcrit hdeg + have hval : fderiv ℝ (curvePhaseParameterGraph u v L) (t,ell.2) (1,0) = 0 := + hchain.unique hz + intro hsurj + have hinj : Function.Injective (fderiv ℝ (curvePhaseParameterGraph u v L) (t,ell.2)) := + LinearMap.injective_iff_surjective.mpr hsurj + have he : (1,0) = (0 : CurvePlane) := hinj (hval.trans (map_zero _).symm) + exact one_ne_zero (congrArg Prod.fst he) + +/-- The bad parameter set is contained in the critical values of the explicit +two-dimensional parameter graph. -/ +theorem curve_phase_degenerate_parameters_null + (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 : ℝ) : + volume {ell : CurvePlane | ∃ t, (v t).1 ≠ 0 ∧ + curvePhaseVelocity u v L t ell = 0 ∧ curvePhaseAcceleration u v w L t ell = 0} = 0 := by + let f := curvePhaseParameterGraph u v L + let S : Set CurvePlane := {z | (v z.1).1 ≠ 0 ∧ ¬ Function.Surjective (fderiv ℝ f z)} + have hnull : volume (f '' S) = 0 := by + apply addHaar_image_eq_zero_of_det_fderivWithin_eq_zero volume + (f' := fun x => fderiv ℝ f x) + · intro x hx + exact (curvePhaseParameterGraph_differentiableAt + (hu.differentiable (by simp) x.1) (hv.differentiable (by simp) x.1) hx.1).hasFDerivAt.hasFDerivWithinAt + · intro x 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 hi => hx.2 (LinearMap.injective_iff_surjective.mp hi) + apply measure_mono_null _ hnull + rintro ell ⟨t,hspeed,hcrit,hdeg⟩ + exact ⟨(t,ell.2),⟨hspeed,curvePhaseParameterGraph_singular (hdu t) (hdv t) + hspeed hcrit hdeg⟩,curvePhaseParameterGraph_eq hspeed hcrit⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseParameterGraph.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseParameterGraph.lean new file mode 100644 index 0000000000000000000000000000000000000000..7fc0e1bae572e99bf443a79bb0bedf2466ffdda3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CurvePhaseParameterGraph.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowerDimensionalImage + +namespace OAI + +/-! A chart of the critical-point equation for an affine perturbation of +a quadratic phase along a regular plane curve. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry + +abbrev CurvePlane := ℝ × ℝ + +def curvePhaseVelocity (u v : ℝ → CurvePlane) (L t : ℝ) (ell : CurvePlane) : ℝ := + (ell.1+L*(u t).1)*(v t).1+(ell.2+L*(u t).2)*(v t).2 + +def curvePhaseAcceleration (u v w : ℝ → CurvePlane) (L t : ℝ) (ell : CurvePlane) : ℝ := + L*((v t).1^2+(v t).2^2)+(ell.1+L*(u t).1)*(w t).1+ + (ell.2+L*(u t).2)*(w t).2 + +def curvePhaseParameterGraph (u v : ℝ → CurvePlane) (L : ℝ) + (x : CurvePlane) : CurvePlane := + ((-x.2*(v x.1).2-L*((u x.1).1*(v x.1).1+(u x.1).2*(v x.1).2))/(v x.1).1,x.2) + +lemma curvePhaseParameterGraph_eq {u v : ℝ → CurvePlane} {L t : ℝ} {ell : CurvePlane} + (hspeed : (v t).1 ≠ 0) (hcrit : curvePhaseVelocity u v L t ell = 0) : + curvePhaseParameterGraph u v L (t,ell.2) = ell := by + apply Prod.ext + · change (-ell.2*(v t).2-L*((u t).1*(v t).1+(u t).2*(v t).2))/(v t).1 = ell.1 + apply (div_eq_iff hspeed).mpr + dsimp [curvePhaseVelocity] at hcrit + nlinarith + · rfl + +lemma curvePhaseParameterGraph_deriv_zero {u v w : ℝ → CurvePlane} + {L t : ℝ} {ell : CurvePlane} + (hu : HasDerivAt u (v t) t) (hv : HasDerivAt v (w t) t) + (hspeed : (v t).1 ≠ 0) + (hcrit : curvePhaseVelocity u v L t ell = 0) + (hdeg : curvePhaseAcceleration u v w L t ell = 0) : + HasDerivAt (fun s => curvePhaseParameterGraph u v L (s,ell.2)) 0 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 hn := (hv2.const_mul (-ell.2)).sub + (((hu1.mul hv1).add (hu2.mul hv2)).const_mul L) + have hquot := hn.div hv1 hspeed + have hnval : -ell.2*(v t).2-L*((u t).1*(v t).1+(u t).2*(v t).2) = + ell.1*(v t).1 := by + dsimp [curvePhaseVelocity] at hcrit + nlinarith + have hnprime : -ell.2*(w t).2- + L*(((v t).1*(v t).1+(u t).1*(w t).1)+ + ((v t).2*(v t).2+(u t).2*(w t).2)) = ell.1*(w t).1 := by + dsimp [curvePhaseAcceleration] at hdeg + nlinarith + have hd := hquot.prodMk (hasDerivAt_const t ell.2) + convert hd using 1 + · rfl + · change (0 : CurvePlane) = + (((-ell.2*(w t).2-L*(((v t).1*(v t).1+(u t).1*(w t).1)+ + ((v t).2*(v t).2+(u t).2*(w t).2)))*(v t).1- + (-ell.2*(v t).2-L*((u t).1*(v t).1+(u t).2*(v t).2))*(w t).1)/ + ((v t).1)^2,0) + rw [hnval,hnprime] + ext <;> dsimp + ring + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffFlatJetBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffFlatJetBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..046c6c833b80fc8473d6ac055371a5b7e75d354b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffFlatJetBound.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingJetCutoff +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds + +namespace OAI + +/-! A shrinking cutoff applied to a flat remainder has a second-order +bound independent of the cutoff radius. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem cutoff_flat_jet_bound : ∃ C : ℝ, 0 ≤ C ∧ + ∀ (R : Base → ProjectionTarget 3), ContDiff ℝ ∞ R → R 0 = 0 → + fderiv ℝ R 0 = 0 → ∀ r M : ℝ, 0 < r → r ≤ 1 → 0 ≤ M → + (∀ x ∈ closedBall (0 : Base) r, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ M) → + ∀ j ≤ 2, ∀ x : Base, + ‖iteratedFDeriv ℝ j (fun y => shrinkingJetCutoff r y • R y) x‖ ≤ C*M := by + obtain ⟨C,hC,hcut⟩ := shrinkingJetCutoff_weighted_bound + refine ⟨4*C,by positivity,?_⟩ + intro R hR h0 hD0 r M hr hr1 hM hb j hj x + let Q : Base → ProjectionTarget 3 := fun y => shrinkingJetCutoff r y • R y + have hQ : ContDiff ℝ ∞ Q := (shrinkingJetCutoff_smooth r).smul hR + have hsupp : tsupport Q ⊆ closedBall (0 : Base) (r/2) := + (tsupport_smul_subset_left _ _).trans (shrinkingJetCutoff_tsupport hr) + by_cases hx : x ∈ ball (0 : Base) r + · have hRbound := flat_remainder_weighted_bound hR h0 hD0 hr hM hb + have hprod := (hcut r hr).smul_real isOpen_ball.uniqueDiffOn hr.le hC + (mul_nonneg hM (sq_nonneg r)) (shrinkingJetCutoff_smooth r).contDiffOn + hR.contDiffOn hRbound + have h := hprod j hj x hx + rw [iteratedFDerivWithin_of_isOpen j isOpen_ball hx] at h + have hpow : r^2 ≤ r^j := pow_le_pow_of_le_one hr.le hr1 hj + apply (mul_le_mul_iff_right₀ (pow_pos hr j)).mp + calc + _ ≤ (2:ℝ)^2*C*(M*r^2) := h + _ = (4*C*M)*r^2 := by ring + _ ≤ (4*C*M)*r^j := mul_le_mul_of_nonneg_left hpow (by positivity) + _ = _ := by ring + · have hnot : x ∉ tsupport Q := by + intro hm + have hsmall := hsupp hm + apply hx + rw [mem_ball,dist_zero_right] + have hnorm : ‖x‖ ≤ r/2 := by simpa only [mem_closedBall,dist_zero_right] using hsmall + linarith + have he := ((notMem_tsupport_iff_eventuallyEq.mp hnot).iteratedFDeriv ℝ j).eq_of_nhds + change ‖iteratedFDeriv ℝ j Q x‖ ≤ _ + rw [he] + simpa only [iteratedFDeriv_zero,Pi.zero_apply,norm_zero] using mul_nonneg (by positivity : 0 ≤ 4*C) hM + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffQuadraticBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffQuadraticBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c4fc66d8ed04fd09721a4f3cf210a87c817f600 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/CutoffQuadraticBounds.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledMetricQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm + +namespace OAI + +/-! Fixed cutoff multiplication preserves the delta-squared quadratic estimate. -/ +noncomputable section +open Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma cutoff_square_complex_bound {K : TopologicalSpace.Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → + WeightedBound univ s m D (fun x => ((χ x * χ x : ℝ) : ℂ)) := by + let C := supportedWeightedSeminorm K 1 m χ + have hC : 0 ≤ C := apply_nonneg _ _ + refine ⟨2^m*C*C,by positivity,?_⟩ + intro s hs hs1 + have hb : WeightedBound univ s m C χ := + (weightedBound_of_supportedSeminorm 1 m χ).shrink_scale hs.le hs1 + have hχc : ContDiffOn ℝ ∞ (fun x => (χ x : ℂ)) univ := + Complex.ofRealCLM.contDiff.comp_contDiffOn χ.contDiff.contDiffOn + have hbc := QuadraticMean.weighted_real_complex isOpen_univ.uniqueDiffOn hs.le hC χ.contDiff.contDiffOn hb + have hm : WeightedBound univ s m (2^m*C*C) (fun x => (χ x : ℂ)*(χ x : ℂ)) := + WeightedBound.mul isOpen_univ.uniqueDiffOn hs.le hC hC hχc hχc hbc hbc + simpa only [Complex.ofReal_mul] using hm + +theorem cutoff_quadratic_bound {ι : Type*} {K : TopologicalSpace.Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K) (m : ℕ) (A P : ℝ) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ (τ s δ : ℝ) + (φ : ι → SmallModes.Base → ℝ) (Z : ι → SmallModes.Field 4), + (∀ a, ContDiff ℝ ∞ (φ a)) → (∀ a, ContDiff ℝ ∞ (Z a)) → + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ δ → 0 ≤ A → 0 ≤ P → + (∀ a, WeightedBound univ s (m+1) (A*(δ*τ)) (Z a)) → + (∀ a v, ‖v‖ ≤ 1 → WeightedBound univ s m P (SmallModes.coordDeriv v (φ a))) → + ∀ l : RealModes.QuadraticLabel ι, + WeightedBound univ s m (B*δ^2) + (fun x => (χ x)^2 • RealModes.quadraticAmplitude τ φ Z l x) := by + obtain ⟨D,hD,hd⟩ := cutoff_square_complex_bound χ m + let C := 4 * 2^m * ((1+2^m*P)*A)^2 + refine ⟨2^m*D*C,by dsimp [C]; positivity,?_⟩ + intro τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ hA hP hb hp l + have hquad : WeightedBound univ s m (δ^2*C) (RealModes.quadraticAmplitude τ φ Z l) := + RealModes.scaled_quadraticAmplitude_bound isOpen_univ (fun a => (hφ a).contDiffOn) + (fun a => (hZ a).contDiffOn) hτ hs hτs hδ hA hP m hb hp l + have hcs : ContDiffOn ℝ ∞ (fun x => ((χ x * χ x : ℝ) : ℂ)) univ := + Complex.ofRealCLM.contDiff.comp_contDiffOn (χ.contDiff.contDiffOn.mul χ.contDiff.contDiffOn) + have hqs : ContDiffOn ℝ ∞ (RealModes.quadraticAmplitude τ φ Z l) univ := + (RealModes.quadraticAmplitude_smooth hφ hZ τ l).contDiffOn + have hout : WeightedBound univ s m (2^m*D*(δ^2*C)) + (fun x => ((χ x * χ x : ℝ) : ℂ) • RealModes.quadraticAmplitude τ φ Z l x) := + SmallModes.weighted_smul_field isOpen_univ.uniqueDiffOn hs hD + (by dsimp [C]; positivity) hcs hqs (hd s hs hs1) hquad + have he : (fun x => (χ x)^2 • RealModes.quadraticAmplitude τ φ Z l x) = + (fun x => ((χ x * χ x : ℝ) : ℂ) • RealModes.quadraticAmplitude τ φ Z l x) := by + funext x j + rw [Pi.smul_apply,Pi.smul_apply,pow_two] + rfl + rw [he] + convert hout using 1 + ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/DisjointAtlasBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/DisjointAtlasBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdf4e714608e5559330f46d40a84bfca144d9ee8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/DisjointAtlasBounds.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.DisjointJetBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds + +namespace OAI + +/-! The fixed atlas retains the count-free estimate for a disjoint family +of local corrections. -/ +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] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem disjoint_weighted_sum_bound {ι : Type*} [DecidableEq ι] (s : Finset ι) + (q : ι → M → Space) (hq : ∀ i ∈ s, ContMDiff planeModel spaceModel ∞ (q i)) + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (tsupport (q i)) (tsupport (q j))) + {C : ℝ} (hC : 0 ≤ C) {m : ℕ} + (hb : ∀ i ∈ s, A.WeightedBound 1 m C (q i)) : + A.WeightedBound 1 m C (∑ i ∈ s, q i) := by + intro a + rw [localize_sum] + have hloc : (↑s : Set ι).Pairwise fun i j => + Disjoint (tsupport (localize (a : M) (A.weight a) (q i))) + (tsupport (localize (a : M) (A.weight a) (q j))) := by + intro i hi j hj hij + apply Set.disjoint_left.mpr + intro x hxi hxj + obtain ⟨p,⟨hp,hpi⟩,hpx⟩ := localize_tsupport_inter (a : M) (A.weight_support a) (q i) hxi + obtain ⟨r,⟨hr,hrj⟩,hrx⟩ := localize_tsupport_inter (a : M) (A.weight_support a) (q j) hxj + have hpr : p = r := (chart (a : M)).injOn (A.weight_support a hp) + (A.weight_support a hr) (hpx.trans hrx.symm) + exact Set.disjoint_left.mp (hdisj hi hj hij) hpi (hpr.symm ▸ hrj) + exact SphericalJets.disjoint_sum_weighted_bound s + (fun i => localize (a : M) (A.weight a) (q i)) + (fun i hi => localize_smooth (a : M) (A.weight_smooth a) (A.weight_support a) (hq i hi)) + hloc hC (fun i hi => hb i hi a) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/EmbeddingNeighborhoodChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/EmbeddingNeighborhoodChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..edf6fc769d7ad08450d8d69e6f2a4079ef2a6e1d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/EmbeddingNeighborhoodChart.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MatchedSubsetChart + +namespace OAI + +/-! An embedding whose image contains a neighborhood supplies a local +inverse chart on that neighborhood. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] + +theorem embedding_neighborhood_chart (f : X → Y) (hf : IsEmbedding f) (p : X) + {V : Set Y} (hV : IsOpen V) (hpV : f p ∈ V) (hsub : V ⊆ range f) : + ∃ c : OpenPartialHomeomorph Y X, f p ∈ c.source ∧ c (f p) = p := by + let : Nonempty X := ⟨p⟩ + let a := hf.toPartialHomeomorph f + have hback (y : Y) (hy : y ∈ V) : f (a.symm y) = y := + hf.toPartialHomeomorph_right_inv f (hsub hy) + let e : OpenPartialHomeomorph X Y := { + toFun := f + invFun := a.symm + source := f ⁻¹' V + target := V + map_source' := fun _ hx => hx + map_target' := by + intro y hy + change f (a.symm y) ∈ V + rwa [hback y hy] + left_inv' := fun x _ => hf.toPartialHomeomorph_left_inv f + right_inv' := hback + continuousOn_toFun := hf.continuous.continuousOn + continuousOn_invFun := by + apply a.continuousOn_symm.mono + intro y hy + change y ∈ f '' univ + simpa only [image_univ] using hsub hy + open_source := hV.preimage hf.continuous + open_target := hV } + exact ⟨e.symm,hpV,hf.toPartialHomeomorph_left_inv f⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/EuclideanChartRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/EuclideanChartRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e114b36c5beb3449e4b1d85bb1c47d9ba2e72ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/EuclideanChartRead.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.EuclideanRestoration +import OAI.Geometry.SurfaceImmersion.Atlas.VectorChartRead + +namespace OAI + +/-! Smooth Euclidean representatives agree with the actual chart map near +points where a partition weight is nonzero. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def euclideanChartRead (i : A.centers) (F : M → Space) : Plane → Space := + A.vectorChartRead i F ∘ EuclideanSpace.equiv (Fin 2) ℝ + +lemma euclideanChartRead_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : + ContDiff ℝ ∞ (A.euclideanChartRead i F) := + (A.vectorChartRead_smooth i hF).comp (EuclideanSpace.equiv (Fin 2) ℝ).contDiff + +omit [CompactSpace M] in +lemma euclideanChartRead_eq (i : A.centers) (F : M → Space) : + A.euclideanChartRead i F = (chartAt Plane (i : M)).target.indicator + (fun x => (A.outer i ((chartAt Plane (i : M)).symm x))^2 • + F ((chartAt Plane (i : M)).symm x)) := by + funext x + by_cases hx : x ∈ (chartAt Plane (i : M)).target + · simp [euclideanChartRead,vectorChartRead,localize,chart,hx] + rfl + · simp [euclideanChartRead,vectorChartRead,localize,chart,hx] + +omit [CompactSpace M] in +lemma outer_one_chart_germ (i : A.centers) {p : M} (hp : A.weight i p ≠ 0) : + (fun y => A.outer i ((chartAt Plane (i : M)).symm y)) =ᶠ[𝓝 (chartAt Plane (i : M) p)] + (fun _ => (1 : ℝ)) := by + have hps : p ∈ (chartAt Plane (i : M)).source := by + simpa only [chart_source] using A.weight_support i (subset_tsupport _ hp) + have hpt := (chartAt Plane (i : M)).map_source hps + have hc : ContinuousAt (fun y => A.weight i ((chartAt Plane (i : M)).symm y)) + (chartAt Plane (i : M) p) := + (A.weight_smooth i).continuous.continuousAt.comp + (((chartAt Plane (i : M)).continuousOn_symm _ hpt).continuousAt + ((chartAt Plane (i : M)).open_target.mem_nhds hpt)) + have hn : ∀ᶠ y in 𝓝 (chartAt Plane (i : M) p), + A.weight i ((chartAt Plane (i : M)).symm y) ≠ 0 := + hc.eventually_ne (by simpa only [(chartAt Plane (i : M)).left_inv hps] using hp) + exact hn.mono fun y hy => A.outer_one i _ (subset_tsupport _ hy) + +omit [CompactSpace M] in +lemma euclideanChartRead_germ (i : A.centers) (F : M → Space) {p : M} + (hp : A.weight i p ≠ 0) : + A.euclideanChartRead i F =ᶠ[𝓝 (chartAt Plane (i : M) p)] + F ∘ (chartAt Plane (i : M)).symm := by + have hps : p ∈ (chartAt Plane (i : M)).source := by + simpa only [chart_source] using A.weight_support i (subset_tsupport _ hp) + filter_upwards [(chartAt Plane (i : M)).open_target.mem_nhds + ((chartAt Plane (i : M)).map_source hps),A.outer_one_chart_germ i hp] with y hy ho + rw [A.euclideanChartRead_eq,indicator_of_mem hy,ho,one_pow,one_smul] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ExtendedPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ExtendedPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..e33818c42b3230aebca920d2e1c78e2b7a34c95c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ExtendedPhaseChart.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPhaseChart +import OAI.Geometry.Immersion.ClosedSurface.LocalPhaseData + +namespace OAI + +/-! Smooth extensions of local phase coordinates on smaller neighborhoods. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +/-- Shrinking a smooth local chart lets its inverse be represented by an +actual globally smooth function, as needed by the supported mode solver. -/ +theorem extend_local_chart_inverse (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {p : Base} (hp : p ∈ e.source) : + ∃ d : OpenPartialHomeomorph Base Base, p ∈ d.source ∧ + (d : Base → Base) = e ∧ d.source ⊆ e.source ∧ d.target ⊆ e.target ∧ + ContDiff ℝ ∞ d ∧ ContDiff ℝ ∞ d.symm := by + obtain ⟨B,hB,_,_,hEq⟩ := smooth_extension_near e.open_target hi.contMDiffOn (e.map_source hp) + have hN : {y : Base | B y = e.symm y} ∩ e.target ∈ 𝓝 (e p) := + inter_mem hEq (e.open_target.mem_nhds (e.map_source hp)) + obtain ⟨V,hV,hVo,hVp⟩ := mem_nhds_iff.mp hN + have hvEq {y : Base} (hy : y ∈ V) : B y = e.symm y := (hV hy).1 + let d : OpenPartialHomeomorph Base Base := { + toFun := e + invFun := B + source := e.source ∩ e ⁻¹' V + target := e.target ∩ V + map_source' := fun x hx => ⟨e.map_source hx.1,hx.2⟩ + map_target' := by + intro y hy + rw [hvEq hy.2] + refine ⟨e.map_target hy.1,?_⟩ + change e (e.symm y) ∈ V + simpa only [e.right_inv hy.1] using hy.2 + left_inv' := by + intro x hx + rw [hvEq hx.2] + exact e.left_inv hx.1 + right_inv' := by + intro y hy + rw [hvEq hy.2] + exact e.right_inv hy.1 + open_source := e.open_source.inter (hVo.preimage he.continuous) + open_target := e.open_target.inter hVo + continuousOn_toFun := he.continuous.continuousOn + continuousOn_invFun := hB.contDiff.continuous.continuousOn + } + exact ⟨d,⟨hp,hVp⟩,rfl,fun _ h => h.1,fun _ h => h.1,he,hB.contDiff⟩ + +/-- Every noncritical phase admits the globally smooth representatives used +by local polynomial cancellation. This is a geometric construction. -/ +theorem exists_extended_phase_chart {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {p : Base} (hp : phaseDerivative φ p ≠ 0) : + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (∀ x, (e x).1 = φ x) ∧ ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm := by + obtain ⟨e,hep,hphase,he,hi⟩ := exists_smooth_phase_chart hφ hp + obtain ⟨d,hdp,hde,_,_,hd,hdi⟩ := extend_local_chart_inverse e he hi hep + exact ⟨d,hdp,fun x => by rw [hde]; exact hphase x,hd,hdi⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FastPhaseBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FastPhaseBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..da0b8e7a68dae09452876bd9d013f5cae61de36b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FastPhaseBounds.lean @@ -0,0 +1,137 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedPhaseExpressions +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVector +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFastEvaluation + +namespace OAI + +/-! Uniform weighted bounds after substituting the fast circle phase. Local +real lifts keep the constants independent of the number of oscillations. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.WeightedEstimates + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma WeightedBound.restrict_open_domain {U V : Set E} (hU : IsOpen U) (hV : IsOpen V) + (hVU : V ⊆ U) {s C : ℝ} {m : ℕ} {f : E → F} + (hb : WeightedBound U s m C f) : WeightedBound V s m C f := by + intro j hj p hp + rw [iteratedFDerivWithin_of_isOpen j hV hp] + have h := hb j hj p (hVU hp) + rwa [iteratedFDerivWithin_of_isOpen j hU (hVU hp)] at h + +lemma weighted_shifted_phase {U : Set E} (hU : IsOpen U) (ℓ : E →L[ℝ] ℝ) + (c : ℝ) {z P : ℝ} (hz : 0 < z) (hP : 2 ≤ P) (hℓ : ‖ℓ‖ ≤ P) + (ht : Set.MapsTo (fun p => ℓ p / z - c) U (Set.Icc (-1) 2)) (m : ℕ) : + WeightedBound U z m P (fun p => ℓ p / z - c) := by + intro j _ p hp + rw [iteratedFDerivWithin_of_isOpen j hU hp] + cases j with + | zero => + rw [norm_iteratedFDeriv_zero, pow_zero, one_mul, Real.norm_eq_abs] + exact (abs_le.mpr ⟨by linarith [(ht hp).1], (ht hp).2⟩).trans hP + | succ n => + have hd : fderiv ℝ (fun p => ℓ p / z - c) = fun _ => z⁻¹ • ℓ := by + funext q + simp only [fderiv_sub_const] + have he : (fun p => ℓ p / z) = ⇑(z⁻¹ • ℓ) := by + funext x + simp [div_eq_mul_inv, mul_comm] + rw [he, ContinuousLinearMap.fderiv] + rw [← norm_iteratedFDeriv_fderiv, hd] + cases n with + | zero => + rw [norm_iteratedFDeriv_zero, pow_one] + calc + z * ‖z⁻¹ • ℓ‖ = ‖ℓ‖ := by + rw [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_pos hz] + field_simp + _ ≤ P := hℓ + | succ n => simp only [iteratedFDeriv_succ_const, Pi.zero_apply, norm_zero, mul_zero]; linarith + +end ClosedSurfaceR4.WeightedEstimates + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open WeightedEstimates CovarianceCorrector + +/-- A periodic function represented by an actual jet expression retains its +slow-scale loss after evaluation at a fast linear phase. -/ +theorem compact_periodic_fast_bound {S : Set Base} (hS : IsOpen S) {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) → + ∀ (H : Base → Period → ℝ), + (∀ p ∈ S, ∀ t : ℝ, e.eval G (p, t) = H p (t : Period)) → + WeightedBound S z m (D / s ^ e.loss) + (fun p => H p ((ℓ p / z : ℝ) : Period)) := by + obtain ⟨D, hD, hd⟩ := Expression.compact_phase_bound hO hK hKO + e he m B (2 + ‖ℓ‖) hB (by linarith [norm_nonneg ℓ]) + refine ⟨D, hD, ?_⟩ + intro G s z hz hzs hs1 hG hGK hb H hR j hj p hp + let a : ℝ := AddCircle.equivIco 1 0 ((ℓ p / z : ℝ) : Period) + have ha : a ∈ Set.Ico (0 : ℝ) 1 := by + simpa only [zero_add] using (AddCircle.equivIco 1 0 ((ℓ p / z : ℝ) : Period)).property + have hca : (a : Period) = ((ℓ p / z : ℝ) : Period) := AddCircle.coe_equivIco + let c : ℝ := ℓ p / z - a + let t : Base → ℝ := fun q => ℓ q / z - c + have hcz : (c : Period) = 0 := by + rw [show c = ℓ p / z - a from rfl, AddCircle.coe_sub, hca, sub_self] + have hct (q : Base) : (t q : Period) = ((ℓ q / z : ℝ) : Period) := by + rw [show t q = ℓ q / z - c from rfl, AddCircle.coe_sub, hcz, sub_zero] + have ht : ContDiff ℝ ∞ t := (ℓ.contDiff.div_const z).sub contDiff_const + let V : Set Base := (S : Set Base) ∩ t ⁻¹' Set.Ioo (-1) 2 + have hV : IsOpen V := hS.inter (isOpen_Ioo.preimage ht.continuous) + have hVS : V ⊆ S := Set.inter_subset_left + have hpV : p ∈ V := by + refine ⟨hp, ?_⟩ + change -1 < ℓ p / z - (ℓ p / z - a) ∧ ℓ p / z - (ℓ p / z - a) < 2 + constructor <;> linarith [ha.1, ha.2] + have htV : Set.MapsTo t V (Set.Icc (-1) 2) := fun _ hx => ⟨hx.2.1.le, hx.2.2.le⟩ + have hbt := weighted_shifted_phase hV ℓ c hz (by linarith [norm_nonneg ℓ]) + (by linarith : ‖ℓ‖ ≤ 2 + ‖ℓ‖) htV m + have hh := hd V hV G t s z hz hzs hs1 hG ht.contDiffOn + (fun _ hx => hGK (hVS hx)) htV (hb.restrict_open_domain hS hV hVS) hbt + have heq : (fun q => e.eval G (q, t q)) =ᶠ[𝓝 p] + (fun q => H q ((ℓ q / z : ℝ) : Period)) := by + filter_upwards [hS.mem_nhds hp] with q hq + rw [hR q hq (t q), hct q] + have hjet := (heq.iteratedFDeriv ℝ j).self_of_nhds + have h := hh j hj p hpV + rw [iteratedFDerivWithin_of_isOpen j hV hpV, hjet] at h + rwa [iteratedFDerivWithin_of_isOpen j hS hp] + + +end ClosedSurfaceR4.JetPolynomial.Expression + +namespace ClosedSurfaceR4.JetPolynomial.VectorExpression +open LocalPeriodicExpansion WeightedEstimates CovarianceCorrector + +/-- Each actual periodic coefficient has a fast-scale bound with the same +slow-scale loss as its jet polynomial. -/ +theorem compact_fast_bound {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (R : VectorExpression) (hRs : R.SmoothCoeffs O) (i : Fin 4) + (ℓ : 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 + (R i).order) B (lowJet G) → + ∀ (U : Family S R4), Represents G R U → + WeightedBound S z m (D / s ^ (R i).loss) + (fun p => U.fastValue ℓ z p i) := by + obtain ⟨D, hD, hd⟩ := Expression.compact_periodic_fast_bound S.isOpen hO hK hKO + (R i) (hRs i) ℓ 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 i) (hR i)⟩ + +end ClosedSurfaceR4.JetPolynomial.VectorExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteAtlasIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteAtlasIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..88ee3df11ffb8bcc4643e3b65e8aff851b531027 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteAtlasIncrement.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeRestore +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCubicRemainder +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasIncrementBound + +namespace OAI + +/-! The free/forced metric step for an arbitrary finite family of local phases. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance finiteIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance finiteIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance finiteIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance finiteIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance finiteIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance finiteIncrementSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} +local instance finiteIncrementIndexDecidable : DecidableEq (Σ i, ι i) := Classical.decEq _ + +def finiteAtlasFreeMean + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ∀ x : M, CovariantTwoTensor x := + δ^2 • A.tensorPlaneRestore (fun i => chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) + + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) + +noncomputable def finiteAtlasNonzero + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ∀ x : M, CovariantTwoTensor x := by + classical + exact A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • RealModes.nonzeroPhaseSum τ + (fun a : Σ i, ι i => A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) a.1 a.2)) + (fun a : Σ i, ι i => A.vectorPlaneRead k (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2)) x) + +lemma finiteAtlasNonzero_smooth + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.finiteAtlasNonzero d hρ δ q u x)) := by + classical + apply A.tensorPlaneRestore_smooth + intro k + apply ((A.planeWeight_smooth k).pow 2).smul + apply RealModes.contDiff_nonzeroPhaseSum + · intro a + exact A.vectorPlaneRead_smooth k (restore_smooth (a.1 : M) (A.outer_smooth a.1) + (A.outer_support a.1) (c a.1 a.2).smoothPhase) + · intro a + exact A.vectorPlaneRead_smooth k (restore_smooth (a.1 : M) (A.outer_smooth a.1) + (A.outer_support a.1) ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff) + +lemma finite_atlas_metric_split + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u) = + A.finiteAtlasFreeMean d hρ δ q u + A.finiteAtlasNonzero d hρ δ q u := +by + simpa only [finiteAtlasFreeMean,finiteAtlasNonzero] using + A.finite_atlas_free_metric d hρ hδ hτ q u hK + +end SmoothingAtlas + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem finite_atlas_increment_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (_hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (F V : M → Space), ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ V → + ∀ H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + 0 < τ → τ ≤ 1 → 0 < δ → δ ≤ τ → ∀ A₀ B₀ C₁ C₂ C₃ : ℝ, + 0 ≤ A₀ → 0 ≤ B₀ → + let U := spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u + A.WeightedBound τ (m+1) (A₀*(δ*τ)) U → + A.WeightedBound τ (m+1) (B₀*δ^2) V → + A.TensorWeightedBound τ m C₁ (linearMetricTensor F U) → + A.TensorWeightedBound τ m C₂ (linearMetricTensor F V + A.finiteAtlasNonzero d hρ δ q u) → + A.TensorWeightedBound τ m C₃ (A.finiteAtlasFreeMean d hρ δ q u - δ^2 • H) → + A.TensorWeightedBound τ m (C₁+C₂+C₃+D*(2*A₀*B₀+B₀^2)*(δ^3/τ)) + (inducedTensor (F+(U+V)) - inducedTensor F - δ^2 • H) := by + obtain ⟨D,hD,hd⟩ := A.global_cubic_remainder_uniform_budget m + refine ⟨D,hD,?_⟩ + intro ι _ n P G hG φ K τ s c r ρ R reference d hρ δ q u hK F V hF hV H hH hτ hτ1 hδ hδτ A₀ B₀ C₁ C₂ C₃ hA hB + dsimp only + intro hbU hbV h₁ h₂ h₃ + let U := spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u + let T := A.finiteAtlasFreeMean d hρ δ q u + let O := A.finiteAtlasNonzero d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := + spaceCoordinates.symm.contDiff.contMDiff.comp (A.finiteAtlasFreeOscillation_smooth d hρ δ q u) + have hO := A.finiteAtlasNonzero_smooth d hρ δ q u + have hm : inducedTensor U = T+O := A.finite_atlas_metric_split d hρ hδ.ne' hτ.ne' q u hK + have hT : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (T x)) := by + have he : T = inducedTensor U-O := eq_sub_of_add_eq hm.symm + rw [he] + exact (A.inducedTensor_smooth hU).sub_section hO + have hs₁ := A.linearMetricTensor_smooth hF hU + have hs₂ := (A.linearMetricTensor_smooth hF hV).add_section hO + have hs₃ := hT.sub_section (hH.const_smul_section (a := δ^2)) + have hs₄ := (A.linearMetricTensor_smooth hU hV).add_section (A.inducedTensor_smooth hV) + have hout := A.tensorWeightedBound_add ((hs₁.add_section hs₂).add_section hs₃) hs₄ hτ.le + (A.tensorWeightedBound_add (hs₁.add_section hs₂) hs₃ hτ.le + (A.tensorWeightedBound_add hs₁ hs₂ hτ.le h₁ h₂) h₃) + (hd A₀ B₀ hA hB τ δ hτ hτ1 hδ.le hδτ U V hU hV hbU hbV) + have he : inducedTensor (F+(U+V))-inducedTensor F-δ^2 • H = + (linearMetricTensor F U+(linearMetricTensor F V+O)+(T-δ^2 • H))+ + (linearMetricTensor U V+inducedTensor V) := by + funext x + ext v w + have hmean := congrArg (fun t : ∀ x : M, CovariantTwoTensor x => t x v w) hm + have hid := inducedForm_free_forced ((hF x).mdifferentiableAt (by simp)) + ((hU x).mdifferentiableAt (by simp)) ((hV x).mdifferentiableAt (by simp)) v w (δ^2*H x v w) + change inducedForm (F+(U+V)) x v w-inducedForm F x v w-δ^2*H x v w = + (linearMetricForm F U x v w+(linearMetricForm F V x v w+O x v w)+(T x v w-δ^2*H x v w))+ + (linearMetricForm U V x v w+inducedForm V x v w) + change inducedForm U x v w=T x v w+O x v w at hmean + linarith only [hid,hmean] + rw [he] + exact hout + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteChartTranslationBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteChartTranslationBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..77200ea0e0f609e9fa03205f710abfa9311a4f3a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteChartTranslationBound.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartTranslationBound + +namespace OAI + +/-! Smallness simultaneously in any fixed finite collection of compact +chart regions. The bound is independent of the translated 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] [Fintype ι] + +def ChartDerivativeClose (p : ι → M) (S : ι → Set Base) + (f g : M → ProjectionTarget 3) (ε : ℝ) : Prop := + ∀ i x, x ∈ S i → ‖fderiv ℝ (g ∘ (chart (p i)).symm) x- + fderiv ℝ (f ∘ (chart (p i)).symm) x‖ < ε + +theorem finite_chart_translation_bound + (p : ι → M) (S : ι → Set Base) (hS : ∀ i, IsCompact (S i)) + (hST : ∀ i, S i ⊆ (chart (p i)).target) {χ : M → ℝ} + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) {ε : ℝ} (hε : 0 < ε) : + ∃ δ > 0, ∀ {f : M → ProjectionTarget 3}, + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f → + ∀ a : ProjectionTarget 3, ‖a‖ < δ → + ChartDerivativeClose p S f (surfaceTranslation f χ a) ε := by + classical + choose δ hδ hb using fun i => compact_chart_translation_bound (p i) hχ (hS i) (hST i) hε + have hsmall (s : Finset ι) : ∃ η > 0, ∀ i ∈ s, η ≤ δ i := by + induction s using Finset.induction_on with + | empty => exact ⟨1,by norm_num,by simp⟩ + | @insert i s hi ih => + obtain ⟨η,hη,he⟩ := 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 (he j hj) + obtain ⟨η,hη,he⟩ := hsmall Finset.univ + exact ⟨η,hη,fun hf a ha i x hx => hb i hf a (ha.trans_le (he i (Finset.mem_univ i))) x hx⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteCriticalQuadraticPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteCriticalQuadraticPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..282945b026f568244ad9ddd4f45f6001012aa355 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FiniteCriticalQuadraticPhases.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCurveTangencies +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexQuadraticPhase + +namespace OAI + +/-! The generic-parameter statement for the actual quadratic phases used +by the primitive construction, retaining finite tangencies on compact arcs. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry + +lemma quadraticPhaseAlongCurve_hasDerivAt {u : ℝ → CurvePlane} {v ell : CurvePlane} + {L t : ℝ} (hu : HasDerivAt u v t) : + HasDerivAt (fun s => convexQuadraticPhase ell L (u s)) + ((ell.1+L*(u t).1)*v.1+(ell.2+L*(u t).2)*v.2) t := by + have hd := (convexQuadraticPhase_hasFDerivAt ell L (u t)).comp_hasDerivAt t hu + convert hd using 1 + · rfl + · simp only [phaseLinear_apply,Prod.fst_add,Prod.snd_add,Prod.smul_fst,Prod.smul_snd,smul_eq_mul] + +lemma quadraticPhaseAlongCurve_deriv (u : ℝ → CurvePlane) (hu : ContDiff ℝ ∞ u) + (ell : CurvePlane) (L : ℝ) : + deriv (fun s => convexQuadraticPhase ell L (u s)) = + fun t => curvePhaseVelocity u (deriv u) L t ell := by + funext t + exact (quadraticPhaseAlongCurve_hasDerivAt (ell := ell) (L := L) + ((hu.differentiable (by simp) t).hasDerivAt)).deriv + +theorem exists_finite_critical_quadratic_phases {α : Type*} [Countable α] + (u : α → ℝ → CurvePlane) (hu : ∀ a, ContDiff ℝ ∞ (u a)) + (K : α → Set ℝ) (hK : ∀ a, IsCompact (K a)) + (hregular : ∀ a t, t ∈ K a → deriv (u a) t ≠ 0) (L : α → ℝ) + (U : Set CurvePlane) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ ell ∈ U, ∀ a, + (K a ∩ {t | deriv (fun s => convexQuadraticPhase ell (L a) (u a s)) t = 0}).Finite ∧ + ∀ t ∈ K a, deriv (fun s => convexQuadraticPhase ell (L a) (u a s)) t = 0 → + deriv (deriv (fun s => convexQuadraticPhase ell (L a) (u a s))) t ≠ 0 := by + let v := fun a => deriv (u a) + let w := fun a => deriv (v a) + have hv : ∀ a, ContDiff ℝ ∞ (v a) := fun a => (contDiff_infty_iff_deriv.mp (hu a)).2 + have hdu : ∀ a t, HasDerivAt (u a) (v a t) t := fun a t => + ((hu a).differentiable (by simp) t).hasDerivAt + have hdv : ∀ a t, HasDerivAt (v a) (w a t) t := fun a t => + ((hv a).differentiable (by simp) t).hasDerivAt + obtain ⟨ell,hell,hn⟩ := exists_nondegenerate_curve_phases u v w hu hv hdu hdv L U hU hne + refine ⟨ell,hell,fun a => ?_⟩ + have hfirst := quadraticPhaseAlongCurve_deriv (u a) (hu a) ell (L a) + have hsecond : deriv (deriv (fun s => convexQuadraticPhase ell (L a) (u a s))) = + fun t => curvePhaseAcceleration (u a) (v a) (w a) (L a) t ell := by + rw [hfirst] + funext t + exact (curvePhaseVelocity_hasDerivAt (L := L a) (ell := ell) (hdu a t) (hdv a t)).deriv + constructor + · simpa only [hfirst] using finite_nondegenerate_curve_tangencies (u a) (v a) (w a) + (hu a) (hv a) (hdu a) (hdv a) (L a) ell (hK a) (hregular a) (hn a) + · intro t ht hc + rw [hsecond] + apply hn a t (hregular a t ht) + simpa only [hfirst] using hc + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePhaseCurveDefiners.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePhaseCurveDefiners.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2f917e269243d3800763f060fd50df5c0e9d778 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePhaseCurveDefiners.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransverseDefiner +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteCurveLocalDefiners + +namespace OAI + +/-! Finite boundary defining functions pulled through an actual nonlinear +phase chart. Crossings and phase tangencies are the only exceptions. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma finite_phase_curve_definers {ι : Type*} [Fintype ι] + (C V : ι → Set Base) (ρ : ι → Base → ℝ) + (hC : ∀ i, IsClosed (C i)) (hV : ∀ i, IsOpen (V i)) + (hCV : ∀ i, C i ⊆ V i) (hρ : ∀ i, ContDiffOn ℝ ∞ (ρ i) (V i)) + (hzero : ∀ i x, x ∈ C i → ρ i x = 0) + {φ : Base → ℝ} {f : Base → Base} (hφ : ContDiff ℝ ∞ φ) (hf : ContDiff ℝ ∞ f) + {K P : Set Base} (hK : K ⊆ ⋃ i, f ⁻¹' C i) + (hcross : ∀ i j, i ≠ j → (f ⁻¹' C i) ∩ (f ⁻¹' C j) ⊆ P) + (hphase : ∀ p ∈ K \ P, φ ∘ f =ᶠ[𝓝 p] Prod.fst) + (hD : ∀ p ∈ K \ P, coordDet (fderiv ℝ f p) ≠ 0) + (htrans : ∀ i p, p ∈ K \ P → f p ∈ C i → + covectorDet (phaseDerivative φ (f p)) (phaseDerivative (ρ i) (f p)) ≠ 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 + apply finite_curve_local_definers (fun i => f ⁻¹' C i) (fun i => f ⁻¹' V i) + (fun i => ρ i ∘ f) + · exact fun i => (hC i).preimage hf.continuous + · exact fun i => (hV i).preimage hf.continuous + · exact fun i x hx => hCV i hx + · exact fun i => (hρ i).comp hf.contDiffOn (fun _ hx => hx) + · exact fun i x hx => hzero i (f x) hx + · exact hK + · exact hcross + · intro i p hp hi + apply phase_chart_transverse_definer_at (hφ.differentiable (by simp) _) + (((hρ i).contDiffAt ((hV i).mem_nhds (hCV i hi))).differentiableAt (by simp)) + (hf.differentiable (by simp) _) (hphase p hp) (hD p hp) (htrans i p hp hi) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePointChartBalls.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePointChartBalls.lean new file mode 100644 index 0000000000000000000000000000000000000000..42852a5e759a8ef0774e811bf6cc2bdf6d1ad827 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FinitePointChartBalls.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricModel + +namespace OAI + +/-! Arbitrarily small disjoint coordinate balls around a prescribed finite +set. Their closed supports remain inside the supplied chart neighborhoods. -/ +noncomputable section +open Set Filter Metric +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem finite_point_chart_balls {M : Type*} [TopologicalSpace M] [T2Space M] + (P : Finset M) (e : P → OpenPartialHomeomorph M Plane) + (he : ∀ p, (p : M) ∈ (e p).source) (U : P → Set M) + (hU : ∀ p, IsOpen (U p)) (hpU : ∀ p, (p : M) ∈ U p) + {η : ℝ} (hη : 0 < η) : + ∃ r : P → ℝ, (∀ p, 0 < r p ∧ r p < η ∧ + closedBall (e p p) (r p) ⊆ (e p).target ∩ (e p).symm ⁻¹' U 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 ∧ r < η ∧ + closedBall (e p p) r ⊆ (e p).target ∩ (e p).symm ⁻¹' (U p ∩ V p) := by + have ho := (e p).isOpen_inter_preimage_symm ((hU p).inter (hV p).2) + have hp : e p p ∈ (e p).target ∩ (e p).symm ⁻¹' (U p ∩ V p) := by + refine ⟨(e p).map_source (he p),?_⟩ + change (e p).symm (e p p) ∈ U p ∩ V p + rw [(e p).left_inv (he p)] + exact ⟨hpU p,(hV p).1⟩ + obtain ⟨r,hr,hrsub⟩ := nhds_basis_closedBall.mem_iff.mp (ho.mem_nhds hp) + refine ⟨min r (η/2),lt_min hr (half_pos hη),?_,?_⟩ + · exact (min_le_right r (η/2)).trans_lt (half_lt_self hη) + · exact (closedBall_subset_closedBall (min_le_left r (η/2))).trans hrsub + choose r hr hrη hrsub using hex + refine ⟨r,fun p => ⟨hr p,hrη p,?_⟩,?_⟩ + · intro x hx + exact ⟨(hrsub p hx).1,(hrsub p hx).2.1⟩ + · intro p q hpq + apply Set.disjoint_left.mpr + rintro x ⟨y,hy,rfl⟩ ⟨z,hz,heq⟩ + have hpV := (hrsub p hy).2.2 + have hqV := (hrsub q hz).2.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/Atlas/FixedAtlasSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedAtlasSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..4aa737e01149042c0b337a82873a9b67752f5531 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedAtlasSmallIncrement.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeResidual +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasIncrementBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds + +namespace OAI + +/-! Assemble an actual small increment from fixed geometric solvers and an adjusted mean. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance smallAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance smallAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance smallAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance smallAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance smallAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance smallAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem fixed_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) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r r₀ : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 (r₀ i) ρ R (reference i)) + (c₀ : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) + (A.globalQuadraticPhase (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) k l) + (A.quadraticOverlapCompact (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) 1 1) + (I : A.centers → RealModes.QuadraticLabel (A.centers × Fin 3) → ℕ → ℝ) + (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) + (C E : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hE : ∀ m, 0 ≤ E m) (q : ℕ) : + ∃ B T : ℕ → ℝ, (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ {τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ i, (d i).phase = (d₀ i).phase) → + (∀ i, (d i).G = A.jetChartMap i F) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → δ ≤ τ → ∀ u H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + (∀ 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)) → + ∃ 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 (F+X) - inducedTensor F - δ^2 • H)) := by + classical + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose Af hAf hfree using fun m => A.uniform_atlas_free_size p hρ r reference q m (C (N m)) (hC (N m)) + choose Ef hEf hfreeRes using fun m => A.uniform_atlas_free_residual p hρ r reference q m (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := + A.uniform_atlas_free_quadratic_correction F hF p hρ r r₀ reference d₀ c₀ I hI hi C hC q + let L : ℝ := ‖spaceCoordinates.symm.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + choose D hD hincrement using fun m => A.atlas_free_forced_increment_bound m + (L*Af (m+1)) (L*Cv (m+1)) + (mul_nonneg hL (zero_le_one.trans (hAf (m+1)))) (mul_nonneg hL (hCv (m+1))) + let B := fun m => L*(Af m+Cv m) + let T := fun m => Ef m+Ct m+E m+D m + have hB (m) : 0 ≤ B m := mul_nonneg hL (add_nonneg (zero_le_one.trans (hAf m)) (hCv m)) + have hT (m) : 0 ≤ T m := by + dsimp [T] + exact add_nonneg (add_nonneg (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m)) (hD m) + refine ⟨B,T,hB,hT,?_⟩ + intro τ s d hfit hphase hG hτ hs hτs hs1 hK δ hδ hδτ u H hu hH hball hbu hmean + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hη : τ/s ≤ 1 := (div_le_one₀ hs).mpr hτs + obtain ⟨W,hW,hwsize,hwres⟩ := hcorr d hfit hphase hτ hs hτs hs1 hK δ hδ u hu hball hbu + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + let V := spaceCoordinates.symm ∘ W + have hUr := A.atlasFreeOscillation_smooth d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := spaceCoordinates.symm.contDiff.contMDiff.comp hUr + have hV : ContMDiff planeModel spaceModel ∞ V := spaceCoordinates.symm.contDiff.contMDiff.comp hW + have hbU (m) : A.WeightedBound τ m ((L*Af m)*(δ*τ)) U := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hUr hτ.le + (hfree m d hfit hτ hs hτs hs1 (le_refl 0) + (by simpa only [zero_div,add_zero] using hη) δ hδ u hu hball (hbu (N m))) + convert hh using 1 <;> dsimp [U,L] + all_goals ring + have hbV (m) : A.WeightedBound τ m ((L*Cv m)*δ^2) V := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hW hτ.le (hwsize m) + convert hh using 1 <;> dsimp [V,L] + all_goals ring + have hlin (m) : A.TensorWeightedBound τ m (Ef m*(δ*τ)*(τ/s)^(q+1)) (linearMetricTensor F U) := + hfreeRes m F hF d hG hfit hτ hs hτs hs1 hK δ hδ u hu hball (hbu (N m)) + refine ⟨U+V,hU.add hV,?_,?_⟩ + · intro m k + apply ((A.weightedBound_add hU hV hτ.le (hbU m) (hbV m)) k).mono_const + have hsmall : δ^2 ≤ δ*τ := by nlinarith + calc + (L*Af m)*(δ*τ)+(L*Cv m)*δ^2 ≤ (L*Af m)*(δ*τ)+(L*Cv m)*(δ*τ) := + add_le_add le_rfl (mul_le_mul_of_nonneg_left hsmall (mul_nonneg hL (hCv m))) + _ = B m*(δ*τ) := by dsimp [B]; ring + · intro m k + have hforced : A.TensorWeightedBound τ m (Ct m*δ^2*(τ/s)^(q+1)) + (linearMetricTensor F V + A.atlasFreeQuadraticOscillation d hρ δ q u) := by + convert hwres m using 1 + ring + have hh := hincrement m d hρ δ q u hK F V hF hV H hH hτ hτ1 hδ hδτ + (Ef m*(δ*τ)*(τ/s)^(q+1)) (Ct m*δ^2*(τ/s)^(q+1)) (E m*δ^2*(τ/s)^(q+1)) + (hbU (m+1)) (hbV (m+1)) (hlin m) hforced (hmean m) + apply (hh k).mono_const + have hd1 : δ ≤ 1 := hδτ.trans hτ1 + have hdt : δ*τ ≤ δ := mul_le_of_le_one_right hδ hτ1 + have hd2 : δ^2 ≤ δ := by nlinarith + have hp : 0 ≤ (τ/s)^(q+1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hx : 0 ≤ δ^3/τ := by positivity + calc + Ef m*(δ*τ)*(τ/s)^(q+1) + Ct m*δ^2*(τ/s)^(q+1) + E m*δ^2*(τ/s)^(q+1) + D m*(δ^3/τ) + ≤ (Ef m+Ct m+E m)*(δ*(τ/s)^(q+1))+D m*(δ^3/τ) := by + have h1 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hdt (zero_le_one.trans (hEf m))) hp + have h2 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 (hCt m)) hp + have h3 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 (hE m)) hp + nlinarith only [h1,h2,h3] + _ ≤ T m*(δ*(τ/s)^(q+1)+δ^3/τ) := by + dsimp [T] + have hmain : 0 ≤ δ*(τ/s)^(q+1) := mul_nonneg hδ hp + have hsum : 0 ≤ Ef m+Ct m+E m := add_nonneg (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m) + nlinarith [mul_nonneg (hD m) hmain,mul_nonneg hsum hx] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedAtlasStartingFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedAtlasStartingFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff4a4aee439cea3bdf177b35bc5d7a9315e59e07 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedAtlasStartingFamily.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SmallMetricStartingFamily + +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 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 ∧ + ∀ (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 ⟨r,hr,hr1,hsmall⟩ := A.uniform_small_scaled_metric g hD hη + refine ⟨r,D,c,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 SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..22e9bfaf06c6ddfc22805a15b34243cf31aac6d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartGeometry.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearPhaseFrameMargins +import OAI.Geometry.SurfaceImmersion.Atlas.NoncriticalPhaseCover + +namespace OAI + +/-! Restricting a fixed phase chart preserves its derivative budgets. +Both Jacobian denominators are bounded by the original chart's first jets. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma coordDet_abs_le_norm (A : Base →L[ℝ] Base) : |coordDet A| ≤ 2*‖A‖^2 := by + have hx : ‖A dx‖ ≤ ‖A‖ := by simpa [dx] using A.le_opNorm dx + have hy : ‖A dy‖ ≤ ‖A‖ := by simpa [dy] using A.le_opNorm dy + have ha := (norm_fst_le (A dx)).trans hx + have hb := (norm_snd_le (A dx)).trans hx + have hc := (norm_fst_le (A dy)).trans hy + have hd := (norm_snd_le (A dy)).trans hy + simp only [Real.norm_eq_abs] at ha hb hc hd + calc + |coordDet A| ≤ |(A dx).1*(A dy).2|+|(A dx).2*(A dy).1| := abs_sub _ _ + _ ≤ ‖A‖*‖A‖+‖A‖*‖A‖ := by rw [abs_mul,abs_mul]; gcongr + _ = 2*‖A‖^2 := by ring + +lemma chart_jacobian_bounds (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) {J : ℝ} + (_hJ : 0 ≤ J) + (hf : ∀ x ∈ e.source, ‖fderiv ℝ e x‖ ≤ J) + (hb : ∀ x ∈ e.target, ‖fderiv ℝ e.symm x‖ ≤ J) : + ∀ x ∈ e.source, |coordDet (fderiv ℝ e x)| ≤ 2*J^2 ∧ + ‖(coordDet (fderiv ℝ e x))⁻¹‖ ≤ 2*J^2 := by + intro x hx + constructor + · exact (coordDet_abs_le_norm _).trans + (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) (hf x hx) 2) + (by norm_num)) + · have hh := inverse_chart_det_inv e.symm hi he hx + change (coordDet (fderiv ℝ e x))⁻¹ = coordDet (fderiv ℝ e.symm (e x)) at hh + rw [hh,Real.norm_eq_abs] + exact (coordDet_abs_le_norm _).trans + (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) + (hb (e x) (e.map_source hx)) 2) (by norm_num)) + +lemma restrict_chart_forward_jets (e : OpenPartialHomeomorph Base Base) + (U : Set Base) (hU : IsOpen U) (J : ℕ → ℝ) + (hb : ∀ m j, j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m) : + ∀ m j, j ≤ m → ∀ x ∈ (e.restrOpen U hU).source, + ‖iteratedFDerivWithin ℝ j (e.restrOpen U hU) + (e.restrOpen U hU).source x‖ ≤ J m := by + intro m j hj x hx + have hh := hb m j hj x hx.1 + rw [iteratedFDerivWithin_of_isOpen j e.open_source hx.1] at hh + simpa only [OpenPartialHomeomorph.coe_restrOpen, + iteratedFDerivWithin_of_isOpen j (e.restrOpen U hU).open_source hx] using hh + +lemma restrict_chart_inverse_jets (e : OpenPartialHomeomorph Base Base) + (U : Set Base) (hU : IsOpen U) (J : ℕ → ℝ) + (hb : ∀ m j, j ≤ m → ∀ x ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ J m) : + ∀ m j, j ≤ m → ∀ x ∈ (e.restrOpen U hU).target, + ‖iteratedFDerivWithin ℝ j (e.restrOpen U hU).symm + (e.restrOpen U hU).target x‖ ≤ J m := by + intro m j hj x hx + have hh := hb m j hj x hx.1 + rw [iteratedFDerivWithin_of_isOpen j e.open_target hx.1] at hh + simpa only [OpenPartialHomeomorph.coe_restrOpen_symm, + iteratedFDerivWithin_of_isOpen j (e.restrOpen U hU).open_target hx] using hh + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartNonlinearSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartNonlinearSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..64365ba66fa21b7d4c7e47d4993d71ffb98052bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FixedChartNonlinearSolver.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FixedChartGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDenominatorNeighborhood +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialNonlinearSolver + +namespace OAI + +/-! Actual nonlinear solvers on a fixed phase chart. Only its open domain is +restricted when the immersed map changes; all coordinate budgets stay fixed. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes PhaseGeometry + +def fixedChartSolverBudget (J B : ℕ → ℝ) (D : ℝ) (m : ℕ) : ℝ := + 1+B m+J (m+3)+2*(J 1)^2+2*D + +lemma fixedChartSolverBudget_polynomial (J : ℕ → ℝ) (B : ℕ → ℝ → ℝ) + {D : ℝ} (hJ : ∀ m, 0 ≤ J m) (hD : 0 ≤ D) + (hB : ∀ m, HasPolynomialBound (B m)) (m : ℕ) : + HasPolynomialBound (fun x => fixedChartSolverBudget J (fun j => B j x) D m) := by + exact ((((polynomialBound_const zero_le_one).add (hB m)).add + (polynomialBound_const (hJ (m+3)))).add + (polynomialBound_const (mul_nonneg (by norm_num) (sq_nonneg (J 1))))).add + (polynomialBound_const (mul_nonneg (by norm_num) hD)) + +theorem fixed_chart_nonlinear_solver : + ∃ (p : ℕ → ℕ) (A : ℕ → ℝ), (∀ m, 1 ≤ A m) ∧ + ∀ {G : Base → Space} (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + {φ : Base → ℝ} (_hφ : ContDiff ℝ ∞ φ) + (e : NoncriticalPhaseChart (coordinatePhase φ)), + (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source → + ∀ J : ℕ → ℝ, (∀ m, 1 ≤ J m) → + (∀ m j, j ≤ m → ∀ x ∈ e.chart.source, + ‖iteratedFDerivWithin ℝ j e.chart e.chart.source x‖ ≤ J m) → + (∀ m j, j ≤ m → ∀ x ∈ e.chart.target, + ‖iteratedFDerivWithin ℝ j e.chart.symm e.chart.target x‖ ≤ J m) → + ∀ D : ℝ, 1 ≤ D → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x)) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ D) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + ‖secondQuadratic (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 e.chart.source 1 j + (B m/(s : ℝ)^(j-2)) (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + (∀ m, c.C m = A m*(fixedChartSolverBudget J B D m)^(p m)) ∧ + (∀ m, c.D m = 0) ∧ (∀ m, c.J m = fixedChartSolverBudget J B D m) ∧ + (∀ m j, j ≤ m → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ J m) := by + obtain ⟨p,A,hA,hsolve⟩ := polynomial_nonlinear_unperturbed_solver + refine ⟨p,A,hA,?_⟩ + intro G hG K φ hφ e hKe J hJ hf hi D hD hImm hgood hgram hnormal τ s hs hs1 B hB hFj + have hF := hG.comp planeCoordinateIsometry.symm.contDiff + have hφ' := hφ.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨U,hU,hKU,hgeom⟩ := phase_denominator_neighborhood hF hφ' (modeSupport K) + (zero_lt_one.trans_le hD) hImm hgood hgram hnormal + let d := e.chart.restrOpen U hU + have hd : ContDiff ℝ ∞ d := e.smooth + have hdi : ContDiff ℝ ∞ d.symm := e.smoothInverse + have hf' := restrict_chart_forward_jets e.chart U hU J hf + have hi' := restrict_chart_inverse_jets e.chart U hU J hi + have hdf (x : SmallModes.Base) (hx : x ∈ e.chart.source) : + ‖fderiv ℝ e.chart x‖ ≤ J 1 := by + have hh := hf 1 1 le_rfl x hx + rwa [iteratedFDerivWithin_of_isOpen 1 e.chart.open_source hx,norm_iteratedFDeriv_one] at hh + have hdb (x : SmallModes.Base) (hx : x ∈ e.chart.target) : + ‖fderiv ℝ e.chart.symm x‖ ≤ J 1 := by + have hh := hi 1 1 le_rfl x hx + rwa [iteratedFDerivWithin_of_isOpen 1 e.chart.open_target hx,norm_iteratedFDeriv_one] at hh + have hjac := chart_jacobian_bounds e.chart e.smooth e.smoothInverse + (zero_le_one.trans (hJ 1)) hdf hdb + let E := fixedChartSolverBudget J B D + have heach (m : ℕ) : 1 ≤ E m ∧ B m ≤ E m ∧ J (m+3) ≤ E m ∧ + 2*(J 1)^2 ≤ E m ∧ 2*D ≤ E m := by + have hb0 := zero_le_one.trans (hB m) + have hj0 := zero_le_one.trans (hJ (m+3)) + have hd0 := zero_le_one.trans hD + have hs0 := sq_nonneg (J 1) + dsimp [E,fixedChartSolverBudget] + constructor + · linarith + constructor + · linarith + constructor + · linarith + constructor <;> linarith + obtain ⟨c,he,hC,hzero,hcj⟩ := hsolve hG K hφ d hd hdi e.phase + (fun x hx => ⟨hKe hx,hKU hx⟩) + (fun x hx => (hgeom x hx.2).1) (fun x hx => (hgeom x hx.2).2.1) + τ s hs hs1 E (fun m => (heach m).1) (by + intro m + refine ⟨?_,?_,?_,?_,?_,?_⟩ + · intro j hj + have hh : WeightedBound d.source 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm) := by + intro k hk x hx + rw [iteratedFDerivWithin_of_isOpen k d.open_source hx] + have hv := hFj m j hj k hk x hx.1 + rwa [iteratedFDerivWithin_of_isOpen k e.chart.open_source hx.1] at hv + exact hh.mono_const (div_le_div_of_nonneg_right (heach m).2.1 (pow_nonneg hs.le _)) + · intro j _ hj x hx + exact (hf' (m+3) j hj x hx).trans (heach m).2.2.1 + · intro x hx + exact (hjac x hx.1).2.trans (heach m).2.2.2.1 + · intro x hx + exact (hjac x hx.1).1.trans (heach m).2.2.2.1 + · intro x hx + exact (hgeom x hx.2).2.2.1.trans (heach m).2.2.2.2 + · intro x hx + exact (hgeom x hx.2).2.2.2.trans (heach m).2.2.2.2) + refine ⟨c,hC,hzero,hcj,?_⟩ + intro m j hj x hx + rw [he] at hx ⊢ + exact hi' m j hj x hx + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatJetWeightedBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatJetWeightedBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..f32bd1953612085fbd8599d19688cde0d6a2a16b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatJetWeightedBound.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FlatSecondJetBounds +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! A flat remainder has a scale-weighted second-order bound controlled +only by its second derivative on the coordinate ball. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem flat_remainder_weighted_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) : + WeightedEstimates.WeightedBound (Metric.ball (0 : Base) r) r 2 (M*r^2) R := by + intro j hj x hx + rw [iteratedFDerivWithin_of_isOpen j isOpen_ball hx] + have hx' : x ∈ Metric.closedBall (0 : Base) r := Metric.ball_subset_closedBall hx + have hxr : ‖x‖ ≤ r := by simpa only [Metric.mem_closedBall,dist_zero_right] using hx' + interval_cases j + · rw [pow_zero,one_mul,norm_iteratedFDeriv_zero] + apply (flat_value_bound hR h0 hD0 hr.le hM hb hx').trans + calc + M*r*‖x‖ ≤ M*r*r := mul_le_mul_of_nonneg_left hxr (mul_nonneg hM hr.le) + _ = M*r^2 := by ring + · rw [pow_one,norm_iteratedFDeriv_one] + have hd := flat_first_derivative_bound hR hD0 hr.le hb hx' + calc + r*‖fderiv ℝ R x‖ ≤ r*(M*‖x‖) := mul_le_mul_of_nonneg_left hd hr.le + _ = M*r*‖x‖ := by ring + _ ≤ M*r*r := mul_le_mul_of_nonneg_left hxr (mul_nonneg hM hr.le) + _ = M*r^2 := by ring + · rw [← norm_iteratedFDeriv_fderiv (n := 1),norm_iteratedFDeriv_one] + exact (mul_le_mul_of_nonneg_left (hb x hx') (sq_nonneg r)).trans_eq (mul_comm _ _) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatTransverseCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatTransverseCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..27cbbe206ebbe531dd54e2ae29f18f14cfbc95cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/FlatTransverseCutoff.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TransverseCutoff + +namespace OAI + +/-! A transverse cutoff of a first-order flat remainder tends to zero +in C1, even though the cutoff derivative grows as its support narrows. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem flat_transverse_cutoff_bound : ∃ B : ℝ, 0 ≤ B ∧ + ∀ (R : Base → ProjectionTarget 3), ContDiff ℝ ∞ R → + (∀ t, R (crosscapAxis t) = 0) → (∀ t, fderiv ℝ R (crosscapAxis t) = 0) → + ∀ ρ C : ℝ, 0 ≤ C → + (∀ x ∈ closedBall (0 : Base) ρ, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ C) → + ∀ r : ℝ, 0 < r → ∀ x ∈ closedBall (0 : Base) ρ, + ‖transverseCutoff r x • R x‖ ≤ C*r^2 ∧ + ‖fderiv ℝ (fun y => transverseCutoff r y • R y) x‖ ≤ (B+1)*C*r := by + obtain ⟨B,hB,hcut⟩ := transverseCutoff_derivative_bound + refine ⟨B,hB,?_⟩ + intro R hR h0 hD0 ρ C hC hb r hr x hx + by_cases hxs : x ∈ tsupport (transverseCutoff r) + · have hxr : |x 0| ≤ r := transverseCutoff_tsupport hr hxs + have hv : ‖R x‖ ≤ C*r^2 := (axis_flat_value_bound hR h0 hD0 hC hb hx).trans + (mul_le_mul_of_nonneg_left (sq_le_sq₀ (abs_nonneg _) hr.le |>.mpr hxr) hC) + have hd : ‖fderiv ℝ R x‖ ≤ C*r := (axis_flat_first_bound hR hD0 hb hx).trans + (mul_le_mul_of_nonneg_left hxr hC) + have hprod := ((transverseCutoff_smooth r).differentiable (by simp) x).hasFDerivAt.smul + (hR.differentiable (by simp) x).hasFDerivAt + change HasFDerivAt (fun y => transverseCutoff r y • R y) _ x at hprod + constructor + · rw [norm_smul,Real.norm_eq_abs] + calc + _ ≤ 1*(C*r^2) := mul_le_mul (transverseCutoff_le_one r x) hv (norm_nonneg _) (by norm_num) + _ = _ := one_mul _ + · rw [hprod.fderiv] + calc + _ ≤ ‖transverseCutoff r x • fderiv ℝ R x‖ + + ‖(fderiv ℝ (transverseCutoff r) x).smulRight (R x)‖ := norm_add_le _ _ + _ = |transverseCutoff r x| * ‖fderiv ℝ R x‖ + + ‖fderiv ℝ (transverseCutoff r) x‖*‖R x‖ := by + rw [norm_smul,Real.norm_eq_abs,ContinuousLinearMap.norm_smulRight_apply] + _ ≤ 1*(C*r) + (B/r)*(C*r^2) := add_le_add + (mul_le_mul (transverseCutoff_le_one r x) hd (norm_nonneg _) (by norm_num)) + (mul_le_mul (hcut r hr x) hv (norm_nonneg _) (div_nonneg hB hr.le)) + _ = (B+1)*C*r := by field_simp; ring + · have he : (fun y => transverseCutoff r y • R y) =ᶠ[𝓝 x] 0 := by + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hxs] with y hy + simp [hy] + constructor + · have hex : transverseCutoff r x • R x = 0 := he.self_of_nhds + rw [hex,norm_zero] + positivity + · rw [he.fderiv_eq] + simpa using (mul_nonneg (mul_nonneg (by linarith : 0 ≤ B+1) hC) hr.le) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericAtlasPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericAtlasPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..43b281103a440b6864237dabe92707e8748056ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericAtlasPhases.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GenericPulledPhases +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredAtlasDifferentials + +namespace OAI + +/-! Generic centered phases in different surface charts. At crossing points +both differentials are pulled to the same actual tangent chart. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {ι α κ : Type*} [Fintype ι] [DecidableEq ι] [Countable α] [Countable κ] + +def centeredAtlasPhase (q : M) (ell : CurvePlane) (L : ℝ) : M → ℝ := + centeredConvexPhase ell L (coordinateChart q q) ∘ coordinateChart q + +theorem exists_generic_atlas_phases + (center : ι → M) (L : ι → ℝ) (index : α → ι) + (u : α → ℝ → CurvePlane) (hu : ∀ a, ContDiff ℝ ∞ (u a)) + (K : α → Set ℝ) (hK : ∀ a, IsCompact (K a)) + (hregular : ∀ a t, t ∈ K a → deriv (u a) t ≠ 0) + (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, + (∀ a, (K a ∩ {t | deriv (fun s => + centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s)) t = 0}).Finite) ∧ + (∀ a t, t ∈ K a → deriv (fun s => + centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s)) t = 0 → + deriv (deriv (fun s => centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s))) t ≠ 0) ∧ + (∀ 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 c : ι → CurvePlane := fun i => coordinateChart (center i) (center i) + let A : κ → CurvePlane →L[ℝ] CurvePlane := fun k => + fderiv ℝ (coordinateTransition (center (first k)) (base k)) (coordinateChart (base k) (point k)) + let B : κ → CurvePlane →L[ℝ] CurvePlane := fun k => + fderiv ℝ (coordinateTransition (center (second k)) (base k)) (coordinateChart (base k) (point k)) + have hA (k : κ) : coordDet (A k) ≠ 0 := coordinateTransition_det_ne _ _ + (coordinateTransition_mem_chart _ _ (hbase k) (hfirst k)) + have hB (k : κ) : coordDet (B k) ≠ 0 := coordinateTransition_det_ne _ _ + (coordinateTransition_mem_chart _ _ (hbase k) (hsecond k)) + have hur (a : α) : ContDiff ℝ ∞ (fun t => u a t-c (index a)) := (hu a).sub contDiff_const + have hr : ∀ a t, t ∈ K a → deriv (fun t => u a t-c (index a)) t ≠ 0 := by + intro a t ht + simpa only [deriv_sub_const] using hregular a t ht + obtain ⟨ell,hell,he,hn,hcross⟩ := exists_generic_pulled_phases index + (fun a t => u a t-c (index a)) hur K hK hr (fun a => L (index a)) + first second hdistinct A B hA hB + (fun k => L (first k) • (coordinateChart (center (first k)) (point k)-c (first k))) + (fun k => L (second k) • (coordinateChart (center (second k)) (point k)-c (second k))) U hU hne + refine ⟨ell,hell,he,hn,?_⟩ + intro k + simp only [centeredAtlasPhase] + rw [actual_centered_phase_at _ _ _ _ _ (hbase k) (hfirst k), + actual_centered_phase_at _ _ _ _ _ (hbase k) (hsecond k)] + exact hcross k + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCoordinateLevels.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCoordinateLevels.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd5126ce2cdb3d35d2626cead29dcbf57c7b25cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCoordinateLevels.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IndependentRadiusProjections + +namespace OAI + +/-! Generic common levels for finitely many radius functions in countably +many surface charts. This is the radius-selection step of the global preparation. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PublishedInputs +variable {ι α : Type*} [Fintype ι] [DecidableEq ι] [Countable α] + +abbrev DistinctRadiusPairs (ι : Type*) := {p : ι × ι // p.1 ≠ p.2} +abbrev DistinctRadiusTriples (ι : Type*) := + {p : (ι × ι) × ι // p.1.1 ≠ p.1.2 ∧ p.1.1 ≠ p.2 ∧ p.1.2 ≠ p.2} + +theorem exists_generic_coordinate_levels + (ρ : α → ι → Plane → ℝ) (hρ : ∀ a i, ContDiff ℝ ∞ (ρ a i)) + (K : α → Set Plane) (hK : ∀ a, IsCompact (K a)) + (U : Set (ι → ℝ)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ r ∈ U, + (∀ a i j, i ≠ j → ∀ x ∈ K a, + ρ a i x = r i → ρ a j x = r j → + Function.Surjective (fderiv ℝ (fun y => + radiusPairProjection i j (fun k => ρ a k y)) x)) ∧ + (∀ a i j, i ≠ j → (K a ∩ {x | ρ a i x = r i ∧ ρ a j x = r j}).Finite) ∧ + ∀ a i j k, i ≠ j → i ≠ k → j ≠ k → ∀ x ∈ K a, + ¬ (ρ a i x = r i ∧ ρ a j x = r j ∧ ρ a k x = r k) := by + let p : α × DistinctRadiusPairs ι → (ι → ℝ) →L[ℝ] Plane := + fun a => radiusPairProjection a.2.1.1 a.2.1.2 + let q : α × DistinctRadiusTriples ι → (ι → ℝ) →L[ℝ] (Plane × ℝ) := + fun a => radiusTripleProjection a.2.1.1.1 a.2.1.1.2 a.2.1.2 + let f : α × DistinctRadiusPairs ι → Plane → Plane := + fun a x => p a (fun k => ρ a.1 k x) + let g : α × DistinctRadiusTriples ι → Plane → Plane × ℝ := + fun a x => q a (fun k => ρ a.1 k x) + have hf : ∀ a, ContDiff ℝ ∞ (f a) := fun a => + (p a).contDiff.comp (contDiff_pi.mpr (hρ a.1)) + have hg : ∀ a, ContDiff ℝ ∞ (g a) := fun a => + (q a).contDiff.comp (contDiff_pi.mpr (hρ a.1)) + obtain ⟨r,hr,hreg,hfinite,htriple⟩ := exists_generic_radius_parameters p + (fun a => radiusPairProjection_surjective a.2.2) q + (fun a => radiusTripleProjection_surjective a.2.2.1 a.2.2.2.1 a.2.2.2.2) + f hf (fun a => K a.1) (fun a => hK a.1) + g hg (fun a => K a.1) (fun a => hK a.1) U hU hne + have hpairEq (a : α) (i j : ι) (hij : i ≠ j) (x : Plane) : + f (a,⟨(i,j),hij⟩) x = p (a,⟨(i,j),hij⟩) r ↔ + ρ a i x = r i ∧ ρ a j x = r j := by + constructor + · intro he + exact ⟨congrArg (fun z : Plane => z 0) he,congrArg (fun z : Plane => z 1) he⟩ + · rintro ⟨hi,hj⟩ + apply (PiLp.continuousLinearEquiv 2 ℝ (fun _ : Fin 2 => ℝ)).injective + funext b + fin_cases b + · exact hi + · exact hj + refine ⟨r,hr,?_,?_,?_⟩ + · intro a i j hij x hx hi hj + exact hreg (a,⟨(i,j),hij⟩) x hx ((hpairEq a i j hij x).mpr ⟨hi,hj⟩) + · intro a i j hij + exact (hfinite (a,⟨(i,j),hij⟩)).subset (fun x hx => + ⟨hx.1,(hpairEq a i j hij x).mpr hx.2⟩) + · intro a i j k hij hik hjk x hx he + apply htriple (a,⟨((i,j),k),hij,hik,hjk⟩) x hx + apply Prod.ext + · exact (hpairEq a i j hij x).mpr ⟨he.1,he.2.1⟩ + · exact he.2.2 + +end ClosedSurfaceR4.PublishedInputs + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCurvePhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCurvePhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..a57f36a74dea9c97292610dba8d4530a94710bd3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericCurvePhases.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CurvePhaseCriticalValues + +namespace OAI + +/-! Generic linear parts of the convex quadratic phases have only +nondegenerate critical points on each prescribed regular boundary arc. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +local instance genericCurveVolumeHaar : (volume : Measure CurvePlane).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +lemma curvePhaseVelocity_swap (u v : ℝ → CurvePlane) (L t : ℝ) (ell : CurvePlane) : + curvePhaseVelocity (fun s => (u s).swap) (fun s => (v s).swap) L t ell.swap = + curvePhaseVelocity u v L t ell := by + dsimp [curvePhaseVelocity] + ring + +lemma curvePhaseAcceleration_swap (u v w : ℝ → CurvePlane) (L t : ℝ) (ell : CurvePlane) : + curvePhaseAcceleration (fun s => (u s).swap) (fun s => (v s).swap) + (fun s => (w s).swap) L t ell.swap = curvePhaseAcceleration u v w L t ell := by + dsimp [curvePhaseAcceleration] + ring + +theorem curve_phase_all_degenerate_parameters_null + (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 : ℝ) : + volume {ell : CurvePlane | ∃ t, v t ≠ 0 ∧ + curvePhaseVelocity u v L t ell = 0 ∧ curvePhaseAcceleration u v w L t ell = 0} = 0 := by + let B1 : Set CurvePlane := {ell | ∃ t, (v t).1 ≠ 0 ∧ + curvePhaseVelocity u v L t ell = 0 ∧ curvePhaseAcceleration u v w L t ell = 0} + let B2 : Set CurvePlane := {ell | ∃ t, (v t).2 ≠ 0 ∧ + curvePhaseVelocity (fun s => (u s).swap) (fun s => (v s).swap) L t ell = 0 ∧ + curvePhaseAcceleration (fun s => (u s).swap) (fun s => (v s).swap) + (fun s => (w s).swap) L t ell = 0} + have h1 : volume B1 = 0 := curve_phase_degenerate_parameters_null u v w hu hv hdu hdv L + have h2 : volume B2 = 0 := curve_phase_degenerate_parameters_null + (fun s => (u s).swap) (fun s => (v s).swap) (fun s => (w s).swap) + (hu.snd.prodMk hu.fst) (hv.snd.prodMk hv.fst) + (fun t => (ContinuousLinearEquiv.prodComm ℝ ℝ ℝ).toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt t (hdu t)) + (fun t => (ContinuousLinearEquiv.prodComm ℝ ℝ ℝ).toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt t (hdv t)) L + have hswap : Differentiable ℝ (Prod.swap : CurvePlane → CurvePlane) := + (ContinuousLinearEquiv.prodComm ℝ ℝ ℝ).differentiable + have himage : volume (Prod.swap '' B2) = 0 := + addHaar_image_eq_zero_of_differentiableOn_of_addHaar_eq_zero volume hswap.differentiableOn h2 + apply measure_mono_null _ (measure_union_null h1 himage) + rintro ell ⟨t,hv0,hcrit,hdeg⟩ + by_cases hfirst : (v t).1 = 0 + · right + have hsecond : (v t).2 ≠ 0 := by + intro he + apply hv0 + exact Prod.ext hfirst he + refine ⟨ell.swap,⟨t,hsecond,?_,?_⟩,Prod.swap_swap ell⟩ + · simpa only [curvePhaseVelocity_swap] using hcrit + · simpa only [curvePhaseAcceleration_swap] using hdeg + · left + exact ⟨t,hfirst,hcrit,hdeg⟩ + +/-- Countably many regular arcs can be handled in every prescribed open +set of phase parameters. -/ +theorem exists_nondegenerate_curve_phases {α : Type*} [Countable α] + (u v w : α → ℝ → CurvePlane) (hu : ∀ a, ContDiff ℝ ∞ (u a)) + (hv : ∀ a, ContDiff ℝ ∞ (v a)) + (hdu : ∀ a t, HasDerivAt (u a) (v a t) t) + (hdv : ∀ a t, HasDerivAt (v a) (w a t) t) (L : α → ℝ) + (U : Set CurvePlane) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ ell ∈ U, ∀ a t, v a t ≠ 0 → curvePhaseVelocity (u a) (v a) (L a) t ell = 0 → + curvePhaseAcceleration (u a) (v a) (w a) (L a) t ell ≠ 0 := by + let B : α → Set CurvePlane := fun a => {ell | ∃ t, v a t ≠ 0 ∧ + curvePhaseVelocity (u a) (v a) (L a) t ell = 0 ∧ + curvePhaseAcceleration (u a) (v a) (w a) (L a) t ell = 0} + have hb : volume (⋃ a, B a) = 0 := measure_iUnion_null (fun a => + curve_phase_all_degenerate_parameters_null (u a) (v a) (w a) (hu a) (hv a) (hdu a) (hdv a) (L a)) + have hdense : Dense (⋃ a, B a)ᶜ := Measure.dense_of_ae (μ := (volume : Measure CurvePlane)) + (by simpa only [ae_iff,mem_compl_iff,not_not,Set.ofPred_mem_eq] using hb) + obtain ⟨ell,hell,hellB⟩ := hdense.inter_open_nonempty U hU hne + refine ⟨ell,hell,?_⟩ + intro a t ht hc hz + exact hellB (mem_iUnion.mpr ⟨a,t,ht,hc,hz⟩) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericIndependentPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericIndependentPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b38ebc316a2b1b53d21500cce81bce608093679 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericIndependentPhases.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentPhaseProjections +import OAI.Geometry.SurfaceImmersion.Atlas.CompactCurvePhaseParameters +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteCriticalQuadraticPhases + +namespace OAI + +/-! One finite phase family simultaneously has nondegenerate boundary +critical points and the required independent crossing covectors. All +parameters can be chosen in an arbitrarily prescribed open neighborhood. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +variable {ι α κ : Type*} [Fintype ι] [DecidableEq ι] [Countable α] [Countable κ] + +theorem exists_generic_independent_phases + (index : α → ι) (u : α → ℝ → CurvePlane) (hu : ∀ a, ContDiff ℝ ∞ (u a)) + (K : α → Set ℝ) (hK : ∀ a, IsCompact (K a)) + (hregular : ∀ a t, t ∈ K a → deriv (u a) t ≠ 0) (L : α → ℝ) + (first second : κ → ι) (hdistinct : ∀ k, first k ≠ second k) + (offset₁ offset₂ : κ → CurvePlane) + (U : Set (ι → CurvePlane)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ ell ∈ U, + (∀ a, (K a ∩ {t | deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s)) t = 0}).Finite) ∧ + (∀ a t, t ∈ K a → deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s)) t = 0 → + deriv (deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s))) t ≠ 0) ∧ + (∀ k, covectorDet (ell (first k)+offset₁ k) (ell (second k)+offset₂ k) ≠ 0) := by + let v := fun a => deriv (u a) + let w := fun a => deriv (v a) + have hv : ∀ a, ContDiff ℝ ∞ (v a) := fun a => (contDiff_infty_iff_deriv.mp (hu a)).2 + have hw : ∀ a, ContDiff ℝ ∞ (w a) := fun a => (contDiff_infty_iff_deriv.mp (hv a)).2 + have hdu : ∀ a t, HasDerivAt (u a) (v a t) t := fun a t => + ((hu a).differentiable (by simp) t).hasDerivAt + have hdv : ∀ a t, HasDerivAt (v a) (w a t) t := fun a t => + ((hv a).differentiable (by simp) t).hasDerivAt + let O : Sum α κ → Set (ι → CurvePlane) + | .inl a => (fun ell => ell (index a)) ⁻¹' + goodCompactCurvePhases (u a) (v a) (w a) (L a) (K a) + | .inr k => {ell | covectorDet (ell (first k)+offset₁ k) (ell (second k)+offset₂ k) ≠ 0} + have ho : ∀ s, IsOpen (O s) := by + intro s + cases s with + | inl a => + exact (goodCompactCurvePhases_open (u a) (v a) (w a) (L a) + (hu a).continuous (hv a).continuous (hw a).continuous (hK a)).preimage + (show Continuous (fun ell : ι → CurvePlane => ell (index a)) from continuous_apply (index a)) + | inr k => + exact (independent_covectorDet_open_dense (hdistinct k) (offset₁ k) (offset₂ k)).1 + have hd : ∀ s, Dense (O s) := by + intro s + cases s with + | inl a => + exact (goodCompactCurvePhases_dense (u a) (v a) (w a) (L a) + (hu a) (hv a) (hdu a) (hdv a) (K a) (hregular a)).preimage + ((ContinuousLinearMap.proj (index a) : (ι → CurvePlane) →L[ℝ] CurvePlane).isOpenMap + (phaseProjection_surjective (index a))) + | inr k => + exact (independent_covectorDet_open_dense (hdistinct k) (offset₁ k) (offset₂ k)).2 + obtain ⟨ell,hell,he⟩ := (dense_iInter_of_isOpen ho hd).inter_open_nonempty U hU hne + have hn (a : α) : ∀ t ∈ K a, curvePhaseVelocity (u a) (v a) (L a) t (ell (index a)) = 0 → + curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a)) ≠ 0 := + mem_iInter.mp he (Sum.inl a) + have hfirst (a : α) := quadraticPhaseAlongCurve_deriv (u a) (hu a) (ell (index a)) (L a) + have hsecond (a : α) : deriv (deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s))) = + fun t => curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a)) := by + rw [hfirst] + funext t + exact (curvePhaseVelocity_hasDerivAt (L := L a) (ell := ell (index a)) + (hdu a t) (hdv a t)).deriv + refine ⟨ell,hell,?_,?_,?_⟩ + · intro a + rw [hfirst] + exact finite_compact_simple_zeros + (df := fun t => curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a))) + (by + have huc := (hu a).continuous + have hvc : Continuous (deriv (u a)) := (hv a).continuous + dsimp [curvePhaseVelocity] + fun_prop) (hK a) + (fun t _ => curvePhaseVelocity_hasDerivAt (hdu a t) (hdv a t)) (hn a) + · intro a t ht hc + rw [hsecond] + apply hn a t ht + simpa only [hfirst] using hc + · intro k + exact mem_iInter.mp he (Sum.inr k) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericPulledPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericPulledPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..3d384ac43b9a5d3affd09f7e86e0ec57e24bef92 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GenericPulledPhases.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CovectorPullbackParameters +import OAI.Geometry.SurfaceImmersion.Atlas.CompactCurvePhaseParameters +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteCriticalQuadraticPhases + +namespace OAI + +/-! Generic phase selection after the actual invertible chart pullbacks. +The two phase covectors at each crossing are expressed in one tangent chart +before testing their determinant. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +variable {ι α κ : Type*} [Fintype ι] [DecidableEq ι] [Countable α] [Countable κ] + +theorem exists_generic_pulled_phases + (index : α → ι) (u : α → ℝ → CurvePlane) (hu : ∀ a, ContDiff ℝ ∞ (u a)) + (K : α → Set ℝ) (hK : ∀ a, IsCompact (K a)) + (hregular : ∀ a t, t ∈ K a → deriv (u a) t ≠ 0) (L : α → ℝ) + (first second : κ → ι) (hdistinct : ∀ k, first k ≠ second k) + (A B : κ → CurvePlane →L[ℝ] CurvePlane) + (hA : ∀ k, RealModes.coordDet (A k) ≠ 0) (hB : ∀ k, RealModes.coordDet (B k) ≠ 0) + (offset₁ offset₂ : κ → CurvePlane) + (U : Set (ι → CurvePlane)) (hU : IsOpen U) (hne : U.Nonempty) : + ∃ ell ∈ U, + (∀ a, (K a ∩ {t | deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s)) t = 0}).Finite) ∧ + (∀ a t, t ∈ K a → deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s)) t = 0 → + deriv (deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s))) t ≠ 0) ∧ + (∀ k, covectorDet (RealModes.pullCovector (A k) (ell (first k)+offset₁ k)) + (RealModes.pullCovector (B k) (ell (second k)+offset₂ k)) ≠ 0) := by + let v := fun a => deriv (u a) + let w := fun a => deriv (v a) + have hv : ∀ a, ContDiff ℝ ∞ (v a) := fun a => (contDiff_infty_iff_deriv.mp (hu a)).2 + have hw : ∀ a, ContDiff ℝ ∞ (w a) := fun a => (contDiff_infty_iff_deriv.mp (hv a)).2 + have hdu : ∀ a t, HasDerivAt (u a) (v a t) t := fun a t => + ((hu a).differentiable (by simp) t).hasDerivAt + have hdv : ∀ a t, HasDerivAt (v a) (w a t) t := fun a t => + ((hv a).differentiable (by simp) t).hasDerivAt + let O : Sum α κ → Set (ι → CurvePlane) + | .inl a => (fun ell => ell (index a)) ⁻¹' + goodCompactCurvePhases (u a) (v a) (w a) (L a) (K a) + | .inr k => {ell | covectorDet (RealModes.pullCovector (A k) (ell (first k)+offset₁ k)) + (RealModes.pullCovector (B k) (ell (second k)+offset₂ k)) ≠ 0} + have ho : ∀ s, IsOpen (O s) := by + intro s + cases s with + | inl a => + exact (goodCompactCurvePhases_open (u a) (v a) (w a) (L a) + (hu a).continuous (hv a).continuous (hw a).continuous (hK a)).preimage + (show Continuous (fun ell : ι → CurvePlane => ell (index a)) from continuous_apply (index a)) + | inr k => + exact (independent_pulled_covectors_open_dense (hdistinct k) (A k) (B k) + (hA k) (hB k) (offset₁ k) (offset₂ k)).1 + have hd : ∀ s, Dense (O s) := by + intro s + cases s with + | inl a => + exact (goodCompactCurvePhases_dense (u a) (v a) (w a) (L a) + (hu a) (hv a) (hdu a) (hdv a) (K a) (hregular a)).preimage + ((ContinuousLinearMap.proj (index a) : (ι → CurvePlane) →L[ℝ] CurvePlane).isOpenMap + (phaseProjection_surjective (index a))) + | inr k => + exact (independent_pulled_covectors_open_dense (hdistinct k) (A k) (B k) + (hA k) (hB k) (offset₁ k) (offset₂ k)).2 + obtain ⟨ell,hell,he⟩ := (dense_iInter_of_isOpen ho hd).inter_open_nonempty U hU hne + have hn (a : α) : ∀ t ∈ K a, curvePhaseVelocity (u a) (v a) (L a) t (ell (index a)) = 0 → + curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a)) ≠ 0 := + mem_iInter.mp he (Sum.inl a) + have hfirst (a : α) := quadraticPhaseAlongCurve_deriv (u a) (hu a) (ell (index a)) (L a) + have hsecond (a : α) : deriv (deriv (fun s => + convexQuadraticPhase (ell (index a)) (L a) (u a s))) = + fun t => curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a)) := by + rw [hfirst] + funext t + exact (curvePhaseVelocity_hasDerivAt (L := L a) (ell := ell (index a)) + (hdu a t) (hdv a t)).deriv + refine ⟨ell,hell,?_,?_,?_⟩ + · intro a + rw [hfirst] + exact finite_compact_simple_zeros + (df := fun t => curvePhaseAcceleration (u a) (v a) (w a) (L a) t (ell (index a))) + (by + have huc := (hu a).continuous + have hvc : Continuous (deriv (u a)) := (hv a).continuous + dsimp [curvePhaseVelocity] + fun_prop) (hK a) + (fun t _ => curvePhaseVelocity_hasDerivAt (hdu a t) (hdv a t)) (hn a) + · intro a t ht hc + rw [hsecond] + apply hn a t ht + simpa only [hfirst] using hc + · intro k + exact mem_iInter.mp he (Sum.inr k) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GeometricAtlasSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GeometricAtlasSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..fe45739278bfb0e90560a6467d060c3b2e92f2e7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GeometricAtlasSmallIncrement.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FixedAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.GeometricAtlasAdjustedMean + +namespace OAI + +/-! The finite mean iteration supplies the actual unperturbed small increment. -/ +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 geometricSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance geometricSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance geometricSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance geometricSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance geometricSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance geometricSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem geometric_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))) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 r₁ ρ R (A.tensorPlaneRead i reference)) + (hG₀ : ∀ i, (d₀ i).G = A.jetChartMap i F) + (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)) + (hcut₀ : ∀ 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) + (hform₀ : ∀ 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) + (hsup₀ : ∀ i j, tsupport (A.planeWeight i) ⊆ ((d₀ i).solver j).e.source) + (hK₀ : ∀ i j, (modeSupport ((d₀ i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (c₀ : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) + (A.globalQuadraticPhase (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) k l) + (A.quadraticOverlapCompact (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) 1 1) + (I : A.centers → RealModes.QuadraticLabel (A.centers × Fin 3) → ℕ → ℝ) + (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) + (q : ℕ) : + ∃ r : ℝ, 0 < r ∧ ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (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) → + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → (∀ m, A.TensorWeightedBound s m (C m) H) → + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ ∃ B T : ℕ → ℝ, + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ 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 (F+X) - inducedTensor F - δ^2 • H)) := by + obtain ⟨r,D₀,hr,hD₀,p,β,κ,hmean⟩ := A.geometric_atlas_adjusted_mean + (fun i j => (d₀ i).solver j) hr₁ hρ reference href (fun i j => (d₀ i).data j) + Q w hw hphase₀ hcut₀ hform₀ hsup₀ q + refine ⟨r,hr,?_⟩ + intro s hs hs1 H hH hsym hnear C hC hbC + 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,hB,hT,hsmall⟩ := A.fixed_atlas_small_increment F hF p hρ + (fun _ => D₀*r) (fun _ => r₁) (fun i => A.tensorPlaneRead i reference) + d₀ c₀ I hI hi Cu E hCu hE q + obtain ⟨η₀,hη₀,hη₁,hbuild⟩ := hmean s hs hs1 H hH hsym hnear C hC hbC q + refine ⟨η₀,hη₀,hη₁,B,T,hB,hT,?_⟩ + intro τ δ hτ hτs hη hδ hδτ + obtain ⟨d,hfit,hgeom,htrial⟩ := hbuild 0 τ hτ hτs (le_refl 0) (by norm_num) + (by simpa only [zero_div,add_zero] using hη) + obtain ⟨u,hu,_,_,hball,hsize,herror⟩ := htrial δ hδ q le_rfl + have hK (i j) : (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + rw [(hgeom i).2.2] + exact hK₀ i j + 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 d hfit (fun i => (hgeom i).2.1) + (fun i => (hgeom i).1.trans (hG₀ i)) hτ hs hτs hs1 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/Atlas/GlobalPhaseGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GlobalPhaseGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..5547acfd9a55cc39489fffbfe40c1b65f517b3f9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GlobalPhaseGerms.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformNearbyAtlasSmallIncrement +import OAI.Geometry.Immersion.ClosedSurface.PhaseDifferentials + +namespace OAI + +/-! On intersecting weight supports, restored global linear phases have +the same germs and covectors as the actual manifold coordinate phases. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +open JetPolynomial (planeCoordinateIsometry) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma linearAtlasPhase_eventually (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) + (houter : ∀ x ∈ tsupport (A.weight a.1), A.outer a.1 =ᶠ[𝓝 x] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight a.1)) : + A.linearAtlasPhase Q w a =ᶠ[𝓝 p] + atlasPhase (a.1 : M) (w a.1 a.2 • (Q a.1).ξ a.2) := by + filter_upwards [houter p hp, + (chart (a.1 : M)).open_source.mem_nhds (A.weight_support a.1 hp)] with x ho hx + rw [linearAtlasPhase, restore, indicator_of_mem hx, ho, one_smul] + rfl + +lemma vectorPlaneRead_eventually_comp_coordinateInverse + {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + (F : M → V) (k : A.centers) + (houter : ∀ x ∈ tsupport (A.weight k), A.outer k =ᶠ[𝓝 x] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight k)) : + A.vectorPlaneRead k F =ᶠ[𝓝 (coordinateChart (k : M) p)] + F ∘ (coordinateChart (k : M)).symm := by + let x := planeCoordinateIsometry (chart (k : M) p) + let inv : SmallModes.Base → M := fun z => (chart (k : M)).symm (planeCoordinateIsometry.symm z) + have hpS := A.weight_support k hp + have hinv : inv x = p := by + dsimp [inv,x] + rw [LinearIsometryEquiv.symm_apply_apply,(chart (k : M)).left_inv hpS] + have hc : ContinuousAt inv x := by + apply ContinuousAt.comp + · apply (chart (k : M)).continuousAt_symm + simpa only [x,LinearIsometryEquiv.symm_apply_apply] using (chart (k : M)).map_source hpS + · exact planeCoordinateIsometry.symm.continuous.continuousAt + have ht : Tendsto inv (𝓝 x) (𝓝 p) := by simpa only [ContinuousAt,hinv] using hc + have ho : ∀ᶠ z in 𝓝 x, A.outer k (inv z) = 1 := (houter p hp).comp_tendsto ht + have htarget : ∀ᶠ z in 𝓝 x, + planeCoordinateIsometry.symm z ∈ (chart (k : M)).target := + ((chart (k : M)).open_target.preimage planeCoordinateIsometry.symm.continuous).mem_nhds + (by simpa only [Set.mem_preimage,x,LinearIsometryEquiv.symm_apply_apply] using + (chart (k : M)).map_source hpS) + change ∀ᶠ z in 𝓝 x, A.vectorPlaneRead k F z = F ((coordinateChart (k : M)).symm z) + filter_upwards [ho,htarget] with z hz htgt + change localize (k : M) (A.outer k) F (planeCoordinateIsometry.symm z) = _ + rw [localize,indicator_of_mem htgt] + change A.outer k (inv z)^2 • F (inv z) = _ + rw [hz,one_pow,one_smul] + rfl + +/-- Both the original phase and its reading in another chart agree as +germs where the two actual compact supports meet. -/ +lemma linearAtlasPhase_read_eventually (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) (k : A.centers) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + {p : M} (hpa : p ∈ tsupport (A.weight a.1)) (hpk : p ∈ tsupport (A.weight k)) : + A.vectorPlaneRead k (A.linearAtlasPhase Q w a) =ᶠ[𝓝 (coordinateChart (k : M) p)] + atlasPhase (a.1 : M) (w a.1 a.2 • (Q a.1).ξ a.2) ∘ (coordinateChart (k : M)).symm := by + have hpK : p ∈ (coordinateChart (k : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support k hpk + have hc := (coordinateChart (k : M)).continuousAt_symm + ((coordinateChart (k : M)).map_source hpK) + have ht : Tendsto (coordinateChart (k : M)).symm + (𝓝 (coordinateChart (k : M) p)) (𝓝 p) := by + simpa only [ContinuousAt,(coordinateChart (k : M)).left_inv hpK] using hc + exact (A.vectorPlaneRead_eventually_comp_coordinateInverse + (A.linearAtlasPhase Q w a) k (houter k) hpk).trans + ((A.linearAtlasPhase_eventually Q w a (houter a.1) hpa).comp_tendsto ht) + +lemma linearAtlasPhase_read_phaseDerivative (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) (k : A.centers) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + {p : M} (hpa : p ∈ tsupport (A.weight a.1)) (hpk : p ∈ tsupport (A.weight k)) : + phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) (coordinateChart (k : M) p) = + w a.1 a.2 • atlasPhaseCovector (a.1 : M) (k : M) ((Q a.1).ξ a.2) p := by + have he := A.linearAtlasPhase_read_eventually Q w a k houter hpa hpk + have hd : phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) + (coordinateChart (k : M) p) = + phaseDerivative (atlasPhase (a.1 : M) (w a.1 a.2 • (Q a.1).ξ a.2) ∘ + (coordinateChart (k : M)).symm) (coordinateChart (k : M) p) := by + unfold phaseDerivative + rw [he.fderiv_eq (𝕜 := ℝ)] + rw [hd] + have hpK : p ∈ (coordinateChart (k : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support k hpk + have hpA : p ∈ (coordinateChart (a.1 : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support a.1 hpa + have hscale : atlasPhase (a.1 : M) (w a.1 a.2 • (Q a.1).ξ a.2) = + w a.1 a.2 • atlasPhase (a.1 : M) ((Q a.1).ξ a.2) := by + funext x + simp only [atlasPhase,Function.comp_apply,phaseLinear_apply, + Prod.smul_fst,Prod.smul_snd,smul_eq_mul,Pi.smul_apply] + ring + rw [hscale] + change phaseDerivative (w a.1 a.2 • + (atlasPhase (a.1 : M) ((Q a.1).ξ a.2) ∘ (coordinateChart (k : M)).symm)) + (coordinateChart (k : M) p) = _ + exact phaseDerivative_const_smul + (atlasPhase_in_chart_differentiable (a.1 : M) (k : M) ((Q a.1).ξ a.2) hpK hpA) _ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseC2Stability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseC2Stability.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a4123b9e0e369956a166b16626f736685ccab8a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseC2Stability.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseStability + +namespace OAI + +/-! The good-phase stability radius uses only the ordinary C2 difference. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry WeightedEstimates + +lemma coordDeriv_sub_smooth {F G : RField 4} (hF : ContDiff ℝ ∞ F) + (hG : ContDiff ℝ ∞ G) (v : Base) : + coordDeriv v (F-G) = coordDeriv v F - coordDeriv v G := by + funext p + simp only [coordDeriv, fderiv_sub (hF.differentiable (by simp) p) + (hG.differentiable (by simp) p), sub_apply, Pi.sub_apply] + +lemma realTwoJet_sub {F G : RField 4} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + realTwoJet (F-G) = realTwoJet F - realTwoJet G := by + have hx := coordDeriv_sub_smooth hF hG dx + have hy := coordDeriv_sub_smooth hF hG dy + have hxx := coordDeriv_sub_smooth (contDiff_real_coordDeriv hF dx) + (contDiff_real_coordDeriv hG dx) dx + have hxy := coordDeriv_sub_smooth (contDiff_real_coordDeriv hF dy) + (contDiff_real_coordDeriv hG dy) dx + have hyy := coordDeriv_sub_smooth (contDiff_real_coordDeriv hF dy) + (contDiff_real_coordDeriv hG dy) dy + funext p i + fin_cases i <;> simp [realTwoJet,hx,hy,hxx,hxy,hyy] + +lemma norm_realTwoJet_le {F : RField 4} (hF : ContDiff ℝ ∞ F) {C : ℝ} (hC : 0 ≤ C) + (hb : WeightedBound univ 1 2 C F) (p : Base) : ‖realTwoJet F p‖ ≤ C := by + have h1 (v : Base) (hv : ‖v‖ = 1) : WeightedBound univ 1 1 C (coordDeriv v F) := by + change WeightedBound univ 1 1 C (fun x => fderiv ℝ F x v) + simpa only [hv,div_one,one_mul] using hb.directional isOpen_univ zero_lt_one hF.contDiffOn v + have h2 (v w : Base) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) : + ‖coordDeriv v (coordDeriv w F) p‖ ≤ C := by + have hd := (h1 w hw).directional isOpen_univ zero_lt_one + (contDiff_real_coordDeriv hF w).contDiffOn v + simpa only [coordDeriv,hv,div_one,one_mul] using hd.norm_le (mem_univ p) + 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 (h1 dx hx).norm_le (mem_univ p) + · exact (h1 dy hy).norm_le (mem_univ p) + · exact h2 dx dx hx hx + · exact h2 dx dy hx hy + · exact h2 dy dy hy hy + +theorem compact_good_phase_C2_stability {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : TopologicalSpace.Compacts Base) + (hImm : ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ (K : Set Base), Good (realSecondTensor F p) (phaseDerivative φ p)) : + ∃ ε : ℝ, 0 < ε ∧ ∀ (G : RField 4), ContDiff ℝ ∞ G → + ∀ C : ℝ, 0 ≤ C → C < ε → WeightedBound univ 1 2 C (G-F) → + ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ G p) ∧ + Good (realSecondTensor G p) (phaseDerivative φ p) := by + obtain ⟨ε,hε,he⟩ := compact_good_phase_stability hF hφ K hImm hgood + refine ⟨ε,hε,?_⟩ + intro G hG C hC hCε hb + apply he G + intro p _ + have hp := norm_realTwoJet_le (hG.sub hF) hC hb p + change ‖realTwoJet (G-F) p‖ ≤ C at hp + rw [realTwoJet_sub hG hF] at hp + exact hp.trans_lt hCε + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..93beaa8c896ea42e22b4bc8932971f592b072d76 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseCover.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseNeighborhood + +namespace OAI + +/-! Finite good phase charts covering the compact support of a correction. -/ +noncomputable section +open Set Filter TopologicalSpace +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +/-- All geometric data of one compactly bounded local phase chart. -/ +structure GoodPhaseChart (F : RField 4) (φ : Base → ℝ) where + chart : OpenPartialHomeomorph Base Base + phase : ∀ x, (chart x).1 = φ x + smooth : ContDiff ℝ ∞ chart + smoothInverse : ContDiff ℝ ∞ chart.symm + sourceCompact : Compacts Base + targetCompact : Compacts Base + domain : Set Base + sourceBound : chart.source ⊆ sourceCompact + targetBound : chart.target ⊆ targetCompact + targetInside : (targetCompact : Set Base) ⊆ domain + good : RealModeDomain (F ∘ chart.symm) domain + +theorem exists_goodPhaseChart {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) {p : Base} + (hImm : Function.Injective (fderiv ℝ F p)) + (hgood : Good (realSecondTensor F p) (phaseDerivative φ p)) : + ∃ c : GoodPhaseChart F φ, p ∈ c.chart.source := by + obtain ⟨d,KE,KV,Ω,hp,hphase,he,hi,hKE,hKV,hsource,htarget,hinside,hdom⟩ := + exists_good_phase_neighborhood hF hφ hImm hgood + exact ⟨⟨d,hphase,he,hi,⟨KE,hKE⟩,⟨KV,hKV⟩,Ω,hsource,htarget,hinside,hdom⟩,hp⟩ + +/-- No global coordinate chart for a mixed phase is assumed: finitely many +actual local phase charts cover its compact support. -/ +theorem finite_good_phase_cover {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) + (hImm : ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ (K : Set Base), Good (realSecondTensor F p) (phaseDerivative φ p)) : + ∃ (t : Finset K) (c : t → GoodPhaseChart F φ), + (K : Set Base) ⊆ ⋃ i : t, (c i).chart.source := by + classical + choose c hc using fun p : K => exists_goodPhaseChart hF hφ (hImm p p.property) (hgood p p.property) + have hcover : (K : Set Base) ⊆ ⋃ p : K, (c p).chart.source := by + intro p hp + exact mem_iUnion.mpr ⟨⟨p,hp⟩,hc ⟨p,hp⟩⟩ + obtain ⟨t,ht⟩ := K.isCompact.elim_finite_subcover (fun p : K => (c p).chart.source) + (fun p => (c p).chart.open_source) hcover + refine ⟨t,fun i => c i.val,?_⟩ + intro p hp + obtain ⟨i,hit,hi⟩ := mem_iUnion₂.mp (ht hp) + exact mem_iUnion.mpr ⟨⟨i,hit⟩,hi⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..eec4f0cb0cbe355e66690f8fa98233f385899060 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseNeighborhood.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartGeometry + +namespace OAI + +/-! Compactly contained local domains for actual noncritical good phases. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma continuous_phaseDerivative {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) : + Continuous (phaseDerivative φ) := by + exact ((hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous.prodMk + ((hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).continuous + +/-- A good phase at an immersed point has an actual smaller phase chart with +compact source and target bounds inside a larger good-mode domain. -/ +theorem exists_good_phase_neighborhood {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) {p : Base} + (hImm : Function.Injective (fderiv ℝ F p)) + (hgood : Good (realSecondTensor F p) (phaseDerivative φ p)) : + ∃ (d : OpenPartialHomeomorph Base Base) (KE KV Ω : Set Base), + p ∈ d.source ∧ (∀ x, (d x).1 = φ x) ∧ + ContDiff ℝ ∞ d ∧ ContDiff ℝ ∞ d.symm ∧ + IsCompact KE ∧ IsCompact KV ∧ d.source ⊆ KE ∧ d.target ⊆ KV ∧ KV ⊆ Ω ∧ + RealModeDomain (F ∘ d.symm) Ω := by + have hD := gramDet_ne_zero_of_injective (fderiv ℝ F p) hImm + have hde : ∀ᶠ x in 𝓝 p, + NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0 := + (continuous_gramDet_field hF).continuousAt.eventually_ne hD + have hge := good_eventually (contDiffAt_realSecondTensor hF p hD).continuousAt + (continuous_phaseDerivative hφ).continuousAt hgood + obtain ⟨U,hUs,hU,hpU⟩ := mem_nhds_iff.mp (hde.and hge) + obtain ⟨e₀,hep,hphase,he₀,hi₀⟩ := exists_extended_phase_chart hφ hgood.1 + let e := e₀.restrOpen U hU + have hep' : p ∈ e.source := ⟨hep,hpU⟩ + have he : ContDiff ℝ ∞ e := he₀ + have hi : ContDiff ℝ ∞ e.symm := hi₀ + have hdom : RealModeDomain (F ∘ e.symm) e.target := + realModeDomain_smooth_phase_chart hF hφ e he hi hphase + (fun x hx => injective_of_gramDet_ne_zero _ (hUs hx.2).1) + (fun x hx => (hUs hx.2).2) + obtain ⟨r,hr,hball⟩ := Metric.isOpen_iff.mp e.open_source p hep' + let V := Metric.ball p (r/2) + let KE := Metric.closedBall p (r/2) + have hKE : IsCompact KE := isCompact_closedBall p (r/2) + have hKEe : KE ⊆ e.source := + (Metric.closedBall_subset_ball (by linarith : r/2 < r)).trans hball + let d := e.restrOpen V Metric.isOpen_ball + let KV := e '' KE + have hKV : IsCompact KV := hKE.image he.continuous + refine ⟨d,KE,KV,e.target,?_,hphase,he,hi,hKE,hKV,?_,?_,?_,hdom⟩ + · exact ⟨hep',Metric.mem_ball_self (by linarith)⟩ + · intro x hx + exact Metric.ball_subset_closedBall hx.2 + · intro y hy + refine ⟨d.symm y,?_,?_⟩ + · exact Metric.ball_subset_closedBall (d.map_target hy).2 + · exact d.right_inv hy + · rintro y ⟨x,hx,rfl⟩ + exact e.map_source (hKEe hx) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6bd420219ca870216d36a5e6f93b3c997e7184f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseSolver.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseCover +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver + +namespace OAI + +/-! Actual unit-scale linear metric solvers on the constructed good phase charts. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation + +/-- Every compact target supported in a constructed good chart has the actual +unperturbed solver data required by the finite cancellation theorem. -/ +theorem GoodPhaseChart.exists_unperturbed_solver + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (c : GoodPhaseChart (G ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) + (hK : (modeSupport K : Set SmallModes.Base) ⊆ c.chart.source) : + ∃ d : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K 1 1, + d.e = c.chart ∧ (∀ m, d.D m = 0) := + geometric_unperturbed_solver hG K hφ c.chart c.smooth c.smoothInverse hK + (fun x _ => c.phase x) c.sourceCompact.isCompact c.targetCompact.isCompact + c.sourceBound c.targetBound c.targetInside c.good + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..f7a0aeddc85985d0133a4b6ceddd0641766d053c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseStability.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseNeighborhood +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! A compact good-phase condition persists under a uniform two-jet perturbation. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry + +def secondTensorFromJet (J : RealTwoJet) : Fin 3 → RVec 4 := + ![realNormalPart (J 0) (J 1) (J 2), realNormalPart (J 0) (J 1) (J 3), + realNormalPart (J 0) (J 1) (J 4)] + +@[simp] lemma secondTensorFromJet_realTwoJet (F : RField 4) (p : Base) : + secondTensorFromJet (realTwoJet F p) = realSecondTensor F p := rfl + +lemma contDiffAt_secondTensorFromJet {J : RealTwoJet} + (hJ : NormalFrame.gramDet (J 0) (J 1) ≠ 0) : + ContDiffAt ℝ ∞ secondTensorFromJet J := by + have hslot (i : Fin 5) : ContDiffAt ℝ ∞ (fun K : RealTwoJet => K i) J := + (ContinuousLinearMap.proj i : RealTwoJet →L[ℝ] RVec 4).contDiff.contDiffAt + apply contDiffAt_pi.mpr + intro i + fin_cases i + · exact contDiffAt_realNormalPart (hslot 0) (hslot 1) (hslot 2) hJ + · exact contDiffAt_realNormalPart (hslot 0) (hslot 1) (hslot 3) hJ + · exact contDiffAt_realNormalPart (hslot 0) (hslot 1) (hslot 4) hJ + +def goodJetPhase : Set (RealTwoJet × Base) := + {z | NormalFrame.gramDet (z.1 0) (z.1 1) ≠ 0 ∧ Good (secondTensorFromJet z.1) z.2} + +lemma isOpen_goodJetPhase : IsOpen goodJetPhase := by + apply isOpen_iff_mem_nhds.mpr + intro z hz + have hd : Continuous (fun w : RealTwoJet × Base => + NormalFrame.gramDet (w.1 0) (w.1 1)) := by + unfold NormalFrame.gramDet dotProduct + fun_prop + have hb : ContinuousAt (fun w : RealTwoJet × Base => secondTensorFromJet w.1) z := + (contDiffAt_secondTensorFromJet hz.1).continuousAt.comp continuous_fst.continuousAt + exact (hd.continuousAt.eventually_ne hz.1).and + (good_eventually hb continuous_snd.continuousAt hz.2) + +/-- The radius depends on the fixed immersion, phase and compact set, and is +independent of all higher derivatives of the perturbed map. -/ +theorem compact_good_phase_stability {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : TopologicalSpace.Compacts Base) + (hImm : ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ (K : Set Base), Good (realSecondTensor F p) (phaseDerivative φ p)) : + ∃ ε : ℝ, 0 < ε ∧ ∀ G : RField 4, + (∀ p ∈ (K : Set Base), ‖realTwoJet G p - realTwoJet F p‖ < ε) → + ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ G p) ∧ + Good (realSecondTensor G p) (phaseDerivative φ p) := by + let J : Base → RealTwoJet × Base := fun p => (realTwoJet F p,phaseDerivative φ p) + have hJ : Continuous J := (contDiff_realTwoJet hF).continuous.prodMk (continuous_phaseDerivative hφ) + have hc : IsCompact (J '' (K : Set Base)) := K.isCompact.image hJ + have hj : J '' (K : Set Base) ⊆ goodJetPhase := by + rintro _ ⟨p,hp,rfl⟩ + exact ⟨gramDet_ne_zero_of_injective _ (hImm p hp),hgood p hp⟩ + obtain ⟨ε,hε,he⟩ := hc.exists_thickening_subset_open isOpen_goodJetPhase hj + refine ⟨ε,hε,?_⟩ + intro G hGF p hp + have hdist : dist (realTwoJet G p,phaseDerivative φ p) (J p) < ε := by + dsimp only [J] + rw [Prod.dist_eq,dist_self,max_eq_left (dist_nonneg)] + simpa only [dist_eq_norm] using hGF p hp + have hmem : (realTwoJet G p,phaseDerivative φ p) ∈ goodJetPhase := + he (Metric.mem_thickening_iff.mpr ⟨J p,mem_image_of_mem J hp,hdist⟩) + exact ⟨injective_of_gramDet_ne_zero _ hmem.1,hmem.2⟩ + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseTargetSplit.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseTargetSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e078e17bff31bbf334427ff61f17548113085ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodPhaseTargetSplit.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseCover +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSupportedTarget + +namespace OAI + +/-! Split an actual compact target into geometrically admissible phase pieces. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes +open JetPolynomial (SupportedField) +open PhaseMean (ComplexTensor) + +/-- Every supported target with a good phase on its support admits a finite +exact decomposition into targets for actual compactly bounded good charts. -/ +theorem split_target_into_good_phase_charts {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) + (hImm : ∀ p ∈ (K : Set Base), Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ (K : Set Base), Good (realSecondTensor F p) (phaseDerivative φ p)) + (A : SupportedField (F := ComplexTensor) K) : + ∃ (t : Finset K) (c : t → GoodPhaseChart F φ) (L : t → Compacts Base) + (B : (i : t) → SupportedField (F := ComplexTensor) (L i)), + (∀ i, (L i : Set Base) ⊆ K) ∧ + (∀ i, (L i : Set Base) ⊆ (c i).chart.source) ∧ + (∀ x, ∑ i, B i x = A x) := by + classical + obtain ⟨t,c,hcover⟩ := finite_good_phase_cover hF hφ K hImm hgood + obtain ⟨L,B,hLK,hLB,hsum⟩ := PhasePartitions.exists_split_supported_complex_target + K (fun i : t => (c i).chart.source) (fun i => (c i).chart.open_source) hcover A + exact ⟨t,c,L,B,hLK,hLB,hsum⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodQuadraticAtlasPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodQuadraticAtlasPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf2b931fa0e83b25589703db5418436cab700e3e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GoodQuadraticAtlasPhases.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasCompactPhaseWeights +import OAI.Geometry.SurfaceImmersion.Atlas.ActualPhaseGoodness +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedAtlasPhases + +namespace OAI + +/-! The actual restored global phases have good quadratic interactions. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- A single choice of positive frequencies makes every actual quadratic +phase good on the compact support where its amplitude can be nonzero. -/ +theorem exists_good_quadratic_atlas_phases {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (Q : A.centers → PhaseBasis) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hpure : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) : + ∃ w : A.centers → Fin 3 → ℝ, (∀ i j, 0 < w i j) ∧ + ∀ 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) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x) := by + classical + let φ := A.linearAtlasPhase Q (fun _ _ => 1) + have hφ (a : A.centers × Fin 3) : ContMDiff planeModel 𝓘(ℝ) ∞ (φ a) := + A.linearAtlasPhase_smooth Q (fun _ _ => 1) a + have hpoint (k : A.centers) (p : M) (hp : p ∈ tsupport (A.weight k)) : + coordinateChart (k : M) p ∈ (modeSupport (A.chartWeightCompact k) : Set SmallModes.Base) := + ⟨chart (k : M) p,⟨p,hp,rfl⟩,rfl⟩ + obtain ⟨v,hv,hpairs⟩ := A.exists_overlap_phase_weights hF φ hφ + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) (fun _ => isClosed_tsupport _) + (fun k p hp => hImm k _ (hpoint k p hp)) + (fun k a p hpk hpa => A.linearAtlasPhase_unit_read_good hF Q houter hImm hpure a k hpa hpk) + let w : A.centers → Fin 3 → ℝ := fun i j => v (i,j) + refine ⟨w,fun i j => hv (i,j),?_⟩ + intro k l x hx + change x ∈ planeCoordinateIsometry '' ((chart (k : M)) '' + (tsupport (A.weight k) ∩ globalQuadraticSupport + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) l)) at hx + rcases hx with ⟨y,⟨p,⟨hpk,hpl⟩,rfl⟩,rfl⟩ + have he : coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l) = + quadraticPhase (fun a => A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) l := by + funext z + simp only [coordinatePhase,globalQuadraticPhase,Function.comp_apply, + LinearIsometryEquiv.apply_symm_apply] + rw [he] + change Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)) + (phaseDerivative (quadraticPhase (fun a => A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) l) + (coordinateChart (k : M) p)) + have hd (a : A.centers × Fin 3) := + (A.vectorPlaneRead_smooth k (A.linearAtlasPhase_smooth Q w a)).differentiable (by simp) + (coordinateChart (k : M) p) + have hscale (a : A.centers × Fin 3) : + phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) (coordinateChart (k : M) p) = + v a • phaseDerivative (A.vectorPlaneRead k (φ a)) (coordinateChart (k : M) p) := by + exact A.linearAtlasPhase_read_derivative_smul_unit Q w a k _ + rcases l with a | ⟨a,b,c⟩ + · change Good _ (phaseDerivative ((2 : ℝ) • A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) _) + rw [phaseDerivative_const_smul (hd a) 2,hscale] + exact good_smul (by norm_num : (2 : ℝ) ≠ 0) + (good_smul (hv a).ne' (A.linearAtlasPhase_unit_read_good hF Q houter hImm hpure a k hpl hpk)) + · have hpairs' := hpairs k a b.1 b.2.symm p hpk hpl.1 hpl.2 + cases c + · change Good _ (phaseDerivative + (A.vectorPlaneRead k (A.linearAtlasPhase Q w a) + + A.vectorPlaneRead k (A.linearAtlasPhase Q w b.1)) _) + rw [phaseDerivative_add (hd a) (hd b.1),hscale,hscale] + exact hpairs'.1 + · change Good _ (phaseDerivative + (A.vectorPlaneRead k (A.linearAtlasPhase Q w a) - + A.vectorPlaneRead k (A.linearAtlasPhase Q w b.1)) _) + rw [phaseDerivative_sub (hd a) (hd b.1),hscale,hscale] + exact hpairs'.2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAdjustedIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAdjustedIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2c979a6962b60f4a754d1cf9eca71b5407963ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAdjustedIncrement.lean @@ -0,0 +1,197 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.GridIncrementProfile +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteAtlasTrial +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTensorReadBudget +import OAI.Geometry.SurfaceImmersion.Correction.GridFreeMeanIdentity +import OAI.Geometry.SurfaceImmersion.Atlas.GridIncrementEnvelope +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 gridAdjustedIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridAdjustedIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridAdjustedIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridAdjustedIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridAdjustedIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridAdjustedIncrementSectionSpace (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_adjusted_increment (g : SmoothMetric M) (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 B Y : ℕ → ℝ → ℝ) (H : ℝ → ℝ) + (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)) + (hB : ∀ m, RealModes.HasPolynomialBound (B m)) + (hY : ∀ m, RealModes.HasPolynomialBound (Y m)) (hH : RealModes.HasPolynomialBound H) + (hH1 : ∀ x, 1 ≤ x → 1 ≤ H x) (hY1 : ∀ m x, 1 ≤ x → 1 ≤ Y m x) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q : ℕ) : + ∃ e : ℕ, ∃ E : ℝ, ∃ P Q : ℕ → ℝ → ℝ, 1 ≤ E ∧ + (∀ m, RealModes.HasPolynomialBound (P m)) ∧ + (∀ m, RealModes.HasPolynomialBound (Q 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 → (n : ℝ) ≤ H x → ∀ r : ℝ, 0 < r → + ∀ (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 : ℝ} + (d : ∀ i j, ChartedMeanData (c i j) (A.tensorReadBallConstant*r) ρ R (A.tensorPlaneRead i g.inner)), + (∀ 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) → + ρ⁻¹ ≤ H x → + (∀ i j m, (d i j).budgets.inv m ≤ B m x ∧ (d i j).budgets.chi m ≤ B m x ∧ + (d i j).budgets.forms m ≤ B m x ∧ (d i j).budgets.pull m ≤ B m x ∧ + (d i j).budgets.psi m ≤ B m x ∧ (d i j).budgets.normal m ≤ B m x ∧ + (d i j).budgets.mode m ≤ B m x) → + (∀ k m j, j ≤ m+3 → WeightedEstimates.WeightedBound univ 1 j + (FJ m x/(s : ℝ)^(j-2)) (spaceCoordinates ∘ A.vectorPlaneRead k F)) → + (hh : 0 < h) → + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion (a i) h) → + ∀ Qb : ∀ i, (a i) → PhaseBasis, + (∀ i k j, coordinatePhase (φ i (k,j)) = phaseLinear (w (i,k.val,j) • (Qb i k).ξ j)) → + (∀ i k j y, y ∈ (c i (k,j)).e.source → (d i (k,j)).cutoff ((c i (k,j)).e y) = + supportedCellCutoff (A.supportedPlaneWeight i) hh (hcover i) k.val y / w (i,k.val,j)) → + (∀ i k j y, y ∈ (c i (k,j)).e.source → + (d i (k,j)).form ((c i (k,j)).e y) = (Qb i k).Q j) → + (∀ i k j, tsupport (supportedCellCutoff (A.supportedPlaneWeight i) hh (hcover i) k.val) ⊆ + (c i (k,j)).e.source) → + (τ/s) ≤ min 1 ((r-r/2)/(2*(E*x^e))) → + ∀ f : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (f y)) → + (∀ y v v', f y v v' = f y v' v) → + (∀ y, ‖A.tensorEncode f y-A.tensorEncode g.inner y‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (Y m x) f) → + ∀ δ : ℝ, 0 < δ → δ ≤ τ → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m (P m x*(δ*τ)) U) ∧ + (∀ m, A.TensorWeightedBound τ m (Q m x*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (F+U)-inducedTensor F-δ^2 • f)) := by + classical + obtain ⟨e,E,S,T,hE,hS,hT,htrial⟩ := + A.polynomial_finite_atlas_trial q B (fun _ => H) Y hB (fun _ => hH) hY + obtain ⟨Rb,hRb,hRb1,hread⟩ := A.polynomial_tensor_read_budget S hS + let B' := fun m x => 1+B m x+Rb m x + have hB' (m : ℕ) : RealModes.HasPolynomialBound (B' m) := + ((RealModes.polynomialBound_const zero_le_one).add (hB m)).add (hRb m) + have hB'1 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ B' m x := by + have hb := hB1 m x hx + have hr := (hRb1 m x hx).1 + dsimp [B']; linarith + have hBB' (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : B m x ≤ B' m x := by + have hr := (hRb1 m x hx).1 + dsimp [B']; linarith + have hRB' (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : Rb m x ≤ B' m x := by + have hb := hB1 m x hx + dsimp [B']; linarith + obtain ⟨α,β,γ,ζ,D,hα,hβ,hγ,hζ,hD,hinc⟩ := A.grid_free_forced_increment V houter hε hκ hb + FJ C J B B' hFJ hFJ1 hC hJ hB hB' hC1 hB'1 q + let P := gridIncrementSize α β H + let Q := gridIncrementError α β γ ζ T D H + refine ⟨e,E,P,Q,hE,gridIncrementSize_polynomial α β H hα hβ hH, + gridIncrementError_polynomial α β γ ζ T D H hα hβ hγ hζ hT hD hH,?_⟩ + intro h a ξ w hw hV n hn x hx hnH r hr F hF hlocal hpairs hImm hnormal hgram + φ τ s c ρ R d hφ hc hρ hτ hs hτs hs1 hρB hρH hbud hFjets hh hcover Qb hphase + hcut hform hsup hsmall f hf hsym hnear hsize δ hδ hδτ + 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) : ℝ) ≤ H x := by + have hi : 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 + exact (Nat.cast_le.mpr hi).trans hnH + obtain ⟨u,hu,husym,_,huball,husize,hures⟩ := htrial x hx g.inner g.contMDiff r hr d hρ + hτ hs hτs hs1 (fun _ => hH1 x hx) (fun m => hY1 m x hx) + (fun i _ => ⟨hcard i,hρH⟩) hbud hsmall f hf hsym hnear hsize δ hδ + have hub (i : A.centers) (m : ℕ) := hread x hx s hs hs1 u hu husize i m + have hbud' (i : A.centers) (j : (a i) × Fin 3) (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 ≤ B m x := + ⟨(hbud i j m).1.trans (hBB' m x hx), + (hbud i j m).2.2.1.trans (hBB' m x hx), + (hbud i j m).2.2.2.2.1.trans (hBB' m x hx),(hbud i j m).2.2.2.2.2.1⟩ + have hmean (m : ℕ) : A.TensorWeightedBound τ m (δ^2*T m x*(τ/s)^(q+1)) + (A.finiteAtlasFreeMean d hρ δ q u-δ^2 • f) := by + have he := A.grid_free_mean_residual hh hcover d hρ Qb (fun i k j => w (i,k.val,j)) + (fun i k j => (zero_lt_one.trans_le (hw (i,k.val,j))).ne') hphase hcut hform hsup hK + u hu husym huball hδ.ne' hτ.ne' q f hf hτ hτs (hures m) + convert he using 1 + ring + obtain ⟨U,hU,hUb,hUe⟩ := hinc 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 (fun m => (hρB m).trans (hBB' m x hx)) hbud' hFjets + δ hδ hδτ u hu huball (fun i m => (hub i m).mono_const (hRB' m x hx)) f hf + (fun m => δ^2*T m x*(τ/s)^(q+1)) hmean + have hn0 : 0 ≤ (n : ℝ) := Nat.cast_nonneg _ + have hnon (Z : ℕ → ℝ → ℝ) (hz : ∀ m, RealModes.HasPolynomialBound (Z m)) (m : ℕ) : + 0 ≤ Z m x := by obtain ⟨_,_,_,hp⟩ := hz m; exact (hp x hx).1 + refine ⟨U,hU,?_,?_⟩ + · intro m i + apply (hUb m i).mono_const + exact gridIncrementSize_bound (hnon α hα m) (hnon β hβ m) hn0 hnH hδ.le hτ.le + · intro m i + apply (hUe m i).mono_const + exact gridIncrementError_bound (hnon α hα (m+1)) (hnon β hβ (m+1)) + (hnon γ hγ m) (hnon ζ hζ m) (hnon T hT m) (hD m) hn0 hnH hδ.le hτ hδτ + (hτs.trans hs1) (pow_nonneg (div_nonneg hτ.le hs.le) _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAtlasMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAtlasMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..313c747fb26bd9527ceb773392c51c05c8815850 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridAtlasMetric.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeMetric +import OAI.Geometry.SurfaceImmersion.Correction.GridMeanReconstruction +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight + +namespace OAI + +/-! Exact metric expansion for the variable grid of phases in a fixed atlas. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry +open PhaseGrid (Index coverRegion supportedCellCutoff) +local instance gridAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +local instance {a : A.centers → Finset Index} : DecidableEq (Σ i, ((a i) × Fin 3)) := + Classical.decEq _ + +/-- The actual grid phases reconstruct the complete tensor in the fixed atlas. -/ +theorem grid_atlas_free_metric + {a : A.centers → Finset Index} {h : ℝ} (hh : 0 < h) + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion (a i) h) + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ((a i) × Fin 3) → Base → ℝ} + {K : ∀ i, ((a i) × Fin 3) → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) (hρ : 0 < ρ) + (Q : ∀ i, (a i) → PhaseBasis) (w : ∀ i, (a i) → Fin 3 → ℝ) + (hw : ∀ i k j, w i k j ≠ 0) + (hphase : ∀ i k j, coordinatePhase (φ i (k,j)) = phaseLinear (w i k j • (Q i k).ξ j)) + (hcutoff : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).cutoff ((c i (k,j)).e x) = + supportedCellCutoff (A.supportedPlaneWeight i) hh (hcover i) k.val x / w i k j) + (hform : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).form ((c i (k,j)).e x) = (Q i k).Q j) + (hsupport : ∀ i k j, tsupport (supportedCellCutoff + (A.supportedPlaneWeight i) hh (hcover i) k.val) ⊆ (c i (k,j)).e.source) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (u : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hsym : ∀ p v v', u p v v' = u p v' v) + (hball : ∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) : + inducedTensor (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u) = + δ^2 • (u + A.tensorPlaneRestore (fun i => + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u))) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • RealModes.nonzeroPhaseSum τ + (fun b : Σ i, ((a i) × Fin 3) => A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) b.1 b.2)) + (fun b : Σ i, ((a i) × Fin 3) => A.vectorPlaneRead k + (A.finiteGlobalAmplitude d hρ δ q u b.1 b.2)) x) := by + classical + have hleading (i : A.centers) : + chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) = A.tensorPlaneEncode u i := by + have hi := charted_grid_partition_leading (A.supportedPlaneWeight i) hh (hcover i) + (fun k j => d i (k,j)) hρ (Q i) (w i) (hw i) (hphase i) (hcutoff i) + (hform i) (hsupport i) (A.tensorPlaneRead_smooth i hu) (hball i) + rw [hi] + funext x + exact (A.tensorPlaneEncode_weight i u x).symm + have he : (fun i => chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) + + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) = + A.tensorPlaneEncode u + (fun i => chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) := by + funext i + rw [hleading] + rfl + rw [A.finite_atlas_free_metric d hρ hδ hτ q u hK,he, + A.tensorPlaneRestore_add,A.tensorPlaneRestore_encode u hsym] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCardinality.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCardinality.lean new file mode 100644 index 0000000000000000000000000000000000000000..2be0d110053bf21bcd8a14f2198eeb1ff8c158c9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCardinality.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridRestoredGeometry + +namespace OAI + +/-! Explicit polynomial growth of the variable grid and its quadratic labels. -/ +noncomputable section +open scoped BigOperators ContDiff Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGrid +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma gridPhaseIndex_card (s : A.centers → Finset Index) : + (Fintype.card (A.GridPhaseIndex s) : ℝ) = 3*∑ i : A.centers, ((s i).card : ℝ) := by + classical + simp only [GridPhaseIndex,Fintype.card_sigma,Fintype.card_prod,Fintype.card_coe, + Fintype.card_fin,Nat.cast_sum,Nat.cast_mul,Nat.cast_ofNat] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + ring + +lemma gridPhaseIndex_quadratic_bound (s : A.centers → Finset Index) {D x : ℝ} + (hD : 0 ≤ D) (hx : 1 ≤ x) + (hcard : (∑ i : A.centers, ((s i).card : ℝ)) ≤ D*x^12) : + (Fintype.card (A.GridPhaseIndex s) : ℝ)+ + 2*(Fintype.card (A.GridPhaseIndex s) : ℝ)^2 ≤ (3*D+18*D^2)*x^24 := by + have hcount : (Fintype.card (A.GridPhaseIndex s) : ℝ) ≤ 3*D*x^12 := by + rw [A.gridPhaseIndex_card] + nlinarith + have hn : 0 ≤ (Fintype.card (A.GridPhaseIndex s) : ℝ) := Nat.cast_nonneg _ + have hp : x^12 ≤ x^24 := pow_le_pow_right₀ hx (by omega) + calc + _ ≤ 3*D*x^12+2*(3*D*x^12)^2 := by gcongr + _ = 3*D*x^12+18*D^2*x^24 := by ring + _ ≤ (3*D+18*D^2)*x^24 := by nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCellGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCellGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..67a959d9fe3e3e68f4d0c263d59605f9348a76e4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCellGeometry.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridCutoffSupport +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas +import OAI.Geometry.Immersion.ClosedSurface.AtlasWeights +import OAI.Geometry.Immersion.ClosedSurface.LengthMargins + +namespace OAI + +/-! Transfer the selected cell's normal geometry to its exact local support. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseGrid PhaseGeometry RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma cellChartCompact_normal_geometry (i : A.centers) (a : Finset Index) (h : ℝ) (k : Index) + (F : M → Space) + (houter : ∀ p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (ξ : SmallModes.Base) (D : ℝ) + (hgood : ∀ p ∈ tsupport (refinedCutoff (i : M) (A.weight i) a h k), + Good (atlasSecondTensor F (i : M) p) ξ) + (hn : ∀ p ∈ tsupport (refinedCutoff (i : M) (A.weight i) a h k), + ‖secondQuadratic (atlasSecondTensor F (i : M) p) (-ξ.2,ξ.1)‖⁻¹ ≤ D) : + ∀ x ∈ (modeSupport (A.cellChartCompact i a h k) : Set SmallModes.Base), + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ξ ∧ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (-ξ.2,ξ.1)‖⁻¹ ≤ D := by + rintro x ⟨y,⟨p,hp,rfl⟩,rfl⟩ + have hpw := refinedCutoff_tsupport_outer (i : M) (A.weight i) a h k hp + have he := (realSecondTensor_eventuallyEq + (A.vectorPlaneRead_eventually_coordinateMap F i houter hpw)).eq_of_nhds + change realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)) = atlasSecondTensor F (i : M) p at he + rw [he] + exact ⟨hgood p hp,hn p hp⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..6abb8184c4c51cc83dbbedb4e180e5788a5723d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffBounds.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridCutoffSupport +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! The exact supported cell cutoffs have a fixed atlas polynomial bound. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology NNReal BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseGrid WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem grid_exact_cutoff_bounds : + ∃ P : ℕ → ℝ, (∀ m, 1 ≤ P m) ∧ ∀ (i : A.centers) + {a : Finset Index} {z : ℝ} (hz : 0 < z), z ≤ 1 → + ∀ hcover : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion a (z^6), + ∀ (k : Index) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ w : ℝ, 1 ≤ w → ∀ m, + WeightedEstimates.WeightedBound univ s m (P m/z^(6*m)) + (w⁻¹ • A.exactCellCutoff i (pow_pos hz 6) hcover k) := by + classical + obtain ⟨C,hC,hcut⟩ := supported_normalized_cutoff_bounds + let B := fun m => 1+∑ i : A.centers, + supportedWeightedSeminorm (modeSupport (A.chartWeightCompact i)) 1 m (A.supportedPlaneWeight i) + have hB (m : ℕ) : 1 ≤ B m := le_add_of_nonneg_right + (Finset.sum_nonneg fun i _ => apply_nonneg _ _) + have hb (i : A.centers) (m : ℕ) : + WeightedEstimates.WeightedBound univ 1 m (B m) (A.supportedPlaneWeight i) := by + apply (weightedBound_of_supportedSeminorm 1 m (A.supportedPlaneWeight i)).mono_const + have hh : supportedWeightedSeminorm (modeSupport (A.chartWeightCompact i)) 1 m + (A.supportedPlaneWeight i) ≤ ∑ j : A.centers, + supportedWeightedSeminorm (modeSupport (A.chartWeightCompact j)) 1 m + (A.supportedPlaneWeight j) := + Finset.single_le_sum (fun j _ => show 0 ≤ + supportedWeightedSeminorm (modeSupport (A.chartWeightCompact j)) 1 m + (A.supportedPlaneWeight j) from apply_nonneg _ _) (Finset.mem_univ i) + exact hh.trans (le_add_of_nonneg_left zero_le_one) + refine ⟨fun m => C m*B m,fun m => one_le_mul_of_one_le_of_one_le (hC m) (hB m),?_⟩ + intro i a z hz hz1 hcover k s hs hs1 w hw m + have hraw := (hcut (A.supportedPlaneWeight i) (pow_pos hz 6) + (pow_le_one₀ hz.le hz1) hcover B (fun m => zero_le_one.trans (hB m)) (hb i) k m).shrink_scale + s.coe_nonneg hs1 + have he : (A.exactCellCutoff i (pow_pos hz 6) hcover k : SmallModes.Base → ℝ) = + supportedNormalizedCutoff (A.supportedPlaneWeight i) (pow_pos hz 6) hcover k := rfl + have hraw' : WeightedEstimates.WeightedBound univ s m (C m*B m/z^(6*m)) + (A.exactCellCutoff i (pow_pos hz 6) hcover k) := by + simpa only [he,pow_mul] using hraw + have hbound : |w⁻¹| ≤ 1 := by + rw [abs_of_nonneg (inv_nonneg.mpr (zero_le_one.trans hw))] + exact inv_le_one_of_one_le₀ hw + have hh := hraw'.const_smul uniqueDiffOn_univ + (A.exactCellCutoff i (pow_pos hz 6) hcover k).contDiff.contDiffOn w⁻¹ + apply hh.mono_const + simpa only [one_mul] using mul_le_mul_of_nonneg_right hbound + (div_nonneg (mul_nonneg (zero_le_one.trans (hC m)) (zero_le_one.trans (hB m))) + (pow_nonneg hz.le _)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..393218ac1420bc99e34cc0d01708c66350461b24 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridCutoffSupport.lean @@ -0,0 +1,117 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridPhaseCutoffs +import OAI.Geometry.SurfaceImmersion.Atlas.ChartReadSupport +import OAI.Geometry.Immersion.ClosedSurface.GlobalPartition +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasDifferential + +namespace OAI + +/-! The local cell cutoff has the exact global refined support used in +phase selection. This keeps the solver's geometry on that original support. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseGrid +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma cellCutoff_eq_vectorPlaneRead (i : A.centers) (a : Finset Index) (h : ℝ) (k : Index) : + A.vectorPlaneRead i (refinedCutoff (i : M) (A.weight i) a h k) = + fun y => A.planeWeight i y * normalizedCutoff a h k y := by + funext y + change (chart (i : M)).target.indicator (fun x => + (A.outer i ((chart (i : M)).symm x))^2 * + refinedCutoff (i : M) (A.weight i) a h k ((chart (i : M)).symm x)) + (planeCoordinateIsometry.symm y) = _ + by_cases hy : planeCoordinateIsometry.symm y ∈ (chart (i : M)).target + · have he : chartCoordinates (i : M) + ((chart (i : M)).symm (planeCoordinateIsometry.symm y)) = y := by + change planeCoordinateIsometry ((chart (i : M)) + ((chart (i : M)).symm (planeCoordinateIsometry.symm y))) = y + rw [(chart (i : M)).right_inv hy,LinearIsometryEquiv.apply_symm_apply] + simp only [refinedCutoff,he,planeWeight,Function.comp_apply, + chartWeight,indicator_of_mem hy] + by_cases hw : A.weight i ((chart (i : M)).symm (planeCoordinateIsometry.symm y)) = 0 + · simp only [hw,zero_mul,mul_zero] + · rw [A.outer_one i _ (subset_tsupport _ hw),one_pow,one_mul] + · simp only [planeWeight,Function.comp_apply,chartWeight, + indicator_of_notMem hy,zero_mul] + +def cellChartCompact (i : A.centers) (a : Finset Index) (h : ℝ) (k : Index) : + TopologicalSpace.Compacts JetPolynomial.Base := + ⟨(chart (i : M)) '' tsupport (refinedCutoff (i : M) (A.weight i) a h k), + (isClosed_tsupport _).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono ((refinedCutoff_tsupport_outer + (i : M) (A.weight i) a h k).trans (A.weight_support i)))⟩ + +lemma cellChartCompact_subset (i : A.centers) (a : Finset Index) (h : ℝ) (k : Index) : + (A.cellChartCompact i a h k : Set JetPolynomial.Base) ⊆ A.chartWeightCompact i := + Set.image_mono (refinedCutoff_tsupport_outer (i : M) (A.weight i) a h k) + +lemma cellCutoff_tsupport (i : A.centers) {a : Finset Index} {h : ℝ} + (hh : 0 < h) + (hcover : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion a h) + (k : Index) : + tsupport (supportedCellCutoff (A.supportedPlaneWeight i) hh hcover k) ⊆ + (modeSupport (A.cellChartCompact i a h k) : Set SmallModes.Base) := by + let f := supportedCellCutoff (A.supportedPlaneWeight i) hh hcover k + have he : (f : SmallModes.Base → ℝ) = + A.vectorPlaneRead i (refinedCutoff (i : M) (A.weight i) a h k) := by + rw [A.cellCutoff_eq_vectorPlaneRead] + rfl + intro y hy + have hK : y ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (f.tsupport_subset hy).1 + have hr := A.vectorPlaneRead_support_on_weight i + (refinedCutoff (i : M) (A.weight i) a h k) hK (by simpa only [← he] using hy) + obtain ⟨x,⟨p,hp,rfl⟩,rfl⟩ := hK + refine ⟨chart (i : M) p,⟨p,?_,rfl⟩,rfl⟩ + simpa only [LinearIsometryEquiv.symm_apply_apply, + (chart (i : M)).left_inv (A.weight_support i hp)] using hr + +def exactCellCutoff (i : A.centers) {a : Finset Index} {h : ℝ} + (hh : 0 < h) + (hcover : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion a h) + (k : Index) : SupportedField (F := ℝ) (modeSupport (A.cellChartCompact i a h k)) := + ContDiffMapSupportedIn.of_support_subset + (supportedCellCutoff (A.supportedPlaneWeight i) hh hcover k).contDiff + ((subset_tsupport _).trans (A.cellCutoff_tsupport i hh hcover k)) + +@[simp] lemma exactCellCutoff_apply (i : A.centers) {a : Finset Index} {h : ℝ} + (hh : 0 < h) + (hcover : (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion a h) + (k : Index) (x : SmallModes.Base) : + A.exactCellCutoff i hh hcover k x = A.planeWeight i x * normalizedCutoff a h k x := rfl + +lemma restore_cell_tsupport {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + (i : A.centers) (a : Finset Index) (h : ℝ) (k : Index) + (f : JetPolynomial.Base → V) + (hf : tsupport f ⊆ (A.cellChartCompact i a h k : Set JetPolynomial.Base)) : + tsupport (restore (i : M) (A.outer i) f) ⊆ + tsupport (refinedCutoff (i : M) (A.weight i) a h k) := by + apply closure_minimal _ (isClosed_tsupport _) + intro p hp + by_cases hs : p ∈ (chart (i : M)).source + · have hn : f (chart (i : M) p) ≠ 0 := by + intro hz + apply hp + simp only [restore,indicator_of_mem hs,hz,smul_zero] + obtain ⟨q,hq,he⟩ := hf (subset_tsupport f hn) + have hqs := A.weight_support i + (refinedCutoff_tsupport_outer (i : M) (A.weight i) a h k hq) + have hqp : q = p := (chart (i : M)).injOn hqs hs he + simpa only [hqp] using hq + · exfalso + apply hp + simp only [restore,indicator_of_notMem hs] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridGeometricIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridGeometricIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..887bb44a547f7e30ee4ed0ae4833c86d6b197123 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridGeometricIncrement.lean @@ -0,0 +1,213 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridAdjustedIncrement +import OAI.Geometry.SurfaceImmersion.Correction.GridMeanData +import OAI.Geometry.SurfaceImmersion.Correction.GridMeanBudgets +import OAI.Geometry.SurfaceImmersion.Atlas.GridCardinality +import OAI.Geometry.SurfaceImmersion.Primitive.GridIncrementProfile +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteAtlasTrial +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTensorReadBudget +import OAI.Geometry.SurfaceImmersion.Correction.GridFreeMeanIdentity +import OAI.Geometry.SurfaceImmersion.Atlas.GridIncrementEnvelope +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 gridGeometricIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridGeometricIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridGeometricIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridGeometricIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridGeometricIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridGeometricIncrementSectionSpace (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_geometric_increment (g : SmoothMetric M) (V : Finset SmallModes.Base) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {ε κ b a₀ C₀ H₀ K D : ℝ} (hε : 0 < ε) (hκ : 0 < κ) (hb : 0 < b) + (ha₀ : 0 < a₀) (hC₀ : 0 ≤ C₀) (hH₀ : 0 ≤ H₀) (hK : 0 ≤ K) (hD : 0 < D) +: + ∃ r : ℝ, 0 < r ∧ ∀ (FJ Y : ℕ → ℝ → ℝ), + (∀ m, RealModes.HasPolynomialBound (FJ m)) → + (∀ m, RealModes.HasPolynomialBound (Y m)) → + (∀ m x, 1 ≤ x → 1 ≤ FJ m x) → + (∀ m x, 1 ≤ x → 1 ≤ Y m x) → ∀ q : ℕ, + ∃ e : ℕ, ∃ E : ℝ, ∃ P Q : ℕ → ℝ → ℝ, 1 ≤ E ∧ + (∀ m, RealModes.HasPolynomialBound (P m)) ∧ + (∀ m, RealModes.HasPolynomialBound (Q m)) ∧ + ∀ z : ℝ, ∀ _hz : 0 < z, z ≤ 1 → ∀ a : A.centers → Finset Index, + (∑ i, ((a i).card : ℝ)) ≤ K/z^12 → + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion (a i) (z^6)) → + ∀ (Qb : ∀ i, (a i) → PhaseBasis) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ), + (∀ i k j, ξ (i,k.val,j) = (Qb i k).ξ j) → (∀ l, 1 ≤ w l) → + (∀ l : A.GridPhaseIndex a, w (A.gridPhaseLabel l) • ξ (A.gridPhaseLabel l) ∈ V) → + (∀ i k j, ‖(Qb i k).Q j‖ ≤ C₀) → + (∀ i k j y, (Qb i k).Q j (A.tensorPlaneRead i g.inner y) ≤ H₀) → + (∀ i k j y, y ∈ (modeSupport (A.cellChartCompact i (a i) (z^6) k.val) : Set SmallModes.Base) → + a₀ ≤ (Qb i k).Q j (A.tensorPlaneRead i g.inner y)) → + ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F), + (∀ l p, atlasActive (fun i : A.centers => (i : M)) A.weight a (z^6) 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 (z^6) κ ξ w F → + (∀ i y, y ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) y)) → + (∀ i y, y ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + b ≤ ‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y‖) → + (∀ i y, y ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead i F) y))⁻¹‖ ≤ D) → + (∀ i k j y, y ∈ (modeSupport (A.cellChartCompact i (a i) (z^6) k.val) : Set SmallModes.Base) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + (w (i,k.val,j) • (Qb i k).ξ j) ∧ + ‖secondQuadratic (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + (-(w (i,k.val,j) • (Qb i k).ξ j).2,(w (i,k.val,j) • (Qb i k).ξ j).1)‖⁻¹ ≤ D) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, 2*D ≤ FJ m z⁻¹ ∧ C₀ ≤ FJ m z⁻¹) → + (∀ i k j m, ‖w (i,k.val,j) • (Qb i k).ξ j‖ ≤ FJ m z⁻¹ ∧ + ∀ hξ : w (i,k.val,j) • (Qb i k).ξ j ≠ 0, + ‖(phaseEquiv (w (i,k.val,j) • (Qb i k).ξ j) hξ).symm.toContinuousLinearMap‖ ≤ FJ m z⁻¹) → + (∀ i m l, l ≤ m+3 → WeightedEstimates.WeightedBound univ 1 l + (FJ m z⁻¹/(s : ℝ)^(l-2)) (spaceCoordinates ∘ A.vectorPlaneRead i F)) → + (τ/s) ≤ min 1 ((r-r/2)/(2*(E*(z⁻¹)^e))) → + ∀ f : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (f y)) → + (∀ y v v', f y v v' = f y v' v) → + (∀ y, ‖A.tensorEncode f y-A.tensorEncode g.inner y‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (Y m z⁻¹) f) → + ∀ δ : ℝ, 0 < δ → δ ≤ τ → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m (P m z⁻¹*(δ*τ)) U) ∧ + (∀ m, A.TensorWeightedBound τ m (Q m z⁻¹*(δ*(τ/s)^(q+1)+δ^3/τ)) + (inducedTensor (F+U)-inducedTensor F-δ^2 • f)) := by + classical + obtain ⟨p,p',C,C',L,hC,hC',hL,r,ρ,R,hr,hρ,hR,hdata⟩ := + A.polynomial_grid_mean_data g ha₀ hC₀ hH₀ + refine ⟨r,hr,?_⟩ + intro FJ Y hFJ hY hFJ1 hY1 q + let Cs := fun m x => C m*(FJ m x)^(p m) + let Js := fun m x => 1+2*FJ m x + let B := fun m x => 1+ρ⁻¹+gridMeanBudget p' C' L FJ m x + let H := fun x => 1+ρ⁻¹+3*K*x^12 + have hCs (m : ℕ) : RealModes.HasPolynomialBound (Cs m) := + (RealModes.polynomialBound_const (zero_le_one.trans (hC m))).mul ((hFJ m).pow (p m)) + have hJs (m : ℕ) : RealModes.HasPolynomialBound (Js m) := + (RealModes.polynomialBound_const zero_le_one).add + ((RealModes.polynomialBound_const (by norm_num : (0:ℝ) ≤ 2)).mul (hFJ m)) + have hB (m : ℕ) : RealModes.HasPolynomialBound (B m) := + ((RealModes.polynomialBound_const zero_le_one).add (RealModes.polynomialBound_const (inv_nonneg.mpr hρ.le))).add + (gridMeanBudget_polynomial p' C' L FJ (fun m => zero_le_one.trans (hC' m)) + (fun m => zero_le_one.trans (hL m)) hFJ m) + have hH : RealModes.HasPolynomialBound H := + ((RealModes.polynomialBound_const zero_le_one).add (RealModes.polynomialBound_const (inv_nonneg.mpr hρ.le))).add + ((RealModes.polynomialBound_const (by positivity : 0 ≤ 3*K)).mul (RealModes.polynomialBound_id.pow 12)) + have hBn (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 0 ≤ gridMeanBudget p' C' L FJ m x := + (gridMeanBudget_polynomial p' C' L FJ (fun m => zero_le_one.trans (hC' m)) + (fun m => zero_le_one.trans (hL m)) hFJ m).nonneg hx + have hB1 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ B m x := by + have hh := hBn m x hx + have hi := inv_nonneg.mpr hρ.le + dsimp [B]; linarith + have hCs1 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ Cs m x := + one_le_mul_of_one_le_of_one_le (hC m) (one_le_pow₀ (hFJ1 m x hx)) + have hH1 (x : ℝ) (hx : 1 ≤ x) : 1 ≤ H x := by + have hi := inv_nonneg.mpr hρ.le + have hp : 0 ≤ 3*K*x^12 := by positivity + dsimp [H]; linarith + obtain ⟨e,E,P,Q,hE,hP,hQ,hstep⟩ := A.grid_adjusted_increment g V houter hε hκ hb + FJ Cs Js B Y H hFJ hFJ1 hCs hJs hB hY hH hH1 hY1 hCs1 hB1 q + refine ⟨e,E,P,Q,hE,hP,hQ,?_⟩ + intro z hz hz1 a hcard hcover Qb ξ w hξ hw hV hQnorm hQup hQlow F hF + hlocal hpairs hImm hnormal hgram hcell τ s hτ hs hτs hs1 hBD hphases hFjets + hsmall f hf hsym hnear hsize δ hδ hδτ + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr hz1 + let n := Fintype.card (A.GridPhaseIndex a) + have hnH : (n : ℝ) ≤ H z⁻¹ := by + change (Fintype.card (A.GridPhaseIndex a) : ℝ) ≤ _ + rw [A.gridPhaseIndex_card] + have hc : 3*∑ i, ((a i).card : ℝ) ≤ 3*K*(z⁻¹)^12 := by + have hh := mul_le_mul_of_nonneg_left hcard (by norm_num : (0:ℝ) ≤ 3) + simpa only [inv_pow,div_eq_mul_inv,mul_assoc] using hh + have hi := inv_nonneg.mpr hρ.le + change 3*∑ i : A.centers, ((a i).card : ℝ) ≤ 1+ρ⁻¹+3*K*(z⁻¹)^12 + linarith + have hgeom (i : A.centers) (k : a i) (j : Fin 3) (y : SmallModes.Base) + (hy : y ∈ (modeSupport (A.cellChartCompact i (a i) (z^6) k.val) : Set SmallModes.Base)) := + let hy' := (Set.image_mono (A.cellChartCompact_subset i (a i) (z^6) k.val)) hy + And.intro (hImm i y hy') (And.intro (hcell i k j y hy).1 + (And.intro (hgram i y hy') (hcell i k j y hy).2)) + obtain ⟨c,d,hsolver,hcut,hform,hsupp,hbud⟩ := hdata z hz hz1 a hcover Qb + (fun i k j => w (i,k.val,j)) (fun i k j => hw (i,k.val,j)) hQnorm hQup hQlow F hF τ s hs hs1 + D hD (fun m => FJ m z⁻¹) (fun m => hFJ1 m z⁻¹ hx) hBD hphases hFjets hgeom + have hbud' (i : A.centers) (j : (a i) × Fin 3) (m : ℕ) : + (d i j).budgets.inv m ≤ B m z⁻¹ ∧ (d i j).budgets.chi m ≤ B m z⁻¹ ∧ + (d i j).budgets.forms m ≤ B m z⁻¹ ∧ (d i j).budgets.pull m ≤ B m z⁻¹ ∧ + (d i j).budgets.psi m ≤ B m z⁻¹ ∧ (d i j).budgets.normal m ≤ B m z⁻¹ ∧ + (d i j).budgets.mode m ≤ B m z⁻¹ := by + have he : linearMeanGeometryBudget p' C' (fun m => FJ m z⁻¹) + (fun l => 1+phaseCutoffBudget l (L l/z^(6*l)) (FJ l z⁻¹) 1) m ≤ B m z⁻¹ := by + rw [← gridMeanBudget_at_inverse] + have hi := inv_nonneg.mpr hρ.le + dsimp [B]; linarith + obtain ⟨hi,hc,hf,hp,hψ,hn,hm⟩ := hbud i j m + exact ⟨hi.trans he,hc.trans he,hf.trans he,hp.trans he,hψ.trans he,hn.trans he,hm.trans he⟩ + refine hstep (z^6) a ξ w hw hV n le_rfl z⁻¹ hx hnH r hr F hF + hlocal hpairs hImm hnormal hgram d ?_ ?_ hρ hτ hs hτs hs1 ?_ ?_ + hbud' hFjets (pow_pos hz 6) hcover Qb ?_ ?_ ?_ ?_ + hsmall f hf hsym hnear hsize δ hδ hδτ + · intro i j + rw [hξ i j.1 j.2] + · intro i j + exact ⟨funext (fun m => (hsolver i j m).1),funext (fun m => (hsolver i j m).2.1), + fun m => (hsolver i j m).2.2⟩ + · intro m + have hh := hBn m z⁻¹ hx + dsimp [B]; linarith + · have hp : 0 ≤ 3*K*(z⁻¹)^12 := by positivity + dsimp [H]; linarith + · intro i k j + funext y + simp only [coordinatePhase,Function.comp_apply,LinearIsometryEquiv.apply_symm_apply] + · intro i k j y hy + exact hcut i (k,j) y hy + · intro i k j y _ + exact congrFun (hform i (k,j)) _ + · intro i k j + change tsupport (fun y => A.planeWeight i y * normalizedCutoff (a i) (z^6) k.val y) ⊆ _ + exact hsupp i (k,j) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridIncrementEnvelope.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridIncrementEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..b70bf7bb9a5b50218ad017971afe2daf22e88aa6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridIncrementEnvelope.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! Polynomial envelopes for the full free/forced grid increment. -/ +noncomputable section +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes + +def gridInteractionCount (n : ℝ) : ℝ := n+2*n^2 + +lemma gridInteractionCount_nonneg {n : ℝ} (hn : 0 ≤ n) : + 0 ≤ gridInteractionCount n := by unfold gridInteractionCount; positivity + +lemma gridInteractionCount_mono {n N : ℝ} (hn : 0 ≤ n) (h : n ≤ N) : + gridInteractionCount n ≤ gridInteractionCount N := by + unfold gridInteractionCount + gcongr + +def gridIncrementSize (α β : ℕ → ℝ → ℝ) (H : ℝ → ℝ) (m : ℕ) (x : ℝ) : ℝ := + α m x*H x+β m x*gridInteractionCount (H x) + +def gridIncrementError (α β γ ζ T : ℕ → ℝ → ℝ) (D : ℕ → ℝ) (H : ℝ → ℝ) + (m : ℕ) (x : ℝ) : ℝ := + ζ m x*H x+γ m x*gridInteractionCount (H x)+T m x+ + D m*(2*(α (m+1) x*H x)*(β (m+1) x*gridInteractionCount (H x))+ + (β (m+1) x*gridInteractionCount (H x))^2) + +lemma gridInteractionCount_polynomial {H : ℝ → ℝ} (hH : HasPolynomialBound H) : + HasPolynomialBound (fun x => gridInteractionCount (H x)) := + hH.add ((polynomialBound_const (by norm_num : (0:ℝ) ≤ 2)).mul (hH.pow 2)) + +lemma gridIncrementSize_polynomial (α β : ℕ → ℝ → ℝ) (H : ℝ → ℝ) + (hα : ∀ m, HasPolynomialBound (α m)) (hβ : ∀ m, HasPolynomialBound (β m)) + (hH : HasPolynomialBound H) (m : ℕ) : + HasPolynomialBound (gridIncrementSize α β H m) := + ((hα m).mul hH).add ((hβ m).mul (gridInteractionCount_polynomial hH)) + +lemma gridIncrementError_polynomial (α β γ ζ T : ℕ → ℝ → ℝ) (D : ℕ → ℝ) (H : ℝ → ℝ) + (hα : ∀ m, HasPolynomialBound (α m)) (hβ : ∀ m, HasPolynomialBound (β m)) + (hγ : ∀ m, HasPolynomialBound (γ m)) (hζ : ∀ m, HasPolynomialBound (ζ m)) + (hT : ∀ m, HasPolynomialBound (T m)) (hD : ∀ m, 0 ≤ D m) + (hH : HasPolynomialBound H) (m : ℕ) : + HasPolynomialBound (gridIncrementError α β γ ζ T D H m) := by + have hN := gridInteractionCount_polynomial hH + exact ((((hζ m).mul hH).add ((hγ m).mul hN)).add (hT m)).add + ((polynomialBound_const (hD m)).mul + ((((polynomialBound_const (by norm_num : (0:ℝ) ≤ 2)).mul ((hα (m+1)).mul hH)).mul + ((hβ (m+1)).mul hN)).add (((hβ (m+1)).mul hN).pow 2))) + +lemma gridIncrementSize_bound {a b n N δ τ : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (hn : 0 ≤ n) (hnN : n ≤ N) + (hδ : 0 ≤ δ) (hτ : 0 ≤ τ) : + (a*n+b*gridInteractionCount n)*(δ*τ) ≤ + (a*N+b*gridInteractionCount N)*(δ*τ) := by + apply mul_le_mul_of_nonneg_right _ (mul_nonneg hδ hτ) + exact add_le_add (mul_le_mul_of_nonneg_left hnN ha) + (mul_le_mul_of_nonneg_left (gridInteractionCount_mono hn hnN) hb) + +lemma gridIncrementError_bound {a b c d t D n N δ τ η : ℝ} + (ha : 0 ≤ a) (hb : 0 ≤ b) (hc : 0 ≤ c) (hd : 0 ≤ d) + (ht : 0 ≤ t) (hD : 0 ≤ D) (hn : 0 ≤ n) (hnN : n ≤ N) + (hδ : 0 ≤ δ) (hτ : 0 < τ) (hδτ : δ ≤ τ) (hτ1 : τ ≤ 1) (hη : 0 ≤ η) : + η*(d*n*(δ*τ)+c*gridInteractionCount n*δ^2)+δ^2*t*η+ + D*(2*(a*n)*(b*gridInteractionCount n)+(b*gridInteractionCount n)^2)*(δ^3/τ) ≤ + (d*N+c*gridInteractionCount N+t+ + D*(2*(a*N)*(b*gridInteractionCount N)+(b*gridInteractionCount N)^2)) * + (δ*η+δ^3/τ) := by + have hN : 0 ≤ N := hn.trans hnN + have hnq := gridInteractionCount_nonneg hn + have hNq := gridInteractionCount_nonneg hN + have hq := gridInteractionCount_mono hn hnN + have hδ1 : δ ≤ 1 := hδτ.trans hτ1 + have hdt : δ*τ ≤ δ := mul_le_of_le_one_right hδ hτ1 + have hdsq : δ^2 ≤ δ := by nlinarith + have hdn : d*n ≤ d*N := mul_le_mul_of_nonneg_left hnN hd + have hcq : c*gridInteractionCount n ≤ c*gridInteractionCount N := + mul_le_mul_of_nonneg_left hq hc + have hfirst : d*n*(δ*τ)+c*gridInteractionCount n*δ^2+δ^2*t ≤ + (d*N+c*gridInteractionCount N+t)*δ := by + calc + _ ≤ (d*N)*δ+(c*gridInteractionCount N)*δ+δ*t := by + apply add_le_add + · exact add_le_add (mul_le_mul hdn hdt (mul_nonneg hδ hτ.le) (mul_nonneg hd hN)) + (mul_le_mul hcq hdsq (sq_nonneg δ) (mul_nonneg hc hNq)) + · exact mul_le_mul_of_nonneg_right hdsq ht + _ = _ := by ring + have han : a*n ≤ a*N := mul_le_mul_of_nonneg_left hnN ha + have hbn : b*gridInteractionCount n ≤ b*gridInteractionCount N := + mul_le_mul_of_nonneg_left hq hb + have hcubic : 2*(a*n)*(b*gridInteractionCount n)+(b*gridInteractionCount n)^2 ≤ + 2*(a*N)*(b*gridInteractionCount N)+(b*gridInteractionCount N)^2 := by + gcongr + let A := d*N+c*gridInteractionCount N+t + let B := D*(2*(a*N)*(b*gridInteractionCount N)+(b*gridInteractionCount N)^2) + have hA : 0 ≤ A := by dsimp [A]; positivity + have hB : 0 ≤ B := by dsimp [B]; positivity + have hv : 0 ≤ δ^3/τ := div_nonneg (pow_nonneg hδ 3) hτ.le + calc + _ = η*(d*n*(δ*τ)+c*gridInteractionCount n*δ^2+δ^2*t)+ + D*(2*(a*n)*(b*gridInteractionCount n)+(b*gridInteractionCount n)^2)*(δ^3/τ) := by ring + _ ≤ η*(A*δ)+B*(δ^3/τ) := add_le_add + (mul_le_mul_of_nonneg_left hfirst hη) + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hcubic hD) hv) + _ = A*(δ*η)+B*(δ^3/τ) := by ring + _ ≤ A*(δ*η+δ^3/τ)+B*(δ*η+δ^3/τ) := add_le_add + (mul_le_mul_of_nonneg_left (le_add_of_nonneg_right hv) hA) + (mul_le_mul_of_nonneg_left (le_add_of_nonneg_left (mul_nonneg hδ hη)) hB) + _ = _ := by dsimp [A,B]; ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridPhaseCutoffs.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridPhaseCutoffs.lean new file mode 100644 index 0000000000000000000000000000000000000000..39eb4a5b0f454d2bd50624f04e684de5044bb46b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridPhaseCutoffs.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridSupportedCutoffs +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseCutoffBounds + +namespace OAI + +/-! Refined chart weights with their actual small-cell support, and +polynomial bounds after transport to a selected linear phase. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseGrid +open WeightedEstimates JetPolynomial PhaseGeometry + +def gridCutoffCompact (K : Compacts Base) (h : ℝ) (k : Index) : Compacts Base := + ⟨(K : Set Base) ∩ tsupport (cutoff h k), + K.isCompact.of_isClosed_subset (K.isCompact.isClosed.inter (isClosed_tsupport _)) + inter_subset_left⟩ + +def supportedCellCutoff {K : Compacts Base} (f : SupportedField (F := ℝ) K) + {a : Finset Index} {h : ℝ} (hh : 0 < h) (hK : (K : Set Base) ⊆ coverRegion a h) + (k : Index) : SupportedField (F := ℝ) (gridCutoffCompact K h k) := + ContDiffMapSupportedIn.of_support_subset (supportedNormalizedCutoff f hh hK k).contDiff + (fun x hx => by + have ht : x ∈ tsupport (fun y => f y * normalizedCutoff a h k y) := + subset_tsupport _ hx + exact ⟨f.tsupport_subset (tsupport_mul_subset_left ht), + normalizedCutoff_tsupport a h k (tsupport_mul_subset_right ht)⟩) + +@[simp] lemma supportedCellCutoff_apply {K : Compacts Base} + (f : SupportedField (F := ℝ) K) {a : Finset Index} {h : ℝ} + (hh : 0 < h) (hK : (K : Set Base) ⊆ coverRegion a h) (k : Index) (x : Base) : + supportedCellCutoff f hh hK k x = f x * normalizedCutoff a h k x := rfl + +theorem grid_phase_cutoff_bounds : + ∃ C : ℕ → ℝ, (∀ m, 1 ≤ C m) ∧ + ∀ {K : Compacts Base} (f : SupportedField (F := ℝ) K) + {a : Finset Index} {z : ℝ} (hz : 0 < z), z ≤ 1 → + ∀ hK : (K : Set Base) ⊆ coverRegion a (z^6), + ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → + (∀ m, WeightedBound univ 1 m (P m) f) → + ∀ (k : Index) {U : Set Base} (hU : IsOpen U) {ξ : Base} (hξ : ξ ≠ 0) + (hKU : (gridCutoffCompact K (z^6) k : Set Base) ⊆ U) + {s : ℝ≥0}, 0 < (s : ℝ) → s ≤ 1 → + ∀ {J w : ℝ}, 1 ≤ J → ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ J → + 1 ≤ w → ∀ m, + WeightedBound univ s m (C m*P m*J^m/z^(6*m)) + (w⁻¹ • chartPush (linearPhaseChart ξ hξ U hU) + (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn + (gridCutoffCompact K (z^6) k) hKU + (supportedCellCutoff f (pow_pos hz 6) hK k)) := by + obtain ⟨C,hC,hb⟩ := supported_normalized_cutoff_bounds + refine ⟨fun m => (m.factorial : ℝ)*C m,fun m => + one_le_mul_of_one_le_of_one_le (by + exact_mod_cast (show 1 ≤ m.factorial from Nat.factorial_pos m)) (hC m),?_⟩ + intro K f a z hz hz1 hK P hP hf k U hU ξ hξ hKU s hs hs1 J w hJ hi hw m + have hb' : WeightedBound univ s m (C m*P m/z^(6*m)) + (supportedCellCutoff f (pow_pos hz 6) hK k) := by + have hh := (hb f (pow_pos hz 6) (pow_le_one₀ hz.le hz1) hK P hP hf k m).shrink_scale + s.coe_nonneg hs1 + have hh' : WeightedBound univ s m (C m*P m/z^(6*m)) + (supportedNormalizedCutoff f (pow_pos hz 6) hK k) := by + simpa only [pow_mul] using hh + exact hh'.congr (fun _ _ => rfl) + have hw' : |w⁻¹| ≤ 1 := by + rw [abs_of_nonneg (inv_nonneg.mpr (zero_le_one.trans hw))] + exact inv_le_one_of_one_le₀ hw + have hp := linear_phase_cutoff_bound hU hξ (gridCutoffCompact K (z^6) k) hKU + hs hs1 (div_nonneg (mul_nonneg (zero_le_one.trans (hC m)) (hP m)) + (pow_nonneg hz.le _)) hJ hi hw' (supportedCellCutoff f (pow_pos hz 6) hK k) hb' + convert hp using 1 + unfold phaseCutoffBudget + ring + +end ClosedSurfaceR4.PhaseGrid + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridRestoredGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridRestoredGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..17e63e1ee87073221fc274d4f4c77c0655b4364a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridRestoredGeometry.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RestoredPhaseGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPureMargins +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas +import OAI.Geometry.Immersion.ClosedSurface.GoodAtlas + +namespace OAI + +/-! Quantitative normal margins for the restored phases selected on a +variable grid in one fixed atlas. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry PhaseGrid JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +abbrev GridPhaseIndex (s : A.centers → Finset Index) := Σ i : A.centers, (s i) × Fin 3 + +def gridPhaseLabel {s : A.centers → Finset Index} (a : A.GridPhaseIndex s) : + AtlasCellPhase (ι := A.centers) := (a.1,a.2.1.val,a.2.2) + +omit [CompactSpace M] in +lemma gridPhaseLabel_injective (s : A.centers → Finset Index) : + Function.Injective (A.gridPhaseLabel (s := s)) := by + rintro ⟨i,a,j⟩ ⟨k,b,l⟩ h + have hik : i = k := congrArg Prod.fst h + subst k + have hab : a = b := Subtype.ext (congrArg (fun x => x.2.1) h) + have hjl : j = l := congrArg (fun x => x.2.2) h + subst b + subst l + rfl + +def gridPhaseSupport (h : ℝ) {s : A.centers → Finset Index} (a : A.GridPhaseIndex s) : Set M := + tsupport (refinedCutoff (a.1 : M) (A.weight a.1) (s a.1) h a.2.1.val) + +def gridRestoredPhase {s : A.centers → Finset Index} + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ) (a : A.GridPhaseIndex s) : M → ℝ := + restore (a.1 : M) (A.outer a.1) + (phaseLinear (w (A.gridPhaseLabel a) • ξ (A.gridPhaseLabel a)) ∘ planeCoordinateIsometry) + +theorem grid_restored_quadratic_margin + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) + {ε κ : ℝ} (hε : 0 < ε) (hκ : 0 < κ) : + ∃ e : ℝ, 0 < e ∧ ∀ (h : ℝ) (s : A.centers → Finset Index) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ), (∀ a, 1 ≤ w a) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + (∀ a p, atlasActive (fun i : A.centers => (i : M)) A.weight s h a p → + atlasGram G (a.1 : M) p ≠ 0 ∧ atlasSecondTensor G (a.1 : M) p ≠ 0 ∧ + ε*‖atlasSecondTensor G (a.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor G (a.1 : M) p) (-(ξ a).2,(ξ a).1)‖) → + AtlasPairMargins (fun i : A.centers => (i : M)) A.weight s h κ ξ w G → + ∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact + (A.gridPhaseSupport h (s := s)) (fun _ => isClosed_tsupport _) k l) : Set SmallModes.Base) → + e*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k G) y‖ ≤ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k G) y) + (-(phaseDerivative (coordinatePhase + (A.globalQuadraticPhase (A.gridRestoredPhase ξ w (s := s)) k l)) y).2, + (phaseDerivative (coordinatePhase + (A.globalQuadraticPhase (A.gridRestoredPhase ξ w (s := s)) k l)) y).1)‖ := by + classical + have hsource (i : A.centers) : tsupport (A.weight i) ⊆ (chartAt Plane (i : M)).source := + by simpa only [chart_source] using A.weight_support i + obtain ⟨e,he,htransfer⟩ := finite_atlas_pure_margin + (fun i : A.centers => (i : M)) A.weight hsource + (fun i => HasCompactSupport.of_compactSpace (A.weight i)) hε + refine ⟨min e κ,lt_min he hκ,?_⟩ + intro h s ξ w hw G hG hlocal hpairs + have hlocalw (a : AtlasCellPhase (ι := A.centers)) (p : M) + (ha : atlasActive (fun i : A.centers => (i : M)) A.weight s h a p) : + atlasGram G (a.1 : M) p ≠ 0 ∧ atlasSecondTensor G (a.1 : M) p ≠ 0 ∧ + ε*‖atlasSecondTensor G (a.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor G (a.1 : M) p) + (-(w a • ξ a).2,(w a • ξ a).1)‖ := by + obtain ⟨hg,hb,hm⟩ := hlocal a p ha + refine ⟨hg,hb,?_⟩ + rw [norm_secondQuadratic_rotated_smul] + have hw2 : 1 ≤ (w a)^2 := by nlinarith [hw a] + have hn := norm_nonneg + (secondQuadratic (atlasSecondTensor G (a.1 : M) p) (-(ξ a).2,(ξ a).1)) + nlinarith + have hS (a : A.GridPhaseIndex s) : A.gridPhaseSupport h a ⊆ tsupport (A.weight a.1) := + refinedCutoff_tsupport_outer (a.1 : M) (A.weight a.1) (s a.1) h a.2.1.val + have hactive (a : A.GridPhaseIndex s) (p : M) (ha : p ∈ A.gridPhaseSupport h a) : + atlasActive (fun i : A.centers => (i : M)) A.weight s h (A.gridPhaseLabel a) p := + ⟨a.2.1.property,ha⟩ + have hB (k : A.centers) (p : M) (hp : p ∈ tsupport (A.weight k)) : + realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k G) (coordinateChart (k : M) p) = + atlasSecondTensor G (k : M) p := + (realSecondTensor_eventuallyEq + (A.vectorPlaneRead_eventually_coordinateMap G k (houter k) hp)).eq_of_nhds + apply A.restored_quadratic_margin (fun a : A.GridPhaseIndex s => a.1) + (fun a => w (A.gridPhaseLabel a) • ξ (A.gridPhaseLabel a)) + (A.gridPhaseSupport h) (fun _ => isClosed_tsupport _) hS houter G + · intro a k p ha hp + rw [hB k p hp] + exact (mul_le_mul_of_nonneg_right (min_le_left e κ) (norm_nonneg _)).trans + (htransfer h s (fun a => w a • ξ a) G hG hlocalw (A.gridPhaseLabel a) k p + (hactive a p ha) hp) + · intro a b k p hab ha hb hp + have has := hsource a.1 (hS a ha) + have hbs := hsource b.1 (hS b hb) + have hks := hsource k hp + have has' : p ∈ (coordinateChart (a.1 : M)).source := by + simpa only [coordinateChart_source] using has + have hbs' : p ∈ (coordinateChart (b.1 : M)).source := by + simpa only [coordinateChart_source] using hbs + have hks' : p ∈ (coordinateChart (k : M)).source := by + simpa only [coordinateChart_source] using hks + dsimp only + rw [hB k p hp, + atlasPhaseCovector_smul (a.1 : M) (k : M) _ _ hks' has', + atlasPhaseCovector_smul (b.1 : M) (k : M) _ _ hks' hbs'] + have hh := hpairs (A.gridPhaseLabel a) (A.gridPhaseLabel b) k p + (fun heq => hab (A.gridPhaseLabel_injective s heq)) (hactive a p ha) (hactive b p hb) hp + exact ⟨(mul_le_mul_of_nonneg_right (min_le_right e κ) (norm_nonneg _)).trans hh.1, + (mul_le_mul_of_nonneg_right (min_le_right e κ) (norm_nonneg _)).trans hh.2.1⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridSupportedCutoffs.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridSupportedCutoffs.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3f156b97b44e1dd1d8616b6cc90d2bc7f19db77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/GridSupportedCutoffs.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.Immersion.ClosedSurface.CompactPartition +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport + +namespace OAI + +/-! The actual normalized grid cutoffs multiplied by a supported chart +weight. The derivative constant is independent of the number of cells. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.WeightedEstimates + +lemma WeightedBound.to_unit_scale {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] {U : Set E} {s C : ℝ} {m : ℕ} + {f : E → F} (hb : WeightedBound U s m C f) (hs : 0 < s) (hs1 : s ≤ 1) + (hC : 0 ≤ C) : WeightedBound U 1 m (C/s^m) f := by + intro j hj x hx + simp only [one_pow,one_mul] + exact (hb.deriv_le hs hj hx).trans (div_le_div_of_nonneg_left hC + (pow_pos hs _) (pow_le_pow_of_le_one hs.le hs1 hj)) + +end ClosedSurfaceR4.WeightedEstimates + +namespace ClosedSurfaceR4.PhaseGrid +open WeightedEstimates JetPolynomial + +def supportedNormalizedCutoff {K : Compacts Base} (f : SupportedField (F := ℝ) K) + {a : Finset Index} {h : ℝ} (hh : 0 < h) (hK : (K : Set Base) ⊆ coverRegion a h) + (k : Index) : SupportedField (F := ℝ) K := by + refine ⟨fun x => f x * normalizedCutoff a h k x,?_,?_⟩ + · apply contDiff_of_tsupport_subset (coverRegion_open a h) + ((tsupport_mul_subset_left.trans f.tsupport_subset).trans hK) + exact f.contDiff.contDiffOn.mul + (normalizedCutoff_smooth hh (fun y hy => coverRegion_covers a h hy) k) + · intro x hx + change f x * normalizedCutoff a h k x = 0 + simp only [f.zero_on_compl hx,Pi.zero_apply,zero_mul] + +@[simp] lemma supportedNormalizedCutoff_apply {K : Compacts Base} + (f : SupportedField (F := ℝ) K) {a : Finset Index} {h : ℝ} + (hh : 0 < h) (hK : (K : Set Base) ⊆ coverRegion a h) (k : Index) (x : Base) : + supportedNormalizedCutoff f hh hK k x = f x * normalizedCutoff a h k x := rfl + +theorem supported_normalized_cutoff_bounds : + ∃ C : ℕ → ℝ, (∀ m, 1 ≤ C m) ∧ + ∀ {K : Compacts Base} (f : SupportedField (F := ℝ) K) + {a : Finset Index} {h : ℝ} (hh : 0 < h) (_hh1 : h ≤ 1) + (hK : (K : Set Base) ⊆ coverRegion a h) (P : ℕ → ℝ), + (∀ m, 0 ≤ P m) → (∀ m, WeightedBound univ 1 m (P m) f) → + ∀ k m, WeightedBound univ 1 m (C m*P m/h^m) + (supportedNormalizedCutoff f hh hK k) := by + obtain ⟨C,hC,hb⟩ := normalizedCutoff_weighted_bounds + refine ⟨fun m => 2^m*C m,fun m => one_le_mul_of_one_le_of_one_le + (one_le_pow₀ (by norm_num)) (hC m),?_⟩ + intro K f a h hh hh1 hK P hP hf k m + let U := coverRegion a h + have hU : IsOpen U := coverRegion_open a h + have hnorm := hb h hh a U hU (fun x hx => coverRegion_covers a h hx) k m + have hsm := normalizedCutoff_smooth hh (fun x hx => coverRegion_covers a h hx) k + have hprod := ((hf m).shrink_scale hh.le hh1).restrict_open hU + have hmul := hprod.real_mul hU.uniqueDiffOn hh.le (hP m) + (zero_le_one.trans (hC m)) f.contDiff.contDiffOn hsm hnorm + have hd : WeightedBound U h m (2^m*P m*C m) (supportedNormalizedCutoff f hh hK k) := + hmul + have hprod : 0 ≤ 2^m*P m*C m := + mul_nonneg (mul_nonneg (by positivity) (hP m)) (zero_le_one.trans (hC m)) + have hall := hd.extend_support hU + ((supportedNormalizedCutoff f hh hK k).tsupport_subset.trans hK) hprod + convert hall.to_unit_scale hh hh1 hprod using 1 + ring + +end ClosedSurfaceR4.PhaseGrid + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/HalfIntervalChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/HalfIntervalChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..74db34f20c5d04c5e0da6ac9f88232c7e71f960d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/HalfIntervalChart.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MatchedSubsetChart + +namespace OAI + +/-! Near its left endpoint, a closed nontrivial interval has the same +local topology as the nonnegative real half-line. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem half_interval_chart {δ : ℝ} (hδ : 0 < δ) : + ∃ c : OpenPartialHomeomorph (Icc (0:ℝ) δ) (Ici (0:ℝ)), + (⟨0,le_rfl,hδ.le⟩ : Icc (0:ℝ) δ) ∈ c.source ∧ + c ⟨0,le_rfl,hδ.le⟩ = ⟨0,by simp⟩ := by + let e := (OpenPartialHomeomorph.refl ℝ).restrOpen (Iio δ) isOpen_Iio + have hsource : (0:ℝ) ∈ e.source := ⟨mem_univ _,hδ⟩ + obtain ⟨c,hc,_,_,hf,_⟩ := matched_subset_chart e (Icc (0:ℝ) δ) (Ici (0:ℝ)) 0 hsource + ⟨le_rfl,hδ.le⟩ (by + intro x hx + change (0 ≤ x ∧ x ≤ δ) ↔ 0 ≤ x + exact ⟨And.left,fun h => ⟨h,hx.2.le⟩⟩) + refine ⟨c,hc,?_⟩ + apply Subtype.ext + exact hf _ hc + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ImmersedAtlasNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ImmersedAtlasNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..4f0ee4d03932d3393aa0ca6a8f15b9a0442ccc99 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ImmersedAtlasNormal.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorProjectedNormal +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasImmersionGeometry + +namespace OAI + +/-! Discharge the projection's Gram hypotheses from the actual immersion. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +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) + +omit [CompactSpace M] in +lemma planeRead_gram_of_immersion {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) {p : M} (hp : 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 := by + have he := A.vectorPlaneRead_eventually_coordinateMap F i (houter i) hp + change gramDet (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) _ dx) + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) _ dy) ≠ 0 + rw [he.fderiv_eq] + apply gramDet_ne_zero_of_injective + apply coordinateMap_injective_of_immersion hF hI (i : M) + change planeCoordinateIsometry (chart (i : M) p) ∈ (coordinateChart (i : M)).target + rw [planeCoordinateIsometry_chart] + exact (coordinateChart (i : M)).map_source (A.weight_support i hp) + +lemma planeWeight_gram_of_immersion {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hI : ∀ p, Function.Injective (surfaceDifferential F p)) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (i : A.centers) {x : SmallModes.Base} (hx : x ∈ tsupport (A.planeWeight i)) : + gramDet (coordDeriv dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (coordDeriv dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ≠ 0 := by + have hh := (A.supportedPlaneWeight i).tsupport_subset hx + rcases hh with ⟨q,hq,rfl⟩ + rcases hq with ⟨p,hp,rfl⟩ + exact A.planeRead_gram_of_immersion hF hI houter i hp + +theorem exterior_preferred_normal {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 → + (∀ p, Function.Injective (surfaceDifferential W p)) → + ∀ b c : ℝ, 0 ≤ b → 0 ≤ c → b+c < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 c (W-V) → + ∀ U : Set M, (∀ p ∈ U, V =ᶠ[𝓝 p] G) → + ContMDiffOn planeModel spaceModel ∞ (A.unitProjectedNormalField W n.vector) U ∧ + (∀ p ∈ U, ‖A.unitProjectedNormalField W n.vector p‖ = 1) ∧ + (∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential W p v) (A.unitProjectedNormalField W n.vector p) = 0) ∧ + (∀ p ∈ U, ‖A.unitProjectedNormalField W n.vector p-n.vector p‖ < ε) := by + obtain ⟨ρ,hρ,hclose⟩ := 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 hε + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW hWI b c hb hc hbc hGF hWV U hext + have hc := fun p hp => hclose G V W hG hV hW b c hb hc hbc hGF hWV p (hext p hp) + obtain ⟨hs,hu,hn⟩ := A.unitProjectedNormalField_properties hW n.smooth + (fun i x hx => A.planeWeight_gram_of_immersion hW hWI houter i hx) (fun p hp => (hc p hp).1) + exact ⟨hs,hu,hn,fun p hp => (hc p hp).2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentExactPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentExactPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc6fa4b5613d1f7fc4788c0e2c23a9c9dfef80a3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentExactPhase.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentUniformPhase +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 independentExactPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentExactPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentExactPhaseDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentExactPhaseDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentExactPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentExactPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_exact_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))) : + ∃ 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.independent_uniform_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 + apply data.A.exact_geometric_metric_from_fast_family h data.outer_locally_one R₁ c₁ c₂ + (D₀*V₀) hc₁ hc₂ (mul_nonneg hD₀ 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 (Dt*C) (N+1) ρ + (by positivity) hρ + refine ⟨min η η₀,Dt*C,(Dw+Ds)*Cv,lt_min hη hη₀, + mul_nonneg hDt hC,mul_nonneg (add_nonneg hDw hDs) hCv,?_⟩ + intro z hz hzη + have hzη' : z < η := hzη.trans_le (min_le_left _ _) + have hz1 := hzη'.le.trans hη1 + obtain ⟨G,V,hG,hV,hclose,hslow,hweighted,hzero,hshift,herror,hI,hB,hBmargin,hN,hext⟩ := + hfamily z hz hzη' + 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 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 (hzη.trans_le (min_le_right _ _))) + (fun j => (herr j).mono_order (Nat.zero_le 440)) + have hzeroA := hd₀ V 1 V₀ zero_lt_one le_rfl hV₀ hV hzero + 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 (by nlinarith) + 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 (by nlinarith) (sq_nonneg z) + refine ⟨V,hV,hzeroA,hwA,hsA,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/Atlas/IndependentPhaseProjections.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentPhaseProjections.lean new file mode 100644 index 0000000000000000000000000000000000000000..d010d7d8e362683dced68798810edd9928b03910 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentPhaseProjections.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonparallelPhaseCovectors + +namespace OAI + +/-! Independent linear phase parameters give open surjective projections. +This transfers the elementary nonparallel-covector condition to any finite +family of independently perturbed phases. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PhaseGeometry +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +def phasePairProjection (i j : ι) : (ι → CurvePlane) →L[ℝ] (CurvePlane × CurvePlane) := + (ContinuousLinearMap.proj i).prod (ContinuousLinearMap.proj j) + +omit [Fintype ι] in +lemma phasePairProjection_surjective {i j : ι} (hij : i ≠ j) : + Function.Surjective (phasePairProjection i j) := by + intro y + refine ⟨Function.update (Function.update (fun _ => 0) i y.1) j y.2,?_⟩ + apply Prod.ext + · simp [phasePairProjection,hij] + · simp [phasePairProjection] + +omit [Fintype ι] [DecidableEq ι] in +lemma phaseProjection_surjective (i : ι) : + Function.Surjective (ContinuousLinearMap.proj i : (ι → CurvePlane) →L[ℝ] CurvePlane) := by + intro y + exact ⟨fun _ => y,rfl⟩ + +lemma shifted_covectorDet_open_dense (a b : CurvePlane) : + IsOpen {z : CurvePlane × CurvePlane | covectorDet (z.1+a) (z.2+b) ≠ 0} ∧ + Dense {z : CurvePlane × CurvePlane | covectorDet (z.1+a) (z.2+b) ≠ 0} := by + have he : (fun z : CurvePlane × CurvePlane => (z.1+a,z.2+b)) = + (fun z => z + (a,b)) := rfl + constructor + · have hc : Continuous (fun z : CurvePlane × CurvePlane => (z.1+a,z.2+b)) := by fun_prop + exact covectorDet_open_dense.1.preimage hc + · change Dense ((fun z : CurvePlane × CurvePlane => (z.1+a,z.2+b)) ⁻¹' + {z | covectorDet z.1 z.2 ≠ 0}) + rw [he] + exact covectorDet_open_dense.2.preimage (isOpenMap_add_right (a,b)) + +lemma independent_covectorDet_open_dense {i j : ι} (hij : i ≠ j) (a b : CurvePlane) : + IsOpen {ell : ι → CurvePlane | covectorDet (ell i+a) (ell j+b) ≠ 0} ∧ + Dense {ell : ι → CurvePlane | covectorDet (ell i+a) (ell j+b) ≠ 0} := by + have h := shifted_covectorDet_open_dense a b + exact ⟨h.1.preimage (phasePairProjection i j).continuous, + h.2.preimage ((phasePairProjection i j).isOpenMap + (phasePairProjection_surjective hij))⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentShrinkingWeights.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentShrinkingWeights.lean new file mode 100644 index 0000000000000000000000000000000000000000..c06f673e92f99f3eb1182c57f5cfe60d586e620c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentShrinkingWeights.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingWeightContinuity +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! One open box of independent radius choices preserves a finite family of +actual circular weights uniformly. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] +variable {ι : Type*} [Fintype ι] + +/-- The radius neighborhood is fixed before all independent choices. -/ +theorem independent_shrinking_weights (p : ι → M) (w : ι → M → ℝ) (r0 : ι → ℝ) + (hw : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (w i)) + (hnon : ∀ i x, 0 ≤ w i x) (hr0 : ∀ i, 0 < r0 i) + (hreg : ∀ i, circularCoordinateRegion (p i) (r0 i) ⊆ (coordinateChart (p i)).target) + (hpos : ∀ i x, 0 < w i x ↔ x ∈ circularCoordinateDisk (p i) (r0 i)) + {eps : ℝ} (heps : 0 < eps) : + ∃ delta : ℝ, 0 < delta ∧ (∀ i, delta ≤ r0 i / 2) ∧ ∀ r : ι → ℝ, + (∀ i, r0 i-delta < r i ∧ r i < r0 i) → + (∀ i, 0 < r i) ∧ + (∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (shrinkingCircularWeight (p i) (w i) (r0 i) (r i))) ∧ + (∀ i x, 0 < shrinkingCircularWeight (p i) (w i) (r0 i) (r i) x ↔ + x ∈ circularCoordinateDisk (p i) (r i)) ∧ + (∀ i, tsupport (shrinkingCircularWeight (p i) (w i) (r0 i) (r i)) ⊆ + circularDiskClosure (p i) (r i)) ∧ + (∀ i x, |shrinkingCircularWeight (p i) (w i) (r0 i) (r i) x-w i x| < eps) := by + classical + choose d hd hdR hnear using fun i => shrinkingCircularWeight_uniform_perturbation + (p i) (w i) (hw i) (hnon i) (hr0 i) (hreg i) (hpos i) heps + obtain ⟨delta,hdelta,_,hsmall⟩ := finite_positive_threshold d hd + refine ⟨delta,hdelta,(fun i => (hsmall i).trans (hdR i)),?_⟩ + intro r hr + have hri (i : ι) : r0 i-d i < r i := by + have := hsmall i + linarith [(hr i).1] + have hres (i : ι) := hnear i (r i) (hri i) (hr i).2 + refine ⟨?_,fun i => (hres i).1,fun i => (hres i).2.1, + fun i => (hres i).2.2.1,fun i => (hres i).2.2.2⟩ + intro i + linarith [hdR i,hr0 i,hri i] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentTensorReadTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentTensorReadTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e62e5f419155059f36384981a66616fbdb1f1c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentTensorReadTolerance.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteScalarBounds + +namespace OAI + +/-! Small background-atlas norm gives small tensor readings in each +fixed primitive chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance readToleranceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance readToleranceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance readToleranceDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance readToleranceDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance readToleranceSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance readToleranceSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem tensor_read_tolerance {eta : ℝ} (heta : 0 < eta) : + ∃ eps : ℝ, 0 < eps ∧ ∀ u : ∀ p : M, CovariantTwoTensor p, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + A.TensorWeightedBound 1 0 eps u → + ∀ (i : B.centers) (y : JetPolynomial.Base), ‖B.tensorChartRead i u y‖ < eta := by + obtain ⟨D,hD,hchange⟩ := A.tensorWeightedBound_change_atlas B 0 + choose E hE hread using fun i : B.centers => B.tensorChartRead_bound i 0 + obtain ⟨eps,heps,hle⟩ := finite_positive_lower (fun i : B.centers => + (show 0 < eta/(2*(E i*D+1)) by have := hE i; positivity)) + refine ⟨eps,heps,?_⟩ + intro u hu hb i y + have hB := hchange u 1 eps zero_lt_one le_rfl heps.le hu hb + have hh := (hread i u 1 (D*eps) zero_lt_one le_rfl (mul_nonneg hD heps.le) hu hB).norm_le + (mem_univ y) + have hEi := hE i + have hd := (le_div_iff₀ (show 0 < 2*(E i*D+1) by positivity)).mp (hle i) + have he : 0 ≤ E i*D := mul_nonneg (hE i) hD + have hstrict : E i*(D*eps) < eta := by nlinarith + exact hh.trans_lt hstrict + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentUniformPhase.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentUniformPhase.lean new file mode 100644 index 0000000000000000000000000000000000000000..080565b971652dd212811c313f6d0985abee379a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IndependentUniformPhase.lean @@ -0,0 +1,276 @@ +import OAI.Geometry.SurfaceImmersion.Correction.IndependentAtlasMean +import OAI.Geometry.SurfaceImmersion.Atlas.MixedAtlasGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.IndependentPrimitiveNormalMargin +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 independentUniformPhaseRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentUniformPhaseRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentUniformPhaseRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentUniformPhaseRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentUniformPhaseRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentUniformPhaseRealizationSectionSpace (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_uniform_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 : ℕ, + ∃ (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 ∧ + 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 := 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)) + 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_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) 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⟩ := 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 (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 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⟩ + · 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/Atlas/InducedMetricReadTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/InducedMetricReadTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..133b75ec1137069a723ae9b004fe90711e83dae7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/InducedMetricReadTolerance.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.InducedMetricDifferenceBound +import OAI.Geometry.SurfaceImmersion.Atlas.IndependentTensorReadTolerance +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasNormalizationBounds + +namespace OAI + +/-! The finite-point C1 accuracy makes the actual scaled metric arbitrarily +close to its fixed reference in every primitive chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem induced_metric_read_tolerance {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (r : ℝ) {eta : ℝ} (heta : 0 < eta) : + ∃ eps : ℝ, 0 < eps ∧ ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → A.WeightedBound 1 1 eps (G-F) → + ∀ (i : B.centers) (y : JetPolynomial.Base), + ‖B.tensorChartRead i (inducedTensor (r • G)-inducedTensor (r • F)) y‖ < eta := by + obtain ⟨C,hC,hFb⟩ := A.exists_weighted_bound 1 hF + obtain ⟨E,hE,hmetric⟩ := A.induced_metric_difference_bound 0 + obtain ⟨delta,hdelta,hread⟩ := A.tensor_read_tolerance B heta + let K := r^2*E*(C+1) + have hK : 0 ≤ K := by dsimp [K]; positivity + let eps := min 1 (delta/(K+1)) + have heps : 0 < eps := lt_min zero_lt_one (div_pos hdelta (by linarith)) + have hKe : K*eps ≤ delta := by + have hh := (le_div_iff₀ (by linarith : 0 < K+1)).mp (min_le_right 1 (delta/(K+1))) + nlinarith + refine ⟨eps,heps,?_⟩ + intro G hG hclose i y + have hGb : A.WeightedBound 1 1 (C+1) G := by + have hh := A.weightedBound_add hF (hG.sub hF) zero_le_one hFb hclose + have heq : F+(G-F) = G := by abel + change A.WeightedBound 1 1 (C+eps) (F+(G-F)) at hh + rw [heq] at hh + exact fun i => (hh i).mono_const (by have hh : eps ≤ 1 := min_le_left _ _; linarith) + have hFb' : A.WeightedBound 1 1 (C+1) F := fun i => (hFb i).mono_const (by linarith) + have hb := hmetric (C+1) eps (by linarith) heps.le F G hF hG hFb' hGb hclose + have hs := A.tensorWeightedBound_const_smul + ((A.inducedTensor_smooth hG).sub_section (A.inducedTensor_smooth hF)) hb (r^2) + have heq : inducedTensor (r • G)-inducedTensor (r • F) = + r^2 • (inducedTensor G-inducedTensor F) := by + rw [inducedTensor_const_smul hG r,inducedTensor_const_smul hF r] + funext p + ext v w + change r^2*inducedTensor G p v w-r^2*inducedTensor F p v w = + r^2*(inducedTensor G p v w-inducedTensor F p v w) + ring + have hb' : A.TensorWeightedBound 1 0 delta (inducedTensor (r • G)-inducedTensor (r • F)) := by + rw [heq] + intro a + apply (hs a).mono_const + rw [abs_of_nonneg (sq_nonneg r)] + calc + r^2*(E*(C+1)*eps) = K*eps := by dsimp [K]; ring + _ ≤ delta := hKe + have hGs : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hFs : ContMDiff planeModel spaceModel ∞ (r • F) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hF + exact hread _ ((A.inducedTensor_smooth hGs).sub_section (A.inducedTensor_smooth hFs)) hb' i y + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/InputAtlasSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/InputAtlasSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..950c1cbf280b5aa2c9dd1208363bebc971bb8fd8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/InputAtlasSmallIncrement.lean @@ -0,0 +1,213 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InputAtlasFreeQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeResidual +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasIncrementBound +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds + +namespace OAI + +/-! Assemble a uniform nearby-map increment from fixed profiles and an adjusted mean. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputSmallAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputSmallAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputSmallAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputSmallAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputSmallAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputSmallAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem input_atlas_small_increment_fixed_phase + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : A.centers × Fin 3 → M → ℝ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (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 + φ k l)) x)) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ {n : A.centers → ℕ} + {P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ), + ∀ (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (D : ℕ → ℝ) (_hD : ∀ m, 0 ≤ D m) + (C E : ℕ → ℝ) (_hC : ∀ m, 0 ≤ C m) (_hE : ∀ m, 0 ≤ E m) (q : ℕ), + ∃ B T : ℕ → ℝ, + (∀ 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} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ a : A.centers × Fin 3, A.freeGlobalPhase d a.1 a.2 = φ a) → + (∀ i, (d i).G = A.jetChartMap i G) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → δ ≤ τ → ∀ u H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + (∀ 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)) → + ∃ 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 + classical + obtain ⟨ρ₀,hρ₀,hall⟩ := A.input_atlas_free_quadratic_correction_fixed_phase F hF φ hφ hImm hgood + refine ⟨ρ₀,hρ₀,?_⟩ + intro n P p ρ R hρ r reference D hD C E hC hE q + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose Af hAf hfree using fun m => A.uniform_atlas_free_size p hρ r reference q m (C (N m)) (hC (N m)) + choose Ef hEf hfreeRes using fun m => A.uniform_atlas_free_residual p hρ r reference q m (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := hall p hρ r reference D hD C hC q + let L : ℝ := ‖spaceCoordinates.symm.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + choose D hD hincrement using fun m => A.atlas_free_forced_increment_bound m + (L*Af (m+1)) (L*Cv (m+1)) + (mul_nonneg hL (zero_le_one.trans (hAf (m+1)))) (mul_nonneg hL (hCv (m+1))) + let B := fun m => L*(Af m+Cv m) + let T := fun m => Ef m+Ct m+E m+D m + have hB (m) : 0 ≤ B m := mul_nonneg hL (add_nonneg (zero_le_one.trans (hAf m)) (hCv m)) + have hT (m) : 0 ≤ T m := by + dsimp [T] + exact add_nonneg (add_nonneg (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m)) (hD m) + refine ⟨B,T,hB,hT,?_⟩ + intro G hG b hb hbρ hclose τ s d hfit hphase hdG hτ hs hτs hs1 hd hK δ hδ hδτ u H hu hH hball hbu hmean + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hη : τ/s ≤ 1 := (div_le_one₀ hs).mpr hτs + obtain ⟨W,hW,hwsize,hwres⟩ := hcorr G hG b hb hbρ hclose d hfit hphase hτ hs hτs hs1 hd hK δ hδ u hu hball hbu + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + let V := spaceCoordinates.symm ∘ W + have hUr := A.atlasFreeOscillation_smooth d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := spaceCoordinates.symm.contDiff.contMDiff.comp hUr + have hV : ContMDiff planeModel spaceModel ∞ V := spaceCoordinates.symm.contDiff.contMDiff.comp hW + have hbU (m) : A.WeightedBound τ m ((L*Af m)*(δ*τ)) U := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hUr hτ.le + (hfree m d hfit hτ hs hτs hs1 (le_refl 0) + (by simpa only [zero_div,add_zero] using hη) δ hδ u hu hball (hbu (N m))) + convert hh using 1 <;> dsimp [U,L] + all_goals ring + have hbV (m) : A.WeightedBound τ m ((L*Cv m)*δ^2) V := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hW hτ.le (hwsize m) + convert hh using 1 <;> dsimp [V,L] + all_goals ring + have hlin (m) : A.TensorWeightedBound τ m (Ef m*(δ*τ)*(τ/s)^(q+1)) (linearMetricTensor G U) := + hfreeRes m G hG d hdG hfit hτ hs hτs hs1 hK δ hδ u hu hball (hbu (N m)) + refine ⟨U+V,hU.add hV,?_,?_⟩ + · intro m k + apply ((A.weightedBound_add hU hV hτ.le (hbU m) (hbV m)) k).mono_const + have hsmall : δ^2 ≤ δ*τ := by nlinarith + calc + (L*Af m)*(δ*τ)+(L*Cv m)*δ^2 ≤ (L*Af m)*(δ*τ)+(L*Cv m)*(δ*τ) := + add_le_add le_rfl (mul_le_mul_of_nonneg_left hsmall (mul_nonneg hL (hCv m))) + _ = B m*(δ*τ) := by dsimp [B]; ring + · intro m k + have hforced : A.TensorWeightedBound τ m (Ct m*δ^2*(τ/s)^(q+1)) + (linearMetricTensor G V + A.atlasFreeQuadraticOscillation d hρ δ q u) := by + convert hwres m using 1 + ring + have hh := hincrement m d hρ δ q u hK G V hG hV H hH hτ hτ1 hδ hδτ + (Ef m*(δ*τ)*(τ/s)^(q+1)) (Ct m*δ^2*(τ/s)^(q+1)) (E m*δ^2*(τ/s)^(q+1)) + (hbU (m+1)) (hbV (m+1)) (hlin m) hforced (hmean m) + apply (hh k).mono_const + have hd1 : δ ≤ 1 := hδτ.trans hτ1 + have hdt : δ*τ ≤ δ := mul_le_of_le_one_right hδ hτ1 + have hd2 : δ^2 ≤ δ := by nlinarith + have hp : 0 ≤ (τ/s)^(q+1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hx : 0 ≤ δ^3/τ := by positivity + calc + Ef m*(δ*τ)*(τ/s)^(q+1) + Ct m*δ^2*(τ/s)^(q+1) + E m*δ^2*(τ/s)^(q+1) + D m*(δ^3/τ) + ≤ (Ef m+Ct m+E m)*(δ*(τ/s)^(q+1))+D m*(δ^3/τ) := by + have h1 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hdt (zero_le_one.trans (hEf m))) hp + have h2 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 (hCt m)) hp + have h3 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hd2 (hE m)) hp + nlinarith only [h1,h2,h3] + _ ≤ T m*(δ*(τ/s)^(q+1)+δ^3/τ) := by + dsimp [T] + have hmain : 0 ≤ δ*(τ/s)^(q+1) := mul_nonneg hδ hp + have hsum : 0 ≤ Ef m+Ct m+E m := add_nonneg (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m) + nlinarith [mul_nonneg (hD m) hmain,mul_nonneg hsum hx] + +theorem input_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) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r r₀ : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 (r₀ i) ρ R (reference i)) + (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) + (C E : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hE : ∀ m, 0 ≤ E m) (q : ℕ) : + ∃ (ρ₀ : ℝ) (B T : ℕ → ℝ), 0 < ρ₀ ∧ + (∀ 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} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ i, (d i).phase = (d₀ i).phase) → + (∀ i, (d i).G = A.jetChartMap i G) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → δ ≤ τ → ∀ u H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + (∀ 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)) → + ∃ 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 ⟨ρ₀,hρ₀,hall⟩ := A.input_atlas_small_increment_fixed_phase F hF + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d₀ a.1 a.2) hImm hgood + obtain ⟨B,T,hB,hT,hstep⟩ := hall p hρ r reference D hD C E hC hE q + refine ⟨ρ₀,B,T,hρ₀,hB,hT,?_⟩ + intro G hG b hb hbρ hclose τ s d hfit hphase hdG hτ hs hτs hs1 hd hK δ hδ hδτ u H + hu hH hball hbu hmean + apply hstep G hG b hb hbρ hclose d hfit ?_ hdG hτ hs hτs hs1 hd hK δ hδ hδτ u H + hu hH hball hbu hmean + intro a + unfold freeGlobalPhase + rw [hphase a.1] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntervalInteriorCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntervalInteriorCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..aee4a35ad7717749f22c54054bcb5b0e945d648b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntervalInteriorCutoff.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A compactly supported smooth interval cutoff with a full unit germ +at every point of a specified smaller closed interval. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma interval_interior_cutoff {a b c d : ℝ} (hac : a < c) (hdb : d < b) : + ∃ η : ℝ → ℝ, ContDiff ℝ ∞ η ∧ HasCompactSupport η ∧ + tsupport η ⊆ Ioo a b ∧ ∀ t ∈ Icc c d, η =ᶠ[𝓝 t] 1 := by + let l := (a+c)/2 + let r := (d+b)/2 + have hsub : Icc l r ⊆ Ioo a b := by + intro t ht + dsimp [l,r] at ht + constructor <;> linarith [ht.1,ht.2] + obtain ⟨η,hη,hc,_hval,hs,h1⟩ := CollarVelocity.compact_cutoff isCompact_Icc isOpen_Ioo hsub + refine ⟨η,hη,hc,hs,?_⟩ + intro t ht + have htI : t ∈ Ioo l r := by + dsimp [l,r] + constructor <;> linarith [ht.1,ht.2] + filter_upwards [isOpen_Ioo.mem_nhds htI] with y hy + exact h1 y ⟨hy.1.le,hy.2.le⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntrinsicPhaseChartGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntrinsicPhaseChartGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..e23c8f2735387d57d603971a7cd9148db60189e1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/IntrinsicPhaseChartGeometry.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricConnectionNaturality +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredJetGeometry + +namespace OAI + +/-! Transport immersion, preferred normal, convexity and forbidden antipodes +through the genuine inverse phase chart. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology Matrix +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes VelocityFrame NormalFrame + +lemma inverse_phase_chart_geometry {F n : Base → Fin 4 → ℝ} {φ : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = φ x) + (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) + (hH : ∀ x ∈ e.source, ∀ v : Base, v ≠ 0 → + 0 < coordinateMetricHessian (inducedCoordinateMetric F) φ x v v) : + ∀ p ∈ e.target, + Function.Injective (fderiv ℝ (F ∘ e.symm) p) ∧ + (coordDeriv dx (F ∘ e.symm) p ⬝ᵥ (n ∘ e.symm) p = 0 ∧ + coordDeriv dy (F ∘ e.symm) p ⬝ᵥ (n ∘ e.symm) p = 0 ∧ + (n ∘ e.symm) p ⬝ᵥ (n ∘ e.symm) p = 1) ∧ + 0 < coordinateMetricHessian (inducedCoordinateMetric (F ∘ e.symm)) Prod.fst p dy dy := by + intro p hp + have hip := inverse_chart_derivative_injective e he hi hp + have hD : 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 + have hv : fderiv ℝ e.symm p dy ≠ 0 := by + intro hz + have heq := hip (hz.trans (map_zero (fderiv ℝ e.symm p)).symm) + exact (show (dy : Base) ≠ 0 from by simp [dy]) heq + refine ⟨?_,?_,?_⟩ + · rw [fderiv_comp p (hF.differentiable (by simp) _) (hi.differentiable (by simp) _)] + exact (hI _ (e.map_target hp)).comp hip + · have hc (v : Base) : + coordDeriv v (F ∘ e.symm) p ⬝ᵥ (n ∘ e.symm) p = 0 := by + rw [coordDeriv_comp_smooth hF hi] + exact (hN _ (e.map_target hp)).1 _ + exact ⟨hc dx,hc dy,(hN _ (e.map_target hp)).2⟩ + · have hcomp : φ ∘ e.symm =ᶠ[𝓝 p] Prod.fst := by + filter_upwards [e.open_target.mem_nhds hp] with x hx + change φ (e.symm x) = x.1 + rw [← hphase,e.right_inv hx] + rw [phase_chart_hessian_dy hF hφ hi p hcomp (hI _ (e.map_target hp)) hD] + exact hH _ (e.map_target hp) _ hv + +lemma inverse_phase_chart_antipode {F n : Base → Fin 4 → ℝ} + (hF : ContDiff ℝ ∞ F) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : Base} (hp : p ∈ e.target) + (hI : Function.Injective (fderiv ℝ F (e.symm p))) + (hB : ∀ v : Base, v ≠ 0 → realSecondForm F v v (e.symm p) ≠ 0 ∧ + normalize (realSecondForm F v v (e.symm p)) ≠ -n (e.symm p)) : + realSecondForm (F ∘ e.symm) dy dy p ≠ 0 ∧ + normalize (realSecondForm (F ∘ e.symm) dy dy p) ≠ -(n ∘ e.symm) p := by + have hD : 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 + have hv : fderiv ℝ e.symm p dy ≠ 0 := by + intro hz + have heq := inverse_chart_derivative_injective e he hi hp + (hz.trans (map_zero (fderiv ℝ e.symm p)).symm) + exact (show (dy : Base) ≠ 0 from by simp [dy]) heq + rw [realSecondForm_comp_smooth hF hi dy dy p (gramDet_ne_zero_of_injective _ hI) hD] + exact hB _ hv + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetMetricCoordinatePullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetMetricCoordinatePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..691a1d1a8bbedc6a96ce5b4e541b2f4e293b4926 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetMetricCoordinatePullback.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback +import OAI.Geometry.Immersion.ClosedSurface.TensorCoordinates + +namespace OAI + +/-! The complete metric-plus-polynomial operator transforms through fixed +nonlinear coordinates, including its finite periodic error. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open RealModes + +lemma metric_coordinate_pullback {F : Base → Space} {T : Base → Base} + (hF : ContDiff ℝ ∞ F) (hT : ContDiff ℝ ∞ T) (x : Base) : + realMetricTensor ((F ∘ T) ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) = + tensorCoordinatePullbackValue T x + (realMetricTensor (F ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry (T x))) := by + let τ : SmallModes.Base → SmallModes.Base := + planeCoordinateIsometry ∘ T ∘ planeCoordinateIsometry.symm + have hτ : ContDiff ℝ ∞ τ := planeCoordinateIsometry.contDiff.comp + (hT.comp planeCoordinateIsometry.symm.contDiff) + have he : (F ∘ planeCoordinateIsometry.symm) ∘ τ = + (F ∘ T) ∘ planeCoordinateIsometry.symm := by + funext p + simp [τ] + rw [← he,realMetricTensor_comp + ((hF.comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) _) (hτ.differentiable (by simp) _)] + have hd : fderiv ℝ τ (planeCoordinateIsometry x) = tensorCoordinateDerivative T x := by + dsimp [τ] + rw [fderiv_comp _ (planeCoordinateIsometry.differentiableAt) + ((hT.comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) _), + fderiv_comp _ (hT.differentiable (by simp) _) planeCoordinateIsometry.symm.differentiableAt] + simp only [LinearIsometryEquiv.fderiv,LinearIsometryEquiv.symm_apply_apply] + rfl + simp only [PhaseMean.pullbackField,hd,τ,Function.comp_apply,LinearIsometryEquiv.symm_apply_apply,tensorCoordinatePullbackValue] + +lemma metric_coordinate_pullback_germ {F H : Base → Space} {T : Base → Base} + (hF : ContDiff ℝ ∞ F) (hT : ContDiff ℝ ∞ T) {x : Base} + (hrel : H =ᶠ[𝓝 x] F ∘ T) : + realMetricTensor (H ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) = + tensorCoordinatePullbackValue T x + (realMetricTensor (F ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry (T x))) := by + have hh : H ∘ planeCoordinateIsometry.symm =ᶠ[𝓝 (planeCoordinateIsometry x)] + (F ∘ T) ∘ planeCoordinateIsometry.symm := + hrel.comp_tendsto (by simpa only [LinearIsometryEquiv.symm_apply_apply] using + (planeCoordinateIsometry.symm.continuous.tendsto (planeCoordinateIsometry x))) + rw [← metric_coordinate_pullback hF hT] + ext i + simp only [realMetricTensor_apply,realMetric,SmallModes.coordDeriv,hh.fderiv_eq] + +namespace Perturbation +lemma coordinateMetricMap_coordinatePullback {n : ℕ} (P : Fin 3 → Fin n → Expression) + {T S : Base → Base} (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, T ∘ S =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) (z : ℝ) {x : Base} (hx : x ∈ U) : + coordinateMetricMap (tensorPolynomialCoordinatePullback P T S) z H (planeCoordinateIsometry x) = + tensorCoordinatePullbackValue T x (coordinateMetricMap P z G (planeCoordinateIsometry (T x))) := by + have hh : H =ᶠ[𝓝 x] G ∘ T := by + filter_upwards [hU.mem_nhds hx] with y hy + exact hrel y hy + simp only [coordinateMetricMap,Pi.add_apply,map_add] + rw [metric_coordinate_pullback_germ hG hT hh, + tensorPolynomialCoordinatePullback_eval P hT hS hU hST hTS hG hH hrel z 0 hx] + +lemma coordinate_remainder_pullback {n : ℕ} (P : Fin 3 → Fin n → Expression) + {T S : Base → Base} (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, T ∘ S =ᶠ[𝓝 (T x)] id) + {G H V W : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hV : ContDiff ℝ ∞ V) + (hbase : ∀ x ∈ U, H x = G (T x)) (hvalue : ∀ x ∈ U, W x = V (T x)) + (B : Base → PhaseMean.Tensor) (z : ℝ) {x : Base} (hx : x ∈ U) : + realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + coordinateMetricMap (tensorPolynomialCoordinatePullback P T S) z H (planeCoordinateIsometry x) - + tensorCoordinatePullbackValue T x (B (T x)) = + tensorCoordinatePullbackValue T x + (realMetricTensor (V ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry (T x)) - + coordinateMetricMap P z G (planeCoordinateIsometry (T x)) - B (T x)) := by + have hv : W =ᶠ[𝓝 x] V ∘ T := by + filter_upwards [hU.mem_nhds hx] with y hy + exact hvalue y hy + rw [metric_coordinate_pullback_germ hV hT hv, + coordinateMetricMap_coordinatePullback P hT hS hU hST hTS hG hH hbase z hx,map_sub,map_sub] + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetPhaseChartFromReal.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetPhaseChartFromReal.lean new file mode 100644 index 0000000000000000000000000000000000000000..6acb91f44092599d2badba115fecc7607c78ea11 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JetPhaseChartFromReal.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformCenteredCharts +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts + +namespace OAI + +/-! The whole-disk real phase charts in the coordinate representation used +by the nonlinear primitive construction. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates SmallModes + +def jetPhaseChart (e : OpenPartialHomeomorph Base Base) : + OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base := + (baseEquiv.toHomeomorph.transOpenPartialHomeomorph e).transHomeomorph baseEquiv.symm.toHomeomorph + +lemma jetPhaseChart_apply (e : OpenPartialHomeomorph Base Base) (x : JetPolynomial.Base) : + jetPhaseChart e x = baseEquiv.symm (e (baseEquiv x)) := rfl + +lemma jetPhaseChart_symm_apply (e : OpenPartialHomeomorph Base Base) (x : JetPolynomial.Base) : + (jetPhaseChart e).symm x = baseEquiv.symm (e.symm (baseEquiv x)) := rfl + +lemma jetPhaseChart_source (e : OpenPartialHomeomorph Base Base) : + (jetPhaseChart e).source = baseEquiv ⁻¹' e.source := rfl + +lemma jetPhaseChart_smooth {e : OpenPartialHomeomorph Base Base} (he : ContDiff ℝ ∞ e) : + ContDiff ℝ ∞ (jetPhaseChart e) := + baseEquiv.symm.contDiff.comp (he.comp baseEquiv.contDiff) + +lemma jetPhaseChart_symm_smooth {e : OpenPartialHomeomorph Base Base} + (hi : ContDiff ℝ ∞ e.symm) : ContDiff ℝ ∞ (jetPhaseChart e).symm := + baseEquiv.symm.contDiff.comp (hi.comp baseEquiv.contDiff) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma surfacePhaseChart_jetPhaseChart_apply (q p : M) (e : OpenPartialHomeomorph Base Base) : + surfacePhaseChart q (jetPhaseChart e) p = e (coordinateChart q p) := by + rw [surfacePhaseChart_apply,jetPhaseChart_apply,baseEquiv.apply_symm_apply] + rfl + +lemma surfacePhaseChart_jetPhaseChart_source (q : M) (e : OpenPartialHomeomorph Base Base) : + (surfacePhaseChart q (jetPhaseChart e)).source = + (coordinateChart q).source ∩ (coordinateChart q) ⁻¹' e.source := by + ext p + change (p ∈ (FiniteOrderSmoothing.chart q).source ∧ + baseEquiv (FiniteOrderSmoothing.chart q p) ∈ e.source) ↔ _ + rw [FiniteOrderSmoothing.chart_source,coordinateChart_source] + rfl + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/JoinTimeCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JoinTimeCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..af1d67ac6c4df991c198deaf90c3a4fe96f4be90 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/JoinTimeCharts.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactTimeChart +import OAI.Geometry.SurfaceImmersion.Geometry.TimeBlendDomain +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTimeOverlap + +namespace OAI + +/-! Adjacent charts straightening the same regular arc can be joined, +retaining the longitudinal coordinate and both exterior 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] + [IsManifold planeModel ∞ M] [T2Space M] [SigmaCompactSpace M] [Nonempty M] + +theorem join_time_charts {F : M → ℝ} (hF : ContMDiff planeModel 𝓘(ℝ) ∞ F) + {γ : ℝ → M} {a b e : ℝ} (hab : a < b) (hbe : b < e) + (hγ : ∀ t ∈ Icc a e, ContinuousAt γ t) + {W : Set ℝ} (hW : W ∈ 𝓝 b) (hIW : Icc a e ⊆ W) + (c d : SurfaceTimeChart F) + (hc : ∀ t ∈ Icc a b, ∀ᶠ s in 𝓝[W] t, + γ s ∈ c.coord.source ∧ c.coord (γ s) = ![0,s]) + (hd : ∀ t ∈ Icc b e, ∀ᶠ s in 𝓝[W] t, + γ s ∈ d.coord.source ∧ d.coord (γ s) = ![0,s]) : + ∃ k : SurfaceTimeChart F, ∀ t ∈ Icc a e, ∀ᶠ s in 𝓝[W] t, + γ s ∈ k.coord.source ∧ k.coord (γ s) = ![0,s] := by + have hcb : ∀ᶠ s in 𝓝 b, γ s ∈ c.coord.source ∧ c.coord (γ s) = ![0,s] := by + simpa only [nhdsWithin_eq_nhds.mpr hW] using hc b ⟨hab.le,le_rfl⟩ + have hdb : ∀ᶠ s in 𝓝 b, γ s ∈ d.coord.source ∧ d.coord (γ s) = ![0,s] := by + simpa only [nhdsWithin_eq_nhds.mpr hW] using hd b ⟨le_rfl,hbe.le⟩ + obtain ⟨d',hsource,haxis,hpos⟩ := c.positive_transition d (γ b) + (Filter.Eventually.self_of_nhds hcb).1 (Filter.Eventually.self_of_nhds hdb).1 + have hd' : ∀ t ∈ Icc b e, ∀ᶠ s in 𝓝[W] t, + γ s ∈ d'.coord.source ∧ d'.coord (γ s) = ![0,s] := by + intro t ht + filter_upwards [hd t ht] with s hs + exact ⟨hsource.symm ▸ hs.1,haxis _ _ hs.2⟩ + have hdb' : ∀ᶠ s in 𝓝 b, γ s ∈ d'.coord.source ∧ d'.coord (γ s) = ![0,s] := by + simpa only [nhdsWithin_eq_nhds.mpr hW] using hd' b ⟨le_rfl,hbe.le⟩ + obtain ⟨V,hV,hbV,hVsub,hVpos⟩ := c.positive_overlap d' (γ b) + (Filter.Eventually.self_of_nhds hcb).1 (Filter.Eventually.self_of_nhds hdb').1 hpos + have hcommon : ∀ᶠ s in 𝓝 b, γ s ∈ V ∧ + (γ s ∈ c.coord.source ∧ c.coord (γ s) = ![0,s]) ∧ + (γ s ∈ d'.coord.source ∧ d'.coord (γ s) = ![0,s]) := by + filter_upwards [(hγ b ⟨hab.le,hbe.le⟩).eventually (hV.mem_nhds hbV),hcb,hdb'] with s hs hcs hds + exact ⟨hs,hcs,hds⟩ + obtain ⟨O,hOsub,hO,hbO⟩ := eventually_nhds_iff.mp hcommon + obtain ⟨l,r,hal,hlb,hbr,hre,hlrsub⟩ := + straddling_compact_interval hab hbe (hO.mem_nhds hbO) + have hlr : l < r := hlb.trans hbr + let H := surfaceTimeBlend c d' (timeCutoff l r) + let U := timeBlendDomain c d' l r + have hU : IsOpen U := timeBlendDomain_open c d' l r hF.continuous + have hHgerm : ∀ t ∈ Icc a e, ∀ᶠ s in 𝓝[W] t, + γ s ∈ U ∧ H (γ s) = ![0,s] := by + intro t ht + by_cases htl : t < l + · have hct := hc t ⟨ht.1,htl.le.trans hlb.le⟩ + filter_upwards [hct,nhdsWithin_le_nhds (isOpen_Iio.mem_nhds htl)] with s hs hsl + refine ⟨Or.inl (Or.inl ⟨hs.1,?_⟩),?_⟩ + · change F (γ s) < l + rw [← c.time _ hs.1,hs.2] + exact hsl + · change surfaceTimeBlend c d' (timeCutoff l r) (γ s) = _ + rw [surfaceTimeBlend_zero c d' (timeCutoff_zero hlr ?_)] + · exact hs.2 + · rw [← c.time _ hs.1,hs.2]; exact hsl.le + · by_cases hrt : r < t + · have hdt := hd' t ⟨hbr.le.trans hrt.le,ht.2⟩ + filter_upwards [hdt,nhdsWithin_le_nhds (isOpen_Ioi.mem_nhds hrt)] with s hs hrs + refine ⟨Or.inr ⟨hs.1,?_⟩,?_⟩ + · change r < F (γ s) + rw [← d'.time _ hs.1,hs.2]; exact hrs + · change surfaceTimeBlend c d' (timeCutoff l r) (γ s) = _ + rw [surfaceTimeBlend_one c d' (timeCutoff_one hlr ?_)] + · exact hs.2 + · rw [← d'.time _ hs.1,hs.2]; exact hrs.le + · have htO := hlrsub ⟨le_of_not_gt htl,le_of_not_gt hrt⟩ + filter_upwards [nhdsWithin_le_nhds (hO.mem_nhds htO)] with s hs + have hsc := hOsub s hs + exact ⟨Or.inl (Or.inr ⟨hsc.2.1.1,hsc.2.2.1⟩), + surfaceTimeBlend_axis c d' hsc.2.1.2 hsc.2.2.2⟩ + let K := γ '' Icc a e + have hK : IsCompact K := isCompact_Icc.image_of_continuousOn + (fun t ht => (hγ t ht).continuousWithinAt) + have hKU : K ⊆ U := by + rintro x ⟨t,ht,rfl⟩ + exact (mem_of_mem_nhdsWithin (hIW ht) (hHgerm t ht)).1 + have hHi : K.InjOn H := by + rintro x ⟨t,ht,rfl⟩ y ⟨s,hs,rfl⟩ heq + have hta := (mem_of_mem_nhdsWithin (hIW ht) (hHgerm t ht)).2 + have hsa := (mem_of_mem_nhdsWithin (hIW hs) (hHgerm s hs)).2 + have hts : t = s := by + have hh := congrFun (hta.symm.trans (heq.trans hsa)) (1:Fin 2) + exact hh + rw [hts] + have hHr : ∀ x ∈ K, Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) H x) := by + rintro x ⟨t,ht,rfl⟩ + by_cases htl : t < l + · have hct := mem_of_mem_nhdsWithin (hIW ht) (hc t ⟨ht.1,htl.le.trans hlb.le⟩) + have hFt : F (γ t) = t := by rw [← c.time _ hct.1,hct.2]; rfl + have heq := surfaceTimeBlend_left_germ c d' hF.continuous hlr (hFt ▸ htl) + change Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) + (surfaceTimeBlend c d' (timeCutoff l r)) (γ t)) + rw [heq.mfderiv_eq] + exact c.regular hct.1 + · by_cases hrt : r < t + · have hdt := mem_of_mem_nhdsWithin (hIW ht) (hd' t ⟨hbr.le.trans hrt.le,ht.2⟩) + have hFt : F (γ t) = t := by rw [← d'.time _ hdt.1,hdt.2]; rfl + have heq := surfaceTimeBlend_right_germ c d' hF.continuous hlr (hFt ▸ hrt) + change Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) + (surfaceTimeBlend c d' (timeCutoff l r)) (γ t)) + rw [heq.mfderiv_eq] + exact d'.regular hdt.1 + · have htcommon := hOsub t (hlrsub ⟨le_of_not_gt htl,le_of_not_gt hrt⟩) + exact surfaceTimeBlend_regular c d' (timeCutoff_smooth l r) hF (γ t) + htcommon.2.1.1 htcommon.2.2.1 (htcommon.2.2.2.trans htcommon.2.1.2.symm) + (hVpos _ htcommon.1) (timeCutoff_mem l r _) + obtain ⟨k,hKk,hkf⟩ := compact_time_chart hK hU hKU + (timeBlendDomain_smooth c d' hlr hF) (fun x hx => timeBlendDomain_time c d' hlr hx) hHi hHr + refine ⟨k,?_⟩ + intro t ht + have htk : γ t ∈ k.coord.source := hKk ⟨t,ht,rfl⟩ + filter_upwards [((hγ t ht).eventually (k.coord.open_source.mem_nhds htk)).filter_mono nhdsWithin_le_nhds,hHgerm t ht] with s hs hsg + exact ⟨hs,(hkf hs).trans hsg.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LineChartEndpointObstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LineChartEndpointObstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..41d30afe936a0b0ceda5cc062e2f4467613d4e1e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LineChartEndpointObstruction.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.IntervalNoInteriorExtremum +import OAI.Geometry.SurfaceImmersion.Atlas.EmbeddingNeighborhoodChart + +namespace OAI + +/-! An endpoint of an embedded compact interval cannot contain a +neighborhood of a point with a real-line chart. -/ +noncomputable section +open Set Filter Metric Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem line_chart_not_interval_endpoint + (d : OpenPartialHomeomorph X ℝ) {a b : ℝ} + (c : OpenPartialHomeomorph X (Icc a b)) {p : X} + (hd : p ∈ d.source) (hc : p ∈ c.source) + (hend : (c p:ℝ) = a ∨ (c p:ℝ) = b) : False := by + let t₀ := d p + let U := d.target ∩ d.symm ⁻¹' c.source + have hU : IsOpen U := d.isOpen_inter_preimage_symm c.open_source + have hpU : t₀ ∈ U := by + exact ⟨d.map_source hd,by change d.symm (d p) ∈ c.source; rwa [d.left_inv hd]⟩ + obtain ⟨r,hr,hsub⟩ := Metric.mem_nhds_iff.mp (hU.mem_nhds hpU) + let J := Ioo (t₀-r) (t₀+r) + have hJU : J ⊆ U := by + intro t ht + apply hsub + rw [mem_ball,Real.dist_eq,abs_lt] + constructor <;> dsimp [J] at ht <;> linarith [ht.1,ht.2] + let f : ℝ → ℝ := fun t => (c (d.symm t):ℝ) + have hf : ContinuousOn f J := + continuous_subtype_val.continuousOn.comp + (c.continuousOn.comp (d.continuousOn_symm.mono (fun t ht => (hJU ht).1)) + (fun t ht => (hJU ht).2)) (fun _ _ => mem_univ _) + have hi : InjOn f J := by + intro t ht u hu he + apply d.symm.injOn (hJU ht).1 (hJU hu).1 + apply c.injOn (hJU ht).2 (hJU hu).2 + exact Subtype.ext he + have ht₀ : t₀ ∈ J := by + change t₀-r < t₀ ∧ t₀ < t₀+r + constructor <;> linarith + have hfp : f t₀ = (c p:ℝ) := by dsimp [f,t₀]; rw [d.left_inv hd] + rcases hend with hend | hend + · apply injective_interval_no_minimum ht₀ hf hi + intro t _ + rw [hfp,hend] + exact (c (d.symm t)).property.1 + · apply injective_interval_no_maximum ht₀ hf hi + intro t _ + rw [hfp,hend] + exact (c (d.symm t)).property.2 + +theorem compact_arc_endpoint_not_interior + (d : OpenPartialHomeomorph X ℝ) {a b : ℝ} (hab : a ≤ b) + (γ : Icc a b → X) (hγ : IsEmbedding γ) {p : X} (hp : p ∈ d.source) + (hend : p = γ ⟨a,le_rfl,hab⟩ ∨ p = γ ⟨b,hab,le_rfl⟩) : + p ∉ interior (range γ) := by + intro hpin + rcases hend with hend | hend + · obtain ⟨c,hc,hcp⟩ := embedding_neighborhood_chart γ hγ ⟨a,le_rfl,hab⟩ + isOpen_interior (hend ▸ hpin) interior_subset + apply line_chart_not_interval_endpoint d c hp (hend.symm ▸ hc) + left + rw [hend,hcp] + · obtain ⟨c,hc,hcp⟩ := embedding_neighborhood_chart γ hγ ⟨b,hab,le_rfl⟩ + isOpen_interior (hend ▸ hpin) interior_subset + apply line_chart_not_interval_endpoint d c hp (hend.symm ▸ hc) + right + rw [hend,hcp] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearMetricChartReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearMetricChartReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8c641be7b725cb2ced51bc79b323e0221c8461d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearMetricChartReconstruction.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricChartReconstruction +import OAI.Geometry.Immersion.ClosedSurface.DoubleModes + +namespace OAI + +/-! The mixed metric is reconstructed from the genuine chart readings. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance linearReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance linearReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance linearReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance linearReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance linearReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance linearReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma vectorPlaneRead_add {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + (i : A.centers) (F G : M → V) : + A.vectorPlaneRead i (F+G) = A.vectorPlaneRead i F + A.vectorPlaneRead i G := by + funext x + by_cases hx : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target <;> + simp [vectorPlaneRead,vectorChartRead,localize,hx,smul_add] + +theorem linearMetric_from_chart_reads {F G : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hG : ContMDiff planeModel spaceModel ∞ G) : + A.tensorPlaneRestore (fun i y => (A.planeWeight i y)^2 • + RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (spaceCoordinates ∘ A.vectorPlaneRead i G) y) = linearMetricTensor F G := by + have he := A.metric_from_chart_reads (hF.add hG) + rw [inducedTensor_add hF hG] at he + have hlocal : (fun i y => (A.planeWeight i y)^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i (F+G)) y) = + (fun i y => (A.planeWeight i y)^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y) + + (fun i y => (A.planeWeight i y)^2 • + RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (spaceCoordinates ∘ A.vectorPlaneRead i G) y) + + (fun i y => (A.planeWeight i y)^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) y) := by + funext i y + rw [A.vectorPlaneRead_add] + have hc : spaceCoordinates ∘ (A.vectorPlaneRead i F + A.vectorPlaneRead i G) = + fun x => (spaceCoordinates ∘ A.vectorPlaneRead i F) x + + (spaceCoordinates ∘ A.vectorPlaneRead i G) x := by + funext x + exact map_add spaceCoordinates _ _ + rw [hc,RealModes.realMetricTensor_add + ((spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).differentiable (by simp) y) + ((spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)).differentiable (by simp) y)] + simp only [smul_add,Pi.add_apply] + rw [hlocal,A.tensorPlaneRestore_add,A.tensorPlaneRestore_add, + A.metric_from_chart_reads hF,A.metric_from_chart_reads hG] at he + exact add_left_cancel (add_right_cancel he) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..41024a46503c5aa74e6b0450d1f376076f48f18c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseBudgets.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LinearPhaseMeanGeometry +import OAI.Geometry.SurfaceImmersion.Correction.CompactMeanBudgets + +namespace OAI + +/-! Actual numerical mean budgets for the restricted linear phase chart, +obtained from compact containment in the immersion's good-direction set. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes PhaseMean + +theorem linear_phase_budgets {F : RField 4} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor F x) ξ) + {ψ : Base → ℝ} (hψ : ContDiff ℝ ∞ ψ) (Q : PhaseMean.Tensor →L[ℝ] ℝ) : + Nonempty (Budgets U (linearPhaseChart ξ hξ U hU).target 1 + (F ∘ (linearPhaseChart ξ hξ U hU).symm) ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm) := by + let L := phaseEquiv ξ hξ + let V := L '' U + let KV := L '' K + let ΩV := L '' Ω + have hV : IsOpen V := L.isOpenMap U hU + have hKV : IsCompact KV := hK.image L.continuous + have hVK : V ⊆ KV := image_mono hUK + have hKVΩ : KV ⊆ ΩV := image_mono hKΩ + have hmap : ContDiff ℝ ∞ (F ∘ L.symm) := hF.comp L.symm.contDiff + have hdom : RealModeDomain (F ∘ L.symm) ΩV := + realModeDomain_phase hF hΩ hξ hImm hgood + have hpull : ContDiffOn ℝ ∞ (pullbackField (linearPhaseChart ξ hξ U hU)) univ := by + have hh : pullbackField (linearPhaseChart ξ hξ U hU) = + fun _ => pullback (phaseEquiv ξ hξ).toContinuousLinearMap := + funext (pullbackField_linearPhaseChart hξ hU) + rw [hh] + exact contDiffOn_const + exact compact_mean_budgets hU hV isOpen_univ hK hKV hUK hVK (subset_univ K) hKVΩ + hmap hdom hψ.contDiffOn contDiffOn_const + (linearPhaseChart_smooth ξ hξ U hU).1.contDiffOn + (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn hpull + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..4812a9670ddfbfe6547fb42dc92d6886e07dbc1c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseChart.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseReparametrization +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases + +namespace OAI + +/-! The explicit restricted linear chart used for a nonzero phase covector. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def linearPhaseChart (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) : + OpenPartialHomeomorph Base Base where + toFun := phaseEquiv ξ hξ + invFun := (phaseEquiv ξ hξ).symm + source := U + target := (phaseEquiv ξ hξ) '' U + map_source' := fun x hx => ⟨x,hx,rfl⟩ + map_target' := by + rintro y ⟨x,hx,rfl⟩ + simpa only [ContinuousLinearEquiv.symm_apply_apply] using hx + left_inv' := fun x _ => (phaseEquiv ξ hξ).symm_apply_apply x + right_inv' := fun x _ => (phaseEquiv ξ hξ).apply_symm_apply x + open_source := hU + open_target := (phaseEquiv ξ hξ).isOpenMap U hU + continuousOn_toFun := (phaseEquiv ξ hξ).continuous.continuousOn + continuousOn_invFun := (phaseEquiv ξ hξ).symm.continuous.continuousOn + +@[simp] lemma linearPhaseChart_source (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) : + (linearPhaseChart ξ hξ U hU).source = U := rfl + +@[simp] lemma linearPhaseChart_target (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) : + (linearPhaseChart ξ hξ U hU).target = (phaseEquiv ξ hξ) '' U := rfl + +@[simp] lemma linearPhaseChart_apply (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) + (x : Base) : linearPhaseChart ξ hξ U hU x = phaseEquiv ξ hξ x := rfl + +@[simp] lemma linearPhaseChart_symm_apply (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) + (x : Base) : (linearPhaseChart ξ hξ U hU).symm x = (phaseEquiv ξ hξ).symm x := rfl + +lemma linearPhaseChart_smooth (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) : + ContDiff ℝ ∞ (linearPhaseChart ξ hξ U hU) ∧ + ContDiff ℝ ∞ (linearPhaseChart ξ hξ U hU).symm := + ⟨(phaseEquiv ξ hξ).contDiff,(phaseEquiv ξ hξ).symm.contDiff⟩ + +lemma linearPhaseChart_phase (ξ : Base) (hξ : ξ ≠ 0) (U : Set Base) (hU : IsOpen U) + (x : Base) : (linearPhaseChart ξ hξ U hU x).1 = phaseLinear ξ x := rfl + +lemma linearPhaseChart_modeDomain {F : RealModes.RField 4} (hF : ContDiff ℝ ∞ F) + {U : Set Base} (hU : IsOpen U) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ U, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ U, Good (RealModes.realSecondTensor F x) ξ) : + RealModes.RealModeDomain (F ∘ (linearPhaseChart ξ hξ U hU).symm) + (linearPhaseChart ξ hξ U hU).target := + RealModes.realModeDomain_phase hF hU hξ hImm hgood + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseCutoffBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseCutoffBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..b513126ab24cca12644555415f8350b112e20bd7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseCutoffBounds.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseDerivativeBounds +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedChartTransport +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! Quantitative transport of the actual supported cutoff to a linear +phase chart, including the inverse frequency factor. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates PhaseGeometry RealModes + +def phaseCutoffBudget (m : ℕ) (C J W : ℝ) : ℝ := W*((m.factorial : ℝ)*C*J^m) + +lemma phaseCutoffBudget_polynomial (m : ℕ) {C J W : ℝ → ℝ} + (hC : HasPolynomialBound C) (hJ : HasPolynomialBound J) (hW : HasPolynomialBound W) : + HasPolynomialBound (fun x => phaseCutoffBudget m (C x) (J x) (W x)) := + hW.mul (((polynomialBound_const (Nat.cast_nonneg m.factorial)).mul hC).mul (hJ.pow m)) + +theorem linear_phase_cutoff_bound {U : Set SmallModes.Base} (hU : IsOpen U) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) (K : Compacts SmallModes.Base) + (hK : (K : Set SmallModes.Base) ⊆ U) {s : ℝ≥0} {C J W w : ℝ} {m : ℕ} + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hC : 0 ≤ C) (hJ : 1 ≤ J) + (hi : ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ J) (hw : |w⁻¹| ≤ W) + (f : SupportedField (F := ℝ) K) (hf : WeightedBound univ s m C f) : + WeightedBound univ s m (phaseCutoffBudget m C J W) + (w⁻¹ • chartPush (linearPhaseChart ξ hξ U hU) + (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn K hK f) := by + let e := linearPhaseChart ξ hξ U hU + let g := chartPush e (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn K hK f + have hj (j : ℕ) (hj : 1 ≤ j) (_hjm : j ≤ m) (y : SmallModes.Base) (hy : y ∈ e.target) : + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ J := + (positive_order_linear_derivative_le (phaseEquiv ξ hξ).symm.toContinuousLinearMap + e.open_target hj hy).trans hi + have hseminorm := chartPush_bound e + (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn K hK hs hs1 hJ hj f + have hpush : WeightedBound univ s m ((m.factorial : ℝ)*C*J^m) g := by + apply (weightedBound_of_supportedSeminorm s m g).mono_const + exact hseminorm.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (supportedSeminorm_le_of_weightedBound hs hC f hf) + (Nat.cast_nonneg _)) (pow_nonneg (zero_le_one.trans hJ) _)) + have hscale := hpush.const_smul uniqueDiffOn_univ g.contDiff.contDiffOn (w⁻¹) + apply hscale.mono_const + exact mul_le_mul_of_nonneg_right hw + (mul_nonneg (mul_nonneg (Nat.cast_nonneg _) hC) (pow_nonneg (zero_le_one.trans hJ) _)) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseDerivativeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseDerivativeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc6dc494ce8ea9e98bba4f2f8f0d104b4e9759d3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseDerivativeBounds.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseFrame + +namespace OAI + +/-! Higher derivatives of the selected linear phase charts need no +compactness constants. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +lemma phaseEquiv_norm_le (ξ : Base) (hξ : ξ ≠ 0) : + ‖(phaseEquiv ξ hξ).toContinuousLinearMap‖ ≤ 2*‖ξ‖ := by + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro v + change ‖phaseEquiv ξ hξ v‖ ≤ 2*‖ξ‖*‖v‖ + rw [phaseEquiv_apply, Prod.norm_def, Real.norm_eq_abs, Real.norm_eq_abs, max_le_iff] + have hξ1 : |ξ.1| ≤ ‖ξ‖ := by simpa only [Real.norm_eq_abs] using norm_fst_le ξ + have hξ2 : |ξ.2| ≤ ‖ξ‖ := by simpa only [Real.norm_eq_abs] using norm_snd_le ξ + have hv1 : |v.1| ≤ ‖v‖ := by simpa only [Real.norm_eq_abs] using norm_fst_le v + have hv2 : |v.2| ≤ ‖v‖ := by simpa only [Real.norm_eq_abs] using norm_snd_le v + constructor + · calc + _ ≤ |ξ.1*v.1|+|ξ.2*v.2| := abs_add_le _ _ + _ ≤ ‖ξ‖*‖v‖+‖ξ‖*‖v‖ := by rw [abs_mul, abs_mul]; gcongr + _ = _ := by ring + · calc + _ ≤ |(-ξ.2)*v.1|+|ξ.1*v.2| := abs_add_le _ _ + _ ≤ ‖ξ‖*‖v‖+‖ξ‖*‖v‖ := by rw [abs_mul, abs_neg, abs_mul]; gcongr + _ = _ := by ring + +lemma positive_order_linear_derivative_le (L : Base →L[ℝ] Base) + {U : Set Base} (hU : IsOpen U) {j : ℕ} (hj : 1 ≤ j) {x : Base} (hx : x ∈ U) : + ‖iteratedFDerivWithin ℝ j L U x‖ ≤ ‖L‖ := by + rw [iteratedFDerivWithin_of_isOpen j hU hx] + cases j with + | zero => omega + | succ j => + rw [← norm_iteratedFDeriv_fderiv] + have he : fderiv ℝ L = fun _ => L := funext fun _ => L.fderiv + rw [he] + cases j with + | zero => rw [norm_iteratedFDeriv_zero] + | succ j => + rw [iteratedFDeriv_succ_const] + simpa only [Pi.zero_apply, norm_zero] using norm_nonneg L + +lemma linearPhaseChart_derivative_bound {ξ : Base} (hξ : ξ ≠ 0) + {U : Set Base} (hU : IsOpen U) {j : ℕ} (hj : 1 ≤ j) {x : Base} (hx : x ∈ U) : + ‖iteratedFDerivWithin ℝ j (linearPhaseChart ξ hξ U hU) U x‖ ≤ 2*‖ξ‖ := + (positive_order_linear_derivative_le (phaseEquiv ξ hξ).toContinuousLinearMap hU hj hx).trans + (phaseEquiv_norm_le ξ hξ) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseTwoJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseTwoJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbe37fc0edf65ac20f1835f5fe4cd73921e93da7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LinearPhaseTwoJetBounds.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseChart + +namespace OAI + +/-! Fixed phase charts transfer original-coordinate prefix bounds to the +two-jet profiles needed by the actual mean and quadratic solvers. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4 +open WeightedEstimates + +namespace RealModes +open SmallModes + +theorem realTwoJet_prefix_bound_on {U : Set Base} (hU : IsOpen U) + {F : RField 4} (hF : ContDiff ℝ ∞ F) {s C : ℝ} {m : ℕ} + (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hb : ∀ j ≤ m + 2, WeightedBound U 1 j (C / s ^ (j - 2)) F) : + WeightedBound U s m C (realTwoJet F) := by + have hfirst (v : Base) (hv : ‖v‖ = 1) (j : ℕ) (hj : j ≤ m + 1) : + WeightedBound U 1 j (C / s ^ (j - 1)) (coordDeriv v F) := by + have hh := (hb (j + 1) (by omega)).directional hU zero_lt_one hF.contDiffOn v + change WeightedBound U 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 U s m C (coordDeriv v F) := by + apply directional_of_prefix hU 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 U s m C (coordDeriv v (coordDeriv w F)) := + directional_of_prefix hU (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 U s m C (fun x i => realTwoJet F x i) + apply WeightedBound.pi hU.uniqueDiffOn 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 + +end RealModes + +namespace JetPolynomial.Perturbation +open RealModes PhaseGeometry + +theorem local_realTwoJet_comp_prefix_bound + {T : SmallModes.Base → Base} (hT : ContDiff ℝ ∞ T) + (K : Compacts SmallModes.Base) {V : Set SmallModes.Base} (hV : IsOpen V) + (hVK : V ⊆ K) {U₀ : Set Base} (hU₀ : IsOpen U₀) + (hTU : MapsTo T V U₀) (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 V s m (D * C) (realTwoJet (G ∘ T)) := by + obtain ⟨B,hB,hb⟩ := compact_local_weighted_bound hV isOpen_univ K.isCompact hVK + (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 G hG s C hs hs1 hC hp + apply realTwoJet_prefix_bound_on hV (hG.comp hT) hs hs1 + (mul_nonneg (zero_le_one.trans hD) hC) + intro j hj + have hc (k : ℕ) (_ : 1 ≤ k) (hkj : k ≤ j) (x : SmallModes.Base) (hx : x ∈ V) : + ‖iteratedFDerivWithin ℝ k T V x‖ ≤ B := by + simpa only [one_pow,one_mul] using hb 1 zero_le_one le_rfl k (hkj.trans hj) x hx + have hh := (hp j hj).comp_coordinates hV.uniqueDiffOn hU₀.uniqueDiffOn zero_lt_one le_rfl + hB (div_nonneg hC (pow_nonneg hs.le _)) hT.contDiffOn hG.contDiffOn hTU 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 + +/-- The profiles work simultaneously at every order, so evaluating the +same conclusion at `m + 1` supplies the quadratic solver's input profile. -/ +theorem linear_phase_twoJet_profiles {ι : Type*} + (ξ : ι → SmallModes.Base) (hξ : ∀ i, ξ i ≠ 0) + (U : ι → Set SmallModes.Base) (hU : ∀ i, IsOpen (U i)) + (K : ι → Compacts SmallModes.Base) (hUK : ∀ i, U i ⊆ K i) + {U₀ : Set Base} (hU₀ : IsOpen U₀) + (hinto : ∀ i x, x ∈ U i → planeCoordinateIsometry.symm x ∈ U₀) + (Pjet : ℕ → ℝ) (hPjet : ∀ m, 0 ≤ Pjet m) : + ∃ H : ι → ℕ → ℝ, (∀ i m, 1 ≤ H i m) ∧ + ∀ (G : Base → Space), ContDiff ℝ ∞ G → ∀ s : ℝ, 0 < s → s ≤ 1 → + (∀ m j, j ≤ m + 2 → WeightedBound U₀ 1 j (Pjet m / s ^ (j - 2)) G) → + ∀ i m, WeightedBound (linearPhaseChart (ξ i) (hξ i) (U i) (hU i)).target + s m (H i m) (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart (ξ i) (hξ i) (U i) (hU i)).symm)) := by + classical + let e := fun i => linearPhaseChart (ξ i) (hξ i) (U i) (hU i) + let T := fun i => planeCoordinateIsometry.symm ∘ (e i).symm + let KV := fun i => (K i).map (e i) (linearPhaseChart_smooth (ξ i) (hξ i) (U i) (hU i)).1.continuous + have hT (i : ι) : ContDiff ℝ ∞ (T i) := + planeCoordinateIsometry.symm.contDiff.comp + (linearPhaseChart_smooth (ξ i) (hξ i) (U i) (hU i)).2 + have hVK (i : ι) : (e i).target ⊆ KV i := by + exact image_mono (hUK i) + have hTU (i : ι) : MapsTo (T i) (e i).target U₀ := by + intro x hx + exact hinto i ((e i).symm x) ((e i).map_target hx) + choose D hD hd using fun i m => local_realTwoJet_comp_prefix_bound (hT i) + (KV i) (e i).open_target (hVK i) hU₀ (hTU i) m + let H := fun i m => 1 + D i m * Pjet m + refine ⟨H,?_,?_⟩ + · intro i m + exact le_add_of_nonneg_right (mul_nonneg (zero_le_one.trans (hD i m)) (hPjet m)) + · intro G hG s hs hs1 hp i m + have hh := hd i m G hG s (Pjet m) hs hs1 (hPjet m) (hp m) + apply (show WeightedBound (e i).target s m (D i m * Pjet m) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ (e i).symm)) from hh).mono_const + exact le_add_of_nonneg_left zero_le_one + +end JetPolynomial.Perturbation +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalAnsatzMetricLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalAnsatzMetricLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dee5e2197ad83df34e1f3bdaec59d74722a91c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalAnsatzMetricLimit.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalAnsatzProfiles + +namespace OAI + +/-! The leading pullback metric of the actual supported periodic ansatz. -/ + +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.LocalPeriodicExpansion +open CovarianceCorrector +open PeriodicExpansion (directionalMap) + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {O : TopologicalSpace.Opens A} + +/-- Local smoothness and periodicity suffice for a compact uniform value bound; +the local family need not be smooth across the boundary of its domain. -/ +lemma Family.compact_value_bound (U : Family O E) {Q : Set A} + (hQ : IsCompact Q) (hQO : Q ⊆ O) : + ∃ B : ℝ, 0 ≤ B ∧ ∀ p ∈ Q, ∀ t : Period, ‖U.val p t‖ ≤ B := by + have hdom : Q ×ˢ Icc (0 : ℝ) 1 ⊆ (O : Set A) ×ˢ (univ : Set ℝ) := by + intro y hy + exact ⟨hQO hy.1,mem_univ _⟩ + obtain ⟨B,hb⟩ := (hQ.prod (isCompact_Icc : IsCompact (Icc (0 : ℝ) 1))).exists_bound_of_continuousOn + (U.smooth.continuousOn.mono hdom) + refine ⟨max 0 B,le_max_left _ _,?_⟩ + intro p hp t + let s : ℝ := AddCircle.equivIco 1 0 t + have hs : s ∈ Ico (0 : ℝ) 1 := by + simpa only [zero_add] using (AddCircle.equivIco 1 0 t).property + have ht : (s : Period) = t := AddCircle.coe_equivIco + rw [← ht] + exact (hb (p,s) ⟨hp,hs.1,hs.2.le⟩).trans (le_max_right _ _) + +private lemma inner_error_bound {u v a b : E} {B C z : ℝ} + (hB : 0 ≤ B) (hC : 0 ≤ C) (hz : 0 ≤ z) (hz1 : z ≤ 1) + (hu : ‖u-a‖ ≤ C*z) (hv : ‖v-b‖ ≤ C*z) + (ha : ‖a‖ ≤ B) (hb : ‖b‖ ≤ B) : + ‖inner ℝ u v-inner ℝ a b‖ ≤ (C*C+2*B*C)*z := by + have he : inner ℝ u v-inner ℝ a b = + inner ℝ (u-a) (v-b)+inner ℝ (u-a) b+inner ℝ a (v-b) := by + simp only [inner_sub_left,inner_sub_right] + ring + rw [he] + calc + _ ≤ ‖inner ℝ (u-a) (v-b)‖+‖inner ℝ (u-a) b‖+‖inner ℝ a (v-b)‖ := + (norm_add_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ ‖u-a‖*‖v-b‖+‖u-a‖*‖b‖+‖a‖*‖v-b‖ := + add_le_add (add_le_add (norm_inner_le_norm _ _) (norm_inner_le_norm _ _)) + (norm_inner_le_norm _ _) + _ ≤ (C*z)*(C*z)+(C*z)*B+B*(C*z) := by gcongr + _ = C*C*(z*z)+(2*B*C)*z := by ring + _ ≤ C*C*z+(2*B*C)*z := by + apply add_le_add _ le_rfl + exact mul_le_mul_of_nonneg_left + ((mul_le_mul_of_nonneg_left hz1 hz).trans_eq (mul_one z)) (mul_self_nonneg C) + _ = (C*C+2*B*C)*z := by ring + +namespace Geometry + +variable [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] + {dy : A} (g : Geometry (E := E) O dy) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +/-- The circular velocity law makes the leading metric independent of its +fast phase, including the mixed coefficient. -/ +lemma leading_metric_values {p : A} (hp : p ∈ O) (t : Period) : + inner ℝ (g.longitudinal.val p t) (g.longitudinal.val p t) = + inner ℝ (g.X₀ p) (g.X₀ p)+g.q p ∧ + inner ℝ (g.longitudinal.val p t) (g.Y p) = inner ℝ (g.X₀ p) (g.Y p) := by + have hx := g.perpX₀ p hp _ (g.V_mem p hp t) + have hy := g.perpY p hp _ (g.V_mem p hp t) + have hx' : inner ℝ (g.V.val p t) (g.X₀ p) = 0 := by + rw [real_inner_comm] + exact hx + have hy' : inner ℝ (g.V.val p t) (g.Y p) = 0 := by + rw [real_inner_comm] + exact hy + simp only [longitudinal,Family.add_apply,Family.constant_apply _ _ hp, + inner_add_left,inner_add_right,hx,hx',hy',g.circle p hp t,zero_add,add_zero] + trivial + +omit [FiniteDimensional ℝ A] [CompleteSpace E] in +/-- Relative to the old immersion, the leading metric increases precisely the +longitudinal coefficient by the velocity variance. -/ +lemma leading_metric_increment {F : A → E} (dx : A) + (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) + {p : A} (hp : p ∈ O) (t : Period) : + inner ℝ (g.longitudinal.val p t) (g.longitudinal.val p t) = + inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dx)+ + (g.q p-inner ℝ (average (g.V.val p)) (average (g.V.val p))) ∧ + inner ℝ (g.longitudinal.val p t) (g.Y p) = + inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dy) := by + have hmean : average (g.V.val p) ∈ g.plane p := + average_mem_submodule (g.plane p) (g.V.val p).continuous (g.V_mem p hp) + have hx := g.perpX₀ p hp _ hmean + have hy := g.perpY p hp _ hmean + have hx' : inner ℝ (average (g.V.val p)) (g.X₀ p) = 0 := by + rw [real_inner_comm] + exact hx + have hy' : inner ℝ (average (g.V.val p)) (g.Y p) = 0 := by + rw [real_inner_comm] + exact hy + obtain ⟨hxx,hxy⟩ := g.leading_metric_values hp t + rw [hX p hp,hY p hp] + simp only [inner_add_left,inner_add_right,hx,hx',hy',zero_add,add_zero] + constructor + · rw [hxx] + ring + · exact hxy + +/-- The three actual metric coefficients approach the old pullback metric plus +the variance in the phase direction, uniformly at linear rate in `z`. -/ +theorem compact_initial_ansatz_metric {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 + ‖inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx)- + (inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dx)+ + (g.q p-inner ℝ (average (g.V.val p)) (average (g.V.val p))))‖ ≤ C*z ∧ + ‖inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy)- + inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dy)‖ ≤ C*z ∧ + ‖inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy)- + inner ℝ (fderiv ℝ F p dy) (fderiv ℝ F p dy)‖ ≤ C*z := by + obtain ⟨N,hN,hn⟩ := g.compact_initial_ansatz_profiles hF U hU hinit hQ hQO + ℓ dx hx hy hX hY n + obtain ⟨B,hB,hb⟩ := g.longitudinal.compact_value_bound hQ hQO + obtain ⟨D,hD,hd⟩ := g.transverse.compact_value_bound hQ hQO + refine ⟨N*N+2*(B+D)*N,by positivity,?_⟩ + intro z hz hz1 p hp + dsimp only + let f := finiteAnsatz F U ℓ (n+1) z + let t : Period := ((ℓ p/z : ℝ) : Period) + have hpO := hQO hp + obtain ⟨hyerr,_,hxerr,_,_⟩ := hn z hz hz1 p hp + change ‖fderiv ℝ f p dx-g.longitudinal.val p t‖ ≤ N*z at hxerr + change ‖fderiv ℝ f p dy-g.Y p‖ ≤ N*z at hyerr + have hxb : ‖g.longitudinal.val p t‖ ≤ B+D := + (hb p hp t).trans (by linarith) + have hyb : ‖g.Y p‖ ≤ B+D := by + have hd' := hd p hp t + rw [transverse,Family.constant_apply _ _ hpO] at hd' + linarith + have hxx := inner_error_bound (add_nonneg hB hD) hN hz.le hz1 hxerr hxerr hxb hxb + have hxy := inner_error_bound (add_nonneg hB hD) hN hz.le hz1 hxerr hyerr hxb hyb + have hyy := inner_error_bound (add_nonneg hB hD) hN hz.le hz1 hyerr hyerr hyb hyb + obtain ⟨hxx',hxy'⟩ := g.leading_metric_increment dx hX hY hpO t + rw [hxx'] at hxx + rw [hxy'] at hxy + refine ⟨hxx,hxy,?_⟩ + simpa only [hY p hpO] using hyy + +/-- The usual amplitude normalization identifies the variance with `a²`, so +the limiting metric is the prescribed rank-one metric increment. -/ +theorem compact_initial_ansatz_metric_amplitude {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) (a : A → ℝ) + (ha : ∀ p ∈ Q, g.q p-inner ℝ (average (g.V.val p)) (average (g.V.val p)) = a p^2) + (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ p ∈ Q, + let f := finiteAnsatz F U ℓ (n+1) z + ‖inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dx)- + (inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dx)+a p^2)‖ ≤ C*z ∧ + ‖inner ℝ (fderiv ℝ f p dx) (fderiv ℝ f p dy)- + inner ℝ (fderiv ℝ F p dx) (fderiv ℝ F p dy)‖ ≤ C*z ∧ + ‖inner ℝ (fderiv ℝ f p dy) (fderiv ℝ f p dy)- + inner ℝ (fderiv ℝ F p dy) (fderiv ℝ F p dy)‖ ≤ C*z := by + obtain ⟨C,hC,hb⟩ := g.compact_initial_ansatz_metric hF U hU hinit hQ hQO ℓ dx hx hy hX hY n + refine ⟨C,hC,?_⟩ + intro z hz hz1 p hp + simpa only [ha p hp] using hb z hz hz1 p hp + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalGenericAtlasPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalGenericAtlasPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..3faf3bdfa3e3f4326660b80ad935731e53dda6b5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalGenericAtlasPhases.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GenericAtlasPhases +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Phase selection on compact portions of local boundary arcs. Smooth +extension supplies the global parameter argument without imposing global +chart-domain assumptions on an arc. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {ι α κ : Type*} [Fintype ι] [DecidableEq ι] [Countable α] [Countable κ] + +theorem exists_generic_atlas_phases_on + (center : ι → M) (L : ι → ℝ) (index : α → ι) + (u : α → ℝ → CurvePlane) (V : α → Set ℝ) (hV : ∀ a, IsOpen (V a)) + (hu : ∀ a, ContDiffOn ℝ ∞ (u a) (V a)) + (K : α → Set ℝ) (hK : ∀ a, IsCompact (K a)) (hKV : ∀ a, K a ⊆ V a) + (hregular : ∀ a t, t ∈ K a → deriv (u a) t ≠ 0) + (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, + (∀ a, (K a ∩ {t | deriv (fun s => + centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s)) t = 0}).Finite) ∧ + (∀ a t, t ∈ K a → deriv (fun s => + centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s)) t = 0 → + deriv (deriv (fun s => centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) (u a s))) t ≠ 0) ∧ + (∀ 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 + choose W hW hKW hWV v hv he using fun a => + CollarVelocity.compact_smooth_extension (hK a) (hV a) (hKV a) (hu a) + have hsame (a : α) (t : ℝ) (ht : t ∈ K a) : v a =ᶠ[𝓝 t] u a := by + filter_upwards [(hW a).mem_nhds (hKW a ht)] with s hs + exact he a hs + have hreg : ∀ a t, t ∈ K a → deriv (v a) t ≠ 0 := by + intro a t ht + rw [(hsame a t ht).deriv_eq] + exact hregular a t ht + obtain ⟨ell,hell,hfinite,hn,hcross⟩ := exists_generic_atlas_phases center L index + v hv K hK hreg first second hdistinct base point hbase hfirst hsecond U hU hne + let phi (a : α) : CurvePlane → ℝ := centeredConvexPhase (ell (index a)) (L (index a)) + (coordinateChart (center (index a)) (center (index a))) + have hc (a : α) (t : ℝ) (ht : t ∈ K a) : + (fun s => phi a (v a s)) =ᶠ[𝓝 t] (fun s => phi a (u a s)) := + (hsame a t ht).fun_comp (phi a) + refine ⟨ell,hell,?_,?_,hcross⟩ + · intro a + apply (hfinite a).subset + rintro t ⟨ht,hzero⟩ + exact ⟨ht,(hc a t ht).deriv_eq.trans hzero⟩ + · intro a t ht hzero + change deriv (deriv (fun s => phi a (u a s))) t ≠ 0 + rw [← (hc a t ht).deriv.deriv_eq] + apply hn a t ht + exact (hc a t ht).deriv_eq.trans hzero + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalReferencePhaseBasis.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalReferencePhaseBasis.lean new file mode 100644 index 0000000000000000000000000000000000000000..77e799c7c132ba8109f9954be38ee44074b9c040 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalReferencePhaseBasis.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CenteredAtlasPrimitives +import OAI.Geometry.Immersion.ClosedSurface.Main + +namespace OAI + +/-! A positive reference phase basis on a neighborhood of each center, +with its quadratic part fixed by the metric convexity estimate. -/ +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] + +theorem local_reference_phase_basis (g : SmoothMetric M) (p : M) + (P : PhaseBasis) (hP : ∀ j, 0 < P.Q j (coordinateMetric g p (coordinateCenter p))) (L : ℝ) : + ∃ U : Set M, IsOpen U ∧ p ∈ U ∧ U ⊆ (coordinateChart p).source ∧ + ∀ q ∈ U, + admissiblePhaseCovectors P (fun j => phaseDerivative + (centeredConvexPhase (P.ξ j) L (coordinateChart p p)) (coordinateChart p q)) ∧ + ∀ j, 0 < (centeredSpatialBasis P P.ξ L (coordinateChart p p) + (coordinateChart p q)).Q j (coordinateMetric g p (coordinateChart p q)) := by + let xi : Base → Fin 3 → Base := fun x j => + phaseDerivative (centeredConvexPhase (P.ξ j) L (coordinateCenter p)) x + have hxi : Continuous xi := by + apply continuous_pi + intro j + simp only [xi,centeredConvexPhase_phaseDerivative] + fun_prop + have hself : xi (coordinateCenter p) = P.ξ := by + funext j + simp only [xi,centeredConvexPhase_phaseDerivative,sub_self,smul_zero,add_zero] + have hbase : (xi (coordinateCenter p),coordinateMetric g p (coordinateCenter p)) ∈ + positivePhaseParameters P := by + rw [hself] + refine ⟨?_,P.nonzero,?_⟩ + · rw [perturbedPhaseOperator_self] + exact ⟨ContinuousLinearEquiv.refl ℝ PhaseMean.Tensor,rfl⟩ + · intro j + simpa only [perturbedPhaseCoefficient_self] using hP j + have hn := (hxi.continuousAt.prodMk (coordinateMetric_continuousAt_center g p)).eventually + ((positivePhaseParameters_open P).mem_nhds hbase) + obtain ⟨W,hWsub,hW,hcW⟩ := mem_nhds_iff.mp hn + let U : Set M := (coordinateChart p).source ∩ (coordinateChart p) ⁻¹' W + have hc : coordinateChart p p = coordinateCenter p := by + simp [coordinateChart_apply,chartCoordinates,coordinateCenter,planeModel] + refine ⟨U,(coordinateChart p).isOpen_inter_preimage hW,⟨?_,?_⟩,fun q hq => hq.1,?_⟩ + · rw [coordinateChart_source]; exact mem_chart_source Plane p + · change coordinateChart p p ∈ W + rwa [hc] + · intro q hq + have hm := hWsub hq.2 + change (xi (coordinateChart p q),coordinateMetric g p (coordinateChart p q)) ∈ + positivePhaseParameters P at hm + have ha : admissiblePhaseCovectors P (xi (coordinateChart p q)) := ⟨hm.1,hm.2.1⟩ + rw [hc] + refine ⟨ha,?_⟩ + intro j + change 0 < (resolvedPhaseBasis P (xi (coordinateChart p q))).Q j _ + rw [resolvedPhaseBasis_coefficients P ha] + exact hm.2.2 j + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalizedCoordinatePullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalizedCoordinatePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..cca61cafc2563597bc0efd1de82ac73a5561acbc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LocalizedCoordinatePullback.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarJetTransport +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity + +namespace OAI + +/-! Pullback of a polynomial through a local coordinate change and the +actual scalar localization of its input map. -/ +noncomputable section +open Set +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.JetPolynomial +namespace Expression + +def localizedCoordinatePullback (e : Expression) (T S : Base → Base) + (a : Base → ℝ) : Expression := + (e.localCoordinatePullback T S).scalarProductPullback a + +lemma localizedCoordinatePullback_smooth {T S : Base → Base} {a : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (ha : ContDiff ℝ ∞ a) + {e : Expression} (he : e.SmoothCoeffs univ) : + (e.localizedCoordinatePullback T S a).SmoothCoeffs univ := + scalarProductPullback_smooth ha (localCoordinatePullback_smooth hT hS he) + +lemma localizedCoordinatePullback_eval {T S : Base → Base} {a : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (ha : ContDiff ℝ ∞ a) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {x : Base} (hx : x ∈ U) + (hrel : (fun y => a y • H y) =ᶠ[𝓝 x] (G ∘ T)) + (e : Expression) (t : ℝ) : + (e.localizedCoordinatePullback T S a).eval H (x,t) = e.eval G (T x,t) := by + rw [localizedCoordinatePullback,scalarProductPullback_eval ha hH] + exact localCoordinatePullback_eval_germ hT hS hU hST hTS hG (ha.smul hH) hx hrel e t + +end Expression +namespace Perturbation + +def localizedPolynomialPullback {n : ℕ} (P : Fin 3 → Fin n → Expression) + (T S : Base → Base) (a : Base → ℝ) : Fin 3 → Fin n → Expression := + fun k r => (P k r).localizedCoordinatePullback T S a + +lemma localizedPolynomialPullback_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {T S : Base → Base} {a : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (ha : ContDiff ℝ ∞ a) + (k : Fin 3) (r : Fin n) : + (localizedPolynomialPullback P T S a k r).SmoothCoeffs univ := + Expression.localizedCoordinatePullback_smooth hT hS ha (hP k r) + +lemma localizedPolynomialPullback_eval {n : ℕ} (P : Fin 3 → Fin n → Expression) + {T S : Base → Base} {a : Base → ℝ} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (ha : ContDiff ℝ ∞ a) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {x : Base} (hx : x ∈ U) + (hrel : (fun y => a y • H y) =ᶠ[𝓝 x] (G ∘ T)) (ε t : ℝ) : + coordinatePolynomialValue (localizedPolynomialPullback P T S a) ε H t + (planeCoordinateIsometry x) = + coordinatePolynomialValue P ε G t (planeCoordinateIsometry (T x)) := by + funext k + simp only [coordinatePolynomialValue,LinearIsometryEquiv.symm_apply_apply] + apply Finset.sum_congr rfl + intro r _ + rw [localizedPolynomialPullback, + Expression.localizedCoordinatePullback_eval hT hS ha hU hST hTS hG hH hx hrel] + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..c2482f623466f942bfb01e17d83d835ef32eec8b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoff.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothTransitionDerivativeBound +import Mathlib.Analysis.SpecialFunctions.Log.Deriv + +namespace OAI + +/-! A compact cutoff constant near zero, with arbitrarily slow variation + in the logarithm of the transverse distance. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +def logarithmicCutoff (L x : ℝ) : ℝ := + if x = 0 then 1 else Real.smoothTransition (-Real.log x/L) + +lemma logarithmicCutoff_one {L x : ℝ} (hL : 0 < L) (hx : |x| < Real.exp (-L)) : + logarithmicCutoff L x = 1 := by + by_cases hz : x = 0 + · simp [logarithmicCutoff,hz] + · have hlog : Real.log x < -L := by + rw [← Real.log_abs] + exact (Real.log_lt_iff_lt_exp (abs_pos.mpr hz)).mpr hx + rw [logarithmicCutoff,ite_eq_right hz] + apply Real.smoothTransition.one_of_one_le + apply (le_div_iff₀ hL).mpr + linarith + +lemma logarithmicCutoff_zero {L x : ℝ} (hL : 0 < L) (hx : 1 ≤ |x|) : + logarithmicCutoff L x = 0 := by + have hz : x ≠ 0 := by intro h; norm_num [h] at hx + have hlog : 0 ≤ Real.log x := by + rw [← Real.log_abs] + exact Real.log_nonneg hx + rw [logarithmicCutoff,ite_eq_right hz] + apply Real.smoothTransition.zero_of_nonpos + exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hlog) hL.le + +lemma logarithmicCutoff_germ {L : ℝ} (hL : 0 < L) : + logarithmicCutoff L =ᶠ[𝓝 (0:ℝ)] fun _ => 1 := by + filter_upwards [ball_mem_nhds (0:ℝ) (Real.exp_pos (-L))] with x hx + apply logarithmicCutoff_one hL + simpa only [mem_ball,Real.dist_eq,sub_zero] using hx + +lemma logarithmicCutoff_formula {L x : ℝ} (hx : x ≠ 0) : + logarithmicCutoff L =ᶠ[𝓝 x] fun y => Real.smoothTransition (-Real.log y/L) := by + filter_upwards [isOpen_ne.mem_nhds hx] with y hy + exact ite_eq_right hy + +lemma logarithmicCutoff_smooth {L : ℝ} (hL : 0 < L) : + ContDiff ℝ ∞ (logarithmicCutoff L) := by + apply contDiff_iff_contDiffAt.mpr + intro x + by_cases hx : x = 0 + · subst x + exact contDiffAt_const.congr_of_eventuallyEq (logarithmicCutoff_germ hL) + · have hc : ContDiffAt ℝ ∞ (fun y => Real.smoothTransition (-Real.log y/L)) x := + Real.smoothTransition.contDiff.contDiffAt.comp x ((Real.contDiffAt_log.mpr hx).neg.div_const L) + exact hc.congr_of_eventuallyEq (logarithmicCutoff_formula hx) + +lemma logarithmicCutoff_range (L x : ℝ) : + 0 ≤ logarithmicCutoff L x ∧ logarithmicCutoff L x ≤ 1 := by + by_cases hx : x = 0 + · simp [logarithmicCutoff,hx] + · exact ⟨by simpa only [logarithmicCutoff,ite_eq_right hx] using Real.smoothTransition.nonneg (-Real.log x/L), + by simpa only [logarithmicCutoff,ite_eq_right hx] using Real.smoothTransition.le_one (-Real.log x/L)⟩ + +lemma logarithmicCutoff_support {L : ℝ} (hL : 0 < L) : + tsupport (logarithmicCutoff L) ⊆ Icc (-1:ℝ) 1 := by + apply closure_minimal _ isClosed_Icc + intro x hx + have hab : |x| < 1 := lt_of_not_ge (fun h => hx (logarithmicCutoff_zero hL h)) + exact ⟨(abs_lt.mp hab).1.le,(abs_lt.mp hab).2.le⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoffDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoffDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d0cbe31a8df57d296c98a5dd210e6cc92480e43 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LogarithmicCutoffDerivative.lean @@ -0,0 +1,32 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LogarithmicCutoff + +namespace OAI + +/-! The logarithmic cutoff has a derivative uniformly small after + multiplication by the distance from the collar boundary. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +lemma logarithmicCutoff_weighted_derivative {L C : ℝ} (hL : 0 < L) (hC : 0 ≤ C) + (hb : ∀ t, |deriv Real.smoothTransition t| ≤ C) (x : ℝ) : + |x*deriv (logarithmicCutoff L) x| ≤ C/L := by + by_cases hx : x = 0 + · simp only [hx,zero_mul,abs_zero] + exact div_nonneg hC hL.le + · have hd := ((Real.smoothTransition.contDiff : ContDiff ℝ ∞ Real.smoothTransition).differentiable + (by simp) (-Real.log x/L)).hasDerivAt.comp x ((Real.hasDerivAt_log hx).neg.div_const L) + change HasDerivAt (fun y => Real.smoothTransition (-Real.log y/L)) _ x at hd + rw [(logarithmicCutoff_formula hx).deriv_eq,hd.deriv] + have he : x*(deriv Real.smoothTransition (-Real.log x/L)*(-x⁻¹/L)) = + -deriv Real.smoothTransition (-Real.log x/L)/L := by + field_simp + rw [he,abs_div,abs_neg,abs_of_pos hL] + exact div_le_div_of_nonneg_right (hb _) hL.le + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/LowJetCoordinateChange.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LowJetCoordinateChange.lean new file mode 100644 index 0000000000000000000000000000000000000000..8097aa60357c1381010053229d918232ab0deb48 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/LowJetCoordinateChange.lean @@ -0,0 +1,245 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule + +namespace OAI + +/-! Exact order-two jet transport under a fixed smooth coordinate map. +The new position is supplied separately, so no inverse coordinate map is +required and the construction applies to arbitrary smooth maps. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators Topology + +namespace ClosedSurfaceR4.JetPolynomial + +/-- One fixed coordinate derivative of a scalar function. -/ +def coordinatePartial (f : Base → ℝ) (v : Fin 2) : Base → ℝ := + fun x => fderiv ℝ f x (coordinateVector v) + +lemma coordinatePartial_smooth {f : Base → ℝ} (hf : ContDiff ℝ ∞ f) (v : Fin 2) : + ContDiff ℝ ∞ (coordinatePartial f v) := + (hf.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + +private lemma coordinateVector_expansion (v : Base) : + v = ∑ i : Fin 2, v i • coordinateVector i := by + ext i + simp [coordinateVector,Pi.single_apply] + +private lemma coordinatePartial_component {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (v i : Fin 2) (x : Base) : + coordinatePartial (fun y => T y i) v x = (fderiv ℝ T x (coordinateVector v)) i := by + have h := congrArg (fun L : Base →L[ℝ] ℝ => L (coordinateVector v)) + (fderiv_apply (hT.differentiable (by simp) x) i) + simpa only [coordinatePartial,ContinuousLinearMap.comp_apply,ContinuousLinearMap.proj_apply] using h + +lemma coordinatePartial_comp {f : Base → ℝ} {T : Base → Base} + (hf : ContDiff ℝ ∞ f) (hT : ContDiff ℝ ∞ T) (v : Fin 2) (x : Base) : + coordinatePartial (f ∘ T) v x = + ∑ i : Fin 2, coordinatePartial (fun y => T y i) v x * coordinatePartial f i (T x) := by + change fderiv ℝ (f ∘ T) x (coordinateVector v) = _ + rw [fderiv_comp x (hf.differentiable (by simp) _) (hT.differentiable (by simp) _), + ContinuousLinearMap.comp_apply] + conv_lhs => arg 2; rw [coordinateVector_expansion (fderiv ℝ T x (coordinateVector v))] + rw [map_sum] + simp only [map_smul,smul_eq_mul] + apply Finset.sum_congr rfl + intro i _ + rw [coordinatePartial_component hT] + rfl + +lemma coordinatePartial_coordinatePartial_comp {f : Base → ℝ} {T : Base → Base} + (hf : ContDiff ℝ ∞ f) (hT : ContDiff ℝ ∞ T) (v w : Fin 2) (x : Base) : + coordinatePartial (coordinatePartial (f ∘ T) w) v x = + ∑ i : Fin 2, + (coordinatePartial (fun y => T y i) w x * + (∑ j : Fin 2, coordinatePartial (fun y => T y j) v x * + coordinatePartial (coordinatePartial f i) j (T x)) + + coordinatePartial (coordinatePartial (fun y => T y i) w) v x * + coordinatePartial f i (T x)) := by + have he : coordinatePartial (f ∘ T) w = fun y => + ∑ i : Fin 2, coordinatePartial (fun z => T z i) w y * coordinatePartial f i (T y) := + funext (coordinatePartial_comp hf hT w) + have hTi (i : Fin 2) : ContDiff ℝ ∞ (coordinatePartial (fun y => T y i) w) := + coordinatePartial_smooth (contDiff_pi.mp hT i) w + have hfi (i : Fin 2) : ContDiff ℝ ∞ (fun y => coordinatePartial f i (T y)) := + (coordinatePartial_smooth hf i).comp hT + change fderiv ℝ (coordinatePartial (f ∘ T) w) x (coordinateVector v) = _ + rw [he,fderiv_fun_sum (fun i _ => ((hTi i).mul (hfi i)).differentiable (by simp) x)] + simp only [sum_apply] + apply Finset.sum_congr rfl + intro i _ + rw [fderiv_fun_mul ((hTi i).differentiable (by simp) x) ((hfi i).differentiable (by simp) x)] + simp only [add_apply,smul_apply,smul_eq_mul] + change coordinatePartial (fun y => T y i) w x * + coordinatePartial (coordinatePartial f i ∘ T) v x + + coordinatePartial f i (T x) * + coordinatePartial (coordinatePartial (fun y => T y i) w) v x = _ + rw [coordinatePartial_comp (coordinatePartial_smooth hf i) hT] + ring + +/-- Slots of the two first and four ordered second coordinate derivatives. -/ +def firstJetSlot : Fin 2 → Fin 7 := ![1,2] +def secondJetSlot : Fin 2 → Fin 2 → Fin 7 := ![![3,4],![5,6]] + +lemma lowJet_first_slot (G : Base → Space) (v : Fin 2) (a : Fin 4) (x : Base) : + lowJet G x (.inr (firstJetSlot v,a)) = coordinatePartial (fun y => G y a) v x := by + fin_cases v <;> rfl + +lemma lowJet_second_slot (G : Base → Space) (v w : Fin 2) (a : Fin 4) (x : Base) : + lowJet G x (.inr (secondJetSlot v w,a)) = + coordinatePartial (coordinatePartial (fun y => G y a) w) v x := by + fin_cases v <;> fin_cases w <;> rfl + +/-- First derivative of the composed map, linear in the supplied jet. -/ +def coordinateChangeFirst (T : Base → Base) (x : Base) (J : LowJet) + (v : Fin 2) (a : Fin 4) : ℝ := + ∑ i : Fin 2, coordinatePartial (fun y => T y i) v x * J (.inr (firstJetSlot i,a)) + +/-- Ordered second derivative, with both the Hessian and acceleration terms. -/ +def coordinateChangeSecond (T : Base → Base) (x : Base) (J : LowJet) + (v w : Fin 2) (a : Fin 4) : ℝ := + ∑ i : Fin 2, + (coordinatePartial (fun y => T y i) w x * + (∑ j : Fin 2, coordinatePartial (fun y => T y j) v x * J (.inr (secondJetSlot j i,a))) + + coordinatePartial (coordinatePartial (fun y => T y i) w) v x * J (.inr (firstJetSlot i,a))) + +/-- Transport a positional low jet at `T x` to the positional low jet at `x`. +The old positional components are unnecessary; the value and ordered jets +are evaluated by the chain rule. -/ +def lowJetCoordinateChange (T : Base → Base) (p : Base × LowJet) : LowJet + | .inl i => p.1 i + | .inr (w,a) => ![p.2 (.inr (0,a)), + coordinateChangeFirst T p.1 p.2 0 a, + coordinateChangeFirst T p.1 p.2 1 a, + coordinateChangeSecond T p.1 p.2 0 0 a, + coordinateChangeSecond T p.1 p.2 0 1 a, + coordinateChangeSecond T p.1 p.2 1 0 a, + coordinateChangeSecond T p.1 p.2 1 1 a] w + +lemma coordinateChangeFirst_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (v : Fin 2) (a : Fin 4) : + ContDiff ℝ ∞ (fun p : Base × LowJet => coordinateChangeFirst T p.1 p.2 v a) := by + apply ContDiff.sum + intro i _ + exact ((coordinatePartial_smooth (contDiff_pi.mp hT i) v).comp contDiff_fst).mul + ((ContinuousLinearMap.proj (.inr (firstJetSlot i,a)) : LowJet →L[ℝ] ℝ).contDiff.comp contDiff_snd) + +lemma coordinateChangeSecond_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (v w : Fin 2) (a : Fin 4) : + ContDiff ℝ ∞ (fun p : Base × LowJet => coordinateChangeSecond T p.1 p.2 v w a) := by + apply ContDiff.sum + intro i _ + apply ContDiff.add + · apply ContDiff.mul + · exact (coordinatePartial_smooth (contDiff_pi.mp hT i) w).comp contDiff_fst + · apply ContDiff.sum + intro j _ + exact ((coordinatePartial_smooth (contDiff_pi.mp hT j) v).comp contDiff_fst).mul + ((ContinuousLinearMap.proj (.inr (secondJetSlot j i,a)) : LowJet →L[ℝ] ℝ).contDiff.comp + contDiff_snd) + · exact ((coordinatePartial_smooth + (coordinatePartial_smooth (contDiff_pi.mp hT i) w) v).comp contDiff_fst).mul + ((ContinuousLinearMap.proj (.inr (firstJetSlot i,a)) : LowJet →L[ℝ] ℝ).contDiff.comp contDiff_snd) + +lemma lowJetCoordinateChange_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) : + ContDiff ℝ ∞ (lowJetCoordinateChange T) := 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,a⟩ + fin_cases w + · exact (ContinuousLinearMap.proj (.inr (0,a)) : LowJet →L[ℝ] ℝ).contDiff.comp + (contDiff_snd : ContDiff ℝ ∞ (Prod.snd : Base × LowJet → LowJet)) + · exact coordinateChangeFirst_smooth hT 0 a + · exact coordinateChangeFirst_smooth hT 1 a + · exact coordinateChangeSecond_smooth hT 0 0 a + · exact coordinateChangeSecond_smooth hT 0 1 a + · exact coordinateChangeSecond_smooth hT 1 0 a + · exact coordinateChangeSecond_smooth hT 1 1 a + +/-- The finite-dimensional transport agrees exactly with the low jet of +the composed smooth map. -/ +theorem lowJetCoordinateChange_eval {G : Base → Space} {T : Base → Base} + (hG : ContDiff ℝ ∞ G) (hT : ContDiff ℝ ∞ T) (x : Base) : + lowJetCoordinateChange T (x,lowJet G (T x)) = lowJet (G ∘ T) x := by + funext i + cases i with + | inl i => rfl + | inr i => + rcases i with ⟨w,a⟩ + have hfirst (v : Fin 2) : coordinateChangeFirst T x (lowJet G (T x)) v a = + coordinatePartial ((fun y => G y a) ∘ T) v x := by + rw [coordinatePartial_comp (contDiff_pi.mp hG a) hT] + simp only [coordinateChangeFirst,lowJet_first_slot] + have hsecond (v w : Fin 2) : coordinateChangeSecond T x (lowJet G (T x)) v w a = + coordinatePartial (coordinatePartial ((fun y => G y a) ∘ T) w) v x := by + rw [coordinatePartial_coordinatePartial_comp (contDiff_pi.mp hG a) hT] + simp only [coordinateChangeSecond,lowJet_first_slot,lowJet_second_slot] + 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 + + +private lemma iteratedDirectional_eventuallyEq {f g : Base → ℝ} {x : Base} + (h : f =ᶠ[𝓝 x] g) (vs : List Base) : + WeightedEstimates.iteratedDirectional vs f =ᶠ[𝓝 x] + WeightedEstimates.iteratedDirectional vs g := by + induction vs with + | nil => exact h + | cons v vs ih => + filter_upwards [ih.fderiv (𝕜 := ℝ)] with y hy + exact congrArg (fun L : Base →L[ℝ] ℝ => L v) hy + +/-- Positional jets only depend on the germ of the map. -/ +lemma lowJet_eventuallyEq {G H : Base → Space} {x : Base} + (h : G =ᶠ[𝓝 x] H) : lowJet G x = lowJet H x := by + funext i + cases i with + | inl i => rfl + | inr i => + have ha : (fun y => G y i.2) =ᶠ[𝓝 x] (fun y => H y i.2) := + h.mono (fun _ he => congrFun he i.2) + exact (iteratedDirectional_eventuallyEq ha ((lowWord i.1).map coordinateVector)).self_of_nhds + +/-- Evaluate the inverse-coordinate transport at `T x`. The only map +identification required here is the actual local germ `H ∘ S = G`. -/ +lemma lowJetCoordinateChange_inverse_eval {G H : Base → Space} {T S : Base → Base} + (hH : ContDiff ℝ ∞ H) (hS : ContDiff ℝ ∞ S) (x : Base) + (hST : S (T x) = x) (hrel : (H ∘ S) =ᶠ[𝓝 (T x)] G) : + lowJetCoordinateChange S (T x,lowJet H x) = lowJet G (T x) := by + have h := lowJetCoordinateChange_eval hH hS (T x) + rw [hST] at h + exact h.trans (lowJet_eventuallyEq hrel) + +/-- A local inverse and the local relation `H = G ∘ T` supply the germ in +`lowJetCoordinateChange_inverse_eval`. -/ +lemma lowJetCoordinateChange_local_inverse {G H : Base → Space} {T S : Base → Base} + (hH : ContDiff ℝ ∞ H) (hS : ContDiff ℝ ∞ S) (x : Base) + (hST : S (T x) = x) (hTS : (T ∘ S) =ᶠ[𝓝 (T x)] id) + (hrel : H =ᶠ[𝓝 x] (G ∘ T)) : + lowJetCoordinateChange S (T x,lowJet H x) = lowJet G (T x) := by + apply lowJetCoordinateChange_inverse_eval hH hS x hST + have ht : Filter.Tendsto S (𝓝 (T x)) (𝓝 x) := by + have hc : ContinuousAt S (T x) := hS.continuous.continuousAt + change Filter.Tendsto S (𝓝 (T x)) (𝓝 (S (T x))) at hc + rw [hST] at hc + exact hc + filter_upwards [hrel.comp_tendsto ht,hTS] with y hy hz + change H (S y) = G y + change H (S y) = G (T (S y)) at hy + change T (S y) = y at hz + simpa only [hz] using hy + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MatchedSubsetChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MatchedSubsetChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..497cff6242565d5912842c4f7e11c82196c2ce31 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MatchedSubsetChart.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SubmersionFiberLineChart + +namespace OAI + +/-! Restrict a local homeomorphism to matched subsets, with their induced +topologies. The subsets themselves need not be open. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] + +theorem matched_subset_chart (e : OpenPartialHomeomorph X Y) + (S : Set X) (T : Set Y) (p : X) (hp : p ∈ e.source) (hpS : p ∈ S) + (hmatch : ∀ x ∈ e.source, x ∈ S ↔ e x ∈ T) : + ∃ c : OpenPartialHomeomorph S T, + (⟨p,hpS⟩ : S) ∈ c.source ∧ c.source = ((↑) ⁻¹' e.source) ∧ + c.target = ((↑) ⁻¹' e.target) ∧ + (∀ x ∈ c.source, (c x).val = e x.val) ∧ + (∀ y ∈ c.target, (c.symm y).val = e.symm y.val) := by + classical + have hpT : e p ∈ T := (hmatch p hp).mp hpS + have hback (y : T) (hy : y.val ∈ e.target) : e.symm y.val ∈ S := by + apply (hmatch _ (e.map_target hy)).mpr + rw [e.right_inv hy] + exact y.property + let F : S → T := fun x => if hx : x.val ∈ e.source then + ⟨e x.val,(hmatch x.val hx).mp x.property⟩ else ⟨e p,hpT⟩ + let G : T → S := fun y => if hy : y.val ∈ e.target then + ⟨e.symm y.val,hback y hy⟩ else ⟨p,hpS⟩ + have hF (x : S) (hx : x.val ∈ e.source) : (F x).val = e x.val := by simp [F,hx] + have hG (y : T) (hy : y.val ∈ e.target) : (G y).val = e.symm y.val := by simp [G,hy] + let c : OpenPartialHomeomorph S T := { + toFun := F + invFun := G + source := (↑) ⁻¹' e.source + target := (↑) ⁻¹' e.target + map_source' := by + intro x hx + change (F x).val ∈ e.target + rw [hF x hx] + exact e.map_source hx + map_target' := by + intro y hy + change (G y).val ∈ e.source + rw [hG y hy] + exact e.map_target hy + left_inv' := by + intro x hx + apply Subtype.ext + have hy : (F x).val ∈ e.target := by rw [hF x hx]; exact e.map_source hx + rw [hG _ hy,hF x hx,e.left_inv hx] + right_inv' := by + intro y hy + apply Subtype.ext + have hx : (G y).val ∈ e.source := by rw [hG y hy]; exact e.map_target hy + rw [hF _ hx,hG y hy,e.right_inv hy] + open_source := e.open_source.preimage continuous_subtype_val + open_target := e.open_target.preimage continuous_subtype_val + continuousOn_toFun := by + apply Topology.IsInducing.subtypeVal.continuousOn_iff.mpr + exact (e.continuousOn.comp continuous_subtype_val.continuousOn (fun _ hx => hx)).congr hF + continuousOn_invFun := by + apply Topology.IsInducing.subtypeVal.continuousOn_iff.mpr + exact (e.continuousOn_symm.comp continuous_subtype_val.continuousOn (fun _ hy => hy)).congr hG } + exact ⟨c,hp,rfl,rfl,hF,hG⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricAtlasReference.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricAtlasReference.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c4a10b3e2499465e317b091bd3f91a0b1333992 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricAtlasReference.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDifferential +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights + +namespace OAI + +/-! The actual smooth metric section gives the reference tensor used by +the compact good-phase construction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean +open JetPolynomial (planeCoordinateIsometry) +open JetPolynomial.Perturbation (modeSupport) + +local instance metricReferenceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricReferenceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance metricReferenceDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricReferenceDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricReferenceSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricReferenceSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +lemma metric_inner_smooth (g : SmoothMetric M) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (g.inner p)) := g.contMDiff + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorComponent_metric (g : SmoothMetric M) (i : A.centers) + {p : M} (hp : p ∈ (chart (i : M)).source) (v w : Plane) : + A.bundleComponent A.tensorTriv i g.inner p v w = + evaluate (coordinateMetric g (i : M) (coordinateChart (i : M) p)) + (planeCoordinates v) (planeCoordinates w) := by + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet, chart_source] using hp + have hp' : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source, chart_source] using hp + have hc := A.tensorComponent_tangentCoordinates i g.inner hp + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p w) + simp only [Trivialization.continuousLinearMapAt_symmL _ ht] at hc + have hm := coordinateMetric_pullback_chart g (i : M) hp' + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p w) + rw [A.coordinateChart_tangentCoordinates i hp] at hm + change evaluate (coordinateMetric g (i : M) (coordinateChart (i : M) p)) + (planeCoordinates + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v))) + (planeCoordinates + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p w))) = + g.inner p + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p w) at hm + simp only [Trivialization.continuousLinearMapAt_symmL _ ht] at hm + exact hc.trans hm.symm + +lemma tensorPlaneRead_metric_on_weight (g : SmoothMetric M) (i : A.centers) + {p : M} (hp : p ∈ tsupport (A.weight i)) : + A.tensorPlaneRead i g.inner (planeCoordinateIsometry (chart (i : M) p)) = + coordinateMetric g (i : M) (coordinateChart (i : M) p) := by + change A.tensorChartRead i g.inner + (planeCoordinateIsometry.symm (planeCoordinateIsometry (chart (i : M) p))) = _ + rw [LinearIsometryEquiv.symm_apply_apply, A.tensorChartRead_on_weight i g.inner hp] + ext k + rw [fiberToThree_apply, A.tensorComponent_metric g i (A.weight_support i hp)] + simp only [ContinuousLinearEquiv.apply_symm_apply] + fin_cases k <;> simp [evaluate, firstDirection, secondDirection, SmallModes.dx, SmallModes.dy] + +variable [CompactSpace M] + +lemma tensorPlaneRead_metric (g : SmoothMetric M) (i : A.centers) + {x : SmallModes.Base} (hx : x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.tensorPlaneRead i g.inner x = coordinateMetric g (i : M) x := by + change x ∈ planeCoordinateIsometry '' ((chart (i : M)) '' tsupport (A.weight i)) at hx + rcases hx with ⟨y, ⟨p, hp, rfl⟩, rfl⟩ + exact A.tensorPlaneRead_metric_on_weight g i hp + +lemma tensorPlaneRead_metric_smooth (g : SmoothMetric M) (i : A.centers) : + ContDiff ℝ ∞ (A.tensorPlaneRead i g.inner) := + A.tensorPlaneRead_smooth i (metric_inner_smooth g) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricChartReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricChartReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..a75b233d04689c3748145f7c95b47a42e1857d59 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricChartReconstruction.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasLinearizedMetric +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight + +namespace OAI + +/-! Recover the actual global metric from unweighted chart readings. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance metricReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem metric_from_chart_reads {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) : + A.tensorPlaneRestore (fun i y => (A.planeWeight i y)^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) y) = inducedTensor F := by + funext p + have he (i : A.centers) : + A.bundleRestore A.tensorTriv i (fun y => + fiberFromThree ((A.planeWeight i (planeCoordinateIsometry y))^2 • + RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry y))) p = (A.weight i p)^2 • inducedTensor F p := by + ext v w + by_cases hp : p ∈ (chart (i : M)).source + · rw [A.tensorRestore_apply i _ hp] + have hwgt : A.planeWeight i (planeCoordinateIsometry (chart (i : M) p)) = A.weight i p := by + simp only [planeWeight,Function.comp_apply,LinearIsometryEquiv.symm_apply_apply, + chartWeight,indicator_of_mem ((chart (i : M)).map_source hp), + (chart (i : M)).left_inv hp] + rw [hwgt,map_smul] + change A.outer i p * ((A.weight i p)^2 * _) = (A.weight i p)^2 * _ + by_cases hw : A.weight i p = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_mul,mul_zero] + · have hsp := subset_tsupport (A.weight i) hw + rw [A.outer_one i p hsp,one_mul] + congr 1 + change fiberFromThree + (RealModes.realMetricTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p w) = + inducedForm F p v w + rw [fiberFromThree_apply] + have hd := A.vectorPlaneRead_differential i hF hsp + rw [A.plane_chart_differential i hp] at hd + have hv := congrArg (fun L => L v) hd + have hw' := congrArg (fun L => L w) hd + simp only [ContinuousLinearMap.comp_apply] at hv hw' + rw [euclidean_metric_coordinate_value (A.vectorPlaneRead i F) + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _)] + exact congrArg₂ (inner ℝ) hv.symm hw'.symm + · have ho : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.outer_support i h)) + have hw : A.weight i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.weight_support i h)) + simp only [bundleRestore,ho,hw,zero_pow (by decide : 2 ≠ 0),zero_smul,zero_apply] + change (∑ i : A.centers, A.bundleRestore A.tensorTriv i _ p) = _ + simp_rw [he] + rw [← Finset.sum_smul,A.partition,one_smul] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricGoodPhaseData.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricGoodPhaseData.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea60275e9c9f1f39d31dcaa3984928e839868b77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricGoodPhaseData.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Correction.MetricGoodSmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Atlas.GoodQuadraticAtlasPhases + +namespace OAI + +/-! Actual metric-adapted phase geometry, including all cross-chart +quadratic phases needed by the small-increment construction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation + +local instance metricPhaseDataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricPhaseDataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance metricPhaseDataDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricPhaseDataDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricPhaseDataSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricPhaseDataSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +structure MetricGoodPhaseData (g : SmoothMetric M) (F : M → Space) where + A : SmoothingAtlas M + Q : A.centers → PhaseBasis + w : A.centers → Fin 3 → ℝ + weight_pos : ∀ i j, 0 < w i j + outer_locally_one : ∀ i x, x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1) + immersion : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + pure_good : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j) + metric_positive : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + 0 < (Q i).Q j (A.tensorPlaneRead i g.inner x) + quadratic_good : ∀ 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) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x) + +namespace MetricGoodPhaseData +variable [T2Space M] + +/-- A metric and an immersion with nonzero coordinate second form +produce all the fixed phase geometry required by the analytic step. -/ +theorem nonempty (g : SmoothMetric M) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (hB : ∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0) : + Nonempty (MetricGoodPhaseData g F) := by + obtain ⟨A,P,_,houter,hgeometry⟩ := exists_metric_good_smoothingAtlas g hF hImm hB + let Q : A.centers → PhaseBasis := fun i => (P (i : M)).phaseBasis + have hi : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) := + fun i x hx => (hgeometry i x hx).1 + have hp : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j) := + fun i j x hx => (hgeometry i x hx).2.2.1 j + obtain ⟨w,hw,hquad⟩ := A.exists_good_quadratic_atlas_phases hF Q houter hi hp + exact ⟨{ + A := A + Q := Q + w := w + weight_pos := hw + outer_locally_one := houter + immersion := hi + pure_good := hp + metric_positive := fun i j x hx => (hgeometry i x hx).2.1 j + quadratic_good := hquad + }⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricReadBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricReadBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..a69e2e1a97e01c5f405c71cbe23389f5e3e2f4bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MetricReadBounds.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricAtlasReference +import OAI.Geometry.Immersion.ClosedSurface.MetricBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! Compact positive metric range and global first-order bounds for atlas readings. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes WeightedEstimates +local instance metricReadBoundsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricReadBoundsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricReadBoundsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricReadBoundsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricReadBoundsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricReadBoundsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma metricReadSupport_domain (i : A.centers) : + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coordinateDomain (i : M) := by + rintro x ⟨y,⟨p,hp,rfl⟩,rfl⟩ + have hs : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i hp + rw [← coordinateChart_target] + exact (coordinateChart (i : M)).map_source hs + +theorem metric_plane_read_bounds (g : SmoothMetric M) : + ∃ T : Set PhaseMean.Tensor, ∃ B : ℝ, IsCompact T ∧ + (∀ H ∈ T, 0 < H 0) ∧ (∀ H ∈ T, 0 < H 0*H 2-(H 1)^2) ∧ 1 ≤ B ∧ + (∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + A.tensorPlaneRead i g.inner x ∈ T) ∧ + (∀ i x, ‖A.tensorPlaneRead i g.inner x‖ ≤ B) ∧ + (∀ i x y, ‖A.tensorPlaneRead i g.inner y-A.tensorPlaneRead i g.inner x‖ ≤ B*‖y-x‖) := by + classical + let T : Set PhaseMean.Tensor := ⋃ i : A.centers, + A.tensorPlaneRead i g.inner '' (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) + have hT : IsCompact T := isCompact_iUnion (fun i => + (modeSupport (A.chartWeightCompact i)).isCompact.image (A.tensorPlaneRead_metric_smooth g i).continuous) + have hpos (H : PhaseMean.Tensor) (hH : H ∈ T) : + 0 < H 0 ∧ 0 < H 0*H 2-(H 1)^2 := by + obtain ⟨i,x,hx,rfl⟩ := mem_iUnion.mp hH + rw [A.tensorPlaneRead_metric g i hx] + exact coordinateMetric_positive g (i : M) (A.metricReadSupport_domain i hx) + obtain ⟨C,hC,hbound⟩ := A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain 1 g.contMDiff + choose D hD hd using fun i : A.centers => A.tensorPlaneRead_bound i 1 + let B : ℝ := 1+∑ i : A.centers, D i*C + have hB : 1 ≤ B := by + have hh := Finset.sum_nonneg (s := Finset.univ) (fun i _ => mul_nonneg (hD i) hC) + change 1 ≤ 1+∑ i : A.centers, D i*C + linarith + have hb (i : A.centers) : WeightedEstimates.WeightedBound univ 1 1 B (A.tensorPlaneRead i g.inner) := by + apply (hd i g.inner 1 C zero_lt_one le_rfl hC g.contMDiff hbound).mono_const + have hh := Finset.single_le_sum (s := Finset.univ) + (fun i _ => mul_nonneg (hD i) hC) (Finset.mem_univ i) + change D i*C ≤ 1+∑ i : A.centers, D i*C + linarith + refine ⟨T,B,hT,fun H hH => (hpos H hH).1,fun H hH => (hpos H hH).2,hB, + fun i x hx => mem_iUnion.mpr ⟨i,mem_image_of_mem _ hx⟩, + fun i x => (hb i).norm_le (mem_univ x),?_⟩ + intro i x y + apply Convex.norm_image_sub_le_of_norm_fderiv_le (𝕜 := ℝ) _ _ + (convex_univ : Convex ℝ (univ : Set SmallModes.Base)) (mem_univ x) (mem_univ y) + · intro a _ + exact (A.tensorPlaneRead_metric_smooth g i).differentiable (by simp) a + · intro a _ + have hh := (hb i).deriv_le zero_lt_one (le_refl 1) (mem_univ a) + simpa only [iteratedFDerivWithin_univ,one_pow,div_one,norm_iteratedFDeriv_one] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/MixedAtlasGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MixedAtlasGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..8abd5b87aa58f49366d188c98cc80ad13934bede --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/MixedAtlasGeometry.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedPatchGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasBounds + +namespace OAI + +/-! Local primitive geometry and exterior regularity may use different atlases. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma geometry_at_of_planeRead_good {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + (i : A.centers) (p : M) (hp : p ∈ tsupport (A.weight i)) + (hI : Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p)))) + {ξ : SmallModes.Base} (hg : Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (planeCoordinateIsometry (chart (i : M) p))) ξ) : + Function.Injective (mfderiv planeModel spaceModel F p) ∧ + ∃ v w : SmallModes.Base, realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0 := by + refine ⟨A.immersion_of_planeRead_injective i hF hp hI,?_⟩ + have he := A.vectorPlaneRead_eventually_coordinateMap F i (houter i) hp + have hpoint : coordinateChart (i : M) p = planeCoordinateIsometry (chart (i : M) p) := by + rw [planeCoordinateIsometry_chart] + rfl + apply nonzero_secondForm_of_chart_good hF (i : M) p + (by simpa [coordinateChart_source,chart] using A.weight_support i hp) + · rw [hpoint,← he.fderiv_eq] + exact hI + · rw [hpoint,← (realSecondTensor_eventuallyEq he).eq_of_nhds] + exact hg + +end SmoothingAtlas +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem independent_supported_patch_geometry (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) : + ∃ ρ : ℝ, 0 < ρ ∧ + ∀ (G V : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ V → ∀ b : ℝ, 0 ≤ b → b < ρ → + B.WeightedBound 1 2 b (G-F) → + (∀ p ∈ tsupport (B.weight i), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ B.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p))) ∧ + realSecondTensor (spaceCoordinates ∘ B.vectorPlaneRead i V) + (planeCoordinateIsometry (chart (i : M) p)) ≠ 0) → + (∀ p ∉ tsupport (B.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 + obtain ⟨D,hD,hchange⟩ := B.weightedBound_change_atlas (V := Space) data.A 2 + have hDp : 0 < D+1 := by positivity + refine ⟨ρ/(D+1),div_pos hρ hDp,?_⟩ + intro G V hG hV b hb hbr hclose hnormal hexterior + have hDb : D*b < ρ := by + have hh := (lt_div_iff₀ hDp).mp hbr + nlinarith + obtain ⟨hImm,hgood,_⟩ := hnear G hG (D*b) (mul_nonneg hD hb) hDb + (hchange (G-F) 1 b zero_lt_one le_rfl hb (hG.sub hF) hclose) + have hpoint (p : M) : Function.Injective (mfderiv planeModel spaceModel V p) ∧ + ∃ v w : SmallModes.Base, realSecondForm (coordinateMap V p) v w (coordinateCenter p) ≠ 0 := by + by_cases hp : p ∈ tsupport (B.weight i) + · obtain ⟨hI,hN⟩ := hnormal p hp + obtain ⟨ξ,_,_,_,hg,_⟩ := PhaseGeometry.positive_good_phase_data hN + (H₀ := ![(1:ℝ),0,1]) (by simp) (by simp) + exact B.geometry_at_of_planeRead_good hV houter i p hp hI (hg 0) + · obtain ⟨j,hj⟩ : ∃ j : data.A.centers, data.A.weight j p ≠ 0 := by + by_contra! hz + have hh := data.A.partition p + simp only [hz,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) + apply data.A.geometry_at_of_planeRead_good hV data.outer_locally_one j p hjp + · rw [he.fderiv_eq] + exact hImm j _ hx + · rw [(realSecondTensor_eventuallyEq he).eq_of_nhds] + exact hgood j 0 _ hx + exact ⟨fun p => (hpoint p).1,fun p => (hpoint p).2⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a63928cea8ff3ea8150fc392114a67f81780e980 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseBudgets.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NoncriticalPhaseCover +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds + +namespace OAI + +/-! Fixed coordinate budgets on the finite cover of a noncritical phase. +The immersion has no role in selecting these constants. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes WeightedEstimates + +theorem noncritical_phase_cover_budgets {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) (hφK : ∀ x ∈ (K : Set Base), phaseDerivative φ x ≠ 0) : + ∃ (t : Finset K) (c : t → NoncriticalPhaseChart φ) (J : ℕ → ℝ), + (K : Set Base) ⊆ ⋃ i : t, (c i).chart.source ∧ (∀ m, 1 ≤ J m) ∧ + (∀ i m j, j ≤ m → ∀ x ∈ (c i).chart.source, + ‖iteratedFDerivWithin ℝ j (c i).chart (c i).chart.source x‖ ≤ J m) ∧ + (∀ i m j, j ≤ m → ∀ x ∈ (c i).chart.target, + ‖iteratedFDerivWithin ℝ j (c i).chart.symm (c i).chart.target x‖ ≤ J m) := by + classical + obtain ⟨t,c,hcover⟩ := finite_noncritical_phase_cover hφ K hφK + choose D hD hd using fun (i : t) m => compact_local_weighted_bound + (c i).chart.open_source isOpen_univ (c i).sourceCompact.isCompact (c i).sourceBound + (subset_univ _) (c i).smooth.contDiffOn m + choose E hE he using fun (i : t) m => compact_local_weighted_bound + (c i).chart.open_target isOpen_univ (c i).targetCompact.isCompact (c i).targetBound + (subset_univ _) (c i).smoothInverse.contDiffOn m + let J := fun m => 1+∑ i : t, (D i m+E i m) + have hJ (m) : 1 ≤ J m := by + have hh : 0 ≤ ∑ i : t, (D i m+E i m) := + Finset.sum_nonneg (fun i _ => add_nonneg (zero_le_one.trans (hD i m)) (zero_le_one.trans (hE i m))) + exact le_add_of_nonneg_right hh + have hDE (i : t) (m) : D i m ≤ J m ∧ E i m ≤ J m := by + have hh := Finset.single_le_sum (s := Finset.univ) (f := fun i : t => D i m+E i m) + (fun i _ => add_nonneg (zero_le_one.trans (hD i m)) (zero_le_one.trans (hE i m))) (Finset.mem_univ i) + have hs : D i m+E i m ≤ J m := hh.trans (le_add_of_nonneg_left zero_le_one) + exact ⟨(le_add_of_nonneg_right (zero_le_one.trans (hE i m))).trans hs, + (le_add_of_nonneg_left (zero_le_one.trans (hD i m))).trans hs⟩ + refine ⟨t,c,J,hcover,hJ,?_,?_⟩ + · intro i m j hj x hx + have hh := hd i m 1 zero_le_one le_rfl j hj x hx + simpa only [one_pow,one_mul] using hh.trans (hDE i m).1 + · intro i m j hj x hx + have hh := he i m 1 zero_le_one le_rfl j hj x hx + simpa only [one_pow,one_mul] using hh.trans (hDE i m).2 + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..57c35485d6de0aa4486db6a33ee31df9dc06f4d2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NoncriticalPhaseCover.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ExtendedPhaseChart +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhasePartition + +namespace OAI + +/-! Compact phase-chart geometry chosen independently of the immersion. -/ +noncomputable section +open Set Filter TopologicalSpace +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +structure NoncriticalPhaseChart (φ : Base → ℝ) where + chart : OpenPartialHomeomorph Base Base + phase : ∀ x, (chart x).1 = φ x + smooth : ContDiff ℝ ∞ chart + smoothInverse : ContDiff ℝ ∞ chart.symm + sourceCompact : Compacts Base + targetCompact : Compacts Base + sourceBound : chart.source ⊆ sourceCompact + targetBound : chart.target ⊆ targetCompact + + theorem exists_noncriticalPhaseChart {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {p : Base} (hp : phaseDerivative φ p ≠ 0) : + ∃ c : NoncriticalPhaseChart φ, p ∈ c.chart.source := by + obtain ⟨e,hep,hphase,he,hi⟩ := exists_extended_phase_chart hφ hp + obtain ⟨r,hr,hball⟩ := Metric.isOpen_iff.mp e.open_source p hep + let V := Metric.ball p (r/2) + let KE := Metric.closedBall p (r/2) + have hKE : IsCompact KE := isCompact_closedBall p (r/2) + let KV := e '' KE + have hKV : IsCompact KV := hKE.image he.continuous + let d := e.restrOpen V Metric.isOpen_ball + refine ⟨⟨d,hphase,he,hi,⟨KE,hKE⟩,⟨KV,hKV⟩,?_,?_⟩,?_⟩ + · intro x hx + exact Metric.ball_subset_closedBall hx.2 + · intro y hy + refine ⟨d.symm y,Metric.ball_subset_closedBall (d.map_target hy).2,?_⟩ + exact d.right_inv hy + · exact ⟨hep,Metric.mem_ball_self (by linarith)⟩ + + theorem finite_noncritical_phase_cover {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) (hφK : ∀ p ∈ (K : Set Base), phaseDerivative φ p ≠ 0) : + ∃ (t : Finset K) (c : t → NoncriticalPhaseChart φ), + (K : Set Base) ⊆ ⋃ i : t, (c i).chart.source := by + classical + choose c hc using fun p : K => exists_noncriticalPhaseChart hφ (hφK p p.property) + have hcover : (K : Set Base) ⊆ ⋃ p : K, (c p).chart.source := by + intro p hp + exact mem_iUnion.mpr ⟨⟨p,hp⟩,hc ⟨p,hp⟩⟩ + obtain ⟨t,ht⟩ := K.isCompact.elim_finite_subcover (fun p : K => (c p).chart.source) + (fun p => (c p).chart.open_source) hcover + refine ⟨t,fun i => c i.val,?_⟩ + intro p hp + obtain ⟨i,hit,hi⟩ := mem_iUnion₂.mp (ht hp) + exact mem_iUnion.mpr ⟨⟨i,hit⟩,hi⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasAnsatz.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasAnsatz.lean new file mode 100644 index 0000000000000000000000000000000000000000..39d3eacaa9669dc0d10cf81e67a490a47d250a92 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasAnsatz.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedChartPullback +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPeriodicAnsatz +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveMapBound + +namespace OAI + +/-! A supported finite ansatz in a nonlinear phase chart, restored to the +original surface and retaining its exact coordinate expression. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +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 phaseAtlasLocalIncrement (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (χ : JetPolynomial.Base → ℝ) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : JetPolynomial.Base → Space := + supportedChartPullback e χ + (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z - (A.vectorChartRead i F ∘ e.symm)) + +def phaseAtlasAnsatz (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (χ : JetPolynomial.Base → ℝ) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : M → Space := + F + restore (i : M) (A.outer i) (A.phaseAtlasLocalIncrement i F e χ U ℓ L z) + +lemma phaseAtlasLocalIncrement_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + {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 : ℝ) : + ContDiff ℝ ∞ (A.phaseAtlasLocalIncrement i F e χ U ℓ L z) := by + have hG := (A.vectorChartRead_smooth i hF).comp hi + exact supportedChartPullback_smooth e he hχ + ((finiteAnsatz_smooth_global hG U hK hKO (fun j x _ hx => hzero j x hx) ℓ L z).sub hG) + +omit [CompactSpace M] in +lemma phaseAtlasLocalIncrement_support (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.phaseAtlasLocalIncrement i F e χ U ℓ L z) ⊆ e.symm '' K := + supportedChartPullback_support e hi hK hχ + (finiteAnsatz_tsupport_sub _ U hK.isClosed hzero ℓ L z) + +lemma phaseAtlasAnsatz_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + {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.phaseAtlasAnsatz i F e χ U ℓ L z) := + hF.add (restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (A.phaseAtlasLocalIncrement_smooth i hF e he hi hχ U hK hKO hzero ℓ L z)) + +lemma phaseAtlasAnsatz_coordinate (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) + (hχone : ∀ x ∈ e.symm '' K, χ x = 1) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {x : JetPolynomial.Base} (hx : x ∈ e.source) : + A.jetChartMap i (A.phaseAtlasAnsatz i F e χ U ℓ L z) x = + spaceCoordinates (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z (e x)) := by + have hs := (A.phaseAtlasLocalIncrement_support i F e hi hχ U hK hzero ℓ L z).trans hKA + have heq := A.jetChartMap_restored_supported i (A.phaseAtlasLocalIncrement i F e χ U ℓ L z) hs + rw [phaseAtlasAnsatz,A.jetChartMap_add,heq] + change spaceCoordinates (A.vectorChartRead i F x) + + spaceCoordinates (supportedChartPullback e χ + (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z - + (A.vectorChartRead i F ∘ e.symm)) x) = _ + have hpull := supportedChartPullback_eq e + (f := finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z - (A.vectorChartRead i F ∘ e.symm)) + (show tsupport (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z - (A.vectorChartRead i F ∘ e.symm)) ⊆ K from + finiteAnsatz_tsupport_sub _ U hK.isClosed hzero ℓ L z) hχone hx + rw [hpull] + simp only [Pi.sub_apply,Function.comp_apply,e.left_inv hx,map_sub] + abel + +lemma phaseAtlasAnsatz_eventuallyEq (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) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {p : M} (hp : p ∉ tsupport (A.weight i)) : + A.phaseAtlasAnsatz i F e χ U ℓ L z =ᶠ[𝓝 p] F := by + let H := A.phaseAtlasLocalIncrement i F e χ U ℓ L z + have hs : tsupport H ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) := + (A.phaseAtlasLocalIncrement_support i F e hi hχ 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 heq : (H ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = H := by + funext x + simp + have ht := A.restore_plane_tsupport i (H ∘ planeCoordinateIsometry.symm) hs' + rw [heq] at ht + have hz := notMem_tsupport_iff_eventuallyEq.mp (fun h => hp (ht h)) + 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/Atlas/NonlinearAtlasErrorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasErrorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e1e00a00f3b3deaa13905ea9e343186932a7029 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasErrorBound.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasMetric +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 nonlinearErrorFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance nonlinearErrorFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance nonlinearErrorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance nonlinearErrorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance nonlinearErrorSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance nonlinearErrorSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseAtlasRemainder_smooth (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) + {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) + {B : JetPolynomial.Base → PhaseMean.Tensor} (hB : ContDiff ℝ ∞ B) : + ContDiff ℝ ∞ (A.phaseAtlasRemainder i F e U ℓ L z P B) := by + have hbase := (A.jetChartMap_smooth i hF).comp hi + have hV := spaceCoordinates.contDiff.comp + (finiteAnsatz_smooth_global ((A.vectorChartRead_smooth i hF).comp hi) U hK hKO + (fun j x _ hx => hzero j x hx) ℓ L z) + have hm (f : JetPolynomial.Base → JetPolynomial.Space) (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (fun y => RealModes.realMetricTensor (f ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y)) := + (contDiffOn_univ.mp (RealModes.contDiffOn_realMetricTensor isOpen_univ + (hf.comp planeCoordinateIsometry.symm.contDiff).contDiffOn)).comp planeCoordinateIsometry.contDiff + have hh := (((hm _ hV).sub (hm _ hbase)).sub + ((coordinatePolynomialValue_smooth hP hbase z).comp planeCoordinateIsometry.contDiff)).sub hB + convert hh using 1 + funext y + simp only [phaseAtlasRemainder,coordinateMetricMap,Pi.add_apply,Function.comp_apply,Function.comp_assoc] + rw [sub_add_eq_sub_sub] + +/-- A local phase remainder and the actual solved mean control the global metric error. -/ +theorem phaseAtlasAnsatz_error_bound (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) + {W : Set JetPolynomial.Base} (hW : IsOpen W) (hTW : MapsTo e e.source W) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (O : TopologicalSpace.Opens JetPolynomial.Base) (U : ℕ → Family O Space) + (K : Set JetPolynomial.Base), IsCompact K → K ⊆ O → + e.symm '' K ⊆ (A.chartWeightCompact i : Set JetPolynomial.Base) → + (∀ j x, x ∉ K → (U j).val x = 0) → + (∀ x ∈ e.symm '' K, χ x = 1) → + ∀ (ℓ : 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)) → + ∀ (B : JetPolynomial.Base → PhaseMean.Tensor), ContDiff ℝ ∞ B → + ∀ (s C E : ℝ), 0 < s → s ≤ 1 → 0 ≤ E → + A.TensorWeightedBound s m C (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback P e e.symm))) z F-γ) → + WeightedEstimates.WeightedBound W s m E (A.phaseAtlasRemainder i F e U ℓ L z P B) → + A.TensorWeightedBound s m (C+D*E) + (inducedTensor (A.phaseAtlasAnsatz i F e χ U ℓ L z)- + (γ+A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (localizedTensorPullback e χ B y)))) := by + obtain ⟨Dt,hDt,ht⟩ := localized_tensor_pullback_bound he hχ hχc e.open_source hW hχs hTW m + obtain ⟨Dr,hDr,hr⟩ := A.single_tensor_restore_bound i m + refine ⟨Dr*Dt,mul_nonneg hDr hDt,?_⟩ + intro F hF O U K hK hKO hKA hzero hone ℓ L z n P hP γ hγ B hB s C E hs hs1 hE hmean hrem + have hR := A.phaseAtlasRemainder_smooth i hF e hi U hK.isClosed hKO hzero ℓ L z hP hB + have hpull := localizedTensorPullback_smooth he hχ hR + have hb := ht _ s E hs hs1 hE hR hrem + have htensor := weightedBound_comp_isometry_on planeCoordinateIsometry.symm isOpen_univ hpull hb + have hrb := hr (localizedTensorPullback e χ (A.phaseAtlasRemainder i F e U ℓ L z P B) ∘ + planeCoordinateIsometry.symm) s (Dt*E) hs hs1 (mul_nonneg hDt hE) + (hpull.comp planeCoordinateIsometry.symm.contDiff) (by simpa only [preimage_univ] using htensor) + simp only [Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] at hrb + have hRs := A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + (fiberFromThree.contDiff.comp hpull) + have hPm := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hP he hi) + have hms := (A.atlasPolynomialMetric_smooth (A.primitiveAtlasPolynomial_smooth i hPm) hF z).sub_section hγ + have hadd := A.tensorWeightedBound_add hms hRs hs.le hmean hrb + rw [A.phaseAtlasAnsatz_defect i hF e he hi hχ hχs U hK hKO hKA hzero hone ℓ L z P γ B] + simpa only [Function.comp_def,LinearIsometryEquiv.symm_apply_apply,mul_assoc] using hadd + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMapBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMapBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c2d67b53044a905d692b47b1671fbc26742ad8f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMapBound.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasAnsatz + +namespace OAI + +/-! Fixed coordinate transport of the actual periodic map increment. -/ +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 phaseAtlasAnsatz_increment_bound (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) (hc : HasCompactSupport χ) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (S : TopologicalSpace.Opens JetPolynomial.Base) (U : ℕ → Family S Space) + (K : Set JetPolynomial.Base), IsClosed K → K ⊆ S → + (∀ j x, x ∉ K → (U j).val x = 0) → + ∀ (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + WeightedEstimates.WeightedBound S s m C + (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z-A.vectorChartRead i F ∘ e.symm) → + A.WeightedBound s m (D*C) (A.phaseAtlasAnsatz i F e χ U ℓ L z-F) := by + obtain ⟨Dt,hDt,ht⟩ := supportedChartPullback_bound (V := Space) e he hχ hc m + obtain ⟨Dr,hDr,hr⟩ := A.single_map_restore_bound i m + refine ⟨Dr*Dt,mul_nonneg hDr hDt,?_⟩ + intro F hF S U K hK hKS hzero ℓ L z s C hs hs1 hC hb + let f := finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z-A.vectorChartRead i F ∘ e.symm + have hbase := (A.vectorChartRead_smooth i hF).comp hi + have hf : ContDiff ℝ ∞ f := + (finiteAnsatz_smooth_global hbase U hK hKS (fun j x _ hx => hzero j x hx) ℓ L z).sub hbase + have hsp : tsupport f ⊆ S := (finiteAnsatz_tsupport_sub _ U hK hzero ℓ L z).trans hKS + have hglobal := hb.extend_support S.isOpen hsp hC + have hpull := ht f s C hs hs1 hC hf hglobal + have hrest := hr (supportedChartPullback e χ f) (supportedChartPullback_smooth e he hχ hf) + s (Dt*C) hs hs1 (mul_nonneg hDt hC) hpull + have heq : A.phaseAtlasAnsatz i F e χ U ℓ L z-F = + restore (i : M) (A.outer i) (supportedChartPullback e χ f) := by + funext p + exact add_sub_cancel_left _ _ + rw [heq] + simpa only [mul_assoc] using hrest + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..7668cf21642599b3a9945c15010d980d7fad523b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearAtlasMetric.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedLocalMetricDefect +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 nonlinearMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance nonlinearMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance nonlinearMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance nonlinearMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance nonlinearMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance nonlinearMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def phaseAtlasRemainder (i : A.centers) (F : M → Space) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) (L : ℕ) (z : ℝ) + {n : ℕ} (P : Fin 3 → Fin n → Expression) (B : JetPolynomial.Base → PhaseMean.Tensor) : + JetPolynomial.Base → PhaseMean.Tensor := fun y => + RealModes.realMetricTensor + (spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry y) - + coordinateMetricMap P z (A.jetChartMap i F ∘ e.symm) (planeCoordinateIsometry y) - B y + +lemma phaseAtlasAnsatz_defect (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {χ : JetPolynomial.Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hχs : tsupport χ ⊆ e.source) + {O : TopologicalSpace.Opens JetPolynomial.Base} (U : ℕ → Family O Space) + {K : Set JetPolynomial.Base} (hK : IsCompact K) (hKO : K ⊆ O) + (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 : ℝ) + {n : ℕ} (P : Fin 3 → Fin n → Expression) + (γ : ∀ x : M, CovariantTwoTensor x) (B : JetPolynomial.Base → PhaseMean.Tensor) : + inducedTensor (A.phaseAtlasAnsatz i F e χ U ℓ L z) - + (γ + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree (localizedTensorPullback e χ B y))) = + (A.atlasPolynomialMetric (A.primitiveAtlasPolynomial i + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback P e e.symm))) z F - γ) + + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (localizedTensorPullback e χ (A.phaseAtlasRemainder i F e U ℓ L z P B) y)) := by + let f := A.phaseAtlasLocalIncrement i F e χ U ℓ L z + have hf := A.phaseAtlasLocalIncrement_smooth i hF e he hi hχ U hK.isClosed hKO hzero ℓ L z + have hs := (A.phaseAtlasLocalIncrement_support i F e hi hχs U hK hzero ℓ L z).trans hKA + have hd := A.supported_local_metric_defect i hF f hf hs + (cutoffTensorPolynomial χ (tensorPolynomialCoordinatePullback P e e.symm)) z γ + (fun y => localizedTensorPullback e χ B (planeCoordinateIsometry.symm y)) + simp only [LinearIsometryEquiv.symm_apply_apply] at hd + change inducedTensor (F+restore (i : M) (A.outer i) f) - _ = _ + rw [hd] + congr 1 + congr 1 + funext y + apply congrArg fiberFromThree + let V := spaceCoordinates ∘ finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z + let H := A.jetChartMap i F + have hH : ContDiff ℝ ∞ H := A.jetChartMap_smooth i hF + have hV : ContDiff ℝ ∞ V := spaceCoordinates.contDiff.comp + (finiteAnsatz_smooth_global ((A.vectorChartRead_smooth i hF).comp hi) U hK.isClosed hKO + (fun j x _ hx => hzero j x hx) ℓ L z) + have hsupport : tsupport (V-H ∘ e.symm) ⊆ K := by + have hz := finiteAnsatz_tsupport_sub (A.vectorChartRead i F ∘ e.symm) U hK.isClosed hzero ℓ L z + have hmaps : V-H ∘ e.symm = spaceCoordinates ∘ + (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z - A.vectorChartRead i F ∘ e.symm) := by + funext x + exact (map_sub spaceCoordinates _ _).symm + rw [hmaps] + exact (tsupport_comp_subset (map_zero spaceCoordinates) _).trans hz + have hv := supported_phase_metric_defect P e he hi hχs hK hone hH hV hsupport B z y + have hW : H + supportedChartPullback e χ (V-H ∘ e.symm) = + spaceCoordinates ∘ (A.vectorChartRead i F + f) := by + funext x + simp only [Pi.add_apply,Pi.sub_apply,Function.comp_apply,supportedChartPullback, + V,H,jetChartMap,f,phaseAtlasLocalIncrement,map_add,map_sub,map_smul] + rw [hW] at hv + dsimp only [V,H] at hv + dsimp only [localizedTensorPullback,phaseAtlasRemainder] at hv ⊢ + simpa only [coordinateMetricMap,Pi.add_apply,sub_add_eq_sub_sub, + Function.comp_assoc] using hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearPhaseFrameMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearPhaseFrameMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..10877fb39ff940c13477cc028a928037c629b3a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonlinearPhaseFrameMargins.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseChartInverse +import OAI.Geometry.Immersion.ClosedSurface.CoordinateMargins +import OAI.Geometry.SurfaceImmersion.Geometry.NormalDenominatorMargins + +namespace OAI + +/-! Quantitative Gram and transverse-normal denominators in nonlinear +first-coordinate phase charts. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma inverse_chart_det_inv (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) {y : Base} (hy : y ∈ e.target) : + (coordDet (fderiv ℝ e.symm y))⁻¹ = coordDet (fderiv ℝ e (e.symm y)) := by + have hd := congrArg coordDet (inverse_chart_derivative e he hi hy) + rw [coordDet_comp,coordDet_id] at hd + have hn : coordDet (fderiv ℝ e.symm y) ≠ 0 := by + intro hz + rw [hz,mul_zero] at hd + exact zero_ne_one hd + have hh := congrArg (fun t => t*(coordDet (fderiv ℝ e.symm y))⁻¹) hd + simpa only [mul_assoc,mul_inv_cancel₀ hn,mul_one,one_mul] using hh.symm + +lemma realSecond_nonlinear_chart {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) + (hi : ContDiff ℝ ∞ e.symm) (hphase : ∀ x, (e x).1 = φ x) + {y : Base} (hy : y ∈ e.target) + (hImm : Function.Injective (fderiv ℝ F (e.symm y))) : + realSecond (F ∘ e.symm) y = (coordDet (fderiv ℝ e.symm y))^2 • + secondQuadratic (realSecondTensor F (e.symm y)) + (-(phaseDerivative φ (e.symm y)).2,(phaseDerivative φ (e.symm y)).1) := by + have hdet := coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source + hi.contDiffOn he.contDiffOn (fun z hz => e.map_target hz) (fun z hz => e.right_inv hz) hy + have hh := phase_length_comp_smooth hF hi (phaseDerivative φ (e.symm y)) y + (gramDet_ne_zero_of_injective _ hImm) hdet + rw [inverse_chart_phase_covector hφ e hi hphase hy] at hh + have hdx : (-(dx : Base).2,(dx : Base).1) = dy := by simp [dx,dy] + rw [hdx] at hh + change secondQuadratic (realSecondTensor (F ∘ e.symm) y) dy = _ at hh + change realSecondForm (F ∘ e.symm) dy dy y = _ + rw [realSecondForm_quadratic (hF.comp hi)] + exact hh + +theorem inverse_gram_nonlinear_chart_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) + (hi : ContDiff ℝ ∞ e.symm) {y : Base} (hy : y ∈ e.target) + {D K : ℝ} (_hD : 0 ≤ D) (hK : 0 ≤ K) + (hdet : |coordDet (fderiv ℝ e (e.symm y))| ≤ D) + (hG : ‖(NormalFrame.gramDet (coordDeriv dx F (e.symm y)) + (coordDeriv dy F (e.symm y)))⁻¹‖ ≤ K) : + ‖(NormalFrame.gramDet (coordDeriv dx (F ∘ e.symm) y) + (coordDeriv dy (F ∘ e.symm) y))⁻¹‖ ≤ K*D^2 := by + have hg := gramDet_comp_smooth hF hi y + change _ = (coordDet (fderiv ℝ e.symm y))^2 * _ at hg + rw [hg,mul_inv_rev,← inv_pow,norm_mul,norm_pow,inverse_chart_det_inv e he hi hy, + Real.norm_eq_abs] + exact mul_le_mul hG (pow_le_pow_left₀ (abs_nonneg _) hdet 2) (by positivity) hK + +theorem inverse_normal_nonlinear_chart_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) + (hi : ContDiff ℝ ∞ e.symm) (hphase : ∀ x, (e x).1 = φ x) + {y : Base} (hy : y ∈ e.target) {D K : ℝ} (_hD : 0 ≤ D) + (hdet : |coordDet (fderiv ℝ e (e.symm y))| ≤ D) + (hImm : Function.Injective (fderiv ℝ F (e.symm y))) + (hgood : Good (realSecondTensor F (e.symm y)) (phaseDerivative φ (e.symm y))) + (hN : ‖secondQuadratic (realSecondTensor F (e.symm y)) + (-(phaseDerivative φ (e.symm y)).2,(phaseDerivative φ (e.symm y)).1)‖⁻¹ ≤ K) : + ‖(realSecond (F ∘ e.symm) y ⬝ᵥ realSecond (F ∘ e.symm) y)⁻¹‖ ≤ K^2*D^4 := by + let S := secondQuadratic (realSecondTensor F (e.symm y)) + (-(phaseDerivative φ (e.symm y)).2,(phaseDerivative φ (e.symm y)).1) + have hSn : 0 < ‖S‖ := norm_pos_iff.mpr hgood.2 + have hSi : ‖(S ⬝ᵥ S)⁻¹‖ ≤ K^2 := by + have hh := norm_inv_dot_self_le hSn le_rfl + rw [← inv_pow] at hh + exact hh.trans (pow_le_pow_left₀ (inv_nonneg.mpr hSn.le) hN 2) + rw [realSecond_nonlinear_chart hF hφ e he hi hphase hy hImm, + smul_dotProduct,dotProduct_smul] + simp only [smul_eq_mul,mul_inv_rev,← inv_pow,norm_mul,norm_pow, + inverse_chart_det_inv e he hi hy] + calc + _ ≤ K^2*D^2*D^2 := by + gcongr + · simpa only [Real.norm_eq_abs] using hdet + · simpa only [Real.norm_eq_abs] using hdet + _ = K^2*D^4 := by ring + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonparallelPhaseCovectors.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonparallelPhaseCovectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..b78a7d8396c3f217227d133ca98962d69efb874c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NonparallelPhaseCovectors.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GenericCurvePhases + +namespace OAI + +/-! Two independently perturbed phase covectors can avoid parallelism in +every open parameter set. Only the two-dimensional determinant is used. -/ +noncomputable section +open Set MeasureTheory +open scoped Topology +namespace ClosedSurfaceR4.PhaseGeometry +local instance nonparallelVolumeHaar : (volume : Measure CurvePlane).IsAddHaarMeasure := + Measure.prod.instIsAddHaarMeasure _ _ + +def covectorDet (v w : CurvePlane) : ℝ := v.1*w.2-v.2*w.1 + +def covectorDetMap (v : CurvePlane) : CurvePlane →L[ℝ] ℝ := + v.1 • ContinuousLinearMap.snd ℝ ℝ ℝ-v.2 • ContinuousLinearMap.fst ℝ ℝ ℝ + +lemma covectorDetMap_apply (v w : CurvePlane) : covectorDetMap v w = covectorDet v w := rfl + +lemma covectorDetMap_surjective {v : CurvePlane} (hv : v ≠ 0) : + Function.Surjective (covectorDetMap v) := by + intro r + by_cases hfirst : v.1 = 0 + · have hsecond : v.2 ≠ 0 := by + intro hs + exact hv (Prod.ext hfirst hs) + refine ⟨(-r/v.2,0),?_⟩ + change v.1*0-v.2*(-r/v.2) = r + field_simp + ring + · refine ⟨(0,r/v.1),?_⟩ + change v.1*(r/v.1)-v.2*0 = r + field_simp + ring + +lemma dense_nonzero_covectors : Dense ({0} : Set CurvePlane)ᶜ := by + apply Measure.dense_of_ae (μ := (volume : Measure CurvePlane)) + simp only [ae_iff,mem_singleton_iff,not_not] + exact measure_singleton 0 + +lemma covectorDet_open_dense : + IsOpen {z : CurvePlane × CurvePlane | covectorDet z.1 z.2 ≠ 0} ∧ + Dense {z : CurvePlane × CurvePlane | covectorDet z.1 z.2 ≠ 0} := by + have hc : Continuous (fun z : CurvePlane × CurvePlane => covectorDet z.1 z.2) := by + dsimp [covectorDet] + fun_prop + refine ⟨isOpen_ne.preimage hc,?_⟩ + rw [dense_iff_inter_open] + intro U hU hne + obtain ⟨⟨v,w⟩,hvw⟩ := hne + obtain ⟨A,B,hA,hB,hvA,hwB,hAB⟩ := isOpen_prod_iff.mp hU v w hvw + obtain ⟨v',hv'A,hv'⟩ := dense_nonzero_covectors.inter_open_nonempty A hA ⟨v,hvA⟩ + have hv0 : v' ≠ 0 := hv' + have hR : Dense ({0} : Set ℝ)ᶜ := by + apply Measure.dense_of_ae (μ := (volume : Measure ℝ)) + simp only [ae_iff,mem_singleton_iff,not_not] + exact measure_singleton 0 + have hd := hR.preimage ((covectorDetMap v').isOpenMap (covectorDetMap_surjective hv0)) + obtain ⟨w',hw'B,hw'⟩ := hd.inter_open_nonempty B hB ⟨w,hwB⟩ + refine ⟨(v',w'),hAB ⟨hv'A,hw'B⟩,?_⟩ + exact hw' + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/NormalDefectCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NormalDefectCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..b76dcebd43a4530a39f95a9caa3a37fec995c1da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/NormalDefectCoordinates.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CurveFrameInverse + +namespace OAI + +/-! A genuine two-component normal defect for the derivative of a surface map. -/ +noncomputable section +open Set Filter Matrix +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def coordinateDifferential (φ : Base → ProjectionTarget 3) (x : Base) : Base →L[ℝ] (Fin 3 → ℝ) := + (EuclideanSpace.equiv (Fin 3) ℝ).toContinuousLinearMap.comp (fderiv ℝ φ x) + +def transverseDerivative (φ : Base → ProjectionTarget 3) (x : Base) : Fin 3 → ℝ := + coordinateDifferential φ x (![1,0] : Base) + +def normalDefect (φ : Base → ProjectionTarget 3) (a : Fin 3 → ℝ) (x : Base) : Base := + ((curveNormalLinear (transverseDerivative φ x) a).inverse + (coordinateDifferential φ x (![0,1] : Base))).1 + +lemma coordinateDifferential_smooth {φ : Base → ProjectionTarget 3} (hφ : ContDiff ℝ ∞ φ) : + ContDiff ℝ ∞ (coordinateDifferential φ) := + contDiff_const.clm_comp (hφ.fderiv_right (m := ∞) (by simp)) + +lemma transverseDerivative_smooth {φ : Base → ProjectionTarget 3} (hφ : ContDiff ℝ ∞ φ) : + ContDiff ℝ ∞ (transverseDerivative φ) := + (coordinateDifferential_smooth hφ).clm_apply contDiff_const + +lemma normalDefect_smooth {φ : Base → ProjectionTarget 3} (hφ : ContDiff ℝ ∞ φ) + {a : Fin 3 → ℝ} {U : Set Base} + (hu : ∀ x ∈ U, transverseDerivative φ x ≠ 0) + (ha : ∀ x ∈ U, ∀ r : ℝ, r • transverseDerivative φ x ≠ a) : + ContDiffOn ℝ ∞ (normalDefect φ a) U := 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) + intro x hx + have hI := (curveNormalLinear_invertible (hu x hx) (ha x hx)).contDiffAt_map_inverse.comp x hframe.contDiffAt + exact (hI.clm_apply ((coordinateDifferential_smooth hφ).clm_apply contDiff_const).contDiffAt).fst.contDiffWithinAt + +lemma normalDefect_immersion_iff (φ : Base → ProjectionTarget 3) (a : Fin 3 → ℝ) (x : Base) + (hu : transverseDerivative φ x ≠ 0) + (ha : ∀ r : ℝ, r • transverseDerivative φ x ≠ a) : + Function.Injective (fderiv ℝ φ x) ↔ normalDefect φ a x ≠ 0 := by + let L := (curveNormalLinear (transverseDerivative φ x) a).inverse.comp (coordinateDifferential φ x) + have hframe := curveNormalLinear_invertible hu ha + have hI : Function.Injective (curveNormalLinear (transverseDerivative φ x) a).inverse := by + intro v w hvw + have hh := congrArg (curveNormalLinear (transverseDerivative φ x) a) hvw + simpa only [hframe.self_apply_inverse] using hh + have hL : L (![1,0] : Base) = ((0:Base),1) := curveNormalLinear_inverse_velocity hu ha + have hequiv : Function.Injective (fderiv ℝ φ x) ↔ Function.Injective L := by + constructor + · intro h v w hEq + apply h + apply (EuclideanSpace.equiv (Fin 3) ℝ).injective + apply hI + exact hEq + · intro h v w hEq + apply h + change (curveNormalLinear (transverseDerivative φ x) a).inverse + (EuclideanSpace.equiv (Fin 3) ℝ (fderiv ℝ φ x v)) = _ + rw [hEq] + rfl + exact hequiv.trans (normal_coordinates_injective_iff L hL) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/OneFiberChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OneFiberChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..cda841bfac282bbe95ab85954185f01a18833efd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OneFiberChart.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.OneFiberAugmentation + +namespace OAI + +/-! Smooth submersion coordinates with one-dimensional fibers. -/ +noncomputable section +open Set +open scoped ContDiff Topology +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_submersion_chart (hdimEF : Module.finrank ℝ E = Module.finrank ℝ F + 1) + {f : E → F} + (hf : ContDiff ℝ ∞ f) (p : E) + (hsurj : Function.Surjective (fderiv ℝ f p)) : + ∃ e : OpenPartialHomeomorph E (F × ℝ), p ∈ e.source ∧ + (∀ x, (e x).1 = f x) ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + obtain ⟨ℓ,hℓ⟩ := one_fiber_linear_augmentation hdimEF (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 : E → F × ℝ := 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 E := {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 ℝ E := 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 : E → F × ℝ) = 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 : E →L[ℝ] E) 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/Atlas/OuterChartDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterChartDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..032c9f13f3155aa4d63a7470bcabc9663f758630 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterChartDifferential.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential + +namespace OAI + +/-! Recover the actual differential wherever the outer chart cutoff equals +one on a neighborhood, including a collar beyond the primitive support. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +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 vectorChartRead_comp_chart_of_outer (i : A.centers) (F : M → Space) + {p : M} (hp : p ∈ (chart (i : M)).source) + (houter : A.outer i =ᶠ[𝓝 p] fun _ => (1 : ℝ)) : + F =ᶠ[𝓝 p] A.vectorChartRead i F ∘ chart (i : M) := by + filter_upwards [(chart (i : M)).open_source.mem_nhds hp,houter] with q hq hone + simp only [Function.comp_apply,vectorChartRead,localize, + indicator_of_mem ((chart (i : M)).map_source hq), + (chart (i : M)).left_inv hq,hone,one_pow,one_smul] + +lemma vectorChartRead_differential_of_outer (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + {p : M} (hp : p ∈ (chart (i : M)).source) + (houter : A.outer i =ᶠ[𝓝 p] fun _ => (1 : ℝ)) : + surfaceDifferential F p = (fderiv ℝ (A.vectorChartRead i F) (chart (i : M) p)).comp + (surfaceDifferential (chart (i : M)) p) := by + have hc := ((chart_smooth (i : M)) p hp).contMDiffAt + ((chart (i : M)).open_source.mem_nhds hp) + have he := A.vectorChartRead_comp_chart_of_outer i F hp houter + unfold surfaceDifferential + rw [he.mfderiv_eq,mfderiv_comp p + ((A.vectorChartRead_smooth i hF).differentiable (by simp) _).mdifferentiableAt + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..3087660061db10fc1804b6a71a04c743f4990a78 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseConvexity.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.OuterPhaseGeometry + +namespace OAI + +/-! The transverse phase Hessian stays positive on the whole prescribed +outer plateau, including its collar beyond the primitive support. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing.SmoothingAtlas +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable (A : SmoothingAtlas M) + +theorem phase_hessian_positive_of_outer (i : A.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g 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) + {p : M} (hp : p ∈ (surfacePhaseChart (i : M) e).source) (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hpositive : ∀ v : SmallModes.Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (i : M)) phi (coordinateChart (i : M) p) v v) : + 0 < coordinateMetricHessian (inducedCoordinateMetric (A.phaseRealChartMap i e.symm F)) + Prod.fst (baseEquiv (e (chart (i : M) p))) dy dy := by + let er := realPhaseChart e + let x := baseEquiv (e (chart (i : M) p)) + have hx : x ∈ er.target := by + change baseEquiv.symm (baseEquiv (e (chart (i : M) p))) ∈ e.target + rw [baseEquiv.symm_apply_apply] + exact e.map_source hp.2 + have hback : er.symm x = coordinateChart (i : M) p := by + change baseEquiv (e.symm (baseEquiv.symm (baseEquiv (e (chart (i : M) p))))) = _ + rw [baseEquiv.symm_apply_apply] + have hps : chart (i : M) p ∈ e.source := hp.2 + exact (congrArg baseEquiv (e.left_inv hps)).trans (show baseEquiv (chart (i : M) p) = coordinateChart (i : M) p from rfl) + have her := realPhaseChart_smooth e he + have hir := realPhaseChart_symm_smooth e hi + have hcomp : phi ∘ er.symm =ᶠ[𝓝 x] Prod.fst := by + filter_upwards [er.open_target.mem_nhds hx] with y hy + change phi (er.symm y) = y.1 + rw [← hphase,er.right_inv hy] + have hdet : coordDet (fderiv ℝ er.symm x) ≠ 0 := + coordDet_fderiv_ne_zero_of_local_inverse er.open_target er.open_source hir.contDiffOn + her.contDiffOn er.symm.mapsTo (fun y hy => er.right_inv hy) hx + have hI : Function.Injective (fderiv ℝ (A.realChartMap i F) (er.symm x)) := by + rw [hback] + exact A.realChartMap_injective_of_outer i hF hp.1 ho + have hH := phase_chart_hessian_dy (A.realChartMap_smooth i hF.1) hphi hir x hcomp hI hdet + have hmap : A.phaseRealChartMap i e.symm F = A.realChartMap i F ∘ er.symm := by + funext y + simp only [phaseRealChartMap,realChartMap,Function.comp_apply,er,realPhaseChart_symm_apply] + have hb : (planeCoordinateIsometry : JetPolynomial.Base → SmallModes.Base) = baseEquiv := rfl + have hbs : (planeCoordinateIsometry.symm : SmallModes.Base → JetPolynomial.Base) = baseEquiv.symm := rfl + rw [hb,hbs,baseEquiv.symm_apply_apply] + rw [hmap,hH,hback, + coordinateMetricHessian_congr_germ (A.realChartMap_metric_germ_of_outer i hF hp.1 ho)] + apply hpositive + have hI' := inverse_chart_derivative_injective er her hir hx + intro hz + have hh : (dy : SmallModes.Base) = 0 := hI' (hz.trans (map_zero _).symm) + exact (show (dy : SmallModes.Base) ≠ 0 by simp [dy]) hh + + +end ClosedSurfaceR4.FiniteOrderSmoothing.SmoothingAtlas + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..f532c939217f7ca42c17aac14efbcbb2714c59b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/OuterPhaseGeometry.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateIsometryMetric +import OAI.Geometry.SurfaceImmersion.Atlas.PreferredNormalPhasePullback + +namespace OAI + +/-! The fixed outer plateau, including points outside the partition weight, +retains the actual immersion, metric and normal in phase coordinates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseRealChartMap_surface_germ_of_outer (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseChart (i : M) e).target) + (ho : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1)) : + A.phaseRealChartMap i e.symm F =ᶠ[𝓝 x] surfacePhaseMap (i : M) e F := by + have hh := ho.comp_tendsto ((surfacePhaseChart (i : M) e).continuousAt_symm hx) + filter_upwards [(surfacePhaseChart (i : M) e).open_target.mem_nhds hx,hh] with y hy hoy + have hyt : e.symm (baseEquiv.symm y) ∈ (chart (i : M)).target := hy.2 + change spaceCoordinates (A.vectorChartRead i F (e.symm (baseEquiv.symm y))) = + spaceCoordinates (F ((chart (i : M)).symm (e.symm (baseEquiv.symm y)))) + change A.outer i ((chart (i : M)).symm (e.symm (baseEquiv.symm y))) = 1 at hoy + simp only [vectorChartRead,localize,indicator_of_mem hyt,hoy,one_pow,one_smul] + +lemma realChartMap_germ_of_outer (i : A.centers) (F : M → Space) {p : M} + (hp : p ∈ (chart (i : M)).source) (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + A.realChartMap i F =ᶠ[𝓝 (coordinateChart (i : M) p)] coordinateMap F (i : M) := by + let e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base := .refl _ + have hx : coordinateChart (i : M) p ∈ (surfacePhaseChart (i : M) e).target := by + change (baseEquiv.symm (coordinateChart (i : M) p) ∈ Set.univ) ∧ + e.symm (baseEquiv.symm (coordinateChart (i : M) p)) ∈ (chart (i : M)).target + refine ⟨mem_univ _,?_⟩ + rw [show coordinateChart (i : M) p = baseEquiv (chart (i : M) p) from rfl, + baseEquiv.symm_apply_apply] + exact (chart (i : M)).map_source hp + have hback : (surfacePhaseChart (i : M) e).symm (coordinateChart (i : M) p) = p := by + change (chart (i : M)).symm (baseEquiv.symm (coordinateChart (i : M) p)) = p + rw [show coordinateChart (i : M) p = baseEquiv (chart (i : M) p) from rfl, + baseEquiv.symm_apply_apply,(chart (i : M)).left_inv hp] + have hh := A.phaseRealChartMap_surface_germ_of_outer i e F hx (by rwa [hback]) + exact hh + +lemma realChartMap_metric_germ_of_outer (i : A.centers) {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : M} + (hp : p ∈ (chart (i : M)).source) (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + inducedCoordinateMetric (A.realChartMap i F) =ᶠ[𝓝 (coordinateChart (i : M) p)] + coordinateMetric g (i : M) := by + have hg := A.realChartMap_germ_of_outer i F hp ho + have hpc : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using hp + have hpt : coordinateChart (i : M) p ∈ coordinateDomain (i : M) := by + rw [← coordinateChart_target] + exact (coordinateChart (i : M)).map_source hpc + filter_upwards [hg.eventuallyEq_nhds,(coordinateDomain_open (i : M)).mem_nhds hpt] with y hy hyt + rw [← coordinateMap_metric hF (i : M) hyt] + simp only [inducedCoordinateMetric,realMetric,coordDeriv,hy.fderiv_eq] + +lemma realChartMap_injective_of_outer (i : A.centers) {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : M} + (hp : p ∈ (chart (i : M)).source) (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + Function.Injective (fderiv ℝ (A.realChartMap i F) (coordinateChart (i : M) p)) := by + rw [(A.realChartMap_germ_of_outer i F hp ho).fderiv_eq] + apply coordinateMap_injective_of_immersion hF.1 (IsSmoothIsometricImmersion.mfderiv_injective hF) + rw [← coordinateChart_target] + apply (coordinateChart (i : M)).map_source + simpa only [coordinateChart_source,chart_source] using hp + +lemma preferred_normal_in_phase_of_outer (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : PreferredNormal F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {x : SmallModes.Base} + (hx : x ∈ (surfacePhaseChart (i : M) e).target) + (ho : A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1)) + (v : SmallModes.Base) : + coordDeriv v (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n.inPhase (i : M) e x = 0 := by + rw [coordDeriv,(A.phaseRealChartMap_surface_germ_of_outer i e F hx ho).fderiv_eq] + exact n.inPhase_normal hF (i : M) e hi hx v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairChartSard.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairChartSard.lean new file mode 100644 index 0000000000000000000000000000000000000000..a11b316ff3b27bbb0b3cd081d3888823258c9050 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairChartSard.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SardDimensionStep + +namespace OAI + +/-! The precise one-excess-dimension Sard instances for global double +curves: three to two, then four to three. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology ENNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem three_two_critical_values_null {f : (Fin 3 → ℝ) → ℝ × ℝ} + (hf : ContDiff ℝ ∞ f) : + volume (f '' {x | ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + apply sard_dimension_step (H := Base) (G := ℝ) (by simp [Base]) (by simp) ?_ + (fun _ _ hV hg => scalar_surface_local_critical_values_null hV hg) hf + simp only [Module.finrank_fin_fun,Module.finrank_prod,Module.finrank_self] + norm_num only [Nat.cast_add,Nat.cast_one] + rw [ENNReal.div_lt_iff (Or.inl (by norm_num : (2 : ℝ≥0∞) ≠ 0)) (Or.inl (by simp))] + norm_num + +theorem three_two_local_critical_values_null {f : (Fin 3 → ℝ) → ℝ × ℝ} + {U : Set (Fin 3 → ℝ)} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := + local_critical_values_null volume (fun _ hf => three_two_critical_values_null hf) hU hf + +theorem pair_chart_critical_values_null {f : (Base × Base) → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) : + volume (f '' {x | ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := by + apply sard_dimension_step (H := Fin 3 → ℝ) (G := ℝ × ℝ) + (by simp [Base]) (by simp [ProjectionTarget]) ?_ + (fun _ _ hV hg => three_two_local_critical_values_null hV hg) hf + have hE : Module.finrank ℝ (Base × Base) = 4 := by simp [Base] + have hF : Module.finrank ℝ (ProjectionTarget 3) = 3 := by simp [ProjectionTarget] + rw [hE,hF] + rw [ENNReal.div_lt_iff (Or.inl (by norm_num : (2 : ℝ≥0∞) ≠ 0)) (Or.inl (by simp))] + norm_num + +theorem pair_chart_local_critical_values_null {f : (Base × Base) → ProjectionTarget 3} + {U : Set (Base × Base)} (hU : IsOpen U) (hf : ContDiffOn ℝ ∞ f U) : + volume (f '' {x | x ∈ U ∧ ¬ Function.Surjective (fderiv ℝ f x)}) = 0 := + local_critical_values_null volume (fun _ hf => pair_chart_critical_values_null hf) hU hf + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairCurveChartDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairCurveChartDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d1c557ce701c14addb076ba75ad780ef95c7a43 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PairCurveChartDerivative.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairDerivative +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Injectivity of the paired curve velocity is invariant under the +actual two surface charts. -/ +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 paired_curve_derivative_injective + {A B : ℝ → M} {θ : ℝ → Base × Base} (x y : M) (t : ℝ) + (hA : ContMDiffAt 𝓘(ℝ) planeModel ∞ A t) + (hB : ContMDiffAt 𝓘(ℝ) planeModel ∞ B t) + (hAx : A t ∈ (chart x).source) (hBy : B t ∈ (chart y).source) + (hθ : ContDiffAt ℝ ∞ θ t) + (he : θ =ᶠ[𝓝 t] fun s => (chart x (A s),chart y (B s))) + (hinj : Function.Injective (fderiv ℝ θ t)) : + Function.Injective ((mfderiv 𝓘(ℝ) planeModel A t).prod (mfderiv 𝓘(ℝ) planeModel B t)) := by + have hx := ((chart_smooth x) (A t) hAx).contMDiffAt ((chart x).open_source.mem_nhds hAx) + have hy := ((chart_smooth y) (B t) hBy).contMDiffAt ((chart y).open_source.mem_nhds hBy) + have heA : (fun s => (θ s).1) =ᶠ[𝓝 t] (chart x) ∘ A := he.mono fun _ hs => congrArg Prod.fst hs + have heB : (fun s => (θ s).2) =ᶠ[𝓝 t] (chart y) ∘ B := he.mono fun _ hs => congrArg Prod.snd hs + have hdA : fderiv ℝ (fun s => (θ s).1) t = + (mfderiv planeModel 𝓘(ℝ,Base) (chart x) (A t)).comp (mfderiv 𝓘(ℝ) planeModel A t) := by + have h : mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (fun s => (θ s).1) t = + mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) ((chart x) ∘ A) t := heA.mfderiv_eq + rw [mfderiv_eq_fderiv,mfderiv_comp t (hx.mdifferentiableAt (by simp)) + (hA.mdifferentiableAt (by simp))] at h + exact h + have hdB : fderiv ℝ (fun s => (θ s).2) t = + (mfderiv planeModel 𝓘(ℝ,Base) (chart y) (B t)).comp (mfderiv 𝓘(ℝ) planeModel B t) := by + have h : mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) (fun s => (θ s).2) t = + mfderiv 𝓘(ℝ) 𝓘(ℝ,Base) ((chart y) ∘ B) t := heB.mfderiv_eq + rw [mfderiv_eq_fderiv,mfderiv_comp t (hy.mdifferentiableAt (by simp)) + (hB.mdifferentiableAt (by simp))] at h + exact h + have hfst : fderiv ℝ (fun s => (θ s).1) t = ((ContinuousLinearMap.fst ℝ Base Base).comp (fderiv ℝ θ t)) := + (hθ.differentiableAt (by simp)).hasFDerivAt.fst.fderiv + have hsnd : fderiv ℝ (fun s => (θ s).2) t = ((ContinuousLinearMap.snd ℝ Base Base).comp (fderiv ℝ θ t)) := + (hθ.differentiableAt (by simp)).hasFDerivAt.snd.fderiv + intro a b hab + apply hinj + apply Prod.ext + · change ((ContinuousLinearMap.fst ℝ Base Base).comp (fderiv ℝ θ t)) a = ((ContinuousLinearMap.fst ℝ Base Base).comp (fderiv ℝ θ t)) b + rw [← hfst,hdA] + exact congrArg (mfderiv planeModel 𝓘(ℝ,Base) (chart x) (A t)) (congrArg Prod.fst hab) + · change ((ContinuousLinearMap.snd ℝ Base Base).comp (fderiv ℝ θ t)) a = ((ContinuousLinearMap.snd ℝ Base Base).comp (fderiv ℝ θ t)) b + rw [← hsnd,hdB] + exact congrArg (mfderiv planeModel 𝓘(ℝ,Base) (chart y) (B t)) (congrArg Prod.snd hab) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ParabolicPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ParabolicPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d9582e8dd0aefb88b828807cea7d0d52929890c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ParabolicPhaseChart.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredConvexPhase + +namespace OAI + +/-! An explicit phase chart on an entire half-plane. This supplies one +chart on a disk uniformly over nearby linear phase parameters. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def parabolicPhaseMap (k : ℝ) (p : Base) : Base := + (p.1+(k/2)*(p.1^2+p.2^2),p.2) + +def parabolicDiscriminant (k : ℝ) (p : Base) : ℝ := + 1+2*k*p.1-k^2*p.2^2 + +def parabolicPhaseInverse (k : ℝ) (p : Base) : Base := + ((Real.sqrt (parabolicDiscriminant k p)-1)/k,p.2) + +lemma parabolicDiscriminant_map (k : ℝ) (p : Base) : + parabolicDiscriminant k (parabolicPhaseMap k p) = (1+k*p.1)^2 := by + simp only [parabolicDiscriminant,parabolicPhaseMap] + ring + +lemma parabolicPhaseMap_smooth (k : ℝ) : ContDiff ℝ ∞ (parabolicPhaseMap k) := by + unfold parabolicPhaseMap + fun_prop + +lemma parabolicDiscriminant_smooth (k : ℝ) : ContDiff ℝ ∞ (parabolicDiscriminant k) := by + unfold parabolicDiscriminant + fun_prop + +lemma parabolicPhaseInverse_source {k : ℝ} (hk : k ≠ 0) {p : Base} + (hp : 0 < parabolicDiscriminant k p) : + 0 < 1+k*(parabolicPhaseInverse k p).1 := by + have he : 1+k*(parabolicPhaseInverse k p).1 = Real.sqrt (parabolicDiscriminant k p) := by + dsimp [parabolicPhaseInverse] + field_simp + ring + rw [he] + exact Real.sqrt_pos.mpr hp + +lemma parabolicPhaseInverse_left {k : ℝ} (hk : k ≠ 0) {p : Base} + (hp : 0 < 1+k*p.1) : parabolicPhaseInverse k (parabolicPhaseMap k p) = p := by + ext + · simp only [parabolicPhaseInverse,parabolicDiscriminant_map,Real.sqrt_sq hp.le] + field_simp + ring + · rfl + +lemma parabolicPhaseInverse_right {k : ℝ} (hk : k ≠ 0) {p : Base} + (hp : 0 < parabolicDiscriminant k p) : + parabolicPhaseMap k (parabolicPhaseInverse k p) = p := by + have hs := Real.sq_sqrt hp.le + ext + · dsimp [parabolicPhaseMap,parabolicPhaseInverse] + field_simp + dsimp [parabolicDiscriminant] at hs ⊢ + nlinarith + · rfl + +lemma parabolicPhaseInverse_smooth (k : ℝ) : + ContDiffOn ℝ ∞ (parabolicPhaseInverse k) {p | 0 < parabolicDiscriminant k p} := by + apply ContDiffOn.prodMk _ contDiffOn_snd + exact (((parabolicDiscriminant_smooth k).contDiffOn.sqrt (fun _ hp => ne_of_gt hp)).sub + contDiffOn_const).div_const k + +def parabolicPhaseChart (k : ℝ) (hk : k ≠ 0) : OpenPartialHomeomorph Base Base where + toFun := parabolicPhaseMap k + invFun := parabolicPhaseInverse k + source := {p | 0 < 1+k*p.1} + target := {p | 0 < parabolicDiscriminant k p} + map_source' := fun p hp => by + change 0 < parabolicDiscriminant k (parabolicPhaseMap k p) + rw [parabolicDiscriminant_map] + exact sq_pos_of_pos hp + map_target' := fun _ hp => parabolicPhaseInverse_source hk hp + left_inv' := fun _ hp => parabolicPhaseInverse_left hk hp + right_inv' := fun _ hp => parabolicPhaseInverse_right hk hp + open_source := isOpen_lt continuous_const (continuous_const.add (continuous_const.mul continuous_fst)) + open_target := isOpen_lt continuous_const (parabolicDiscriminant_smooth k).continuous + continuousOn_toFun := (parabolicPhaseMap_smooth k).continuous.continuousOn + continuousOn_invFun := (parabolicPhaseInverse_smooth k).continuousOn + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseAnsatzNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseAnsatzNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..5eb748bcdfd59ce5820b7ee0a6eb28191c39fc79 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseAnsatzNormal.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearAtlasAnsatz +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveNormalCoordinates + +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 primitiveNormalTriple_germ {f g : Base → Euclidean} {p : Base} + (h : f =ᶠ[𝓝 p] g) : primitiveNormalTriple f p = primitiveNormalTriple g p := by + have hd : (fun q => fderiv ℝ f q (coordinateVector 1)) =ᶠ[𝓝 p] + (fun q => fderiv ℝ g q (coordinateVector 1)) := + h.fderiv.mono (fun _ hh => congrArg (fun L : Base →L[ℝ] Euclidean => L (coordinateVector 1)) hh) + ext k a + fin_cases k <;> simp only [primitiveNormalTriple,h.fderiv_eq,hd.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_inverse_germ (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) : + A.vectorChartRead i (A.phaseAtlasAnsatz i F e χ U ℓ L z) ∘ e.symm =ᶠ[𝓝 p] + finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z := by + filter_upwards [e.open_target.mem_nhds hp] with y hy + have hh := A.phaseAtlasAnsatz_coordinate i F e hi hχ U hK hKA hzero hone ℓ L z (e.map_target hy) + apply spaceCoordinates.injective + simpa only [jetChartMap,Function.comp_apply,e.right_inv hy] using hh + +lemma phaseAtlasAnsatz_normalTriple (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) : + primitiveNormalTriple (A.vectorChartRead i (A.phaseAtlasAnsatz i F e χ U ℓ L z) ∘ e.symm) p = + primitiveNormalTriple (finiteAnsatz (A.vectorChartRead i F ∘ e.symm) U ℓ L z) p := + primitiveNormalTriple_germ + (A.phaseAtlasAnsatz_inverse_germ i F e hi hχ U hK hKA hzero hone ℓ L z hp) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBasisPerturbation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBasisPerturbation.lean new file mode 100644 index 0000000000000000000000000000000000000000..88d4a6228ab3f97d4c28c0845379dbe84ad7eead --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBasisPerturbation.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.Immersion.ClosedSurface.PhaseStock + +namespace OAI + +/-! Actual coefficient forms for nearby phase covectors. The inverse +operator constructs the new decomposition and preserves compact positive +cone margins. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def perturbedPhaseOperator (P : PhaseBasis) (xi : Fin 3 → Base) : + PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + ∑ i, (P.Q i).smulRight (covectorSquare (xi i)) + +lemma perturbedPhaseOperator_apply (P : PhaseBasis) (xi : Fin 3 → Base) + (H : PhaseMean.Tensor) : + perturbedPhaseOperator P xi H = ∑ i, P.Q i H • covectorSquare (xi i) := by + simp only [perturbedPhaseOperator, sum_apply, ContinuousLinearMap.smulRight_apply] + +lemma perturbedPhaseOperator_self (P : PhaseBasis) : + perturbedPhaseOperator P P.ξ = ContinuousLinearMap.id ℝ PhaseMean.Tensor := by + apply ContinuousLinearMap.ext + intro H + exact (perturbedPhaseOperator_apply P P.ξ H).trans (P.decomposition H) + +lemma perturbedPhaseOperator_smooth (P : PhaseBasis) : + ContDiff ℝ ∞ (perturbedPhaseOperator P) := by + apply ContDiff.sum + intro i _ + apply contDiff_const.smulRight + apply contDiff_pi.mpr + intro j + fin_cases j <;> simp only [covectorSquare, Matrix.cons_val_zero', + Matrix.cons_val_succ'] <;> fun_prop + +def perturbedPhaseCoefficient (P : PhaseBasis) (xi : Fin 3 → Base) (i : Fin 3) : + PhaseMean.Tensor →L[ℝ] ℝ := + (P.Q i).comp (perturbedPhaseOperator P xi).inverse + +lemma perturbedPhaseCoefficient_self (P : PhaseBasis) (i : Fin 3) : + perturbedPhaseCoefficient P P.ξ i = P.Q i := by + simp only [perturbedPhaseCoefficient, perturbedPhaseOperator_self, + ContinuousLinearMap.inverse_id, ContinuousLinearMap.comp_id] + +lemma perturbedPhase_decomposition (P : PhaseBasis) {xi : Fin 3 → Base} + (hxi : (perturbedPhaseOperator P xi).IsInvertible) (H : PhaseMean.Tensor) : + ∑ i, perturbedPhaseCoefficient P xi i H • covectorSquare (xi i) = H := by + calc + _ = perturbedPhaseOperator P xi ((perturbedPhaseOperator P xi).inverse H) := + (perturbedPhaseOperator_apply P xi _).symm + _ = H := hxi.self_apply_inverse H + +lemma perturbedPhaseCoefficient_smoothAt (P : PhaseBasis) {xi : Fin 3 → Base} + (hxi : (perturbedPhaseOperator P xi).IsInvertible) (i : Fin 3) : + ContDiffAt ℝ ∞ (fun z => perturbedPhaseCoefficient P z i) xi := + contDiffAt_const.clm_comp + (hxi.contDiffAt_map_inverse.comp xi (perturbedPhaseOperator_smooth P).contDiffAt) + +def positivePhaseParameters (P : PhaseBasis) : Set ((Fin 3 → Base) × PhaseMean.Tensor) := + {z | (perturbedPhaseOperator P z.1).IsInvertible ∧ + (∀ i, z.1 i ≠ 0) ∧ ∀ i, 0 < perturbedPhaseCoefficient P z.1 i z.2} + +lemma positivePhaseParameters_open (P : PhaseBasis) : IsOpen (positivePhaseParameters P) := by + apply isOpen_iff_mem_nhds.mpr + intro z hz + have hA : ∀ᶠ w in 𝓝 z, (perturbedPhaseOperator P w.1).IsInvertible := + ((perturbedPhaseOperator_smooth P).continuous.comp continuous_fst).continuousAt.eventually + hz.1.eventually_nhds + have hxi : ∀ᶠ w in 𝓝 z, ∀ i, w.1 i ≠ 0 := by + rw [Filter.eventually_all] + intro i + exact ((continuous_apply i).comp continuous_fst).continuousAt.eventually_ne (hz.2.1 i) + have hQ : ∀ᶠ w in 𝓝 z, ∀ i, 0 < perturbedPhaseCoefficient P w.1 i w.2 := by + rw [Filter.eventually_all] + intro i + have hc : ContinuousAt (fun w : (Fin 3 → Base) × PhaseMean.Tensor => + perturbedPhaseCoefficient P w.1 i w.2) z := + (((perturbedPhaseCoefficient_smoothAt P hz.1 i).comp z contDiffAt_fst).clm_apply + contDiffAt_snd).continuousAt + exact hc.eventually (lt_mem_nhds (hz.2.2 i)) + exact hA.and (hxi.and hQ) + +/-- Nearby covectors admit actual smooth inverse coefficient forms, positive +uniformly over the fixed compact collection of target tensor values. -/ +theorem compact_positive_phase_perturbation (P : PhaseBasis) {K : Set PhaseMean.Tensor} + (hK : IsCompact K) (hpos : ∀ H ∈ K, ∀ i, 0 < P.Q i H) : + ∃ eps : ℝ, 0 < eps ∧ ∀ xi : Fin 3 → Base, ‖xi-P.ξ‖ < eps → + (perturbedPhaseOperator P xi).IsInvertible ∧ (∀ i, xi i ≠ 0) ∧ + ∀ H ∈ K, ∀ i, 0 < perturbedPhaseCoefficient P xi i H := by + have hA0 : (perturbedPhaseOperator P P.ξ).IsInvertible := by + rw [perturbedPhaseOperator_self] + exact ⟨ContinuousLinearEquiv.refl ℝ PhaseMean.Tensor,rfl⟩ + have hbase : ∀ᶠ xi in 𝓝 P.ξ, + (perturbedPhaseOperator P xi).IsInvertible ∧ ∀ i, xi i ≠ 0 := by + apply Filter.Eventually.and + · exact (perturbedPhaseOperator_smooth P).continuous.continuousAt.eventually hA0.eventually_nhds + · rw [Filter.eventually_all] + intro i + exact (continuous_apply i).continuousAt.eventually_ne (P.nonzero i) + have hpositive : ∀ᶠ xi in 𝓝 P.ξ, ∀ H ∈ K, ∀ i, + 0 < perturbedPhaseCoefficient P xi i H := by + apply hK.eventually_forall_of_forall_eventually + intro H hH + have hmem : (P.ξ,H) ∈ positivePhaseParameters P := by + refine ⟨hA0,P.nonzero,?_⟩ + intro i + simpa only [perturbedPhaseCoefficient_self] using hpos H hH i + exact ((positivePhaseParameters_open P).eventually_mem hmem).mono + (fun z hz => hz.2.2) + obtain ⟨eps,heps,hsmall⟩ := Metric.eventually_nhds_iff.mp (hbase.and hpositive) + refine ⟨eps,heps,fun xi hnear => ?_⟩ + have hxi := hsmall (y := xi) (by simpa only [dist_eq_norm] using hnear) + exact ⟨hxi.1.1,hxi.1.2,hxi.2⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..82d8133bb602d05912b2636880616b0d82d3464a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryAvoidance.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorControl +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryNormalMatching +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureNormal +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal + +namespace OAI + +/-! Apply the boundary matching estimate to the exact primitive's exterior +comparison and its actual projected old normal. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes NormalFrame GeometryPreservation +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_phase_boundary_avoidance {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) {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {p : X → M} {q : X → JetPolynomial.Base} (hp : Continuous p) (hq : Continuous q) + (O : Set M) (P : Set JetPolynomial.Base) + (hP : ∀ y ∈ P, T y ∈ (chart (i : M)).target) + (hPO : ∀ y ∈ P, (chart (i : M)).symm (T y) ∈ O) + (hpO : ∀ x, p x ∈ closure O) (hqP : ∀ x, q x ∈ closure P ∩ S) + (hD : ∀ x, NormalFrame.gramDet + (coordDeriv dx (A.phaseRealChartMap i T F) (baseEquiv (q x))) + (coordDeriv dy (A.phaseRealChartMap i T F) (baseEquiv (q x))) ≠ 0) + (hB : ∀ x, realSecondForm (A.phaseRealChartMap i T F) dy dy (baseEquiv (q x)) ≠ 0) + (havoid : ∀ x, spaceCoordinates (n.vector (p x)) ≠ + -VelocityFrame.normalize (realSecondForm (A.phaseRealChartMap i T F) dy dy (baseEquiv (q 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) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ x : X, ∀ z : ℝ, + A.projectedNormalField W n.vector (p x) ≠ 0 ∧ + realSecondForm (A.phaseRealChartMap i T W) dy dy (baseEquiv (q x)) ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ≠ + -profilePreferred (realBoundaryProfile (A.phaseRealChartMap i T W) z (baseEquiv (q x))) := by + obtain ⟨δ,hδ,hmatch⟩ := compact_actual_exterior_avoidance + (A.phaseRealChartMap_smooth i hT hF) (baseEquiv.continuous.comp hq) + (spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp)) + (v := fun _ => dy) continuous_const hD hB havoid + obtain ⟨D,hD0,hprofile⟩ := A.phase_exterior_profile_bound_closure i hT hS hSc + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + have hLp : 0 < L+1 := by positivity + obtain ⟨r,hr,hnorm⟩ := A.exterior_projected_normal_close_closure hF n.smooth n.unit n.normal + (fun j y hy => A.planeRead_gram_of_immersion hF hI houter j hy) (div_pos hδ hLp) + refine ⟨min r (δ/(D+1)),lt_min hr (div_pos hδ (by positivity)),?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV hext x z + obtain ⟨hne,hnear⟩ := hnorm G V W hG hV hW b c hb hc + (hbc.trans_le (min_le_left _ _)) hGF hWV O hext (p x) (hpO x) + have hprof := hprofile F G V W hF hG hV hW b c hb hc hGF hWV P hP + (fun y hy => hext _ (hPO y hy)) (q x) (hqP x) + have hsmall : D*(b+c) < δ := by + have ht := (lt_div_iff₀ (by positivity : 0 < D+1)).mp + (hbc.trans_le (min_le_right _ _)) + nlinarith + have hcoord : ‖spaceCoordinates (A.unitProjectedNormalField W n.vector (p x))- + spaceCoordinates (n.vector (p x))‖ < δ := by + rw [← map_sub] + calc + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)-n.vector (p x))‖ ≤ + L*‖A.unitProjectedNormalField W n.vector (p x)-n.vector (p x)‖ := + spaceCoordinates.toContinuousLinearMap.le_opNorm _ + _ ≤ (L+1)*‖A.unitProjectedNormalField W n.vector (p x)-n.vector (p x)‖ := + mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) + _ < (L+1)*(δ/(L+1)) := mul_lt_mul_of_pos_left hnear hLp + _ = δ := mul_div_cancel₀ _ hLp.ne' + exact ⟨hne,hmatch x _ (A.phaseRealChartMap_smooth i hT hW) _ (hprof.trans_lt hsmall) hcoord⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryCurve.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryCurve.lean new file mode 100644 index 0000000000000000000000000000000000000000..dd66e9964fac958569a09904aa477d16128f3d85 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryCurve.lean @@ -0,0 +1,145 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceCurveExterior +import OAI.Geometry.SurfaceImmersion.Geometry.CurveSecondTransition + +namespace OAI + +/-! Fixed compact boundary curves and their actual second-form fields. +The cutoff is chosen from the curve geometry, independently of any immersion. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes VelocityFrame NormalFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +structure PhaseBoundaryCurve (B : SmoothingAtlas M) where + index : B.centers + phase : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base + smooth : ContDiff ℝ ∞ phase + inverse_smooth : ContDiff ℝ ∞ phase.symm + carrier : Set M + compact : IsCompact carrier + source : carrier ⊆ ((chart (index : M)).trans phase).source + active : ∀ p ∈ carrier, B.weight index p ≠ 0 + +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +def coordinate (p : M) : SmallModes.Base := baseEquiv (c.phase (chart (c.index : M) p)) + +omit [CompactSpace M] in +lemma coordinate_continuous : ContinuousOn c.coordinate c.carrier := + baseEquiv.continuous.comp_continuousOn + (((chart (c.index : M)).trans c.phase).continuousOn.mono c.source) + +omit [CompactSpace M] in +lemma coordinate_compact : IsCompact (c.coordinate '' c.carrier) := + c.compact.image_of_continuousOn c.coordinate_continuous + +lemma cutoff_exists : ∃ β : SmallModes.Base → ℝ, ContDiff ℝ ∞ β ∧ HasCompactSupport β ∧ + (∀ x ∈ c.coordinate '' c.carrier, β x = 1) ∧ + ∀ x ∈ tsupport β, baseEquiv.symm x ∈ c.phase.target ∧ + B.chartWeight c.index (c.phase.symm (baseEquiv.symm x)) ≠ 0 := by + apply B.phase_curve_cutoff c.index c.phase c.inverse_smooth c.coordinate_compact + · rintro x ⟨p,hp,rfl⟩ + have hs : chart (c.index : M) p ∈ c.phase.source := (c.source hp).2 + simpa only [coordinate,baseEquiv.symm_apply_apply] using c.phase.map_source hs + · rintro x ⟨p,hp,rfl⟩ + have hs : chart (c.index : M) p ∈ c.phase.source := (c.source hp).2 + change B.chartWeight c.index (c.phase.symm (baseEquiv.symm (baseEquiv (c.phase (chart (c.index : M) p))))) ≠ 0 + rw [baseEquiv.symm_apply_apply,c.phase.left_inv hs,SmoothingAtlas.chartWeight, + indicator_of_mem ((chart (c.index : M)).map_source (c.source hp).1), + (chart (c.index : M)).left_inv (c.source hp).1] + exact c.active p hp + +def cutoff : SmallModes.Base → ℝ := Classical.choose c.cutoff_exists + +lemma cutoff_properties : ContDiff ℝ ∞ c.cutoff ∧ HasCompactSupport c.cutoff ∧ + (∀ x ∈ c.coordinate '' c.carrier, c.cutoff x = 1) ∧ + ∀ x ∈ tsupport c.cutoff, baseEquiv.symm x ∈ c.phase.target ∧ + B.chartWeight c.index (c.phase.symm (baseEquiv.symm x)) ≠ 0 := + Classical.choose_spec c.cutoff_exists + +def second (F : M → Space) (p : M) : Vec := + spaceCoordinates (B.phaseCurveSecondField c.index c.phase c.cutoff F + (fun _ => dy) (fun _ => dy) p) + +lemma second_smooth {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) : + ContMDiff planeModel 𝓘(ℝ,Vec) ∞ (c.second F) := by + exact spaceCoordinates.contDiff.contMDiff.comp + (B.phaseCurveSecondField_smooth c.index c.phase c.smooth c.inverse_smooth hF + c.cutoff_properties.1 c.cutoff_properties.2.2.2 contDiff_const contDiff_const) + +lemma second_eq (F : M → Space) {p : M} (hp : p ∈ c.carrier) : + c.second F p = realSecondForm (B.phaseRealChartMap c.index c.phase.symm F) + dy dy (c.coordinate p) := by + apply B.phaseCurveSecondField_eq c.index c.phase c.cutoff F (fun _ => dy) (fun _ => dy) + (c.source hp).1 + · exact B.outer_one c.index p (subset_tsupport _ (c.active p hp)) + · exact c.cutoff_properties.2.2.1 _ ⟨p,hp,rfl⟩ + +lemma second_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} (hp : p ∈ c.carrier) + (hps : p ∈ (surfacePhaseChart (i : M) e).source) (hw : A.weight i p ≠ 0) : + let T := surfacePhaseTransition (c.index : M) c.phase (i : M) e + c.second F p = realSecondForm (A.phaseRealChartMap i e.symm F) + (fderiv ℝ T (c.coordinate p) dy) (fderiv ℝ T (c.coordinate p) dy) + (baseEquiv (e (chart (i : M) p))) := by + have hpc : p ∈ (surfacePhaseChart (c.index : M) c.phase).source := c.source hp + 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 := by + refine ⟨(surfacePhaseChart (c.index : M) c.phase).map_source hpc,?_⟩ + change (surfacePhaseChart (c.index : M) c.phase).symm (c.coordinate p) ∈ + (surfacePhaseChart (i : M) e).source + rwa [hback] + have h := A.curveSecondField_transition B i c.index e c.phase he hi c.smooth c.inverse_smooth + hF c.cutoff hx (by rw [hback]; exact c.active p hp) (by rwa [hback]) + (c.cutoff_properties.2.2.1 _ ⟨p,hp,rfl⟩) + have ht : surfacePhaseTransition (c.index : M) c.phase (i : M) e (c.coordinate p) = + baseEquiv (e (chart (i : M) p)) := by + change (surfacePhaseChart (i : M) e) + ((surfacePhaseChart (c.index : M) c.phase).symm (c.coordinate p)) = _ + rw [hback] + rfl + change spaceCoordinates (B.phaseCurveSecondField c.index c.phase c.cutoff F + (fun _ => dy) (fun _ => dy) + ((surfacePhaseChart (c.index : M) c.phase).symm (c.coordinate p))) = + realSecondForm (A.phaseRealChartMap i e.symm F) + (fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) dy) + (fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (i : M) e) (c.coordinate p) dy) + (surfacePhaseTransition (c.index : M) c.phase (i : M) e (c.coordinate p)) at h + rw [hback,ht] at h + exact h + +theorem exterior_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)) + (hB : ∀ p ∈ c.carrier, c.second F p ≠ 0) + (havoid : ∀ p ∈ c.carrier, spaceCoordinates (n.vector p) ≠ -normalize (c.second F p)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G V W : M → Space, + ContMDiff planeModel spaceModel ∞ G → ContMDiff planeModel spaceModel ∞ V → + ContMDiff planeModel spaceModel ∞ W → ∀ b d : ℝ, 0 ≤ b → 0 ≤ d → b+d < ρ → + A.WeightedBound 1 2 b (G-F) → A.WeightedBound 1 2 d (W-V) → + ∀ O : Set M, (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ p ∈ c.carrier ∩ closure O, + A.projectedNormalField W n.vector p ≠ 0 ∧ c.second W p ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector p) ≠ -normalize (c.second W p) := by + obtain ⟨ρ,hρ,hpres⟩ := A.compact_surface_phase_exterior_preservation B hF n houter + c.index c.phase c.smooth c.inverse_smooth c.compact c.source c.active + (fun p hp => by simpa only [c.second_eq F hp,coordinate] using hB p hp) + (fun p hp => by simpa only [c.second_eq F hp,coordinate] using havoid p hp) + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b d hb hd hbd hGF hWV O hext p hp + simpa only [c.second_eq W hp.1,coordinate] using hpres G V W hG hV hW b d hb hd hbd hGF hWV O hext p hp + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryMatching.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryMatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..a279273698189385dbd1c65a0c267204de14e077 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseBoundaryMatching.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseExteriorControl +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryNormalMatching +import OAI.Geometry.SurfaceImmersion.Geometry.ExteriorClosureNormal +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal + +namespace OAI + +/-! Apply the boundary matching estimate to the exact primitive's exterior +comparison and its actual projected old normal. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes NormalFrame GeometryPreservation +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_phase_boundary_matching {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) {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {p : X → M} {q : X → JetPolynomial.Base} (hp : Continuous p) (hq : Continuous q) + {v : X → SmallModes.Base} (hv : Continuous v) + (O : Set M) (P : Set JetPolynomial.Base) + (hP : ∀ y ∈ P, T y ∈ (chart (i : M)).target) + (hPO : ∀ y ∈ P, (chart (i : M)).symm (T y) ∈ O) + (hpO : ∀ x, p x ∈ closure O) (hqP : ∀ x, q x ∈ closure P ∩ S) + (hD : ∀ x, NormalFrame.gramDet + (coordDeriv dx (A.phaseRealChartMap i T F) (baseEquiv (q x))) + (coordDeriv dy (A.phaseRealChartMap i T F) (baseEquiv (q x))) ≠ 0) + (hB : ∀ x, realSecondForm (A.phaseRealChartMap i T F) dy dy (baseEquiv (q x)) ≠ 0) + (havoid : ∀ x, spaceCoordinates (n.vector (p x)) ≠ + -VelocityFrame.normalize (realSecondForm (A.phaseRealChartMap i T F) dy dy (baseEquiv (q x)))) + (hpos : ∀ x, 0 < realSecondForm (A.phaseRealChartMap i T F) (v x) (v x) (baseEquiv (q x)) ⬝ᵥ + spaceCoordinates (n.vector (p x))) + (κ : X → ℝ) + (hGauss : ∀ x, coordinateGauss (realMetric (A.phaseRealChartMap i T F) dx dx) + (realMetric (A.phaseRealChartMap i T F) dx dy) (realMetric (A.phaseRealChartMap i T F) dy dy) + (baseEquiv (q x)) = κ x * NormalFrame.gramDet + (coordDeriv dx (A.phaseRealChartMap i T F) (baseEquiv (q x))) + (coordDeriv dy (A.phaseRealChartMap i T F) (baseEquiv (q x)))) + (hQ : ∀ x, 0 < VelocityFrame.orderedCrossing (A.phaseRealChartMap i T F) dy (v x) + (baseEquiv (q 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) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ x : X, ∀ z : ℝ, + A.projectedNormalField W n.vector (p x) ≠ 0 ∧ + realSecondForm (A.phaseRealChartMap i T W) dy dy (baseEquiv (q x)) ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ≠ + -profilePreferred (realBoundaryProfile (A.phaseRealChartMap i T W) z (baseEquiv (q x))) ∧ + 0 < realSecondForm (A.phaseRealChartMap i T W) (v x) (v x) (baseEquiv (q x)) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ∧ + 0 < realSecondForm (A.phaseRealChartMap i T W) (v x) (v x) (baseEquiv (q x)) ⬝ᵥ + profilePreferred (realBoundaryProfile (A.phaseRealChartMap i T W) z (baseEquiv (q x))) := by + obtain ⟨δ,hδ,hmatch⟩ := compact_actual_boundary_matching (A.phaseRealChartMap_smooth i hT hF) + (baseEquiv.continuous.comp hq) hv (spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp)) + hD hB havoid hpos κ hGauss hQ + obtain ⟨D,hD0,hprofile⟩ := A.phase_exterior_profile_bound_closure i hT hS hSc + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + have hLp : 0 < L+1 := by positivity + obtain ⟨r,hr,hnorm⟩ := A.exterior_projected_normal_close_closure hF n.smooth n.unit n.normal + (fun j y hy => A.planeRead_gram_of_immersion hF hI houter j hy) (div_pos hδ hLp) + refine ⟨min r (δ/(D+1)),lt_min hr (div_pos hδ (by positivity)),?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV hext x z + obtain ⟨hne,hnear⟩ := hnorm G V W hG hV hW b c hb hc + (hbc.trans_le (min_le_left _ _)) hGF hWV O hext (p x) (hpO x) + have hprof := hprofile F G V W hF hG hV hW b c hb hc hGF hWV P hP + (fun y hy => hext _ (hPO y hy)) (q x) (hqP x) + have hsmall : D*(b+c) < δ := by + have ht := (lt_div_iff₀ (by positivity : 0 < D+1)).mp + (hbc.trans_le (min_le_right _ _)) + nlinarith + have hcoord : ‖spaceCoordinates (A.unitProjectedNormalField W n.vector (p x))- + spaceCoordinates (n.vector (p x))‖ < δ := by + rw [← map_sub] + calc + ‖spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)-n.vector (p x))‖ ≤ + L*‖A.unitProjectedNormalField W n.vector (p x)-n.vector (p x)‖ := + spaceCoordinates.toContinuousLinearMap.le_opNorm _ + _ ≤ (L+1)*‖A.unitProjectedNormalField W n.vector (p x)-n.vector (p x)‖ := + mul_le_mul_of_nonneg_right (by linarith) (norm_nonneg _) + _ < (L+1)*(δ/(L+1)) := mul_lt_mul_of_pos_left hnear hLp + _ = δ := mul_div_cancel₀ _ hLp.ne' + exact ⟨hne,hmatch x _ (A.phaseRealChartMap_smooth i hT hW) _ (hprof.trans_lt hsmall) hcoord z⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8fa2f92f0f7190d3248596b35a696cea82f8a1eb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartBounds.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartRealization +import OAI.Geometry.Immersion.ClosedSurface.UniformMean + +namespace OAI + +/-! The local phase-coordinate polynomial operator keeps the original +fixed scale exponent and derivative loss. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} + +theorem phaseChartPolynomialOperator_bounds + (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) + (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) (φ : Base → ℝ) + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hGQ : Set.MapsTo (lowJet G) U Q) (s : ℝ≥0) (τ ε : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + (∀ m v, WeightedBound U s (m + tensorOrder P) (F m) + (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ m Z, supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s m + (phaseChartPolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) + K hKU hφ τ ε e he hi hKe Z) ≤ + ε / τ ^ tensorLoss P * D m * + supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s (m + tensorOrder P) Z := by + obtain ⟨D,hD,hd⟩ := phaseCoordinatePolynomialOperator_bounds hU hO hQ hQO P hP K hKU B F hB hF + let E := fun m => tensorChartBudget m (I m) (I m) * D m * + (((m + tensorOrder P).factorial : ℝ) * J (m + tensorOrder P) ^ (m + tensorOrder P)) + have hI0 (m : ℕ) : 0 ≤ I m := zero_le_one.trans (hI m) + have hJ0 (m : ℕ) : 0 ≤ J m := zero_le_one.trans (hJ m) + refine ⟨E,fun m => mul_nonneg (mul_nonneg (tensorChartBudget_nonneg m (hI0 m) (hI0 m)) (hD m)) + (mul_nonneg (Nat.cast_nonneg _) (pow_nonneg (hJ0 _) _)),?_⟩ + intro G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb m Z + have hDm := hD m + have hR := hd G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb m + have hfield := RealModes.weighted_coordDeriv_of_jets e.open_target hi s.coe_nonneg hs1 + (hI0 m) (hibound m) + have hb := chartTensorTransportLM_bound e (modeSupport K) hKe he hi + (phaseCoordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε) + hs hs1 (hJ (m + tensorOrder P)) (hI m) (hI0 m) (by positivity) + (hebound (m + tensorOrder P)) + (fun j hj hjm => hibound m j hj (hjm.trans (Nat.le_succ m))) hfield hR Z + change supportedWeightedSeminorm _ s m (chartTensorTransportLM e (modeSupport K) hKe he hi _ Z) ≤ _ + convert hb using 1 + dsimp only [E] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3ba43ddbd243d43d85841b45742caef5a20fb90 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartGeometry.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ExtendedPhaseChart +import OAI.Geometry.Immersion.ClosedSurface.JacobianBounds + +namespace OAI + +/-! Good phase directions remain good in their actual nonlinear phase charts. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma phaseDerivative_comp_smooth {φ : Base → ℝ} {f : Base → Base} + (hφ : ContDiff ℝ ∞ φ) (hf : ContDiff ℝ ∞ f) (p : Base) : + phaseDerivative (φ ∘ f) p = pullCovector (fderiv ℝ f p) (phaseDerivative φ (f p)) := by + unfold phaseDerivative + rw [fderiv_comp p (hφ.differentiable (by simp) _) (hf.differentiable (by simp) _)] + change ((fderiv ℝ φ (f p)) ((fderiv ℝ f p) dx), + (fderiv ℝ φ (f p)) ((fderiv ℝ f p) dy)) = _ + conv_lhs => rw [← phaseLinear_phaseDerivative φ (f p)] + rfl + +lemma inverse_chart_derivative (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) {y : Base} (hy : y ∈ e.target) : + (fderiv ℝ e (e.symm y)).comp (fderiv ℝ e.symm y) = ContinuousLinearMap.id ℝ Base := by + have hh : e ∘ e.symm =ᶠ[𝓝 y] id := by + filter_upwards [e.open_target.mem_nhds hy] with z hz + exact e.right_inv hz + rw [← fderiv_comp y (he.differentiable (by simp) _) (hi.differentiable (by simp) _), + hh.fderiv_eq,fderiv_id] + +lemma inverse_chart_derivative_injective (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) {y : Base} (hy : y ∈ e.target) : + Function.Injective (fderiv ℝ e.symm y) := by + have hh := inverse_chart_derivative e he hi hy + intro u v huv + have h := congrArg (fderiv ℝ e (e.symm y)) huv + change ((fderiv ℝ e (e.symm y)).comp (fderiv ℝ e.symm y)) u = + ((fderiv ℝ e (e.symm y)).comp (fderiv ℝ e.symm y)) v at h + simpa only [hh,ContinuousLinearMap.id_apply] using h + +lemma inverse_chart_phase_covector {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph Base Base) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = φ x) {y : Base} (hy : y ∈ e.target) : + pullCovector (fderiv ℝ e.symm y) (phaseDerivative φ (e.symm y)) = dx := by + have hh : φ ∘ e.symm =ᶠ[𝓝 y] Prod.fst := by + filter_upwards [e.open_target.mem_nhds hy] with z hz + change φ (e.symm z) = z.1 + rw [← hphase,e.right_inv hz] + rw [← phaseDerivative_comp_smooth hφ hi] + unfold phaseDerivative + rw [hh.fderiv_eq,fderiv_fst] + rfl + +/-- A nonlinear first-coordinate chart carries precisely the good direction +needed by the local free and forced mode constructions. -/ +theorem realModeDomain_smooth_phase_chart {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hphase : ∀ x, (e x).1 = φ x) + (hImm : ∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ e.source, Good (realSecondTensor F x) (phaseDerivative φ x)) : + RealModeDomain (F ∘ e.symm) e.target := by + refine ⟨e.open_target,?_,?_⟩ + · intro y hy + apply gramDet_ne_zero_of_injective + rw [fderiv_comp y (hF.differentiable (by simp) _) (hi.differentiable (by simp) _)] + exact (hImm _ (e.map_target hy)).comp (inverse_chart_derivative_injective e he hi hy) + · intro y hy + have hD := gramDet_ne_zero_of_injective (fderiv ℝ F (e.symm y)) (hImm _ (e.map_target hy)) + have hdet : coordDet (fderiv ℝ e.symm y) ≠ 0 := + coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source + hi.contDiffOn he.contDiffOn (fun _ hz => e.map_target hz) (fun z hz => e.right_inv hz) hy + have hq := phase_length_comp_smooth hF hi (phaseDerivative φ (e.symm y)) y hD hdet + rw [inverse_chart_phase_covector hφ e hi hphase hy] at hq + have hn : secondQuadratic (realSecondTensor (F ∘ e.symm) y) dy ≠ 0 := by + simp only [dx,neg_zero] at hq + change secondQuadratic (realSecondTensor (F ∘ e.symm) y) (0,1) ≠ 0 + rw [hq] + exact smul_ne_zero (pow_ne_zero 2 hdet) (hgood _ (e.map_target hy)).2 + change realSecondForm (F ∘ e.symm) dy dy y ≠ 0 + rw [realSecondForm_quadratic (hF.comp hi)] + exact hn + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartJetTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartJetTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3aafbbc6346fe58d6a5e58f6573cf3900ca7e40 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartJetTransfer.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseTwoJetBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseChartInverse + +namespace OAI + +/-! Explicit jet transfer through nonlinear phase coordinates. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates PhaseGeometry + +theorem realTwoJet_coordinate_prefix_bound + {T : Base → Base} (hT : ContDiff ℝ ∞ T) + {U V : Set Base} (hU : IsOpen U) (hV : IsOpen V) (hTU : MapsTo T V U) + {m : ℕ} {s C D : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) (hD : 1 ≤ D) + (hTd : ∀ j, 1 ≤ j → j ≤ m+2 → ∀ x ∈ V, + ‖iteratedFDerivWithin ℝ j T V x‖ ≤ D) + {F : RField 4} (hF : ContDiff ℝ ∞ F) + (hb : ∀ j ≤ m+2, WeightedBound U 1 j (C/s^(j-2)) F) : + WeightedBound V s m (((m+2).factorial : ℝ)*D^(m+2)*C) (realTwoJet (F ∘ T)) := by + apply realTwoJet_prefix_bound_on hV (hF.comp hT) hs hs1 (by positivity) + intro j hj + have hc (k : ℕ) (hk : 1 ≤ k) (hkj : k ≤ j) (x : Base) (hx : x ∈ V) : + ‖iteratedFDerivWithin ℝ k T V x‖ ≤ D := hTd k hk (hkj.trans hj) x hx + have hh := (hb j hj).comp_coordinates hV.uniqueDiffOn hU.uniqueDiffOn zero_lt_one le_rfl + hD (div_nonneg hC (pow_nonneg hs.le _)) hT.contDiffOn hF.contDiffOn hTU hc + apply hh.mono_const + calc + (j.factorial : ℝ)*(C/s^(j-2))*D^j = ((j.factorial : ℝ)*D^j)*C/s^(j-2) := by ring + _ ≤ (((m+2).factorial : ℝ)*D^(m+2)*C)/s^(j-2) := by + apply div_le_div_of_nonneg_right _ (pow_nonneg hs.le _) + apply mul_le_mul_of_nonneg_right _ hC + gcongr + +theorem polynomial_inverse_chart_twoJet_bound (m : ℕ) : + ∃ d : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ (F : RField 4) (e : OpenPartialHomeomorph Base Base), + ContDiff ℝ ∞ F → ContDiff ℝ ∞ e → ContDiff ℝ ∞ e.symm → + ∀ s B : ℝ, 0 < s → s ≤ 1 → 1 ≤ B → + (∀ j ≤ m+2, WeightedBound e.source 1 j (B/s^(j-2)) F) → + (∀ j, 1 ≤ j → j ≤ m+2 → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ B) → + (∀ x ∈ e.source, ‖(coordDet (fderiv ℝ e x))⁻¹‖ ≤ B) → + WeightedBound e.target s m (C*B^d) (realTwoJet (F ∘ e.symm)) := by + obtain ⟨d₀,C₀,hC₀,hInv⟩ := polynomial_inverse_chart_bound (m+1) + have hp := ((polynomialBound_const (Nat.cast_nonneg (m+2).factorial)).mul + (((polynomialBound_const (zero_le_one.trans hC₀)).mul (polynomialBound_id.pow d₀)).pow + (m+2))).mul polynomialBound_id + obtain ⟨d,C,hC,hpoly⟩ := hp + refine ⟨d,C,hC,?_⟩ + intro F e hF he hi s B hs hs1 hB hFjet hejet hdet + have hD : 1 ≤ C₀*B^d₀ := one_le_mul_of_one_le_of_one_le hC₀ (one_le_pow₀ hB) + have hb := realTwoJet_coordinate_prefix_bound hi e.open_source e.open_target + (fun x hx => e.map_target hx) hs hs1 (zero_le_one.trans hB) hD + (fun j hj hjm x hx => hInv e he hi B hB hejet hdet j hj (by omega) x hx) hF hFjet + exact hb.mono_const (hpoly B hB).2 + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalField.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalField.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b2f068068fedc047b8108da6026e45d404ec59f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalField.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.OuterChartDifferential +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalGluing + +namespace OAI + +/-! A normal vector in the nonlinear phase coordinates is normal to the +actual immersion on the corresponding atlas support. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phase_chart_normal_at_weight (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : M} (hp : p ∈ tsupport (A.weight i)) + (hx : chart (i : M) p ∈ e.source) (n : NormalFrame.Vec) + (hn : ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A.phaseRealChartMap i e.symm F) + (baseEquiv (e (chart (i : M) p))) ⬝ᵥ n = 0) + (v : TangentSpace planeModel p) : + inner ℝ (surfaceDifferential F p v) (spaceCoordinates.symm n) = 0 := by + let x := chart (i : M) p + let H : JetPolynomial.Base → JetPolynomial.Space := + (spaceCoordinates ∘ A.vectorChartRead i F) ∘ e.symm + have hH : ContDiff ℝ ∞ H := + (spaceCoordinates.contDiff.comp (A.vectorChartRead_smooth i hF)).comp hi + have hHnormal (u : JetPolynomial.Base) : fderiv ℝ H (e x) u ⬝ᵥ n = 0 := by + have hh := hn (baseEquiv u) + change fderiv ℝ (H ∘ baseEquiv.symm) (baseEquiv (e x)) (baseEquiv u) ⬝ᵥ n = 0 at hh + rw [fderiv_comp _ (hH.differentiable (by simp) _) baseEquiv.symm.differentiableAt, + baseEquiv.symm.fderiv,ContinuousLinearMap.comp_apply] at hh + simpa only [baseEquiv.symm_apply_apply,ContinuousLinearEquiv.coe_coe] using hh + have hrel : H ∘ e =ᶠ[𝓝 x] spaceCoordinates ∘ A.vectorChartRead i F := by + filter_upwards [e.open_source.mem_nhds hx] with y hy + simp only [H,Function.comp_apply,e.left_inv hy] + have hd := hrel.fderiv_eq (𝕜 := ℝ) + rw [fderiv_comp x (hH.differentiable (by simp) _) (he.differentiable (by simp) _)] at hd + have hd' := fderiv_comp x spaceCoordinates.differentiableAt + ((A.vectorChartRead_smooth i hF).differentiable (by simp) _) + rw [spaceCoordinates.fderiv] at hd' + have hnormal (u : JetPolynomial.Base) : + spaceCoordinates (fderiv ℝ (A.vectorChartRead i F) x u) ⬝ᵥ n = 0 := by + have hh := hHnormal (fderiv ℝ e x u) + have hh' := congrArg (fun L : JetPolynomial.Base →L[ℝ] JetPolynomial.Space => L u) hd + rw [hd'] at hh' + change fderiv ℝ H (e x) (fderiv ℝ e x u) = + spaceCoordinates (fderiv ℝ (A.vectorChartRead i F) x u) at hh' + rw [← hh'] + exact hh + rw [← spaceCoordinates_dot,spaceCoordinates.apply_symm_apply, + A.vectorChartRead_differential i hF hp] + exact hnormal (surfaceDifferential (chart (i : M)) p v) + +lemma phase_chart_normal_of_outer (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : M} (hp : p ∈ (chart (i : M)).source) + (houter : A.outer i =ᶠ[𝓝 p] fun _ => (1 : ℝ)) + (hx : chart (i : M) p ∈ e.source) (n : NormalFrame.Vec) + (hn : ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A.phaseRealChartMap i e.symm F) + (baseEquiv (e (chart (i : M) p))) ⬝ᵥ n = 0) + (v : TangentSpace planeModel p) : + inner ℝ (surfaceDifferential F p v) (spaceCoordinates.symm n) = 0 := by + let x := chart (i : M) p + let H : JetPolynomial.Base → JetPolynomial.Space := + (spaceCoordinates ∘ A.vectorChartRead i F) ∘ e.symm + have hH : ContDiff ℝ ∞ H := + (spaceCoordinates.contDiff.comp (A.vectorChartRead_smooth i hF)).comp hi + have hHnormal (u : JetPolynomial.Base) : fderiv ℝ H (e x) u ⬝ᵥ n = 0 := by + have hh := hn (baseEquiv u) + change fderiv ℝ (H ∘ baseEquiv.symm) (baseEquiv (e x)) (baseEquiv u) ⬝ᵥ n = 0 at hh + rw [fderiv_comp _ (hH.differentiable (by simp) _) baseEquiv.symm.differentiableAt, + baseEquiv.symm.fderiv,ContinuousLinearMap.comp_apply] at hh + simpa only [baseEquiv.symm_apply_apply,ContinuousLinearEquiv.coe_coe] using hh + have hrel : H ∘ e =ᶠ[𝓝 x] spaceCoordinates ∘ A.vectorChartRead i F := by + filter_upwards [e.open_source.mem_nhds hx] with y hy + simp only [H,Function.comp_apply,e.left_inv hy] + have hd := hrel.fderiv_eq (𝕜 := ℝ) + rw [fderiv_comp x (hH.differentiable (by simp) _) (he.differentiable (by simp) _)] at hd + have hd' := fderiv_comp x spaceCoordinates.differentiableAt + ((A.vectorChartRead_smooth i hF).differentiable (by simp) _) + rw [spaceCoordinates.fderiv] at hd' + have hnormal (u : JetPolynomial.Base) : + spaceCoordinates (fderiv ℝ (A.vectorChartRead i F) x u) ⬝ᵥ n = 0 := by + have hh := hHnormal (fderiv ℝ e x u) + have hh' := congrArg (fun L : JetPolynomial.Base →L[ℝ] JetPolynomial.Space => L u) hd + rw [hd'] at hh' + change fderiv ℝ H (e x) (fderiv ℝ e x u) = + spaceCoordinates (fderiv ℝ (A.vectorChartRead i F) x u) at hh' + rw [← hh'] + exact hh + rw [← spaceCoordinates_dot,spaceCoordinates.apply_symm_apply, + A.vectorChartRead_differential_of_outer i hF hp houter] + exact hnormal (surfaceDifferential (chart (i : M)) p v) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..63c68ddddaa963c9f97882c2c5862364402a2a13 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartNormalTransport.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IntrinsicPhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Atlas.ChartSecondFormBounds + +namespace OAI + +/-! A normal-curvature margin in a phase chart gives a fixed margin in +the original coordinates, uniformly for every smooth immersion. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma phase_chart_normal_transport + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {W V : RField 4} (hW : ContDiff ℝ ∞ W) (hV : ContDiff ℝ ∞ V) + (hrel : ∀ x ∈ e.source, W x = V (e x)) {x : Base} (hx : x ∈ e.source) + (hI : Function.Injective (fderiv ℝ V (e x))) : + Function.Injective (fderiv ℝ W x) ∧ + ‖realSecondTensor V (e x)‖ ≤ + 4*‖realSecondTensor W x‖*‖fderiv ℝ e.symm (e x)‖^2 := by + have hR : W =ᶠ[𝓝 x] V ∘ e := by + filter_upwards [e.open_source.mem_nhds hx] with y hy + exact hrel y hy + have hIx : Function.Injective (fderiv ℝ W x) := by + rw [hR.fderiv_eq,fderiv_comp x (hV.differentiable (by simp) _) (he.differentiable (by simp) _)] + exact hI.comp (inverse_chart_derivative_injective e.symm hi he hx) + refine ⟨hIx,?_⟩ + have hVrel : V =ᶠ[𝓝 (e x)] W ∘ e.symm := by + filter_upwards [e.open_target.mem_nhds (e.map_source hx)] with y hy + simpa only [Function.comp_apply,e.right_inv hy] using (hrel (e.symm y) (e.map_target hy)).symm + have hD : coordDet (fderiv ℝ e.symm (e x)) ≠ 0 := + coordDet_fderiv_ne_zero_of_local_inverse e.open_target e.open_source hi.contDiffOn he.contDiffOn + (fun _ hy => e.map_target hy) (fun y hy => e.right_inv hy) (e.map_source hx) + have hh := norm_realSecondTensor_comp_smooth hW hi (e x) + (by simpa only [e.left_inv hx,coordDeriv] using gramDet_ne_zero_of_injective _ hIx) hD + rw [← (realSecondTensor_eventuallyEq hVrel).eq_of_nhds,e.left_inv hx] at hh + exact hh + +theorem compact_phase_chart_normal_margin + (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {K : Set Base} (hK : IsCompact K) (hKS : K ⊆ e.source) : + ∃ D : ℝ, 0 < D ∧ ∀ (W V : RField 4), ContDiff ℝ ∞ W → ContDiff ℝ ∞ V → + (∀ x ∈ e.source, W x = V (e x)) → + ∀ x ∈ K, Function.Injective (fderiv ℝ V (e x)) → + ∀ c : ℝ, c < ‖realSecondTensor V (e x)‖ → + Function.Injective (fderiv ℝ W x) ∧ c/D < ‖realSecondTensor W x‖ := by + have hd : Continuous (fun x => fderiv ℝ e.symm (e x)) := + ((hi.fderiv_right (m := ∞) (by simp)).continuous).comp he.continuous + obtain ⟨B,hB⟩ := hK.exists_bound_of_continuousOn hd.continuousOn + let D : ℝ := 4*(1+|B|)^2 + have hD : 0 < D := by dsimp [D]; positivity + refine ⟨D,hD,?_⟩ + intro W V hW hV hrel x hx hI c hc + obtain ⟨hIx,hbound⟩ := phase_chart_normal_transport e he hi hW hV hrel (hKS hx) hI + refine ⟨hIx,(div_lt_iff₀ hD).mpr ?_⟩ + have hnorm : ‖fderiv ℝ e.symm (e x)‖ ≤ 1+|B| := (hB x hx).trans (by linarith [le_abs_self B]) + have hb : 4*‖realSecondTensor W x‖*‖fderiv ℝ e.symm (e x)‖^2 ≤ + ‖realSecondTensor W x‖*D := by + dsimp [D] + calc + _ ≤ 4*‖realSecondTensor W x‖*(1+|B|)^2 := by gcongr + _ = _ := by ring + exact hc.trans_le (hbound.trans hb) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbd864f8307ff39c90a6ec73a788e4b67e89ae99 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartRealization.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ArbitraryPhasePolynomial + +namespace OAI + +/-! Actual local-coordinate realization of the polynomial phase operator. +The operator is transported, so no transformed-polynomial assumption is used. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +lemma chart_displacement_pull (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (K : Compacts SmallModes.Base) + (hK : (K : Set SmallModes.Base) ⊆ e.source) (φ : SmallModes.Base → ℝ) + (hphase : ∀ x ∈ e.source, (e x).1 = φ x) (τ : ℝ) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) + {y : SmallModes.Base} (hy : y ∈ e.target) : + QuadraticMean.displacement τ φ (chartPull e he K hK Z) (e.symm y) = + RealModes.realOsc τ Z y := by + rw [RealModes.realOsc_eq_displacement] + have hp := hphase (e.symm y) (e.map_target hy) + rw [e.right_inv hy] at hp + have hz : chartPull e he K hK Z (e.symm y) = Z y := by + rw [chartPull_apply, Set.indicator_of_mem (e.map_target hy)] + simp only [Function.comp_apply, e.right_inv hy] + simp only [QuadraticMean.displacement, ← hp, hz] + +def phaseChartPolynomialOperator (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) : + SupportedField (F := Fin 4 → ℂ) (chartSupport e (modeSupport K) hKe) →ₗ[ℝ] + SupportedField (F := ComplexTensor) (chartSupport e (modeSupport K) hKe) := + chartTensorTransportLM e (modeSupport K) hKe he hi + (phaseCoordinatePolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε) + +lemma phaseChartPolynomialOperator_realization + (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) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e (modeSupport K) hKe)) + {y : SmallModes.Base} (hy : y ∈ e.target) : + let X := QuadraticMean.displacement τ (coordinatePhase φ) (chartPull e he (modeSupport K) hKe Z) + pullbackField e.symm y (coordinateRealLinearized P ε G X 0 (e.symm y)) = + RealModes.realOsc τ (phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe Z) y := by + dsimp only + rw [phaseCoordinatePolynomialOperator_realization hO hU P hP hG hQ K hKU hφ τ ε] + have hp := hphase (e.symm y) (e.map_target hy) + rw [e.right_inv hy] at hp + rw [RealModes.realOsc_eq_displacement] + change pullbackField e.symm y (QuadraticMean.realMode (coordinatePhase φ (e.symm y) / τ) + ((phaseCoordinatePolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε) + (chartPull e he (modeSupport K) hKe Z) (e.symm y))) = + QuadraticMean.realMode (y.1 / τ) + (tensorChartPush e hi (modeSupport K) hKe + ((phaseCoordinatePolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε) + (chartPull e he (modeSupport K) hKe Z)) y) + rw [tensorChartPush_apply, Set.indicator_of_mem hy, ← hp] + exact (realMode_complexPullback (fderiv ℝ e.symm y) _ _).symm + +lemma chart_metric_linearized (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + (K : Compacts SmallModes.Base) (hK : (K : Set SmallModes.Base) ⊆ e.source) + {F : RealModes.RField 4} (hF : ContDiff ℝ ∞ F) {φ : SmallModes.Base → ℝ} + (hφ : ContDiff ℝ ∞ φ) (hphase : ∀ x ∈ e.source, (e x).1 = φ x) (τ : ℝ) + (Z : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) + {y : SmallModes.Base} (hy : y ∈ e.target) : + let X := QuadraticMean.displacement τ φ (chartPull e he K hK Z) + pullbackField e.symm y (RealModes.realLinearizedTensor F X (e.symm y)) = + RealModes.realLinearizedTensor (F ∘ e.symm) (RealModes.realOsc τ Z) y := by + let X := QuadraticMean.displacement τ φ (chartPull e he K hK Z) + have hX : ContDiff ℝ ∞ X := contDiffOn_univ.mp + (RealModes.contDiffOn_displacement hφ.contDiffOn (chartPull e he K hK Z).contDiff.contDiffOn τ) + have hid : X ∘ e.symm =ᶠ[nhds y] RealModes.realOsc τ Z := by + filter_upwards [e.open_target.mem_nhds hy] with z hz + exact chart_displacement_pull e he K hK φ hphase τ Z hz + have hc := RealModes.realLinearizedTensor_comp (hF.differentiable (by simp) _) + (hX.differentiable (by simp) _) ((hi.contDiffAt (e.open_target.mem_nhds hy)).differentiableAt (by simp)) + exact hc.symm.trans (RealModes.realLinearizedTensor_congr_right hid) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..7dc1aeef8ea18e5a6f2cec0324fd422bbbeb0588 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartStability.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseC2Stability +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseCover +import OAI.Geometry.SurfaceImmersion.Geometry.CompactRealJetNeighborhood +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds + +namespace OAI + +/-! A fixed good phase chart remains admissible throughout a C2 neighborhood. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +lemma norm_realTwoJet_le_on {U : Set Base} (hU : IsOpen U) {F : RField 4} + (hF : ContDiff ℝ ∞ F) {C : ℝ} (hC : 0 ≤ C) + (hb : WeightedBound U 1 2 C F) {p : Base} (hp : p ∈ U) : + ‖realTwoJet F p‖ ≤ C := by + have h1 (v : Base) (hv : ‖v‖ = 1) : WeightedBound U 1 1 C (coordDeriv v F) := by + change WeightedBound U 1 1 C (fun x => fderiv ℝ F x v) + simpa only [hv,div_one,one_mul] using hb.directional hU zero_lt_one hF.contDiffOn v + have h2 (v w : Base) (hv : ‖v‖ = 1) (hw : ‖w‖ = 1) : + ‖coordDeriv v (coordDeriv w F) p‖ ≤ C := by + have hd := (h1 w hw).directional hU zero_lt_one (contDiff_real_coordDeriv hF w).contDiffOn v + simpa only [coordDeriv,hv,div_one,one_mul] using hd.norm_le hp + 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 (h1 dx hx).norm_le hp + · exact (h1 dy hy).norm_le hp + · exact h2 dx dx hx hx + · exact h2 dx dy hx hy + · exact h2 dy dy hy hy + +theorem compact_twoJet_comp_bound {T : Base → Base} (hT : ContDiff ℝ ∞ T) + (K : Compacts Base) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (F : RField 4), ContDiff ℝ ∞ F → ∀ C : ℝ, + 0 ≤ C → WeightedBound univ 1 2 C F → + ∀ p ∈ (K : Set Base), ‖realTwoJet (F ∘ T) p‖ ≤ D*C := by + obtain ⟨r,hr⟩ := K.isCompact.isBounded.subset_ball (0 : Base) + obtain ⟨B,hB,hb⟩ := compact_local_weighted_bound Metric.isOpen_ball isOpen_univ + (isCompact_closedBall (0 : Base) r) Metric.ball_subset_closedBall (subset_univ _) + hT.contDiffOn 2 + let D : ℝ := ((2 : ℕ).factorial : ℝ)*B^2 + have hD : 1 ≤ D := by dsimp [D]; nlinarith [sq_nonneg (B-1)] + refine ⟨D,hD,?_⟩ + intro F hF C hC hFC p hp + have hcoord (j : ℕ) (_ : 1 ≤ j) (hj : j ≤ 2) (x : Base) + (hx : x ∈ Metric.ball (0 : Base) r) : + ‖iteratedFDerivWithin ℝ j T (Metric.ball (0 : Base) r) x‖ ≤ B := by + simpa only [one_pow,one_mul] using hb 1 zero_le_one le_rfl j hj x hx + have hc := hFC.comp_coordinates Metric.isOpen_ball.uniqueDiffOn uniqueDiffOn_univ + zero_lt_one le_rfl hB hC hT.contDiffOn hF.contDiffOn (mapsTo_univ _ _) hcoord + have hn := norm_realTwoJet_le_on Metric.isOpen_ball (hF.comp hT) (by positivity) hc (hr hp) + simpa only [D,mul_assoc,mul_left_comm,mul_comm] using hn + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes WeightedEstimates + +/-- The compact jet neighborhood and radius are fixed before the perturbed +map, using the smooth inverse of the reference map. -/ +theorem GoodPhaseChart.uniform_jet_neighborhood {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (c : GoodPhaseChart F φ) : + ∃ (ρ : ℝ) (Q : Set RealTwoJet), 0 < ρ ∧ IsCompact Q ∧ Q ⊆ admissibleRealJets ∧ + ∀ (G : RField 4), ContDiff ℝ ∞ G → ∀ C : ℝ, 0 ≤ C → C < ρ → + WeightedBound univ 1 2 C (G-F) → + MapsTo (realTwoJet (G ∘ c.chart.symm)) c.chart.target Q ∧ + RealModeDomain (G ∘ c.chart.symm) c.chart.target := by + obtain ⟨ε,Q,hε,hQ,hQa,hclose⟩ := compact_real_jet_neighborhood (hF.comp c.smoothInverse) + c.targetCompact (fun p hp => c.good.determinant p (c.targetInside hp)) + (fun p hp => c.good.good p (c.targetInside hp)) + obtain ⟨D,hD,hd⟩ := compact_twoJet_comp_bound c.smoothInverse c.targetCompact + have hDp : 0 < D := zero_lt_one.trans_le hD + refine ⟨ε/D,Q,div_pos hε hDp,hQ,hQa,?_⟩ + intro G hG C hC hCρ hb + have hDC : D*C < ε := by + simpa only [mul_comm] using (lt_div_iff₀ hDp).mp hCρ + have hsmall (p : Base) (hp : p ∈ (c.targetCompact : Set Base)) : + ‖realTwoJet (G ∘ c.chart.symm) p - realTwoJet (F ∘ c.chart.symm) p‖ < ε := by + have hj := hd (G-F) (hG.sub hF) C hC hb p hp + have he : (G-F) ∘ c.chart.symm = (G ∘ c.chart.symm) - (F ∘ c.chart.symm) := rfl + rw [he,realTwoJet_sub (hG.comp c.smoothInverse) (hF.comp c.smoothInverse)] at hj + exact hj.trans_lt hDC + have hmaps : MapsTo (realTwoJet (G ∘ c.chart.symm)) c.chart.target Q := + fun p hp => hclose (G ∘ c.chart.symm) hsmall (c.targetBound hp) + refine ⟨hmaps,c.chart.open_target,?_,?_⟩ + · intro p hp + exact (hQa (hmaps hp)).1 + · intro p hp + exact (hQa (hmaps hp)).2 + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..29eca86f88ac3124615105f34e0097e8b48a0481 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseChartTransition.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Geometry.CurveSecondFields +import OAI.Geometry.SurfaceImmersion.Primitive.IntrinsicCrossingNaturality + +namespace OAI + +/-! The localized analytic maps have the same second forms as the actual +surface phase charts. This permits later curves to keep their own charts. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates RealModes SmallModes PhaseGeometry VelocityFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas + +omit [CompactSpace M] in +lemma phaseRealChartMap_surface_germ (A : SmoothingAtlas M) (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseChart (i : M) e).target) + (hw : A.weight i ((surfacePhaseChart (i : M) e).symm x) ≠ 0) : + A.phaseRealChartMap i e.symm F =ᶠ[𝓝 x] surfacePhaseMap (i : M) e F := by + have ho := (A.outer_eventually_one_of_weight_ne_zero i hw).comp_tendsto + ((surfacePhaseChart (i : M) e).continuousAt_symm hx) + filter_upwards [(surfacePhaseChart (i : M) e).open_target.mem_nhds hx,ho] with y hy hoy + have hyt : e.symm (baseEquiv.symm y) ∈ (chart (i : M)).target := hy.2 + change spaceCoordinates (A.vectorChartRead i F (e.symm (baseEquiv.symm y))) = + spaceCoordinates (F ((chart (i : M)).symm (e.symm (baseEquiv.symm y)))) + change A.outer i ((chart (i : M)).symm (e.symm (baseEquiv.symm y))) = 1 at hoy + simp only [vectorChartRead,localize,indicator_of_mem hyt,hoy,one_pow,one_smul] + +omit [CompactSpace M] in +lemma phaseRealChartMap_transition_germ (A B : SmoothingAtlas M) + (i : A.centers) (j : B.centers) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition (i : M) e (j : M) f).source) + (hwA : A.weight i ((surfacePhaseChart (i : M) e).symm x) ≠ 0) + (hwB : B.weight j ((surfacePhaseChart (i : M) e).symm x) ≠ 0) : + A.phaseRealChartMap i e.symm F =ᶠ[𝓝 x] + B.phaseRealChartMap j f.symm F ∘ surfacePhaseTransition (i : M) e (j : M) f := by + have hxA : x ∈ (surfacePhaseChart (i : M) e).target := hx.1 + have hxB : (surfacePhaseChart (i : M) e).symm x ∈ (surfacePhaseChart (j : M) f).source := hx.2 + let T := surfacePhaseTransition (i : M) e (j : M) f + have hy : T x ∈ (surfacePhaseChart (j : M) f).target := + (surfacePhaseChart (j : M) f).map_source hxB + have hwy : B.weight j ((surfacePhaseChart (j : M) f).symm (T x)) ≠ 0 := by + change B.weight j ((surfacePhaseChart (j : M) f).symm + ((surfacePhaseChart (j : M) f) ((surfacePhaseChart (i : M) e).symm x))) ≠ 0 + rwa [(surfacePhaseChart (j : M) f).left_inv hxB] + exact (A.phaseRealChartMap_surface_germ i e F hxA hwA).trans + ((surfacePhaseMap_transition_germ (i : M) (j : M) e f F hx).trans + (((B.phaseRealChartMap_surface_germ j f F hy hwy).comp_tendsto + (T.continuousAt hx)).symm)) + +lemma phase_secondForm_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) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition (i : M) e (j : M) f).source) + (hwA : A.weight i ((surfacePhaseChart (i : M) e).symm x) ≠ 0) + (hwB : B.weight j ((surfacePhaseChart (i : M) e).symm x) ≠ 0) + (v w : SmallModes.Base) : + let T := surfacePhaseTransition (i : M) e (j : M) f + realSecondForm (A.phaseRealChartMap i e.symm F) v w x = + realSecondForm (B.phaseRealChartMap j f.symm F) + (fderiv ℝ T x v) (fderiv ℝ T x w) (T x) := by + let T := surfacePhaseTransition (i : M) e (j : M) f + have hg := A.phaseRealChartMap_transition_germ B i j e f F hx hwA hwB + have hxB : (surfacePhaseChart (i : M) e).symm x ∈ (surfacePhaseChart (j : M) f).source := hx.2 + have hy : T x ∈ (surfacePhaseChart (j : M) f).target := + (surfacePhaseChart (j : M) f).map_source hxB + have hwy : B.chartWeight j (f.symm (baseEquiv.symm (T x))) ≠ 0 := by + have hyw : B.weight j ((surfacePhaseChart (j : M) f).symm (T x)) ≠ 0 := by + change B.weight j ((surfacePhaseChart (j : M) f).symm + ((surfacePhaseChart (j : M) f) ((surfacePhaseChart (i : M) e).symm x))) ≠ 0 + rwa [(surfacePhaseChart (j : M) f).left_inv hxB] + have hyt : f.symm (baseEquiv.symm (T x)) ∈ (chart (j : M)).target := hy.2 + rw [chartWeight,indicator_of_mem hyt] + simpa only [surfacePhaseChart_symm_apply] using hyw + rw [(realSecondForm_eventuallyEq hg v w).eq_of_nhds] + exact realSecondForm_comp_on T.open_source isOpen_univ + (B.phaseRealChartMap_smooth j hfi hF.1).contDiffOn + (surfacePhaseTransition_smooth (i : M) e hi (j : M) f hf) hx (mem_univ _) v w + (B.phase_gram_ne_zero j f hf hfi hF hy.1 hwy) + (surfacePhaseTransition_det_ne (i : M) e he hi (j : M) f hf hfi hx) + +lemma phase_intrinsic_crossing_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) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition (i : M) e (j : M) f).source) + (hwA : A.weight i ((surfacePhaseChart (i : M) e).symm x) ≠ 0) + (hwB : B.weight j ((surfacePhaseChart (i : M) e).symm x) ≠ 0) + (v w : SmallModes.Base) : + let T := surfacePhaseTransition (i : M) e (j : M) f + let H := A.phaseRealChartMap i e.symm F + let G := B.phaseRealChartMap j f.symm F + orderedCrossing H v w x + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) x) = + orderedCrossing G (fderiv ℝ T x v) (fderiv ℝ T x w) (T x) + (coordinateGaussianCurvature (realMetric G dx dx) (realMetric G dx dy) (realMetric G dy dy) (T x)) := by + let T := surfacePhaseTransition (i : M) e (j : M) f + have hxA : x ∈ (surfacePhaseChart (i : M) e).target := hx.1 + have htA : e.symm (baseEquiv.symm x) ∈ (chart (i : M)).target := hxA.2 + have ha : A.chartWeight i (e.symm (baseEquiv.symm x)) ≠ 0 := by + rw [chartWeight,indicator_of_mem htA] + exact hwA + have hxB : (surfacePhaseChart (i : M) e).symm x ∈ (surfacePhaseChart (j : M) f).source := hx.2 + have hy : T x ∈ (surfacePhaseChart (j : M) f).target := + (surfacePhaseChart (j : M) f).map_source hxB + have htB : f.symm (baseEquiv.symm (T x)) ∈ (chart (j : M)).target := hy.2 + have hb : B.chartWeight j (f.symm (baseEquiv.symm (T x))) ≠ 0 := by + rw [chartWeight,indicator_of_mem htB] + change B.weight j ((surfacePhaseChart (j : M) f).symm + ((surfacePhaseChart (j : M) f) ((surfacePhaseChart (i : M) e).symm x))) ≠ 0 + rwa [(surfacePhaseChart (j : M) f).left_inv hxB] + dsimp only + rw [orderedCrossing_intrinsic_eq (A.phaseRealChartMap_smooth i hi hF.1) x v w + (A.phase_gram_ne_zero i e he hi hF hxA.1 ha), + orderedCrossing_intrinsic_eq (B.phaseRealChartMap_smooth j hfi hF.1) (T x) _ _ + (B.phase_gram_ne_zero j f hf hfi hF hy.1 hb), + A.phase_secondForm_transition B i j e f he hi hf hfi hF hx hwA hwB v w, + A.phase_secondForm_transition B i j e f he hi hf hfi hF hx hwA hwB v v, + A.phase_secondForm_transition B i j e f he hi hf hfi hF hx hwA hwB w w] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCoordinateCovector.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCoordinateCovector.lean new file mode 100644 index 0000000000000000000000000000000000000000..6239ea4a450b27d809c83fca0837f3ed1fec4344 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCoordinateCovector.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CurvedAtlasPrimitives +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveTensor +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts + +namespace OAI + +/-! The first phase coordinate has the exact covector used by the local +rank-one tensor pullback. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates + +namespace JetPolynomial +lemma firstPhaseCovector_apply (T : Base → Base) (x v : Base) : + phaseLinear (firstPhaseCovector T x) (baseEquiv v) = (fderiv ℝ T x v) 0 := by + have hv : v = v 0 • coordinateVector 0 + v 1 • coordinateVector 1 := by + ext k + fin_cases k <;> simp [coordinateVector] + conv_rhs => rw [hv] + simp only [map_add,map_smul,Pi.add_apply,Pi.smul_apply,smul_eq_mul] + change (fderiv ℝ T x (coordinateVector 0)) 0 * v 0 + + (fderiv ℝ T x (coordinateVector 1)) 0 * v 1 = _ + ring +end JetPolynomial + +namespace FiniteOrderSmoothing.SmoothingAtlas +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable (A : SmoothingAtlas M) + +lemma jetChart_tangentCoordinates (i : A.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) : + mfderiv planeModel 𝓘(ℝ,JetPolynomial.Base) (chart (i : M)) p = + (EuclideanSpace.equiv (Fin 2) ℝ).toContinuousLinearMap.comp + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p) := by + have hp' : p ∈ (chartAt Plane (i : M)).source := by simpa only [chart_source] using hp + have hc := (contMDiffOn_chart (I := planeModel) (n := ∞) (x := (i : M)) p hp').contMDiffAt + ((chartAt Plane (i : M)).open_source.mem_nhds hp') + rw [TangentBundle.continuousLinearMapAt_trivializationAt hp'] + change mfderiv planeModel 𝓘(ℝ,JetPolynomial.Base) + ((EuclideanSpace.equiv (Fin 2) ℝ) ∘ chartAt Plane (i : M)) p = _ + rw [mfderiv_comp p + (((EuclideanSpace.equiv (Fin 2) ℝ).contDiff (n := (∞ : ℕ∞ω))).contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv, + (EuclideanSpace.equiv (Fin 2) ℝ).fderiv] + rfl + +lemma phaseFirst_mfderiv (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) {phi : M → ℝ} {p : M} + (hp : p ∈ (chart (i : M)).source) + (hphi : phi =ᶠ[𝓝 p] (fun q => (e (chart (i : M) q)) 0)) + (v : TangentSpace planeModel p) : + mfderiv planeModel 𝓘(ℝ) phi p v = + phaseLinear (JetPolynomial.firstPhaseCovector e (chart (i : M) p)) + (planeCoordinates + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v)) := by + let f : JetPolynomial.Base → ℝ := fun y => e y 0 + have hf : ContDiff ℝ ∞ f := (contDiff_pi.mp he 0) + have hc := (chart_smooth (i : M) p hp).contMDiffAt ((chart (i : M)).open_source.mem_nhds hp) + rw [hphi.mfderiv_eq] + change mfderiv planeModel 𝓘(ℝ) (f ∘ chart (i : M)) p v = _ + rw [mfderiv_comp p (hf.contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv,A.jetChart_tangentCoordinates i hp] + change fderiv ℝ f (chart (i : M) p) + ((EuclideanSpace.equiv (Fin 2) ℝ) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v)) = _ + rw [fderiv_apply (he.differentiable (by simp) _) 0] + exact (JetPolynomial.firstPhaseCovector_apply e _ _).symm + +end FiniteOrderSmoothing.SmoothingAtlas +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..dabdac559685569fabfef15b6efcdb4abe7d682c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorFamily.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCovectorRead +import OAI.Geometry.SurfaceImmersion.Primitive.CircularPhaseDependence +import OAI.Geometry.SurfaceImmersion.Geometry.CompactParameterC1 + +namespace OAI + +/-! Compact parameter bounds for the actual circular phase differentials, +including their first spatial derivatives. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +def phaseCovectorRead (i : B.centers) (phi : M → ℝ) (y : JetPolynomial.Base) : Plane →L[ℝ] ℝ := + (fderiv ℝ (phi ∘ (chart (i : M)).symm) y).comp + (EuclideanSpace.equiv (Fin 2) ℝ).toContinuousLinearMap + +omit [CompactSpace M] [T2Space M] in +lemma phaseCovectorRead_smoothOn (i : B.centers) (phi : M → ℝ) + (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) : + ContDiffOn ℝ ∞ (B.phaseCovectorRead i phi) (chart (i : M)).target := by + have h := (hphi.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + exact (h.fderiv_of_isOpen (chart (i : M)).open_target (m := ∞) (by simp)).clm_comp contDiffOn_const + +def circularCovectorJoint (i j : B.centers) (L : ℝ) (z : Base × JetPolynomial.Base) : Plane →L[ℝ] ℝ := + B.phaseCovectorRead j (B.circularPhase i 0 L) z.2+ + z.1.1 • B.phaseCovectorRead j (B.circularPhase i (1,0) 0) z.2+ + z.1.2 • B.phaseCovectorRead j (B.circularPhase i (0,1) 0) z.2 + +omit [CompactSpace M] [T2Space M] in +lemma circularCovectorJoint_smoothOn (i j : B.centers) (L : ℝ) : + ContDiffOn ℝ ∞ (B.circularCovectorJoint i j L) + (univ ×ˢ (chart (j : M)).target) := by + have h0 := (B.phaseCovectorRead_smoothOn j _ (B.circularPhase_smooth i 0 L)).comp + (contDiffOn_snd : ContDiffOn ℝ ∞ (fun z : Base × JetPolynomial.Base => z.2) + (univ ×ˢ (chart (j : M)).target)) + (fun (_ : Base × JetPolynomial.Base) (hz : _ ∈ univ ×ˢ (chart (j : M)).target) => hz.2) + have h1 := (B.phaseCovectorRead_smoothOn j _ (B.circularPhase_smooth i (1,0) 0)).comp + (contDiffOn_snd : ContDiffOn ℝ ∞ (fun z : Base × JetPolynomial.Base => z.2) + (univ ×ˢ (chart (j : M)).target)) + (fun (_ : Base × JetPolynomial.Base) (hz : _ ∈ univ ×ˢ (chart (j : M)).target) => hz.2) + have h2 := (B.phaseCovectorRead_smoothOn j _ (B.circularPhase_smooth i (0,1) 0)).comp + (contDiffOn_snd : ContDiffOn ℝ ∞ (fun z : Base × JetPolynomial.Base => z.2) + (univ ×ˢ (chart (j : M)).target)) + (fun (_ : Base × JetPolynomial.Base) (hz : _ ∈ univ ×ˢ (chart (j : M)).target) => hz.2) + have he1 : ContDiff ℝ ∞ (fun z : Base × JetPolynomial.Base => z.1.1) := contDiff_fst.fst + have he2 : ContDiff ℝ ∞ (fun z : Base × JetPolynomial.Base => z.1.2) := contDiff_fst.snd + exact (h0.add (he1.contDiffOn.smul h1)).add (he2.contDiffOn.smul h2) + +omit [CompactSpace M] [T2Space M] in +lemma circularCovectorJoint_eq (i j : B.centers) (ell : Base) (L : ℝ) + {y : JetPolynomial.Base} (hy : y ∈ (chart (j : M)).target) : + B.phaseCovectorRead j (B.circularPhase i ell L) y = B.circularCovectorJoint i j L (ell,y) := by + let p := (chart (j : M)).symm y + have hp : p ∈ (chart (j : M)).source := (chart (j : M)).map_target hy + have hpy : chart (j : M) p = y := (chart (j : M)).right_inv hy + have h := B.circularPhase_mfderiv_sub i ell 0 L p + have hh := congrArg (fun v : Plane →L[ℝ] ℝ => B.covectorFrame j p v) h + unfold covectorFrame at hh + erw [ContinuousLinearMap.sub_comp,ContinuousLinearMap.add_comp, + ContinuousLinearMap.smul_comp,ContinuousLinearMap.smul_comp] at hh + change B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i ell L) p)- + B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i 0 L) p) = + (ell.1-0) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (1,0) 0) p)+ + (ell.2-0) • B.covectorFrame j p (mfderiv planeModel 𝓘(ℝ) (B.circularPhase i (0,1) 0) p) at hh + rw [B.covectorFrame_mfderiv _ (B.circularPhase_smooth i ell L) j hp, + B.covectorFrame_mfderiv _ (B.circularPhase_smooth i 0 L) j hp, + B.covectorFrame_mfderiv _ (B.circularPhase_smooth i (1,0) 0) j hp, + B.covectorFrame_mfderiv _ (B.circularPhase_smooth i (0,1) 0) j hp,hpy] at hh + change B.phaseCovectorRead j (B.circularPhase i ell L) y- + B.phaseCovectorRead j (B.circularPhase i 0 L) y = + (ell.1-0) • B.phaseCovectorRead j (B.circularPhase i (1,0) 0) y+ + (ell.2-0) • B.phaseCovectorRead j (B.circularPhase i (0,1) 0) y at hh + simp only [sub_zero] at hh + have hh' := congrArg (fun v => v+B.phaseCovectorRead j (B.circularPhase i 0 L) y) hh + rw [sub_add_cancel] at hh' + rw [hh'] + unfold circularCovectorJoint + abel + +omit [T2Space M] in +theorem circular_covector_parameter_bound (i j : B.centers) (L : ℝ) + {P : Set Base} (hP : IsCompact P) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ ell ∈ P, ∀ y ∈ (B.chartWeightCompact j : Set JetPolynomial.Base), + ‖B.phaseCovectorRead j (B.circularPhase i ell L) y‖ ≤ D ∧ + ‖fderiv ℝ (B.phaseCovectorRead j (B.circularPhase i ell L)) y‖ ≤ D := by + have hK := (B.chartWeightCompact j).isCompact + have hsub : (B.chartWeightCompact j : Set JetPolynomial.Base) ⊆ (chart (j : M)).target := by + rintro y ⟨p,hp,rfl⟩ + exact (chart (j : M)).map_source (B.weight_support j hp) + have hj := B.circularCovectorJoint_smoothOn i j L + obtain ⟨D,hD,hbound⟩ := compact_parameter_C1 hP hK + (fun z hz => hj.contDiffAt ((isOpen_univ.prod (chart (j : M)).open_target).mem_nhds + ⟨mem_univ _,hsub hz.2⟩)) + refine ⟨D,hD,?_⟩ + intro ell hell y hy + have he : B.phaseCovectorRead j (B.circularPhase i ell L) =ᶠ[𝓝 y] + (fun x => B.circularCovectorJoint i j L (ell,x)) := by + filter_upwards [(chart (j : M)).open_target.mem_nhds (hsub hy)] with x hx + exact B.circularCovectorJoint_eq i j ell L hx + rw [he.self_of_nhds,he.fderiv_eq] + exact hbound ell hell y hy + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..b543459befcb8687074b7c70421d7d71538fdeb4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCovectorRead.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoefficientCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCoordinateCovector + +namespace OAI + +/-! The actual covector in a tangent frame is the derivative of the +scalar phase in that chart. -/ +noncomputable section +open Set Filter Manifold Bundle +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 covectorFrame_mfderiv (phi : M → ℝ) (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) + (i : B.centers) {p : M} (hp : p ∈ (chart (i : M)).source) : + B.covectorFrame i p (mfderiv planeModel 𝓘(ℝ) phi p) = + (fderiv ℝ (phi ∘ (chart (i : M)).symm) (chart (i : M) p)).comp + (EuclideanSpace.equiv (Fin 2) ℝ).toContinuousLinearMap := by + let f := phi ∘ (chart (i : M)).symm + have hf : ContDiffOn ℝ ∞ f (chart (i : M)).target := + (hphi.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + have hx := (chart (i : M)).map_source hp + have hfa := hf.contDiffAt ((chart (i : M)).open_target.mem_nhds hx) + have hc := ((chart_smooth (i : M)) p hp).contMDiffAt + ((chart (i : M)).open_source.mem_nhds hp) + have he : phi =ᶠ[𝓝 p] (f ∘ chart (i : M)) := by + filter_upwards [(chart (i : M)).open_source.mem_nhds hp] with q hq + exact congrArg phi ((chart (i : M)).left_inv hq).symm + have hd := he.mfderiv_eq (I := planeModel) (I' := 𝓘(ℝ)) + erw [mfderiv_comp p (hfa.contMDiffAt.mdifferentiableAt (by simp)) + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv,B.jetChart_tangentCoordinates i hp] at hd + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet,chart_source] using hp + apply ContinuousLinearMap.ext + intro v + change (mfderiv planeModel 𝓘(ℝ) phi p) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v) = _ + rw [hd] + change fderiv ℝ f (chart (i : M) p) + ((EuclideanSpace.equiv (Fin 2) ℝ) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symmL ℝ p v))) = _ + rw [(trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt_symmL ht] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCurvePairGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCurvePairGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a5067157191894358237af71c19facbb8ed34b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseCurvePairGeometry.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseCurveCrossings + +namespace OAI + +/-! Both ordered crossings and both pure second forms in either fixed +curve chart. -/ +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 directionIn (p : M) : SmallModes.Base := + fderiv ℝ (surfacePhaseTransition (c.index : M) c.phase (d.index : M) d.phase) (c.coordinate p) dy + +lemma second_in_chart {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : M} (hc : p ∈ c.carrier) (hd : p ∈ d.carrier) : + c.second F p = realSecondForm (B.phaseRealChartMap d.index d.phase.symm F) + (c.directionIn d p) (c.directionIn d p) (d.coordinate p) := + c.second_transition B d.index d.phase d.smooth d.inverse_smooth hF hc (d.source hd) (d.active p hd) + +lemma reverse_crossing_in_chart {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : M} (hc : p ∈ c.carrier) (hd : p ∈ d.carrier) : + let H := B.phaseRealChartMap d.index d.phase.symm F + c.crossing d F p = orderedCrossing H (c.directionIn d p) dy (d.coordinate p) + (coordinateGaussianCurvature (realMetric H dx dx) (realMetric H dx dy) (realMetric H dy dy) + (d.coordinate p)) := by + have hh := c.crossing_transition d B d.index d.phase d.smooth d.inverse_smooth hF hc hd + (d.source hd) (d.active p hd) + have hx : d.coordinate p ∈ (surfacePhaseChart (d.index : M) d.phase).target := + (surfacePhaseChart (d.index : M) d.phase).map_source (d.source hd) + dsimp only at hh ⊢ + change c.crossing d F p = orderedCrossing _ (c.directionIn d p) + (fderiv ℝ (surfacePhaseTransition (d.index : M) d.phase (d.index : M) d.phase) (d.coordinate p) dy) + (d.coordinate p) _ at hh + rw [surfacePhaseTransition_self_fderiv _ _ hx,ContinuousLinearMap.id_apply] at hh + exact hh + +omit [CompactSpace M] in +lemma directionIn_continuousOn : ContinuousOn (c.directionIn d) (c.carrier ∩ d.carrier) := by + let T := surfacePhaseTransition (c.index : M) c.phase (d.index : M) d.phase + have ht : ContDiffOn ℝ ∞ (fun x => fderiv ℝ T x dy) T.source := + ((surfacePhaseTransition_smooth (c.index : M) c.phase c.inverse_smooth + (d.index : M) d.phase d.smooth).fderiv_of_isOpen T.open_source (by simp)).clm_apply contDiffOn_const + apply ht.continuousOn.comp (c.coordinate_continuous.mono inter_subset_left) + intro p hp + exact surfacePhaseTransition_source _ _ _ _ (c.source hp.1) (d.source hp.2) + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDenominatorNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDenominatorNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..dba13d4bb8df8d0cf3e55f1a7e08474e9f57108d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDenominatorNeighborhood.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseNeighborhood + +namespace OAI + +/-! A compact-support denominator bound extends to an open phase domain +with a specified factor of two. The domain may depend on the immersion; +the numerical bounds do not. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma continuousAt_phaseNormal {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (x : Base) + (hD : NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) : + ContinuousAt (fun y => secondQuadratic (realSecondTensor F y) + (-(phaseDerivative φ y).2,(phaseDerivative φ y).1)) x := by + have hb := (contDiffAt_realSecondTensor hF x hD).continuousAt + have hp := (continuous_phaseDerivative hφ).continuousAt (x := x) + have hh : ContinuousAt (fun y : Base => (realSecondTensor F y, + (-(phaseDerivative φ y).2,(phaseDerivative φ y).1))) x := + hb.prodMk (hp.snd.neg.prodMk hp.fst) + have hc : ContinuousAt (fun z : (Fin 3 → RVec 4) × Base => secondQuadratic z.1 z.2) + (realSecondTensor F x, (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)) := + (continuous_secondQuadratic (n := 4)).continuousAt + exact hc.comp (f := fun y : Base => (realSecondTensor F y, + (-(phaseDerivative φ y).2,(phaseDerivative φ y).1))) hh + +lemma eventually_gram_reciprocal_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + (x : Base) {B : ℝ} (hB : 0 < B) + (hD : NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) + (h : ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) : + ∀ᶠ y in 𝓝 x, + ‖(NormalFrame.gramDet (coordDeriv dx F y) (coordDeriv dy F y))⁻¹‖ < 2*B := by + have hc := ((continuous_gramDet_field hF).continuousAt (x := x)).inv₀ hD + exact hc.norm.eventually (Iio_mem_nhds (lt_of_le_of_lt h (by linarith))) + +lemma eventually_normal_reciprocal_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (x : Base) {B : ℝ} (hB : 0 < B) + (hD : NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0) + (hn : secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1) ≠ 0) + (h : ‖secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖⁻¹ ≤ B) : + ∀ᶠ y in 𝓝 x, ‖secondQuadratic (realSecondTensor F y) + (-(phaseDerivative φ y).2,(phaseDerivative φ y).1)‖⁻¹ < 2*B := by + have hc := (continuousAt_phaseNormal hF hφ x hD).norm.inv₀ (norm_ne_zero_iff.mpr hn) + exact hc.eventually (Iio_mem_nhds (lt_of_le_of_lt h (by linarith))) + +theorem phase_denominator_neighborhood {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Set Base) {B : ℝ} (hB : 0 < B) + (hImm : ∀ x ∈ K, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ K, Good (realSecondTensor F x) (phaseDerivative φ x)) + (hgram : ∀ x ∈ K, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) + (hnormal : ∀ x ∈ K, ‖secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖⁻¹ ≤ B) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ ∀ x ∈ U, + Function.Injective (fderiv ℝ F x) ∧ Good (realSecondTensor F x) (phaseDerivative φ x) ∧ + ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ 2*B ∧ + ‖secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖⁻¹ ≤ 2*B := by + let S : Set Base := {x | Function.Injective (fderiv ℝ F x) ∧ + Good (realSecondTensor F x) (phaseDerivative φ x) ∧ + ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ 2*B ∧ + ‖secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖⁻¹ ≤ 2*B} + refine ⟨interior S,isOpen_interior,?_,fun x hx => (show x ∈ S from interior_subset hx)⟩ + intro x hx + have hD := gramDet_ne_zero_of_injective (fderiv ℝ F x) (hImm x hx) + have hge := eventually_gram_reciprocal_bound hF x hB hD (hgram x hx) + have hne := eventually_normal_reciprocal_bound hF hφ x hB hD (hgood x hx).2 + (hnormal x hx) + have hb := (contDiffAt_realSecondTensor hF x hD).continuousAt + have hp := (continuous_phaseDerivative hφ).continuousAt (x := x) + have hgood' := good_eventually hb hp (hgood x hx) + have hD' := (continuous_gramDet_field hF).continuousAt.eventually_ne hD + apply mem_interior_iff_mem_nhds.mpr + filter_upwards [hD',hgood',hge,hne] with y hyD hyg hyG hyN + exact ⟨injective_of_gramDet_ne_zero _ hyD,hyg,hyG.le,hyN.le⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskNormalGluing.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskNormalGluing.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e86210186be2ea34ed955e691d7cb3555fe0646 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskNormalGluing.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseNormalNeighborhood +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 phase_disk_normal_gluing_within (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) + (O : Set M) (hO : IsOpen O) + {D : Set M} (hD : IsOpen D) (hfO : frontier D ⊆ O) + {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)) : + ∃ W : Set M, IsOpen W ∧ frontier D ⊆ W ∧ W ⊆ O ∧ ∃ N : PreferredNormal F, + (∀ p ∈ D \ W, N.vector p = A.phaseNormalLift i e ν p) ∧ + (∀ p ∈ (closure D)ᶜ \ W, N.vector p = A.unitProjectedNormalField F n p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨U,hU,hDU',_,_,_,ha,haunit,hanormal⟩ := + A.phase_normal_neighborhood i hF e he hi hU₀ hν hunit hnormal hDs hDe hDU hDw + let V := {p | A.projectedNormalField F n p ≠ 0} + have hgram := fun (j : A.centers) (x : SmallModes.Base) (hx : x ∈ tsupport (A.planeWeight j)) => + A.planeWeight_gram_of_immersion hF hI houter j hx + have hV : IsOpen V := isOpen_ne.preimage (A.projectedNormalField_smooth hF hn hgram).continuous + have hDV : Dᶜ ⊆ V := hproj + obtain ⟨hb,hbunit,hbnormal⟩ := A.unitProjectedNormalField_properties hF hn hgram + (show ∀ p ∈ V, A.projectedNormalField F n p ≠ 0 from fun _ hp => hp) + apply preferredNormal_disk_gluing_within O hO hfO hD hU hV hDU' hDV ha hb haunit hbunit hanormal hbnormal + ?_ C hC B (fun k => (hB k).continuousOn) ?_ hout ?_ + · intro p hp heq + apply hanti p hp + have h := congrArg spaceCoordinates heq + simpa only [map_neg,A.phaseNormalLift_coordinates] using h + · intro k p hp hpd + rw [A.phaseNormalLift_coordinates] + exact hin k p hp hpd + · intro k p hp hpf + have hh := hpair k p hp hpf + constructor + · rw [← spaceCoordinates_dot,spaceCoordinates.apply_symm_apply,A.phaseNormalLift_coordinates] + exact hh.1 + · rw [← spaceCoordinates_dot,spaceCoordinates.apply_symm_apply] + exact hh.2 + + +theorem phase_disk_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) + {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)) : + ∃ W : Set M, IsOpen W ∧ frontier D ⊆ W ∧ ∃ N : PreferredNormal F, + (∀ p ∈ D \ W, N.vector p = A.phaseNormalLift i e ν p) ∧ + (∀ p ∈ (closure D)ᶜ \ W, N.vector p = A.unitProjectedNormalField F n p) ∧ + ∀ k p, p ∈ C k → spaceCoordinates (N.vector p) ≠ -normalize (B k p) := by + obtain ⟨W,hW,hfW,_,N,hNa,hNb,havoid⟩ := A.phase_disk_normal_gluing_within i + hF hI hn houter e he hi univ isOpen_univ hD (subset_univ _) hU₀ hν hunit hnormal + hDs hDe hDU hDw hproj hanti C hC B hB hin hout hpair + exact ⟨W,hW,hfW,N,hNa,hNb,havoid⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d3865c7cb35d379749c1abc1f257cf4b6c2c572 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseDiskSupport.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhasePrimitiveSupport + +namespace OAI + +/-! Identify the analytic support with the closed geometric primitive disk. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseSurfaceSupport_image (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {C : Set M} (hC : IsClosed C) (hchart : C ⊆ (chart (i : M)).source) + (hphase : (chart (i : M)) '' C ⊆ e.source) : + A.phaseSurfaceSupport i e (e '' ((chart (i : M)) '' C)) = C := by + have he : e.symm '' (e '' ((chart (i : M)) '' C)) = (chart (i : M)) '' C := by + ext y + constructor + · rintro ⟨z,⟨q,hq,rfl⟩,rfl⟩ + simpa only [e.left_inv (hphase hq)] using hq + · intro hy + exact ⟨e y,⟨y,hy,rfl⟩,e.left_inv (hphase hy)⟩ + have hc : (chart (i : M)).symm '' ((chart (i : M)) '' C) = C := by + ext p + constructor + · rintro ⟨q,⟨x,hx,rfl⟩,rfl⟩ + simpa only [(chart (i : M)).left_inv (hchart hx)] using hx + · intro hp + exact ⟨chart (i : M) p,⟨p,hp,rfl⟩,(chart (i : M)).left_inv (hchart hp)⟩ + rw [phaseSurfaceSupport,he,hc,hC.closure_eq] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7a89e4b711a12caee99c3c9472e18ead926e35a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorControl.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.SecondFormNormalFields +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialSupport +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasLeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussInvariance + +namespace OAI + +/-! Exterior C2 control in the actual nonlinear phase chart, including +the closure of the exterior where its boundary is glued. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates GeometryPreservation 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 phaseRealChartMap_eventuallyEq (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {F G : M → Space} {p : JetPolynomial.Base} + (hp : T p ∈ (chart (i : M)).target) + (hFG : F =ᶠ[𝓝 ((chart (i : M)).symm (T p))] G) : + A.phaseRealChartMap i T F =ᶠ[𝓝 (baseEquiv p)] A.phaseRealChartMap i T G := by + have hsource := (chart (i : M)).map_target hp + have hz : F-G =ᶠ[𝓝 ((chart (i : M)).symm (T p))] 0 := by + filter_upwards [hFG] with q hq + simp only [Pi.sub_apply,hq,sub_self,Pi.zero_apply] + have he := A.jetChartMap_eventually_zero i hsource hz + rw [(chart (i : M)).right_inv hp] at he + rw [A.jetChartMap_sub] at he + have hg : A.jetChartMap i F =ᶠ[𝓝 (T p)] A.jetChartMap i G := by + filter_upwards [he] with q hq + exact sub_eq_zero.mp hq + have ht := hT.continuous.tendsto p + have hb := baseEquiv.symm.continuous.tendsto (baseEquiv p) + rw [baseEquiv.symm_apply_apply] at hb + exact hg.comp_tendsto (ht.comp hb) + + +lemma phase_profile_eq_on_exterior_closure (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {F G : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hG : ContMDiff planeModel spaceModel ∞ G) {O : Set JetPolynomial.Base} + (hO : ∀ p ∈ O, T p ∈ (chart (i : M)).target) + (hext : ∀ p ∈ O, F =ᶠ[𝓝 ((chart (i : M)).symm (T p))] G) + (z : ℝ) : + ∀ p ∈ closure O, realBoundaryProfile (A.phaseRealChartMap i T F) z (baseEquiv p) = + realBoundaryProfile (A.phaseRealChartMap i T G) z (baseEquiv p) := by + have he : EqOn (fun p => realBoundaryProfile (A.phaseRealChartMap i T F) z (baseEquiv p)) + (fun p => realBoundaryProfile (A.phaseRealChartMap i T G) z (baseEquiv p)) O := by + intro p hp + have hh := A.phaseRealChartMap_eventuallyEq i hT (hO p hp) (hext p hp) + have hd (v : SmallModes.Base) := RealModes.coordDeriv_germ hh v + have hdd (v w : SmallModes.Base) := RealModes.coordDeriv_germ (hd w) v + funext j + fin_cases j + · exact (hd SmallModes.dx).eq_of_nhds + · exact (hd SmallModes.dy).eq_of_nhds + · exact (hdd SmallModes.dy SmallModes.dy).eq_of_nhds + · exact (hdd SmallModes.dx SmallModes.dy).eq_of_nhds + · exact congrArg (fun v => z • v) (hdd SmallModes.dx SmallModes.dx).eq_of_nhds + exact he.closure ((realBoundaryProfile_smooth (A.phaseRealChartMap_smooth i hT hF) z).continuous.comp + baseEquiv.continuous) ((realBoundaryProfile_smooth (A.phaseRealChartMap_smooth i hT hG) z).continuous.comp + baseEquiv.continuous) + +lemma phase_real_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, + ‖realBoundaryProfile (A.phaseRealChartMap i T G) z (baseEquiv p)- + realBoundaryProfile (A.phaseRealChartMap i T F) z (baseEquiv p)‖ ≤ D*C := by + obtain ⟨D,hD,hbound⟩ := A.phase_profile_correction_bound i hT hS hSc + refine ⟨‖boundaryProfileMap‖*D,mul_nonneg (norm_nonneg _) hD,?_⟩ + intro F G hF hG C z hC hz hz1 hb p hp + rw [← A.phaseRealChartMap_profile i hT hG,← A.phaseRealChartMap_profile i hT hF,← map_sub] + exact (boundaryProfileMap.le_opNorm _).trans + ((mul_le_mul_of_nonneg_left (hbound F G hF hG C z hC hz hz1 hb p hp) + (norm_nonneg _)).trans_eq (mul_assoc _ _ _).symm) + +theorem phase_exterior_profile_bound_closure (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 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 JetPolynomial.Base, (∀ p ∈ O, T p ∈ (chart (i : M)).target) → + (∀ p ∈ O, V =ᶠ[𝓝 ((chart (i : M)).symm (T p))] G) → + ∀ p ∈ closure O ∩ S, + ‖realBoundaryProfile (A.phaseRealChartMap i T W) 1 (baseEquiv p)- + realBoundaryProfile (A.phaseRealChartMap i T F) 1 (baseEquiv p)‖ ≤ D*(b+c) := by + obtain ⟨D,hD,hbound⟩ := A.phase_real_profile_correction_bound i hT hS hSc + refine ⟨D,hD,?_⟩ + intro F G V W hF hG hV hW b c hb hc hGF hWV O hO hext p hp + have he := A.phase_profile_eq_on_exterior_closure i hT hV hG hO hext 1 p hp.1 + have hfirst := hbound V W hV hW c 1 hc zero_le_one le_rfl hWV p hp.2 + have hsecond := hbound F G hF hG b 1 hb zero_le_one le_rfl hGF p hp.2 + have ht := norm_sub_le_norm_sub_add_norm_sub (realBoundaryProfile (A.phaseRealChartMap i T W) 1 (baseEquiv p)) + (realBoundaryProfile (A.phaseRealChartMap i T V) 1 (baseEquiv p)) + (realBoundaryProfile (A.phaseRealChartMap i T F) 1 (baseEquiv p)) + rw [he] at ht hfirst + exact ht.trans ((add_le_add hfirst hsecond).trans_eq (by ring)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorDomain.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorDomain.lean new file mode 100644 index 0000000000000000000000000000000000000000..7abf6138fefeb62acd397c4953a6d948560accbe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorDomain.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Geometry.CurveSecondFields + +namespace OAI + +/-! Exterior comparison regions in the actual phase chart, including their +boundary points. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def phaseExteriorDomain (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (O : Set M) : + Set JetPolynomial.Base := + ((chart q).trans e) '' (O ∩ ((chart q).trans e).source) + +lemma phaseExteriorDomain_properties (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (O : Set M) : + ∀ y ∈ phaseExteriorDomain q e O, + e.symm y ∈ (chart q).target ∧ (chart q).symm (e.symm y) ∈ O := by + rintro y ⟨p,⟨hpO,hps⟩,rfl⟩ + have hpe : chart q p ∈ e.source := hps.2 + have he := e.left_inv hpe + change e.symm (e (chart q p)) ∈ (chart q).target ∧ + (chart q).symm (e.symm (e (chart q p))) ∈ O + rw [he,(chart q).left_inv hps.1] + exact ⟨(chart q).map_source hps.1,hpO⟩ + +lemma phaseExteriorDomain_closure (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (O : Set M) + {p : M} (hps : p ∈ ((chart q).trans e).source) (hpO : p ∈ closure O) : + e (chart q p) ∈ closure (phaseExteriorDomain q e O) := by + have hc : ContinuousAt ((chart q).trans e) p := ((chart q).trans e).continuousAt hps + exact mem_closure_image hc (((chart q).trans e).open_source.closure_inter ⟨hpO,hps⟩) + +namespace SmoothingAtlas +variable [IsManifold planeModel ∞ M] [CompactSpace M] (A : SmoothingAtlas M) + +lemma phase_gram_at_source (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} (hp : p ∈ ((chart (i : M)).trans e).source) (hw : A.weight i p ≠ 0) : + NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (A.phaseRealChartMap i e.symm F) + (baseEquiv (e (chart (i : M) p)))) + (SmallModes.coordDeriv SmallModes.dy (A.phaseRealChartMap i e.symm F) + (baseEquiv (e (chart (i : M) p)))) ≠ 0 := by + have hpe : chart (i : M) p ∈ e.source := hp.2 + apply A.phase_gram_ne_zero i e he hi hF + · simpa only [baseEquiv.symm_apply_apply] using e.map_source hpe + · rw [baseEquiv.symm_apply_apply,e.left_inv hpe,chartWeight, + indicator_of_mem ((chart (i : M)).map_source hp.1),(chart (i : M)).left_inv hp.1] + exact hw + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorPreservation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorPreservation.lean new file mode 100644 index 0000000000000000000000000000000000000000..12bd87b3c6590f4d68bbe01dd35cd6fe78811e1e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseExteriorPreservation.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CrossPhaseExteriorControl +import OAI.Geometry.SurfaceImmersion.Primitive.IntrinsicExteriorCrossings +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetAvoidance + +namespace OAI + +/-! Actual later-curve geometry is stable in its own fixed phase chart, +even when the exact correction uses a different smoothing atlas. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes GeometryPreservation VelocityFrame +variable {M X : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [TopologicalSpace X] [CompactSpace X] +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem compact_phase_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 : B.centers) {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {p : X → M} {q : X → JetPolynomial.Base} (hp : Continuous p) (hq : Continuous q) + {v : X → SmallModes.Base} (hv : Continuous v) + (O : Set M) (P : Set JetPolynomial.Base) + (hP : ∀ y ∈ P, T y ∈ (chart (i : M)).target) + (hPO : ∀ y ∈ P, (chart (i : M)).symm (T y) ∈ O) + (hpO : ∀ x, p x ∈ closure O) (hqP : ∀ x, q x ∈ closure P ∩ S) + (hD : ∀ x, NormalFrame.gramDet + (coordDeriv dx (B.phaseRealChartMap i T F) (baseEquiv (q x))) + (coordDeriv dy (B.phaseRealChartMap i T F) (baseEquiv (q x))) ≠ 0) + (hB : ∀ x, realSecondForm (B.phaseRealChartMap i T F) (v x) (v x) (baseEquiv (q x)) ≠ 0) + (havoid : ∀ x, spaceCoordinates (n.vector (p x)) ≠ + -normalize (realSecondForm (B.phaseRealChartMap i T F) (v x) (v x) (baseEquiv (q 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) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → ∀ x : X, + A.projectedNormalField W n.vector (p x) ≠ 0 ∧ + realSecondForm (B.phaseRealChartMap i T W) (v x) (v x) (baseEquiv (q x)) ≠ 0 ∧ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ≠ + -normalize (realSecondForm (B.phaseRealChartMap i T W) (v x) (v x) (baseEquiv (q x))) := by + obtain ⟨δ,hδ,havoid'⟩ := compact_actual_exterior_avoidance (B.phaseRealChartMap_smooth i hT hF) + (baseEquiv.continuous.comp hq) (spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp)) + hv hD hB havoid + obtain ⟨ρ,hρ,hcontrol⟩ := A.cross_phase_exterior_control B hF hI n houter i hT hS hSc hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV hext x + obtain ⟨hne,hn,hj⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV O P hP hPO hext + (p x) (hpO x) (q x) (hqP x) + exact ⟨hne,havoid' x _ (B.phaseRealChartMap_smooth i hT hW) _ hj hn⟩ + + +theorem compact_phase_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 : B.centers) {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {S : Set JetPolynomial.Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) + {p : X → M} {q : X → JetPolynomial.Base} (hp : Continuous p) (hq : Continuous q) + (O : Set M) (P : Set JetPolynomial.Base) + (hP : ∀ y ∈ P, T y ∈ (chart (i : M)).target) + (hPO : ∀ y ∈ P, (chart (i : M)).symm (T y) ∈ O) + (hpO : ∀ x, p x ∈ closure O) (hqP : ∀ x, q x ∈ closure P ∩ S) + (hD : ∀ x, NormalFrame.gramDet + (coordDeriv dx (B.phaseRealChartMap i T F) (baseEquiv (q x))) + (coordDeriv dy (B.phaseRealChartMap i T F) (baseEquiv (q x))) ≠ 0) + {v w : X → SmallModes.Base} (hv : Continuous v) (hw : Continuous w) + (hpositive : ∀ x, + 0 < realSecondForm (B.phaseRealChartMap i T F) (v x) (v x) + (baseEquiv (q x)) ⬝ᵥ spaceCoordinates (n.vector (p x)) ∧ + 0 < realSecondForm (B.phaseRealChartMap i T F) (w x) (w x) + (baseEquiv (q x)) ⬝ᵥ spaceCoordinates (n.vector (p x))) + (hcross : ∀ x, + 0 < orderedCrossing (B.phaseRealChartMap i T F) (v x) (w x) + (baseEquiv (q x)) (coordinateGaussianCurvature (realMetric (B.phaseRealChartMap i T F) dx dx) + (realMetric (B.phaseRealChartMap i T F) dx dy) + (realMetric (B.phaseRealChartMap i T F) dy dy) + (baseEquiv (q x))) ∧ + 0 < orderedCrossing (B.phaseRealChartMap i T F) (w x) (v x) + (baseEquiv (q x)) (coordinateGaussianCurvature (realMetric (B.phaseRealChartMap i T F) dx dx) + (realMetric (B.phaseRealChartMap i T F) dx dy) + (realMetric (B.phaseRealChartMap i T F) dy dy) + (baseEquiv (q 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) → + (∀ y ∈ O, V =ᶠ[𝓝 y] G) → + ∀ x : X, + (0 < realSecondForm (B.phaseRealChartMap i T W) (v x) (v x) + (baseEquiv (q x)) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x)) ∧ + 0 < realSecondForm (B.phaseRealChartMap i T W) (w x) (w x) + (baseEquiv (q x)) ⬝ᵥ + spaceCoordinates (A.unitProjectedNormalField W n.vector (p x))) ∧ + (0 < orderedCrossing (B.phaseRealChartMap i T W) (v x) (w x) + (baseEquiv (q x)) (coordinateGaussianCurvature (realMetric (B.phaseRealChartMap i T W) dx dx) + (realMetric (B.phaseRealChartMap i T W) dx dy) + (realMetric (B.phaseRealChartMap i T W) dy dy) + (baseEquiv (q x))) ∧ + 0 < orderedCrossing (B.phaseRealChartMap i T W) (w x) (v x) + (baseEquiv (q x)) (coordinateGaussianCurvature (realMetric (B.phaseRealChartMap i T W) dx dx) + (realMetric (B.phaseRealChartMap i T W) dx dy) + (realMetric (B.phaseRealChartMap i T W) dy dy) + (baseEquiv (q x)))) := by + have hread := B.phaseRealChartMap_smooth i hT hF + have hcoord := baseEquiv.continuous.comp hq + have hn := spaceCoordinates.continuous.comp (n.smooth.continuous.comp hp) + 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 (B.phaseRealChartMap i T F) + (a x) (a x) (baseEquiv (q x)) ⬝ᵥ spaceCoordinates (n.vector (p x))) : + ∀ x, realSecondForm (B.phaseRealChartMap i T F) (a x) (a x) + (baseEquiv (q 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.cross_phase_exterior_control B hF hI n houter i hT hS hSc hδ + refine ⟨ρ,hρ,?_⟩ + intro G V W hG hV hW b c hb hc hbc hGF hWV hext x + obtain ⟨_,hnorm,hjet⟩ := hcontrol G V W hG hV hW b c hb hc hbc hGF hWV O P hP hPO hext + (p x) (hpO x) (q x) (hqP x) + have hW' := B.phaseRealChartMap_smooth i hT 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/Atlas/PhaseFrameMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseFrameMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..11dbbf2e9b53962a5630e23f819e0c61efd6c868 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseFrameMargins.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalDenominatorMargins +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseReparametrization +import OAI.Geometry.Immersion.ClosedSurface.DenominatorBounds + +namespace OAI + +/-! Explicit reciprocal margins after the linear phase change. They depend +only polynomially on the phase covector and the original geometric margins. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry + +lemma phase_length_sq_le {ξ : Base} {C : ℝ} (hC : 0 ≤ C) (hξ : ‖ξ‖ ≤ C) : + ξ.1^2+ξ.2^2 ≤ 2*C^2 := by + have h1 : |ξ.1| ≤ C := by + exact (show |ξ.1| ≤ ‖ξ‖ by simpa only [Real.norm_eq_abs] using norm_fst_le ξ).trans hξ + have h2 : |ξ.2| ≤ C := by + exact (show |ξ.2| ≤ ‖ξ‖ by simpa only [Real.norm_eq_abs] using norm_snd_le ξ).trans hξ + have hs1 := (sq_le_sq₀ (abs_nonneg ξ.1) hC).mpr h1 + have hs2 := (sq_le_sq₀ (abs_nonneg ξ.2) hC).mpr h2 + rw [sq_abs] at hs1 hs2 + linarith + +lemma gramDet_phase {F : RField 4} (hF : ContDiff ℝ ∞ F) + {ξ : Base} (hξ : ξ ≠ 0) (p : Base) : + NormalFrame.gramDet (coordDeriv dx (F ∘ (phaseEquiv ξ hξ).symm) p) + (coordDeriv dy (F ∘ (phaseEquiv ξ hξ).symm) p) = + ((ξ.1^2+ξ.2^2)⁻¹)^2 * NormalFrame.gramDet + (coordDeriv dx F ((phaseEquiv ξ hξ).symm p)) + (coordDeriv dy F ((phaseEquiv ξ hξ).symm p)) := by + have hdet : ((phaseEquiv ξ hξ).symm dx).1 * ((phaseEquiv ξ hξ).symm dy).2 - + ((phaseEquiv ξ hξ).symm dx).2 * ((phaseEquiv ξ hξ).symm dy).1 = + (ξ.1^2+ξ.2^2)⁻¹ := by + have hn := (covector_length_sq_pos hξ).ne' + simp only [phaseEquiv_symm_apply,dx,dy] + field_simp + ring + have hh := gramDet_comp_linear hF (phaseEquiv ξ hξ).symm.toContinuousLinearMap p + simp only [ContinuousLinearEquiv.coe_coe] at hh + exact hh.trans (by rw [hdet]) + +theorem inverse_gram_phase_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + {ξ : Base} (hξ : ξ ≠ 0) {C K : ℝ} (hC : 0 ≤ C) (hK : 0 ≤ K) + (hξC : ‖ξ‖ ≤ C) (p : Base) + (hG : ‖(NormalFrame.gramDet (coordDeriv dx F ((phaseEquiv ξ hξ).symm p)) + (coordDeriv dy F ((phaseEquiv ξ hξ).symm p)))⁻¹‖ ≤ K) : + ‖(NormalFrame.gramDet (coordDeriv dx (F ∘ (phaseEquiv ξ hξ).symm) p) + (coordDeriv dy (F ∘ (phaseEquiv ξ hξ).symm) p))⁻¹‖ ≤ 4*C^4*K := by + rw [gramDet_phase hF hξ,mul_inv_rev,inv_pow,inv_inv,norm_mul, + Real.norm_of_nonneg (sq_nonneg _)] + calc + _ ≤ K*(2*C^2)^2 := mul_le_mul hG + (pow_le_pow_left₀ (by positivity) (phase_length_sq_le hC hξC) 2) (sq_nonneg _) hK + _ = _ := by ring + +theorem inverse_normal_phase_bound {F : RField 4} (hF : ContDiff ℝ ∞ F) + {ξ : Base} (hξ : ξ ≠ 0) {C K : ℝ} (hC : 0 ≤ C) (_hK : 0 ≤ K) + (hξC : ‖ξ‖ ≤ C) (p : Base) + (hImm : Function.Injective (fderiv ℝ F ((phaseEquiv ξ hξ).symm p))) + (hS : secondQuadratic (realSecondTensor F ((phaseEquiv ξ hξ).symm p)) (-ξ.2,ξ.1) ≠ 0) + (hN : ‖secondQuadratic (realSecondTensor F ((phaseEquiv ξ hξ).symm p)) (-ξ.2,ξ.1)‖⁻¹ ≤ K) : + ‖(realSecond (F ∘ (phaseEquiv ξ hξ).symm) p ⬝ᵥ + realSecond (F ∘ (phaseEquiv ξ hξ).symm) p)⁻¹‖ ≤ 16*C^8*K^2 := by + let S := secondQuadratic (realSecondTensor F ((phaseEquiv ξ hξ).symm p)) (-ξ.2,ξ.1) + have hSn : 0 < ‖S‖ := norm_pos_iff.mpr hS + have hSi : ‖(S ⬝ᵥ S)⁻¹‖ ≤ K^2 := by + have hh := norm_inv_dot_self_le hSn le_rfl + rw [← inv_pow] at hh + exact hh.trans (pow_le_pow_left₀ (inv_nonneg.mpr hSn.le) hN 2) + rw [realSecond_phase hF hξ p hImm,smul_dotProduct,dotProduct_smul] + simp only [smul_eq_mul,mul_inv_rev,inv_pow,inv_inv,norm_mul, + Real.norm_of_nonneg (sq_nonneg _)] + calc + _ ≤ K^2*((2*C^2)^2)*((2*C^2)^2) := by + gcongr + · exact phase_length_sq_le hC hξC + · exact phase_length_sq_le hC hξC + _ = _ := by ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseFrontierAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseFrontierAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..aade7482f909264dacb6112880fe2a6c713ef744 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseFrontierAvoidance.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseDiskTopology +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Atlas.PreferredNormalPhasePullback + +namespace OAI + +/-! Transfer the preserved normal condition on the actual boundary curve +to the frontier of the disk in phase coordinates. -/ +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] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +lemma frontier_avoidance {D : Set M} (hD : IsOpen D) + (hDs : closure D ⊆ (surfacePhaseChart (c.index : M) c.phase).source) + (hfront : c.carrier = frontier D) + {F : M → Space} (n : PreferredNormal F) + (hold : ∀ p ∈ c.carrier, c.second F p ≠ 0 ∧ + spaceCoordinates (n.vector p) ≠ -normalize (c.second F p)) : + ∀ x ∈ frontier ((surfacePhaseChart (c.index : M) c.phase) '' D), + realSecondForm (B.phaseRealChartMap c.index c.phase.symm F) dy dy x ≠ 0 ∧ + normalize (realSecondForm (B.phaseRealChartMap c.index c.phase.symm F) dy dy x) ≠ + -n.inPhase (c.index : M) c.phase x := by + let E := surfacePhaseChart (c.index : M) c.phase + have hK : IsCompact (closure D) := isClosed_closure.isCompact + have h := compact_phase_disk_geometry E hD hK hDs + intro x hx + rw [h.2.2.1] at hx + obtain ⟨p,hp,rfl⟩ := hx + have hpc : p ∈ c.carrier := hfront.symm ▸ hp + have hsec : c.second F p = realSecondForm (B.phaseRealChartMap c.index c.phase.symm F) + dy dy (E p) := c.second_eq F hpc + have hn : n.inPhase (c.index : M) c.phase (E p) = spaceCoordinates (n.vector p) := by + change spaceCoordinates (n.vector (E.symm (E p))) = _ + rw [E.left_inv (hDs (frontier_subset_closure hp))] + rw [← hsec,hn] + refine ⟨(hold p hpc).1,?_⟩ + intro he + apply (hold p hpc).2 + rw [he,neg_neg] + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..06bd3c897d748758e9f97fd58c3da02b6b63a9ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussBound.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussBound + +namespace OAI + +/-! A compact curvature bound depends on the prescribed metric in the +phase chart, before choosing any oscillatory realization. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_phase_gauss_bound (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + (g : SmoothMetric M) {C : Set SmallModes.Base} (hC : IsCompact C) + (hactive : ∀ x ∈ C, A.chartWeight i (T (baseEquiv.symm x)) ≠ 0) + (hdet : ∀ x ∈ C, A.phaseMetricRead i T g x 0 * A.phaseMetricRead i T g x 2 - + (A.phaseMetricRead i T g x 1)^2 ≠ 0) : + ∃ B : ℝ, 1 ≤ B ∧ ∀ F : M → Space, IsSmoothIsometricImmersion M g F → ∀ x ∈ C, + |coordinateGauss (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dx) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dy) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dy SmallModes.dy) x| ≤ B := by + have hm := A.phaseMetricRead_smooth i hT g + have hc := coordinateGauss_continuousOn (contDiff_pi.mp hm 0) (contDiff_pi.mp hm 1) + (contDiff_pi.mp hm 2) hdet + obtain ⟨B,hB⟩ := (hC.image_of_continuousOn hc.abs).bddAbove + refine ⟨max 1 B,le_max_left _ _,?_⟩ + intro F hF x hx + rw [A.phaseGauss_isometry i hT hF (hactive x hx)] + exact (hB (mem_image_of_mem _ hx)).trans (le_max_right _ _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussRepresentative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dd93d99be2612492a293d73281e89607415a4db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseGaussRepresentative.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseGaussBound +import OAI.Geometry.SurfaceImmersion.Correction.SmoothMetricGauss +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! The actual prescribed curvature has a globally smooth representative +on the compact phase region. Its choice and bound precede the loop. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem phase_gauss_representative (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + (g : SmoothMetric M) {C : Set SmallModes.Base} (hC : IsCompact C) + (hactive : ∀ x ∈ C, A.chartWeight i (T (baseEquiv.symm x)) ≠ 0) + (hdet : ∀ x ∈ C, A.phaseMetricRead i T g x 0 * A.phaseMetricRead i T g x 2 - + (A.phaseMetricRead i T g x 1)^2 ≠ 0) : + ∃ V : Set SmallModes.Base, IsOpen V ∧ C ⊆ V ∧ + ∃ k : SmallModes.Base → ℝ, ContDiff ℝ ∞ k ∧ + (∀ x ∈ V, k x = coordinateGauss (fun y => A.phaseMetricRead i T g y 0) + (fun y => A.phaseMetricRead i T g y 1) (fun y => A.phaseMetricRead i T g y 2) x) ∧ + ∃ B : ℝ, 1 ≤ B ∧ (∀ x ∈ C, |k x| ≤ B) ∧ + ∀ F : M → Space, IsSmoothIsometricImmersion M g F → ∀ x ∈ C, + coordinateGauss (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dx) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dy) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dy SmallModes.dy) x = k x := by + let D := fun x => A.phaseMetricRead i T g x 0 * A.phaseMetricRead i T g x 2 - + (A.phaseMetricRead i T g x 1)^2 + let U : Set SmallModes.Base := {x | D x ≠ 0} + have hm := A.phaseMetricRead_smooth i hT g + have hd : Continuous D := ((contDiff_pi.mp hm 0).mul (contDiff_pi.mp hm 2) |>.sub + ((contDiff_pi.mp hm 1).pow 2)).continuous + have hU : IsOpen U := isOpen_ne.preimage hd + have hCU : C ⊆ U := hdet + have hkg := coordinateGauss_smoothOn (contDiff_pi.mp hm 0) (contDiff_pi.mp hm 1) + (contDiff_pi.mp hm 2) (show ∀ x ∈ U, D x ≠ 0 from fun _ hx => hx) + obtain ⟨V,hV,hCV,_,k,hk,heq⟩ := CollarVelocity.compact_smooth_extension hC hU hCU hkg + obtain ⟨B,hB⟩ := (hC.image hk.continuous.abs).bddAbove + refine ⟨V,hV,hCV,k,hk,heq,max 1 B,le_max_left _ _,?_,?_⟩ + · intro x hx + exact (hB (mem_image_of_mem _ hx)).trans (le_max_right _ _) + · intro F hF x hx + rw [A.phaseGauss_isometry i hT hF (hactive x hx)] + exact (heq (hCV hx)).symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMarginCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMarginCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..16247b30807b15b20613d35a58418ee9a0a4c355 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMarginCompact.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.NoncriticalPhaseBudgets +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseNeighborhood +import OAI.Geometry.Immersion.ClosedSurface.DenominatorBounds +import OAI.Geometry.SurfaceImmersion.Atlas.RestrictedPhasePartition + +namespace OAI + +/-! A relative normal-length margin places every relevant point in a fixed +compact noncritical region, before the immersion or its fast scale is selected. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +def phaseMarginCompact {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) (ε : ℝ) : Compacts Base := + ⟨(K : Set Base) ∩ {x | ε ≤ 4*‖phaseDerivative φ x‖^2}, + K.isCompact.inter_right (isClosed_le continuous_const + (continuous_const.mul ((continuous_phaseDerivative hφ).norm.pow 2)))⟩ + +lemma phaseMarginCompact_noncritical {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) {ε : ℝ} (hε : 0 < ε) {x : Base} + (hx : x ∈ (phaseMarginCompact hφ K ε : Set Base)) : phaseDerivative φ x ≠ 0 := by + intro hz + have hh : ε ≤ 4*‖phaseDerivative φ x‖^2 := hx.2 + rw [hz,norm_zero] at hh + norm_num at hh + exact (not_le_of_gt hε) hh + +lemma mem_phaseMarginCompact_of_relative_margin {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) {ε : ℝ} {x : Base} (hx : x ∈ (K : Set Base)) + (B : Fin 3 → RVec 4) (hB : B ≠ 0) + (hm : ε*‖B‖ ≤ ‖secondQuadratic B (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖) : + x ∈ (phaseMarginCompact hφ K ε : Set Base) := + ⟨hx,relative_margin_covector_sq B (phaseDerivative φ x) hB hm⟩ + +theorem fixed_margin_phase_partition {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K : Compacts Base) {ε : ℝ} (hε : 0 < ε) : + ∃ (t : Finset (phaseMarginCompact hφ K ε)) (c : t → NoncriticalPhaseChart φ) + (J : ℕ → ℝ), + (∀ m, 1 ≤ J m) ∧ + (∀ i m j, j ≤ m → ∀ x ∈ (c i).chart.source, + ‖iteratedFDerivWithin ℝ j (c i).chart (c i).chart.source x‖ ≤ J m) ∧ + (∀ i m j, j ≤ m → ∀ x ∈ (c i).chart.target, + ‖iteratedFDerivWithin ℝ j (c i).chart.symm (c i).chart.target x‖ ≤ J m) ∧ + Nonempty (PhasePartitions.CompactPhasePartition t + (phaseMarginCompact hφ K ε : Set Base) (fun i => (c i).chart.source)) := by + obtain ⟨t,c,J,hcover,hJ,hf,hi⟩ := noncritical_phase_cover_budgets hφ + (phaseMarginCompact hφ K ε) (fun _ hx => phaseMarginCompact_noncritical hφ K hε hx) + exact ⟨t,c,J,hJ,hf,hi,PhasePartitions.exists_compact_phase_partition + (phaseMarginCompact hφ K ε).isCompact _ (fun i => (c i).chart.open_source) hcover⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricConvexity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricConvexity.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d1305e75c0580f55d937c87b0fc63f544c10b5f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricConvexity.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricReadGerms +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Atlas.ImmersedAtlasNormal +import OAI.Geometry.SurfaceImmersion.Geometry.MetricConnectionNaturality +import OAI.Geometry.SurfaceImmersion.Atlas.RealPhaseChart + +namespace OAI + +/-! Strict convexity of the prescribed surface metric gives the exact +positive transverse Hessian used by the actual phase-coordinate loop. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry SurfaceJetCoordinates + +lemma coordinateMetricHessian_congr_germ {h k : Base → PhaseMean.Tensor} {p : Base} + (hh : h =ᶠ[𝓝 p] k) (phi : Base → ℝ) (v w : Base) : + coordinateMetricHessian h phi p v w = coordinateMetricHessian k phi p v w := by + simp only [coordinateMetricHessian,hh.eq_of_nhds,hh.fderiv_eq] + +namespace FiniteOrderSmoothing.SmoothingAtlas +open JetPolynomial +local instance phaseConvexFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseConvexFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phaseConvexDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseConvexDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseConvexSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseConvexSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable (A : SmoothingAtlas M) + +lemma realChartMap_metric_germ (i : A.centers) {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : M} (hp : A.weight i p ≠ 0) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + inducedCoordinateMetric (A.realChartMap i F) =ᶠ[𝓝 (coordinateChart (i : M) p)] + coordinateMetric g (i : M) := by + have hs := A.weight_support i (subset_tsupport _ hp) + have hw : A.chartWeight i (baseEquiv.symm (coordinateChart (i : M) p)) ≠ 0 := by + rw [show coordinateChart (i : M) p = baseEquiv (chart (i : M) p) from rfl, + baseEquiv.symm_apply_apply] + rw [chartWeight,indicator_of_mem ((chart (i : M)).map_source hs),(chart (i : M)).left_inv hs] + exact hp + have hmetric : g.inner = inducedTensor F := by + funext q; ext v w; exact (hF.2 q v w).symm + have hc : Continuous (fun y : SmallModes.Base => A.chartWeight i (baseEquiv.symm y)) := + (A.chartWeight_smooth i).continuous.comp baseEquiv.symm.continuous + have hr : inducedCoordinateMetric (A.realChartMap i F) =ᶠ[𝓝 (coordinateChart (i : M) p)] + A.tensorPlaneRead i g.inner := by + filter_upwards [(isOpen_ne.preimage hc).mem_nhds hw] with y hy + have hh := A.metric_read_on_weight i hF.1 hy + rw [← hmetric] at hh + change realMetricTensor (A.jetChartMap i F ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry (baseEquiv.symm y)) = _ at hh + have hb : planeCoordinateIsometry (baseEquiv.symm y) = y := by + change baseEquiv (baseEquiv.symm y) = y + exact baseEquiv.apply_symm_apply y + rw [hb] at hh + exact hh + exact hr.trans (A.tensorPlaneRead_metric_germ g i hs ho) + +theorem phase_hessian_positive_of_metric (i : A.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (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) + {phi : SmallModes.Base → ℝ} (hphi : ContDiff ℝ ∞ phi) + (hphase : ∀ x, (realPhaseChart e x).1 = phi x) + {p : M} (hp : p ∈ (surfacePhaseChart (i : M) e).source) (hw : A.weight i p ≠ 0) + (hpositive : ∀ v : SmallModes.Base, v ≠ 0 → + 0 < coordinateMetricHessian (coordinateMetric g (i : M)) phi (coordinateChart (i : M) p) v v) : + 0 < coordinateMetricHessian (inducedCoordinateMetric (A.phaseRealChartMap i e.symm F)) + Prod.fst (baseEquiv (e (chart (i : M) p))) dy dy := by + let er := realPhaseChart e + let x := baseEquiv (e (chart (i : M) p)) + have hx : x ∈ er.target := by + change baseEquiv.symm (baseEquiv (e (chart (i : M) p))) ∈ e.target + rw [baseEquiv.symm_apply_apply] + exact e.map_source hp.2 + have hback : er.symm x = coordinateChart (i : M) p := by + change baseEquiv (e.symm (baseEquiv.symm (baseEquiv (e (chart (i : M) p))))) = _ + rw [baseEquiv.symm_apply_apply] + have hps : chart (i : M) p ∈ e.source := hp.2 + exact (congrArg baseEquiv (e.left_inv hps)).trans (show baseEquiv (chart (i : M) p) = coordinateChart (i : M) p from rfl) + have her := realPhaseChart_smooth e he + have hir := realPhaseChart_symm_smooth e hi + have hcomp : phi ∘ er.symm =ᶠ[𝓝 x] Prod.fst := by + filter_upwards [er.open_target.mem_nhds hx] with y hy + change phi (er.symm y) = y.1 + rw [← hphase,er.right_inv hy] + have hdet : coordDet (fderiv ℝ er.symm x) ≠ 0 := + coordDet_fderiv_ne_zero_of_local_inverse er.open_target er.open_source hir.contDiffOn + her.contDiffOn er.symm.mapsTo (fun y hy => er.right_inv hy) hx + have hg := A.planeRead_gram_of_immersion hF.1 (IsSmoothIsometricImmersion.mfderiv_injective hF) + houter i (subset_tsupport _ hw) + have hI : Function.Injective (fderiv ℝ (A.realChartMap i F) (er.symm x)) := by + rw [hback] + exact injective_of_gramDet_ne_zero _ hg + have hH := phase_chart_hessian_dy (A.realChartMap_smooth i hF.1) hphi hir x hcomp hI hdet + have hmap : A.phaseRealChartMap i e.symm F = A.realChartMap i F ∘ er.symm := by + funext y + simp only [phaseRealChartMap,realChartMap,Function.comp_apply,er,realPhaseChart_symm_apply] + have hb : (planeCoordinateIsometry : JetPolynomial.Base → SmallModes.Base) = baseEquiv := rfl + have hbs : (planeCoordinateIsometry.symm : SmallModes.Base → JetPolynomial.Base) = baseEquiv.symm := rfl + rw [hb,hbs,baseEquiv.symm_apply_apply] + rw [hmap,hH,hback, + coordinateMetricHessian_congr_germ (A.realChartMap_metric_germ i hF hw (houter i p (subset_tsupport _ hw)))] + apply hpositive + have hI' := inverse_chart_derivative_injective er her hir hx + intro hz + have hh : (dy : SmallModes.Base) = 0 := hI' (hz.trans (map_zero _).symm) + exact (show (dy : SmallModes.Base) ≠ 0 by simp [dy]) hh + +end FiniteOrderSmoothing.SmoothingAtlas +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricPositive.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricPositive.lean new file mode 100644 index 0000000000000000000000000000000000000000..142378d8645269cd33ea29b12e1ce1095701214a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricPositive.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorPullback +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetMargins + +namespace OAI + +/-! Positivity of the prescribed metric survives the actual inverse phase +chart. In particular its curvature denominator is nonzero on the active +chart locus. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseMetricRead_positive (i : A.centers) (g : SmoothMetric M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : JetPolynomial.Base} (hp : p ∈ e.target) (hactive : A.chartWeight i (e.symm p) ≠ 0) : + 0 < A.phaseMetricRead i e.symm g (baseEquiv p) 0 ∧ + 0 < A.phaseMetricRead i e.symm g (baseEquiv p) 0 * + A.phaseMetricRead i e.symm g (baseEquiv p) 2 - + (A.phaseMetricRead i e.symm g (baseEquiv p) 1)^2 := by + have hpt : e.symm p ∈ (A.chartWeightCompact i : Set JetPolynomial.Base) := by + rw [← A.chartWeight_tsupport i] + exact subset_tsupport (A.chartWeight i) hactive + have hmode : planeCoordinateIsometry (e.symm p) ∈ + (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + ⟨e.symm p,hpt,rfl⟩ + have hm := A.tensorPlaneRead_metric g i hmode + have hpositive := coordinateMetric_positive g (i : M) (A.modeSupport_subset_coordinateDomain i hmode) + have hold : 0 < A.tensorChartRead i g.inner (e.symm p) 0 ∧ + 0 < A.tensorChartRead i g.inner (e.symm p) 0 * A.tensorChartRead i g.inner (e.symm p) 2 - + (A.tensorChartRead i g.inner (e.symm p) 1)^2 := by + rw [← hm] at hpositive + simpa only [tensorPlaneRead,Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] using hpositive + 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 hcomp : (fderiv ℝ e (e.symm p)).comp (fderiv ℝ e.symm p) = + ContinuousLinearMap.id ℝ JetPolynomial.Base := by + rw [← fderiv_comp p (he.differentiable (by simp) _) (hi.differentiable (by simp) _), + hinv.fderiv_eq,fderiv_id] + have hdi : Function.Injective (fderiv ℝ e.symm p) := by + intro u v huv + have hh := congrArg (fderiv ℝ e (e.symm p)) huv + change ((fderiv ℝ e (e.symm p)).comp (fderiv ℝ e.symm p)) u = + ((fderiv ℝ e (e.symm p)).comp (fderiv ℝ e.symm p)) v at hh + simpa only [hcomp,ContinuousLinearMap.id_apply] using hh + have hL : Function.Injective (tensorCoordinateDerivative e.symm p) := + planeCoordinateIsometry.injective.comp (hdi.comp planeCoordinateIsometry.symm.injective) + have hh := PhaseMean.positive_pullback (tensorCoordinateDerivative e.symm p) hL hold + simpa only [phaseMetricRead,baseEquiv.symm_apply_apply,tensorCoordinatePullbackValue] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..b903232b50e69dc217153e6de33a2efa2ce68259 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRead.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricRead +import OAI.Geometry.SurfaceImmersion.Atlas.JetMetricCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Atlas.TensorCoordinatePullbackBounds +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussInvariance + +namespace OAI + +/-! The metric and intrinsic Gauss expression in phase coordinates are +fixed by the prescribed global metric, independently of its isometric +realization. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates JetPolynomial +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def phaseMetricRead (i : A.centers) (T : JetPolynomial.Base → JetPolynomial.Base) + (g : SmoothMetric M) (x : SmallModes.Base) : PhaseMean.Tensor := + tensorCoordinatePullbackValue T (baseEquiv.symm x) + (A.tensorChartRead i g.inner (T (baseEquiv.symm x))) + +lemma phaseMetricRead_smooth (i : A.centers) {T : JetPolynomial.Base → JetPolynomial.Base} + (hT : ContDiff ℝ ∞ T) (g : SmoothMetric M) : ContDiff ℝ ∞ (A.phaseMetricRead i T g) := + ((tensorCoordinatePullbackValue_smooth hT).clm_apply + ((A.tensorChartRead_smooth i g.contMDiff).comp hT)).comp baseEquiv.symm.contDiff + +lemma phaseMetricRead_isometry (i : A.centers) {T : JetPolynomial.Base → JetPolynomial.Base} + (hT : ContDiff ℝ ∞ T) {g : SmoothMetric M} {F : M → Space} + (hF : IsSmoothIsometricImmersion M g F) {p : JetPolynomial.Base} + (hp : A.chartWeight i (T p) ≠ 0) : + realMetricTensor (A.phaseRealChartMap i T F) (baseEquiv p) = + A.phaseMetricRead i T g (baseEquiv p) := by + have hm : g.inner = inducedTensor F := by + funext q + ext v w + exact (hF.2 q v w).symm + change realMetricTensor ((A.jetChartMap i F ∘ T) ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry p) = _ + rw [metric_coordinate_pullback (A.jetChartMap_smooth i hF.1) hT p, + A.metric_read_on_weight i hF.1 hp,← hm] + simp only [phaseMetricRead,baseEquiv.symm_apply_apply] + +lemma phaseMetricRead_isometry_germ (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : SmallModes.Base} (hp : A.chartWeight i (T (baseEquiv.symm p)) ≠ 0) : + realMetricTensor (A.phaseRealChartMap i T F) =ᶠ[𝓝 p] A.phaseMetricRead i T g := by + have hc : Continuous (fun x : SmallModes.Base => A.chartWeight i (T (baseEquiv.symm x))) := + (A.chartWeight_smooth i).continuous.comp (hT.continuous.comp baseEquiv.symm.continuous) + filter_upwards [((isOpen_ne : IsOpen {r : ℝ | r ≠ 0}).preimage hc).mem_nhds hp] with x hx + have hh := A.phaseMetricRead_isometry i hT hF (p := baseEquiv.symm x) hx + rw [baseEquiv.apply_symm_apply] at hh + exact hh + +lemma phaseGauss_isometry (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : SmallModes.Base} (hp : A.chartWeight i (T (baseEquiv.symm p)) ≠ 0) : + coordinateGauss (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dx) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dx SmallModes.dy) + (realMetric (A.phaseRealChartMap i T F) SmallModes.dy SmallModes.dy) p = + coordinateGauss (fun x => A.phaseMetricRead i T g x 0) + (fun x => A.phaseMetricRead i T g x 1) (fun x => A.phaseMetricRead i T g x 2) p := by + have hg := A.phaseMetricRead_isometry_germ i hT hF hp + apply coordinateGauss_germ + · exact hg.mono (fun x hx => congrFun hx 0) + · exact hg.mono (fun x hx => congrFun hx 1) + · exact hg.mono (fun x hx => congrFun hx 2) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegion.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegion.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec97b675dde210ac16f5f513f170dbe0fa3a44d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegion.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve + +namespace OAI + +/-! An open phase region inside the fixed atlas patch and the uniform +coordinate radius used by the metric convexity estimate. -/ +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] +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem phase_metric_region (j : B.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {K : Set M} (hKs : K ⊆ (surfacePhaseChart (j : M) e).source) + (hactive : ∀ p ∈ K, B.weight j p ≠ 0) {r : ℝ} + (hsmall : ∀ p ∈ K, ‖coordinateChart (j : M) p-coordinateChart (j : M) (j : M)‖ < r) : + ∃ Ω : Set Base, IsOpen Ω ∧ (surfacePhaseChart (j : M) e) '' K ⊆ Ω ∧ + Ω ⊆ (surfacePhaseChart (j : M) e).target ∧ + ∀ x ∈ Ω, B.weight j ((surfacePhaseChart (j : M) e).symm x) ≠ 0 ∧ + ‖coordinateChart (j : M) ((surfacePhaseChart (j : M) e).symm x)- + coordinateChart (j : M) (j : M)‖ < r := by + let E := surfacePhaseChart (j : M) e + let P := {p : M | B.weight j p ≠ 0} ∩ + ((coordinateChart (j : M)).source ∩ (coordinateChart (j : M)) ⁻¹' + Metric.ball (coordinateChart (j : M) (j : M)) r) + have hP : IsOpen P := (isOpen_ne.preimage (B.weight_smooth j).continuous).inter + ((coordinateChart (j : M)).isOpen_inter_preimage Metric.isOpen_ball) + let W := E.source ∩ P + have hW : IsOpen W := E.open_source.inter hP + let Ω := E '' W + refine ⟨Ω,E.isOpen_image_of_subset_source hW inter_subset_left,?_,?_,?_⟩ + · rintro x ⟨p,hp,rfl⟩ + refine ⟨p,⟨hKs hp,hactive p hp,?_,?_⟩,rfl⟩ + · have hs : p ∈ (chart (j : M)).source := (hKs hp).1 + simpa only [coordinateChart_source,chart_source] using hs + · simpa only [Set.mem_preimage,Metric.mem_ball,dist_eq_norm] using hsmall p hp + · rintro x ⟨p,hp,rfl⟩ + exact E.map_source hp.1 + · rintro x ⟨p,hp,rfl⟩ + rw [E.left_inv hp.1] + exact ⟨hp.2.1,by simpa only [Set.mem_preimage,Metric.mem_ball,dist_eq_norm] using hp.2.2.2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..1822e30b8f1e30166f5ba36dc92e3285fbd8b7b2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseMetricRegularity.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseMetricRead +import OAI.Geometry.SurfaceImmersion.Geometry.PureRadialGauss + +namespace OAI + +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes SurfaceJetCoordinates NormalFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma phaseMetricRead_isometry_det (i : A.centers) + {T : JetPolynomial.Base → JetPolynomial.Base} (hT : ContDiff ℝ ∞ T) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + {p : SmallModes.Base} (hp : A.chartWeight i (T (baseEquiv.symm p)) ≠ 0) : + gramDet (SmallModes.coordDeriv SmallModes.dx (A.phaseRealChartMap i T F) p) + (SmallModes.coordDeriv SmallModes.dy (A.phaseRealChartMap i T F) p) = + A.phaseMetricRead i T g p 0 * A.phaseMetricRead i T g p 2 - + (A.phaseMetricRead i T g p 1)^2 := by + have hm := A.phaseMetricRead_isometry i hT hF (p := baseEquiv.symm p) hp + rw [baseEquiv.apply_symm_apply] at hm + have hh := congrArg (fun H : PhaseMean.Tensor => H 0*H 2-(H 1)^2) hm + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +namespace ClosedSurfaceR4.RealModes +open SmallModes NormalFrame +lemma coordinateGauss_eq_curvature_mul (F : RField 4) (p : Base) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p = + coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p * + gramDet (coordDeriv dx F p) (coordDeriv dy F p) := by + change _ = (_ / gramDet (coordDeriv dx F p) (coordDeriv dy F p)) * _ + exact (div_mul_cancel₀ _ hD).symm +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalLift.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalLift.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8bc5e8681511802837ddcc29ae13d1fa0376a36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalLift.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartNormalField + +namespace OAI + +/-! Pull a local normal field in the phase coordinates back to the surface. +The result is smooth, unit length and normal on its actual chart domain. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def phaseNormalLift (i : A.centers) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (n : SmallModes.Base → NormalFrame.Vec) : M → Space := + fun p => spaceCoordinates.symm (n (baseEquiv (e (chart (i : M) p)))) + +theorem phaseNormalLift_properties (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {U : Set SmallModes.Base} {W : Set M} {n : SmallModes.Base → NormalFrame.Vec} + (hn : ContDiffOn ℝ ∞ n U) (hnunit : ∀ x ∈ U, n x ⬝ᵥ n x = 1) + (hnnormal : ∀ x ∈ U, ∀ v : SmallModes.Base, + SmallModes.coordDeriv v (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n x = 0) + (hW : W ⊆ (chart (i : M)).source) + (hWe : MapsTo (chart (i : M)) W e.source) + (hWU : MapsTo (fun p => baseEquiv (e (chart (i : M) p))) W U) + (houter : ∀ p ∈ W, A.outer i =ᶠ[𝓝 p] fun _ => (1 : ℝ)) : + ContMDiffOn planeModel spaceModel ∞ (A.phaseNormalLift i e n) W ∧ + (∀ p ∈ W, ‖A.phaseNormalLift i e n p‖ = 1) ∧ + ∀ p ∈ W, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (A.phaseNormalLift i e n p) = 0 := by + have hcoord : ContMDiffOn planeModel 𝓘(ℝ,SmallModes.Base) ∞ + (fun p => baseEquiv (e (chart (i : M) p))) W := + (baseEquiv.contDiff.comp he).contMDiff.comp_contMDiffOn ((chart_smooth (i : M)).mono hW) + have hlift := spaceCoordinates.symm.contDiff.contMDiff.comp_contMDiffOn + (hn.contMDiffOn.comp hcoord hWU) + refine ⟨hlift,?_,?_⟩ + · intro p hp + exact norm_coordinate_inverse_of_dot_self (hnunit _ (hWU hp)) + · intro p hp v + exact A.phase_chart_normal_of_outer i hF e he hi (hW hp) (houter p hp) (hWe hp) + (n (baseEquiv (e (chart (i : M) p)))) (hnnormal _ (hWU hp)) v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..aeaab0905e66a835497b881a659724c5e6eb5f1d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalNeighborhood.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseNormalLift +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation + +namespace OAI + +/-! The local exact normal defines a genuine smooth unit normal on an +open surface neighborhood of the closed primitive disk. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma phaseNormalLift_coordinates (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (ν : SmallModes.Base → NormalFrame.Vec) (p : M) : + spaceCoordinates (A.phaseNormalLift i e ν p) = ν (baseEquiv (e (chart (i : M) p))) := + spaceCoordinates.apply_symm_apply _ + +theorem phase_normal_neighborhood (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {U₀ : Set SmallModes.Base} (hU₀ : IsOpen U₀) {ν : SmallModes.Base → NormalFrame.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) + {K : Set M} + (hKs : K ⊆ (chart (i : M)).source) + (hKe : MapsTo (chart (i : M)) K e.source) + (hKU : MapsTo (fun p => baseEquiv (e (chart (i : M) p))) K U₀) + (hKw : ∀ p ∈ K, A.weight i p ≠ 0) : + ∃ U : Set M, IsOpen U ∧ K ⊆ U ∧ U ⊆ (chart (i : M)).source ∧ + MapsTo (chart (i : M)) U e.source ∧ + MapsTo (fun p => baseEquiv (e (chart (i : M) p))) U U₀ ∧ + ContMDiffOn planeModel spaceModel ∞ (A.phaseNormalLift i e ν) U ∧ + (∀ p ∈ U, ‖A.phaseNormalLift i e ν p‖ = 1) ∧ + ∀ p ∈ U, ∀ v : TangentSpace planeModel p, + inner ℝ (surfaceDifferential F p v) (A.phaseNormalLift i e ν p) = 0 := by + let V := e.source ∩ (fun x => baseEquiv (e x)) ⁻¹' U₀ + have hV : IsOpen V := e.open_source.inter + (hU₀.preimage (baseEquiv.continuous.comp he.continuous)) + let U := ((chart (i : M)).source ∩ (chart (i : M)) ⁻¹' V) ∩ {p | A.weight i p ≠ 0} + have hU : IsOpen U := ((chart (i : M)).isOpen_inter_preimage hV).inter + (isOpen_ne.preimage (A.weight_smooth i).continuous) + have hKU' : K ⊆ U := fun p hp => ⟨⟨hKs hp,⟨hKe hp,hKU hp⟩⟩,hKw p hp⟩ + have hUs : U ⊆ (chart (i : M)).source := fun _ hp => hp.1.1 + have hUe : MapsTo (chart (i : M)) U e.source := fun _ hp => hp.1.2.1 + have hUU : MapsTo (fun p => baseEquiv (e (chart (i : M) p))) U U₀ := fun _ hp => hp.1.2.2 + obtain ⟨hs,hu,hn⟩ := A.phaseNormalLift_properties i hF e he hi hν hunit hnormal hUs hUe hUU + (fun p hp => A.outer_eventually_one_of_weight_ne_zero i hp.2) + exact ⟨U,hU,hKU',hUs,hUe,hUU,hs,hu,hn⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalTripleMargin.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalTripleMargin.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6c3dd7841d1ad5425453396be0590fee32f374b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseNormalTripleMargin.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RealPhaseChart +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartNormalTransport +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveNormalCoordinates + +namespace OAI + +/-! The normal triple of the actual inverse-chart map controls the old +coordinate immersion and second form with a fixed compact-chart constant. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetVelocityCoordinates SurfaceVelocityFamily.Loop SurfaceJetCoordinates RealModes + +lemma normalTriple_secondTensor_margin {F : SmallModes.Base → RealModes.RVec 4} + (hF : ContDiff ℝ ∞ F) (p : JetPolynomial.Base) {c : ℝ} + (hN : c < ‖realNormalPart + (primitiveNormalTriple (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p 0) + (primitiveNormalTriple (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p 1) + (primitiveNormalTriple (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) p 2)‖) : + c < ‖realSecondTensor F (baseEquiv p)‖ := by + rw [primitiveNormalTriple_chart hF] at hN + change c < ‖realSecondForm F SmallModes.dy SmallModes.dy (baseEquiv p)‖ at hN + exact hN.trans_le (norm_le_pi_norm (realSecondTensor F (baseEquiv p)) (2 : Fin 3)) + +theorem compact_phase_normalTriple_margin + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {K : Set JetPolynomial.Base} (hK : IsCompact K) (hKS : K ⊆ e.source) : + ∃ D : ℝ, 0 < D ∧ ∀ (H : JetPolynomial.Base → Space), ContDiff ℝ ∞ H → + ∀ x ∈ K, ∀ c : ℝ, 0 < c → + (let J := primitiveNormalTriple (H ∘ e.symm) (e x) + NormalFrame.gramDet (J 0) (J 1) ≠ 0 ∧ c < ‖realNormalPart (J 0) (J 1) (J 2)‖) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ H ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry x)) ∧ + c/D < ‖realSecondTensor (spaceCoordinates ∘ H ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry x)‖ := by + let er := realPhaseChart e + have her := realPhaseChart_smooth e he + have hir := realPhaseChart_symm_smooth e hi + obtain ⟨D,hD,hd⟩ := PhaseGeometry.compact_phase_chart_normal_margin er her hir + (hK.image planeCoordinateIsometry.continuous) (by + rintro _ ⟨x,hx,rfl⟩ + change planeCoordinateIsometry.symm (planeCoordinateIsometry x) ∈ e.source + simpa only [LinearIsometryEquiv.symm_apply_apply] using hKS hx) + refine ⟨D,hD,?_⟩ + intro H hH x hx c hc hn + let W := spaceCoordinates ∘ H ∘ planeCoordinateIsometry.symm + let V := W ∘ er.symm + have hW : ContDiff ℝ ∞ W := spaceCoordinates.contDiff.comp (hH.comp planeCoordinateIsometry.symm.contDiff) + have hV : ContDiff ℝ ∞ V := hW.comp hir + have hbase (q : JetPolynomial.Base) : baseEquiv q = planeCoordinateIsometry q := rfl + have hrepr : (fun q => JetVelocityCoordinates.toEuclidean (V (baseEquiv q))) = H ∘ e.symm := by + funext q + simp only [V,W,er,hbase,realPhaseChart_symm_apply,Function.comp_apply, + LinearIsometryEquiv.symm_apply_apply,JetVelocityCoordinates.toEuclidean,ContinuousLinearEquiv.symm_apply_apply] + have htriple := hn + rw [← hrepr] at htriple + have hgood := good_phase_of_primitive_normal hV (e x) htriple.1 + (norm_pos_iff.mp (hc.trans htriple.2)) + have hmargin := normalTriple_secondTensor_margin hV (e x) htriple.2 + rw [hbase] at hgood hmargin + have hrel : ∀ y ∈ er.source, W y = V (er y) := by + intro y hy + change W y = W (er.symm (er y)) + rw [er.left_inv hy] + have hout := hd W V hW hV hrel (planeCoordinateIsometry x) ⟨x,hx,rfl⟩ + (by simpa only [er,realPhaseChart_apply,LinearIsometryEquiv.symm_apply_apply] using hgood.1) + c (by simpa only [er,realPhaseChart_apply,LinearIsometryEquiv.symm_apply_apply] using hmargin) + exact hout + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOrdinaryCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOrdinaryCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..733ed175f53a9ad735f785ca4d5f4680f84603c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOrdinaryCoordinates.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCurvePairGeometry + +namespace OAI + +/-! The identity phase recovers ordinary surface coordinates. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates RealModes SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma surfacePhaseChart_refl_apply (q p : M) : + surfacePhaseChart q (OpenPartialHomeomorph.refl JetPolynomial.Base) p = coordinateChart q p := rfl + +lemma surfacePhaseChart_refl_symm_apply (q : M) (x : SmallModes.Base) : + (surfacePhaseChart q (OpenPartialHomeomorph.refl JetPolynomial.Base)).symm x = + (coordinateChart q).symm x := by + simp [surfacePhaseChart_symm_apply,FiniteOrderSmoothing.chart,coordinateChart_symm_apply, + coordinateInverse,planeModel,baseEquiv,planeCoordinates] + +lemma surfacePhaseChart_refl_source (q : M) : + (surfacePhaseChart q (OpenPartialHomeomorph.refl JetPolynomial.Base)).source = + (coordinateChart q).source := by + simp [surfacePhaseChart,FiniteOrderSmoothing.chart,coordinateChart] + +lemma surfacePhaseMap_refl (q : M) (F : M → Space) : + surfacePhaseMap q (OpenPartialHomeomorph.refl JetPolynomial.Base) F = coordinateMap F q := by + funext x + simp only [surfacePhaseMap,Function.comp_apply,surfacePhaseChart_refl_symm_apply, + coordinateChart_symm_apply] + rfl + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOuterImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOuterImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..50220af0f69da464bc1d685a3dddd7ae24960c72 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseOuterImmersion.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.OuterPhaseConvexity + +namespace OAI + +/-! The exact phase map remains an immersion on the full outer plateau. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates SmallModes RealModes PhaseGeometry +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_eq_real_comp (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) : + A.phaseRealChartMap i e.symm F = A.realChartMap i F ∘ (realPhaseChart e).symm := by + funext y + simp only [phaseRealChartMap,realChartMap,Function.comp_apply,realPhaseChart_symm_apply] + have hb : (planeCoordinateIsometry : JetPolynomial.Base → SmallModes.Base) = baseEquiv := rfl + have hbs : (planeCoordinateIsometry.symm : SmallModes.Base → JetPolynomial.Base) = baseEquiv.symm := rfl + rw [hb,hbs,baseEquiv.symm_apply_apply] + +lemma phase_injective_of_outer (i : A.centers) + {g : SmoothMetric M} {F : M → Space} (hF : IsSmoothIsometricImmersion M g F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + {p : M} (hp : p ∈ (surfacePhaseChart (i : M) e).source) + (ho : A.outer i =ᶠ[𝓝 p] (fun _ => 1)) : + Function.Injective (fderiv ℝ (A.phaseRealChartMap i e.symm F) + (surfacePhaseChart (i : M) e p)) := by + let er := realPhaseChart e + let x := surfacePhaseChart (i : M) e p + have hx : x ∈ er.target := by + change baseEquiv.symm (baseEquiv (e (chart (i : M) p))) ∈ e.target + rw [baseEquiv.symm_apply_apply] + exact e.map_source hp.2 + have hback : er.symm x = coordinateChart (i : M) p := by + change baseEquiv (e.symm (baseEquiv.symm (baseEquiv (e (chart (i : M) p))))) = _ + rw [baseEquiv.symm_apply_apply] + have hps : chart (i : M) p ∈ e.source := hp.2 + exact (congrArg baseEquiv (e.left_inv hps)).trans rfl + have hI : Function.Injective (fderiv ℝ (A.realChartMap i F) (er.symm x)) := by + rw [hback] + exact A.realChartMap_injective_of_outer i hF hp.1 ho + rw [A.phaseRealChartMap_eq_real_comp,fderiv_comp _ + ((A.realChartMap_smooth i hF.1).differentiable (by simp) _) + ((realPhaseChart_symm_smooth e hi).differentiable (by simp) _)] + exact hI.comp (inverse_chart_derivative_injective er (realPhaseChart_smooth e he) + (realPhaseChart_symm_smooth e hi) hx) + +omit [CompactSpace M] in +lemma phase_outer_neighborhood (i : A.centers) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {T Ω : Set SmallModes.Base} (hΩ : IsOpen Ω) + (hTΩ : T ⊆ Ω) (hΩe : Ω ⊆ (surfacePhaseChart (i : M) e).target) + (hT : ∀ x ∈ T, A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1)) : + ∃ U : Set SmallModes.Base, IsOpen U ∧ T ⊆ U ∧ U ⊆ Ω ∧ + ∀ x ∈ U, A.outer i =ᶠ[𝓝 ((surfacePhaseChart (i : M) e).symm x)] (fun _ => 1) := by + let P := {p : M | A.outer i =ᶠ[𝓝 p] (fun _ => 1)} + have hP : IsOpen P := isOpen_setOfPred_eventually_nhds + let E := surfacePhaseChart (i : M) e + let U := Ω ∩ (E.target ∩ E.symm ⁻¹' P) + have hU : IsOpen U := hΩ.inter (E.symm.isOpen_inter_preimage hP) + exact ⟨U,hU,fun x hx => ⟨hTΩ hx,hΩe (hTΩ hx),hT x hx⟩, + inter_subset_left,fun _ hx => hx.2.2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseParameterBalls.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseParameterBalls.lean new file mode 100644 index 0000000000000000000000000000000000000000..b6b3fedc627475f5a46067fb30da096b6188d8eb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseParameterBalls.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.UniformCircularPhaseCharts +import OAI.Geometry.Immersion.ClosedSurface.PhaseStock + +namespace OAI + +/-! Compact independent parameter balls about the three nonzero covectors. -/ +noncomputable section +open Set Metric +open scoped Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +theorem phase_parameter_balls (P : PhaseBasis) : + ∃ eps : ℝ, 0 < eps ∧ eps ≤ 1 ∧ + ∀ j : Fin 3, IsCompact (closedBall (P.ξ j) eps) ∧ + ∀ ell ∈ closedBall (P.ξ j) eps, ell ≠ 0 ∧ ‖ell‖ ≤ ‖P.ξ‖+1 := by + let eps := min 1 (min (‖P.ξ 0‖/2) (min (‖P.ξ 1‖/2) (‖P.ξ 2‖/2))) + have h0 : 0 < ‖P.ξ 0‖ := norm_pos_iff.mpr (P.nonzero 0) + have h1 : 0 < ‖P.ξ 1‖ := norm_pos_iff.mpr (P.nonzero 1) + have h2 : 0 < ‖P.ξ 2‖ := norm_pos_iff.mpr (P.nonzero 2) + have heps : 0 < eps := lt_min zero_lt_one (lt_min (by positivity) (lt_min (by positivity) (by positivity))) + have heps1 : eps ≤ 1 := min_le_left _ _ + have hs (j : Fin 3) : eps < ‖P.ξ j‖ := by + have ha := (min_le_right 1 (min (‖P.ξ 0‖/2) (min (‖P.ξ 1‖/2) (‖P.ξ 2‖/2)))) + have hb := min_le_left (‖P.ξ 0‖/2) (min (‖P.ξ 1‖/2) (‖P.ξ 2‖/2)) + have hc := min_le_right (‖P.ξ 0‖/2) (min (‖P.ξ 1‖/2) (‖P.ξ 2‖/2)) + have hd := min_le_left (‖P.ξ 1‖/2) (‖P.ξ 2‖/2) + have he := min_le_right (‖P.ξ 1‖/2) (‖P.ξ 2‖/2) + fin_cases j + · change eps < ‖P.ξ 0‖ + dsimp only [eps] + linarith + · change eps < ‖P.ξ 1‖ + dsimp only [eps] + linarith + · change eps < ‖P.ξ 2‖ + dsimp only [eps] + linarith + refine ⟨eps,heps,heps1,fun j => ⟨isCompact_closedBall _ _,?_⟩⟩ + intro ell hell + have hb : ‖ell-P.ξ j‖ ≤ eps := by simpa only [mem_closedBall,dist_eq_norm] using hell + refine ⟨?_,?_⟩ + · intro hz + rw [hz,zero_sub,norm_neg] at hb + exact (not_le_of_gt (hs j)) hb + · calc + ‖ell‖ ≤ ‖ell-P.ξ j‖+‖P.ξ j‖ := by simpa only [sub_add_cancel] using norm_add_le (ell-P.ξ j) (P.ξ j) + _ ≤ eps+‖P.ξ‖ := add_le_add hb (norm_le_pi_norm P.ξ j) + _ ≤ ‖P.ξ‖+1 := by linarith + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseReparametrization.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseReparametrization.lean new file mode 100644 index 0000000000000000000000000000000000000000..b5772044edf75c2fc28a380153fbbbaa96ee0611 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseReparametrization.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets +import OAI.Geometry.Immersion.ClosedSurface.PhaseCoordinates +import OAI.Geometry.Immersion.ClosedSurface.FreeCharts + +namespace OAI + +/-! A good covector supplies the actual free coordinate system for a mode. -/ + +noncomputable section + +namespace ClosedSurfaceR4.RealModes + +open SmallModes PhaseGeometry Set +open scoped ContDiff + +lemma phaseInverse_det {ξ : Base} (hξ : ξ ≠ 0) : + (((phaseEquiv ξ hξ).symm dx).1 * ((phaseEquiv ξ hξ).symm dy).2 - + ((phaseEquiv ξ hξ).symm dx).2 * ((phaseEquiv ξ hξ).symm dy).1) ≠ 0 := by + have hd : ξ.1 ^ 2 + ξ.2 ^ 2 ≠ 0 := (covector_length_sq_pos hξ).ne' + have he : + (((phaseEquiv ξ hξ).symm dx).1 * ((phaseEquiv ξ hξ).symm dy).2 - + ((phaseEquiv ξ hξ).symm dx).2 * ((phaseEquiv ξ hξ).symm dy).1) = + (ξ.1 ^ 2 + ξ.2 ^ 2)⁻¹ := by + simp only [phaseEquiv_symm_apply, dx, dy] + field_simp + ring + rw [he] + exact inv_ne_zero hd + +lemma phaseInverse_dy {ξ : Base} (hξ : ξ ≠ 0) : + (phaseEquiv ξ hξ).symm dy = (ξ.1 ^ 2 + ξ.2 ^ 2)⁻¹ • (-ξ.2, ξ.1) := by + ext <;> simp [dy, div_eq_mul_inv, mul_comm] + +/-- The normal acceleration in the new y direction is a positive scalar +multiple of the old second fundamental form in the covector's kernel. -/ +theorem realSecond_phase {F : RField 4} (hF : ContDiff ℝ ∞ F) + {ξ : Base} (hξ : ξ ≠ 0) (p : Base) + (hImm : Function.Injective (fderiv ℝ F ((phaseEquiv ξ hξ).symm p))) : + realSecond (F ∘ (phaseEquiv ξ hξ).symm) p = + ((ξ.1 ^ 2 + ξ.2 ^ 2)⁻¹) ^ 2 • + secondQuadratic (realSecondTensor F ((phaseEquiv ξ hξ).symm p)) (-ξ.2, ξ.1) := by + change realSecondForm (F ∘ (phaseEquiv ξ hξ).symm) dy dy p = _ + have he := realSecondForm_comp_linear hF (phaseEquiv ξ hξ).symm.toContinuousLinearMap + dy dy p (gramDet_ne_zero_of_injective _ hImm) (phaseInverse_det hξ) + simp only [ContinuousLinearEquiv.coe_coe] at he + rw [he] + rw [phaseInverse_dy, realSecondForm_quadratic hF, secondQuadratic_smul] + +/-- Immersion and the good-direction condition on an open set produce the +free-mode domain required by the finite oscillatory construction. -/ +theorem realModeDomain_phase {F : RField 4} (hF : ContDiff ℝ ∞ F) + {O : Set Base} (hO : IsOpen O) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ p ∈ O, Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ O, Good (realSecondTensor F p) ξ) : + RealModeDomain (F ∘ (phaseEquiv ξ hξ).symm) ((phaseEquiv ξ hξ) '' O) := by + refine ⟨(phaseEquiv ξ hξ).isOpenMap O hO, ?_, ?_⟩ + · rintro _ ⟨p, hp, rfl⟩ + apply gramDet_ne_zero_of_injective + rw [fderiv_comp _ (hF.differentiable (by simp) _) + (phaseEquiv ξ hξ).symm.differentiableAt] + simpa only [ContinuousLinearEquiv.fderiv, ContinuousLinearMap.coe_comp, + ContinuousLinearEquiv.coe_coe, + ContinuousLinearEquiv.symm_apply_apply] using + (hImm p hp).comp (phaseEquiv ξ hξ).symm.injective + · rintro _ ⟨p, hp, rfl⟩ + have hi : Function.Injective (fderiv ℝ F + ((phaseEquiv ξ hξ).symm ((phaseEquiv ξ hξ) p))) := by + simpa only [ContinuousLinearEquiv.symm_apply_apply] using hImm p hp + rw [realSecond_phase hF hξ _ hi, ContinuousLinearEquiv.symm_apply_apply] + exact smul_ne_zero (pow_ne_zero 2 (inv_ne_zero (covector_length_sq_pos hξ).ne')) + (hgood p hp).2 + +/-- A good phase gives all coordinate data for a supported free chart. -/ +def supportedFreeChartOfPhase {F : RField 4} (hF : ContDiff ℝ ∞ F) + {O S : Set Base} (hO : IsOpen O) (hS : IsClosed S) (hSO : S ⊆ O) + {ξ : Base} (hξ : ξ ≠ 0) (ψ : Base → ℝ) + (hImm : ∀ p ∈ O, Function.Injective (fderiv ℝ F p)) + (hgood : ∀ p ∈ O, Good (realSecondTensor F p) ξ) + (hsupp : ∀ p ∈ O, phaseEquiv ξ hξ p ∈ tsupport ψ → p ∈ S) : + SupportedFreeChart F (fun p => ξ.1 * p.1 + ξ.2 * p.2) ψ S where + U := O + V := (phaseEquiv ξ hξ) '' O + χ := phaseEquiv ξ hξ + e := (phaseEquiv ξ hξ).symm + openU := hO + closedS := hS + supportU := hSO + smoothFe := hF.comp (phaseEquiv ξ hξ).symm.contDiff + domain := realModeDomain_phase hF hO hξ hImm hgood + smoothχ := (phaseEquiv ξ hξ).contDiff.contDiffOn + maps := fun p hp => ⟨p, hp, rfl⟩ + inverse := fun _ _ => (phaseEquiv ξ hξ).symm_apply_apply _ + phase := fun _ _ => rfl + cutoff := hsupp + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSphericalGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSphericalGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..db68323f3883553f9831ccb059aef65f8d884005 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSphericalGeometry.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Geometry.ConstantNormBoundaryGeometry + +namespace OAI + +/-! Initial inward radial positivity in every fixed nonlinear phase chart. +It supplies the whole-curve part of the finite boundary invariant. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial SurfaceJetCoordinates RealModes SmallModes VelocityFrame NormalFrame +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace PhaseBoundaryCurve +variable {B : SmoothingAtlas M} (c : PhaseBoundaryCurve B) + +theorem spherical_second_positive {G : M → Space} {r : ℝ} (hr : 0 < r) + (hunit : ∀ p, ‖G p‖ = 1) {g : SmoothMetric M} + (hF : IsSmoothIsometricImmersion M g (r • G)) + {p : M} (hp : p ∈ c.carrier) : + 0 < c.second (r • G) p ⬝ᵥ spaceCoordinates (-G p) ∧ + c.second (r • G) p ≠ 0 ∧ + spaceCoordinates (-G p) ≠ -normalize (c.second (r • G) p) := by + let H := surfacePhaseMap (c.index : M) c.phase (r • G) + let x := c.coordinate p + have hps : p ∈ (surfacePhaseChart (c.index : M) c.phase).source := c.source hp + have hx : x ∈ (surfacePhaseChart (c.index : M) c.phase).target := + (surfacePhaseChart (c.index : M) c.phase).map_source hps + have hback : (surfacePhaseChart (c.index : M) c.phase).symm x = p := + (surfacePhaseChart (c.index : M) c.phase).left_inv hps + have hg := B.phaseRealChartMap_surface_germ c.index c.phase (r • G) hx + (by rw [hback]; exact c.active p hp) + have hHs : ContDiffOn ℝ ∞ H (surfacePhaseChart (c.index : M) c.phase).target := by + apply ContMDiffOn.contDiffOn + exact spaceCoordinates.contDiff.contMDiff.comp_contMDiffOn + (hF.1.comp_contMDiffOn (surfacePhaseChart_symm_smooth (c.index : M) c.phase c.inverse_smooth)) + have hR : ∀ y, H y ⬝ᵥ H y = r^2 := by + intro y + simp only [H,surfacePhaseMap,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 hD : gramDet (coordDeriv dx H x) (coordDeriv dy H x) ≠ 0 := by + change gramDet (fderiv ℝ H x dx) (fderiv ℝ H x dy) ≠ 0 + rw [← hg.fderiv_eq] + exact B.phase_gram_at_source c.index c.phase c.smooth c.inverse_smooth hF (c.source hp) (c.active p hp) + have hh := constant_norm_boundary_geometry (surfacePhaseChart (c.index : M) c.phase).open_target + hHs hR hr hx (injective_of_gramDet_ne_zero _ hD) (show (dy : SmallModes.Base) ≠ 0 by simp [dy]) + have hrad : r⁻¹ • (-H x) = spaceCoordinates (-G p) := by + change r⁻¹ • (-spaceCoordinates ((r • G) ((surfacePhaseChart (c.index : M) c.phase).symm x))) = _ + rw [hback] + simp only [Pi.smul_apply,map_smul,map_neg,smul_neg,smul_smul,inv_mul_cancel₀ hr.ne',one_smul] + rw [hrad] at hh + have hsec : c.second (r • G) p = realSecondForm H dy dy x := + (c.second_eq (r • G) hp).trans (realSecondForm_eventuallyEq hg dy dy).eq_of_nhds + rw [hsec] + refine ⟨hh.1,hh.2.1,?_⟩ + intro hbad + apply hh.2.2 + simp only [hbad,neg_neg] + +end PhaseBoundaryCurve +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSupportCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSupportCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..a925846973e3bdde1dc1f27eaac1aa61d39be365 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseSupportCoordinates.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeResidual + +namespace OAI + +/-! Transfer compact phase supports between the two plane coordinate conventions. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def jetSupport (K : Compacts SmallModes.Base) : Compacts Base := + K.map planeCoordinateIsometry.symm planeCoordinateIsometry.symm.continuous + +@[simp] lemma modeSupport_jetSupport (K : Compacts SmallModes.Base) : + modeSupport (jetSupport K) = K := by + apply SetLike.coe_injective + change planeCoordinateIsometry '' (planeCoordinateIsometry.symm '' (K : Set SmallModes.Base)) = K + ext x + constructor + · rintro ⟨y,⟨z,hz,rfl⟩,rfl⟩ + simpa only [planeCoordinateIsometry.apply_symm_apply] using hz + · intro hx + exact ⟨planeCoordinateIsometry.symm x,⟨x,hx,rfl⟩, + planeCoordinateIsometry.apply_symm_apply x⟩ + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The function is unchanged; only its compact-support index is transferred. -/ +def onModeSupport (K : Compacts SmallModes.Base) (f : SupportedField (F := E) K) : + SupportedField (F := E) (modeSupport (jetSupport K)) := + ⟨f, f.contDiff, fun x hx => f.zero_on_compl (by simpa only [modeSupport_jetSupport] using hx)⟩ + +@[simp] lemma onModeSupport_apply (K : Compacts SmallModes.Base) + (f : SupportedField (F := E) K) (x : SmallModes.Base) : onModeSupport K f x = f x := rfl + +def onModeSupportLM (K : Compacts SmallModes.Base) : + SupportedField (F := E) K →ₗ[ℝ] SupportedField (F := E) (modeSupport (jetSupport K)) where + toFun := onModeSupport K + map_add' _ _ := by apply DFunLike.ext; intro x; rfl + map_smul' _ _ := by apply DFunLike.ext; intro x; rfl + +lemma onModeSupport_seminorm (K : Compacts SmallModes.Base) (s : ℝ≥0) + (hs : 0 < (s : ℝ)) (m : ℕ) (f : SupportedField (F := E) K) : + supportedWeightedSeminorm (modeSupport (jetSupport K)) s m (onModeSupport K f) = + supportedWeightedSeminorm K s m f := by + apply le_antisymm + · exact supportedSeminorm_le_of_weightedBound hs (apply_nonneg _ _) + (onModeSupport K f) (weightedBound_of_supportedSeminorm s m f) + · exact supportedSeminorm_le_of_weightedBound hs (apply_nonneg _ _) + f (weightedBound_of_supportedSeminorm s m (onModeSupport K f)) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTargetCongruence.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTargetCongruence.lean new file mode 100644 index 0000000000000000000000000000000000000000..c6e49c14e25a4036e0dce6e3e9e260a7d1e92934 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTargetCongruence.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts + +namespace OAI + +/-! Restricting a target phase chart keeps every transition function. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma surfacePhaseTransition_target_congr (p q r : M) (hqr : q = r) + (e f g : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hfg : ∀ x, f x = g x) : + (surfacePhaseTransition p e q f : SmallModes.Base → SmallModes.Base) = + surfacePhaseTransition p e r g := by + subst r + funext x + change baseEquiv (f (FiniteOrderSmoothing.chart q ((surfacePhaseChart p e).symm x))) = + baseEquiv (g (FiniteOrderSmoothing.chart q ((surfacePhaseChart p e).symm x))) + rw [hfg] + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionCocycle.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionCocycle.lean new file mode 100644 index 0000000000000000000000000000000000000000..28fd380a872f44c4f5645c508f3cafce2dd97b7c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionCocycle.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionVectors + +namespace OAI + +/-! Chain identities for the actual nonlinear phase charts. They transport +both directions of an ordered crossing through a third chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseTransition_apply (q r : M) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) {p : M} + (hp : p ∈ (surfacePhaseChart q e).source) : + surfacePhaseTransition q e r f (surfacePhaseChart q e p) = surfacePhaseChart r f p := by + change (surfacePhaseChart r f) ((surfacePhaseChart q e).symm (surfacePhaseChart q e p)) = _ + rw [(surfacePhaseChart q e).left_inv hp] + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseTransition_source (q r : M) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) {p : M} + (hp : p ∈ (surfacePhaseChart q e).source) (hr : p ∈ (surfacePhaseChart r f).source) : + surfacePhaseChart q e p ∈ (surfacePhaseTransition q e r f).source := by + refine ⟨(surfacePhaseChart q e).map_source hp,?_⟩ + change (surfacePhaseChart q e).symm (surfacePhaseChart q e p) ∈ (surfacePhaseChart r f).source + rwa [(surfacePhaseChart q e).left_inv hp] + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseTransition_cocycle_germ (q₁ q₂ q₃ : M) + (e₁ e₂ e₃ : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {p : M} (h₁ : p ∈ (surfacePhaseChart q₁ e₁).source) + (h₂ : p ∈ (surfacePhaseChart q₂ e₂).source) + (h₃ : p ∈ (surfacePhaseChart q₃ e₃).source) : + surfacePhaseTransition q₂ e₂ q₃ e₃ ∘ surfacePhaseTransition q₁ e₁ q₂ e₂ =ᶠ[𝓝 (surfacePhaseChart q₁ e₁ p)] surfacePhaseTransition q₁ e₁ q₃ e₃ := by + have h₁₂ := surfacePhaseTransition_source q₁ q₂ e₁ e₂ h₁ h₂ + have h₁₃ := surfacePhaseTransition_source q₁ q₃ e₁ e₃ h₁ h₃ + filter_upwards [(surfacePhaseTransition q₁ e₁ q₂ e₂).open_source.mem_nhds h₁₂, + (surfacePhaseTransition q₁ e₁ q₃ e₃).open_source.mem_nhds h₁₃] with x hx _ + have hxs : (surfacePhaseChart q₁ e₁).symm x ∈ (surfacePhaseChart q₂ e₂).source := hx.2 + change (surfacePhaseChart q₃ e₃) ((surfacePhaseChart q₂ e₂).symm + ((surfacePhaseChart q₂ e₂) ((surfacePhaseChart q₁ e₁).symm x))) = _ + rw [(surfacePhaseChart q₂ e₂).left_inv hxs] + rfl + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseTransition_self_germ (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseChart q e).target) : + surfacePhaseTransition q e q e =ᶠ[𝓝 x] id := by + filter_upwards [(surfacePhaseChart q e).open_target.mem_nhds hx] with y hy + exact (surfacePhaseChart q e).right_inv hy + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseTransition_self_fderiv (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseChart q e).target) : + fderiv ℝ (surfacePhaseTransition q e q e) x = ContinuousLinearMap.id ℝ SmallModes.Base := by + rw [(surfacePhaseTransition_self_germ q e hx).fderiv_eq,fderiv_id] + +lemma surfacePhaseTransition_fderiv_cocycle (q₁ q₂ q₃ : M) + (e₁ e₂ e₃ : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (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) : + fderiv ℝ (surfacePhaseTransition q₁ e₁ q₃ e₃) (surfacePhaseChart q₁ e₁ p) = + (fderiv ℝ (surfacePhaseTransition q₂ e₂ q₃ e₃) (surfacePhaseChart q₂ e₂ p)).comp + (fderiv ℝ (surfacePhaseTransition q₁ e₁ q₂ e₂) (surfacePhaseChart q₁ e₁ p)) := by + have h₁₂ := surfacePhaseTransition_source q₁ q₂ e₁ e₂ h₁ h₂ + have h₂₃ := surfacePhaseTransition_source q₂ q₃ e₂ e₃ h₂ h₃ + have hd₁₂ := (((surfacePhaseTransition_smooth q₁ e₁ hi₁ q₂ e₂ he₂) + (surfacePhaseChart q₁ e₁ p) h₁₂).contDiffAt + ((surfacePhaseTransition q₁ e₁ q₂ e₂).open_source.mem_nhds h₁₂)).differentiableAt (by simp) + have hd₂₃ := (((surfacePhaseTransition_smooth q₂ e₂ hi₂ q₃ e₃ he₃) + (surfacePhaseChart q₂ e₂ p) h₂₃).contDiffAt + ((surfacePhaseTransition q₂ e₂ q₃ e₃).open_source.mem_nhds h₂₃)).differentiableAt (by simp) + have hg := surfacePhaseTransition_cocycle_germ q₁ q₂ q₃ e₁ e₂ e₃ h₁ h₂ h₃ + rw [← hg.fderiv_eq] + have ht := surfacePhaseTransition_apply q₁ q₂ e₁ e₂ h₁ + rw [fderiv_comp _ (by rwa [ht]) hd₁₂,ht] + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf7b78a74344ddc258b5c5422c72e0fbc58f5ce9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionRegularity.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionCocycle + +namespace OAI + +/-! A phase-coordinate transition preserves nonzero tangent directions. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates RealModes SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma surfacePhaseTransition_fderiv_injective (p q : M) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) + (hf : ContDiff ℝ ∞ f) (hfi : ContDiff ℝ ∞ f.symm) + {a : M} (hp : a ∈ (surfacePhaseChart p e).source) + (hq : a ∈ (surfacePhaseChart q f).source) : + Function.Injective (fderiv ℝ (surfacePhaseTransition p e q f) (surfacePhaseChart p e a)) := by + have hh := surfacePhaseTransition_fderiv_cocycle p q p e f e hi hf hfi he hp hq hp + rw [surfacePhaseTransition_self_fderiv p e ((surfacePhaseChart p e).map_source hp)] at hh + intro v w hvw + have hv := congrArg (fun L : Base →L[ℝ] Base => L v) hh + have hw := congrArg (fun L : Base →L[ℝ] Base => L w) hh + simp only [ContinuousLinearMap.id_apply,ContinuousLinearMap.comp_apply] at hv hw + exact hv.trans ((congrArg (fderiv ℝ (surfacePhaseTransition q f p e) + (surfacePhaseChart q f a)) hvw).trans hw.symm) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionVectors.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionVectors.lean new file mode 100644 index 0000000000000000000000000000000000000000..20388c84eb794e96fe5b57ccac7643e93dc52dd8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransitionVectors.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartTransition + +namespace OAI + +/-! A later curve's transverse coordinate vector, transported to the +current phase chart and extended smoothly from its compact overlap. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma fderiv_local_inverse_injective + (e : OpenPartialHomeomorph Base Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {x : Base} (hx : x ∈ e.source) : Function.Injective (fderiv ℝ e x) := by + have hd := ((he x hx).contDiffAt (e.open_source.mem_nhds hx)).differentiableAt (by simp) + have hdi := ((hi (e x) (e.map_source hx)).contDiffAt + (e.open_target.mem_nhds (e.map_source hx))).differentiableAt (by simp) + have heq : 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 ℝ Base := by + rw [← fderiv_comp x hdi hd,heq.fderiv_eq,fderiv_id] + intro v w h + have hh := congrArg (fderiv ℝ e.symm (e x)) h + 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 + +theorem compact_transverse_vector + (e : OpenPartialHomeomorph Base Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {K : Set Base} (hK : IsCompact K) (hKe : K ⊆ e.target) : + ∃ v : Base → Base, ContDiff ℝ ∞ v ∧ + ∀ x ∈ K, v x = fderiv ℝ e (e.symm x) dy ∧ v x ≠ 0 := by + have hD : ContDiffOn ℝ ∞ (fderiv ℝ e) e.source := + he.fderiv_of_isOpen e.open_source (by simp) + have hvec : ContDiffOn ℝ ∞ (fun x => fderiv ℝ e (e.symm x) dy) e.target := + (hD.clm_apply contDiffOn_const).comp hi e.symm.mapsTo + obtain ⟨U,_,hKU,_,v,hv,hveq⟩ := CollarVelocity.compact_smooth_extension hK e.open_target hKe hvec + refine ⟨v,hv,?_⟩ + intro x hx + have hh := hveq (hKU hx) + refine ⟨hh,?_⟩ + rw [hh] + have hinj := fderiv_local_inverse_injective e he hi (e.map_target (hKe hx)) + intro hz + have hdy := hinj (hz.trans (map_zero (fderiv ℝ e (e.symm x))).symm) + exact (show (dy : Base) ≠ 0 from by simp [dy]) hdy + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransverseDefiner.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransverseDefiner.lean new file mode 100644 index 0000000000000000000000000000000000000000..8592610e8a3d357e461ec3d30b8b9419772885a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PhaseTransverseDefiner.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Geometry.CovectorPullbackParameters +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryTangencies + +namespace OAI + +/-! A boundary transverse to a phase has a nonzero defining derivative in +that phase's second coordinate. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +lemma phase_chart_transverse_definer_at {φ ρ : Base → ℝ} {f : Base → Base} + {p : Base} (hφ : DifferentiableAt ℝ φ (f p)) (hρ : DifferentiableAt ℝ ρ (f p)) + (hf : DifferentiableAt ℝ f p) (hphase : φ ∘ f =ᶠ[𝓝 p] Prod.fst) + (hD : coordDet (fderiv ℝ f p) ≠ 0) + (hcross : covectorDet (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) ≠ 0) : + fderiv ℝ (ρ ∘ f) p dy ≠ 0 := by + have hcomp (ψ : Base → ℝ) (hψ : DifferentiableAt ℝ ψ (f p)) : + phaseDerivative (ψ ∘ f) p = pullCovector (fderiv ℝ f p) (phaseDerivative ψ (f p)) := by + unfold phaseDerivative + rw [fderiv_comp p hψ hf] + change ((fderiv ℝ ψ (f p)) ((fderiv ℝ f p) dx), + (fderiv ℝ ψ (f p)) ((fderiv ℝ f p) dy)) = _ + conv_lhs => rw [← phaseLinear_phaseDerivative ψ (f p)] + rfl + have hfirst : pullCovector (fderiv ℝ f p) (phaseDerivative φ (f p)) = dx := by + rw [← hcomp φ hφ] + unfold phaseDerivative + rw [hphase.fderiv_eq,fderiv_fst] + rfl + have hdet := covectorDet_pullback (fderiv ℝ f p) + (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) + rw [hfirst,← hcomp ρ hρ] at hdet + have hne := mul_ne_zero hD hcross + rw [← hdet] at hne + simpa only [covectorDet,dx,phaseDerivative,one_mul,zero_mul,sub_zero] using hne + +lemma phase_chart_transverse_definer {φ ρ : Base → ℝ} {f : Base → Base} + (hφ : ContDiff ℝ ∞ φ) (hρ : ContDiff ℝ ∞ ρ) (hf : ContDiff ℝ ∞ f) + {p : Base} (hphase : φ ∘ f =ᶠ[𝓝 p] Prod.fst) + (hD : coordDet (fderiv ℝ f p) ≠ 0) + (hcross : covectorDet (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) ≠ 0) : + fderiv ℝ (ρ ∘ f) p dy ≠ 0 := by + have hfirst : pullCovector (fderiv ℝ f p) (phaseDerivative φ (f p)) = dx := by + rw [← phaseDerivative_comp_smooth hφ hf] + unfold phaseDerivative + rw [hphase.fderiv_eq,fderiv_fst] + rfl + have hdet := covectorDet_pullback (fderiv ℝ f p) + (phaseDerivative φ (f p)) (phaseDerivative ρ (f p)) + rw [hfirst,← phaseDerivative_comp_smooth hρ hf] at hdet + have hne := mul_ne_zero hD hcross + rw [← hdet] at hne + simpa only [covectorDet,dx,phaseDerivative,one_mul,zero_mul,sub_zero] using hne + +lemma circular_radius_phase_determinant (φ : Base → ℝ) (c p : Base) : + covectorDet (phaseDerivative φ p) (phaseDerivative (circularRadiusSquared c) p) = + -2 * phaseLinear (phaseDerivative φ p) + (FiniteOrderSmoothing.circularAngularTangent c p) := by + have hx := circularRadiusSquared_derivative c p dx + have hy := circularRadiusSquared_derivative c p dy + unfold covectorDet phaseDerivative + change coordDeriv dx φ p * coordDeriv dy (circularRadiusSquared c) p - + coordDeriv dy φ p * coordDeriv dx (circularRadiusSquared c) p = _ + rw [hx,hy] + simp only [phaseLinear_apply,FiniteOrderSmoothing.circularAngularTangent,dx,dy] + dsimp [coordDeriv] + ring + +lemma phase_chart_circular_definer {φ : Base → ℝ} {f : Base → Base} + (hφ : ContDiff ℝ ∞ φ) (hf : ContDiff ℝ ∞ f) + {p : Base} (hphase : φ ∘ f =ᶠ[𝓝 p] Prod.fst) + (hD : coordDet (fderiv ℝ f p) ≠ 0) (c : Base) (r : ℝ) + (hcross : phaseLinear (phaseDerivative φ (f p)) + (FiniteOrderSmoothing.circularAngularTangent c (f p)) ≠ 0) : + fderiv ℝ (fun x => circularRadiusSquared c (f x) - r^2) p dy ≠ 0 := by + have h := phase_chart_transverse_definer hφ (circularRadiusSquared_smooth c) hf + hphase hD (by rw [circular_radius_phase_determinant]; exact mul_ne_zero (by norm_num) hcross) + have he : (fun x => circularRadiusSquared c (f x) - r^2) = + (circularRadiusSquared c ∘ f) - (fun _ => r^2) := rfl + rw [he,fderiv_sub (((circularRadiusSquared_smooth c).comp hf).differentiable (by simp) p) (differentiableAt_const _)] + simpa using h + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCommonCoordinate.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCommonCoordinate.lean new file mode 100644 index 0000000000000000000000000000000000000000..65a7c755b2e3ba102385d96fe492efd2e3ac0276 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCommonCoordinate.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneCurveGraph + +namespace OAI + +/-! A common linear plane coordinate is regular on either of two nonzero +curve velocities, including the case of collinear opposite velocities. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def planeShearLinear (a : ℝ) : Base →L[ℝ] Base := + ContinuousLinearMap.pi ![ContinuousLinearMap.proj (0 : Fin 2) + + a • ContinuousLinearMap.proj (1 : Fin 2),ContinuousLinearMap.proj (1 : Fin 2)] + +lemma planeShearLinear_apply (a : ℝ) (v : Base) : + planeShearLinear a v = ![v 0+a*v 1,v 1] := by + ext i + fin_cases i <;> rfl + +lemma planeShearLinear_bijective (a : ℝ) : Function.Bijective (planeShearLinear a) := by + constructor + · intro v w he + have h0 := congrFun he 0 + have h1 := congrFun he 1 + change v 0+a*v 1 = w 0+a*w 1 at h0 + change v 1 = w 1 at h1 + ext i + fin_cases i + · change v 0 = w 0 + rw [h1] at h0 + exact add_right_cancel h0 + · exact h1 + · intro w + refine ⟨![w 0-a*w 1,w 1],?_⟩ + rw [planeShearLinear_apply] + ext i + fin_cases i <;> simp + +def planeShearEquiv (a : ℝ) : Base ≃L[ℝ] Base := + ContinuousLinearEquiv.ofBijective (planeShearLinear a) + (LinearMap.ker_eq_bot.mpr (planeShearLinear_bijective a).1) + (LinearMap.range_eq_top.mpr (planeShearLinear_bijective a).2) + +lemma plane_second_ne_zero {v : Base} (hv : v ≠ 0) (hv0 : v 0 = 0) : v 1 ≠ 0 := by + intro hv1 + apply hv + ext i + fin_cases i + · exact hv0 + · exact hv1 + +theorem exists_common_plane_parameter {v w : Base} (hv : v ≠ 0) (hw : w ≠ 0) : + ∃ a : ℝ, v 0+a*v 1 ≠ 0 ∧ w 0+a*w 1 ≠ 0 := by + by_cases hv0 : v 0 = 0 + · have hv1 := plane_second_ne_zero hv hv0 + by_cases hw0 : w 0 = 0 + · have hw1 := plane_second_ne_zero hw hw0 + exact ⟨1,by simpa only [hv0,zero_add,one_mul] using hv1, + by simpa only [hw0,zero_add,one_mul] using hw1⟩ + · by_cases hw1 : w 0+w 1 = 0 + · refine ⟨2,?_,?_⟩ + · simpa only [hv0,zero_add] using mul_ne_zero (by norm_num : (2:ℝ) ≠ 0) hv1 + · intro h; apply hw0; linarith + · exact ⟨1,by simpa only [hv0,zero_add,one_mul] using hv1,by simpa only [one_mul] using hw1⟩ + · by_cases hw0 : w 0 = 0 + · have hw1 := plane_second_ne_zero hw hw0 + by_cases hv1 : v 0+v 1 = 0 + · refine ⟨2,?_,?_⟩ + · intro h; apply hv0; linarith + · simpa only [hw0,zero_add] using mul_ne_zero (by norm_num : (2:ℝ) ≠ 0) hw1 + · exact ⟨1,by simpa only [one_mul] using hv1,by simpa only [hw0,zero_add,one_mul] using hw1⟩ + · exact ⟨0,by simpa using hv0,by simpa using hw0⟩ + +theorem exists_common_plane_coordinate {v w : Base} (hv : v ≠ 0) (hw : w ≠ 0) : + ∃ e : Base ≃L[ℝ] Base, (e v) 0 ≠ 0 ∧ (e w) 0 ≠ 0 := by + obtain ⟨a,hv',hw'⟩ := exists_common_plane_parameter hv hw + exact ⟨planeShearEquiv a,hv',hw'⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCurveCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCurveCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..dedccc4c57a1f0546cb911336a8fe3eb3a8271b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PlaneCurveCoordinates.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneCurveFrame +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! Actual local coordinates straightening a regular curve in the surface plane. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def planeCurveTube (c : ℝ → Base) (v : Base) (x : Base) : Base := c (x 1)+x 0 • v + +lemma planeCurveTube_smooth {c : ℝ → Base} (hc : ContDiff ℝ ∞ c) (v : Base) : + ContDiff ℝ ∞ (planeCurveTube c v) := + (hc.comp (contDiff_apply ℝ ℝ 1)).add ((contDiff_apply ℝ ℝ 0).smul contDiff_const) + +lemma planeCurveTube_fderiv {c : ℝ → Base} (hc : ContDiff ℝ ∞ c) (v : Base) (t : ℝ) : + fderiv ℝ (planeCurveTube c v) ![0,t] = planeCurveLinear v (deriv c t) := by + have hC := ((hc.differentiable (by simp) t).hasFDerivAt).comp ![0,t] + (hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) ![0,t]) + have hV := (hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) ![0,t]).smul_const v + have hd := hC.add hV + change HasFDerivAt (planeCurveTube c v) _ ![0,t] at hd + rw [hd.fderiv] + apply ContinuousLinearMap.ext + intro x + simp [planeCurveLinear_apply,fderiv_eq_smul_deriv,add_comm] + +theorem plane_curve_coordinates {c : ℝ → Base} (hc : ContDiff ℝ ∞ c) + (t : ℝ) (ht : deriv c t ≠ 0) : + ∃ (e : OpenPartialHomeomorph Base Base) (U : Set ℝ), + IsOpen U ∧ t ∈ U ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target ∧ + ∀ s ∈ U, (![0,s] : Base) ∈ e.source ∧ e ![0,s] = c s := by + obtain ⟨v,hbij⟩ := exists_plane_curve_frame ht + let T := planeCurveTube c v + have hT : ContDiff ℝ ∞ T := planeCurveTube_smooth hc v + have hD : Function.Bijective (fderiv ℝ T ![0,t]) := by + rw [planeCurveTube_fderiv hc] + exact hbij + let R : Base ≃L[ℝ] Base := ContinuousLinearEquiv.ofBijective (fderiv ℝ T ![0,t]) + (LinearMap.ker_eq_bot.mpr hD.1) (LinearMap.range_eq_top.mpr hD.2) + have hd : HasFDerivAt T R.toContinuousLinearMap ![0,t] := + (hT.differentiable (by simp) _).hasFDerivAt + let e₀ := hT.contDiffAt.toOpenPartialHomeomorph T hd (by simp) + let W := {x : Base | IsUnit (fderiv ℝ T x)} + have hW : IsOpen W := Units.isOpen.preimage (hT.continuous_fderiv (by simp)) + let e := e₀.restrOpen W hW + have he : (e : Base → Base) = T := rfl + have htE : (![0,t] : Base) ∈ e.source := + ⟨hT.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp), + ContinuousLinearMap.isUnit_iff_bijective.mpr hD⟩ + let U := (fun s => (![0,s] : Base)) ⁻¹' e.source + have hU : IsOpen U := e.open_source.preimage (by fun_prop) + refine ⟨e,U,hU,htE,by simpa only [he] using hT,?_,?_⟩ + · intro y hy + obtain ⟨u,hu⟩ := (e.map_target hy).2 + let D := ContinuousLinearEquiv.ofUnit u + have hdy : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he] + convert (hT.differentiable (by simp) _).hasFDerivAt using 1 + exact hu + exact (e.contDiffAt_symm hy hdy (by rw [he]; exact hT.contDiffAt)).contDiffWithinAt + · intro s hs + refine ⟨hs,?_⟩ + change planeCurveTube c v ![0,s] = c s + simp [planeCurveTube] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreferredNormalPhasePullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreferredNormalPhasePullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..2982d19a6a3edf89b33876a4e97bc1afda59d046 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreferredNormalPhasePullback.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseBoundaryCurve +import OAI.Geometry.SurfaceImmersion.Geometry.PreferredNormalGluing + +namespace OAI + +/-! Pull the actual global preferred normal into the primitive's phase +coordinates, preserving smoothness, unit length and orthogonality. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates SmallModes RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace PreferredNormal +variable {F : M → Space} (n : PreferredNormal F) + +omit [IsManifold planeModel ∞ M] in +lemma pullback_normal_at (hF : ContMDiff planeModel spaceModel ∞ F) + {u : Base → M} {x : Base} (hu : ContMDiffAt 𝓘(ℝ,Base) planeModel ∞ u x) (v : Base) : + coordDeriv v (spaceCoordinates ∘ F ∘ u) x ⬝ᵥ spaceCoordinates (n.vector (u x)) = 0 := by + have hF' : ContMDiff planeModel 𝓘(ℝ,NormalFrame.Vec) ∞ (spaceCoordinates ∘ F) := + spaceCoordinates.contDiff.contMDiff.comp hF + change fderiv ℝ ((spaceCoordinates ∘ F) ∘ u) x v ⬝ᵥ _ = 0 + rw [← mfderiv_eq_fderiv,mfderiv_comp x (hF'.mdifferentiable (by simp)).mdifferentiableAt + (hu.mdifferentiableAt (by simp))] + rw [mfderiv_comp (u x) + ((spaceCoordinates.contDiff (n := (∞ : ℕ∞ω))).contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hF.mdifferentiable (by simp)).mdifferentiableAt, + mfderiv_eq_fderiv,spaceCoordinates.fderiv] + let vx : TangentSpace 𝓘(ℝ,Base) x := v + let w : TangentSpace planeModel (u x) := mfderiv 𝓘(ℝ,Base) planeModel u x vx + change spaceCoordinates (mfderiv planeModel spaceModel F (u x) w) ⬝ᵥ + spaceCoordinates (n.vector (u x)) = 0 + exact (spaceCoordinates_dot _ _).trans (n.normal _ w) + +def inPhase (q : M) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) : + Base → NormalFrame.Vec := spaceCoordinates ∘ n.vector ∘ (surfacePhaseChart q e).symm + +lemma inPhase_smooth (q : M) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) : + ContDiffOn ℝ ∞ (n.inPhase q e) (surfacePhaseChart q e).target := + (spaceCoordinates.contDiff.contMDiff.comp n.smooth |>.comp_contMDiffOn + (surfacePhaseChart_symm_smooth q e hi)).contDiffOn + +omit [IsManifold planeModel ∞ M] in +lemma inPhase_unit (q : M) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (x : Base) : n.inPhase q e x ⬝ᵥ n.inPhase q e x = 1 := by + change spaceCoordinates (n.vector _) ⬝ᵥ spaceCoordinates (n.vector _) = 1 + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,n.unit] + norm_num + +lemma inPhase_normal (hF : ContMDiff planeModel spaceModel ∞ F) + (q : M) (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {x : Base} (hx : x ∈ (surfacePhaseChart q e).target) + (v : Base) : coordDeriv v (surfacePhaseMap q e F) x ⬝ᵥ n.inPhase q e x = 0 := by + exact n.pullback_normal_at hF + ((surfacePhaseChart_symm_smooth q e hi x hx).contMDiffAt + ((surfacePhaseChart q e).open_target.mem_nhds hx)) v + +end PreferredNormal +namespace FiniteOrderSmoothing.SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma preferred_normal_in_phase (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (n : PreferredNormal F) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) {x : Base} (hx : x ∈ (surfacePhaseChart (i : M) e).target) + (hw : A.weight i ((surfacePhaseChart (i : M) e).symm x) ≠ 0) (v : Base) : + coordDeriv v (A.phaseRealChartMap i e.symm F) x ⬝ᵥ n.inPhase (i : M) e x = 0 := by + have he := A.phaseRealChartMap_surface_germ i e F hx hw + rw [coordDeriv,he.fderiv_eq] + exact n.inPhase_normal hF (i : M) e hi hx v + +end FiniteOrderSmoothing.SmoothingAtlas +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreparedPointCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreparedPointCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ba867f63d820795be79507e39bd483377aeea26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PreparedPointCoordinates.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FixedAtlasStartingFamily +import OAI.Geometry.SurfaceImmersion.Geometry.PreparedRadialSecondForm +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasImmersionGeometry + +namespace OAI + +/-! A prepared spherical point has the exact radial second form in its +selected atlas chart, using a genuine smooth representative of the chart map. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes SphericalJets +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem prepared_point_radial_form {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) {r : ℝ} (hr : r ≠ 0) + (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) (v w : SmallModes.Base) : + realSecondForm (coordinateMap (r • G) (i : M)) v w (coordinateChart (i : M) p) = + (r⁻¹*(coordDeriv v (coordinateMap (r • G) (i : M)) (coordinateChart (i : M) p) ⬝ᵥ + coordDeriv w (coordinateMap (r • G) (i : M)) (coordinateChart (i : M) p))) • + spaceCoordinates (-G p) := by + let F := A.euclideanChartRead i G + let x := coordinateChart (i : M) p + have hx : planeCoordinates.symm x = chartAt Plane (i : M) p := by + simp [x,coordinateChart_apply,chartCoordinates] + have he := A.euclideanChartRead_germ i G hp + have hf : ContDiff ℝ ∞ F := A.euclideanChartRead_smooth i hG + have hflatF : ∀ a b, sphericalSecondForm F (planeCoordinates.symm x) a b = 0 := by + intro a b + rw [hx] + exact (sphericalSecondForm_congr_germ he a b).trans (hflat a b) + have hs : scaledSphereCoordinates F r =ᶠ[𝓝 x] coordinateMap (r • G) (i : M) := by + have ht : Tendsto planeCoordinates.symm (𝓝 x) (𝓝 (chartAt Plane (i : M) p)) := by + rw [← hx] + exact planeCoordinates.symm.continuous.continuousAt.tendsto + filter_upwards [he.comp_tendsto ht] with y hy + simp only [scaledSphereCoordinates,coordinateMap,Function.comp_apply,Pi.smul_apply] + change F (planeCoordinates.symm y) = _ at hy + dsimp only [F] + dsimp only [F] at hy + rw [hy] + rfl + have hscaled : ContMDiff planeModel spaceModel ∞ (r • G) := + (show ContMDiff planeModel 𝓘(ℝ) ∞ (fun _ : M => r) from contMDiff_const).smul hG + have hps : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support i (subset_tsupport _ hp) + have hD := gramDet_ne_zero_of_injective _ + (coordinateMap_injective_of_immersion hscaled hI (i : M) + (by rw [← coordinateChart_target]; exact (coordinateChart (i : M)).map_source hps)) + have hD' : NormalFrame.gramDet (coordDeriv dx (scaledSphereCoordinates F r) x) + (coordDeriv dy (scaledSphereCoordinates F r) x) ≠ 0 := by + rw [(coordDeriv_eventuallyEq hs dx).eq_of_nhds,(coordDeriv_eventuallyEq hs dy).eq_of_nhds] + exact hD + have hvalue : F (planeCoordinates.symm x) = G p := by + dsimp only [F] + rw [hx,he.eq_of_nhds] + exact congrArg G ((chartAt Plane (i : M)).left_inv (by simpa only [coordinateChart_source] using hps)) + have hh := scaled_flat_spherical_secondForm hf hr x hflatF hD' v w + rw [(realSecondForm_eventuallyEq hs v w).eq_of_nhds, + (coordDeriv_eventuallyEq hs v).eq_of_nhds, + (coordDeriv_eventuallyEq hs w).eq_of_nhds,hvalue] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e9bed3eeb442e5c62da45b2e3bbb784dbc803a6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPatch.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CircularSmoothingAtlas + +namespace OAI + +/-! A fixed compact primitive disk can be placed in one positive atlas +patch with support in any prescribed coordinate neighborhood. -/ +noncomputable section +open Set Function Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem exists_smoothingAtlas_prescribed_patch (q : M) {K U : Set M} + (hK : IsCompact K) (hqK : q ∈ K) (hU : IsOpen U) (hKU : K ⊆ U) + (hUs : U ⊆ (chart q).source) : + ∃ (A : SmoothingAtlas M) (i : A.centers), (i : M) = q ∧ + (∀ p ∈ K, 0 < A.weight i p) ∧ tsupport (A.weight i) ⊆ U ∧ + (∀ j p, 0 ≤ A.weight j p) ∧ + ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1) := by + classical + let V : M → Set M := fun p => if p = q then U else (chart p).source \ {q} + have hV : ∀ p, IsOpen (V p) := by + intro p + by_cases hp : p = q + · simpa only [V,ite_eq_left hp] using hU + · simpa only [V,ite_eq_right hp] using (chart p).open_source.sdiff isClosed_singleton + have hpV : ∀ p, p ∈ V p := by + intro p + by_cases hp : p = q + · subst p; simpa only [V,ite_eq_left rfl] using hKU hqK + · simp only [V,ite_eq_right hp,mem_sdiff,mem_singleton_iff] + exact ⟨by rw [chart_source]; exact mem_chart_source Plane p,hp⟩ + obtain ⟨t,ψ,hψ,hsupp,_,hnon,hpart⟩ := exists_finite_smooth_square_partition + (E := Plane) V hV hpV + have hψ : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (ψ i) := by + intro i + simpa only [planeModel] using hψ i + have hqt : q ∈ t := by + by_contra hnot + have hz (i : t) : ψ i q = 0 := by + apply image_eq_zero_of_notMem_tsupport + intro hh + have hi : (i : M) ≠ q := fun he => hnot (he ▸ i.2) + have hm := hsupp i hh + simp only [V,ite_eq_right hi,mem_sdiff,mem_singleton_iff] at hm + exact hm.2 trivial + have he := hpart q + simp only [hz,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at he + norm_num at he + let iq : t := ⟨q,hqt⟩ + obtain ⟨W,hW,hKW,hWU⟩ := hK.exists_isOpen_closure_subset (hU.mem_nhdsSet.mpr hKU) + obtain ⟨β,hβ,_,hβs,hβone⟩ := exists_contMDiff_support_eq_eq_one_iff + (I := planeModel) (n := (⊤ : ℕ∞)) hW hK.isClosed hKW + have hβU : tsupport β ⊆ U := by + change closure (support β) ⊆ U + rw [hβs] + exact hWU + let f : t → M → ℝ := fun i p => ψ i p + if i = iq then (β p)^2 else 0 + have hf : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (f i) := by + intro i + by_cases hi : i = iq + · have heq : f i = ψ i + fun p => (β p)^2 := by + funext p; simp only [f,ite_eq_left hi,Pi.add_apply] + rw [heq] + exact (hψ i).add (hβ.pow 2) + · simpa only [f,ite_eq_right hi,add_zero] using hψ i + have hfnon : ∀ i p, 0 ≤ f i p := by + intro i p + exact add_nonneg (hnon i p) (by split_ifs <;> positivity) + have hfle : ∀ i p, ψ i p ≤ f i p := by + intro i p + exact le_add_of_nonneg_right (by split_ifs <;> positivity) + have hfcover (p : M) : ∃ i, 0 < f i p := by + by_contra hh + have hz : ∀ i, ψ i p = 0 := by + intro i + have hni : ¬ 0 < f i p := fun h => hh ⟨i,h⟩ + exact le_antisymm ((hfle i p).trans (le_of_not_gt hni)) (hnon i p) + have hp := hpart p + simp only [hz,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hp + norm_num at hp + have hfV : ∀ i, tsupport (f i) ⊆ V i := by + intro i + by_cases hi : i = iq + · subst i + have hs : tsupport (f iq) ⊆ tsupport (ψ iq) ∪ tsupport β := by + have heq : f iq = ψ iq + fun p => (β p)^2 := by + funext p; simp [f] + rw [heq] + exact (tsupport_add _ _).trans (union_subset_union_right _ (show tsupport (fun p => (β p)^2) ⊆ tsupport β from by + apply closure_mono + intro p hp + exact fun hz => hp (by change (β p)^2 = 0; rw [hz,zero_pow (by decide : 2 ≠ 0)]))) + apply hs.trans + apply union_subset (hsupp iq) + simpa only [V,show (iq : M) = q from rfl,ite_eq_left rfl] using hβU + · simpa only [f,ite_eq_right hi,add_zero] using hsupp i + obtain ⟨w,hw,hwnon,hwpos,hwsupp,hwsum⟩ := normalize_finite_positive_cutoffs f hf hfnon hfcover + have hwV (i : t) : tsupport (w i) ⊆ V i := by rw [hwsupp]; exact hfV i + have hwchart (i : t) : tsupport (w i) ⊆ (chart (i : M)).source := by + intro p hp + have hv := hwV i hp + by_cases hi : (i : M) = q + · have hu : p ∈ U := by simpa only [V,ite_eq_left hi] using hv + simpa only [hi] using hUs hu + · have hh : p ∈ (chart (i : M)).source ∧ p ∉ ({q} : Set M) := by + simpa only [V,ite_eq_right hi,mem_sdiff] using hv + exact hh.1 + have hout : ∀ i : t, ∃ chi : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ chi ∧ tsupport chi ⊆ (chart (i : M)).source ∧ + ∀ p ∈ tsupport (w i), chi =ᶠ[𝓝 p] (fun _ => 1) := by + intro i + have hc : IsCompact (tsupport (w i)) := (isClosed_tsupport _).isCompact + obtain ⟨B,hB,hKB,hBc⟩ := hc.exists_isOpen_closure_subset + ((chart (i : M)).open_source.mem_nhdsSet.mpr (hwchart i)) + obtain ⟨O,hO,hKO,hOc⟩ := hc.exists_isOpen_closure_subset (hB.mem_nhdsSet.mpr hKB) + obtain ⟨chi,hchi,_,hchis,hchione⟩ := exists_contMDiff_support_eq_eq_one_iff + (I := planeModel) (n := (⊤ : ℕ∞)) hB isClosed_closure hOc + refine ⟨chi,hchi,?_,?_⟩ + · change closure (support chi) ⊆ _ + rw [hchis] + exact hBc + · intro p hp + filter_upwards [hO.mem_nhds (hKO hp)] with y hy + exact (hchione y).mp (subset_closure hy) + choose chi hchi hchis hchione using hout + let A : SmoothingAtlas M := + ⟨t,w,chi,hw,hwchart,hchi,hchis,fun i p hp => (hchione i p hp).eq_of_nhds,hwsum⟩ + refine ⟨A,iq,rfl,?_,?_,hwnon,hchione⟩ + · intro p hp + apply (hwpos iq p).mpr + change 0 < ψ iq p + if iq = iq then (β p)^2 else 0 + rw [ite_eq_left rfl,(hβone p).mp hp] + linarith [hnon iq p] + · simpa only [V,show (iq : M) = q from rfl,ite_eq_left rfl] using hwV iq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPlateau.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPlateau.lean new file mode 100644 index 0000000000000000000000000000000000000000..f365c0050b545f8a7b5c1aaf285f7fd83e427ef7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/PrescribedAtlasPlateau.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasOuterPlateau + +namespace OAI + +/-! Choose the analytic atlas patch with both its weight support and its +outer plateau prescribed by the primitive's compact neighborhood. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] + +theorem exists_smoothingAtlas_prescribed_plateau (q : M) {K U P : Set M} + (hK : IsCompact K) (hqK : q ∈ K) (hU : IsOpen U) (hKU : K ⊆ U) + (hUs : U ⊆ (chart q).source) (hP : IsCompact P) (hPs : P ⊆ (chart q).source) : + ∃ (A : SmoothingAtlas M) (i : A.centers), (i : M) = q ∧ + (∀ p ∈ K, 0 < A.weight i p) ∧ tsupport (A.weight i) ⊆ U ∧ + (∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) ∧ + ∀ p ∈ P, A.outer i =ᶠ[𝓝 p] (fun _ => 1) := by + obtain ⟨A,i,hiq,hpos,hsupp,_hnon,ho⟩ := exists_smoothingAtlas_prescribed_patch q hK hqK hU hKU hUs + have hPs' : P ⊆ (chart (i : M)).source := by simpa only [hiq] using hPs + obtain ⟨B,hcenters,hw,hout,hplateau⟩ := A.enlarge_outer_plateau i hP hPs' ho + have hcast {s t : Finset M} (h : s = t) (j : s) : + ((h ▸ j : t) : M) = (j : M) := by + subst t + rfl + refine ⟨B,hcenters.symm ▸ i,(hcast hcenters.symm i).trans hiq,?_,?_,hout,hplateau⟩ + · intro p hp + rw [hw] + exact hpos p hp + · have he : B.weight (hcenters.symm ▸ i) = A.weight i := funext (hw i) + rwa [he] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticCutoffBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticCutoffBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..4088e9baa9581b58e4cb5eb71667f6b366337ad7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticCutoffBounds.lean @@ -0,0 +1,140 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.QuadraticJetCutoff + +namespace OAI + +/-! Uniform scale bounds for the local quadratic corrections. The fixed +cutoff operator makes the constants independent of the tensor and radius. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +local instance linearNormed : NormedAddCommGroup (Plane →L[ℝ] Space) := inferInstance +local instance linearSpace : NormedSpace ℝ (Plane →L[ℝ] Space) := inferInstance +abbrev SecondTensor := Plane →L[ℝ] Plane →L[ℝ] Space +local instance evalNormed : NormedAddCommGroup ((Plane →L[ℝ] Space) →L[ℝ] Space) := inferInstance +local instance evalSpace : NormedSpace ℝ ((Plane →L[ℝ] Space) →L[ℝ] Space) := inferInstance +local instance evTensorNormed : NormedAddCommGroup (SecondTensor →L[ℝ] (Plane →L[ℝ] Space)) := inferInstance +local instance evTensorSpace : NormedSpace ℝ (SecondTensor →L[ℝ] (Plane →L[ℝ] Space)) := inferInstance +local instance tensorNormed : NormedAddCommGroup SecondTensor := inferInstance +local instance tensorSpace : NormedSpace ℝ SecondTensor := inferInstance +local instance operatorNormed : NormedAddCommGroup (SecondTensor →L[ℝ] Space) := inferInstance +local instance operatorSpace : NormedSpace ℝ (SecondTensor →L[ℝ] Space) := inferInstance + +def unitJetCutoff : ContDiffBump (0 : Plane) := + ⟨1/2, 1, by norm_num, by norm_num⟩ + +def quadraticCutoffOperator (x : Plane) : SecondTensor →L[ℝ] Space := + ((- (1/2 : ℝ)) * unitJetCutoff x) • + ((ContinuousLinearMap.apply ℝ Space x).comp + (ContinuousLinearMap.apply ℝ (Plane →L[ℝ] Space) x)) + +lemma quadraticCutoffOperator_apply (x : Plane) (B : SecondTensor) : + quadraticCutoffOperator x B = cutoffQuadratic B 0 unitJetCutoff x := by + simp [quadraticCutoffOperator,cutoffQuadratic,quadraticCorrection,smul_smul,mul_comm] + +lemma quadraticCutoffOperator_smooth : ContDiff ℝ ∞ quadraticCutoffOperator := by + let ev₁ : Plane →L[ℝ] ((Plane →L[ℝ] Space) →L[ℝ] Space) := ContinuousLinearMap.apply ℝ Space + have h₁ : ContDiff ℝ ∞ (fun x : Plane => + (ContinuousLinearMap.apply ℝ Space x : (Plane →L[ℝ] Space) →L[ℝ] Space)) := by + exact ev₁.contDiff + let ev₂ : Plane →L[ℝ] (SecondTensor →L[ℝ] (Plane →L[ℝ] Space)) := + ContinuousLinearMap.apply ℝ (Plane →L[ℝ] Space) + have h₂ : ContDiff ℝ ∞ (fun x : Plane => + (ContinuousLinearMap.apply ℝ (Plane →L[ℝ] Space) x : SecondTensor →L[ℝ] (Plane →L[ℝ] Space))) := by + exact ev₂.contDiff + exact (contDiff_const.mul unitJetCutoff.contDiff).smul (h₁.clm_comp h₂) + +lemma quadraticCutoffOperator_compact : HasCompactSupport quadraticCutoffOperator := by + apply unitJetCutoff.hasCompactSupport.of_isClosed_subset isClosed_closure + apply closure_mono + intro x hx + contrapose! hx + simp only [Function.mem_support,not_not] at hx ⊢ + simp [quadraticCutoffOperator,hx] + +theorem uniform_quadratic_cutoff_bound : ∃ C : ℝ, 0 ≤ C ∧ + ∀ B : SecondTensor, ∀ j ≤ 2, ∀ x : Plane, + ‖iteratedFDeriv ℝ j (cutoffQuadratic B 0 unitJetCutoff) x‖ ≤ C*‖B‖ := by + obtain ⟨C,hC,hb⟩ := quadraticCutoffOperator_compact.exists_bound_iteratedFDeriv (𝕜 := ℝ) + quadraticCutoffOperator_smooth 2 + refine ⟨C,hC,?_⟩ + intro B j hj x + have he : cutoffQuadratic B 0 unitJetCutoff = fun y => quadraticCutoffOperator y B := by + funext y + exact (quadraticCutoffOperator_apply y B).symm + rw [he] + calc + _ ≤ ‖B‖*‖iteratedFDeriv ℝ j quadraticCutoffOperator x‖ := + norm_iteratedFDeriv_clm_apply_const quadraticCutoffOperator_smooth.contDiffAt (by simp) + _ ≤ ‖B‖*C := mul_le_mul_of_nonneg_left (hb j hj x) (norm_nonneg _) + _ = C*‖B‖ := mul_comm _ _ + +def scaledQuadraticCutoff (B : SecondTensor) (p : Plane) (r : ℝ) (x : Plane) : Space := + r^2 • cutoffQuadratic B 0 unitJetCutoff (r⁻¹ • (x-p)) + +lemma scaledQuadraticCutoff_smooth (B : SecondTensor) (p : Plane) (r : ℝ) : + ContDiff ℝ ∞ (scaledQuadraticCutoff B p r) := + ((cutoffQuadratic_smooth B 0 unitJetCutoff).comp + ((contDiff_id.sub contDiff_const).const_smul r⁻¹)).const_smul (r^2) + +lemma scaledQuadraticCutoff_germ (B : SecondTensor) (p : Plane) {r : ℝ} (hr : 0 < r) : + scaledQuadraticCutoff B p r =ᶠ[𝓝 p] quadraticCorrection B p := by + have hc : Continuous (fun x : Plane => r⁻¹ • (x-p)) := by fun_prop + have ht : Tendsto (fun x : Plane => r⁻¹ • (x-p)) (𝓝 p) (𝓝 0) := by + simpa only [sub_self,smul_zero] using hc.continuousAt.tendsto (x := p) + have he := (cutoffQuadratic_germ B 0 unitJetCutoff).comp_tendsto ht + filter_upwards [he] with x hx + simp only [Function.comp_apply] at hx + unfold scaledQuadraticCutoff + rw [hx] + simp only [quadraticCorrection,sub_zero,map_smul,smul_apply,smul_smul] + congr 1 + field_simp [hr.ne'] + +lemma scaledQuadraticCutoff_tsupport (B : SecondTensor) (p : Plane) {r : ℝ} (hr : 0 < r) : + tsupport (scaledQuadraticCutoff B p r) ⊆ closedBall p r := by + apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hball + have hn : r ≤ ‖x-p‖ := (not_le.mp (by simpa only [mem_closedBall_iff_norm] using hball)).le + have hd : 1 ≤ dist (r⁻¹ • (x-p)) 0 := by + rw [dist_zero_right,norm_smul,Real.norm_eq_abs,abs_inv,abs_of_pos hr] + simpa only [div_eq_inv_mul] using (one_le_div hr).mpr hn + have hz := unitJetCutoff.zero_of_le_dist hd + simp [scaledQuadraticCutoff,cutoffQuadratic,hz] at hx + +lemma scaledQuadraticCutoff_norm_deriv (B : SecondTensor) (p : Plane) {r : ℝ} + (hr : 0 < r) (j : ℕ) (x : Plane) : + r^j * ‖iteratedFDeriv ℝ j (scaledQuadraticCutoff B p r) x‖ = + r^2 * ‖iteratedFDeriv ℝ j (cutoffQuadratic B 0 unitJetCutoff) + (r⁻¹ • (x-p))‖ := by + have hs := cutoffQuadratic_smooth B 0 unitJetCutoff + have hc : ContDiff ℝ ∞ (fun x : Plane => + cutoffQuadratic B 0 unitJetCutoff (r⁻¹ • (x-p))) := + hs.comp ((contDiff_id.sub contDiff_const).const_smul r⁻¹) + unfold scaledQuadraticCutoff + rw [iteratedFDeriv_const_smul_apply' (hc.of_le (by simp)).contDiffAt] + rw [iteratedFDeriv_comp_sub (f := fun y => cutoffQuadratic B 0 unitJetCutoff (r⁻¹ • y)) j p x] + rw [congrFun (iteratedFDeriv_comp_const_smul r⁻¹ (hs.of_le (by simp))) (x-p)] + rw [norm_smul,norm_smul] + simp only [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg r),abs_pow,abs_inv,abs_of_pos hr, + inv_pow] + field_simp [hr.ne'] + +/-- The three orders have sizes O(r²), O(r), O(1), with one constant for +all tensors and all positive radii. -/ +theorem uniform_scaled_quadratic_bounds : ∃ C : ℝ, 0 ≤ C ∧ + ∀ (B : SecondTensor) (p : Plane) (r : ℝ), 0 < r → ∀ j ≤ 2, ∀ x : Plane, + r^j * ‖iteratedFDeriv ℝ j (scaledQuadraticCutoff B p r) x‖ ≤ C*‖B‖*r^2 := by + obtain ⟨C,hC,hb⟩ := uniform_quadratic_cutoff_bound + refine ⟨C,hC,?_⟩ + intro B p r hr j hj x + rw [scaledQuadraticCutoff_norm_deriv B p hr] + nlinarith [hb B j hj (r⁻¹ • (x-p))] + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticJetCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticJetCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..9907b0cac6aaabe9553b864852a951ef7c0f8200 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticJetCutoff.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedJetCorrection + +namespace OAI + +/-! The local quadratic correction in the finite-point spherical preparation. +The cutoff leaves its prescribed second jet unchanged. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +def quadraticCorrection (B : Plane →L[ℝ] Plane →L[ℝ] Space) (p x : Plane) : Space := + (- (1 / 2 : ℝ)) • B (x-p) (x-p) + +lemma quadraticCorrection_smooth (B : Plane →L[ℝ] Plane →L[ℝ] Space) (p : Plane) : + ContDiff ℝ ∞ (quadraticCorrection B p) := by + unfold quadraticCorrection + exact ((B.contDiff.comp (contDiff_id.sub contDiff_const)).clm_apply + (contDiff_id.sub contDiff_const)).const_smul _ + +lemma quadraticCorrection_fderiv (B : Plane →L[ℝ] Plane →L[ℝ] Space) + (hB : ∀ v w, B v w = B w v) (p x : Plane) : + fderiv ℝ (quadraticCorrection B p) x = - B (x-p) := by + have hd := (B.hasFDerivAt_of_bilinear ((hasFDerivAt_id x).sub_const p) + ((hasFDerivAt_id x).sub_const p)).const_smul (- (1 / 2 : ℝ)) + change HasFDerivAt (quadraticCorrection B p) _ x at hd + rw [hd.fderiv] + apply ContinuousLinearMap.ext + intro v + change (- (1/2 : ℝ)) • (B (x-p) v + B v (x-p)) = -(B (x-p) v) + rw [hB v (x-p)] + module + +lemma quadraticCorrection_second (B : Plane →L[ℝ] Plane →L[ℝ] Space) + (hB : ∀ v w, B v w = B w v) (p x v w : Plane) : + fderiv ℝ (fderiv ℝ (quadraticCorrection B p)) x v w = - B v w := by + have he : fderiv ℝ (quadraticCorrection B p) = fun x => -B (x-p) := + funext (quadraticCorrection_fderiv B hB p) + rw [he] + have hd := (B.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const p)).neg + change HasFDerivAt (fun x => -B (x-p)) _ x at hd + rw [hd.fderiv] + simp + +def cutoffQuadratic (B : Plane →L[ℝ] Plane →L[ℝ] Space) (p : Plane) + (χ : ContDiffBump p) (x : Plane) : Space := χ x • quadraticCorrection B p x + +lemma cutoffQuadratic_smooth (B : Plane →L[ℝ] Plane →L[ℝ] Space) (p : Plane) + (χ : ContDiffBump p) : ContDiff ℝ ∞ (cutoffQuadratic B p χ) := + χ.contDiff.smul (quadraticCorrection_smooth B p) + +lemma cutoffQuadratic_germ (B : Plane →L[ℝ] Plane →L[ℝ] Space) (p : Plane) + (χ : ContDiffBump p) : cutoffQuadratic B p χ =ᶠ[𝓝 p] quadraticCorrection B p := by + filter_upwards [χ.eventuallyEq_one] with x hx + simp [cutoffQuadratic, hx] + +lemma cutoffQuadratic_jets (B : Plane →L[ℝ] Plane →L[ℝ] Space) + (hB : ∀ v w, B v w = B w v) (p : Plane) (χ : ContDiffBump p) : + cutoffQuadratic B p χ p = 0 ∧ fderiv ℝ (cutoffQuadratic B p χ) p = 0 ∧ + ∀ v w, fderiv ℝ (fderiv ℝ (cutoffQuadratic B p χ)) p v w = -B v w := by + have he := cutoffQuadratic_germ B p χ + refine ⟨?_, ?_, ?_⟩ + · simp [cutoffQuadratic,quadraticCorrection] + · rw [he.fderiv_eq,quadraticCorrection_fderiv B hB] + simp + · intro v w + rw [he.fderiv.fderiv_eq,quadraticCorrection_second B hB] + +lemma cutoffQuadratic_tsupport (B : Plane →L[ℝ] Plane →L[ℝ] Space) + (p : Plane) (χ : ContDiffBump p) : + tsupport (cutoffQuadratic B p χ) ⊆ closedBall p χ.rOut := by + rw [← χ.tsupport_eq] + change tsupport (fun x => χ x • quadraticCorrection B p x) ⊆ tsupport χ + exact tsupport_smul_subset_left χ (quadraticCorrection B p) + +lemma cutoffQuadratic_compact (B : Plane →L[ℝ] Plane →L[ℝ] Space) + (p : Plane) (χ : ContDiffBump p) : HasCompactSupport (cutoffQuadratic B p χ) := + χ.hasCompactSupport.smul_right + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticPhaseCatalog.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticPhaseCatalog.lean new file mode 100644 index 0000000000000000000000000000000000000000..36e24e5a5b9f78119456bd9fef6c918b83ac82fa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QuadraticPhaseCatalog.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.Immersion.ClosedSurface.QuadraticSupport + +namespace OAI + +/-! All quadratic phases generated by a fixed finite stock remain in one +fixed finite stock, independently of the number of repeated grid labels. -/ +noncomputable section +open scoped BigOperators ContDiff +namespace ClosedSurfaceR4.RealModes + +def quadraticPhaseCatalog (Γ : Finset (SmallModes.Base → ℝ)) : + Finset (SmallModes.Base → ℝ) := by + classical + exact Γ.image (fun f x => 2*f x) ∪ + (Γ.product Γ).image (fun p x => p.1 x-p.2 x) ∪ + (Γ.product Γ).image (fun p x => p.1 x+p.2 x) + +lemma quadraticPhase_mem_catalog {ι : Type*} (Γ : Finset (SmallModes.Base → ℝ)) + (φ : ι → SmallModes.Base → ℝ) (hφ : ∀ i, φ i ∈ Γ) (l : QuadraticLabel ι) : + quadraticPhase φ l ∈ quadraticPhaseCatalog Γ := by + classical + rcases l with i | ⟨i,j,b⟩ + · exact Finset.mem_union_left _ (Finset.mem_union_left _ + (Finset.mem_image.mpr ⟨φ i,hφ i,rfl⟩)) + · cases b with + | false => + exact Finset.mem_union_right _ (Finset.mem_image.mpr + ⟨(φ i,φ j),Finset.mem_product.mpr ⟨hφ i,hφ j⟩,rfl⟩) + | true => + exact Finset.mem_union_left _ (Finset.mem_union_right _ + (Finset.mem_image.mpr ⟨(φ i,φ j),Finset.mem_product.mpr ⟨hφ i,hφ j⟩,rfl⟩)) + +lemma quadraticPhaseCatalog_smooth (Γ : Finset (SmallModes.Base → ℝ)) + (hΓ : ∀ f ∈ Γ, ContDiff ℝ ∞ f) : + ∀ f ∈ quadraticPhaseCatalog Γ, ContDiff ℝ ∞ f := by + classical + intro f hf + rcases Finset.mem_union.mp hf with hf | hf + · rcases Finset.mem_union.mp hf with hf | hf + · obtain ⟨g,hg,rfl⟩ := Finset.mem_image.mp hf + exact contDiff_const.mul (hΓ g hg) + · obtain ⟨⟨g,h⟩,hp,rfl⟩ := Finset.mem_image.mp hf + exact (hΓ g (Finset.mem_product.mp hp).1).sub (hΓ h (Finset.mem_product.mp hp).2) + · obtain ⟨⟨g,h⟩,hp,rfl⟩ := Finset.mem_image.mp hf + exact (hΓ g (Finset.mem_product.mp hp).1).add (hΓ h (Finset.mem_product.mp hp).2) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/QualitativePhaseTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QualitativePhaseTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..9400c61e4bd1f29da53bb142e2b1943eef9b6f3b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/QualitativePhaseTransfer.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.Immersion.ClosedSurface.AtlasPhases + +namespace OAI + +/-! Good phase directions pass between surface coordinate charts. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry + +lemma PhaseGeometry.Good.tensor_ne_zero {n : ℕ} {B : Fin 3 → RVec n} {ξ : Base} + (h : Good B ξ) : B ≠ 0 := by + intro hz + apply h.2 + simp [hz,secondQuadratic] + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +/-- The quantitative overlap theorem implies the qualitative phase +condition, with no externally supplied determinant or size constants. -/ +theorem actual_phase_good_at {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (q p : M) {a : M} + (hap : a ∈ (coordinateChart p).source) (haq : a ∈ (coordinateChart q).source) + (ξ : Base) + (hD : NormalFrame.gramDet + (coordDeriv dx (coordinateMap F q) (coordinateChart q a)) + (coordDeriv dy (coordinateMap F q) (coordinateChart q a)) ≠ 0) + (hgood : Good (realSecondTensor (coordinateMap F q) (coordinateChart q a)) ξ) : + Good (realSecondTensor (coordinateMap F p) (coordinateChart p a)) + (atlasPhaseCovector q p ξ a) := by + let B := realSecondTensor (coordinateMap F q) (coordinateChart q a) + let c := ‖secondQuadratic B (-ξ.2,ξ.1)‖ + let ε := c/(‖B‖+1) + have hc : 0 < c := norm_pos_iff.mpr hgood.2 + have hd : 0 < ‖B‖+1 := by positivity + have hε : 0 < ε := div_pos hc hd + have hm : ε*‖B‖ ≤ c := by + calc + ε*‖B‖ ≤ ε*(‖B‖+1) := mul_le_mul_of_nonneg_left (by linarith) hε.le + _ = c := by dsimp [ε]; field_simp + obtain ⟨η,L,_,_,ht⟩ := compact_overlap_phase_margin + (K := ({a} : Set M)) isCompact_singleton q p + (fun x hx => by simpa only [mem_singleton_iff.mp hx] using hap) + (fun x hx => by simpa only [mem_singleton_iff.mp hx] using haq) + have hx : coordinateChart p a ∈ coordinateChart p '' ({a} : Set M) := + ⟨a,by simp,rfl⟩ + have he := coordinateTransition_apply_chart q p hap + have hresult := ht F hF (coordinateChart p a) hx ξ ε hε + (by simpa only [he] using hD) + (by simpa only [he] using hgood.tensor_ne_zero) + (by simpa only [he] using hm) + have hx' := coordinateTransition_mem_chart q p hap haq + simpa only [atlasPhaseCovector,actual_phase_differential q p ξ hx'] using hresult.2.2.1 + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RadialFormCoordinateTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RadialFormCoordinateTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b5214b221a78f46bcdf77906b389ff1b4321724 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RadialFormCoordinateTransfer.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalSecondFormNaturality +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredAtlasDifferentials + +namespace OAI + +/-! The pure radial form is independent of the selected surface chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold Matrix +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +lemma radial_form_coordinate_transfer {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (q p a : M) (haq : a ∈ (coordinateChart q).source) + (hap : a ∈ (coordinateChart p).source) + (hD : NormalFrame.gramDet (coordDeriv dx (coordinateMap F q) (coordinateChart q a)) + (coordDeriv dy (coordinateMap F q) (coordinateChart q a)) ≠ 0) + (n : RVec 4) (r : ℝ) + (hB : ∀ v w, realSecondForm (coordinateMap F q) v w (coordinateChart q a) = + (r⁻¹*(coordDeriv v (coordinateMap F q) (coordinateChart q a) ⬝ᵥ + coordDeriv w (coordinateMap F q) (coordinateChart q a))) • n) + (v w : Base) : + realSecondForm (coordinateMap F p) v w (coordinateChart p a) = + (r⁻¹*(coordDeriv v (coordinateMap F p) (coordinateChart p a) ⬝ᵥ + coordDeriv w (coordinateMap F p) (coordinateChart p a))) • n := by + have hx := coordinateTransition_mem_chart q p hap haq + have he := coordinateTransition_apply_chart q p hap + have ht : coordinateTransition q p (coordinateChart p a) ∈ coordinateDomain q := by + rw [he,← coordinateChart_target] + exact (coordinateChart q).map_source haq + have hb := pure_radial_comp_on (coordinateTransition q p).open_source + (coordinateDomain_open q) (coordinateMap_smoothOn hF q) + (coordinateTransition_smoothOn q p) hx ht + (by simpa only [he] using hD) (coordinateTransition_det_ne q p hx) n r + (by simpa only [he] using hB) v w + have hg := coordinateMap_transition_eventuallyEq F q p hx + rw [(realSecondForm_eventuallyEq hg v w).eq_of_nhds, + (coordDeriv_eventuallyEq hg v).eq_of_nhds, + (coordDeriv_eventuallyEq hg w).eq_of_nhds] at hb + exact hb + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f4c0d1cf40266259717ad75c1d4873691a440b5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealPhaseChart.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.JetMetricCoordinatePullback + +namespace OAI + +/-! The actual phase chart in the real pair coordinates used by curvature. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial + +def realPhaseChart (e : OpenPartialHomeomorph Base Base) : + OpenPartialHomeomorph SmallModes.Base SmallModes.Base := + (planeCoordinateIsometry.symm.toHomeomorph.transOpenPartialHomeomorph e).transHomeomorph + planeCoordinateIsometry.toHomeomorph + +lemma realPhaseChart_apply (e : OpenPartialHomeomorph Base Base) (x : SmallModes.Base) : + realPhaseChart e x = planeCoordinateIsometry (e (planeCoordinateIsometry.symm x)) := rfl + +lemma realPhaseChart_symm_apply (e : OpenPartialHomeomorph Base Base) (x : SmallModes.Base) : + (realPhaseChart e).symm x = planeCoordinateIsometry (e.symm (planeCoordinateIsometry.symm x)) := rfl + +lemma realPhaseChart_source (e : OpenPartialHomeomorph Base Base) : + (realPhaseChart e).source = planeCoordinateIsometry.symm ⁻¹' e.source := rfl + +lemma realPhaseChart_target (e : OpenPartialHomeomorph Base Base) : + (realPhaseChart e).target = planeCoordinateIsometry.symm ⁻¹' e.target := rfl + +lemma realPhaseChart_smooth (e : OpenPartialHomeomorph Base Base) (he : ContDiff ℝ ∞ e) : + ContDiff ℝ ∞ (realPhaseChart e) := + planeCoordinateIsometry.contDiff.comp (he.comp planeCoordinateIsometry.symm.contDiff) + +lemma realPhaseChart_symm_smooth (e : OpenPartialHomeomorph Base Base) (hi : ContDiff ℝ ∞ e.symm) : + ContDiff ℝ ∞ (realPhaseChart e).symm := + planeCoordinateIsometry.contDiff.comp (hi.comp planeCoordinateIsometry.symm.contDiff) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealTensorChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealTensorChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..fb35218ecbefad3d7ff58e5cc7824856552eb69d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RealTensorChart.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartBounds + +namespace OAI + +/-! Supported pullback of real symmetric two-tensors. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open PhaseMean WeightedEstimates +variable (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (K : Compacts SmallModes.Base) + (hK : (K : Set SmallModes.Base) ⊆ e.source) + +lemma realTensorChartPull_zero (f : SupportedField (F := Tensor) (chartSupport e K hK)) : + ∀ x ∈ e.source, x ∉ (K : Set SmallModes.Base) → pullbackField e x (f (e x)) = 0 := by + intro x hx hn + rw [chartPull_zero e K hK f x hx hn, map_zero] + +def realTensorChartPull (f : SupportedField (F := Tensor) (chartSupport e K hK)) : + SupportedField (F := Tensor) K := + ContDiffMapSupportedIn.of_support_subset + (contDiff_indicator_of_support e.open_source K.isCompact.isClosed hK + (contDiffOn_pullbackField_apply e.open_source (f.contDiff.comp_contDiffOn he) he) + (realTensorChartPull_zero e K hK f)) + (subset_closure.trans (tsupport_indicator_subset K.isCompact.isClosed + (realTensorChartPull_zero e K hK f))) + +@[simp] lemma realTensorChartPull_apply + (f : SupportedField (F := Tensor) (chartSupport e K hK)) (x : SmallModes.Base) : + realTensorChartPull e he K hK f x = + e.source.indicator (fun x => pullbackField e x (f (e x))) x := rfl + +lemma realTensorChartPull_sub (f g : SupportedField (F := Tensor) (chartSupport e K hK)) : + realTensorChartPull e he K hK (f - g) = + realTensorChartPull e he K hK f - realTensorChartPull e he K hK g := by + apply DFunLike.ext + intro x + by_cases hx : x ∈ e.source <;> simp [realTensorChartPull_apply, hx, map_sub] + +lemma realTensorChartPull_bound {s : ℝ≥0} {J D : ℝ} {m : ℕ} + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hJ : 1 ≤ J) (hD : 0 ≤ D) + (hderiv : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (hfield : ∀ v, ‖v‖ ≤ 1 → WeightedBound e.source s m D (SmallModes.coordDeriv v e)) + (f : SupportedField (F := Tensor) (chartSupport e K hK)) : + supportedWeightedSeminorm K s m (realTensorChartPull e he K hK f) ≤ + tensorChartBudget m J D * supportedWeightedSeminorm (chartSupport e K hK) s m f := by + have hN : 0 ≤ supportedWeightedSeminorm (chartSupport e K hK) s m f := apply_nonneg _ _ + have hb := ((weightedBound_of_supportedSeminorm s m f).restrict_open e.open_target).comp_coordinates + e.open_source.uniqueDiffOn e.open_target.uniqueDiffOn hs hs1 hJ hN he + f.contDiff.contDiffOn (fun _ hx => e.map_source hx) hderiv + have ht := weighted_pullbackField_apply e.open_source hs (by positivity) hD + (f.contDiff.comp_contDiffOn he) he hb hfield + have hg := ht.indicator_of_support e.open_source K.isCompact.isClosed hK + (by positivity) (realTensorChartPull_zero e K hK f) + apply supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans hJ) hD) hN) + convert hg using 1 <;> first | rfl | (unfold tensorChartBudget; ring) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferenceCoordinateData.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferenceCoordinateData.lean new file mode 100644 index 0000000000000000000000000000000000000000..595a5d4894fb900c0eb488ed2d8bfcbd3385f72e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferenceCoordinateData.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveCoordinateData +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceCoefficientLower +import OAI.Geometry.SurfaceImmersion.Geometry.ReferenceMetricStability + +namespace OAI + +/-! Size, identity and positivity of the fixed reference data in any active +chart. The constants precede every independent radius and phase choice. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance refDataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance refDataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance refDataDualNormed : NormedAddCommGroup (TensorFiber →L[ℝ] ℝ) := inferInstance +local instance refDataDualSpace : NormedSpace ℝ (TensorFiber →L[ℝ] ℝ) := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] [T2Space M] +local instance refDataDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refDataDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance refDataSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance refDataSectionSpace (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 coordinateReference (i : d.B.centers) (p : M) : PrimitiveAmplitudeData (d.B.centers × Fin 3) := + d.B.primitiveCoordinateData d.basis (fun a => d.B.weight a.1) d.globalPhases gref.inner i + {a | p ∈ tsupport (d.B.weight a.1)} (chart (i : M) p) + +omit [CompactSpace M] in +lemma coordinateReference_identity (i : d.B.centers) {p : M} + (hp : p ∈ tsupport (d.B.weight i)) : + primitiveDataOperator (d.coordinateReference i p).1 = ContinuousLinearMap.id ℝ TensorFiber := by + classical + unfold coordinateReference + rw [d.B.primitiveCoordinateData_operator d.basis (fun a => d.B.weight a.1) d.globalPhases + (fun a => d.B.curvedAtlasPhase_smooth d.localPhases + (fun _ _ => PhaseGeometry.centeredConvexPhase_smooth _ _ _) a) + gref.inner i {a | p ∈ tsupport (d.B.weight a.1)} (d.B.weight_support i hp) + (fun a ha => image_eq_zero_of_notMem_tsupport ha),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 (R := ℝ) + (d.B.tensorTriv_domain i (d.B.weight_support i hp)) H + +omit [CompactSpace M] [T2Space M] in +lemma coordinateReference_coefficient (i : d.B.centers) (a : d.B.centers × Fin 3) + {p : M} (hi : p ∈ tsupport (d.B.weight i)) (ha : p ∈ tsupport (d.B.weight a.1)) : + (d.coordinateReference i p).1.1.1 a (d.coordinateReference i p).2 = + d.B.primitiveCoefficientField d.basis a p (gref.inner p) := by + classical + unfold coordinateReference SmoothingAtlas.primitiveCoordinateData + simp only [Set.mem_ofPred_eq,ite_eq_left ha] + unfold SmoothingAtlas.coefficientFrameRead SmoothingAtlas.coefficientFrame + rw [(chart (i : M)).left_inv (d.B.weight_support i hi)] + change d.B.primitiveCoefficientField d.basis a p + ((d.B.tensorTriv i).symmL ℝ p ((d.B.tensorTriv i).continuousLinearMapAt ℝ p (gref.inner p))) = _ + erw [(d.B.tensorTriv i).symmL_continuousLinearMapAt (d.B.tensorTriv_domain i (d.B.weight_support i hi))] + +lemma coordinateReference_bound : ∃ D : ℝ, 1 ≤ D ∧ ∀ i p, + p ∈ tsupport (d.B.weight i) → ‖d.coordinateReference i p‖ ≤ D := by + classical + obtain ⟨Dq,hDq,hq⟩ := d.B.coefficientFrame_bound d.basis + (fun a _p hp => d.basis_smooth a.1 hp a.2) + choose Dv hDv hv using fun a => d.B.covectorFrame_bound (d.globalPhases a) + (d.B.curvedAtlasPhase_smooth d.localPhases (fun _ _ => PhaseGeometry.centeredConvexPhase_smooth _ _ _) a) + choose H hH using fun i => (d.B.chartWeightCompact i).isCompact.exists_bound_of_continuousOn + (d.chartReference_smooth i).continuous.continuousOn + let D := 1+Dq+(∑ a, Dv a)+(∑ i, |H i|) + have hsumv := Finset.sum_nonneg (s := Finset.univ) (fun a _ => zero_le_one.trans (hDv a)) + have hsumH := Finset.sum_nonneg (s := Finset.univ) (fun i _ => abs_nonneg (H i)) + have hD : 1 ≤ D := by dsimp only [D]; linarith + have hqD : Dq ≤ D := by dsimp only [D]; linarith + have hvD (a : d.B.centers × Fin 3) : Dv a ≤ D := by + have hh := Finset.single_le_sum (fun a _ => zero_le_one.trans (hDv a)) (Finset.mem_univ a) + dsimp only [D]; linarith + have hHD (i : d.B.centers) : H i ≤ D := by + have hh := Finset.single_le_sum (fun i _ => abs_nonneg (H i)) (Finset.mem_univ i) + have := le_abs_self (H i) + dsimp only [D]; linarith + refine ⟨D,hD,?_⟩ + intro i p hp + have hs := d.B.weight_support i hp + have hn : 0 ≤ D := zero_le_one.trans hD + unfold coordinateReference SmoothingAtlas.primitiveCoordinateData + simp only [(chart (i : M)).left_inv hs] + apply max_le + · apply max_le + · apply max_le + · apply (pi_norm_le_iff_of_nonneg hn).mpr + intro a + change ‖if p ∈ tsupport (d.B.weight a.1) then + d.B.coefficientFrameRead d.basis i a (chart (i : M) p) else 0‖ ≤ D + split_ifs with ha + · change ‖d.B.coefficientFrame d.basis i a ((chart (i : M)).symm (chart (i : M) p))‖ ≤ D + rw [(chart (i : M)).left_inv hs] + exact (hq i a p hp ha).trans hqD + · simpa only [norm_zero] using hn + · apply (pi_norm_le_iff_of_nonneg hn).mpr + intro a + have hh := Finset.single_le_sum (fun b _ => sq_nonneg (d.B.weight b p)) (Finset.mem_univ a.1) + rw [d.B.partition p] at hh + have hab : |d.B.weight a.1 p| ≤ 1 := by nlinarith [sq_abs (d.B.weight a.1 p),abs_nonneg (d.B.weight a.1 p)] + exact (show ‖d.B.weight a.1 p‖ ≤ 1 by simpa only [Real.norm_eq_abs] using hab).trans hD + · apply (pi_norm_le_iff_of_nonneg hn).mpr + intro a + change ‖if p ∈ tsupport (d.B.weight a.1) then + d.B.phaseCovectorRead i (d.globalPhases a) (chart (i : M) p) else 0‖ ≤ D + split_ifs with ha + · have he := d.B.covectorFrame_mfderiv (d.globalPhases a) + (d.B.curvedAtlasPhase_smooth d.localPhases (fun _ _ => PhaseGeometry.centeredConvexPhase_smooth _ _ _) a) i hs + unfold SmoothingAtlas.phaseCovectorRead + rw [← he] + exact (hv a i p hp).trans (hvD a) + · simpa only [norm_zero] using hn + · change ‖(d.B.tensorTriv i).continuousLinearMapAt ℝ + ((chart (i : M)).symm (chart (i : M) p)) + (gref.inner ((chart (i : M)).symm (chart (i : M) p)))‖ ≤ D + rw [(chart (i : M)).left_inv hs,d.B.tensor_frame_read i gref.inner gref.symm hp] + exact (hH i (chart (i : M) p) ⟨p,hp,rfl⟩).trans (hHD i) + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferencePhaseC1.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferencePhaseC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a337749e5687602e3712f71a08ec2b382b0b602 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ReferencePhaseC1.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ReferencePerturbationStability +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseCovectorFamily + +namespace OAI + +/-! A fixed first-jet budget for every phase in the reference parameter balls. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace ReferenceCircularAtlas +variable {A : SmoothingAtlas M} {gref g : SmoothMetric M} {c C : ℝ} + (d : ReferenceCircularAtlas A gref g c C) + +theorem perturbed_phase_C1_bound : ∃ D : ℝ, 1 ≤ D ∧ + ∀ ell : d.B.centers → Fin 3 → SmallModes.Base, + (∀ i j, ‖ell i j-(d.P i).ξ j‖ ≤ 1) → + ∀ (i : d.B.centers) (a : d.B.centers × Fin 3) p, + p ∈ tsupport (d.B.weight i) → + ‖d.B.phaseCovectorRead i (d.perturbedPhases ell a) (chart (i : M) p)‖ ≤ D ∧ + ‖fderiv ℝ (d.B.phaseCovectorRead i (d.perturbedPhases ell a)) (chart (i : M) p)‖ ≤ D := by + classical + choose D hD hbound using fun k : d.B.centers × (d.B.centers × Fin 3) => + d.B.circular_covector_parameter_bound k.2.1 k.1 (d.L k.2.1) + (isCompact_closedBall ((d.P k.2.1).ξ k.2.2) 1) + let E := 1+∑ k, D k + have hsum := Finset.sum_nonneg (s := Finset.univ) (fun k _ => zero_le_one.trans (hD k)) + refine ⟨E,by dsimp only [E]; linarith,?_⟩ + intro ell hell i a p hp + have he : ell a.1 a.2 ∈ Metric.closedBall ((d.P a.1).ξ a.2) 1 := by + simpa only [Metric.mem_closedBall,dist_eq_norm] using hell a.1 a.2 + have h := hbound (i,a) (ell a.1 a.2) he (chart (i : M) p) ⟨p,hp,rfl⟩ + have hle : D (i,a) ≤ E := by + have hh := Finset.single_le_sum (fun k _ => zero_le_one.trans (hD k)) (Finset.mem_univ (i,a)) + dsimp only [E]; linarith + exact ⟨h.1.trans hle,h.2.trans hle⟩ + +end ReferenceCircularAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCoordinateSard.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCoordinateSard.lean new file mode 100644 index 0000000000000000000000000000000000000000..afbd59058eff23c4ea32792679f454543991731a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCoordinateSard.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CriticalSetClosed +import OAI.Geometry.SurfaceImmersion.Atlas.ScalarSubmersionChart + +namespace OAI + +/-! A nonzero first coordinate of the derivative reduces the critical +value problem by one source and one target dimension. -/ +noncomputable section +open Set Filter Metric MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E H G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] [NormedAddCommGroup H] [NormedSpace ℝ H] + [FiniteDimensional ℝ H] [NormedAddCommGroup G] [NormedSpace ℝ G] + [FiniteDimensional ℝ G] [MeasureSpace G] [BorelSpace G] [SFinite (volume : Measure G)] + +theorem regular_coordinate_critical_local_null + (hdim : Module.finrank ℝ E = Module.finrank ℝ H + 1) + (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 → ℝ × G} (hf : ContDiff ℝ ∞ f) (p : E) + (hn : fderiv ℝ (fun x => (f x).1) p ≠ 0) : + ∃ U : Set E, IsOpen U ∧ p ∈ U ∧ + volume (f '' ({x | ¬ Function.Surjective (fderiv ℝ f x)} ∩ U)) = 0 := by + have hs : Function.Surjective (fderiv ℝ (fun x => (f x).1) p) := + surjective_of_nonzero_of_finrank_eq_one (by simp : Module.finrank ℝ ℝ = 1) + (show (fderiv ℝ (fun x => (f x).1) p).toLinearMap ≠ 0 from + fun h => hn (by ext v; exact congrArg (fun L => L v) h)) + obtain ⟨e,hpe,he,hec,hei⟩ := scalar_submersion_chart hdim hf.fst p hs + obtain ⟨r,hr,hrsub⟩ := nhds_basis_closedBall.mem_iff.mp (e.open_source.mem_nhds hpe) + let C := {x | ¬ Function.Surjective (fderiv ℝ f x)} + let K := C ∩ closedBall p r + have hK : IsCompact K := (isCompact_closedBall p r).inter_left (smooth_critical_set_closed hf) + let ψ : (ℝ × H) → ℝ × G := f ∘ e.symm + have hψ : ContDiffOn ℝ ∞ ψ e.target := hf.comp_contDiffOn hei + have hψfirst (z : ℝ × H) (hz : z ∈ e.target) : (ψ z).1 = z.1 := by + change (f (e.symm z)).1 = z.1 + rw [← he,e.right_inv hz] + have hKe : IsCompact (e '' K) := hK.image hec.continuous + have hKeT : e '' K ⊆ e.target := by + rintro z ⟨x,hx,rfl⟩ + exact e.map_source (hrsub hx.2) + have hcrit (z : ℝ × H) (hz : z ∈ e '' K) : + ¬ Function.Surjective (fderiv ℝ ψ z) := by + rcases hz with ⟨x,hx,rfl⟩ + have hxS := hrsub hx.2 + have heinv := (hei.contDiffAt (e.open_target.mem_nhds (e.map_source hxS))).differentiableAt (by simp) + have hd := ((hf.differentiable (by simp) (e.symm (e x))).hasFDerivAt.comp (e x) heinv.hasFDerivAt).fderiv + rw [e.left_inv hxS] at hd + intro hsurj + apply hx.1 + intro y + obtain ⟨v,hv⟩ := hsurj y + rw [hd] at hv + exact ⟨fderiv ℝ e.symm (e x) v,hv⟩ + have hnul : volume (ψ '' (e '' K)) = 0 := + split_sard_compact hsard e.open_target hψ hψfirst hKe hKeT hcrit + have heq : ψ '' (e '' K) = f '' K := by + rw [← image_comp] + apply image_congr + intro x hx + exact congrArg f (e.left_inv (hrsub hx.2)) + rw [heq] at hnul + refine ⟨ball p r,isOpen_ball,mem_ball_self hr,measure_mono_null (image_mono ?_) hnul⟩ + intro x hx + exact ⟨hx.1,ball_subset_closedBall hx.2⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCurveCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCurveCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..7ddb43af253619d811b7ee460b3d6f6f853c9fac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularCurveCoordinates.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactFramedCurveTube + +namespace OAI + +/-! Actual smooth target coordinates straightening a regular curve germ. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance curveChartNormed : NormedAddCommGroup (Base × ℝ) := inferInstance +local instance curveChartSpace : NormedSpace ℝ (Base × ℝ) := inferInstance + +theorem regular_curve_target_coordinates {c : ℝ → (Fin 3 → ℝ)} + (hc : ContDiff ℝ ∞ c) (t : ℝ) (ht : deriv c t ≠ 0) : + ∃ (e : OpenPartialHomeomorph (Base × ℝ) (Fin 3 → ℝ)) (U : Set ℝ), + IsOpen U ∧ t ∈ U ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target ∧ + ∀ s ∈ U, (0,s) ∈ e.source ∧ e (0,s) = c s := by + obtain ⟨a,ha⟩ := exists_curve_transverse_vector (deriv c) (contDiff_infty_iff_deriv.mp hc).2 + let T := framedCurveTube c a + have hT : ContDiff ℝ ∞ T := framedCurveTube_smooth hc a + have hD := framedCurveTube_regular_axis hc ha t ht + let R : (Base × ℝ) ≃L[ℝ] (Fin 3 → ℝ) := + ContinuousLinearEquiv.ofBijective (fderiv ℝ T (0,t)) + (LinearMap.ker_eq_bot.mpr hD.1) (LinearMap.range_eq_top.mpr hD.2) + have hd : HasFDerivAt T R.toContinuousLinearMap (0,t) := + (hT.differentiable (by simp) (0,t)).hasFDerivAt + let e₀ := hT.contDiffAt.toOpenPartialHomeomorph T hd (by simp) + let W : Set (Base × ℝ) := {z | IsUnit (R.symm.toContinuousLinearMap.comp (fderiv ℝ T z))} + have hcont : Continuous (fun z => R.symm.toContinuousLinearMap.comp (fderiv ℝ T z)) := + continuous_const.clm_comp (hT.continuous_fderiv (by simp)) + have hW : IsOpen W := Units.isOpen.preimage hcont + have htW : (0,t) ∈ W := by + apply ContinuousLinearMap.isUnit_iff_bijective.mpr + exact R.symm.bijective.comp hD + let e := e₀.restrOpen W hW + have he : (e : Base × ℝ → (Fin 3 → ℝ)) = T := rfl + have htE : (0,t) ∈ e.source := + ⟨hT.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),htW⟩ + let U : Set ℝ := (fun s => ((0 : Base),s)) ⁻¹' e.source + have hU : IsOpen U := e.open_source.preimage (continuous_const.prodMk continuous_id) + refine ⟨e,U,hU,htE,by simpa only [he] using hT,?_,?_⟩ + · intro y hy + obtain ⟨u,hu⟩ := (e.map_target hy).2 + let D := (ContinuousLinearEquiv.ofUnit u).trans R + have hde : D.toContinuousLinearMap = fderiv ℝ T (e.symm y) := by + apply ContinuousLinearMap.ext + intro v + change R ((u : (Base × ℝ) →L[ℝ] (Base × ℝ)) v) = _ + rw [hu] + exact R.apply_symm_apply _ + have hdy : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he,hde] + exact (hT.differentiable (by simp) _).hasFDerivAt + exact (e.contDiffAt_symm hy hdy (by rw [he]; exact hT.contDiffAt)).contDiffWithinAt + · intro s hs + refine ⟨hs,?_⟩ + change framedCurveTube c a (0,s) = c s + simp [framedCurveTube] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularPlaneChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularPlaneChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..eefded2798ef4ff328ba392c136df479dd7078d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularPlaneChart.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PlaneCurveCoordinates + +namespace OAI + +/-! A local smooth plane chart at an invertible derivative, retaining +its actual globally defined coordinate map. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem regular_plane_chart {F : Base → Base} (hF : ContDiff ℝ ∞ F) + (p : Base) (hreg : Function.Bijective (fderiv ℝ F p)) : + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (e : Base → Base) = F ∧ ContDiffOn ℝ ∞ e.symm e.target := by + let R : Base ≃L[ℝ] Base := ContinuousLinearEquiv.ofBijective (fderiv ℝ F p) + (LinearMap.ker_eq_bot.mpr hreg.1) (LinearMap.range_eq_top.mpr hreg.2) + have hd : HasFDerivAt F R.toContinuousLinearMap p := (hF.differentiable (by simp) p).hasFDerivAt + let e₀ := hF.contDiffAt.toOpenPartialHomeomorph F hd (by simp) + let W : Set Base := {x | IsUnit (fderiv ℝ F x)} + have hW : IsOpen W := Units.isOpen.preimage (hF.continuous_fderiv (by simp)) + let e := e₀.restrOpen W hW + have he : (e : Base → Base) = F := rfl + refine ⟨e,⟨hF.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp), + ContinuousLinearMap.isUnit_iff_bijective.mpr hreg⟩,he,?_⟩ + intro y hy + obtain ⟨u,hu⟩ := (e.map_target hy).2 + let D := ContinuousLinearEquiv.ofUnit u + have hdy : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he] + convert (hF.differentiable (by simp) _).hasFDerivAt using 1 + exact hu + exact (e.contDiffAt_symm hy hdy (by rw [he]; exact hF.contDiffAt)).contDiffWithinAt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularThreeChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularThreeChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbda63245adcb1ac6ea85baa11c123bfcb6fece1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RegularThreeChart.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RegularCurveCoordinates + +namespace OAI + +/-! Smooth local target charts at an invertible three-dimensional derivative. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance regularThreeNormed : NormedAddCommGroup (Base × ℝ) := inferInstance +local instance regularThreeSpace : NormedSpace ℝ (Base × ℝ) := inferInstance + +theorem regular_three_chart {F : Base × ℝ → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (z : Base × ℝ) (hreg : Function.Bijective (fderiv ℝ F z)) : + ∃ e : OpenPartialHomeomorph (Base × ℝ) (ProjectionTarget 3), + z ∈ e.source ∧ (e : Base × ℝ → ProjectionTarget 3) = F ∧ + ContDiffOn ℝ ∞ e.symm e.target := by + let R : (Base × ℝ) ≃L[ℝ] ProjectionTarget 3 := ContinuousLinearEquiv.ofBijective + (fderiv ℝ F z) (LinearMap.ker_eq_bot.mpr hreg.1) (LinearMap.range_eq_top.mpr hreg.2) + have hd : HasFDerivAt F R.toContinuousLinearMap z := + (hF.differentiable (by simp) z).hasFDerivAt + let e₀ := hF.contDiffAt.toOpenPartialHomeomorph F hd (by simp) + let W : Set (Base × ℝ) := {p | IsUnit (R.symm.toContinuousLinearMap.comp (fderiv ℝ F p))} + have hcont : Continuous (fun p => R.symm.toContinuousLinearMap.comp (fderiv ℝ F p)) := + continuous_const.clm_comp (hF.continuous_fderiv (by simp)) + have hW : IsOpen W := Units.isOpen.preimage hcont + have hzW : z ∈ W := ContinuousLinearMap.isUnit_iff_bijective.mpr (R.symm.bijective.comp hreg) + let e := e₀.restrOpen W hW + have he : (e : Base × ℝ → ProjectionTarget 3) = F := rfl + refine ⟨e,⟨hF.contDiffAt.mem_toOpenPartialHomeomorph_source hd (by simp),hzW⟩,he,?_⟩ + intro y hy + obtain ⟨u,hu⟩ := (e.map_target hy).2 + let D := (ContinuousLinearEquiv.ofUnit u).trans R + have hde : D.toContinuousLinearMap = fderiv ℝ F (e.symm y) := by + apply ContinuousLinearMap.ext + intro v + change R ((u : (Base × ℝ) →L[ℝ] (Base × ℝ)) v) = _ + rw [hu] + exact R.apply_symm_apply _ + have hdy : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he,hde] + exact (hF.differentiable (by simp) _).hasFDerivAt + exact (e.contDiffAt_symm hy hdy (by rw [he]; exact hF.contDiffAt)).contDiffWithinAt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RelativePhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RelativePhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..59548ba037605da19b81b9869771e53aad4a650d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RelativePhaseCancellation.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedCompactCancellation + +namespace OAI + +/-! Relative phase margins supply the fixed compact noncritical region and +the explicit normal denominator needed by the actual cancellation theorem. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem relative_phase_polynomial_cancellation + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (K₀ : Compacts SmallModes.Base) + {ε b : ℝ} (hε : 0 < ε) (hb : 0 < b) : + ∃ (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 → (ε*b)⁻¹ ≤ D → + (∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ (K : Set SmallModes.Base), + b ≤ ‖RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x‖) → + (∀ x ∈ (K : Set SmallModes.Base), + ε*‖RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x‖ ≤ + ‖secondQuadratic (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-(phaseDerivative (coordinatePhase φ) x).2, + (phaseDerivative (coordinatePhase φ) x).1)‖) → + (∀ x ∈ (K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ 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 + have hφ' := hφ.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨N,J,S,p,A,hJ,hS,hA,hcancel⟩ := fixed_compact_polynomial_cancellation hφ + (phaseMarginCompact hφ' K₀ ε) + (fun x hx => phaseMarginCompact_noncritical hφ' K₀ hε hx) + refine ⟨N,J,S,p,A,hJ,hS,hA,?_⟩ + intro G hG K hK D hD hDB hImm hB hrel hgram τ s hτ hs hτs hs1 B hBP hFj q f + have hn (x : SmallModes.Base) (hx : x ∈ (K : Set SmallModes.Base)) : + RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x ≠ 0 := + norm_pos_iff.mp (hb.trans_le (hB x hx)) + have hKK : (K : Set SmallModes.Base) ⊆ phaseMarginCompact hφ' K₀ ε := by + intro x hx + exact mem_phaseMarginCompact_of_relative_margin hφ' K₀ (hK hx) _ (hn x hx) (hrel x hx) + have hgood (x : SmallModes.Base) (hx : x ∈ (K : Set SmallModes.Base)) : + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x) := + good_of_direction_length_pos _ _ ((mul_pos hε (hb.trans_le (hB x hx))).trans_le (hrel x hx)) + have hnormal (x : SmallModes.Base) (hx : x ∈ (K : Set SmallModes.Base)) : + ‖secondQuadratic (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-(phaseDerivative (coordinatePhase φ) x).2, + (phaseDerivative (coordinatePhase φ) x).1)‖⁻¹ ≤ D := + (reciprocal_second_length_bound _ _ hε hb (hB x hx) (hrel x hx)).trans hDB + exact hcancel hG K hKK D hD hImm hgood hgram hnormal τ s hτ hs hτs hs1 B hBP hFj q f + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestoredPhaseGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestoredPhaseGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..522fe9bd7c6eeb395a89e24cadbd86889765563e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestoredPhaseGeometry.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GlobalPhaseGerms +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports +import OAI.Geometry.Immersion.ClosedSurface.LengthMargins + +namespace OAI + +/-! The actual restored phases inherit quantitative margins on their +original support intersections. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma restoredLinearPhase_read_phaseDerivative (i k : A.centers) (ξ : SmallModes.Base) + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) + {p : M} (hpi : p ∈ tsupport (A.weight i)) (hpk : p ∈ tsupport (A.weight k)) : + phaseDerivative (A.vectorPlaneRead k + (restore (i : M) (A.outer i) (phaseLinear ξ ∘ planeCoordinateIsometry))) + (coordinateChart (k : M) p) = atlasPhaseCovector (i : M) (k : M) ξ p := by + have hi : restore (i : M) (A.outer i) (phaseLinear ξ ∘ planeCoordinateIsometry) =ᶠ[𝓝 p] + atlasPhase (i : M) ξ := by + filter_upwards [houter i p hpi, + (chart (i : M)).open_source.mem_nhds (A.weight_support i hpi)] with x ho hx + rw [restore,indicator_of_mem hx,ho,one_smul] + rfl + have hpK : p ∈ (coordinateChart (k : M)).source := by + simpa only [coordinateChart_source,chart_source] using A.weight_support k hpk + have hc := (coordinateChart (k : M)).continuousAt_symm + ((coordinateChart (k : M)).map_source hpK) + have ht : Tendsto (coordinateChart (k : M)).symm + (𝓝 (coordinateChart (k : M) p)) (𝓝 p) := by + simpa only [ContinuousAt,(coordinateChart (k : M)).left_inv hpK] using hc + have he := (A.vectorPlaneRead_eventually_comp_coordinateInverse + (restore (i : M) (A.outer i) (phaseLinear ξ ∘ planeCoordinateIsometry)) k + (houter k) hpk).trans (hi.comp_tendsto ht) + unfold phaseDerivative atlasPhaseCovector + rw [he.fderiv_eq (𝕜 := ℝ)] + rfl + +variable [CompactSpace M] + +theorem restored_quadratic_margin {ι : Type*} [Fintype ι] [DecidableEq ι] + (i : ι → A.centers) (ξ : ι → SmallModes.Base) (S : ι → Set M) + (hS : ∀ a, IsClosed (S a)) (hSi : ∀ a, S a ⊆ tsupport (A.weight (i a))) + (houter : ∀ j p, p ∈ tsupport (A.weight j) → A.outer j =ᶠ[𝓝 p] (fun _ => 1)) + (F : M → Space) {ε : ℝ} + (hpure : ∀ a k p, p ∈ S a → p ∈ tsupport (A.weight k) → + ε*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p)‖ ≤ + ‖secondQuadratic + (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p)) + (-(atlasPhaseCovector (i a : M) (k : M) (ξ a) p).2, + (atlasPhaseCovector (i a : M) (k : M) (ξ a) p).1)‖) + (hpairs : ∀ a b k p, a ≠ b → p ∈ S a → p ∈ S b → p ∈ tsupport (A.weight k) → + let B := realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p) + let u := atlasPhaseCovector (i a : M) (k : M) (ξ a) p + let v := atlasPhaseCovector (i b : M) (k : M) (ξ b) p + ε*‖B‖ ≤ ‖secondQuadratic B (-(u+v).2,(u+v).1)‖ ∧ + ε*‖B‖ ≤ ‖secondQuadratic B (-(u-v).2,(u-v).1)‖) : + let φ := fun a => restore (i a : M) (A.outer (i a)) (phaseLinear (ξ a) ∘ planeCoordinateIsometry) + ∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + ε*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y‖ ≤ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y) + (-(phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) y).2, + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) y).1)‖ := by + intro φ k l y hy + change y ∈ planeCoordinateIsometry '' ((chart (k : M)) '' + (tsupport (A.weight k) ∩ globalQuadraticSupport S l)) at hy + rcases hy with ⟨_,⟨p,⟨hpk,hpl⟩,rfl⟩,rfl⟩ + have he : coordinatePhase (A.globalQuadraticPhase φ k l) = + quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l := by + funext x + simp only [coordinatePhase,globalQuadraticPhase,Function.comp_apply, + LinearIsometryEquiv.apply_symm_apply] + rw [he] + change ε*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)‖ ≤ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) + (coordinateChart (k : M) p)) + (-(phaseDerivative (quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l) + (coordinateChart (k : M) p)).2, + (phaseDerivative (quadraticPhase (fun a => A.vectorPlaneRead k (φ a)) l) + (coordinateChart (k : M) p)).1)‖ + have hd (a : ι) : DifferentiableAt ℝ (A.vectorPlaneRead k (φ a)) + (coordinateChart (k : M) p) := by + have hs := A.vectorPlaneRead_smooth k (restore_smooth (i a : M) (A.outer_smooth (i a)) + (A.outer_support (i a)) ((phaseLinear (ξ a)).contDiff.comp planeCoordinateIsometry.contDiff)) + exact hs.differentiable (by simp) _ + have hder (a : ι) (ha : p ∈ S a) : + phaseDerivative (A.vectorPlaneRead k (φ a)) (coordinateChart (k : M) p) = + atlasPhaseCovector (i a : M) (k : M) (ξ a) p := + A.restoredLinearPhase_read_phaseDerivative (i a) k (ξ a) houter (hSi a ha) hpk + rcases l with a | ⟨a,b,c⟩ + · change ε*‖_‖ ≤ ‖secondQuadratic _ + (-(phaseDerivative ((2 : ℝ) • A.vectorPlaneRead k (φ a)) _).2, + (phaseDerivative ((2 : ℝ) • A.vectorPlaneRead k (φ a)) _).1)‖ + rw [phaseDerivative_const_smul (hd a) 2,hder a hpl,norm_secondQuadratic_rotated_smul] + have hh := hpure a k p hpl hpk + nlinarith [norm_nonneg (secondQuadratic + (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) (coordinateChart (k : M) p)) + (-(atlasPhaseCovector (i a : M) (k : M) (ξ a) p).2, + (atlasPhaseCovector (i a : M) (k : M) (ξ a) p).1))] + · have hh := hpairs a b.1 k p b.2.symm hpl.1 hpl.2 hpk + cases c + · change ε*‖_‖ ≤ ‖secondQuadratic _ + (-(phaseDerivative (A.vectorPlaneRead k (φ a)+A.vectorPlaneRead k (φ b.1)) _).2, + (phaseDerivative (A.vectorPlaneRead k (φ a)+A.vectorPlaneRead k (φ b.1)) _).1)‖ + rw [phaseDerivative_add (hd a) (hd b.1),hder a hpl.1,hder b.1 hpl.2] + exact hh.1 + · change ε*‖_‖ ≤ ‖secondQuadratic _ + (-(phaseDerivative (A.vectorPlaneRead k (φ a)-A.vectorPlaneRead k (φ b.1)) _).2, + (phaseDerivative (A.vectorPlaneRead k (φ a)-A.vectorPlaneRead k (φ b.1)) _).1)‖ + rw [phaseDerivative_sub (hd a) (hd b.1),hder a hpl.1,hder b.1 hpl.2] + exact hh.2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhasePartition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhasePartition.lean new file mode 100644 index 0000000000000000000000000000000000000000..f788da4dedad0059b2501d2232f0c6b6a73bae19 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhasePartition.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SplitSupportedBounds + +namespace OAI + +/-! Restrict a fixed partition to any smaller target support, preserving +its numerical derivative constants exactly. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.PhasePartitions.CompactPhasePartition +open SmallModes +variable {ι : Type*} [Fintype ι] {K : Compacts Base} {U : ι → Set Base} + +def restrictTarget (P : CompactPhasePartition ι (K : Set Base) U) + (L : Compacts Base) (hL : (L : Set Base) ⊆ K) : + CompactPhasePartition ι (L : Set Base) U where + weight := P.weight + smooth := P.smooth + nonneg := P.nonneg + le_one := P.le_one + compact_support := P.compact_support + subordinate := P.subordinate + sum_eq_one := fun x hx => P.sum_eq_one x (hL hx) + +lemma restrictTarget_splitConstant (P : CompactPhasePartition ι (K : Set Base) U) + (L : Compacts Base) (hL : (L : Set Base) ⊆ K) (m : ℕ) : + (P.restrictTarget L hL).splitConstant m = P.splitConstant m := rfl + +end ClosedSurfaceR4.PhasePartitions.CompactPhasePartition + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhaseTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhaseTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..dec41618e8987bafde6492ccddf33ce8794bfcd7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/RestrictedPhaseTransition.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseTransitionCocycle + +namespace OAI + +/-! Restricting the phase chart's source leaves its coordinate directions +unchanged on the original chart. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma same_phase_transition_fderiv (q r : M) (hqr : q = r) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hfe : ∀ x, f x = e x) {p : M} (hp : p ∈ (surfacePhaseChart q e).source) : + fderiv ℝ (surfacePhaseTransition q e r f) (surfacePhaseChart q e p) = + ContinuousLinearMap.id ℝ Base := by + have hfun : (surfacePhaseTransition q e r f : Base → Base) = surfacePhaseTransition q e q e := by + funext x + change surfacePhaseChart r f ((surfacePhaseChart q e).symm x) = + surfacePhaseChart q e ((surfacePhaseChart q e).symm x) + simp only [surfacePhaseChart_apply,hfe,← hqr] + rw [hfun] + exact surfacePhaseTransition_self_fderiv q e ((surfacePhaseChart q e).map_source hp) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarCoordinateAugmentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarCoordinateAugmentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1e9c43e52572aa9c4e019a2cdd7c041e2322df7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarCoordinateAugmentation.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.QuadraticDoubleTransverse +import Mathlib.LinearAlgebra.Projection + +namespace OAI + +/-! A regular scalar function can be completed to local coordinates. -/ +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 scalar_coordinate_augmentation (hdimEF : Module.finrank ℝ E = Module.finrank ℝ F + 1) + (K : E →L[ℝ] ℝ) + (hK : Function.Surjective K) : + ∃ ℓ : E →L[ℝ] F, Function.Bijective (K.prod ℓ) := by + have hdim : Module.finrank ℝ K.ker = Module.finrank ℝ F := by + have h := K.toLinearMap.finrank_range_add_finrank_ker + rw [LinearMap.range_eq_top.mpr hK,finrank_top] at h + simp only [Module.finrank_self] at h + omega + let e : K.ker ≃L[ℝ] F := 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[ℝ] F := 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 [add_comm] using hdimEF + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarSubmersionChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarSubmersionChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f3eba4fe464c81f36001f665c40326ddbe2f1e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ScalarSubmersionChart.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ScalarCoordinateAugmentation + +namespace OAI + +/-! Scalar submersion coordinates in the dimensions needed for Sard reduction. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + [FiniteDimensional ℝ E] [FiniteDimensional ℝ F] + +theorem scalar_submersion_chart (hdimEF : Module.finrank ℝ E = Module.finrank ℝ F + 1) + {f : E → ℝ} + (hf : ContDiff ℝ ∞ f) (p : E) + (hsurj : Function.Surjective (fderiv ℝ f p)) : + ∃ e : OpenPartialHomeomorph E (ℝ × F), p ∈ e.source ∧ + (∀ x, (e x).1 = f x) ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + obtain ⟨ℓ,hℓ⟩ := scalar_coordinate_augmentation hdimEF (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 : E → ℝ × F := 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 E := {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 ℝ E := 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 : E → ℝ × F) = 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 : E →L[ℝ] E) 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/Atlas/SelectedGridGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SelectedGridGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..f62741ff26bbcba6ffb3cb218f37317cf5583935 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SelectedGridGeometry.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AnchoredAtlasPhases +import OAI.Geometry.Immersion.ClosedSurface.DenominatorBounds +import OAI.Geometry.Immersion.ClosedSurface.PhaseWeights + +namespace OAI + +/-! Exact support and denominator consequences of the selected anchored phases. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry PhaseGrid +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def SelectedGridPointMargins (g : SmoothMetric M) (z : ℝ) + (s : A.centers → Finset Index) (P : ∀ i, (s i) → PhaseBasis) + (G : M → Space) (c b ε : ℝ) : Prop := + ∀ i (a : s i) x, + x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + x ∈ tsupport (cutoff (z^6) a.val) → + c/4 ≤ NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).2 ∧ + b/2 ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ∧ ∀ j, + ε/2 ≤ (P i a).Q j (A.tensorPlaneRead i g.inner x) ∧ + (ε/4)*‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ≤ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) + (-((P i a).ξ j).2,((P i a).ξ j).1)‖ ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) ((P i a).ξ j) + +lemma cellChartCompact_cutoff {z : ℝ} (s : A.centers → Finset Index) + (i : A.centers) (a : s i) {x : SmallModes.Base} + (hx : x ∈ (modeSupport (A.cellChartCompact i (s i) (z^6) a.val) : Set SmallModes.Base)) : + x ∈ tsupport (cutoff (z^6) a.val) := by + obtain ⟨y,⟨p,hp,rfl⟩,rfl⟩ := hx + exact normalizedCutoff_tsupport (s i) (z^6) a.val + (refinedCutoff_tsupport_inner (i : M) + (by simpa only [chart_source] using A.weight_support i) (s i) (z^6) a.val hp) + +lemma selected_grid_cover_geometry {g : SmoothMetric M} {z c b ε : ℝ} (hz : 0 < z) + (hc : 0 < c) {s : A.centers → Finset Index} {P : ∀ i, (s i) → PhaseBasis} + {G : M → Space} + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion (s i) (z^6)) + (hp : A.SelectedGridPointMargins g z s P G c b ε) : + ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i G) x) ∧ + b/2 ≤ ‖realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x‖ ∧ + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead i G) x) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead i G) x))⁻¹‖ ≤ 4/c := by + intro i x hx + obtain ⟨a,ha,hxa⟩ := coverRegion_covers (s i) (z^6) (hcover i hx) + have hcut : x ∈ tsupport (cutoff (z^6) a) := by + apply subset_tsupport + change cutoff (z^6) a x ≠ 0 + rw [cutoff_one_on_cell (pow_pos hz 6) a hxa] + exact one_ne_zero + have hh := hp i ⟨a,ha⟩ x hx hcut + have hDpos : 0 < NormalFrame.gramDet + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).1 + (firstJetPair (spaceCoordinates ∘ A.vectorPlaneRead i G) x).2 := + (by positivity : 0 < c/4).trans_le hh.1 + refine ⟨injective_of_gramDet_ne_zero _ hDpos.ne',hh.2.1,?_⟩ + have hi := one_div_le_one_div_of_le (by positivity : 0 < c/4) hh.1 + change 0 < NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead i G) x) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead i G) x) at hDpos + rw [norm_inv,Real.norm_eq_abs,abs_of_pos hDpos] + calc + _ ≤ (c/4)⁻¹ := by simpa only [one_div,firstJetPair] using hi + _ = 4/c := inv_div c 4 + +lemma selected_grid_cell_geometry {g : SmoothMetric M} {z c b ε C W : ℝ} + (hε : 0 < ε) (hb : 0 < b) (hC : 0 ≤ C) + {s : A.centers → Finset Index} {P : ∀ i, (s i) → PhaseBasis} {G : M → Space} + (w : AtlasCellPhase (ι := A.centers) → ℝ) + (hp : A.SelectedGridPointMargins g z s P G c b ε) + (hP : ∀ i a j, ‖(P i a).ξ j‖ ≤ C) + (hw : ∀ a, 1 ≤ w a ∧ w a ≤ W) : + ∀ i (a : s i) j x, + x ∈ (modeSupport (A.cellChartCompact i (s i) (z^6) a.val) : Set SmallModes.Base) → + ε/2 ≤ (P i a).Q j (A.tensorPlaneRead i g.inner x) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) (w (i,a.val,j) • (P i a).ξ j) ∧ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) + (-(w (i,a.val,j) • (P i a).ξ j).2,(w (i,a.val,j) • (P i a).ξ j).1)‖⁻¹ ≤ 8/(ε*b) ∧ + ∃ hn : w (i,a.val,j) • (P i a).ξ j ≠ 0, + ‖(phaseEquiv (w (i,a.val,j) • (P i a).ξ j) hn).symm.toContinuousLinearMap‖ ≤ 32*W*C/ε := by + intro i a j x hx + have hxA := (Set.image_mono (A.cellChartCompact_subset i (s i) (z^6) a.val)) hx + have hh := hp i a x hxA (A.cellChartCompact_cutoff s i a hx) + have hd := weighted_selected_denominators _ ((P i a).ξ j) hε hb hC hh.2.1 + (hP i a j) (hw (i,a.val,j)).1 (hw (i,a.val,j)).2 (hh.2.2 j).2.1 + exact ⟨(hh.2.2 j).1,good_smul (by linarith [(hw (i,a.val,j)).1] : w (i,a.val,j) ≠ 0) + (hh.2.2 j).2.2,hd⟩ + +lemma selected_grid_pure_geometry {g : SmoothMetric M} {z c b ε : ℝ} + (hc : 0 < c) (hb : 0 < b) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + {s : A.centers → Finset Index} {P : ∀ i, (s i) → PhaseBasis} {G : M → Space} + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (hξ : ∀ i a j, ξ (i,a.val,j) = (P i a).ξ j) + (hp : A.SelectedGridPointMargins g z s P G c b ε) : + ∀ a p, atlasActive (fun i : A.centers => (i : M)) A.weight s (z^6) a p → + atlasGram G (a.1 : M) p ≠ 0 ∧ atlasSecondTensor G (a.1 : M) p ≠ 0 ∧ + (ε/4)*‖atlasSecondTensor G (a.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor G (a.1 : M) p) (-(ξ a).2,(ξ a).1)‖ := by + intro a p ha + have hpw := refinedCutoff_tsupport_outer (a.1 : M) (A.weight a.1) (s a.1) (z^6) a.2.1 ha.2 + have hx : coordinateChart (a.1 : M) p ∈ + (modeSupport (A.chartWeightCompact a.1) : Set SmallModes.Base) := + ⟨chart (a.1 : M) p,⟨p,hpw,rfl⟩,rfl⟩ + have hcut := normalizedCutoff_tsupport (s a.1) (z^6) a.2.1 + (refinedCutoff_tsupport_inner (a.1 : M) + (by simpa only [chart_source] using A.weight_support a.1) (s a.1) (z^6) a.2.1 ha.2) + have hh := hp a.1 ⟨a.2.1,ha.1⟩ _ hx hcut + rw [A.read_gram_eq_atlas G a.1 (houter a.1) hpw, + A.read_second_eq_atlas G a.1 (houter a.1) hpw] at hh + refine ⟨ne_of_gt ((by positivity : 0 < c/4).trans_le hh.1), + norm_pos_iff.mp ((half_pos hb).trans_le hh.2.1),?_⟩ + rw [hξ a.1 ⟨a.2.1,ha.1⟩ a.2.2] + exact (hh.2.2 a.2.2).2.1 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingAtlasWeightBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingAtlasWeightBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..5cdd9ca8575dee9c69fd463fc518eaa2fac8d760 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingAtlasWeightBounds.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingWeightBounds +import OAI.Geometry.SurfaceImmersion.Geometry.VectorPlaneRestore + +namespace OAI + +/-! Fixed atlas bounds for an entire compact box of actual smaller-radius weights. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +open JetPolynomial (planeCoordinateIsometry weightedBound_comp_isometry) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- All finite derivative bounds are fixed before selecting the new radius. -/ +theorem shrinking_weight_atlas_bounds (i : A.centers) {r0 R : ℝ} + (hreg0 : circularCoordinateRegion (i : M) r0 ⊆ (coordinateChart (i : M)).target) + (hR : R^2 < r0^2) : + ∃ C : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ ∀ r : ℝ, r^2 ≤ R^2 → + ∀ m, A.WeightedBound 1 m (C m) (shrinkingCircularWeight (i : M) (A.weight i) r0 r) := by + classical + obtain ⟨a,ha,heq,B,hB,hbound⟩ := shrinkingWeight_coordinate_bounds + (i : M) (A.weight i) (A.weight_smooth i) hreg0 hR + let f : ℝ → SmallModes.Base → ℝ := fun r x => + a x * circularFlatBump (coordinateChart (i : M) (i : M)) r x + have hf (r : ℝ) : ContDiff ℝ ∞ (f r) := + ha.mul (circularFlatBump_smooth _ r) + have hrestore (r : ℝ) (hr : r^2 ≤ R^2) : + shrinkingCircularWeight (i : M) (A.weight i) r0 r = + restore (i : M) (A.outer i) (f r ∘ planeCoordinateIsometry) := by + funext x + by_cases hx : x ∈ (chart (i : M)).source + · have hx' : x ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using hx + have hval := heq r hr (coordinateChart (i : M) x) + ((coordinateChart (i : M)).map_source hx') + rw [(coordinateChart (i : M)).left_inv hx'] at hval + have hval' : shrinkingCircularWeight (i : M) (A.weight i) r0 r x = + f r (planeCoordinateIsometry (chart (i : M) x)) := hval + rw [restore,indicator_of_mem hx,Function.comp_apply,← hval'] + by_cases hz : A.weight i x = 0 + · simp only [shrinkingCircularWeight,hz,zero_mul,smul_zero] + · rw [A.outer_one i x (subset_tsupport _ hz),one_smul] + · have hw : A.weight i x = 0 := image_eq_zero_of_notMem_tsupport + (fun hh => hx (A.weight_support i hh)) + simp only [restore,indicator_of_notMem hx,shrinkingCircularWeight,hw,zero_mul] + choose D hD hlocal using fun m j => A.pair_weighted_bound (V := ℝ) j i m + refine ⟨fun m => (∑ j : A.centers, D m j)*B m,?_,?_⟩ + · intro m + exact mul_nonneg (Finset.sum_nonneg (fun j _ => hD m j)) (hB m) + · intro r hr m j + rw [hrestore r hr] + exact (hlocal m j (f r ∘ planeCoordinateIsometry) 1 (B m) zero_lt_one le_rfl (hB m) ( (hf r).comp planeCoordinateIsometry.contDiff) + (weightedBound_comp_isometry planeCoordinateIsometry (hf r) (hbound r hr m))).mono_const (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun k _ => hD m k) (Finset.mem_univ j)) (hB m)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingJetCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingJetCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..49ba03e1659e0c45952a21241995b9d9f0344758 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingJetCutoff.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FlatJetWeightedBound + +namespace OAI + +/-! Fixed cutoffs rescaled into smaller coordinate balls, with derivative +bounds measured at their actual radius. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def flatJetCutoff : ContDiffBump (0 : Base) := ⟨1/4,1/2,by norm_num,by norm_num⟩ +def shrinkingJetCutoff (r : ℝ) (x : Base) : ℝ := flatJetCutoff (r⁻¹ • x) + +lemma shrinkingJetCutoff_smooth (r : ℝ) : ContDiff ℝ ∞ (shrinkingJetCutoff r) := + flatJetCutoff.contDiff.comp (contDiff_id.const_smul r⁻¹) + +lemma shrinkingJetCutoff_germ (r : ℝ) : shrinkingJetCutoff r =ᶠ[𝓝 (0 : Base)] 1 := by + have hc0 : Continuous (fun x : Base => r⁻¹ • x) := by fun_prop + have hc : Tendsto (fun x : Base => r⁻¹ • x) (𝓝 0) (𝓝 0) := by + simpa only [smul_zero] using hc0.continuousAt.tendsto (x := (0 : Base)) + exact flatJetCutoff.eventuallyEq_one.comp_tendsto hc + +lemma shrinkingJetCutoff_tsupport {r : ℝ} (hr : 0 < r) : + tsupport (shrinkingJetCutoff r) ⊆ closedBall (0 : Base) (r/2) := by + apply closure_minimal _ isClosed_closedBall + intro x hx + by_contra hn + have hn' : r/2 < ‖x‖ := by + simpa only [mem_closedBall,dist_zero_right,not_le] using hn + have hd : flatJetCutoff.rOut ≤ dist (r⁻¹ • x) 0 := by + change (1/2 : ℝ) ≤ dist (r⁻¹ • x) 0 + rw [dist_zero_right,norm_smul,Real.norm_eq_abs,abs_inv,abs_of_pos hr] + change (1/2 : ℝ) ≤ r⁻¹*‖x‖ + rw [← div_eq_inv_mul] + apply (le_div_iff₀ hr).mpr + linarith + exact hx (flatJetCutoff.zero_of_le_dist hd) + +theorem shrinkingJetCutoff_weighted_bound : + ∃ C : ℝ, 0 ≤ C ∧ ∀ r : ℝ, 0 < r → + WeightedEstimates.WeightedBound (ball (0 : Base) r) r 2 C (shrinkingJetCutoff r) := by + obtain ⟨C,hC,hb⟩ := flatJetCutoff.hasCompactSupport.exists_bound_iteratedFDeriv + (𝕜 := ℝ) flatJetCutoff.contDiff 2 + refine ⟨C,hC,?_⟩ + intro r hr j hj x hx + rw [iteratedFDerivWithin_of_isOpen j isOpen_ball hx] + change r^j*‖iteratedFDeriv ℝ j (fun y : Base => flatJetCutoff (r⁻¹ • y)) x‖ ≤ C + have hjc : ContDiff ℝ j (flatJetCutoff : Base → ℝ) := flatJetCutoff.contDiff + rw [congrFun (iteratedFDeriv_comp_const_smul r⁻¹ hjc) x,norm_smul] + simp only [Real.norm_eq_abs,abs_pow,abs_inv,abs_of_pos hr,inv_pow] + rw [← mul_assoc,mul_inv_cancel₀ (pow_ne_zero j (ne_of_gt hr)),one_mul] + exact hb j hj _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e5764d51faff8c262a1b3556b7cf299b07757a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightBounds.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingWeightMultiplier +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! Uniform finite-order coordinate bounds for the actual radius family. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry WeightedEstimates + +private lemma compact_parameter_slice_bounds {F : ℝ × SmallModes.Base → ℝ} + (hF : ContDiff ℝ ∞ F) {K : Set ℝ} {Q : Set SmallModes.Base} + (hK : IsCompact K) (hQ : IsCompact Q) + (hs : ∀ r ∈ K, tsupport (fun x => F (r,x)) ⊆ Q) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ r ∈ K, + WeightedBound univ 1 m C (fun x => F (r,x)) := by + obtain ⟨C,hC,hbound⟩ := compact_coefficient_bound uniqueDiffOn_univ + (hK.prod hQ) (subset_univ _) hF.contDiffOn m + refine ⟨C,zero_le_one.trans hC,?_⟩ + intro r hr j hj x _ + simp only [one_pow,one_mul,iteratedFDerivWithin_univ] + by_cases hx : x ∈ Q + · let L : SmallModes.Base →L[ℝ] ℝ × SmallModes.Base := ContinuousLinearMap.inr ℝ ℝ SmallModes.Base + let G : ℝ × SmallModes.Base → ℝ := fun y => F (y+(r,0)) + have hG : ContDiff ℝ ∞ G := hF.comp (contDiff_id.add contDiff_const) + have he : (fun x => F (r,x)) = G ∘ L := by + funext y + simp only [G,L,Function.comp_apply,ContinuousLinearMap.inr_apply, + Prod.mk_add_mk,zero_add,add_zero] + rw [he,L.iteratedFDeriv_comp_right hG x (by simp)] + have hn := (iteratedFDeriv ℝ j G (L x)).norm_compContinuousLinearMap_le + (fun _ : Fin j => L) + simp only [Finset.prod_const,Finset.card_univ,Fintype.card_fin] at hn + have hder : iteratedFDeriv ℝ j G (L x) = iteratedFDeriv ℝ j F (r,x) := by + simpa only [G,L,ContinuousLinearMap.inr_apply,Prod.mk_add_mk,zero_add,add_zero] + using iteratedFDeriv_comp_add_right j (r,0) (L x) (f := F) + rw [hder] at hn + have hbase : ‖iteratedFDeriv ℝ j F (r,x)‖ ≤ C := by + simpa only [iteratedFDerivWithin_univ] using hbound j hj (r,x) ⟨hr,hx⟩ + rw [hder] + calc + _ ≤ ‖iteratedFDeriv ℝ j F (r,x)‖ * ‖L‖^j := hn + _ ≤ C * 1 := mul_le_mul hbase + (pow_le_one₀ (norm_nonneg _) (ContinuousLinearMap.norm_inr_le_one ℝ ℝ SmallModes.Base)) + (pow_nonneg (norm_nonneg _) _) (zero_le_one.trans hC) + _ = C := mul_one C + · have hzero : iteratedFDeriv ℝ j (fun x => F (r,x)) x = 0 := by + apply image_eq_zero_of_notMem_tsupport + exact fun hh => hx (hs r hr (tsupport_iteratedFDeriv_subset j hh)) + simp only [hzero,norm_zero] + exact zero_le_one.trans hC + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +/-- One globally smooth coordinate multiplier represents all smaller ratio +weights; its product with the circular bump has uniform finite-order bounds. -/ +theorem shrinkingWeight_coordinate_bounds (p : M) (w : M → ℝ) + (hw : ContMDiff planeModel 𝓘(ℝ) ∞ w) {r0 R : ℝ} + (hreg0 : circularCoordinateRegion p r0 ⊆ (coordinateChart p).target) + (hR : R^2 < r0^2) : + ∃ a : SmallModes.Base → ℝ, ContDiff ℝ ∞ a ∧ + (∀ r : ℝ, r^2 ≤ R^2 → ∀ x ∈ (coordinateChart p).target, + shrinkingCircularWeight p w r0 r ((coordinateChart p).symm x) = + a x * circularFlatBump (coordinateChart p p) r x) ∧ + ∃ C : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ ∀ r : ℝ, r^2 ≤ R^2 → + ∀ m, WeightedBound univ 1 m (C m) + (fun x => a x * circularFlatBump (coordinateChart p p) r x) := by + obtain ⟨b,hb,hbs,hbeq⟩ := exists_shrinkingWeight_multiplier p w hw hreg0 hR + have hreg := (circularCoordinateRegion_mono p hR.le).trans hreg0 + have hlocal : ContDiffOn ℝ ∞ (fun x => b ((coordinateChart p).symm x)) + (coordinateChart p).target := by + exact (hb.comp_contMDiffOn (coordinateChart_symm_smoothOn p)).contDiffOn + obtain ⟨U,hU,hKU,_,a,ha,heq⟩ := CollarVelocity.compact_smooth_extension + (circularCoordinateRegion_compact p R) (coordinateChart p).open_target hreg hlocal + let F : ℝ × SmallModes.Base → ℝ := fun z => a z.2 * + circularFlatBump (coordinateChart p p) z.1 z.2 + have hF : ContDiff ℝ ∞ F := (ha.comp contDiff_snd).mul + (circularFlatBump_joint_smooth.comp + ((contDiff_const.prodMk contDiff_fst).prodMk contDiff_snd)) + have hs (r : ℝ) (hr : r ∈ Icc (-|R|) |R|) : + tsupport (fun x => F (r,x)) ⊆ circularCoordinateRegion p R := by + have hr2 : r^2 ≤ R^2 := by + have h := (sq_le_sq₀ (abs_nonneg r) (abs_nonneg R)).2 (abs_le.mpr hr) + simpa only [sq_abs] using h + apply closure_minimal _ (isClosed_le (circularRadiusSquared_smooth _).continuous continuous_const) + intro x hx + by_contra hxQ + have hzero := (circularFlatBump_zero_iff (coordinateChart p p) r x).mpr + (hr2.trans (le_of_not_ge hxQ)) + exact hx (by simp only [F,hzero,mul_zero]) + choose C hC hbound using fun m => compact_parameter_slice_bounds hF + (isCompact_Icc : IsCompact (Icc (-|R|) |R|)) + (circularCoordinateRegion_compact p R) hs m + refine ⟨a,ha,?_,C,hC,?_⟩ + · intro r hr x hx + rw [congrFun (hbeq r hr) ((coordinateChart p).symm x)] + have hsx := (coordinateChart p).map_target hx + simp only [circularManifoldBump,indicator_of_mem hsx, + (coordinateChart p).right_inv hx] + by_cases hmem : x ∈ circularCoordinateRegion p R + · rw [heq (hKU hmem)] + · have hz := (circularFlatBump_zero_iff (coordinateChart p p) r x).mpr + (hr.trans (le_of_not_ge hmem)) + simp only [hz,mul_zero] + · intro r hr m + have habs : |r| ≤ |R| := (sq_le_sq₀ (abs_nonneg r) (abs_nonneg R)).1 + (by simpa only [sq_abs] using hr) + exact hbound m r (abs_le.mp habs) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightContinuity.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightContinuity.lean new file mode 100644 index 0000000000000000000000000000000000000000..0414d5dfcfc4c6eb032d6295182255880312387f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightContinuity.lean @@ -0,0 +1,140 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ShrinkingCircularWeight + +namespace OAI + +/-! Uniform convergence of the actual ratio cutoffs from smaller radii. +The upper clamp permits an ordinary product-neighborhood argument at the +original radius, including the boundary where numerator and denominator vanish. -/ +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_joint_continuousAt_of_source (p : M) (r : ℝ) {x : M} + (hx : x ∈ (coordinateChart p).source) : + ContinuousAt (fun z : ℝ × M => circularManifoldBump p z.1 z.2) (r,x) := by + classical + have hc := ((coordinateChart p).continuousOn.continuousAt + ((coordinateChart p).open_source.mem_nhds hx)).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 hx)] with z hz + exact indicator_of_mem hz _ + +def shrinkingRadius (r0 r : ℝ) : ℝ := max 0 (min r0 r) + +lemma shrinkingRadius_bounds {r0 : ℝ} (hr0 : 0 ≤ r0) (r : ℝ) : + 0 ≤ shrinkingRadius r0 r ∧ shrinkingRadius r0 r ≤ r0 := by + exact ⟨le_max_left _ _,max_le hr0 (min_le_left _ _)⟩ + +lemma shrinkingRadius_of_mem {r0 r : ℝ} (hr : 0 ≤ r) (hr0 : r ≤ r0) : + shrinkingRadius r0 r = r := by + simp only [shrinkingRadius,min_eq_right hr0,max_eq_right hr] + +lemma shrinkingRadius_continuous (r0 : ℝ) : Continuous (shrinkingRadius r0) := + continuous_const.max (continuous_const.min continuous_id) + +/-- Joint continuity remains valid at a vanishing denominator, because the +ratio cutoff lies between zero and the original continuous weight. -/ +theorem shrinkingCircularWeight_joint_continuousAt_reference (p : M) (w : M → ℝ) + (hw : ContMDiff planeModel 𝓘(ℝ) ∞ w) (hnon : ∀ x, 0 ≤ w x) {r0 : ℝ} + (hr0 : 0 < r0) + (hreg0 : circularCoordinateRegion p r0 ⊆ (coordinateChart p).target) + (hpos : ∀ x, 0 < w x ↔ x ∈ circularCoordinateDisk p r0) (x : M) : + ContinuousAt (fun z : ℝ × M => + shrinkingCircularWeight p w r0 (shrinkingRadius r0 z.1) z.2) (r0,x) := by + have hclip := shrinkingRadius_of_mem hr0.le (le_refl r0) + have href := congrFun (shrinkingCircularWeight_reference p w r0 hnon hpos) x + have hb := (circularManifoldBump_smooth_support p r0 hreg0).1.continuous + by_cases hp : 0 < circularManifoldBump p r0 x + · have hx := ((circularManifoldBump_pos_iff p x r0).mp hp).1 + have hc : ContinuousAt (fun z : ℝ × M => (shrinkingRadius r0 z.1,z.2)) (r0,x) := + (((shrinkingRadius_continuous r0).comp continuous_fst).prodMk continuous_snd).continuousAt + have ho : ContinuousAt (fun z : ℝ × M => circularManifoldBump p z.1 z.2) + (shrinkingRadius r0 r0,x) := by + rw [hclip] + exact circularManifoldBump_joint_continuousAt_of_source p r0 hx + have hn := ho.comp (x := (r0,x)) hc + exact (hw.continuous.comp continuous_snd).continuousAt.mul + (hn.div (hb.comp continuous_snd).continuousAt hp.ne') + · have hz : w x = 0 := le_antisymm (le_of_not_gt (fun hwx => hp + ((circularManifoldBump_pos_iff p x r0).mpr ((hpos x).mp hwx)))) (hnon x) + have hu : Tendsto (fun z : ℝ × M => w z.2) (𝓝 (r0,x)) (𝓝 0) := by + have hc : ContinuousAt (fun z : ℝ × M => w z.2) (r0,x) := + (hw.continuous.comp continuous_snd).continuousAt + change Tendsto (fun z : ℝ × M => w z.2) (𝓝 (r0,x)) (𝓝 (w x)) at hc + rw [hz] at hc + exact hc + have hs : Tendsto (fun z : ℝ × M => + shrinkingCircularWeight p w r0 (shrinkingRadius r0 z.1) z.2) + (𝓝 (r0,x)) (𝓝 0) := by + apply tendsto_const_nhds.squeeze hu + · intro z + have hc := shrinkingRadius_bounds hr0.le z.1 + exact (shrinkingCircularWeight_nonneg_le p w hnon + (show (shrinkingRadius r0 z.1)^2 ≤ r0^2 by nlinarith) z.2).1 + · intro z + have hc := shrinkingRadius_bounds hr0.le z.1 + exact (shrinkingCircularWeight_nonneg_le p w hnon + (show (shrinkingRadius r0 z.1)^2 ≤ r0^2 by nlinarith) z.2).2 + simpa only [ContinuousAt,hclip,href,hz] using hs + +variable [CompactSpace M] + +/-- Independent smaller radii can be chosen in one left neighborhood while +preserving the weight uniformly on the entire compact manifold. -/ +theorem shrinkingCircularWeight_uniform_perturbation (p : M) (w : M → ℝ) + (hw : ContMDiff planeModel 𝓘(ℝ) ∞ w) (hnon : ∀ x, 0 ≤ w x) {r0 : ℝ} + (hr0 : 0 < r0) + (hreg0 : circularCoordinateRegion p r0 ⊆ (coordinateChart p).target) + (hpos : ∀ x, 0 < w x ↔ x ∈ circularCoordinateDisk p r0) + {eps : ℝ} (heps : 0 < eps) : + ∃ delta : ℝ, 0 < delta ∧ delta ≤ r0 / 2 ∧ ∀ r : ℝ, + r0-delta < r → r < r0 → + ContMDiff planeModel 𝓘(ℝ) ∞ (shrinkingCircularWeight p w r0 r) ∧ + (∀ x, 0 < shrinkingCircularWeight p w r0 r x ↔ x ∈ circularCoordinateDisk p r) ∧ + tsupport (shrinkingCircularWeight p w r0 r) ⊆ circularDiskClosure p r ∧ + ∀ x, |shrinkingCircularWeight p w r0 r x-w x| < eps := by + have hv : ∀ᶠ r in 𝓝 r0, ∀ x : M, + |shrinkingCircularWeight p w r0 (shrinkingRadius r0 r) x-w x| < eps := by + have hv' : ∀ᶠ r in 𝓝 r0, ∀ x ∈ (univ : Set M), + |shrinkingCircularWeight p w r0 (shrinkingRadius r0 r) x-w x| < eps := by + apply isCompact_univ.eventually_forall_of_forall_eventually + intro x _ + have hc := ((shrinkingCircularWeight_joint_continuousAt_reference + p w hw hnon hr0 hreg0 hpos x).sub + (hw.continuous.comp continuous_snd).continuousAt).abs + have hz : |shrinkingCircularWeight p w r0 (shrinkingRadius r0 r0) x-w x| < eps := by + rw [shrinkingRadius_of_mem hr0.le le_rfl, + shrinkingCircularWeight_reference p w r0 hnon hpos,sub_self,abs_zero] + exact heps + exact hc.eventually (gt_mem_nhds hz) + exact hv'.mono (fun r hh x => hh x (mem_univ x)) + obtain ⟨d,hd,hnear⟩ := Metric.eventually_nhds_iff.mp hv + refine ⟨min d (r0/2),lt_min hd (half_pos hr0),min_le_right _ _,?_⟩ + intro r hr hrmax + have hrpos : 0 < r := by have := min_le_right d (r0/2); linarith + have hs : r^2 < r0^2 := by nlinarith + have hsm := shrinkingCircularWeight_smooth p w hw hreg0 hs + refine ⟨hsm.1,shrinkingCircularWeight_pos_iff p w hnon hs.le hpos,hsm.2,?_⟩ + have habs : |r-r0| < d := by + rw [abs_of_neg (sub_neg.mpr hrmax)] + have := min_le_left d (r0/2) + linarith + simpa only [shrinkingRadius_of_mem hrpos.le hrmax.le] using + hnear (y := r) (by simpa only [Real.dist_eq] using habs) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightMultiplier.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightMultiplier.lean new file mode 100644 index 0000000000000000000000000000000000000000..da11f31cbe25dd1e7c5050f8c7883575af5a5f05 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ShrinkingWeightMultiplier.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ShrinkingWeightContinuity + +namespace OAI + +/-! A fixed smooth multiplier for a whole compact range of smaller radii. +This removes the apparent moving denominator from all derivative estimates. -/ +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] [CompactSpace M] + +/-- The ratio-cutoff family is multiplication by one fixed smooth function +on every smaller radius box. Constants for that multiplier are chosen before +any radius in the box. -/ +theorem exists_shrinkingWeight_multiplier (p : M) (w : M → ℝ) + (hw : ContMDiff planeModel 𝓘(ℝ) ∞ w) {r0 R : ℝ} + (hreg0 : circularCoordinateRegion p r0 ⊆ (coordinateChart p).target) + (hR : R^2 < r0^2) : + ∃ a : M → ℝ, ContMDiff planeModel 𝓘(ℝ) ∞ a ∧ + tsupport a ⊆ circularCoordinateDisk p r0 ∧ + ∀ r : ℝ, r^2 ≤ R^2 → shrinkingCircularWeight p w r0 r = + fun x => a x * circularManifoldBump p r x := by + have hreg := (circularCoordinateRegion_mono p hR.le).trans hreg0 + have hK := circularDiskClosure_compact p R hreg + have hKO := circularDiskClosure_subset_disk p hR hreg + obtain ⟨B,hB,hKB,hBc⟩ := hK.exists_isOpen_closure_subset + ((circularCoordinateDisk_open p r0).mem_nhdsSet.mpr hKO) + obtain ⟨chi,hchi,_,hsupp,hchiK⟩ := + exists_contMDiff_support_eq_eq_one_iff (I := planeModel) (n := (⊤ : ℕ∞)) + hB hK.isClosed hKB + let a : M → ℝ := fun x => chi x * (w x / circularManifoldBump p r0 x) + have haS : tsupport a ⊆ circularCoordinateDisk p r0 := by + apply Subset.trans (b := tsupport chi) + · apply closure_mono + intro x hx hzero + exact hx (by simp only [a,hzero,zero_mul]) + · change closure (Function.support chi) ⊆ _ + rw [hsupp] + exact hBc + have ha : ContMDiff planeModel 𝓘(ℝ) ∞ a := by + apply contMDiff_of_tsupport + intro x hx + have hp := (circularManifoldBump_pos_iff p x r0).mpr (haS hx) + exact (hchi x).mul ((hw x).div₀ + ((circularManifoldBump_smooth_support p r0 hreg0).1 x) hp.ne') + refine ⟨a,ha,haS,?_⟩ + intro r hr + funext x + by_cases hz : circularManifoldBump p r x = 0 + · simp only [shrinkingCircularWeight,hz,zero_div,mul_zero] + · have hreg' := (circularCoordinateRegion_mono p hr).trans hreg + have hx := (circularManifoldBump_smooth_support p r hreg').2 (subset_tsupport _ hz) + have hchi1 := (hchiK x).mp (circularDiskClosure_mono p hr hx) + simp only [a,hchi1,one_mul,shrinkingCircularWeight] + ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SpatialPhaseBasis.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SpatialPhaseBasis.lean new file mode 100644 index 0000000000000000000000000000000000000000..78540daa77ea0b2174202a31c97587a7d41489a1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SpatialPhaseBasis.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexPhaseDecomposition + +namespace OAI + +/-! Actual point-dependent phase bases. Outside the region of invertible +phase triples a fixed basis supplies harmless global values. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +def admissiblePhaseCovectors (P : PhaseBasis) (xi : Fin 3 → Base) : Prop := + (perturbedPhaseOperator P xi).IsInvertible ∧ ∀ i, xi i ≠ 0 + +lemma admissiblePhaseCovectors_eventually {P : PhaseBasis} {xi : Fin 3 → Base} + (hxi : admissiblePhaseCovectors P xi) : + ∀ᶠ z in 𝓝 xi, admissiblePhaseCovectors P z := by + have hA : ∀ᶠ z in 𝓝 xi, (perturbedPhaseOperator P z).IsInvertible := + (perturbedPhaseOperator_smooth P).continuous.continuousAt.eventually hxi.1.eventually_nhds + have hn : ∀ᶠ z in 𝓝 xi, ∀ i, z i ≠ 0 := by + rw [Filter.eventually_all] + intro i + exact (continuous_apply i).continuousAt.eventually_ne (hxi.2 i) + exact hA.and hn + +def resolvedPhaseBasis (P : PhaseBasis) (xi : Fin 3 → Base) : PhaseBasis := by + classical + exact if h : admissiblePhaseCovectors P xi then + ⟨xi,perturbedPhaseCoefficient P xi,perturbedPhase_decomposition P h.1,h.2⟩ + else P + +lemma resolvedPhaseBasis_covectors (P : PhaseBasis) {xi : Fin 3 → Base} + (hxi : admissiblePhaseCovectors P xi) : (resolvedPhaseBasis P xi).ξ = xi := by + simp only [resolvedPhaseBasis,dite_eq_left hxi] + +lemma resolvedPhaseBasis_coefficients (P : PhaseBasis) {xi : Fin 3 → Base} + (hxi : admissiblePhaseCovectors P xi) (i : Fin 3) : + (resolvedPhaseBasis P xi).Q i = perturbedPhaseCoefficient P xi i := by + simp only [resolvedPhaseBasis,dite_eq_left hxi] + +lemma resolvedPhaseBasis_coefficient_smoothAt (P : PhaseBasis) + {xi : Base → Fin 3 → Base} {p : Base} (hxi : ContDiffAt ℝ ∞ xi p) + (hp : admissiblePhaseCovectors P (xi p)) (i : Fin 3) : + ContDiffAt ℝ ∞ (fun x => (resolvedPhaseBasis P (xi x)).Q i) p := by + have he : (fun x => (resolvedPhaseBasis P (xi x)).Q i) =ᶠ[𝓝 p] + (fun x => perturbedPhaseCoefficient P (xi x) i) := by + have hnear : ∀ᶠ x in 𝓝 p, admissiblePhaseCovectors P (xi x) := + hxi.continuousAt.eventually (admissiblePhaseCovectors_eventually hp) + filter_upwards [hnear] with x hx + exact resolvedPhaseBasis_coefficients P hx i + exact ((perturbedPhaseCoefficient_smoothAt P hp.1 i).comp p hxi).congr_of_eventuallyEq he + +def convexSpatialBasis (P : PhaseBasis) (ell : Fin 3 → Base) (L : ℝ) (p : Base) : PhaseBasis := + resolvedPhaseBasis P (fun i => phaseDerivative (convexQuadraticPhase (ell i) L) p) + +lemma convexSpatialBasis_coefficient_smoothAt (P : PhaseBasis) (ell : Fin 3 → Base) (L : ℝ) + {p : Base} + (hp : admissiblePhaseCovectors P (fun i => phaseDerivative (convexQuadraticPhase (ell i) L) p)) + (i : Fin 3) : + ContDiffAt ℝ ∞ (fun x => (convexSpatialBasis P ell L x).Q i) p := by + have hs : ContDiffAt ℝ ∞ + (fun x : Base => fun j : Fin 3 => phaseDerivative (convexQuadraticPhase (ell j) L) x) p := by + apply contDiffAt_pi.mpr + intro j + simp only [convexQuadraticPhase_phaseDerivative] + exact contDiffAt_const.add (contDiffAt_id.const_smul L) + exact resolvedPhaseBasis_coefficient_smoothAt P hs hp i + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalCoordinateSecondForm.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalCoordinateSecondForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..3cb122046c73c9895db0bf67c9cd945165c51cff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalCoordinateSecondForm.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealNormalProjectionBridge + +namespace OAI + +/-! Linear chart coordinates preserve the actual second normal projection. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4 +open RealModes SmallModes + +lemma spherical_secondForm_coordinates {F : Plane → Space} + (hF : ContDiff ℝ ∞ F) (x v w : SmallModes.Base) + (hD : NormalFrame.gramDet + (spaceCoordinates (fderiv ℝ F (planeCoordinates.symm x) (planeCoordinates.symm dx))) + (spaceCoordinates (fderiv ℝ F (planeCoordinates.symm x) (planeCoordinates.symm dy))) ≠ 0) : + realSecondForm (spaceCoordinates ∘ F ∘ planeCoordinates.symm) v w x = + spaceCoordinates (SphericalJets.secondForm F (planeCoordinates.symm x) + (planeCoordinates.symm v) (planeCoordinates.symm w)) := by + let e := planeCoordinates.symm.toContinuousLinearMap + let L := (fderiv ℝ F (e x)).comp e + have hfirst (z u : SmallModes.Base) : + coordDeriv u (spaceCoordinates ∘ F ∘ planeCoordinates.symm) z = + spaceCoordinates (fderiv ℝ F (e z) (e u)) := by + simp only [coordDeriv,fderiv_comp z spaceCoordinates.differentiableAt + ((hF.differentiable (by simp) _).comp _ planeCoordinates.symm.differentiableAt), + spaceCoordinates.fderiv,fderiv_comp z (hF.differentiable (by simp) _) + planeCoordinates.symm.differentiableAt,planeCoordinates.symm.fderiv, + ContinuousLinearMap.comp_apply] + rfl + have hsecond : coordDeriv v (coordDeriv w (spaceCoordinates ∘ F ∘ planeCoordinates.symm)) x = + spaceCoordinates (fderiv ℝ (fderiv ℝ F) (e x) (e v) (e w)) := by + have he : coordDeriv w (spaceCoordinates ∘ F ∘ planeCoordinates.symm) = + spaceCoordinates ∘ (fun z => fderiv ℝ F z (e w)) ∘ planeCoordinates.symm := by + funext z + exact hfirst z w + rw [he] + have hd := ((hF.fderiv_right (m := ∞) (by simp)).differentiable (by simp) (e x)) + rw [coordDeriv,fderiv_comp x spaceCoordinates.differentiableAt, + spaceCoordinates.fderiv] + · have hcomp : fderiv ℝ ((fun z => fderiv ℝ F z (e w)) ∘ planeCoordinates.symm) x = + (fderiv ℝ (fun z => fderiv ℝ F z (e w)) (e x)).comp e := + ((hd.clm_apply (differentiableAt_const (e w))).hasFDerivAt.comp x e.hasFDerivAt).fderiv + rw [hcomp] + simp only [ContinuousLinearMap.comp_apply] + rw [SphericalJets.derivative_apply hF] + rfl + · exact (hd.clm_apply (differentiableAt_const (e w))).comp x planeCoordinates.symm.differentiableAt + have hr : LinearMap.range L.toLinearMap = LinearMap.range (fderiv ℝ F (e x)).toLinearMap := by + ext z + constructor + · rintro ⟨u,rfl⟩ + exact ⟨e u,rfl⟩ + · rintro ⟨u,rfl⟩ + refine ⟨planeCoordinates u,?_⟩ + change fderiv ℝ F (e x) (planeCoordinates.symm (planeCoordinates u)) = _ + rw [ContinuousLinearEquiv.symm_apply_apply] + rfl + rw [realSecondForm,hfirst x dx,hfirst x dy,hsecond] + have hp := realNormalPart_starProjection L + (fderiv ℝ (fderiv ℝ F) (e x) (e v) (e w)) hD + simp only [hr] at hp + exact hp + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalMetricPhaseData.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalMetricPhaseData.lean new file mode 100644 index 0000000000000000000000000000000000000000..01f858ada7678dc6051607b5bba1201fa0cf2fbf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SphericalMetricPhaseData.lean @@ -0,0 +1,139 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalLift +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalJets +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! A smooth three-space immersion supplies the actual starting phase geometry. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Matrix + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes + +private lemma inner_spaceCoordinates_symm (X Y : RVec 4) : + inner ℝ (spaceCoordinates.symm X) (spaceCoordinates.symm Y) = X ⬝ᵥ Y := by + simpa only [ContinuousLinearEquiv.apply_symm_apply] using + (spaceCoordinates_dot (spaceCoordinates.symm X) (spaceCoordinates.symm Y)).symm + +private lemma fderiv_realDot_apply {F G : RField 4} {x : Base} + (hF : DifferentiableAt ℝ F x) (hG : DifferentiableAt ℝ G x) (v : Base) : + fderiv ℝ (fun y => F y ⬝ᵥ G y) x v = + F x ⬝ᵥ (fderiv ℝ G x v)+(fderiv ℝ F x v) ⬝ᵥ G x := by + have hF' := spaceCoordinates.symm.hasFDerivAt.comp x hF.hasFDerivAt + have hG' := spaceCoordinates.symm.hasFDerivAt.comp x hG.hasFDerivAt + have hd := fderiv_inner_apply ℝ hF'.differentiableAt hG'.differentiableAt v + have he : (fun y => inner ℝ (spaceCoordinates.symm (F y)) (spaceCoordinates.symm (G y))) = + (fun y => F y ⬝ᵥ G y) := funext fun y => inner_spaceCoordinates_symm (F y) (G y) + simp only [Function.comp_apply] at hd + rw [he,hF'.fderiv,hG'.fderiv] at hd + change fderiv ℝ (fun y => F y ⬝ᵥ G y) x v = + inner ℝ (spaceCoordinates.symm (F x)) (spaceCoordinates.symm (fderiv ℝ G x v))+ + inner ℝ (spaceCoordinates.symm (fderiv ℝ F x v)) (spaceCoordinates.symm (G x)) at hd + simpa only [inner_spaceCoordinates_symm] using hd + +private lemma sphere_real_radial_first {F : RField 4} {x : Base} + (hF : DifferentiableAt ℝ F x) (hunit : ∀ y, F y ⬝ᵥ F y = 1) (v : Base) : + F x ⬝ᵥ coordDeriv v F x = 0 := by + have he : (fun y => F y ⬝ᵥ F y) = (fun _ => (1 : ℝ)) := funext hunit + have hd := congrArg (fun L : Base →L[ℝ] ℝ => L v) + (congrArg (fun f : Base → ℝ => fderiv ℝ f x) he) + rw [fderiv_realDot_apply hF hF] at hd + simp only [fderiv_const_apply,zero_apply] at hd + rw [dotProduct_comm (fderiv ℝ F x v) (F x)] at hd + change F x ⬝ᵥ fderiv ℝ F x v = 0 + linarith + +private lemma sphere_real_radial_second {F : RField 4} {U : Set Base} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) + (hunit : ∀ y, F y ⬝ᵥ F y = 1) {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 sphere_real_radial_first + (((hF y hy).contDiffAt (hU.mem_nhds hy)).differentiableAt (by simp)) hunit w + have hd := congrArg (fun L : Base →L[ℝ] ℝ => L v) he.fderiv_eq + rw [fderiv_realDot_apply (hFx.differentiableAt (by simp)) + ((contDiffAt_coordDeriv hFx w).differentiableAt (by simp))] at hd + simp only [fderiv_const_apply,zero_apply] at hd + change F x ⬝ᵥ fderiv ℝ (coordDeriv w F) x v = + -(fderiv ℝ F x v ⬝ᵥ coordDeriv w F x) + change F x ⬝ᵥ fderiv ℝ (coordDeriv w F) x v+ + fderiv ℝ F x v ⬝ᵥ coordDeriv w F x = 0 at hd + linarith + +/-- The inward radial pairing of the coordinate second form is the induced +metric, even though the coordinate representative is only smooth on its chart. -/ +lemma sphere_realSecondForm_inward {F : RField 4} {U : Set Base} + (hU : IsOpen U) (hF : ContDiffOn ℝ ∞ F U) + (hunit : ∀ y, F y ⬝ᵥ F y = 1) {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,sphere_real_radial_first hFx hunit,neg_zero] + have hY : coordDeriv dy F x ⬝ᵥ (-F x) = 0 := by + rw [dotProduct_neg,dotProduct_comm,sphere_real_radial_first hFx hunit,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,sphere_real_radial_second hU hF hunit hx,neg_neg] + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +/-- A spherical immersion has nonzero second fundamental form in every +coordinate chart, with the first coordinate direction as an explicit witness. -/ +theorem spherical_coordinate_second_nonzero {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (hunit : ∀ p, ‖G p‖ = 1) + (hI : ∀ p, Function.Injective (mfderiv planeModel spaceModel G p)) (p : M) : + ∃ v w : Base, realSecondForm (coordinateMap G p) v w (coordinateCenter p) ≠ 0 := by + have hcoords : ∀ x, coordinateMap G p x ⬝ᵥ coordinateMap G p x = 1 := by + intro x + dsimp only [coordinateMap,Function.comp_apply] + rw [spaceCoordinates_dot,real_inner_self_eq_norm_sq,hunit] + norm_num + have hdir : coordDeriv dx (coordinateMap G p) (coordinateCenter p) ≠ 0 := by + intro hz + change fderiv ℝ (coordinateMap G p) (coordinateCenter p) dx = 0 at hz + have hi := coordinateMap_immersion_center hG p (hI p) + have he : dx = (0 : Base) := hi (by simpa only [map_zero] using hz) + simp [dx] at he + have hnorm : 0 < coordDeriv dx (coordinateMap G p) (coordinateCenter p) ⬝ᵥ + coordDeriv dx (coordinateMap G p) (coordinateCenter p) := by + have hn : 0 ≤ coordDeriv dx (coordinateMap G p) (coordinateCenter p) ⬝ᵥ + coordDeriv dx (coordinateMap G p) (coordinateCenter p) := + Finset.sum_nonneg (fun i _ => mul_self_nonneg _) + exact hn.lt_of_ne' ((dotProduct_self_eq_zero).not.mpr hdir) + refine ⟨dx,dx,?_⟩ + intro hz + have hh := sphere_realSecondForm_inward (coordinateDomain_open p) + (coordinateMap_smoothOn hG p) hcoords (coordinateCenter_mem p) dx dx + rw [hz,zero_dotProduct] at hh + linarith + +variable [T2Space M] [CompactSpace M] + +/-- A given smooth immersion into three-space yields a spherical immersion +and all the concrete phase geometry for any smooth target metric. -/ +theorem metricPhaseData_of_three_space_immersion + (g : SmoothMetric M) {F : M → SphericalStart.ThreeSpace} + (hF : ContMDiff planeModel 𝓘(ℝ,SphericalStart.ThreeSpace) ∞ F) + (hI : ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,SphericalStart.ThreeSpace) F p)) : + ∃ G : M → Space, ContMDiff planeModel spaceModel ∞ G ∧ + (∀ p, ‖G p‖ = 1) ∧ + (∀ p, Function.Injective (mfderiv planeModel spaceModel G p)) ∧ + Nonempty (MetricGoodPhaseData g G) := by + let v : Space := EuclideanSpace.single 0 1 + have hv : ‖v‖ = 1 := by simp [v] + obtain ⟨G,hG,hu,hi⟩ := SphericalStart.spherical_immersion_of_three_space_immersion hv hF hI + exact ⟨G,hG,hu,hi,MetricGoodPhaseData.nonempty g hG hi + (spherical_coordinate_second_nonzero hG hu hi)⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SubmersionFiberLineChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SubmersionFiberLineChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..88e2e2dbbe5f4eee183d704c78f706ea5530b559 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SubmersionFiberLineChart.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.DoubleLocusChart + +namespace OAI + +/-! Submersion coordinates induce a genuine open interval chart on the +zero fiber, with its subspace topology. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X E : Type*} [TopologicalSpace X] [TopologicalSpace E] [Zero E] + +theorem submersion_fiber_line_chart (f : X → E) + (e : OpenPartialHomeomorph X (E × ℝ)) (p : X) (hp : p ∈ e.source) (hf : f p = 0) + (he : ∀ x ∈ e.source, (e x).1 = f x) : + ∃ c : OpenPartialHomeomorph {x : X // f x = 0} ℝ, + (⟨p,hf⟩ : {x : X // f x = 0}) ∈ c.source ∧ + c.source = ((↑) ⁻¹' e.source) ∧ + (∀ x, c x = (e x.val).2) ∧ + (∀ t ∈ c.target, ((c.symm t).val) = e.symm (0,t)) := by + classical + let T : Set ℝ := {t | (0,t) ∈ e.target} + have hzero (t : ℝ) (ht : t ∈ T) : f (e.symm (0,t)) = 0 := by + rw [← he _ (e.map_target ht),e.right_inv ht] + let I : ℝ → {x : X // f x = 0} := fun t => + if ht : t ∈ T then ⟨e.symm (0,t),hzero t ht⟩ else ⟨p,hf⟩ + have hI (t : ℝ) (ht : t ∈ T) : (I t).val = e.symm (0,t) := by simp [I,ht] + have hpair (x : {x : X // f x = 0}) (hx : x.val ∈ e.source) : + (0,(e x.val).2) = e x.val := by + apply Prod.ext + · exact (he x.val hx).trans x.property |>.symm + · rfl + let c : OpenPartialHomeomorph {x : X // f x = 0} ℝ := { + toFun := fun x => (e x.val).2 + invFun := I + source := (↑) ⁻¹' e.source + target := T + map_source' := by + intro x hx + change (0,(e x.val).2) ∈ e.target + rw [hpair x hx] + exact e.map_source hx + map_target' := by + intro t ht + change (I t).val ∈ e.source + rw [hI t ht] + exact e.map_target ht + left_inv' := by + intro x hx + apply Subtype.ext + have ht : (e x.val).2 ∈ T := by + change (0,(e x.val).2) ∈ e.target + rw [hpair x hx] + exact e.map_source hx + rw [hI _ ht,hpair x hx,e.left_inv hx] + right_inv' := by + intro t ht + rw [hI t ht,e.right_inv ht] + open_source := e.open_source.preimage continuous_subtype_val + open_target := e.open_target.preimage (continuous_const.prodMk continuous_id) + continuousOn_toFun := (e.continuousOn.comp continuous_subtype_val.continuousOn (fun _ hx => hx)).snd + continuousOn_invFun := by + apply Topology.IsInducing.subtypeVal.continuousOn_iff.mpr + have hc : ContinuousOn (fun t : ℝ => e.symm (0,t)) T := + e.continuousOn_symm.comp (continuous_const.prodMk continuous_id).continuousOn (fun _ ht => ht) + exact hc.congr (fun t ht => hI t ht) } + exact ⟨c,hp,rfl,fun _ => rfl,hI⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..ededa57506375b7839067dbcf434612c850c659b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasDifferential.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasRestore + +namespace OAI + +/-! Supported restoration commutes with all local derivatives, including +its actual manifold differential, and preserves the original atlas support. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +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 restore_plane_tsupport (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + tsupport (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) ⊆ + tsupport (A.weight i) := by + apply closure_minimal _ (isClosed_tsupport _) + intro p hp + by_cases hs : p ∈ (chart (i : M)).source + · apply A.mem_weight_support_of_plane i hs + apply hf + apply subset_tsupport f + intro hz + apply hp + rw [A.restore_plane_on_source i f hf hs,hz] + · exfalso + apply hp + simp only [restore,indicator_of_notMem hs] + +lemma restore_plane_mfderiv (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {p : M} (hp : p ∈ (chart (i : M)).source) + (hd : DifferentiableAt ℝ f (planeCoordinateIsometry (chart (i : M) p))) : + mfderiv planeModel 𝓘(ℝ,V) + (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) p = + (fderiv ℝ f (planeCoordinateIsometry (chart (i : M) p))).comp + (planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + (mfderiv planeModel 𝓘(ℝ,JetPolynomial.Base) (chart (i : M)) p)) := by + have he : restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) =ᶠ[𝓝 p] + (f ∘ planeCoordinateIsometry) ∘ chart (i : M) := by + filter_upwards [(chart (i : M)).open_source.mem_nhds hp] with x hx + exact A.restore_plane_on_source i f hf hx + have hc := ((chart_smooth (i : M)) p hp).contMDiffAt + ((chart (i : M)).open_source.mem_nhds hp) + have hfc : DifferentiableAt ℝ (f ∘ planeCoordinateIsometry) (chart (i : M) p) := + hd.comp _ planeCoordinateIsometry.differentiableAt + rw [he.mfderiv_eq] + change mfderiv planeModel 𝓘(ℝ,V) ((f ∘ planeCoordinateIsometry) ∘ chart (i : M)) p = _ + rw [mfderiv_comp p hfc.mdifferentiableAt (hc.mdifferentiableAt (by simp))] + rw [mfderiv_eq_fderiv] + change (fderiv ℝ (f ∘ planeCoordinateIsometry) (chart (i : M) p)).comp + (mfderiv planeModel 𝓘(ℝ,JetPolynomial.Base) (chart (i : M)) p) = _ + have heq : fderiv ℝ (f ∘ planeCoordinateIsometry) (chart (i : M) p) = + (fderiv ℝ f (planeCoordinateIsometry (chart (i : M) p))).comp + planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap := by + exact (hd.hasFDerivAt.comp _ planeCoordinateIsometry.toContinuousLinearEquiv.hasFDerivAt).fderiv + rw [heq] + exact ContinuousLinearMap.comp_assoc _ _ _ + +lemma restore_plane_coordinate_jet (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {x : JetPolynomial.Base} (hx : x ∈ (chart (i : M)).target) (m : ℕ) : + iteratedFDeriv ℝ m (fun y => + restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) ((chart (i : M)).symm y)) x = + iteratedFDeriv ℝ m (f ∘ planeCoordinateIsometry) x := by + have he : (fun y => restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) + ((chart (i : M)).symm y)) =ᶠ[𝓝 x] f ∘ planeCoordinateIsometry := by + filter_upwards [(chart (i : M)).open_target.mem_nhds hx] with y hy + exact A.restore_plane_in_coordinates i f hf hy + exact (he.iteratedFDeriv ℝ m).self_of_nhds + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..38183a608a4699cdb13db8ee23bbd55a4553eaaa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasMetric.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasDifferential +import OAI.Geometry.SurfaceImmersion.Geometry.ManifoldMetricCalculus +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDifferential + +namespace OAI + +/-! Actual metric and linearized metric of supported restored displacements +in the original atlas coordinates. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4 +open FiniteOrderSmoothing JetPolynomial + +lemma surfaceDifferential_zero_off_support + {M V : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [NormedAddCommGroup V] [NormedSpace ℝ V] (F : M → V) {p : M} + (hp : p ∉ tsupport F) : surfaceDifferential F p = 0 := by + have he : F =ᶠ[𝓝 p] (fun _ => (0 : V)) := notMem_tsupport_iff_eventuallyEq.mp hp + unfold surfaceDifferential + rw [he.mfderiv_eq, mfderiv_const] + exact ContinuousLinearMap.comp_zero _ + +lemma euclidean_metric_coordinate_value (f : SmallModes.Base → Space) + {y : SmallModes.Base} (hf : DifferentiableAt ℝ f y) (v w : SmallModes.Base) : + PhaseMean.evaluate (RealModes.realMetricTensor (spaceCoordinates ∘ f) y) v w = + inner ℝ (fderiv ℝ f y v) (fderiv ℝ f y w) := by + rw [RealModes.evaluate_realMetricTensor] + simp only [RealModes.realMetric, SmallModes.coordDeriv] + rw [(spaceCoordinates.hasFDerivAt.comp y hf.hasFDerivAt).fderiv] + exact spaceCoordinates_dot _ _ + +namespace FiniteOrderSmoothing.SmoothingAtlas +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable (A : SmoothingAtlas M) + +lemma restore_plane_metric_on_source (i : A.centers) (f : SmallModes.Base → Space) + (hf : tsupport f ⊆ (Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {p : M} (hp : p ∈ (chart (i : M)).source) + (hd : DifferentiableAt ℝ f (planeCoordinateIsometry (chart (i : M) p))) + (v w : TangentSpace planeModel p) : + inducedForm (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) p v w = + PhaseMean.evaluate + (RealModes.realMetricTensor (spaceCoordinates ∘ f) + (planeCoordinateIsometry (chart (i : M) p))) + (planeCoordinateIsometry (surfaceDifferential (chart (i : M)) p v)) + (planeCoordinateIsometry (surfaceDifferential (chart (i : M)) p w)) := by + rw [euclidean_metric_coordinate_value f hd] + unfold inducedForm + have he := A.restore_plane_mfderiv i f hf hp hd + change surfaceDifferential (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) p = _ at he + rw [he] + rfl + +lemma restore_plane_metric_off_support (i : A.centers) (f : SmallModes.Base → Space) + (hf : tsupport f ⊆ (Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {p : M} (hp : p ∉ tsupport (A.weight i)) (v w : TangentSpace planeModel p) : + inducedForm (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) p v w = 0 := by + have hzero := surfaceDifferential_zero_off_support + (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) + (fun h => hp (A.restore_plane_tsupport i f hf h)) + simp only [inducedForm,hzero,zero_apply,inner_zero_right] + +end FiniteOrderSmoothing.SmoothingAtlas +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasRestore.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasRestore.lean new file mode 100644 index 0000000000000000000000000000000000000000..a4a39737ed9fd3440b2a02183b773dd735e77f76 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedAtlasRestore.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.SurfaceImmersion.Geometry.VectorPlaneRestore + +namespace OAI + +/-! A displacement supported on an atlas weight's compact support is +restored exactly in that chart; the outer cutoff introduces no jet error. -/ +noncomputable section +open Set +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Manifold +open JetPolynomial JetPolynomial.Perturbation +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 mem_weight_support_of_plane (i : A.centers) {p : M} (hp : p ∈ (chart (i : M)).source) + (h : planeCoordinateIsometry (chart (i : M) p) ∈ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : p ∈ tsupport (A.weight i) := by + obtain ⟨y,hy,he⟩ := h + have hyEq : y = chart (i : M) p := planeCoordinateIsometry.injective he + subst y + obtain ⟨q,hq,hqp⟩ := hy + have hqEq : q = p := (chart (i : M)).injOn (A.weight_support i hq) hp hqp + rwa [hqEq] at hq + +lemma restore_plane_on_source (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {p : M} (hp : p ∈ (chart (i : M)).source) : + restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) p = + f (planeCoordinateIsometry (chart (i : M) p)) := by + rw [restore,indicator_of_mem hp] + change A.outer i p • f (planeCoordinateIsometry (chart (i : M) p)) = _ + by_cases hz : f (planeCoordinateIsometry (chart (i : M) p)) = 0 + · rw [hz,smul_zero] + · rw [A.outer_one i p (A.mem_weight_support_of_plane i hp (hf (subset_tsupport f hz))),one_smul] + +lemma restore_plane_in_coordinates (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {x : JetPolynomial.Base} (hx : x ∈ (chart (i : M)).target) : + restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) ((chart (i : M)).symm x) = + f (planeCoordinateIsometry x) := by + rw [A.restore_plane_on_source i f hf ((chart (i : M)).map_target hx),(chart (i : M)).right_inv hx] + +lemma restore_plane_coordinate_derivative (i : A.centers) (f : SmallModes.Base → V) + (hf : tsupport f ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + {x : JetPolynomial.Base} (hx : x ∈ (chart (i : M)).target) : + fderiv ℝ (fun y => restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry) + ((chart (i : M)).symm y)) x = fderiv ℝ (f ∘ planeCoordinateIsometry) x := by + apply Filter.EventuallyEq.fderiv_eq + filter_upwards [(chart (i : M)).open_target.mem_nhds hx] with y hy + exact A.restore_plane_in_coordinates i f hf hy + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartEquiv.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartEquiv.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca08688494206dc5b29f271f31d2d916f9fdb6e4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartEquiv.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedChartTransport + +namespace OAI + +/-! Invertible local-chart transport on supported fields and their linear +operators. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +variable {A B F : Type*} + [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup B] [NormedSpace ℝ B] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +omit [NormedSpace ℝ A] in +lemma chartPull_zero (e : OpenPartialHomeomorph A B) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) (chartSupport e K hK)) : + ∀ x ∈ e.source, x ∉ (K : Set A) → f (e x) = 0 := by + intro x hx hn + apply f.zero_on_compl + rintro ⟨z,hz,hez⟩ + have hzx : z = x := by + have hh := congrArg e.symm hez + simpa only [e.left_inv (hK hz), e.left_inv hx] using hh + exact hn (hzx ▸ hz) + +def chartPull (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) (chartSupport e K hK)) : + SupportedField (F := F) K := + ContDiffMapSupportedIn.of_support_subset + (contDiff_indicator_of_support e.open_source K.isCompact.isClosed hK + (f.contDiff.comp_contDiffOn he) (chartPull_zero e K hK f)) + (subset_closure.trans (tsupport_indicator_subset K.isCompact.isClosed (chartPull_zero e K hK f))) + +@[simp] lemma chartPull_apply (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) (chartSupport e K hK)) (x : A) : + chartPull e he K hK f x = e.source.indicator (f ∘ e) x := rfl + +lemma chartPull_push (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) K) : + chartPull e he K hK (chartPush e hi K hK f) = f := by + apply DFunLike.ext + intro x + by_cases hx : x ∈ e.source + · rw [chartPull_apply, Set.indicator_of_mem hx] + exact chartPush_eval_source e hi K hK f hx + · rw [chartPull_apply, Set.indicator_of_notMem hx] + exact (f.zero_on_compl (fun hk => hx (hK hk))).symm + +lemma chartPush_pull (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) (chartSupport e K hK)) : + chartPush e hi K hK (chartPull e he K hK f) = f := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target + · rw [chartPush_apply, Set.indicator_of_mem hy] + change chartPull e he K hK f (e.symm y) = f y + rw [chartPull_apply, Set.indicator_of_mem (e.map_target hy)] + simp only [Function.comp_apply, e.right_inv hy] + · rw [chartPush_apply, Set.indicator_of_notMem hy] + exact (f.zero_on_compl (fun hk => hy (chartSupport_subset e K hK hk))).symm + +def chartEquiv (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) : + SupportedField (F := F) K ≃ₗ[ℝ] SupportedField (F := F) (chartSupport e K hK) where + toFun := chartPush e hi K hK + invFun := chartPull e he K hK + left_inv := chartPull_push e he hi K hK + right_inv := chartPush_pull e he hi K hK + map_add' := (chartPushLM e hi K hK).map_add + map_smul' := (chartPushLM e hi K hK).map_smul + +lemma chartPull_bound (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e e.source) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) {s : ℝ≥0} {J : ℝ} {m : ℕ} + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hJ : 1 ≤ J) + (hderiv : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (f : SupportedField (F := F) (chartSupport e K hK)) : + supportedWeightedSeminorm K s m (chartPull e he K hK f) ≤ + (m.factorial : ℝ) * supportedWeightedSeminorm (chartSupport e K hK) s m f * J ^ m := by + have hf := (weightedBound_of_supportedSeminorm s m f).restrict_open e.open_target + have hb := hf.comp_coordinates e.open_source.uniqueDiffOn e.open_target.uniqueDiffOn hs hs1 hJ + (apply_nonneg _ _) he f.contDiff.contDiffOn (fun _ hx => e.map_source hx) hderiv + apply supportedSeminorm_le_of_weightedBound hs (by positivity) + exact hb.indicator_of_support e.open_source K.isCompact.isClosed hK (by positivity) + (chartPull_zero e K hK f) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d2779ea2d3779db0b57f00d03b86985eaae65b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartPullback.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedCompositionBounds +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Compactly supported pullback through a local chart, extended by a fixed +cutoff without altering the pullback on the chart's source. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def supportedChartPullback (e : OpenPartialHomeomorph Base Base) (χ : Base → ℝ) + (f : Base → V) (x : Base) : V := χ x • f (e x) + +lemma supportedChartPullback_smooth (e : OpenPartialHomeomorph Base Base) + {χ : Base → ℝ} {f : Base → V} (he : ContDiff ℝ ∞ e) + (hχ : ContDiff ℝ ∞ χ) (hf : ContDiff ℝ ∞ f) : + ContDiff ℝ ∞ (supportedChartPullback e χ f) := hχ.smul (hf.comp he) + +lemma supportedChartPullback_support (e : OpenPartialHomeomorph Base Base) + (hi : ContDiff ℝ ∞ e.symm) {χ : Base → ℝ} {f : Base → V} {K : Set Base} + (hK : IsCompact K) (hχ : tsupport χ ⊆ e.source) (hf : tsupport f ⊆ K) : + tsupport (supportedChartPullback e χ f) ⊆ e.symm '' K := by + apply closure_minimal _ (hK.image hi.continuous).isClosed + intro x hx + have hn : χ x • f (e x) ≠ 0 := hx + have hc : χ x ≠ 0 := fun hz => hn (by rw [hz,zero_smul]) + have hfx : f (e x) ≠ 0 := fun hz => hn (by rw [hz,smul_zero]) + exact ⟨e x,hf (subset_tsupport f hfx),e.left_inv (hχ (subset_tsupport χ hc))⟩ + +lemma supportedChartPullback_eq (e : OpenPartialHomeomorph Base Base) + {χ : Base → ℝ} {f : Base → V} {K : Set Base} + (hf : tsupport f ⊆ K) (hχ : ∀ x ∈ e.symm '' K, χ x = 1) + {x : Base} (hx : x ∈ e.source) : + supportedChartPullback e χ f x = f (e x) := by + by_cases hz : f (e x) = 0 + · simp only [supportedChartPullback,hz,smul_zero] + · have hxK : x ∈ e.symm '' K := ⟨e x,hf (subset_tsupport f hz),e.left_inv hx⟩ + simp only [supportedChartPullback,hχ x hxK,one_smul] + +lemma supportedChartPullback_bound (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hcompact : HasCompactSupport χ) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : 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) (supportedChartPullback e χ f) := + compact_localized_composition_bound isOpen_univ hcompact (subset_univ _) + hχ (Subset.rfl) he.contDiffOn m + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3a04ac4e6d69bc0ec82e9117784dae4890cc7f1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedChartTransport.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds + +namespace OAI + +/-! Transport smooth compactly supported fields through an actual local +coordinate homeomorphism. Extension by zero preserves the original support. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +variable {A B F : Type*} + [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup B] [NormedSpace ℝ B] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +/-- The image compact set for the local coordinate system. -/ +def chartSupport (e : OpenPartialHomeomorph A B) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) : Compacts B := + ⟨e '' K, K.isCompact.image_of_continuousOn (e.continuousOn.mono hK)⟩ + +omit [NormedSpace ℝ A] [NormedSpace ℝ B] in +lemma chartSupport_subset (e : OpenPartialHomeomorph A B) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) : (chartSupport e K hK : Set B) ⊆ e.target := by + rintro _ ⟨x,hx,rfl⟩ + exact e.map_source (hK hx) + +omit [NormedSpace ℝ B] in +lemma chartPush_zero (e : OpenPartialHomeomorph A B) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) K) : + ∀ y ∈ e.target, y ∉ (chartSupport e K hK : Set B) → f (e.symm y) = 0 := by + intro y hy hn + apply f.zero_on_compl + intro hx + exact hn ⟨e.symm y,hx,e.right_inv hy⟩ + +def chartPush (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) K) : + SupportedField (F := F) (chartSupport e K hK) := + ContDiffMapSupportedIn.of_support_subset + (contDiff_indicator_of_support e.open_target (chartSupport e K hK).isCompact.isClosed + (chartSupport_subset e K hK) (f.contDiff.comp_contDiffOn he) (chartPush_zero e K hK f)) + (subset_closure.trans (tsupport_indicator_subset (chartSupport e K hK).isCompact.isClosed + (chartPush_zero e K hK f))) + +@[simp] lemma chartPush_apply (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) K) (y : B) : + chartPush e he K hK f y = e.target.indicator (f ∘ e.symm) y := rfl + +def chartPushLM (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) : + SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := F) (chartSupport e K hK) where + toFun := chartPush e he K hK + map_add' f g := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target <;> simp [chartPush_apply, hy] + map_smul' c f := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target <;> simp [chartPush_apply, hy] + +lemma chartPush_eval_source (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) (f : SupportedField (F := F) K) + {x : A} (hx : x ∈ e.source) : chartPush e he K hK f (e x) = f x := by + rw [chartPush_apply, Set.indicator_of_mem (e.map_source hx)] + simp only [Function.comp_apply, e.left_inv hx] + +lemma chartPush_bound (e : OpenPartialHomeomorph A B) + (he : ContDiffOn ℝ ∞ e.symm e.target) (K : Compacts A) + (hK : (K : Set A) ⊆ e.source) {s : ℝ≥0} {J : ℝ} {m : ℕ} + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hJ : 1 ≤ J) + (hderiv : ∀ j, 1 ≤ j → j ≤ m → ∀ y ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ J) + (f : SupportedField (F := F) K) : + supportedWeightedSeminorm (chartSupport e K hK) s m (chartPush e he K hK f) ≤ + (m.factorial : ℝ) * supportedWeightedSeminorm K s m f * J ^ m := by + have hf := (weightedBound_of_supportedSeminorm s m f).restrict_open e.open_source + have hb := hf.comp_coordinates e.open_target.uniqueDiffOn e.open_source.uniqueDiffOn hs hs1 hJ + (apply_nonneg _ _) he f.contDiff.contDiffOn (fun _ hy => e.map_target hy) hderiv + apply supportedSeminorm_le_of_weightedBound hs (by positivity) + exact hb.indicator_of_support e.open_target (chartSupport e K hK).isCompact.isClosed + (chartSupport_subset e K hK) (by positivity) (chartPush_zero e K hK f) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedCoordinateChange.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedCoordinateChange.lean new file mode 100644 index 0000000000000000000000000000000000000000..11c0ece26e416ee647f3d21f7d17ea092f077437 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedCoordinateChange.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm + +namespace OAI + +/-! Isometric linear coordinate changes preserve the supported weighted +seminorms exactly. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +variable {A B F : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup B] [NormedSpace ℝ B] [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma weightedBound_comp_isometry (e : A ≃ₗᵢ[ℝ] B) {f : B → F} + (hf : ContDiff ℝ ∞ f) {s C : ℝ} {m : ℕ} + (hb : WeightedBound Set.univ s m C f) : + WeightedBound Set.univ s m C (f ∘ e) := by + intro j hj x _ + rw [iteratedFDerivWithin_univ] + 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 + simpa only [iteratedFDerivWithin_univ] using hb j hj (e x) (Set.mem_univ _) + +def pushSupported (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) (f : SupportedField (F := F) K) : + SupportedField (F := F) (K.map e e.continuous) := + ⟨f ∘ e.symm, f.contDiff.comp e.symm.contDiff, fun y hy => by + apply f.zero_on_compl + intro hx + exact hy ⟨e.symm y, hx, e.apply_symm_apply y⟩⟩ + +def pullSupported (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) + (f : SupportedField (F := F) (K.map e e.continuous)) : SupportedField (F := F) K := + ⟨f ∘ e, f.contDiff.comp e.contDiff, fun x hx => by + apply f.zero_on_compl + rintro ⟨z, hz, hzx⟩ + exact hx (e.injective hzx ▸ hz)⟩ + +def supportedCoordinateEquiv (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) : + SupportedField (F := F) K ≃ₗ[ℝ] SupportedField (F := F) (K.map e e.continuous) where + toFun := pushSupported e K + invFun := pullSupported e K + left_inv f := by + apply DFunLike.ext + intro x + change f (e.symm (e x)) = f x + rw [e.symm_apply_apply] + right_inv f := by + apply DFunLike.ext + intro x + change f (e (e.symm x)) = f x + rw [e.apply_symm_apply] + map_add' f g := by + apply DFunLike.ext + intro x + rfl + map_smul' c f := by + apply DFunLike.ext + intro x + rfl + +lemma supportedCoordinateEquiv_norm (e : A ≃ₗᵢ[ℝ] B) (K : Compacts A) + {s : ℝ≥0} (hs : 0 < (s : ℝ)) (m : ℕ) (f : SupportedField (F := F) K) : + supportedWeightedSeminorm (K.map e e.continuous) s m (supportedCoordinateEquiv e K f) = + supportedWeightedSeminorm K s m f := by + apply le_antisymm + · apply supportedSeminorm_le_of_weightedBound hs (apply_nonneg _ _) + exact weightedBound_comp_isometry e.symm f.contDiff (weightedBound_of_supportedSeminorm s m f) + · have hb := weightedBound_comp_isometry e (supportedCoordinateEquiv e K f).contDiff + (weightedBound_of_supportedSeminorm s m (supportedCoordinateEquiv e K f)) + have hid : (supportedCoordinateEquiv e K f : B → F) ∘ e = (f : A → F) := by + funext x + change f (e.symm (e x)) = f x + rw [e.symm_apply_apply] + rw [hid] at hb + exact supportedSeminorm_le_of_weightedBound hs (apply_nonneg _ _) f hb + +/-- The two coordinate conventions used by the geometric and jet formulas. -/ +def planeCoordinateIsometry : (Fin 2 → ℝ) ≃ₗᵢ[ℝ] ℝ × ℝ where + toLinearEquiv := LinearEquiv.finTwoArrow ℝ ℝ + norm_map' x := by + change max ‖x 0‖ ‖x 1‖ = ‖x‖ + apply le_antisymm + · exact max_le (norm_le_pi_norm x 0) (norm_le_pi_norm x 1) + · apply (pi_norm_le_iff_of_nonneg (le_max_of_le_left (norm_nonneg _))).2 + intro i + fin_cases i + · exact le_max_left _ _ + · exact le_max_right _ _ + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..c24b3ca52ae05c16d14ee21d82f42de96ab7bad9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseMetric.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedMetricDefect +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedChartPullback + +namespace OAI + +/-! The actual supported phase-chart map realizes the localized metric +identity. Its cutoff is fixed before the fast scale is chosen. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +theorem supported_phase_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) {K : Set Base} (hK : IsCompact K) + (hone : ∀ x ∈ e.symm '' K, χ x = 1) + {H V : Base → JetPolynomial.Space} (hH : ContDiff ℝ ∞ H) (hV : ContDiff ℝ ∞ V) + (hs : tsupport (V-H ∘ e.symm) ⊆ K) + (B : Base → PhaseMean.Tensor) (z : ℝ) (x : Base) : + let W := H + supportedChartPullback e χ (V-H ∘ e.symm) + RealModes.realMetricTensor (W ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry x) - + RealModes.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 => RealModes.realMetricTensor (V ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry y) - + coordinateMetricMap P z (H ∘ e.symm) (planeCoordinateIsometry y) - B y) x := by + let f := supportedChartPullback e χ (V-H ∘ e.symm) + have hsf : tsupport f ⊆ e.symm '' K := supportedChartPullback_support e hi hK hχ hs + have hsub : (H+f)-H = f := by funext y; simp + apply localized_metric_defect P e he hi hχ (hH.comp hi) hH hV + · intro y hy + simp only [Function.comp_apply,e.left_inv hy] + · intro y hy + have hh := supportedChartPullback_eq e hs hone hy + change H y + supportedChartPullback e χ (V-H ∘ e.symm) y = V (e y) + rw [hh] + simp only [Pi.sub_apply,Function.comp_apply,e.left_inv hy] + abel + · intro y hy + rw [hsub] at hy + exact hone y (hsf hy) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseOperators.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseOperators.lean new file mode 100644 index 0000000000000000000000000000000000000000..01ef61458788d009cbe9b07ca884c1b3b45f3a10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedPhaseOperators.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.SurfaceImmersion.Geometry.ModulatedJets + +namespace OAI + +/-! Phase multiplication is an actual linear operator on supported smooth +fields, with the same fixed support. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] [NormedSpace ℝ F] + [IsScalarTower ℝ ℂ F] [SMulCommClass ℂ ℝ F] + +def multiplierLM (K : Compacts Base) (a : Base → ℂ) (ha : ContDiff ℝ ∞ a) : + SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := F) K where + toFun H := ⟨fun p => a p • H p, ha.smul H.contDiff, fun p hp => by + change a p • H p = 0 + simp only [H.zero_on_compl hp, Pi.zero_apply, smul_zero]⟩ + map_add' H J := by + apply DFunLike.ext + intro p + exact smul_add (a p) (H p) (J p) + map_smul' c H := by + apply DFunLike.ext + intro p + exact smul_comm (a p) c (H p) + +lemma multiplierLM_apply (K : Compacts Base) (a : Base → ℂ) (ha : ContDiff ℝ ∞ a) + (H : SupportedField (F := F) K) (p : Base) : multiplierLM K a ha H p = a p • H p := rfl + +namespace ModulatedJets + +lemma phase_neg_inv (τ : ℝ) (φ : Base → ℝ) (p : Base) : + phase τ (fun q => -φ q) p = (phase τ φ p)⁻¹ := by + simp only [phase, Complex.ofReal_neg, mul_neg, Complex.exp_neg] + +def phaseLM (K : Compacts Base) {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) : + SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := F) K := + multiplierLM K (phase τ φ) (phase_smooth hφ τ) + +def inversePhaseLM (K : Compacts Base) {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) : + SupportedField (F := F) K →ₗ[ℝ] SupportedField (F := F) K := + phaseLM K hφ.neg τ + +lemma inversePhaseLM_phaseLM (K : Compacts Base) {φ : Base → ℝ} + (hφ : ContDiff ℝ ∞ φ) (τ : ℝ) (H : SupportedField (F := F) K) : + inversePhaseLM K hφ τ (phaseLM K hφ τ H) = H := by + apply DFunLike.ext + intro p + change phase τ (fun q => -φ q) p • (phase τ φ p • H p) = H p + have hp : phase τ φ p ≠ 0 := Complex.exp_ne_zero _ + rw [phase_neg_inv, smul_smul, inv_mul_cancel₀ hp, one_smul] + +end ModulatedJets +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedTensorChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedTensorChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..502c3d01f1d81ae9e6a754f6d4ff060b22c81b9d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedTensorChart.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedChartEquiv +import OAI.Geometry.Immersion.ClosedSurface.PullbackBounds + +namespace OAI + +/-! Coordinate transport of the symmetric complex tensors used as targets +in the perturbed phase equations. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates PhaseMean + +variable (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + (K : Compacts SmallModes.Base) (hK : (K : Set SmallModes.Base) ⊆ e.source) + +lemma tensorChartPush_zero (f : SupportedField (F := ComplexTensor) K) : + ∀ y ∈ e.target, y ∉ (chartSupport e K hK : Set SmallModes.Base) → + coordinateTarget e.symm f y = 0 := by + intro y hy hn + simp only [coordinateTarget, chartPush_zero e K hK f y hy hn, map_zero] + +def tensorChartPush (f : SupportedField (F := ComplexTensor) K) : + SupportedField (F := ComplexTensor) (chartSupport e K hK) := + ContDiffMapSupportedIn.of_support_subset + (contDiff_indicator_of_support e.open_target (chartSupport e K hK).isCompact.isClosed + (chartSupport_subset e K hK) + (contDiffOn_coordinateTarget e.open_target f.contDiff.contDiffOn hi (fun _ _ => Set.mem_univ _)) + (tensorChartPush_zero e K hK f)) + (subset_closure.trans (tsupport_indicator_subset (chartSupport e K hK).isCompact.isClosed + (tensorChartPush_zero e K hK f))) + +@[simp] lemma tensorChartPush_apply (f : SupportedField (F := ComplexTensor) K) (y : SmallModes.Base) : + tensorChartPush e hi K hK f y = e.target.indicator (coordinateTarget e.symm f) y := rfl + +def tensorChartPushLM : + SupportedField (F := ComplexTensor) K →ₗ[ℝ] SupportedField (F := ComplexTensor) (chartSupport e K hK) where + toFun := tensorChartPush e hi K hK + map_add' f g := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target <;> + simp [tensorChartPush_apply, hy, coordinateTarget, map_add] + map_smul' c f := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target <;> + simp [tensorChartPush_apply, hy, coordinateTarget] + +lemma tensorChartPull_zero (f : SupportedField (F := ComplexTensor) (chartSupport e K hK)) : + ∀ x ∈ e.source, x ∉ (K : Set SmallModes.Base) → coordinateTarget e f x = 0 := by + intro x hx hn + simp only [coordinateTarget, chartPull_zero e K hK f x hx hn, map_zero] + +def tensorChartPull (f : SupportedField (F := ComplexTensor) (chartSupport e K hK)) : + SupportedField (F := ComplexTensor) K := + ContDiffMapSupportedIn.of_support_subset + (contDiff_indicator_of_support e.open_source K.isCompact.isClosed hK + (contDiffOn_coordinateTarget e.open_source f.contDiff.contDiffOn he (fun _ _ => Set.mem_univ _)) + (tensorChartPull_zero e K hK f)) + (subset_closure.trans (tsupport_indicator_subset K.isCompact.isClosed + (tensorChartPull_zero e K hK f))) + +@[simp] lemma tensorChartPull_apply (f : SupportedField (F := ComplexTensor) (chartSupport e K hK)) + (x : SmallModes.Base) : + tensorChartPull e he K hK f x = e.source.indicator (coordinateTarget e f) x := rfl + +lemma tensorChartPull_push (f : SupportedField (F := ComplexTensor) K) : + tensorChartPull e he K hK (tensorChartPush e hi K hK f) = f := by + apply DFunLike.ext + intro x + by_cases hx : x ∈ e.source + · rw [tensorChartPull_apply, Set.indicator_of_mem hx] + change complexPullbackField e x (tensorChartPush e hi K hK f (e x)) = f x + rw [tensorChartPush_apply, Set.indicator_of_mem (e.map_source hx)] + change complexPullbackField e x (complexPullbackField e.symm (e x) (f (e.symm (e x)))) = f x + rw [e.left_inv hx] + apply complexPullbackField_inverse + · exact (he.contDiffAt (e.open_source.mem_nhds hx)).differentiableAt (by simp) + · exact (hi.contDiffAt (e.open_target.mem_nhds (e.map_source hx))).differentiableAt (by simp) + · filter_upwards [e.open_source.mem_nhds hx] with z hz using e.left_inv hz + · rw [tensorChartPull_apply, Set.indicator_of_notMem hx] + exact (f.zero_on_compl (fun hk => hx (hK hk))).symm + +lemma tensorChartPush_pull (f : SupportedField (F := ComplexTensor) (chartSupport e K hK)) : + tensorChartPush e hi K hK (tensorChartPull e he K hK f) = f := by + apply DFunLike.ext + intro y + by_cases hy : y ∈ e.target + · rw [tensorChartPush_apply, Set.indicator_of_mem hy] + change complexPullbackField e.symm y (tensorChartPull e he K hK f (e.symm y)) = f y + rw [tensorChartPull_apply, Set.indicator_of_mem (e.map_target hy)] + change complexPullbackField e.symm y (complexPullbackField e (e.symm y) (f (e (e.symm y)))) = f y + rw [e.right_inv hy] + apply complexPullbackField_inverse + · exact (hi.contDiffAt (e.open_target.mem_nhds hy)).differentiableAt (by simp) + · exact (he.contDiffAt (e.open_source.mem_nhds (e.map_target hy))).differentiableAt (by simp) + · filter_upwards [e.open_target.mem_nhds hy] with z hz using e.right_inv hz + · rw [tensorChartPush_apply, Set.indicator_of_notMem hy] + exact (f.zero_on_compl (fun hk => hy (chartSupport_subset e K hK hk))).symm + +def tensorChartEquiv : + SupportedField (F := ComplexTensor) K ≃ₗ[ℝ] SupportedField (F := ComplexTensor) (chartSupport e K hK) where + toFun := tensorChartPush e hi K hK + invFun := tensorChartPull e he K hK + left_inv := tensorChartPull_push e he hi K hK + right_inv := tensorChartPush_pull e he hi K hK + map_add' := (tensorChartPushLM e hi K hK).map_add + map_smul' := (tensorChartPushLM e hi K hK).map_smul + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedWeightedSeminorm.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedWeightedSeminorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9472c54a4ae493fbd7040fc67c5f52b41dc1dbb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SupportedWeightedSeminorm.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations + +namespace OAI + +/-! The weighted derivative bounds as actual seminorms on smooth fields +with fixed compact support, for finite derivative-loss parametrix iteration. -/ +noncomputable section +open TopologicalSpace +open scoped Distributions NNReal + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +variable {A : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + +abbrev SupportedField (K : Compacts A) := ContDiffMapSupportedIn A F ⊤ K + +def supportedWeightedSeminorm (K : Compacts A) (s : ℝ≥0) (m : ℕ) : + Seminorm ℝ (SupportedField (F := F) K) := + (Finset.range (m + 1)).sup fun j => + s ^ j • ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j + +lemma supportedWeightedSeminorm_component {K : Compacts A} (s : ℝ≥0) (m j : ℕ) + (hj : j ≤ m) (f : SupportedField (F := F) K) : + (s : ℝ) ^ j * ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j f ≤ + supportedWeightedSeminorm K s m f := by + let q : ℕ → Seminorm ℝ (SupportedField (F := F) K) := + fun j => s ^ j • ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j + have h : q j f ≤ (Finset.range (m + 1)).sup q f := + Seminorm.le_finset_sup_apply (show j ∈ Finset.range (m + 1) by simpa using hj) + simpa only [q, supportedWeightedSeminorm, smul_apply, NNReal.smul_def, + NNReal.coe_pow, smul_eq_mul] using h + +lemma weightedBound_of_supportedSeminorm {K : Compacts A} (s : ℝ≥0) (m : ℕ) + (f : SupportedField (F := F) K) : + WeightedBound Set.univ s m (supportedWeightedSeminorm K s m f) f := by + intro j hj x _ + rw [iteratedFDerivWithin_univ] + calc + (s : ℝ) ^ j * ‖iteratedFDeriv ℝ j f x‖ ≤ + (s : ℝ) ^ j * ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j f := + mul_le_mul_of_nonneg_left (ContDiffMapSupportedIn.norm_iteratedFDeriv_apply_le_seminorm_top ℝ) + (pow_nonneg s.coe_nonneg _) + _ ≤ _ := supportedWeightedSeminorm_component s m j hj f + +lemma supportedSeminorm_le_of_weightedBound {K : Compacts A} {s : ℝ≥0} (hs : 0 < (s : ℝ)) + {m : ℕ} {C : ℝ} (hC : 0 ≤ C) (f : SupportedField (F := F) K) + (hb : WeightedBound Set.univ s m C f) : supportedWeightedSeminorm K s m f ≤ C := by + apply Seminorm.finset_sup_apply_le hC + intro j hj + have hjm : j ≤ m := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) + change (s : ℝ) ^ j * ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j f ≤ C + have hn : ContDiffMapSupportedIn.seminorm ℝ A F ⊤ K j f ≤ C / (s : ℝ) ^ j := by + apply (ContDiffMapSupportedIn.seminorm_top_le_iff ℝ (div_nonneg hC (pow_nonneg s.coe_nonneg _)) j f).2 + intro x _ + simpa only [iteratedFDerivWithin_univ] using hb.deriv_le hs hjm (Set.mem_univ x) + calc + _ ≤ (s : ℝ) ^ j * (C / (s : ℝ) ^ j) := mul_le_mul_of_nonneg_left hn (pow_nonneg s.coe_nonneg _) + _ = C := by field_simp [ne_of_gt hs] + +theorem supportedSeminorm_le_iff {K : Compacts A} {s : ℝ≥0} (hs : 0 < (s : ℝ)) + {m : ℕ} {C : ℝ} (hC : 0 ≤ C) (f : SupportedField (F := F) K) : + supportedWeightedSeminorm K s m f ≤ C ↔ WeightedBound Set.univ s m C f := by + constructor + · exact fun h => (weightedBound_of_supportedSeminorm s m f).mono_const h + · exact supportedSeminorm_le_of_weightedBound hs hC f + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartPairStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartPairStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb66d2d530badeee784342eb6d0d486dab80331d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartPairStability.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCoordinateTranslation +import OAI.Geometry.SurfaceImmersion.Geometry.CompactTranslationStability + +namespace OAI + +/-! A compact set of regular surface double pairs stays regular under a +small scalar-weighted translation, inside fixed coordinate patches. -/ +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_chart_pair_stability (p q : M) + {f : M → ProjectionTarget 3} {χ : M → ℝ} + {F G : Base → ProjectionTarget 3} {ρ σ : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (hρ : ContDiff ℝ ∞ ρ) (hσ : ContDiff ℝ ∞ σ) + {U V : Set M} (hU : IsOpen U) (hV : IsOpen V) + (hUp : U ⊆ (chart p).source) (hVq : V ⊆ (chart q).source) + (heF : EqOn f (F ∘ chart p) U) (heG : EqOn f (G ∘ chart q) V) + (heρ : EqOn χ (ρ ∘ chart p) U) (heσ : EqOn χ (σ ∘ chart q) V) + {K : Set (M × M)} (hK : IsCompact K) (hKU : K ⊆ U ×ˢ V) + (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 + let κ : M × M → Base × Base := fun z => (chart p z.1,chart q z.2) + let D : Base × Base → ProjectionTarget 3 := fun z => F z.1-G z.2 + let c : Base × Base → ℝ := fun z => ρ z.1-σ z.2 + have hDc : ContDiff ℝ ∞ D := (hF.comp contDiff_fst).sub (hG.comp contDiff_snd) + have hcc : ContDiff ℝ ∞ c := (hρ.comp contDiff_fst).sub (hσ.comp contDiff_snd) + have hκ : ContinuousOn κ K := by + intro z hz + exact (((chart p).continuousAt (hUp (hKU hz).1)).comp continuous_fst.continuousAt).prodMk + (((chart q).continuousAt (hVq (hKU hz).2)).comp continuous_snd.continuousAt) |>.continuousWithinAt + have hKc : IsCompact (κ '' K) := hK.image_of_continuousOn hκ + have hregc : ∀ w ∈ κ '' K, D w = 0 → Function.Surjective (fderiv ℝ D w) := by + rintro w ⟨z,hz,rfl⟩ hw + have hzU := (hKU hz).1 + have hzV := (hKU hz).2 + have hv : f z.1 = f z.2 := by + rw [heF hzU,heG hzV] + exact sub_eq_zero.mp hw + exact (surface_pair_coordinate_regular_iff p q (hUp hzU) (hVq hzV) hF hG + (heF.eventuallyEq_of_mem (hU.mem_nhds hzU)) + (heG.eventuallyEq_of_mem (hV.mem_nhds hzV))).mp (hreg z hz hv) + obtain ⟨δ,hδ,hstable⟩ := compact_translation_stability hDc hcc hKc hregc + refine ⟨δ,hδ,?_⟩ + intro a ha z hz hval + have hzU := (hKU hz).1 + have hzV := (hKU hz).2 + apply (surface_pair_translation_coordinate_iff p q (hUp hzU) (hVq hzV) hF hG hρ hσ + (heF.eventuallyEq_of_mem (hU.mem_nhds hzU)) + (heG.eventuallyEq_of_mem (hV.mem_nhds hzV)) + (heρ.eventuallyEq_of_mem (hU.mem_nhds hzU)) + (heσ.eventuallyEq_of_mem (hV.mem_nhds hzV)) a).mpr + apply hstable a ha (κ z) ⟨z,hz,rfl⟩ + change (F (chart p z.1)-G (chart q z.2))+(ρ (chart p z.1)-σ (chart q z.2)) • a = 0 + have hf1 := heF hzU + have hf2 := heG hzV + have hχ1 := heρ hzU + have hχ2 := heσ hzV + change f z.1+χ z.1 • a = f z.2+χ z.2 • a at hval + rw [hf1,hf2,hχ1,hχ2] at hval + rw [sub_smul] + calc + _ = (F (chart p z.1)+ρ (chart p z.1) • a)- + (G (chart q z.2)+σ (chart q z.2) • a) := by abel + _ = 0 := sub_eq_zero.mpr hval + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartRepresentative.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartRepresentative.lean new file mode 100644 index 0000000000000000000000000000000000000000..12f291b85743f7d28ad1545d3cc8a5b9547bb9cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartRepresentative.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairDerivative +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! Every smooth surface map 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 surface_chart_representative {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) (p : M) : + ∃ (U : Set M) (F : Base → ProjectionTarget 3), 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/Atlas/SurfaceChartTranslationBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartTranslationBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..d3772040c3d568a3dcbde726f900c12aa2f14f74 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceChartTranslationBound.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCoordinateTranslation + +namespace OAI + +/-! Uniform chart derivative bounds for a fixed scalar translation family. -/ +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] +local instance chartScalarDerivNormed : NormedAddCommGroup (Base →L[ℝ] ℝ) := inferInstance +local instance chartScalarDerivSpace : NormedSpace ℝ (Base →L[ℝ] ℝ) := inferInstance + +lemma surface_chart_translation_derivative (p : M) + {f : M → ProjectionTarget 3} {χ : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + (a : ProjectionTarget 3) {x : Base} (hx : x ∈ (chart p).target) : + fderiv ℝ (surfaceTranslation f χ a ∘ (chart p).symm) x = + fderiv ℝ (f ∘ (chart p).symm) x+ + (fderiv ℝ (χ ∘ (chart p).symm) x).smulRight a := by + have hF : ContDiffOn ℝ ∞ (f ∘ (chart p).symm) (chart p).target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + have hC : ContDiffOn ℝ ∞ (χ ∘ (chart p).symm) (chart p).target := + (hχ.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + exact (((hF.contDiffAt ((chart p).open_target.mem_nhds hx)).differentiableAt (by simp)).hasFDerivAt.add + (((hC.contDiffAt ((chart p).open_target.mem_nhds hx)).differentiableAt (by simp)).hasFDerivAt.smul_const a)).fderiv + +theorem compact_chart_translation_bound (p : M) {χ : M → ℝ} + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + {S : Set Base} (hS : IsCompact S) (hST : S ⊆ (chart p).target) + {ε : ℝ} (hε : 0 < ε) : + ∃ δ > 0, ∀ {f : M → ProjectionTarget 3}, + ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f → + ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ x ∈ S, + ‖fderiv ℝ (surfaceTranslation f χ a ∘ (chart p).symm) x- + fderiv ℝ (f ∘ (chart p).symm) x‖ < ε := by + have hC : ContDiffOn ℝ ∞ (χ ∘ (chart p).symm) (chart p).target := + (hχ.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + have hD : ContinuousOn (fderiv ℝ (χ ∘ (chart p).symm)) S := + (hC.continuousOn_fderiv_of_isOpen (chart p).open_target (by simp)).mono hST + obtain ⟨C,hC⟩ := hS.exists_bound_of_continuousOn hD + let B := max C 0+1 + have hB : 0 < B := by dsimp [B]; linarith [le_max_right C 0] + refine ⟨ε/B,div_pos hε hB,?_⟩ + intro f hf a ha x hx + rw [surface_chart_translation_derivative p hf hχ a (hST hx),add_sub_cancel_left, + ContinuousLinearMap.norm_smulRight_apply] + have hb : ‖fderiv ℝ (χ ∘ (chart p).symm) x‖ ≤ B := + (hC x hx).trans (by dsimp [B]; linarith [le_max_left C 0]) + calc + _ ≤ B*‖a‖ := mul_le_mul_of_nonneg_right hb (norm_nonneg a) + _ < ε := by simpa only [mul_comm] using (lt_div_iff₀ hB).mp ha + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCompactCoordinateMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCompactCoordinateMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..81c5900475134f671c0f6c1f8f87cf23cf3c5033 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCompactCoordinateMap.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceLocalCoordinateMap +import OAI.Geometry.SurfaceImmersion.Atlas.CompactLocalChart +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateInverseGerm + +namespace OAI + +/-! A smooth coordinate map regular and injective on a compact surface +set is one smooth chart on a neighborhood of that 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] + [IsManifold planeModel ∞ M] [Nonempty M] + +theorem surface_compact_coordinate_map {f : M → Base} + (hf : ContMDiff planeModel 𝓘(ℝ,Base) ∞ f) {K : Set M} + (hK : IsCompact K) (hi : K.InjOn f) + (hreg : ∀ x ∈ K, Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) f x)) : + ∃ e : OpenPartialHomeomorph M Base, K ⊆ e.source ∧ (e : M → Base) = f ∧ + ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ e.symm e.target := by + obtain ⟨e,hKe,he,hcover⟩ := compact_local_chart_with_property + (fun d : OpenPartialHomeomorph M Base => ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d.symm d.target) + hf.continuous hK hi (by + intro x hx + obtain ⟨d,hd,heq,_,hdi⟩ := surface_local_coordinate_map hf x (hreg x hx) + exact ⟨d,hd,heq,hdi⟩) + refine ⟨e,hKe,he,?_⟩ + intro y hy + obtain ⟨d,hd,heq,hdi⟩ := hcover (e.symm y) (e.map_target hy) + have hde : EqOn d e d.source := by intro x hx; rw [he]; exact heq hx + obtain ⟨hyd,hgerm⟩ := coordinate_inverse_germ e d hy hd hde + exact ((hdi.contMDiffAt (d.open_target.mem_nhds hyd)).congr_of_eventuallyEq hgerm).contMDiffWithinAt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCoordinateTranslation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCoordinateTranslation.lean new file mode 100644 index 0000000000000000000000000000000000000000..2d1ec7c3317f2c08c19e39a7625d6a46266d2119 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCoordinateTranslation.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceScalarRepresentative + +namespace OAI + +/-! Exact coordinate representatives of scalar-weighted surface translations. -/ +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] + +omit [IsManifold planeModel ∞ M] in +lemma surface_translation_chart_germ (p : M) {x : M} + {f : M → ProjectionTarget 3} {χ : M → ℝ} + {F : Base → ProjectionTarget 3} {ρ : Base → ℝ} + (hF : f =ᶠ[𝓝 x] F ∘ chart p) (hρ : χ =ᶠ[𝓝 x] ρ ∘ chart p) + (a : ProjectionTarget 3) : + surfaceTranslation f χ a =ᶠ[𝓝 x] (fun z => F z+ρ z • a) ∘ chart p := by + filter_upwards [hF,hρ] with y hy hρy + change f y+χ y • a = F (chart p y)+ρ (chart p y) • a + rw [hy,hρy] + rfl + +theorem surface_pair_translation_coordinate_iff (p q : M) {x y : M} + (hx : x ∈ (chart p).source) (hy : y ∈ (chart q).source) + {f : M → ProjectionTarget 3} {χ : M → ℝ} + {F G : Base → ProjectionTarget 3} {ρ σ : Base → ℝ} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (hρ : ContDiff ℝ ∞ ρ) (hσ : ContDiff ℝ ∞ σ) + (heF : f =ᶠ[𝓝 x] F ∘ chart p) (heG : f =ᶠ[𝓝 y] G ∘ chart q) + (heρ : χ =ᶠ[𝓝 x] ρ ∘ chart p) (heσ : χ =ᶠ[𝓝 y] σ ∘ chart q) + (a : ProjectionTarget 3) : + Function.Surjective (surfacePairDerivative (surfaceTranslation f χ a) x y) ↔ + Function.Surjective (fderiv ℝ + (fun z : Base × Base => (F z.1-G z.2)+(ρ z.1-σ z.2) • a) + (chart p x,chart q y)) := by + have h := surface_pair_coordinate_regular_iff p q hx hy + (hF.add (hρ.smul contDiff_const)) (hG.add (hσ.smul contDiff_const)) + (surface_translation_chart_germ p heF heρ a) (surface_translation_chart_germ q heG heσ a) + have heq : (fun z : Base × Base => (F z.1+ρ z.1 • a)-(G z.2+σ z.2 • a)) = + (fun z : Base × Base => (F z.1-G z.2)+(ρ z.1-σ z.2) • a) := by + funext z + rw [sub_smul] + abel + change Function.Surjective (surfacePairDerivative (surfaceTranslation f χ a) x y) ↔ + Function.Surjective (fderiv ℝ (fun z : Base × Base => + (F z.1+ρ z.1 • a)-(G z.2+σ z.2 • a)) (chart p x,chart q y)) at h + rwa [heq] at h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCurveCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCurveCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd078d035eff15b18c74a623105521fa3da0cca0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceCurveCoordinates.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PlaneCurveCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceChartRepresentative + +namespace OAI + +/-! A regular smooth curve in the surface is the second coordinate +in actual smooth local surface 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] + [IsManifold planeModel ∞ M] + +theorem surface_curve_coordinates {γ : ℝ → M} {I : Set ℝ} + (hI : IsOpen I) (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ I) {t : ℝ} (ht : t ∈ I) + (hreg : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ t)) : + ∃ (c : OpenPartialHomeomorph M Base) (U : Set ℝ), + IsOpen U ∧ t ∈ U ∧ U ⊆ I ∧ + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source ∧ + ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target ∧ + ∀ s ∈ U, γ s ∈ c.source ∧ c (γ s) = ![0,s] := by + let p := γ t + have hp : p ∈ (chart p).source := by + simpa only [chart_source] using mem_chart_source Plane p + let W := I ∩ γ ⁻¹' (chart p).source + have hW : IsOpen W := hγ.continuousOn.isOpen_inter_preimage hI (chart p).open_source + have htW : t ∈ W := ⟨ht,hp⟩ + have hγt := hγ.contMDiffAt (hI.mem_nhds ht) + let φ : ℝ → Base := chart p ∘ γ + have hφ : ContDiffOn ℝ ∞ φ W := + ((chart_smooth p).comp (hγ.mono inter_subset_left) (fun _ hx => hx.2)).contDiffOn + have hφI : Function.Injective (fderiv ℝ φ t) := by + have hc := ((chart_smooth p).contMDiffAt ((chart p).open_source.mem_nhds hp)) + rw [← mfderiv_eq_fderiv,mfderiv_comp t (hc.mdifferentiableAt (by simp)) + (hγt.mdifferentiableAt (by simp))] + exact ((chart_mdifferentiable p).mfderiv_injective hp).comp hreg + obtain ⟨V,hV,htV,hVW,F,hF,hFφ⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := t)) hW (singleton_subset_iff.mpr htW) hφ + have hFe : F =ᶠ[𝓝 t] φ := hFφ.eventuallyEq_of_mem (hV.mem_nhds (htV (by simp))) + have hFI : Function.Injective (fderiv ℝ F t) := by rw [hFe.fderiv_eq]; exact hφI + have hFt : deriv F t ≠ 0 := by + intro hz + have he : fderiv ℝ F t 1 = fderiv ℝ F t 0 := by + rw [fderiv_apply_one_eq_deriv,hz,map_zero] + have hn := hFI he + norm_num at hn + obtain ⟨e,J,hJ,htJ,hes,hei,heaxis⟩ := plane_curve_coordinates hF t hFt + let c := (chart p).trans e.symm + have hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source := by + exact hei.contMDiffOn.comp ((chart_smooth p).mono inter_subset_left) (fun _ hx => hx.2) + have hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target := by + exact (chart_symm_smooth p).comp hes.contMDiff.contMDiffOn (fun _ hx => hx.2) + refine ⟨c,V ∩ J,hV.inter hJ,⟨htV (by simp),htJ⟩, + inter_subset_left.trans (hVW.trans inter_subset_left),hcs,hci,?_⟩ + intro s hs + have hsW := hVW hs.1 + have hmodel : e ![0,s] = chart p (γ s) := (heaxis s hs.2).2.trans (hFφ hs.1) + have hsource : γ s ∈ c.source := by + refine ⟨hsW.2,?_⟩ + change chart p (γ s) ∈ e.target + rw [← hmodel] + exact e.map_source (heaxis s hs.2).1 + refine ⟨hsource,?_⟩ + change e.symm (chart p (γ s)) = ![0,s] + rw [← hmodel] + exact e.left_inv (heaxis s hs.2).1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceJetCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceJetCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b8ea515ba36e721430f3b56142a1f13ef07f275 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceJetCoordinates.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.JetVelocityLoop +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule + +namespace OAI + +/-! Translate the geometric surface jets to the coordinates used by the +quantitative finite-polynomial construction. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.SurfaceJetCoordinates +open RealModes SmallModes WeightedEstimates + +def baseEquiv : JetPolynomial.Base ≃L[ℝ] Base := + (LinearEquiv.finTwoArrow ℝ ℝ).toContinuousLinearEquiv + +@[simp] lemma baseEquiv_apply (p : JetPolynomial.Base) : baseEquiv p = (p 0, p 1) := rfl + +@[simp] lemma baseEquiv_zero : baseEquiv (JetPolynomial.coordinateVector 0) = dx := by + simp [baseEquiv_apply, JetPolynomial.coordinateVector, dx] + +@[simp] lemma baseEquiv_one : baseEquiv (JetPolynomial.coordinateVector 1) = dy := by + simp [baseEquiv_apply, JetPolynomial.coordinateVector, dy] + +def decode (J : JetPolynomial.LowJet) : CollarVelocity.JetBase := + ((J (.inl 0), J (.inl 1)), fun i a => + J (.inr (![1, 2, 3, 4, 6] i, a))) + +lemma decode_smooth : ContDiff ℝ ∞ decode := by + apply ContDiff.prodMk + · exact (ContinuousLinearMap.proj (.inl 0) : JetPolynomial.LowJet →L[ℝ] ℝ).contDiff.prodMk + (ContinuousLinearMap.proj (.inl 1) : JetPolynomial.LowJet →L[ℝ] ℝ).contDiff + · apply contDiff_pi.mpr + intro i + apply contDiff_pi.mpr + intro a + exact (ContinuousLinearMap.proj (.inr (![1, 2, 3, 4, 6] i, a)) : + JetPolynomial.LowJet →L[ℝ] ℝ).contDiff + +lemma directional_chart (f : Base → ℝ) (hf : ContDiff ℝ ∞ f) (w : List (Fin 2)) : + iteratedDirectional (w.map JetPolynomial.coordinateVector) (f ∘ baseEquiv) = + (iteratedDirectional (w.map (fun i => baseEquiv (JetPolynomial.coordinateVector i))) f) ∘ baseEquiv := by + induction w with + | nil => rfl + | cons i w ih => + simp only [List.map_cons, iteratedDirectional] + rw [ih] + funext p + have hs : ContDiff ℝ ∞ + (iteratedDirectional (w.map (fun i => baseEquiv (JetPolynomial.coordinateVector i))) f) := + contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hf.contDiffOn _) + rw [fderiv_comp p (hs.differentiable (by simp) _) baseEquiv.differentiableAt, + baseEquiv.fderiv, ContinuousLinearMap.comp_apply] + rfl + +lemma directional_component {F : RField 4} (hF : ContDiff ℝ ∞ F) + (w : List Base) (a : Fin 4) : + iteratedDirectional w (fun p => F p a) = fun p => iteratedDirectional w F p a := by + induction w with + | nil => rfl + | cons v w ih => + simp only [iteratedDirectional] + rw [ih] + funext p + have hs : ContDiff ℝ ∞ (iteratedDirectional w F) := + contDiffOn_univ.mp (contDiffOn_iteratedDirectional isOpen_univ hF.contDiffOn w) + rw [fderiv_apply (hs.differentiable (by simp) p) a] + rfl + +theorem decode_lowJet {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : JetPolynomial.Base) : + decode (JetPolynomial.lowJet (F ∘ baseEquiv) p) = CollarVelocity.jetSection F (baseEquiv p) := by + apply Prod.ext + · rfl + · funext i a + change JetPolynomial.jet (F ∘ baseEquiv) (JetPolynomial.lowWord (![1, 2, 3, 4, 6] i)) a p = + realTwoJet F (baseEquiv p) i a + have he (w : List (Fin 2)) : JetPolynomial.jet (F ∘ baseEquiv) w a p = + iteratedDirectional (w.map (fun j => baseEquiv (JetPolynomial.coordinateVector j))) F (baseEquiv p) a := by + change iteratedDirectional (w.map JetPolynomial.coordinateVector) + ((fun q => F q a) ∘ baseEquiv) p = _ + rw [directional_chart _ (contDiff_pi.mp hF a) w, Function.comp_apply, directional_component hF] + rw [he] + fin_cases i <;> simp [JetPolynomial.lowWord, realTwoJet, iteratedDirectional, coordDeriv, + JetPolynomial.coordinateVector, dx, dy] <;> rfl + +end ClosedSurfaceR4.SurfaceJetCoordinates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceLocalCoordinateMap.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceLocalCoordinateMap.lean new file mode 100644 index 0000000000000000000000000000000000000000..e003d6e2ab6436e62af0d8e78d422f98735467fb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceLocalCoordinateMap.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RegularPlaneChart +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! A smooth surface-to-plane map with invertible derivative is an +actual smooth local coordinate 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] + [IsManifold planeModel ∞ M] + +theorem surface_local_coordinate_map {f : M → Base} + (hf : ContMDiff planeModel 𝓘(ℝ,Base) ∞ f) (p : M) + (hp : Function.Bijective (mfderiv planeModel 𝓘(ℝ,Base) f p)) : + ∃ d : OpenPartialHomeomorph M Base, p ∈ d.source ∧ EqOn d f d.source ∧ + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d d.source ∧ + ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d.symm d.target := by + let c := chart p + let a := c p + have hpc : p ∈ c.source := by simpa only [c,chart_source] using mem_chart_source Plane p + have ha : a ∈ c.target := c.map_source hpc + have hlocal : ContDiffOn ℝ ∞ (f ∘ c.symm) c.target := + (hf.comp_contMDiffOn (chart_symm_smooth p)).contDiffOn + obtain ⟨V,hV,haV,hVc,φ,hφ,hφEq⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := a)) c.open_target (singleton_subset_iff.mpr ha) hlocal + have haV' : a ∈ V := haV (mem_singleton _) + have heφ : φ =ᶠ[𝓝 a] f ∘ c.symm := hφEq.eventuallyEq_of_mem (hV.mem_nhds haV') + have hcp : c.symm a = p := c.left_inv hpc + have hcD : c.symm.MDifferentiable 𝓘(ℝ,Base) planeModel := + ⟨(chart_symm_smooth p).mdifferentiableOn (by simp),(chart_smooth p).mdifferentiableOn (by simp)⟩ + have hφbij : Function.Bijective (fderiv ℝ φ a) := by + rw [heφ.fderiv_eq,← mfderiv_eq_fderiv,mfderiv_comp a + (hf.mdifferentiable (by simp) _) (hcD.mdifferentiableAt ha)] + exact (hcp.symm ▸ hp).comp (hcD.mfderiv_bijective ha) + obtain ⟨e,hae,he,hei⟩ := regular_plane_chart hφ a hφbij + let d₀ := c.trans e + let O := c.source ∩ c ⁻¹' V + have hO : IsOpen O := c.isOpen_inter_preimage hV + let d := d₀.restrOpen O hO + have hps : p ∈ d.source := ⟨⟨hpc,hae⟩,hpc,haV'⟩ + have hds₀ : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d₀ d₀.source := + (he ▸ hφ.contMDiff).comp_contMDiffOn ((chart_smooth p).mono inter_subset_left) + have hdi₀ : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d₀.symm d₀.target := + (chart_symm_smooth p).comp (hei.contMDiffOn.mono inter_subset_left) (fun _ hx => hx.2) + refine ⟨d,hps,?_,hds₀.mono (fun _ hx => hx.1),hdi₀.mono (fun _ hx => hx.1)⟩ + intro x hx + change e (c x) = f x + rw [he,hφEq hx.2.2] + change f (c.symm (c x)) = f x + rw [c.left_inv hx.1.1] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..df188e1304ccd8ec4165919441bbc8749a27e8b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseAmplitude.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs + +namespace OAI + +/-! A genuinely smooth amplitude in phase coordinates, extended by zero +with precisely the original support and no change to its surface values. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates SmallModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +theorem surface_phase_amplitude (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) + {D : Set M} (hDc : IsCompact (closure D)) + (hDs : closure D ⊆ (surfacePhaseChart q e).source) + {f : M → ℝ} (hf : ContMDiff planeModel 𝓘(ℝ) ∞ f) + (hf0 : ∀ p, 0 ≤ f p) (hfpos : ∀ p, 0 < f p ↔ p ∈ D) : + ∃ a : SmallModes.Base → ℝ, ContDiff ℝ ∞ a ∧ (∀ x, 0 ≤ a x) ∧ + (∀ p ∈ (surfacePhaseChart q e).source, a (surfacePhaseChart q e p) = f p) ∧ + (∀ x, 0 < a x ↔ x ∈ (surfacePhaseChart q e) '' D) ∧ + ∀ x ∉ (surfacePhaseChart q e) '' closure D, a x = 0 := by + let E := surfacePhaseChart q e + let K := E '' closure D + have hK : IsCompact K := hDc.image_of_continuousOn (E.continuousOn.mono hDs) + have hKt : K ⊆ E.target := by + rintro _ ⟨p,hp,rfl⟩ + exact E.map_source (hDs hp) + obtain ⟨β,hβ,hβc,hβrange,hβs,hβone⟩ := + CollarVelocity.compact_cutoff hK E.open_target hKt + have hraw : ContDiffOn ℝ ∞ (f ∘ E.symm) E.target := by + exact (hf.comp_contMDiffOn (surfacePhaseChart_symm_smooth q e hi)).contDiffOn + let a := fun x => β x * f (E.symm x) + have ha : ContDiff ℝ ∞ a := + CollarVelocity.supported_local_mul E.open_target hβ hraw hβs + have hzero {p : M} (hp : p ∉ D) : f p = 0 := + le_antisymm (le_of_not_gt (fun hh => hp ((hfpos p).mp hh))) (hf0 p) + have heq (p : M) (hp : p ∈ E.source) : a (E p) = f p := by + change β (E p)*f (E.symm (E p)) = f p + rw [E.left_inv hp] + by_cases hpD : p ∈ closure D + · rw [hβone _ (mem_image_of_mem E hpD),one_mul] + · rw [hzero (fun hh => hpD (subset_closure hh)),mul_zero] + refine ⟨a,ha,fun x => mul_nonneg (hβrange x).1 (hf0 _),heq,?_,?_⟩ + · intro x + constructor + · intro hx + have hbx : β x ≠ 0 := by intro hz; change 0 < β x*f (E.symm x) at hx; rw [hz,zero_mul] at hx; exact lt_irrefl _ hx + have hxt : x ∈ E.target := hβs (subset_tsupport β hbx) + have hfx : 0 < f (E.symm x) := by + rw [← E.right_inv hxt,heq _ (E.map_target hxt)] at hx + exact hx + exact ⟨E.symm x,(hfpos _).mp hfx,E.right_inv hxt⟩ + · rintro ⟨p,hp,rfl⟩ + rw [heq _ (hDs (subset_closure hp))] + exact (hfpos p).mpr hp + · intro x hx + by_cases hb0 : β x = 0 + · exact by change β x*f (E.symm x) = 0; rw [hb0,zero_mul] + have hxt : x ∈ E.target := hβs (subset_tsupport β hb0) + have hpD : E.symm x ∉ D := by + intro hp + exact hx ⟨E.symm x,subset_closure hp,E.right_inv hxt⟩ + exact by change β x*f (E.symm x) = 0; rw [hzero hpD,mul_zero] + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b80bdc997db7e2719e70918fac999530f80631c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfacePhaseCharts.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PhaseBoundaryProfile +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation +import OAI.Geometry.SurfaceImmersion.Primitive.LocalIntrinsicCrossing + +namespace OAI + +/-! The actual surface chart associated with a nonlinear phase. It is +independent of the correction atlas and supplies the chart transitions for later curves. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def surfacePhaseChart (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) : + OpenPartialHomeomorph M SmallModes.Base := + ((FiniteOrderSmoothing.chart q).trans e).transHomeomorph baseEquiv.toHomeomorph + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseChart_apply (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (p : M) : + surfacePhaseChart q e p = baseEquiv (e (FiniteOrderSmoothing.chart q p)) := rfl + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseChart_symm_apply (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (x : SmallModes.Base) : + (surfacePhaseChart q e).symm x = + (FiniteOrderSmoothing.chart q).symm (e.symm (baseEquiv.symm x)) := rfl + +lemma surfacePhaseChart_smooth (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) : + ContMDiffOn planeModel 𝓘(ℝ,SmallModes.Base) ∞ (surfacePhaseChart q e) + (surfacePhaseChart q e).source := by + exact (baseEquiv.contDiff.comp he).contMDiff.comp_contMDiffOn + ((FiniteOrderSmoothing.chart_smooth q).mono (fun _ hx => hx.1)) + +lemma surfacePhaseChart_symm_smooth (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) : + ContMDiffOn 𝓘(ℝ,SmallModes.Base) planeModel ∞ (surfacePhaseChart q e).symm + (surfacePhaseChart q e).target := by + exact (FiniteOrderSmoothing.chart_symm_smooth q).comp + (hi.comp baseEquiv.symm.contDiff).contMDiff.contMDiffOn (fun _ hx => hx.2) + +def surfacePhaseTransition (p : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (q : M) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) : + OpenPartialHomeomorph SmallModes.Base SmallModes.Base := + (surfacePhaseChart p e).symm.trans (surfacePhaseChart q f) + +lemma surfacePhaseTransition_smooth (p : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hi : ContDiff ℝ ∞ e.symm) (q : M) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hf : ContDiff ℝ ∞ f) : + ContDiffOn ℝ ∞ (surfacePhaseTransition p e q f) (surfacePhaseTransition p e q f).source := by + apply ContMDiffOn.contDiffOn + exact (surfacePhaseChart_smooth q f hf).comp + ((surfacePhaseChart_symm_smooth p e hi).mono (fun _ hx => hx.1)) (fun _ hx => hx.2) + +lemma surfacePhaseTransition_det_ne (p : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) (q : M) + (f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) + (hf : ContDiff ℝ ∞ f) (hfi : ContDiff ℝ ∞ f.symm) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition p e q f).source) : + RealModes.coordDet (fderiv ℝ (surfacePhaseTransition p e q f) x) ≠ 0 := by + let T := surfacePhaseTransition p e q f + have hs : ContDiffOn ℝ ∞ T T.source := surfacePhaseTransition_smooth p e hi q f hf + have ht : ContDiffOn ℝ ∞ T.symm T.target := by + change ContDiffOn ℝ ∞ (surfacePhaseTransition q f p e) (surfacePhaseTransition q f p e).source + exact surfacePhaseTransition_smooth q f hfi p e he + exact RealModes.coordDet_fderiv_ne_zero_of_local_inverse T.open_source T.open_target + hs ht T.mapsTo (fun y hy => T.left_inv hy) hx + +def surfacePhaseMap (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) : + SmallModes.Base → NormalFrame.Vec := spaceCoordinates ∘ F ∘ (surfacePhaseChart q e).symm + +omit [IsManifold planeModel ∞ M] in +lemma surfacePhaseMap_transition_germ (p q : M) + (e f : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) (F : M → Space) + {x : SmallModes.Base} (hx : x ∈ (surfacePhaseTransition p e q f).source) : + surfacePhaseMap p e F =ᶠ[𝓝 x] + surfacePhaseMap q f F ∘ surfacePhaseTransition p e q f := by + filter_upwards [(surfacePhaseTransition p e q f).open_source.mem_nhds hx] with y hy + change spaceCoordinates (F ((surfacePhaseChart p e).symm y)) = + spaceCoordinates (F ((surfacePhaseChart q f).symm + ((surfacePhaseChart q f) ((surfacePhaseChart p e).symm y)))) + have hyj : (surfacePhaseChart p e).symm y ∈ (surfacePhaseChart q f).source := hy.2 + rw [(surfacePhaseChart q f).left_inv hyj] + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceRealPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceRealPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..803873ac164f755d2fc01de332637fdad30bba3a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/SurfaceRealPhaseChart.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfacePhaseCharts +import OAI.Geometry.SurfaceImmersion.Atlas.RealPhaseChart + +namespace OAI + +/-! Identifications of the actual surface phase chart in real coordinates. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +open SurfaceJetCoordinates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +lemma surfacePhaseChart_real_apply (q p : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) : + surfacePhaseChart q e p = ((coordinateChart q).trans (JetPolynomial.realPhaseChart e)) p := by + change baseEquiv (e (FiniteOrderSmoothing.chart q p)) = + baseEquiv + (e (baseEquiv.symm (coordinateChart q p))) + have hq : coordinateChart q p = baseEquiv (FiniteOrderSmoothing.chart q p) := rfl + rw [hq,baseEquiv.symm_apply_apply] + +lemma surfacePhaseChart_real_source (q : M) + (e : OpenPartialHomeomorph JetPolynomial.Base JetPolynomial.Base) : + (surfacePhaseChart q e).source = + ((coordinateChart q).trans (JetPolynomial.realPhaseChart e)).source := by + ext p + change (p ∈ (FiniteOrderSmoothing.chart q).source ∧ + FiniteOrderSmoothing.chart q p ∈ e.source) ↔ + (p ∈ (coordinateChart q).source ∧ + baseEquiv.symm (coordinateChart q p) ∈ e.source) + have hq : coordinateChart q p = baseEquiv (FiniteOrderSmoothing.chart q p) := rfl + rw [hq,baseEquiv.symm_apply_apply,FiniteOrderSmoothing.chart_source,coordinateChart_source] + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TangentMetricBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TangentMetricBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6ef07c8c05bf0864bfb601a3dab8248acfe4524 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TangentMetricBounds.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricBounds + +namespace OAI + +/-! Apply the finite-tail estimate to the actual two tangent expansions. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open LocalPeriodicExpansion WeightedEstimates + +def tangentExpression (X Y : VectorExpression) (R : ℕ → VectorExpression) + (dx dy : Fin 2) (L : ℕ) (b : Bool) : ℕ → VectorExpression := + if b then xTangent X dx R L else yTangent Y dy R + +def tangentFamily {S : TopologicalSpace.Opens Base} {dy : Base} + (g : Geometry (E := R4) S dy) (U : ℕ → Family S R4) (dx : Base) (L : ℕ) + (b : Bool) : ℕ → Family S R4 := + if b then g.xTangent dx U L else g.yTangent U + +lemma smooth_tangentExpression {O : Set LowJet} (hO : IsOpen O) + {X Y : VectorExpression} {R : ℕ → VectorExpression} + (hX : X.SmoothCoeffs O) (hY : Y.SmoothCoeffs O) (hR : ∀ i, (R i).SmoothCoeffs O) + (dx dy : Fin 2) (L : ℕ) (b : Bool) (i : ℕ) : + (tangentExpression X Y R dx dy L b i).SmoothCoeffs O := by + cases b + · exact smooth_yTangent hO hY hR dy i + · exact smooth_xTangent hO hX hR dx L i + +lemma order_tangentExpression {X Y : VectorExpression} {R : ℕ → VectorExpression} {L : ℕ} + (hL : 1 ≤ L) (hX : ∀ a, (X a).order ≤ 2) (hY : ∀ a, (Y a).order ≤ 2) + (hR : ∀ j < L, ∀ a, (R j a).order ≤ 2 * j + 2) + (dx dy : Fin 2) (b : Bool) {i : ℕ} (hi : i ≤ L) (a : Fin 4) : + (tangentExpression X Y R dx dy L b i a).order ≤ 2 * L + 1 := by + cases b + · exact order_yTangent hL hY hR dy hi a + · exact order_xTangent hL hX hR dx hi a + +lemma represents_tangentExpression {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (hQ : Set.MapsTo (lowJet G) S O) (dx dy : Fin 2) + (g : Geometry (E := R4) S (coordinateVector dy)) + {X Y : VectorExpression} {R : ℕ → VectorExpression} {U : ℕ → Family S R4} + (hX : VectorExpression.Represents G X g.longitudinal) + (hY : VectorExpression.Represents G Y g.transverse) + (hRs : ∀ i, (R i).SmoothCoeffs O) (hR : ∀ i, VectorExpression.Represents G (R i) (U i)) + (L : ℕ) (b : Bool) (i : ℕ) : + VectorExpression.Represents G (tangentExpression X Y R dx dy L b i) + (tangentFamily g U (coordinateVector dx) L b i) := by + cases b + · exact represents_yTangent hO hG hQ dy g hY hRs hR i + · exact represents_xTangent hO hG hQ g hX hRs hR dx L i + +/-- The two choices of tangent yield the xx, xy, and yy metric tails. +The exponent is fixed by the finite expression, independently of `m`. -/ +theorem compact_tangent_metric_tail {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) + (L : ℕ) (hL : 1 ≤ L) (hX : ∀ a, (X a).order ≤ 2) (hY : ∀ a, (Y a).order ≤ 2) + (hR : ∀ j < L, ∀ a, (R j a).order ≤ 2 * j + 2) + (dx dy : Fin 2) (b c : Bool) (ℓ : Base →L[ℝ] ℝ) : + ∃ 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 * L + 1)) B (lowJet G) → + ∀ (g : Geometry (E := R4) S (coordinateVector dy)) (U : ℕ → Family S R4), + VectorExpression.Represents G X g.longitudinal → + VectorExpression.Represents G Y g.transverse → + (∀ i, VectorExpression.Represents G (R i) (U i)) → + WeightedBound S z m (D * z ^ L / s ^ d) + (fun p => ∑ r ∈ Finset.Ico L (2 * L + 1), z ^ r * + (metricCoefficientFamily L r (tangentFamily g U (coordinateVector dx) L b) + (tangentFamily g U (coordinateVector dx) L c)).fastValue ℓ z p) := by + obtain ⟨d, hd⟩ := compact_finite_metric_tail (S := S) hO hK hKO + (tangentExpression X Y R dx dy L b) (tangentExpression X Y R dx dy L c) + (smooth_tangentExpression hO hXs hYs hRs dx dy L b) + (smooth_tangentExpression hO hXs hYs hRs dx dy L c) L (2 * L + 1) (by omega) + (fun i hi a => order_tangentExpression hL hX hY hR dx dy b hi a) + (fun i hi a => order_tangentExpression hL hX hY hR dx dy c hi a) ℓ + 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 hXg hYg hrep + have hQ : Set.MapsTo (lowJet G) S O := fun _ hp => hKO (hGK hp) + exact hb G s z hz hzs hs1 hG hGK hGb _ _ + (represents_tangentExpression hO hG hQ dx dy g hXg hYg hRs hrep L b) + (represents_tangentExpression hO hG hQ dx dy g hXg hYg hRs hrep L c) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TargetCoordinateChoice.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TargetCoordinateChoice.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b0b75f6645c2c86c0e6a8701523379dcaff24c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TargetCoordinateChoice.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ScalarCoordinateAugmentation +import Mathlib.LinearAlgebra.Dual.Lemmas + +namespace OAI + +/-! A nonzero derivative has a nonzero scalar target coordinate, which +can be completed to a linear isomorphism of the target. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {E F G : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] + [NormedAddCommGroup G] [NormedSpace ℝ G] [FiniteDimensional ℝ G] + +theorem target_coordinate_choice (hdim : Module.finrank ℝ F = Module.finrank ℝ G + 1) + (D : E →L[ℝ] F) (hD : D ≠ 0) : + ∃ e : F ≃L[ℝ] (ℝ × G), (ContinuousLinearMap.fst ℝ ℝ G).comp + (e.toContinuousLinearMap.comp D) ≠ 0 := by + obtain ⟨v,hv⟩ := DFunLike.ne_iff.mp hD + obtain ⟨ℓ,hℓ⟩ := Module.Projective.exists_dual_eq_one ℝ (show D v ≠ 0 by simpa using hv) + let L : F →L[ℝ] ℝ := ℓ.toContinuousLinearMap + have hL : Function.Surjective L := by + intro t + refine ⟨t • D v,?_⟩ + change ℓ (t • D v) = t + rw [map_smul,hℓ,smul_eq_mul,mul_one] + obtain ⟨R,hR⟩ := scalar_coordinate_augmentation hdim L hL + let e := ContinuousLinearEquiv.ofBijective (L.prod R) + (LinearMap.ker_eq_bot.mpr hR.1) (LinearMap.range_eq_top.mpr hR.2) + refine ⟨e,?_⟩ + intro hzero + have hh := congrArg (fun A : E →L[ℝ] ℝ => A v) hzero + change L (D v) = 0 at hh + have hh' : L (D v) = 1 := hℓ + linarith + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..48a9edc4cf526943438b5bbdf7f5a758120d57ce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartBounds.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedTensorChart + +namespace OAI + +/-! Weighted estimates for tensor transport through phase charts. The +change of chart changes constants but introduces no scale loss. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates PhaseMean + +variable (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (K : Compacts SmallModes.Base) (hK : (K : Set SmallModes.Base) ⊆ e.source) + +def tensorChartBudget (m : ℕ) (J D : ℝ) : ℝ := + 4 * (2 ^ m * (2 ^ m * ((m.factorial : ℝ) * J ^ m) * D) * D) + +lemma tensorChartBudget_nonneg (m : ℕ) {J D : ℝ} (hJ : 0 ≤ J) (hD : 0 ≤ D) : + 0 ≤ tensorChartBudget m J D := by unfold tensorChartBudget; positivity + +lemma tensorChartPush_bound (hi : ContDiffOn ℝ ∞ e.symm e.target) + {s : ℝ≥0} {J D : ℝ} {m : ℕ} (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (hJ : 1 ≤ J) (hD : 0 ≤ D) + (hderiv : ∀ j, 1 ≤ j → j ≤ m → ∀ y ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ J) + (hfield : ∀ v, ‖v‖ ≤ 1 → WeightedBound e.target s m D + (SmallModes.coordDeriv v e.symm)) (f : SupportedField (F := ComplexTensor) K) : + supportedWeightedSeminorm (chartSupport e K hK) s m (tensorChartPush e hi K hK f) ≤ + tensorChartBudget m J D * supportedWeightedSeminorm K s m f := by + have hN : 0 ≤ supportedWeightedSeminorm K s m f := apply_nonneg _ _ + have hb := ((weightedBound_of_supportedSeminorm s m f).restrict_open e.open_source).comp_coordinates + e.open_target.uniqueDiffOn e.open_source.uniqueDiffOn hs hs1 hJ hN hi + f.contDiff.contDiffOn (fun _ hy => e.map_target hy) hderiv + have ht := weighted_complexPullbackField_apply e.open_target hs (by positivity) hD + (f.contDiff.comp_contDiffOn hi) hi hb hfield + have hg := ht.indicator_of_support e.open_target (chartSupport e K hK).isCompact.isClosed + (chartSupport_subset e K hK) (by positivity) (tensorChartPush_zero e K hK f) + apply supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans hJ) hD) hN) + convert hg using 1 <;> first | rfl | (unfold tensorChartBudget; ring) + +lemma tensorChartPull_bound (he : ContDiffOn ℝ ∞ e e.source) + {s : ℝ≥0} {J D : ℝ} {m : ℕ} (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (hJ : 1 ≤ J) (hD : 0 ≤ D) + (hderiv : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (hfield : ∀ v, ‖v‖ ≤ 1 → WeightedBound e.source s m D + (SmallModes.coordDeriv v e)) (f : SupportedField (F := ComplexTensor) (chartSupport e K hK)) : + supportedWeightedSeminorm K s m (tensorChartPull e he K hK f) ≤ + tensorChartBudget m J D * supportedWeightedSeminorm (chartSupport e K hK) s m f := by + have hN : 0 ≤ supportedWeightedSeminorm (chartSupport e K hK) s m f := apply_nonneg _ _ + have hb := ((weightedBound_of_supportedSeminorm s m f).restrict_open e.open_target).comp_coordinates + e.open_source.uniqueDiffOn e.open_target.uniqueDiffOn hs hs1 hJ hN he + f.contDiff.contDiffOn (fun _ hx => e.map_source hx) hderiv + have ht := weighted_complexPullbackField_apply e.open_source hs (by positivity) hD + (f.contDiff.comp_contDiffOn he) he hb hfield + have hg := ht.indicator_of_support e.open_source K.isCompact.isClosed hK + (by positivity) (tensorChartPull_zero e K hK f) + apply supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (tensorChartBudget_nonneg m (zero_le_one.trans hJ) hD) hN) + convert hg using 1 <;> first | rfl | (unfold tensorChartBudget; ring) + +def chartTensorTransportLM (he : ContDiffOn ℝ ∞ e e.source) + (hi : ContDiffOn ℝ ∞ e.symm e.target) + (R : SupportedField (F := Fin 4 → ℂ) K →ₗ[ℝ] SupportedField (F := ComplexTensor) K) : + SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK) →ₗ[ℝ] + SupportedField (F := ComplexTensor) (chartSupport e K hK) := + (tensorChartEquiv e he hi K hK).toLinearMap.comp + (R.comp (chartEquiv e he hi K hK).symm.toLinearMap) + +lemma chartTensorTransportLM_bound (he : ContDiffOn ℝ ∞ e e.source) + (hi : ContDiffOn ℝ ∞ e.symm e.target) + (R : SupportedField (F := Fin 4 → ℂ) K →ₗ[ℝ] SupportedField (F := ComplexTensor) K) + {s : ℝ≥0} {J I D C : ℝ} {m r : ℕ} (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (hJ : 1 ≤ J) (hI : 1 ≤ I) (hD : 0 ≤ D) (hC : 0 ≤ C) + (hebound : ∀ j, 1 ≤ j → j ≤ r → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (hibound : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I) + (hfield : ∀ v, ‖v‖ ≤ 1 → WeightedBound e.target s m D + (SmallModes.coordDeriv v e.symm)) + (hR : ∀ f, supportedWeightedSeminorm K s m (R f) ≤ C * supportedWeightedSeminorm K s r f) + (f : SupportedField (F := Fin 4 → ℂ) (chartSupport e K hK)) : + supportedWeightedSeminorm (chartSupport e K hK) s m (chartTensorTransportLM e K hK he hi R f) ≤ + (tensorChartBudget m I D * C * ((r.factorial : ℝ) * J ^ r)) * + supportedWeightedSeminorm (chartSupport e K hK) s r f := by + have hbudget := tensorChartBudget_nonneg m (zero_le_one.trans hI) hD + have hpush := tensorChartPush_bound e K hK hi hs hs1 hI hD hibound hfield (R (chartPull e he K hK f)) + have hpull := chartPull_bound e he K hK hs hs1 hJ hebound f + change supportedWeightedSeminorm _ s m (tensorChartPush e hi K hK (R (chartPull e he K hK f))) ≤ _ + calc + _ ≤ tensorChartBudget m I D * (C * supportedWeightedSeminorm K s r (chartPull e he K hK f)) := + hpush.trans (mul_le_mul_of_nonneg_left (hR _) hbudget) + _ ≤ tensorChartBudget m I D * (C * ((r.factorial : ℝ) * + supportedWeightedSeminorm (chartSupport e K hK) s r f * J ^ r)) := by gcongr + _ = _ := by ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..da260371e599c0500a83b8031ac8042db1aa31df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorChartRead.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.BundleCutoffCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDecomposition + +namespace OAI + +/-! Smooth chart readings of tensors agree with unweighted components on +the phase support and are bounded by the fixed atlas seminorms. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates PhaseMean +open JetPolynomial (Base) + +local instance chartReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance chartReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance chartReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance chartReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance chartReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance chartReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorChartRead (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) : Base → Tensor := + fiberToThree ∘ A.bundleCutoff A.tensorTriv i (A.outer i) u + +lemma tensorChartRead_on_weight (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) + {p : M} (hp : p ∈ tsupport (A.weight i)) : + A.tensorChartRead i u (chart (i : M) p) = fiberToThree (A.bundleComponent A.tensorTriv i u p) := by + change fiberToThree (localize (i : M) (A.outer i) + (A.bundleComponent A.tensorTriv i u) (chart (i : M) p)) = _ + rw [localize_chart _ _ _ (A.weight_support i hp), A.outer_one i p hp] + simp only [one_pow, one_smul] + +lemma tensorEncode_read (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) + {p : M} (hp : p ∈ (chart (i : M)).source) : + fiberToThree (A.tensorEncode u (chart (i : M) p) i) = + (A.weight i p)^2 • A.tensorChartRead i u (chart (i : M) p) := by + change fiberToThree (localize (i : M) (A.weight i) + (A.bundleComponent A.tensorTriv i u) (chart (i : M) p)) = _ + rw [localize_chart _ _ _ hp, map_smul] + by_cases hz : A.weight i p = 0 + · simp only [hz, zero_pow (by decide : 2 ≠ 0), zero_smul] + · rw [A.tensorChartRead_on_weight i u (subset_tsupport _ hz)] + +variable [CompactSpace M] + +lemma tensorChartRead_smooth (i : A.centers) {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) : + ContDiff ℝ ∞ (A.tensorChartRead i u) := + fiberToThree.contDiff.comp (A.bundleCutoff_smooth A.tensorTriv A.tensorTriv_domain i + (A.outer_smooth i) (A.outer_support i) hu) + +lemma tensorChartRead_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ x : M, CovariantTwoTensor x) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → A.TensorWeightedBound s m C u → + WeightedBound univ s m (D * C) (A.tensorChartRead i u) := by + obtain ⟨D,hD,hd⟩ := A.bundleCutoff_bound A.tensorTriv A.tensorTriv_domain i + (A.outer_smooth i) (A.outer_support i) m + refine ⟨‖fiberToThree‖ * D,mul_nonneg (norm_nonneg _) hD,?_⟩ + intro u s C hs hs1 hC hu hbu + have hh := (hd u s C hs hs1 hC hu hbu).linear uniqueDiffOn_univ hs.le + (A.bundleCutoff_smooth A.tensorTriv A.tensorTriv_domain i + (A.outer_smooth i) (A.outer_support i) hu).contDiffOn fiberToThree + simpa only [tensorChartRead, mul_assoc] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorCoordinatePullbackBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorCoordinatePullbackBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..29e90a09c101e44bda3e8bbaa71c2efe7fccca1e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorCoordinatePullbackBounds.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds + +namespace OAI + +/-! Fixed nonlinear coordinate changes preserve weighted tensor error +bounds with a constant independent of the fast scale. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators Topology +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +def tensorCoordinateMatrixUnit (k l : Fin 3) : PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + (ContinuousLinearMap.proj l).smulRight (Pi.single k 1) + +lemma tensorCoordinatePullbackValue_sum (T : Base → Base) (x : Base) : + tensorCoordinatePullbackValue T x = + ∑ k : Fin 3, ∑ l : Fin 3, + tensorCoordinateJacobian T k l x • tensorCoordinateMatrixUnit k l := by + ext A k + simp only [sum_apply,smul_apply, + Finset.sum_apply,Pi.smul_apply,tensorCoordinateMatrixUnit, + ContinuousLinearMap.smulRight_apply,ContinuousLinearMap.proj_apply,smul_eq_mul, + Pi.single_apply] + simp only [mul_ite,mul_one,mul_zero] + have hi (j : Fin 3) : + (∑ l : Fin 3, if k = j then tensorCoordinateJacobian T j l x * A l else 0) = + if k = j then ∑ l : Fin 3, tensorCoordinateJacobian T j l x * A l else 0 := by + split_ifs <;> simp_all + simp_rw [hi] + simp only [Finset.sum_ite_eq,Finset.mem_univ,ite_true] + exact (tensorCoordinateJacobian_sum T x A k).symm + +lemma tensorCoordinatePullbackValue_smooth {T : Base → Base} (hT : ContDiff ℝ ∞ T) : + ContDiff ℝ ∞ (tensorCoordinatePullbackValue T) := by + have he : tensorCoordinatePullbackValue T = fun x => + ∑ k : Fin 3, ∑ l : Fin 3, + tensorCoordinateJacobian T k l x • tensorCoordinateMatrixUnit k l := + funext (tensorCoordinatePullbackValue_sum T) + rw [he] + apply ContDiff.sum + intro k _ + apply ContDiff.sum + intro l _ + exact (tensorCoordinateJacobian_smooth hT k l).smul contDiff_const + +theorem fixed_tensor_coordinate_bound {T : Base → Base} (hT : ContDiff ℝ ∞ T) + {V W : Set Base} (hV : IsOpen V) (hVc : IsCompact (closure V)) + (hW : IsOpen W) (hVW : MapsTo T V W) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → PhaseMean.Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiffOn ℝ ∞ f W → + WeightedBound W s m C f → + WeightedBound V s m (D*C) (fun x => tensorCoordinatePullbackValue T x (f (T x))) := by + obtain ⟨B,hB,hTb⟩ := compact_local_weighted_bound hV isOpen_univ hVc + subset_closure (subset_univ _) hT.contDiffOn m + obtain ⟨J,hJ,hJb⟩ := compact_local_weighted_bound hV isOpen_univ hVc + subset_closure (subset_univ _) (tensorCoordinatePullbackValue_smooth hT).contDiffOn m + refine ⟨2^m*J*((m.factorial : ℝ)*B^m),by positivity,?_⟩ + intro f s C hs hs1 hC hf hb + have hc := hb.comp_coordinates hV.uniqueDiffOn hW.uniqueDiffOn hs hs1 hB hC + hT.contDiffOn hf hVW (fun j _ hj x hx => by + simpa only [one_pow,one_mul] using hTb 1 zero_le_one le_rfl j hj x hx) + have hh := (hJb s hs.le hs1).clm_apply hV.uniqueDiffOn hs.le (zero_le_one.trans hJ) + (by positivity) (tensorCoordinatePullbackValue_smooth hT).contDiffOn + (hf.comp hT.contDiffOn hVW) hc + convert hh using 1 <;> first | rfl | ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorFiberCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorFiberCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..93dc4942a962eec9be4e5e4628575174e8fe7283 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorFiberCoordinates.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothing +import OAI.Geometry.Immersion.ClosedSurface.TensorCoordinates +import OAI.Geometry.Immersion.ClosedSurface.ChartModel + +namespace OAI + +/-! The three independent coordinates of a symmetric surface tensor, with +an explicit continuous linear reconstruction into the full tensor fiber. -/ +noncomputable section +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean + +local instance coordinateFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coordinateFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +local instance coordinateDualAdd : ContinuousAdd (Plane →L[ℝ] ℝ) := inferInstance +local instance coordinateDualSmul : ContinuousSMul ℝ (Plane →L[ℝ] ℝ) := inferInstance +local instance coordinateFiberGroup : AddCommGroup (Plane →L[ℝ] Plane →L[ℝ] ℝ) := + coordinateFiberNormed.toAddCommGroup + +def planeFirst : Plane →L[ℝ] ℝ := + (ContinuousLinearMap.fst ℝ ℝ ℝ).comp planeCoordinates.toContinuousLinearMap + +def planeSecond : Plane →L[ℝ] ℝ := + (ContinuousLinearMap.snd ℝ ℝ ℝ).comp planeCoordinates.toContinuousLinearMap + +def fiberToThree : TensorFiber →L[ℝ] Tensor := + LinearMap.toContinuousLinearMap { + toFun := fun B k => B (planeCoordinates.symm (firstDirection k)) + (planeCoordinates.symm (secondDirection k)) + map_add' := by intros; rfl + map_smul' := by intros; rfl } + +lemma fiberToThree_apply (B : TensorFiber) (k : Fin 3) : + fiberToThree B k = B (planeCoordinates.symm (firstDirection k)) + (planeCoordinates.symm (secondDirection k)) := rfl + +def fiberFromThree : Tensor →L[ℝ] TensorFiber := + (ContinuousLinearMap.proj 0).smulRight (planeFirst.smulRight planeFirst) + + (ContinuousLinearMap.proj 1).smulRight + (planeFirst.smulRight planeSecond + planeSecond.smulRight planeFirst) + + (ContinuousLinearMap.proj 2).smulRight (planeSecond.smulRight planeSecond) + +lemma fiberFromThree_apply (H : Tensor) (v w : Plane) : + fiberFromThree H v w = evaluate H (planeCoordinates v) (planeCoordinates w) := by + simp [fiberFromThree, planeFirst, planeSecond, evaluate] + ring + +lemma fiberToThree_fromThree (H : Tensor) : fiberToThree (fiberFromThree H) = H := by + ext k + change fiberFromThree H (planeCoordinates.symm (firstDirection k)) + (planeCoordinates.symm (secondDirection k)) = H k + rw [fiberFromThree_apply] + simp only [ContinuousLinearEquiv.apply_symm_apply] + fin_cases k <;> simp [evaluate, firstDirection, secondDirection, SmallModes.dx, SmallModes.dy] + +lemma plane_basis_expansion (v : Plane) : + v = (planeCoordinates v).1 • planeCoordinates.symm SmallModes.dx + + (planeCoordinates v).2 • planeCoordinates.symm SmallModes.dy := by + apply planeCoordinates.injective + simp only [map_add, map_smul, ContinuousLinearEquiv.apply_symm_apply] + exact RealModes.base_decomposition (planeCoordinates v) + +lemma fiberFromThree_toThree (B : TensorFiber) (hB : ∀ v w, B v w = B w v) : + fiberFromThree (fiberToThree B) = B := by + ext v w + rw [fiberFromThree_apply] + have hcross := hB (planeCoordinates.symm SmallModes.dy) (planeCoordinates.symm SmallModes.dx) + conv_rhs => rw [plane_basis_expansion v, plane_basis_expansion w] + simp only [map_add, map_smul, add_apply, smul_apply, + smul_eq_mul] + simp only [evaluate, fiberToThree_apply] + simp only [firstDirection, secondDirection, Matrix.cons_val_zero, Matrix.cons_val_one, + Matrix.cons_val_two, Matrix.vecTail, Matrix.vecHead] + dsimp + rw [hcross] + ring + +lemma fiberFromThree_symmetric (H : Tensor) (v w : Plane) : + fiberFromThree H v w = fiberFromThree H w v := by + rw [fiberFromThree_apply, fiberFromThree_apply] + simp only [evaluate] + ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDecomposition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDecomposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ddf60e3c832be761b21598cb70786bd3f4ad4ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDecomposition.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.TensorFiberCoordinates +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothingSymmetry +import OAI.Geometry.Immersion.ClosedSurface.PhaseStock + +namespace OAI + +/-! The finite phase-basis decomposition on global symmetric tensor sections. +The atlas partition restores the tensor exactly, including chart overlaps. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry +open JetPolynomial (Base) + +local instance phaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance phaseDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorEncode_symmetric {u : ∀ x : M, CovariantTwoTensor x} + (hu : ∀ p v w, u p v w = u p w v) : + ∀ x i v w, A.tensorEncode u x i v w = A.tensorEncode u x i w v := by + have ht : (fun p => tensorTranspose (u p)) = u := by + funext p + ext v w + exact (hu p w v) + intro x i v w + have hh := A.tensorLocalize_flip i u + rw [ht] at hh + exact congrArg (fun b : TensorFiber => b v w) (congrFun hh x) + +lemma tensorDecode_symmetric {f : Base → A.centers → TensorFiber} + (hf : ∀ x i v w, f x i v w = f x i w v) : + ∀ p v w, A.tensorDecode f p v w = A.tensorDecode f p w v := by + have ht (i : A.centers) : (fun x => (f x i).flip) = (fun x => f x i) := by + funext x + ext v w + exact hf x i w v + intro p v w + simp only [tensorDecode, sum_apply] + apply Finset.sum_congr rfl + intro i _ + have hh := A.tensorRestore_flip i (fun x => f x i) + rw [ht] at hh + exact congrArg (fun b : CovariantTwoTensor p => b v w) (congrFun hh p) + +def phaseCoefficient (P : A.centers → PhaseBasis) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : Fin 3) (y : Base) : ℝ := + (P i).Q j (fiberToThree (A.tensorEncode u y i)) + +def phaseTensor (P : A.centers → PhaseBasis) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : Fin 3) : Base → TensorFiber := + fun y => A.phaseCoefficient P u i j y • fiberFromThree (covectorSquare ((P i).ξ j)) + +lemma sum_phaseTensor (P : A.centers → PhaseBasis) {u : ∀ x : M, CovariantTwoTensor x} + (hu : ∀ p v w, u p v w = u p w v) (y : Base) (i : A.centers) : + ∑ j : Fin 3, A.phaseTensor P u i j y = A.tensorEncode u y i := by + change (∑ j : Fin 3, (P i).Q j (fiberToThree (A.tensorEncode u y i)) • + fiberFromThree (covectorSquare ((P i).ξ j))) = _ + calc + _ = ∑ j : Fin 3, fiberFromThree + ((P i).Q j (fiberToThree (A.tensorEncode u y i)) • covectorSquare ((P i).ξ j)) := by + apply Finset.sum_congr rfl + intro j _ + exact (fiberFromThree.map_smul _ _).symm + _ = fiberFromThree (∑ j : Fin 3, + (P i).Q j (fiberToThree (A.tensorEncode u y i)) • covectorSquare ((P i).ξ j)) := + (map_sum fiberFromThree _ _).symm + _ = _ := by + rw [(P i).decomposition, fiberFromThree_toThree _ (A.tensorEncode_symmetric hu y i)] + +/-- The actual finite restored phase family sums to the original global tensor. -/ +theorem global_phase_tensor_decomposition (P : A.centers → PhaseBasis) + {u : ∀ x : M, CovariantTwoTensor x} (hu : ∀ p v w, u p v w = u p w v) (p : M) : + (∑ i : A.centers, ∑ j : Fin 3, A.bundleRestore A.tensorTriv i (A.phaseTensor P u i j) p) = u p := by + have hi (i : A.centers) : + (∑ j : Fin 3, A.bundleRestore A.tensorTriv i (A.phaseTensor 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_phaseTensor P hu] + simp_rw [hi] + exact congrFun (A.tensorDecode_encode u) p + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..b26b86bd2b3dd8fb36d493d2b2576fd9f33053ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPhaseDifferential.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorRootPhases +import OAI.Geometry.Immersion.ClosedSurface.MetricCoordinates + +namespace OAI + +/-! Restored rank-one tensor coordinates are the actual differentials of +atlas phases. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry + +local instance phaseDifferentialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phaseDifferentialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance phaseDifferentialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phaseDifferentialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phaseDifferentialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phaseDifferentialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorComponent_apply (i : A.centers) (u : ∀ p : M, CovariantTwoTensor p) + {p : M} (hp : p ∈ (chart (i : M)).source) (v w : Plane) : + A.bundleComponent A.tensorTriv i u p v w = + u p ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symm p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).symm p w) := by + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet, chart_source] using hp + unfold bundleComponent + rw [(A.tensorTriv i).continuousLinearMapAt_apply_of_mem ℝ (A.tensorTriv_domain i hp)] + unfold tensorTriv + simp only [hom_trivializationAt_apply] + rw [inCoordinates_apply_eq₂ ht ht (mem_univ p)] + simp + +lemma tensorComponent_tangentCoordinates (i : A.centers) (u : ∀ p : M, CovariantTwoTensor p) + {p : M} (hp : p ∈ (chart (i : M)).source) (v w : TangentSpace planeModel p) : + A.bundleComponent A.tensorTriv i u p + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p w) = + u p v w := by + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet, chart_source] using hp + rw [A.tensorComponent_apply i u hp] + rw [← Trivialization.symmL_apply (R := ℝ) _ ht, ← Trivialization.symmL_apply (R := ℝ) _ ht, + Trivialization.symmL_continuousLinearMapAt _ ht, Trivialization.symmL_continuousLinearMapAt _ ht] + +lemma tensorRestore_apply (i : A.centers) (f : JetPolynomial.Base → TensorFiber) + {p : M} (hp : p ∈ (chart (i : M)).source) (v w : TangentSpace planeModel p) : + A.bundleRestore A.tensorTriv i f p v w = A.outer i p * + f (chart (i : M) p) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p v) + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p w) := by + rw [← A.tensorComponent_tangentCoordinates i (A.bundleRestore A.tensorTriv i f) hp] + have hc : A.bundleComponent A.tensorTriv i (A.bundleRestore A.tensorTriv i f) p = + A.outer i p • f (chart (i : M) p) := by + change (A.tensorTriv i).continuousLinearMapAt ℝ p + (A.outer i p • (A.tensorTriv i).symmL ℝ p (f (chart (i : M) p))) = _ + rw [map_smul, (A.tensorTriv i).continuousLinearMapAt_symmL (A.tensorTriv_domain i hp)] + rw [hc] + rfl + +lemma coordinateChart_tangentCoordinates (i : A.centers) {p : M} + (hp : p ∈ (chart (i : M)).source) : + mfderiv planeModel 𝓘(ℝ, SmallModes.Base) (coordinateChart (i : M)) p = + planeCoordinates.toContinuousLinearMap.comp + ((trivializationAt Plane (TangentSpace planeModel) (i : M)).continuousLinearMapAt ℝ p) := by + have hp' : p ∈ (chartAt Plane (i : M)).source := by simpa only [chart_source] using hp + have hcs : ContMDiffOn planeModel planeModel ∞ (chartAt Plane (i : M)) + (chartAt Plane (i : M)).source := contMDiffOn_chart + have hc := (hcs p hp').contMDiffAt ((chartAt Plane (i : M)).open_source.mem_nhds hp') + rw [TangentBundle.continuousLinearMapAt_trivializationAt hp'] + change mfderiv planeModel 𝓘(ℝ, SmallModes.Base) (planeCoordinates ∘ chartAt Plane (i : M)) p = + planeCoordinates.toContinuousLinearMap.comp (mfderiv planeModel planeModel (chartAt Plane (i : M)) p) + rw [mfderiv_comp p + (((planeCoordinates.contDiff (n := (∞ : ℕ∞ω))).contMDiff.mdifferentiable (by simp)).mdifferentiableAt) + (hc.mdifferentiableAt (by simp)), mfderiv_eq_fderiv, planeCoordinates.fderiv] + rfl + +lemma tensorRestore_covectorSquare (i : A.centers) (ξ : SmallModes.Base) + {p : M} (hp : p ∈ (chart (i : M)).source) (v w : TangentSpace planeModel p) : + A.bundleRestore A.tensorTriv i (fun _ => fiberFromThree (covectorSquare ξ)) p v w = + A.outer i p * (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (i : M) ξ) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (atlasPhase (i : M) ξ) p w) := by + have hp' : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source, chart_source] using hp + rw [A.tensorRestore_apply i _ hp, fiberFromThree_apply, covectorSquare_evaluate, + mfderiv_atlasPhase _ _ hp', A.coordinateChart_tangentCoordinates i hp] + exact (mul_assoc _ _ _).symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a87519378ae5f762c237cd7abceaff027213efd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneCoordinates.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartRead +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIsometryBounds + +namespace OAI + +/-! Reading and restoring global tensors in the two real coordinates used +by the charted oscillatory solver. The bounds preserve derivative order. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates RealModes +open JetPolynomial (Base planeCoordinateIsometry weightedBound_comp_isometry) + +local instance planeReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance planeReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance planeReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance planeReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance planeReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance planeReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorPlaneRead (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) : SmallModes.Base → Tensor := + A.tensorChartRead i u ∘ planeCoordinateIsometry.symm + +def tensorPlaneRestore (f : A.centers → SmallModes.Base → Tensor) : ∀ x : M, CovariantTwoTensor x := + fun p => ∑ i : A.centers, A.bundleRestore A.tensorTriv i + (fun y => fiberFromThree (f i (planeCoordinateIsometry y))) p + +lemma tensorPlaneRead_sub (i : A.centers) (u v : ∀ x : M, CovariantTwoTensor x) : + A.tensorPlaneRead i (u - v) = A.tensorPlaneRead i u - A.tensorPlaneRead i v := by + funext x + change fiberToThree (localize (i : M) (A.outer i) (A.bundleComponent A.tensorTriv i (u-v)) + (planeCoordinateIsometry.symm x)) = _ + by_cases hx : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target + · simp only [tensorPlaneRead, tensorChartRead, Function.comp_apply, bundleCutoff, localize, + indicator_of_mem hx, bundleComponent, Pi.sub_apply, map_sub, smul_sub] + · simp only [tensorPlaneRead, tensorChartRead, Function.comp_apply, bundleCutoff, localize, + indicator_of_notMem hx, map_zero, Pi.sub_apply, sub_self] + +lemma tensorPlaneRestore_sub (f g : A.centers → SmallModes.Base → Tensor) : + A.tensorPlaneRestore (f-g) = A.tensorPlaneRestore f - A.tensorPlaneRestore g := by + funext p + simp only [tensorPlaneRestore, Pi.sub_apply, map_sub, bundleRestore, smul_sub, + Finset.sum_sub_distrib] + +lemma tensorPlaneRestore_smooth {f : A.centers → SmallModes.Base → Tensor} + (hf : ∀ i, ContDiff ℝ ∞ (f i)) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.tensorPlaneRestore f p)) := by + apply ContMDiff.sum_section + intro i _ + exact A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + (fiberFromThree.contDiff.comp ((hf i).comp planeCoordinateIsometry.contDiff)) + +lemma tensorPlaneRestore_symmetric (f : A.centers → SmallModes.Base → Tensor) : + ∀ p v w, A.tensorPlaneRestore f p v w = A.tensorPlaneRestore f p w v := by + apply A.tensorDecode_symmetric + intro x i v w + exact fiberFromThree_symmetric _ _ _ + +variable [CompactSpace M] + +lemma tensorPlaneRead_smooth (i : A.centers) {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) : + ContDiff ℝ ∞ (A.tensorPlaneRead i u) := + (A.tensorChartRead_smooth i hu).comp planeCoordinateIsometry.symm.contDiff + +lemma tensorPlaneRead_bound (i : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ x : M, CovariantTwoTensor x) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → A.TensorWeightedBound s m C u → + WeightedBound univ s m (D * C) (A.tensorPlaneRead i u) := by + obtain ⟨D,hD,hd⟩ := A.tensorChartRead_bound i m + refine ⟨D,hD,?_⟩ + intro u s C hs hs1 hC hu hb + exact weightedBound_comp_isometry planeCoordinateIsometry.symm (A.tensorChartRead_smooth i hu) + (hd u s C hs hs1 hC hu hb) + +lemma tensorPlaneRestore_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : A.centers → SmallModes.Base → Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (f i)) → + (∀ i, WeightedBound univ s m C (f i)) → + A.TensorWeightedBound s m (D*C) (A.tensorPlaneRestore f) := by + obtain ⟨D,hD,hd⟩ := A.bundle_restoration_bound A.tensorTriv A.tensorTriv_domain m + refine ⟨D * ‖fiberFromThree‖, mul_nonneg hD (norm_nonneg _), ?_⟩ + intro f s C hs hs1 hC hf hb + have hh := hd (fun i y => fiberFromThree (f i (planeCoordinateIsometry y))) s + (‖fiberFromThree‖ * C) hs hs1 (mul_nonneg (norm_nonneg _) hC) + (fun i => fiberFromThree.contDiff.comp ((hf i).comp planeCoordinateIsometry.contDiff)) + (fun i => (weightedBound_comp_isometry planeCoordinateIsometry (hf i) (hb i)).linear + uniqueDiffOn_univ hs.le ((hf i).comp planeCoordinateIsometry.contDiff).contDiffOn fiberFromThree) + have hout : A.TensorWeightedBound s m (D * (‖fiberFromThree‖ * C)) + (A.tensorPlaneRestore f) := hh + convert hout using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneWeight.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneWeight.lean new file mode 100644 index 0000000000000000000000000000000000000000..38ebb0f639417f4369508d88b672d68d3ad1137c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorPlaneWeight.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPlaneReconstruction + +namespace OAI + +/-! The actual chart cutoff whose square converts an unweighted tensor +reading into its atlas coordinate component. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates +open JetPolynomial (Base planeCoordinateIsometry) + +local instance weightPlaneFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance weightPlaneFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance weightPlaneDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance weightPlaneDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance weightPlaneSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance weightPlaneSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def chartWeight (i : A.centers) : Base → ℝ := + (chart (i : M)).target.indicator (fun x => A.weight i ((chart (i : M)).symm x)) + +def planeWeight (i : A.centers) : SmallModes.Base → ℝ := + A.chartWeight i ∘ planeCoordinateIsometry.symm + +lemma tensorPlaneEncode_weight (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) + (y : SmallModes.Base) : + A.tensorPlaneEncode u i y = (A.planeWeight i y)^2 • A.tensorPlaneRead i u y := by + let x := planeCoordinateIsometry.symm y + change fiberToThree (A.tensorEncode u x i) = (A.chartWeight i x)^2 • A.tensorChartRead i u x + by_cases hx : x ∈ (chart (i : M)).target + · have hp := (chart (i : M)).map_target hx + have hh := A.tensorEncode_read i u hp + rw [(chart (i : M)).right_inv hx] at hh + simpa only [chartWeight, indicator_of_mem hx] using hh + · simp only [tensorEncode, bundleLocalize, localize, indicator_of_notMem hx, map_zero, + chartWeight, zero_pow (by decide : 2 ≠ 0), zero_smul] + +variable [CompactSpace M] + +lemma chartWeight_smooth (i : A.centers) : ContDiff ℝ ∞ (A.chartWeight i) := by + let K : Set Base := (chart (i : M)) '' tsupport (A.weight i) + have hK : IsCompact K := (isClosed_tsupport (A.weight i)).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (A.weight_support i)) + have hKU : K ⊆ (chart (i : M)).target := by + rintro x ⟨p,hp,rfl⟩ + exact (chart (i : M)).map_source (A.weight_support i hp) + apply contDiff_indicator_of_support (chart (i : M)).open_target hK.isClosed hKU + ((A.weight_smooth i).comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + intro x hx hnot + by_contra hz + exact hnot ⟨(chart (i : M)).symm x,subset_tsupport (A.weight i) hz,(chart (i : M)).right_inv hx⟩ + +lemma planeWeight_smooth (i : A.centers) : ContDiff ℝ ∞ (A.planeWeight i) := + (A.chartWeight_smooth i).comp planeCoordinateIsometry.symm.contDiff + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorReadReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorReadReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..ffb9cc203057fbc44a311c53a0f41309afc250bd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorReadReconstruction.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight + +namespace OAI + +/-! Exact reconstruction from tensor readings and the squared atlas partition. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base planeCoordinateIsometry) +local instance readReconstructFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance readReconstructFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance readReconstructDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance readReconstructDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance readReconstructSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance readReconstructSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorEncode_read_at (i : A.centers) (u : ∀ x : M, CovariantTwoTensor x) (x : Base) : + fiberToThree (A.tensorEncode u x i) = + (A.chartWeight i x)^2 • A.tensorChartRead i u x := by + by_cases hx : x ∈ (chart (i : M)).target + · have hp : (chart (i : M)).symm x ∈ (chart (i : M)).source := (chart (i : M)).map_target hx + have hh := A.tensorEncode_read i u hp + simpa only [(chart (i : M)).right_inv hx,chartWeight,indicator_of_mem hx] using hh + · simp only [tensorEncode,bundleLocalize,localize,indicator_of_notMem hx, + map_zero,chartWeight,zero_pow (by decide : 2 ≠ 0),zero_smul] + +lemma tensorPlaneRestore_partition_read (u : ∀ x : M, CovariantTwoTensor x) + (hu : ∀ p v w, u p v w = u p w v) : + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • A.tensorPlaneRead i u x) = u := by + have heq (i : A.centers) (y : Base) : + fiberFromThree ((A.chartWeight i y)^2 • A.tensorChartRead i u y) = A.tensorEncode u y i := by + rw [← A.tensorEncode_read_at i u y] + exact fiberFromThree_toThree _ (A.tensorEncode_symmetric hu y i) + have hrestore : A.tensorPlaneRestore + (fun i x => (A.planeWeight i x)^2 • A.tensorPlaneRead i u x) = + A.tensorDecode (A.tensorEncode u) := by + funext p + apply Finset.sum_congr rfl + intro i _ + have hf : (fun y => fiberFromThree ((A.planeWeight i (planeCoordinateIsometry y))^2 • + A.tensorPlaneRead i u (planeCoordinateIsometry y))) = (fun y => A.tensorEncode u y i) := by + funext y + simpa only [planeWeight,tensorPlaneRead,Function.comp_apply, + planeCoordinateIsometry.symm_apply_apply] using heq i y + change A.bundleRestore A.tensorTriv i _ p = A.bundleRestore A.tensorTriv i _ p + rw [hf] + rw [hrestore,A.tensorDecode_encode] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorRootPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorRootPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..66f50b11ae4b8021ebf0af0bb737db87b95a857a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TensorRootPhases.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartRead + +namespace OAI + +/-! Actual cutoff square-root amplitudes for global symmetric tensors. +Their squared phase tensors give the exact global atlas decomposition. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry +open JetPolynomial (Base) + +local instance rootPhaseFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance rootPhaseFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance rootPhaseDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance rootPhaseDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance rootPhaseSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance rootPhaseSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def rootPhaseAmplitude (i : A.centers) (Q : Tensor →L[ℝ] ℝ) (w : ℝ) + (u : ∀ x : M, CovariantTwoTensor x) : M → ℝ := + fun p => A.weight i p * (Real.sqrt (Q (A.tensorChartRead i u (chart (i : M) p))) / w) + +lemma rootPhaseAmplitude_support (i : A.centers) (Q : Tensor →L[ℝ] ℝ) (w : ℝ) + (u : ∀ x : M, CovariantTwoTensor x) : + tsupport (A.rootPhaseAmplitude i Q w u) ⊆ tsupport (A.weight i) := tsupport_mul_subset_left + +variable [CompactSpace M] + +lemma rootPhaseAmplitude_smooth (i : A.centers) (Q : Tensor →L[ℝ] ℝ) (w : ℝ) + {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hpos : ∀ p ∈ tsupport (A.weight i), 0 < Q (A.tensorChartRead i u (chart (i : M) p))) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.rootPhaseAmplitude i Q w u) := by + apply contMDiff_of_tsupport + intro p hp + have hpw := A.rootPhaseAmplitude_support i Q w u hp + have hc := ((chart_smooth (i : M)) p (A.weight_support i hpw)).contMDiffAt + ((chart (i : M)).open_source.mem_nhds (A.weight_support i hpw)) + have hr := (A.tensorChartRead_smooth i hu).contMDiff.contMDiffAt.comp p hc + have hQ := Q.contDiff.contMDiff.contMDiffAt.comp p hr + have hroot := (Real.contDiffAt_sqrt (ne_of_gt (hpos p hpw))).contMDiffAt.comp p hQ + exact (A.weight_smooth i p).mul (hroot.div_const w) + +omit [CompactSpace M] in +lemma rootPhaseAmplitude_square (P : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (u : ∀ x : M, CovariantTwoTensor x) (i : A.centers) (j : Fin 3) + (hw : w i j ≠ 0) + (hpos : ∀ p ∈ tsupport (A.weight i), 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + {p : M} (hp : p ∈ (chart (i : M)).source) : + (A.rootPhaseAmplitude i ((P i).Q j) (w i j) u p)^2 * (w i j)^2 = + A.phaseCoefficient P u i j (chart (i : M) p) := by + unfold phaseCoefficient + rw [A.tensorEncode_read i u hp, map_smul] + by_cases hz : A.weight i p = 0 + · simp [rootPhaseAmplitude, hz] + · dsimp only [rootPhaseAmplitude] + rw [mul_pow, div_pow, Real.sq_sqrt (hpos p (subset_tsupport _ hz))] + simp only [smul_eq_mul] + field_simp [hw] + +omit [CompactSpace M] in +lemma restored_rootPhase (P : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (u : ∀ x : M, CovariantTwoTensor x) (i : A.centers) (j : Fin 3) + (hw : w i j ≠ 0) + (hpos : ∀ p ∈ tsupport (A.weight i), 0 ≤ (P i).Q j (A.tensorChartRead i u (chart (i : M) p))) + (p : M) : + ((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 = + A.bundleRestore A.tensorTriv i (A.phaseTensor P u i j) p := by + by_cases hp : p ∈ (chart (i : M)).source + · rw [A.rootPhaseAmplitude_square P w u i j hw hpos hp] + simp only [bundleRestore, phaseTensor, 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 [bundleRestore, ho, zero_smul, smul_zero] + +omit [CompactSpace M] in +/-- No positive-definiteness assumption is hidden here: only the explicitly +listed phase coefficients must be nonnegative on their supports. -/ +theorem global_rootPhase_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) : + (∑ 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) = + u p := by + simp_rw [A.restored_rootPhase P w u _ _ (hw _ _) (hpos _ _)] + exact A.global_phase_tensor_decomposition P hu p + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ThinPairCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ThinPairCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..aefc660e625f8da9f61f7f372560f7107affeb8f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ThinPairCoordinates.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PairModelCoordinates + +namespace OAI + +/-! Model fillings can be made arbitrarily thin around the connecting interval. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma thin_pair_coordinates {c h : ℝ} (hh : 0 < h) {U : Set Base} (hU : IsOpen U) + (haxis : ∀ t ∈ Icc (c-h) (c+h), crosscapAxis t ∈ U) : + ∃ R k : ℝ, 1 < R ∧ 0 < k ∧ + (pairCoordinateMap c h k) ⁻¹' ball (0:Base) R ⊆ U := by + obtain ⟨r,hr,hrect⟩ := compact_axis_rectangle (show c-h ≤ c+h by linarith) hU + (by simpa only [crosscapAxis_apply] using haxis) + let R := 1+r/(2*h) + let k := 2*R/r + have hR : 1 < R := by + have hp : 0 < r/(2*h) := div_pos hr (mul_pos (by norm_num) hh) + dsimp [R] + linarith + have hk : 0 < k := by dsimp [k]; positivity + have hRh : R*h = h+r/2 := by dsimp [R]; field_simp + have hkhalf : k*(r/2) = R := by dsimp [k]; field_simp + refine ⟨R,k,hR,hk,?_⟩ + intro x hx + have hn : ‖pairCoordinateMap c h k x‖ < R := by simpa only [mem_preimage,mem_ball,dist_zero_right] using hx + have hu : |(x 1-c)/h| < R := by + exact (norm_le_pi_norm (pairCoordinateMap c h k x) 0).trans_lt hn + have hv : |k*x 0| < R := by + exact (norm_le_pi_norm (pairCoordinateMap c h k x) 1).trans_lt hn + have hxt : -r ≤ x 0 ∧ x 0 ≤ r := by + rw [abs_lt] at hv + constructor <;> nlinarith + have htt : c-h-r ≤ x 1 ∧ x 1 ≤ c+h+r := by + rw [abs_lt] at hu + have hl : -R*h < x 1-c := (lt_div_iff₀ hh).mp hu.1 + have hu' : x 1-c < R*h := (div_lt_iff₀ hh).mp hu.2 + constructor <;> linarith + have he : (![x 0,x 1] : Base) = x := by ext i; fin_cases i <;> rfl + rw [←he] + exact hrect (x 0) hxt (x 1) htt + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateBlend.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateBlend.lean new file mode 100644 index 0000000000000000000000000000000000000000..f71e21281c80c567375d1fe205206a0b7c68c79e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateBlend.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTimeLinearBlend + +namespace OAI + +/-! The actual nonlinear blend of two agreeing time coordinates has +an invertible derivative when their transverse transition is positive. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def timeCoordinateBlend (g : Base → Base) (χ : Base → ℝ) (x : Base) : Base := + (1-χ x) • x + χ x • g x + +lemma timeCoordinateBlend_fderiv {g : Base → Base} {χ : Base → ℝ} {p : Base} + (hg : DifferentiableAt ℝ g p) (hχ : DifferentiableAt ℝ χ p) (hpoint : g p = p) : + fderiv ℝ (timeCoordinateBlend g χ) p = + (1-χ p) • ContinuousLinearMap.id ℝ Base + χ p • fderiv ℝ g p := by + have hD := (((hasFDerivAt_const (1:ℝ) p).sub hχ.hasFDerivAt).smul (hasFDerivAt_id p)).add + (hχ.hasFDerivAt.smul hg.hasFDerivAt) + change HasFDerivAt (timeCoordinateBlend g χ) _ p at hD + rw [hD.fderiv] + apply ContinuousLinearMap.ext + intro v + ext i + simp [hpoint,smul_eq_mul] + ring + +theorem timeCoordinateBlend_regular {g : Base → Base} {χ : Base → ℝ} {p : Base} + (hg : DifferentiableAt ℝ g p) (hχ : DifferentiableAt ℝ χ p) (hpoint : g p = p) + (hsecond : ∀ v, fderiv ℝ g p v 1 = v 1) + (hfirst : 0 < fderiv ℝ g p ![1,0] 0) (hweight : χ p ∈ Icc (0:ℝ) 1) : + Function.Bijective (fderiv ℝ (timeCoordinateBlend g χ) p) := by + rw [timeCoordinateBlend_fderiv hg hχ hpoint] + exact positive_time_linear_blend _ hsecond hfirst hweight + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..c58469f572434193976e5bcc11d3013e98f43f98 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TimeCoordinateTransition.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfaceArcTimeCoordinates + +namespace OAI + +/-! Two actual charts using the same longitudinal function have a +nonzero transverse transition derivative and preserve the time 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] + +theorem time_coordinate_transition (c d : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + (hds : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d d.source) + (hdi : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ d.symm d.target) + {F : M → ℝ} (hcF : ∀ x ∈ c.source, c x 1 = F x) + (hdF : ∀ x ∈ d.source, d x 1 = F x) + {x : M} (hxc : x ∈ c.source) (hxd : x ∈ d.source) : + let L := fderiv ℝ (d ∘ c.symm) (c x) + Function.Bijective L ∧ (∀ v : Base, L v 1 = v 1) ∧ L ![1,0] 0 ≠ 0 := by + let L := fderiv ℝ (d ∘ c.symm) (c x) + have hct := c.map_source hxc + have hcx := c.left_inv hxc + have hc' := hci.contMDiffAt (c.open_target.mem_nhds hct) + have hd' : ContMDiffAt planeModel 𝓘(ℝ,Base) ∞ d (c.symm (c x)) := + hcx.symm ▸ hds.contMDiffAt (d.open_source.mem_nhds hxd) + have hcomp : ContDiffAt ℝ ∞ (d ∘ c.symm) (c x) := (hd'.comp (c x) hc').contDiffAt + have hcDiff : c.symm.MDifferentiable 𝓘(ℝ,Base) planeModel := + ⟨hci.mdifferentiableOn (by simp),hcs.mdifferentiableOn (by simp)⟩ + have hdDiff : d.MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨hds.mdifferentiableOn (by simp),hdi.mdifferentiableOn (by simp)⟩ + have hL : Function.Bijective L := by + dsimp [L] + rw [← mfderiv_eq_fderiv,mfderiv_comp (c x) (hd'.mdifferentiableAt (by simp)) + (hc'.mdifferentiableAt (by simp))] + exact (hdDiff.mfderiv_bijective (hcx.symm ▸ hxd)).comp (hcDiff.mfderiv_bijective hct) + have hnear : ∀ᶠ y in 𝓝 (c x), y ∈ c.target ∧ c.symm y ∈ d.source := by + filter_upwards [c.open_target.mem_nhds hct, + c.symm.continuousAt hct |>.eventually (d.open_source.mem_nhds (hcx.symm ▸ hxd))] with y hy hz + exact ⟨hy,hz⟩ + have he : (fun y : Base => d (c.symm y) 1) =ᶠ[𝓝 (c x)] fun y => y 1 := by + filter_upwards [hnear] with y hy + rw [hdF _ hy.2,← hcF _ (c.map_target hy.1),c.right_inv hy.1] + have hproj := (ContinuousLinearMap.proj (1:Fin 2) : Base →L[ℝ] ℝ).hasFDerivAt.comp + (c x) (hcomp.differentiableAt (by simp)).hasFDerivAt + have hsecond : ∀ v : Base, L v 1 = v 1 := by + intro v + have heq := congrArg (fun A : Base →L[ℝ] ℝ => A v) (hproj.fderiv.symm.trans he.fderiv_eq) + rw [(hasFDerivAt_apply (𝕜 := ℝ) (1:Fin 2) (c x)).fderiv] at heq + exact heq + refine ⟨hL,hsecond,?_⟩ + intro hz + have hz' : L (![1,0] : Base) = 0 := by + ext i + fin_cases i + · exact hz + · simpa using hsecond ![1,0] + have hv := hL.1 (hz'.trans (map_zero L).symm) + have hv0 := congrFun hv 0 + norm_num at hv0 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseCompactCurveCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseCompactCurveCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae4e5333da016581bbca4db1588be7551d1887a5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseCompactCurveCharts.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.UnorderedDoubleCurveChart +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapHalfLineChart +import OAI.Geometry.SurfaceImmersion.Whitney.TransversePreparedCrosscaps + +namespace OAI + +/-! An unconditional compact double curve with genuine line charts in +its interior and half-line charts at precisely its finite diagonal set. -/ +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] + +def doubleCurveBoundary (f : M → ProjectionTarget 3) : Set (compactifiedDoubleCurve f) := + {z | ∃ p, unorderedPair (p,p) = z.val} + +omit [T2Space M] in +theorem doubleCurveBoundary_finite {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hfin : {p | ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p)}.Finite) : + (doubleCurveBoundary f).Finite := by + have hD := compactifiedDoubleCurve_finite_diagonal hf hfin + apply Set.Finite.of_finite_image (f := fun z : compactifiedDoubleCurve f => z.val) + · apply hD.subset + rintro z ⟨w,hw,rfl⟩ + exact ⟨w.property,hw⟩ + · exact Subtype.val_injective.injOn + +theorem transverse_double_curve_interior_chart {f : M → ProjectionTarget 3} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hreg : ∀ x y, x ≠ y → f x = f y → Function.Surjective (surfacePairDerivative f x y)) + (z : compactifiedDoubleCurve f) (hz : z ∉ doubleCurveBoundary f) : + ∃ c : OpenPartialHomeomorph (compactifiedDoubleCurve f) ℝ, z ∈ c.source := by + obtain ⟨w,hw,hew⟩ := z.property + have hne : w.1 ≠ w.2 := by + intro he + apply hz + refine ⟨w.1,?_⟩ + have hw' : (w.1,w.1) = w := Prod.ext rfl he + rw [hw',hew] + have heq := doublePairs_closure_equal hf.continuous hw + obtain ⟨c,hc⟩ := unordered_double_curve_chart hf w.1 w.2 hne heq (hreg _ _ hne heq) + refine ⟨c,?_⟩ + have hz' : (⟨unorderedPair (w.1,w.2),⟨(w.1,w.2),subset_closure ⟨hne,heq⟩,rfl⟩⟩ : compactifiedDoubleCurve f) = z := + Subtype.ext hew + rwa [hz'] at hc + +theorem transverse_double_curve_boundary_chart {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))) + (z : compactifiedDoubleCurve f) (hz : z ∈ doubleCurveBoundary f) : + ∃ c : OpenPartialHomeomorph (compactifiedDoubleCurve f) (Ici (0:ℝ)), + z ∈ c.source ∧ c z = ⟨0,by simp⟩ := by + obtain ⟨p,hp⟩ := hz + have hpK : unorderedPair (p,p) ∈ compactifiedDoubleCurve f := hp.symm ▸ z.property + have hs : ¬ Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f p) := + doublePairs_closure_diagonal_singular hf p ((compactifiedDoubleCurve_diagonal f p).mp hpK) + obtain ⟨q,φ,b,t,hpq,hφ,he,hzero,hR⟩ := hrep p hs + obtain ⟨c,hmem,hc,hc0⟩ := crosscap_half_line_chart hf p q hpq hφ he b t hzero hR + have hez : (⟨unorderedPair (p,p),hmem⟩ : compactifiedDoubleCurve f) = z := Subtype.ext hp + exact ⟨c,hez ▸ hc,hez ▸ hc0⟩ + +variable [CompactSpace M] + +theorem exists_compact_double_curve_charts : + ∃ f : M → ProjectionTarget 3, ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f ∧ + IsCompact (compactifiedDoubleCurve f) ∧ (doubleCurveBoundary f).Finite ∧ + (∀ z : compactifiedDoubleCurve f, z ∉ doubleCurveBoundary f → + ∃ c : OpenPartialHomeomorph (compactifiedDoubleCurve f) ℝ, z ∈ c.source) ∧ + (∀ z : compactifiedDoubleCurve f, z ∈ doubleCurveBoundary f → + ∃ c : OpenPartialHomeomorph (compactifiedDoubleCurve f) (Ici (0:ℝ)), + z ∈ c.source ∧ c z = ⟨0,by simp⟩) := by + obtain ⟨f,hf,hfin,hreg,hrep⟩ := exists_transverse_prepared_crosscap_map (M := M) + exact ⟨f,hf,compactifiedDoubleCurve_compact f,doubleCurveBoundary_finite hf hfin, + 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/Atlas/TransverseCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ee82d42980e2981acfd6f40266d9d7cb88f4d06 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseCutoff.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TransverseSmallFunction +import OAI.Geometry.SurfaceImmersion.Geometry.AxisFlatBounds + +namespace OAI + +/-! A fixed one-dimensional bump rescaled only in the transverse coordinate. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def transverseCutoff (r : ℝ) (x : Base) : ℝ := TransverseSmallFunction.cutoff (x 0/r) + +lemma transverseCutoff_smooth (r : ℝ) : ContDiff ℝ ∞ (transverseCutoff r) := + TransverseSmallFunction.cutoff.contDiff.comp ((contDiff_apply ℝ ℝ (0 : Fin 2)).div_const r) + +lemma transverseCutoff_le_one (r : ℝ) (x : Base) : |transverseCutoff r x| ≤ 1 := by + change |TransverseSmallFunction.cutoff (x 0/r)| ≤ 1 + rw [abs_of_nonneg TransverseSmallFunction.cutoff.nonneg] + exact TransverseSmallFunction.cutoff.le_one + +lemma transverseCutoff_tsupport {r : ℝ} (hr : 0 < r) : + tsupport (transverseCutoff r) ⊆ {x | |x 0| ≤ r} := by + apply closure_minimal _ (isClosed_le (by fun_prop) continuous_const) + intro x hx + have hb : |x 0/r| < 1 := by + have h := TransverseSmallFunction.cutoff.support_eq + have hh : x 0/r ∈ ball (0 : ℝ) 1 := h ▸ hx + simpa only [mem_ball,Real.dist_eq,sub_zero] using hh + rw [abs_div,abs_of_pos hr] at hb + exact ((div_lt_one hr).mp hb).le + +lemma transverseCutoff_axis_germ (r t : ℝ) : + transverseCutoff r =ᶠ[𝓝 (crosscapAxis t)] 1 := by + have hc : Continuous (fun x : Base => x 0/r) := by fun_prop + have ht : Tendsto (fun x : Base => x 0/r) (𝓝 (crosscapAxis t)) (𝓝 0) := by + simpa [crosscapAxis_apply] using hc.continuousAt.tendsto (x := crosscapAxis t) + exact TransverseSmallFunction.cutoff.eventuallyEq_one.comp_tendsto ht + +theorem transverseCutoff_derivative_bound : ∃ B : ℝ, 0 ≤ B ∧ + ∀ r : ℝ, 0 < r → ∀ x : Base, ‖fderiv ℝ (transverseCutoff r) x‖ ≤ B/r := by + have hχ : ContDiff ℝ ∞ (TransverseSmallFunction.cutoff : ℝ → ℝ) := + TransverseSmallFunction.cutoff.contDiff + have hcomp : HasCompactSupport (fderiv ℝ (TransverseSmallFunction.cutoff : ℝ → ℝ)) := + HasCompactSupport.fderiv (𝕜 := ℝ) TransverseSmallFunction.cutoff.hasCompactSupport + obtain ⟨C,hC⟩ := hcomp.exists_bound_of_continuous + (hχ.continuous_fderiv (by simp)) + let P : Base →L[ℝ] ℝ := ContinuousLinearMap.proj 0 + refine ⟨|C| * ‖P‖,mul_nonneg (abs_nonneg _) (norm_nonneg _),?_⟩ + intro r hr x + have hscale : HasFDerivAt (fun y : Base => y 0/r) (r⁻¹ • P) x := by + convert P.hasFDerivAt.const_smul r⁻¹ using 1 + funext y + change y 0/r = r⁻¹*y 0 + ring + have hd := (hχ.differentiable (by simp) _).hasFDerivAt.comp x hscale + change HasFDerivAt (transverseCutoff r) _ x at hd + rw [hd.fderiv] + calc + _ ≤ ‖fderiv ℝ TransverseSmallFunction.cutoff (x 0/r)‖*‖r⁻¹ • P‖ := + ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ |C| * ‖r⁻¹ • P‖ := mul_le_mul_of_nonneg_right ((hC _).trans (le_abs_self C)) (norm_nonneg _) + _ = (|C| * ‖P‖)/r := by rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_of_pos hr]; ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseSheetCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseSheetCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..adced8f5fef0474978692fb58d75f8b5aec83add --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TransverseSheetCoordinates.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.AdaptedDoubleSheetModels +import OAI.Geometry.SurfaceImmersion.Atlas.RegularThreeChart +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingPlanes + +namespace OAI + +/-! Simultaneous smooth coordinate planes for an actual transverse +regular double 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] + +structure TransverseSheetCoordinates (f : M → ProjectionTarget 3) (x y : M) where + left : OpenPartialHomeomorph M Base + right : OpenPartialHomeomorph M Base + target : OpenPartialHomeomorph (Base × ℝ) (ProjectionTarget 3) + left_mem : x ∈ left.source + right_mem : y ∈ right.source + 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 + target_smooth : ContDiff ℝ ∞ target + target_inverse_smooth : ContDiffOn ℝ ∞ target.symm target.target + left_formula : ∀ q ∈ left.source, leftCrossingPlane (left q) ∈ target.source ∧ + f q = target (leftCrossingPlane (left q)) + right_formula : ∀ q ∈ right.source, rightCrossingPlane (right q) ∈ target.source ∧ + f q = target (rightCrossingPlane (right q)) + +theorem LocalDoubleSheetModel.simultaneous_coordinates {f : M → ProjectionTarget 3} + {x y : M} {t : ℝ} (m : LocalDoubleSheetModel f x y t) : + Nonempty (TransverseSheetCoordinates f x y) := by + let T := crossingCoordinateMap m.F m.G + have hT : ContDiff ℝ ∞ T := crossingCoordinateMap_smooth m.F_smooth m.G_smooth + obtain ⟨e,he0,he,hei⟩ := regular_three_chart hT (0,t) m.crossing_regular + obtain ⟨V,hVeq,hV,hxV⟩ := eventually_nhds_iff.mp m.left_model + obtain ⟨W,hWeq,hW,hyW⟩ := eventually_nhds_iff.mp m.right_model + obtain ⟨J,hJeq,hJ,htJ⟩ := eventually_nhds_iff.mp m.common_axis + let L := V ∩ (m.left.source ∩ m.left ⁻¹' + (leftCrossingPlane ⁻¹' e.source ∩ (fun u : Base => u 1) ⁻¹' J)) + let R := W ∩ (m.right.source ∩ m.right ⁻¹' (rightCrossingPlane ⁻¹' e.source)) + have hL : IsOpen L := hV.inter (m.left.isOpen_inter_preimage + ((e.open_source.preimage leftCrossingPlane_smooth.continuous).inter + (hJ.preimage (continuous_apply 1)))) + have hR : IsOpen R := hW.inter (m.right.isOpen_inter_preimage + (e.open_source.preimage rightCrossingPlane_smooth.continuous)) + have hxL : x ∈ L := by + refine ⟨hxV,m.left_mem,?_,?_⟩ + · change leftCrossingPlane (m.left x) ∈ e.source + rw [m.left_center,leftCrossingPlane_axis] + exact he0 + · change (m.left x) 1 ∈ J + rw [m.left_center] + exact htJ + have hyR : y ∈ R := by + refine ⟨hyW,m.right_mem,?_⟩ + change rightCrossingPlane (m.right y) ∈ e.source + rw [m.right_center,rightCrossingPlane_axis] + exact he0 + let a := m.left.restrOpen L hL + let b := m.right.restrOpen R hR + refine ⟨⟨a,b,e,⟨m.left_mem,hxL⟩,⟨m.right_mem,hyR⟩, + m.left_smooth.mono (fun _ h => h.1),m.right_smooth.mono (fun _ h => h.1), + m.left_inverse_smooth.mono (fun _ h => h.1),m.right_inverse_smooth.mono (fun _ h => h.1), + by simpa only [he] using hT,hei,?_,?_⟩⟩ + · intro q hq + have hmem : leftCrossingPlane (m.left q) ∈ e.source := hq.2.2.2.1 + have haxis : m.F ![0,(m.left q) 1] = m.G ![0,(m.left q) 1] := hJeq _ hq.2.2.2.2 + refine ⟨hmem,?_⟩ + change f q = e (leftCrossingPlane (m.left q)) + rw [he] + change f q = crossingCoordinateMap m.F m.G (leftCrossingPlane (m.left q)) + rw [crossingCoordinateMap_leftPlane _ haxis] + exact hVeq q hq.2.1 + · intro q hq + have hmem : rightCrossingPlane (m.right q) ∈ e.source := hq.2.2.2 + refine ⟨hmem,?_⟩ + change f q = e (rightCrossingPlane (m.right q)) + rw [he] + change f q = crossingCoordinateMap m.F m.G (rightCrossingPlane (m.right q)) + rw [crossingCoordinateMap_rightPlane] + exact hWeq q hq.2.1 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/TriangularTimeCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TriangularTimeCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..de6d402e1172b1042cdbb0e6feaaedc0878c264c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/TriangularTimeCoordinates.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RegularPlaneChart +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapAxisCurve + +namespace OAI + +/-! Replacing the longitudinal coordinate by a smooth function with +unit axial derivative is an actual local plane diffeomorphism. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def timeCoordinateMap (φ : Base → ℝ) (x : Base) : Base := ![x 0,φ x] + +lemma timeCoordinateMap_smooth {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) : + ContDiff ℝ ∞ (timeCoordinateMap φ) := by + apply contDiff_pi.mpr + intro i + fin_cases i + · simpa [timeCoordinateMap] using contDiff_apply ℝ ℝ (0:Fin 2) + · simpa [timeCoordinateMap] using hφ + +lemma timeCoordinateMap_regular {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (p : Base) (hvertical : fderiv ℝ φ p (crosscapAxis 1) = 1) : + Function.Bijective (fderiv ℝ (timeCoordinateMap φ) p) := by + let D : Base →L[ℝ] Base := ContinuousLinearMap.pi ![ContinuousLinearMap.proj (0:Fin 2),fderiv ℝ φ p] + have hD : HasFDerivAt (timeCoordinateMap φ) D p := by + apply hasFDerivAt_pi.mpr + intro i + fin_cases i + · exact hasFDerivAt_apply (𝕜 := ℝ) 0 p + · exact (hφ.differentiable (by simp) p).hasFDerivAt + rw [hD.fderiv] + have hi : Function.Injective D := by + apply (LinearMap.ker_eq_bot).mp + apply le_antisymm + · intro v hv + have hv0 : v 0 = 0 := congrFun hv 0 + have hvφ : fderiv ℝ φ p v = 0 := congrFun hv 1 + have he : v = (v 1) • crosscapAxis 1 := by + ext i + fin_cases i <;> simp [crosscapAxis_apply,hv0] + have hv1 : v 1 = 0 := by + rw [he,map_smul,hvertical] at hvφ + simpa only [smul_eq_mul,mul_one] using hvφ + 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 := D.toLinearMap) rfl).mp hi⟩ + +theorem triangular_time_coordinates {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (p : Base) (hvertical : fderiv ℝ φ p (crosscapAxis 1) = 1) : + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (e : Base → Base) = timeCoordinateMap φ ∧ ContDiffOn ℝ ∞ e.symm e.target := + regular_plane_chart (timeCoordinateMap_smooth hφ) p (timeCoordinateMap_regular hφ p hvertical) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformAtlasConvexPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformAtlasConvexPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..b57358ff5ca52ecd08a7bd772ea8ac377d423019 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformAtlasConvexPhases.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricJetFamily +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricReadGerms +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredConvexPhase + +namespace OAI + +/-! Uniform strictly convex phases for the actual intermediate metrics. +The phase constants precede every choice of metric in the bounded family. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes PhaseMean PhaseGeometry JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_convex_phases (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 ∧ + ∀ h : SmoothMetric M, A.TensorWeightedBound 1 1 C h.inner → + (∀ p v, c*g.inner p v v ≤ h.inner p v v) → + ∀ (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 h (i : M)) + (centeredConvexPhase ell L (coordinateChart (i : M) (i : M))) + (coordinateChart (i : M) p) v v := by + obtain ⟨J,hJ,hdet,hmem⟩ := A.compact_metric_jet_family g hc hC + obtain ⟨L,r,hL,hr,hess⟩ := compact_uniform_centered_convex_phases hJ hdet hK + refine ⟨L,r,hL,hr,?_⟩ + intro h hb hlower i p hp hsmall ell hell v + have hx : coordinateChart (i : M) p ∈ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + exact ⟨chart (i : M) p,⟨p,hp,rfl⟩,rfl⟩ + have hj := hmem h hb hlower i _ hx + rw [A.tensorPlaneRead_metric_firstJet h i (A.weight_support i hp) (houter i p hp)] at hj + exact hess (coordinateMetric h (i : M)) ell _ _ hell hsmall hj v + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCenteredCharts.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCenteredCharts.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e4880a60349a1adf86327de8fb91d013e285bfb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCenteredCharts.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CenteredParabolicChart + +namespace OAI + +/-! The phase-chart radius is fixed before choosing the independent phase +parameters and the centers. This resolves that order in finite preparation. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +lemma abs_phaseLinear_le (ell v : Base) : |phaseLinear ell v| ≤ 2*‖ell‖*‖v‖ := by + calc + _ ≤ |ell.1*v.1|+|ell.2*v.2| := abs_add_le _ _ + _ = |ell.1| * |v.1| + |ell.2| * |v.2| := by rw [abs_mul,abs_mul] + _ ≤ ‖ell‖*‖v‖+‖ell‖*‖v‖ := by + gcongr + · exact norm_fst_le ell + · exact norm_fst_le v + · exact norm_snd_le ell + · exact norm_snd_le v + _ = _ := by ring + +theorem compact_uniform_centered_charts {P : Set Base} (hP : IsCompact P) + (hP0 : ∀ ell ∈ P, ell ≠ 0) {L : ℝ} (hL : 0 < L) : + ∃ r : ℝ, 0 < r ∧ ∀ ell ∈ P, ∀ c : Base, + ∃ e : OpenPartialHomeomorph Base Base, + (∀ x, (e x).1 = centeredConvexPhase ell L c x) ∧ + ContDiff ℝ ∞ e ∧ ContDiff ℝ ∞ e.symm ∧ + closedBall c r ⊆ e.source := by + have hA : Continuous (phaseCovectorSquare : Base → ℝ) := by + unfold phaseCovectorSquare + fun_prop + obtain ⟨d,hd,hbound⟩ := hP.exists_forall_le' hA.continuousOn + (fun ell hell => phaseCovectorSquare_pos (hP0 ell hell)) + obtain ⟨R₀,hR₀⟩ := hP.isBounded.subset_ball (0 : Base) + let R := |R₀|+1 + have hR : 0 < R := by dsimp [R]; positivity + have hnorm : ∀ ell ∈ P, ‖ell‖ ≤ R := by + intro ell hell + have hh := hR₀ hell + rw [mem_ball,dist_zero_right] at hh + exact hh.le.trans (by dsimp [R]; linarith [le_abs_self R₀]) + let r := d/(1+2*L*R) + have hden : 0 < 1+2*L*R := by positivity + have hr : 0 < r := div_pos hd hden + have heq : (1+2*L*R)*r = d := by + dsimp [r] + field_simp + have hsmall : L*(2*R*r) < d := by nlinarith + refine ⟨r,hr,?_⟩ + intro ell hell c + let e := centeredParabolicChart ell (hP0 ell hell) L hL.ne' c + have hcover : closedBall c r ⊆ e.source := by + intro x hx + rw [mem_closedBall,dist_eq_norm] at hx + apply (centeredParabolicChart_source ell (hP0 ell hell) L hL.ne' c x).mpr + have hu : |phaseLinear ell (x-c)| ≤ 2*R*r := + (abs_phaseLinear_le ell (x-c)).trans (by gcongr; exact hnorm ell hell) + have hlower := neg_le_of_abs_le hu + have hb := hbound ell hell + nlinarith + obtain ⟨f,hfcover,hfe,_,_,hf,hfi⟩ := extend_compact_chart_inverse e + (centeredParabolicChart_smooth ell (hP0 ell hell) L hL.ne' c) + (centeredParabolicChart_inverse_smooth ell (hP0 ell hell) L hL.ne' c) + (isCompact_closedBall c r) hcover + exact ⟨f,fun x => by rw [hfe]; exact centeredParabolicChart_phase ell (hP0 ell hell) L hL.ne' c x, + hf,hfi,hfcover⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..19f191e2676f3029ea3142fb69988f40d078050d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseCancellation.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseSolverFamily +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSplitCancellation + +namespace OAI + +/-! Uniform cancellation on compact good-phase supports with no assumed phase solver. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +/-- A compact good phase gives a uniform finite-loss cancellation estimate. +The geometry and constants are chosen before the target and both scales. -/ +theorem uniform_compact_good_phase_cancellation + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (G ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) (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 := emptyMetricPolynomial) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m ((τ/s)^(q+1) * D m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + obtain ⟨t,L,T,c,I,S,hLK,_,hI,hi,hS,hT,hsum⟩ := compact_phase_solver_family hG hφ K hImm hgood + exact finite_split_cancellation emptyMetricPolynomial hG φ K L T c hLK I hI hi S hS hT hsum q + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..f81a26055286bc4e0d0183dfbc829a6b7d70942e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformCompactPhaseFamily.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseFamily +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseSolverPrefix +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! All charts and numeric profiles for nearby-map cancellation are fixed in advance. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem CompactPhaseFamily.uniform_solvers_all_profiles + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {K : Compacts SmallModes.Base} (a : CompactPhaseFamily F φ K) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (R : ℕ → ℝ), (∀ m, 0 ≤ R m) → + ∃ C J I : a.centers → ℕ → ℝ, + (∀ i m, 0 ≤ C i m) ∧ (∀ i m, 1 ≤ J i m) ∧ (∀ i m, 1 ≤ I i m) ∧ + (∀ i m j, 1 ≤ j → j ≤ m → ∀ x ∈ (a.charts i).chart.target, + ‖iteratedFDerivWithin ℝ j (a.charts i).chart.symm (a.charts i).chart.target x‖ ≤ I i m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : (i : a.centers) → PolynomialSolveData emptyMetricPolynomial 0 G hG φ + (a.support i) τ s, + (∀ i, (c i).e = (a.charts i).chart) ∧ (∀ i, (c i).C = C i) ∧ + (∀ i m, (c i).D m = 0) ∧ (∀ i, (c i).J = J i) := by + classical + choose ρ hρ hall using fun i => + (a.charts i).uniform_solvers_of_prefix_all_profiles hF hφ (a.support i) (a.support_chart i) + obtain ⟨r,hr,_,hrρ⟩ := finite_positive_threshold ρ hρ + refine ⟨r,hr,?_⟩ + intro R hR + choose C J hC hJ hsolve using fun i => hall i R hR + choose I hI hi using fun (i : a.centers) m => compact_local_weighted_bound + (a.charts i).chart.open_target isOpen_univ (a.charts i).targetCompact.isCompact + (a.charts i).targetBound (subset_univ _) (a.charts i).smoothInverse.contDiffOn m + refine ⟨C,J,I,hC,hJ,hI,?_,?_⟩ + · intro i m j _ hj x hx + simpa only [one_pow,one_mul] using hi i m 1 zero_le_one le_rfl j hj x hx + · intro G hG B hB hBr hb τ s hs hs1 hp + choose c he hc hd hj using fun i => hsolve i G hG B hB (hBr.trans_le (hrρ i)) + hb τ s hs hs1 hp + exact ⟨c,he,hc,hd,hj⟩ + +theorem CompactPhaseFamily.uniform_solvers + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {K : Compacts SmallModes.Base} (a : CompactPhaseFamily F φ K) + (R : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) : + ∃ (ρ : ℝ) (C J I : a.centers → ℕ → ℝ), 0 < ρ ∧ + (∀ i m, 0 ≤ C i m) ∧ (∀ i m, 1 ≤ J i m) ∧ (∀ i m, 1 ≤ I i m) ∧ + (∀ i m j, 1 ≤ j → j ≤ m → ∀ x ∈ (a.charts i).chart.target, + ‖iteratedFDerivWithin ℝ j (a.charts i).chart.symm (a.charts i).chart.target x‖ ≤ I i m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : (i : a.centers) → PolynomialSolveData emptyMetricPolynomial 0 G hG φ + (a.support i) τ s, + (∀ i, (c i).e = (a.charts i).chart) ∧ (∀ i, (c i).C = C i) ∧ + (∀ i m, (c i).D m = 0) ∧ (∀ i, (c i).J = J i) := by + obtain ⟨ρ,hρ,hall⟩ := a.uniform_solvers_all_profiles hF hφ + obtain ⟨C,J,I,hC,hJ,hI,hi,hsolve⟩ := hall R hR + exact ⟨ρ,C,J,I,hρ,hC,hJ,hI,hi,hsolve⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformFiniteAtlasCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformFiniteAtlasCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3a8b5cfea98b4e2345ea706b279c832bda4efcf8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformFiniteAtlasCancellation.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! The atlas restoration constants are fixed before the finite phase-label types. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance uniformFiniteAtlasSolveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformFiniteAtlasSolveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformFiniteAtlasSolveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformFiniteAtlasSolveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformFiniteAtlasSolveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformFiniteAtlasSolveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_finite_atlas_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) ∧ + ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)], + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + {τ : ℝ} {s : ℝ≥0} + (c : ∀ i j, PolynomialSolveData (P i) 0 (A.jetChartMap i F) + (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), ∀ q : ℕ, + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (Dv m * ∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.global_linearized_residual_bound m + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro ι inst F hF φ K τ s c hτ hs hτs hs1 hK target q + have hsmall (i : A.centers) : τ/s + (0:ℝ)/τ^tensorLoss (P i) ≤ 1 := by + simpa only [zero_div,add_zero] using (div_le_one₀ hs).mpr hτs + choose X hX hsupport hsize hres using fun i : A.centers => + finite_polynomial_cancellation (P i) 0 (A.jetChartMap_smooth i hF) (φ i) (K i) (c i) + hτ hs hτs hs1 (le_refl 0) (hsmall i) (target i) q + have hsp (i : A.centers) : tsupport (X i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp (hsupport i hx) + exact hK i j hj + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := by + apply ContDiff.sum + intro j _ + exact contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((c i j).smoothPhase.comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hsz (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).size (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).size_nonneg (target i j) q m) + have hrr (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).residual (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).residual_nonneg + (by simpa only [zero_div,add_zero] using (div_nonneg hτ.le hs.le)) (target i j) q m) + refine ⟨A.vectorPlaneRestore X,A.vectorPlaneRestore_smooth X hX,?_,?_⟩ + · intro m + apply hv m X τ (∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hsz i m)) hX + intro i + exact (hsize i m).mono_const (Finset.single_le_sum (fun k _ => hsz k m) (Finset.mem_univ i)) + · intro m + apply ht m F hF X hX hsp T hT τ (∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hrr i m)) + intro i + have hr := hres i m + simp_rw [coordinateFullLinearized_unperturbed, A.jetChartMap_plane] at hr + exact hr.mono_const (Finset.single_le_sum (fun k _ => hrr k m) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformLinearPhaseBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformLinearPhaseBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..999c8ef12a9c631106c84760007777e60b5d3afb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformLinearPhaseBudgets.lean @@ -0,0 +1,203 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseBudgets +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseChartBounds + +namespace OAI + +/-! Fixed numerical mean budgets for nearby immersions in a linear phase chart. +The chart, cut-off, coefficient form, and weighted two-jet profile are fixed +before the nearby immersion and slow scale are supplied. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes + +/-- The numerical part of the local mean budgets, without the map or scale. -/ +structure BudgetProfiles where + inv : ℕ → ℝ + chi : ℕ → ℝ + psi : ℕ → ℝ + forms : ℕ → ℝ + pull : ℕ → ℝ + normal : ℕ → ℝ + mode : ℕ → ℝ + inv_pos : ∀ m, 1 ≤ inv m + chi_pos : ∀ m, 1 ≤ chi m + psi_pos : ∀ m, 1 ≤ psi m + forms_pos : ∀ m, 1 ≤ forms m + pull_pos : ∀ m, 1 ≤ pull m + normal_pos : ∀ m, 1 ≤ normal m + mode_pos : ∀ m, 1 ≤ mode m + +def Budgets.profiles {U V : Set Base} {s : ℝ} {F : RField 4} + {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + (d : Budgets U V s F ψ Q χ e) : BudgetProfiles where + inv := d.inv + chi := d.chi + psi := d.psi + forms := d.forms + pull := d.pull + normal := d.normal + mode := d.mode + inv_pos := d.inv_pos + chi_pos := d.chi_pos + psi_pos := d.psi_pos + forms_pos := d.forms_pos + pull_pos := d.pull_pos + normal_pos := d.normal_pos + mode_pos := d.mode_pos + +end ClosedSurfaceR4.PhaseMean + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes PhaseMean WeightedEstimates + +/-- All seven mean-budget profiles can be chosen before a nearby immersion +and its actual slow scale. The dependence on its two-jet is the displayed +fixed profile `H`, rather than an implicit map-dependent constant. -/ +theorem uniform_linear_phase_budgets_all_profiles {F : RField 4} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor F x) ξ) + {ψ : Base → ℝ} (hψ : ContDiff ℝ ∞ ψ) (Q : PhaseMean.Tensor →L[ℝ] ℝ) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (H : ℕ → ℝ), (∀ m, 1 ≤ H m) → + ∃ b : BudgetProfiles, + ∀ (G : RField 4), ContDiff ℝ ∞ G → ∀ C₀ : ℝ, 0 ≤ C₀ → C₀ < ρ → + WeightedBound univ 1 2 C₀ (G-F) → + ∀ s : ℝ, 0 < s → s ≤ 1 → + (∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (H m) + (realTwoJet (G ∘ (linearPhaseChart ξ hξ U hU).symm))) → + RealModeDomain (G ∘ (linearPhaseChart ξ hξ U hU).symm) + (linearPhaseChart ξ hξ U hU).target ∧ + ∃ d : Budgets U (linearPhaseChart ξ hξ U hU).target s + (G ∘ (linearPhaseChart ξ hξ U hU).symm) ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm, + d.profiles = b := by + let L := phaseEquiv ξ hξ + let V := (linearPhaseChart ξ hξ U hU).target + let KV := L '' K + let ΩV := L '' Ω + have hV : IsOpen V := (linearPhaseChart ξ hξ U hU).open_target + have hKV : IsCompact KV := hK.image L.continuous + have hVK : V ⊆ KV := image_mono hUK + have hsm := linearPhaseChart_smooth ξ hξ U hU + let c : GoodPhaseChart F (phaseLinear ξ) := { + chart := linearPhaseChart ξ hξ U hU + phase := linearPhaseChart_phase ξ hξ U hU + smooth := hsm.1 + smoothInverse := hsm.2 + sourceCompact := ⟨K,hK⟩ + targetCompact := ⟨KV,hKV⟩ + domain := ΩV + sourceBound := hUK + targetBound := hVK + targetInside := image_mono hKΩ + good := realModeDomain_phase hF hΩ hξ hImm hgood + } + obtain ⟨ρ,D,E,hρ,hD,hE,hnear⟩ := c.uniform_mode_bounds hF + have hpull : ContDiffOn ℝ ∞ (pullbackField (linearPhaseChart ξ hξ U hU)) univ := by + have hh : pullbackField (linearPhaseChart ξ hξ U hU) = + fun _ => pullback (phaseEquiv ξ hξ).toContinuousLinearMap := + funext (pullbackField_linearPhaseChart hξ hU) + rw [hh] + exact contDiffOn_const + choose I hI hbI using fun m => compact_local_weighted_bound hV isOpen_univ hKV + hVK (subset_univ KV) hsm.2.contDiffOn m + choose J hJ hbJ using fun m => compact_local_weighted_bound hU isOpen_univ hK + hUK (subset_univ K) hsm.1.contDiffOn m + choose P hP hbP using fun m => compact_local_weighted_bound hV isOpen_univ hKV + hVK (subset_univ KV) hψ.contDiffOn m + choose Qb hQb hbQ using fun m => compact_local_weighted_bound hV isOpen_univ hKV + hVK (subset_univ KV) (show ContDiffOn ℝ ∞ (fun _ : Base => Q) univ from + contDiffOn_const) m + choose T hT hbT using fun m => compact_local_weighted_bound hU isOpen_univ hK + hUK (subset_univ K) hpull m + refine ⟨ρ,hρ,?_⟩ + intro H hH + have hfactor (A : ℕ → ℝ) (hA : ∀ m, 1 ≤ A m) (m : ℕ) : + 1 ≤ (m.factorial : ℝ) * A m * H m ^ m := by + have hf : (1 : ℝ) ≤ (m.factorial : ℝ) := by + exact_mod_cast Nat.succ_le_of_lt (Nat.factorial_pos m) + exact one_le_mul_of_one_le_of_one_le + (one_le_mul_of_one_le_of_one_le hf (hA m)) (one_le_pow₀ (hH m)) + let b : BudgetProfiles := { + inv := I + chi := J + psi := P + forms := Qb + pull := T + normal := fun m => (m.factorial : ℝ) * E m * H m ^ m + mode := fun m => (m.factorial : ℝ) * D m * H m ^ m + inv_pos := hI + chi_pos := hJ + psi_pos := hP + forms_pos := hQb + pull_pos := hT + normal_pos := hfactor E hE + mode_pos := hfactor D hD + } + refine ⟨b,?_⟩ + intro G hG C₀ hC₀ hCρ hb s hs hs1 hjet + obtain ⟨hdom,hmodes⟩ := hnear G hG C₀ hC₀ hCρ hb + refine ⟨hdom, { + inv := b.inv + chi := b.chi + psi := b.psi + forms := b.forms + pull := b.pull + normal := b.normal + mode := b.mode + inv_pos := b.inv_pos + chi_pos := b.chi_pos + psi_pos := b.psi_pos + forms_pos := b.forms_pos + pull_pos := b.pull_pos + normal_pos := b.normal_pos + mode_pos := b.mode_pos + inv_bound := ?_ + chi_bound := ?_ + psi_bound := fun m => hbP m s hs.le hs1 + forms_bound := fun m => hbQ m s hs.le hs1 + pull_bound := fun m => hbT m s hs.le hs1 + normal_bound := fun m => (hmodes m s (H m) hs (hH m) (hjet m)).2 + mode_bound := fun m => (hmodes m s (H m) hs (hH m) (hjet m)).1 + }, rfl⟩ + · intro m j _ hj x hx + simpa only [one_pow,one_mul] using hbI m 1 zero_le_one le_rfl j hj x hx + · intro m j _ hj x hx + simpa only [one_pow,one_mul] using hbJ m 1 zero_le_one le_rfl j hj x hx + +/-- All seven mean-budget profiles can be chosen before a nearby immersion +and its actual slow scale. The dependence on its two-jet is the displayed +fixed profile `H`, rather than an implicit map-dependent constant. -/ +theorem uniform_linear_phase_budgets {F : RField 4} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor F x) ξ) + {ψ : Base → ℝ} (hψ : ContDiff ℝ ∞ ψ) (Q : PhaseMean.Tensor →L[ℝ] ℝ) + (H : ℕ → ℝ) (hH : ∀ m, 1 ≤ H m) : + ∃ (ρ : ℝ) (b : BudgetProfiles), 0 < ρ ∧ + ∀ (G : RField 4), ContDiff ℝ ∞ G → ∀ C₀ : ℝ, 0 ≤ C₀ → C₀ < ρ → + WeightedBound univ 1 2 C₀ (G-F) → + ∀ s : ℝ, 0 < s → s ≤ 1 → + (∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (H m) + (realTwoJet (G ∘ (linearPhaseChart ξ hξ U hU).symm))) → + RealModeDomain (G ∘ (linearPhaseChart ξ hξ U hU).symm) + (linearPhaseChart ξ hξ U hU).target ∧ + ∃ d : Budgets U (linearPhaseChart ξ hξ U hU).target s + (G ∘ (linearPhaseChart ξ hξ U hU).symm) ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm, + d.profiles = b := by + obtain ⟨ρ,hρ,hall⟩ := uniform_linear_phase_budgets_all_profiles hF hΩ hU hK hUK hKΩ + hξ hImm hgood hψ Q + obtain ⟨b,hb⟩ := hall H hH + exact ⟨ρ,b,hρ,hb⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformMetricPhaseGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformMetricPhaseGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..f211e9e15dd8b6f5c6e34b28ebf895499c1e4216 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformMetricPhaseGeometry.lean @@ -0,0 +1,128 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData +import OAI.Geometry.SurfaceImmersion.Atlas.GoodPhaseC2Stability +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseStability +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! One C2 neighborhood preserves all fixed metric-adapted phase +geometry, independently of every smoothing and correction order. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry WeightedEstimates +open JetPolynomial JetPolynomial.Perturbation + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma compact_read_phase_C2_stability {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (i : A.centers) + (K : TopologicalSpace.Compacts SmallModes.Base) (φ : SmallModes.Base → ℝ) + (hφ : ContDiff ℝ ∞ φ) + (hImm : ∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ x ∈ (K : Set SmallModes.Base), + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) (phaseDerivative φ x)) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ b : ℝ, 0 ≤ b → b < ρ → A.WeightedBound 1 2 b (G-F) → + ∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i G) x) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i G) x) (phaseDerivative φ x) := by + obtain ⟨r,hr,hnear⟩ := compact_good_phase_C2_stability + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) hφ K hImm hgood + obtain ⟨D,hD,hd⟩ := A.vectorPlaneRead_bound (V := Space) i 2 + let L := ‖spaceCoordinates.toContinuousLinearMap‖*D + have hL : 0 ≤ L := mul_nonneg (norm_nonneg _) hD + have hLp : 0 < 1+L := by linarith + refine ⟨r/(1+L),div_pos hr hLp,?_⟩ + intro G hG b hb hbr hclose + have hread := hd (G-F) 1 b zero_lt_one le_rfl hb (hG.sub hF) hclose + have hlocal := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn spaceCoordinates.toContinuousLinearMap + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hlocal + have he : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [he] at hlocal + have hsize : L*b < r := by + have hh := (lt_div_iff₀ hLp).mp hbr + nlinarith + exact hnear (spaceCoordinates ∘ A.vectorPlaneRead i G) + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) (L*b) + (mul_nonneg hL hb) hsize (by simpa only [L,mul_assoc] using hlocal) + +end SmoothingAtlas + +private lemma phaseDerivative_linear (ξ x : SmallModes.Base) : + phaseDerivative (phaseLinear ξ) x = ξ := by + unfold phaseDerivative + rw [(phaseLinear ξ).hasFDerivAt.fderiv] + ext <;> simp [phaseLinear_apply,dx,dy] + +namespace MetricGoodPhaseData + +theorem uniform_C2_geometry {g : SmoothMetric M} {F : M → Space} + (d : MetricGoodPhaseData g F) (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ b : ℝ, 0 ≤ b → b < ρ → d.A.WeightedBound 1 2 b (G-F) → + (∀ i x, x ∈ (modeSupport (d.A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ d.A.vectorPlaneRead i G) x)) ∧ + (∀ i j x, x ∈ (modeSupport (d.A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ d.A.vectorPlaneRead i G) x) ((d.Q i).ξ j)) ∧ + (∀ k l x, x ∈ (modeSupport + (d.A.quadraticOverlapCompact (fun a : d.A.centers × Fin 3 => tsupport (d.A.weight a.1)) + (fun a => isClosed_tsupport (d.A.weight a.1)) k l) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ d.A.vectorPlaneRead k G) x) + (phaseDerivative (coordinatePhase (d.A.globalQuadraticPhase + (d.A.linearAtlasPhase d.Q d.w) k l)) x)) := by + classical + have hpure (a : d.A.centers × Fin 3) := d.A.compact_read_phase_C2_stability hF a.1 + (modeSupport (d.A.chartWeightCompact a.1)) (phaseLinear ((d.Q a.1).ξ a.2)) + (phaseLinear ((d.Q a.1).ξ a.2)).contDiff (d.immersion a.1) + (fun x hx => by simpa only [phaseDerivative_linear] using d.pure_good a.1 a.2 x hx) + choose rp hrp hp using hpure + let J := d.A.centers × QuadraticLabel (d.A.centers × Fin 3) + have hquad (a : J) := d.A.compact_read_phase_C2_stability hF a.1 + (modeSupport (d.A.quadraticOverlapCompact + (fun b : d.A.centers × Fin 3 => tsupport (d.A.weight b.1)) + (fun b => isClosed_tsupport (d.A.weight b.1)) a.1 a.2)) + (coordinatePhase (d.A.globalQuadraticPhase (d.A.linearAtlasPhase d.Q d.w) a.1 a.2)) + ((d.A.globalQuadraticPhase_smooth (d.A.linearAtlasPhase d.Q d.w) + (d.A.linearAtlasPhase_smooth d.Q d.w) a.1 a.2).comp planeCoordinateIsometry.symm.contDiff) + (fun x hx => d.immersion a.1 x (Set.image_mono (d.A.quadraticOverlapCompact_subset + (fun b : d.A.centers × Fin 3 => tsupport (d.A.weight b.1)) + (fun b => isClosed_tsupport (d.A.weight b.1)) a.1 a.2) hx)) + (d.quadratic_good a.1 a.2) + choose rq hrq hq using hquad + obtain ⟨ρp,hρp,_,hρps⟩ := finite_positive_threshold rp hrp + obtain ⟨ρq,hρq,_,hρqs⟩ := finite_positive_threshold rq hrq + refine ⟨min ρp ρq,lt_min hρp hρq,?_⟩ + intro G hG b hb hbr hclose + have hbp (a : d.A.centers × Fin 3) : b < rp a := + (hbr.trans_le (min_le_left _ _)).trans_le (hρps a) + have hbq (a : J) : b < rq a := + (hbr.trans_le (min_le_right _ _)).trans_le (hρqs a) + refine ⟨?_,?_,?_⟩ + · intro i x hx + exact (hp (i,0) G hG b hb (hbp (i,0)) hclose x hx).1 + · intro i j x hx + have hh := (hp (i,j) G hG b hb (hbp (i,j)) hclose x hx).2 + simpa only [phaseDerivative_linear] using hh + · intro i l x hx + exact (hq (i,l) G hG b hb (hbq (i,l)) hclose x hx).2 + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyAtlasSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyAtlasSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..d840c88ac9ad971ddba7933d4e8524a94e3af4b2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyAtlasSmallIncrement.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledNearbyAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasPhaseMeanData + +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 uniformNearbySmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformNearbySmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformNearbySmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformNearbySmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformNearbySmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformNearbySmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The fixed geometric phase expressed as a smooth function on the surface. -/ +def linearAtlasPhase (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (a : A.centers × Fin 3) : M → ℝ := + restore (a.1 : M) (A.outer a.1) + (phaseLinear (w a.1 a.2 • (Q a.1).ξ a.2) ∘ planeCoordinateIsometry) + +theorem uniform_nearby_atlas_small_increment + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {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))) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r₁ ≤ (Q i).Q j (A.tensorPlaneRead i reference x) ∧ + (Q i).Q j (A.tensorPlaneRead i reference x) ≤ R - ‖(Q i).Q j‖*r₁) + (hImmQ : ∀ 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)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) + (hPF : ∀ m, 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ 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 + classical + obtain ⟨ρd,p,hρd,hdata⟩ := A.uniform_atlas_phase_mean_data F hF Q w hw Ω U K + hΩ hU hK hUK hKΩ hImm hgood hsupport U₀ hU₀ K₀ hU₀K hSU₀ + (fun i => A.tensorPlaneRead i reference) hmargin P hP + have hzero : A.WeightedBound 1 2 0 (F-F) := by + simp only [sub_self] + intro i + have he : localize (i : M) (A.weight i) (0 : M → Space) = + (fun _ : JetPolynomial.Base => (0 : Space)) := by + funext x + simp [localize] + rw [he] + exact weightedBound_zero (univ : Set JetPolynomial.Base) 1 2 + obtain ⟨d₀,_,_,hphase₀,_,hlinear₀,_,_,_⟩ := hdata F hF 0 le_rfl hρd hzero + 1 zero_lt_one le_rfl hPF 1 r₁ le_rfl + have hφ₀ : (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) = + A.linearAtlasPhase Q w := by + funext a + unfold freeGlobalPhase linearAtlasPhase + rw [hphase₀ a.1] + have hgoodQ' : ∀ 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) → + 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) := by + simpa only [hφ₀] using hgoodQ + obtain ⟨r,D₀,hr,hD₀,hDr,hsmall⟩ := A.profiled_nearby_atlas_small_increment + F hF hr₁ hρ reference href p d₀ Q w hw hlinear₀ hImmQ hgoodQ' P hP q + refine ⟨r,hr,?_⟩ + intro C hC + obtain ⟨ρs,η₀,B,T,hρs,hη₀,hη₁,hB,hT,hstep⟩ := hsmall C hC + refine ⟨min ρd ρs,η₀,B,T,lt_min hρd hρs,hη₀,hη₁,hB,hT,?_⟩ + intro G hG b hb hbr hclose s hs hs1 hp H hH hsym hnear hHC τ δ hτ hτs hη hδ hδτ + have hrealize := hstep G hG b hb (hbr.trans_le (min_le_right _ _)) hclose + s hs hs1 hp H hH hsym hnear hHC + obtain ⟨d,hfit,hmap,hphase,hsupport',_,hcut,hform,hsup⟩ := + hdata G hG b hb (hbr.trans_le (min_le_left _ _)) hclose s hs hs1 hp τ (D₀*r) hDr + have hph (i) : (d i).phase = (d₀ i).phase := (hphase i).trans (hphase₀ i).symm + have hK' (i j) : (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + rw [hsupport' i] + exact hrealize τ δ hτ hτs hη hδ hδτ d hfit hph hmap hcut hform hsup hK' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyPhaseCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyPhaseCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7cf1dfb822872daceadc63e3bcffeb3625284b3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformNearbyPhaseCancellation.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformCompactPhaseFamily +import OAI.Geometry.SurfaceImmersion.Primitive.ProfiledSplitCancellation + +namespace OAI + +/-! Compact good-phase cancellation uniform over nearby maps and slow scales. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem uniform_nearby_good_phase_cancellation_all_profiles + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (F ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (R : ℕ → ℝ), (∀ m, 0 ≤ R m) → ∀ q : ℕ, + ∃ Cv Ct : ℕ → ℝ, + (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∀ 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 := emptyMetricPolynomial) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ/s)^(q+1) * Ct m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + obtain ⟨a⟩ := exists_compactPhaseFamily hF hφ K hImm hgood + obtain ⟨ρ,hρ,hall⟩ := a.uniform_solvers_all_profiles hF hφ + refine ⟨ρ,hρ,?_⟩ + intro R hR q + obtain ⟨C,J,I,hC,hJ,hI,hi,hsol⟩ := hall R hR + obtain ⟨Cv,Ct,hCv,hCt,hcancel⟩ := profiled_split_cancellation emptyMetricPolynomial K + a.support a.split a.support_subset C J I hC hJ hI a.partition.splitConstant + a.partition.one_le_splitConstant a.split_bound a.split_sum q + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ s hτ hs hτs hs1 hp A + obtain ⟨c,he,hc,hd,hj⟩ := hsol G hG B hB hBρ hb τ s hs hs1 hp + apply hcancel G hG φ τ s hτ hs hτs hs1 c hc _ hj _ A + · intro i + funext m + exact hd i m + · intro i m j hj₁ hjm x hx + rw [he i] at hx ⊢ + exact hi i m j hj₁ hjm x hx + +theorem uniform_nearby_good_phase_cancellation + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ p ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) p)) + (hgood : ∀ p ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (F ∘ planeCoordinateIsometry.symm) p) + (phaseDerivative (coordinatePhase φ) p)) + (R : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) (q : ℕ) : + ∃ (ρ : ℝ) (Cv Ct : ℕ → ℝ), 0 < ρ ∧ + (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∀ 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 := emptyMetricPolynomial) q m) A) X) ∧ + (∀ m, WeightedBound univ τ m + ((τ/s)^(q+1) * Ct m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) A) + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + obtain ⟨ρ,hρ,hall⟩ := uniform_nearby_good_phase_cancellation_all_profiles hF hφ K hImm hgood + obtain ⟨Cv,Ct,hCv,hCt,hcancel⟩ := hall R hR q + exact ⟨ρ,Cv,Ct,hρ,hCv,hCt,hcancel⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..13b90c797a0027454c62c0ce3e3b5cb576042ae3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartBounds.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartStability + +namespace OAI + +/-! Uniform mode coefficients and normal fields on the fixed local phase chart. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes WeightedEstimates + +/-- The radius and all constant profiles are fixed before the perturbed map. +Only its weighted two-jet size enters, with the explicit polynomial power. -/ +theorem GoodPhaseChart.uniform_mode_bounds {F : RField 4} (hF : ContDiff ℝ ∞ F) + {φ : Base → ℝ} (c : GoodPhaseChart F φ) : + ∃ (ρ : ℝ) (D E : ℕ → ℝ), 0 < ρ ∧ (∀ m, 1 ≤ D m) ∧ (∀ m, 1 ≤ E m) ∧ + ∀ (G : RField 4), ContDiff ℝ ∞ G → ∀ C₀ : ℝ, 0 ≤ C₀ → C₀ < ρ → + WeightedBound univ 1 2 C₀ (G-F) → + RealModeDomain (G ∘ c.chart.symm) c.chart.target ∧ + ∀ (m : ℕ) (s C : ℝ), 0 < s → 1 ≤ C → + WeightedBound c.chart.target s m C (realTwoJet (G ∘ c.chart.symm)) → + ReconstructionCoefficientBound (fun p => complexify ((G ∘ c.chart.symm) p)) + c.chart.target s m ((m.factorial : ℝ) * D m * C^m) ∧ + WeightedBound c.chart.target s m ((m.factorial : ℝ) * E m * C^m) + (freeNormal (G ∘ c.chart.symm)) := by + obtain ⟨ρ,Q,hρ,hQ,hQa,hnear⟩ := c.uniform_jet_neighborhood hF + choose D hD hd using fun m => compact_real_reconstruction_bounds c.chart.open_target + admissibleRealJets_domain hQ hQa m + choose E hE he using fun m => compact_freeNormal_bound c.chart.open_target + admissibleRealJets_domain hQ hQa m + refine ⟨ρ,D,E,hρ,hD,hE,?_⟩ + intro G hG C₀ hC₀ hCρ hb + obtain ⟨hmap,hdom⟩ := hnear G hG C₀ hC₀ hCρ hb + refine ⟨hdom,?_⟩ + intro m s C hs hC hj + exact ⟨hd m (G ∘ c.chart.symm) s C hs hC (hG.comp c.smoothInverse) hmap hj, + he m (G ∘ c.chart.symm) s C hs hC (hG.comp c.smoothInverse) hmap hj⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..840da3afd9956ee38f341d2587f58a3ff3e58dbf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseChartSolver.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseChartBounds +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver + +namespace OAI + +/-! One fixed phase chart supplies solvers throughout a controlled C2 neighborhood. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates RealModes + +/-- The chart, coordinate constants and reconstruction profile are chosen +before the nearby map, wavelength and slow scale. -/ +theorem GoodPhaseChart.uniform_unperturbed_solvers_all_profiles + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) + (hK : (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (A : ℕ → ℝ), (∀ m, 1 ≤ A m) → + ∃ C J : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 1 ≤ J m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, WeightedBound e.chart.target s (m+1) (A (m+1)) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ e.chart.symm))) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = e.chart ∧ c.C = C ∧ (∀ m, c.D m = 0) ∧ c.J = J := by + obtain ⟨ρ,D,E,hρ,hD,_,hnear⟩ := e.uniform_mode_bounds (hF.comp planeCoordinateIsometry.symm.contDiff) + refine ⟨ρ,hρ,?_⟩ + intro A hA + choose J hJ hj using fun m => compact_local_weighted_bound e.chart.open_source isOpen_univ + e.sourceCompact.isCompact e.sourceBound (subset_univ _) e.smooth.contDiffOn m + let C := fun m => ((m+1).factorial : ℝ) * D (m+1) * A (m+1)^(m+1) + have hC (m : ℕ) : 0 ≤ C m := mul_nonneg + (mul_nonneg (Nat.cast_nonneg _) (zero_le_one.trans (hD _))) + (pow_nonneg (zero_le_one.trans (hA _)) _) + refine ⟨C,J,hC,hJ,?_⟩ + intro G hG B hB hBρ hb τ s hs hs1 hjet + have hGp := hG.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨hdom,hbounds⟩ := hnear (G ∘ planeCoordinateIsometry.symm) hGp B hB hBρ hb + have hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.chart.symm) := + hGp.comp e.smoothInverse + 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.chart + smoothForward := e.smooth.contDiffOn + smoothInverse := e.smoothInverse.contDiffOn + supportChart := hK + phase := fun x _ => e.phase x + smoothMap := hmap + domain := hdom.complexDomain hmap + C := C + D := fun _ => 0 + J := J + nonnegC := hC + nonnegD := fun _ => le_rfl + oneLEJ := hJ + coordinates := ?_ + coefficients := fun m => (hbounds (m+1) s (A (m+1)) hs (hA _) (hjet m)).1 + polynomial := ?_ + },rfl,rfl,fun _ => rfl,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 + +/-- The chart, coordinate constants and reconstruction profile are chosen +before the nearby map, wavelength and slow scale. -/ +theorem GoodPhaseChart.uniform_unperturbed_solvers + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) + (hK : (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source) + (A : ℕ → ℝ) (hA : ∀ m, 1 ≤ A m) : + ∃ (ρ : ℝ) (C J : ℕ → ℝ), 0 < ρ ∧ (∀ m, 0 ≤ C m) ∧ (∀ m, 1 ≤ J m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, WeightedBound e.chart.target s (m+1) (A (m+1)) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ e.chart.symm))) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = e.chart ∧ c.C = C ∧ (∀ m, c.D m = 0) ∧ c.J = J := by + obtain ⟨ρ,hρ,hall⟩ := e.uniform_unperturbed_solvers_all_profiles hF hφ K hK + obtain ⟨C,J,hC,hJ,hsolve⟩ := hall A hA + exact ⟨ρ,C,J,hρ,hC,hJ,hsolve⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseSolverPrefix.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseSolverPrefix.lean new file mode 100644 index 0000000000000000000000000000000000000000..a9399ee20b920a3e2e2a141be07bb7c7cba011fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformPhaseSolverPrefix.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseChartSolver +import OAI.Geometry.SurfaceImmersion.Geometry.RealJetPrefixBounds + +namespace OAI + +/-! Construct the scale-dependent solver from shifted bounds on the actual map. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates RealModes + +theorem GoodPhaseChart.uniform_solvers_of_prefix_all_profiles + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) + (hK : (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (R : ℕ → ℝ), (∀ m, 0 ≤ R m) → + ∃ C J : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 1 ≤ J m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = e.chart ∧ c.C = C ∧ (∀ m, c.D m = 0) ∧ c.J = J := by + obtain ⟨ρ,hρ,hall⟩ := e.uniform_unperturbed_solvers_all_profiles hF hφ K hK + refine ⟨ρ,hρ,?_⟩ + intro R hR + choose D hD hd using fun m => compact_realTwoJet_comp_prefix_bound e.smoothInverse + e.targetCompact e.chart.open_target e.targetBound m + let A := fun m => 1+D m*R m + have hA (m : ℕ) : 1 ≤ A m := + le_add_of_nonneg_right (mul_nonneg (zero_le_one.trans (hD m)) (hR m)) + obtain ⟨C,J,hC,hJ,hsolve⟩ := hall A hA + refine ⟨C,J,hC,hJ,?_⟩ + intro G hG B hB hBρ hb τ s hs hs1 hp + apply hsolve G hG B hB hBρ hb τ s hs hs1 + intro m + apply (hd (m+1) (G ∘ planeCoordinateIsometry.symm) + (hG.comp planeCoordinateIsometry.symm.contDiff) s (R (m+1)) hs hs1 (hR _) + (hp (m+1))).mono_const + exact le_add_of_nonneg_left zero_le_one + +theorem GoodPhaseChart.uniform_solvers_of_prefix + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) + (hK : (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source) + (R : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) : + ∃ (ρ : ℝ) (C J : ℕ → ℝ), 0 < ρ ∧ (∀ m, 0 ≤ C m) ∧ (∀ m, 1 ≤ J m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (B : ℝ), 0 ≤ B → B < ρ → + WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm) - (F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = e.chart ∧ c.C = C ∧ (∀ m, c.D m = 0) ∧ c.J = J := by + obtain ⟨ρ,hρ,hall⟩ := e.uniform_solvers_of_prefix_all_profiles hF hφ K hK + obtain ⟨C,J,hC,hJ,hsolve⟩ := hall R hR + exact ⟨ρ,C,J,hρ,hC,hJ,hsolve⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformRadiusAtlasIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformRadiusAtlasIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a8d9eb0244805342f1c27b85666e4db5d5cf4d8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UniformRadiusAtlasIncrement.lean @@ -0,0 +1,142 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FixedBallProfiledAtlasMean +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedAtlasPhases +import OAI.Geometry.SurfaceImmersion.Atlas.InputAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasPhaseMeanData + +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 uniformRadiusAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformRadiusAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformRadiusAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformRadiusAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformRadiusAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformRadiusAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_radius_atlas_increment + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {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))) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r₁ ≤ (Q i).Q j (A.tensorPlaneRead i reference x) ∧ + (Q i).Q j (A.tensorPlaneRead i reference x) ≤ R - ‖(Q i).Q j‖*r₁) + (hImmQ : ∀ 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)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + : ∃ 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ 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 + classical + obtain ⟨ρd,hρd,halldata⟩ := A.uniform_atlas_phase_mean_data_all_profiles F hF Q w hw Ω U K + hΩ hU hK hUK hKΩ hImm hgood hsupport U₀ hU₀ K₀ hU₀K hSU₀ + (fun i => A.tensorPlaneRead i reference) hmargin + obtain ⟨ρs,hρs,hallsmall⟩ := A.input_atlas_small_increment_fixed_phase F hF + (A.linearAtlasPhase Q w) (A.linearAtlasPhase_smooth Q w) hImmQ hgoodQ + let r := A.tensorTrialRadius r₁ + let D₀ := A.tensorReadBallConstant + have hr : 0 < r := A.tensorTrialRadius_pos hr₁ + have hDr : D₀*r ≤ r₁ := A.tensorTrialRadius_margin hr₁.le + refine ⟨r,min ρd ρs,hr,lt_min hρd hρs,?_⟩ + intro P hP q C hC + obtain ⟨p,hdata⟩ := halldata P hP + obtain ⟨_,_,_,β,κ,hmean⟩ := A.profiled_atlas_adjusted_mean_fixed_ball + p hr₁ hρ reference href Q w hw q + let L := Finset.univ.sup (fun _ : A.centers => + tensorOrder emptyMetricPolynomial+1+(q+1)*(tensorOrder emptyMetricPolynomial+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,hB,hT,hsmall⟩ := hallsmall p hρ (fun _ => D₀*r) + (fun i => A.tensorPlaneRead i reference) P hP Cu E hCu hE q + obtain ⟨η₀,hη₀,hη₁,hmeanUniform⟩ := hmean C hC q + refine ⟨η₀,B,T,hη₀,hη₁,hB,hT,?_⟩ + intro G hG b hb hbρ hclose s hs hs1 hp H hH hsym hnear hbC τ δ hτ hτs hη hδ hδτ + obtain ⟨d,hfit,hmap,hphase,hsupport',hlinear,hcut,hform,hsup⟩ := + hdata G hG b hb (hbρ.trans_le (min_le_left _ _)) hclose s hs hs1 hp τ (D₀*r) hDr + have hphaseGlobal (a : A.centers × Fin 3) : + A.freeGlobalPhase d a.1 a.2 = A.linearAtlasPhase Q w a := by + unfold freeGlobalPhase linearAtlasPhase + rw [hphase a.1] + have hK' (i j) : (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + rw [hsupport' i] + obtain ⟨u,hu,_,_,hball,hsize,herror⟩ := hmeanUniform s hs hs1 H hH hsym hnear hbC + 0 τ hτ hτs (le_refl 0) (by norm_num) + (by simpa only [zero_div,add_zero] using hη) d hfit hlinear hcut hform hsup δ hδ q le_rfl + have hbu (m) : A.TensorWeightedBound s m (Cu m) u := + fun i => (hsize m i).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 i + have hh := (herror m i).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ρ.trans_le (min_le_right _ _)) hclose d hfit hphaseGlobal + hmap hτ hs hτs hs1 hp 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/Atlas/UnorderedPairChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UnorderedPairChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a0ac73fb758b5d8f39af463863528b950ae5d8c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/UnorderedPairChart.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.UnorderedSurfacePairs + +namespace OAI + +/-! Away from the diagonal the quotient by interchanging the two points +is locally a homeomorphism, using disjoint coordinate neighborhoods. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem unordered_pair_local_chart {M : Type*} [TopologicalSpace M] [T2Space M] + (p q : M) (hpq : p ≠ q) : + ∃ e : OpenPartialHomeomorph (M × M) (UnorderedSurfacePairs M), + (p,q) ∈ e.source ∧ (∀ z, e z = unorderedPair z) ∧ + ∀ z ∈ e.source, z.1 ≠ z.2 := by + have : Nonempty (M × M) := ⟨(p,q)⟩ + obtain ⟨U,V,hU,hV,hp,hq,hd⟩ := t2_separation hpq + let E := (unorderedPair_injOn_product hd).toPartialEquiv unorderedPair (U ×ˢ V) + let e := OpenPartialHomeomorph.ofContinuousOpen E unorderedPair_continuous.continuousOn + unorderedPair_isOpenMap (hU.prod hV) + refine ⟨e,⟨hp,hq⟩,(fun _ => rfl),?_⟩ + intro z hz heq + exact Set.disjoint_left.mp hd hz.1 (heq ▸ hz.2) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/VectorChartRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/VectorChartRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..64490e380d8b1dbf194c58ff71793528e96bebf5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/VectorChartRead.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.SurfaceImmersion.Geometry.SupportJetEquality + +namespace OAI + +/-! Actual global smooth chart representatives. On the original phase +support they preserve every derivative, including at the support boundary. -/ +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 chartWeight_tsupport (i : A.centers) : + tsupport (A.chartWeight i) = (A.chartWeightCompact i : Set JetPolynomial.Base) := by + apply Subset.antisymm (A.supportedChartWeight i).tsupport_subset + rintro x ⟨p,hp,rfl⟩ + have hc : ContinuousAt (chart (i : M)) p := + ((chart (i : M)).continuousOn p (A.weight_support i hp)).continuousAt + ((chart (i : M)).open_source.mem_nhds (A.weight_support i hp)) + have hh := mem_closure_image hc hp + apply closure_mono _ hh + rintro y ⟨q,hq,rfl⟩ + change A.weight i q ≠ 0 at hq + have hs := A.weight_support i (subset_tsupport (A.weight i) hq) + change A.chartWeight i (chart (i : M) q) ≠ 0 + simpa only [chartWeight,indicator_of_mem ((chart (i : M)).map_source hs), + (chart (i : M)).left_inv hs] using hq + +def vectorChartRead (i : A.centers) (F : M → V) : JetPolynomial.Base → V := + localize (i : M) (A.outer i) F + +def vectorPlaneRead (i : A.centers) (F : M → V) : SmallModes.Base → V := + A.vectorChartRead i F ∘ planeCoordinateIsometry.symm + +lemma vectorChartRead_smooth (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) : ContDiff ℝ ∞ (A.vectorChartRead i F) := + localize_smooth (i : M) (A.outer_smooth i) (A.outer_support i) hF + +lemma vectorPlaneRead_smooth (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) : ContDiff ℝ ∞ (A.vectorPlaneRead i F) := + (A.vectorChartRead_smooth i hF).comp planeCoordinateIsometry.symm.contDiff + +lemma vectorChartRead_on_support (i : A.centers) (F : M → V) + {x : JetPolynomial.Base} (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + A.vectorChartRead i F x = F ((chart (i : M)).symm x) := by + obtain ⟨p,hp,rfl⟩ := hx + rw [vectorChartRead,localize_chart _ _ _ (A.weight_support i hp), A.outer_one i p hp, + (chart (i : M)).left_inv (A.weight_support i hp),one_pow,one_smul] + +lemma vectorChartRead_jets (i : A.centers) {F : M → V} + (hF : ContMDiff planeModel 𝓘(ℝ,V) ∞ F) (m : ℕ) + {x : JetPolynomial.Base} (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + iteratedFDeriv ℝ m (A.vectorChartRead i F) x = + iteratedFDeriv ℝ m (F ∘ (chart (i : M)).symm) x := by + have hk : tsupport (A.chartWeight i) ⊆ (chart (i : M)).target := by + rw [A.chartWeight_tsupport] + rintro y ⟨p,hp,rfl⟩ + exact (chart (i : M)).map_source (A.weight_support i hp) + have hg : ContDiffOn ℝ ∞ (F ∘ (chart (i : M)).symm) (chart (i : M)).target := + (hF.comp_contMDiffOn (chart_symm_smooth (i : M))).contDiffOn + apply iteratedFDeriv_eq_on_tsupport (A.chartWeight_smooth i).continuous + (chart (i : M)).open_target hk (A.vectorChartRead_smooth i hF).contDiffOn hg + (fun y hy => A.vectorChartRead_on_support i F (A.chartWeight_tsupport i ▸ hy)) m + rwa [A.chartWeight_tsupport] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedActualJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedActualJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..0b8208760e3946328a22773cb861bc6871ad187c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedActualJets.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetWordDecomposition + +namespace OAI + +/-! Actual jets have precisely one scale loss per derivative beyond the +controlled second jet, with no loss for their first two derivatives. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma norm_coordinateVector_le (v : Fin 2) : ‖coordinateVector v‖ ≤ 1 := by + apply (pi_norm_le_iff_of_nonneg zero_le_one).2 + intro i + by_cases h : i = v + · subst i + simp [coordinateVector] + · simp [coordinateVector, h] + +/-- A weighted bound on the second-jet map controls every actual higher jet. -/ +theorem weighted_actual_jet {U : Set Base} (hU : IsOpen U) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) {s B : ℝ} (hs : 0 < s) (hB : 0 ≤ B) + (m : ℕ) (w : List (Fin 2)) (a : Fin 4) + (hb : WeightedBound U s (m + (w.length - 2)) B (lowJet G)) : + WeightedBound U s m (B / s ^ (w.length - 2)) (jet G w a) := by + obtain ⟨v, i, hv, he⟩ := jet_as_lowJet_derivative w a + rw [he G] + have hQ := (lowJet_smooth hG).contDiffOn (s := U) + have hcomp := hb.component hU.uniqueDiffOn hs.le hB hQ (Sum.inr (i, a)) + have hf : ContDiffOn ℝ ∞ (fun p => lowJet G p (Sum.inr (i, a))) U := + (contDiff_pi.mp (lowJet_smooth hG) (Sum.inr (i, a))).contDiffOn + have hvnorm : ∀ x ∈ v.map coordinateVector, ‖x‖ ≤ 1 := by + intro x hx + obtain ⟨j, _, rfl⟩ := List.mem_map.mp hx + exact norm_coordinateVector_le j + have hcomp' : WeightedBound U s (m + (v.map coordinateVector).length) B + (fun p => lowJet G p (Sum.inr (i, a))) := by + simpa only [List.length_map, hv] using hcomp + have hd := hcomp'.iteratedDirectional hU hs hB hf (v.map coordinateVector) hvnorm m + simpa only [List.length_map, hv] using hd + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAngularJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAngularJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a2da07d82b3b9c46ef638e5042de3cdfdfdb744d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAngularJets.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.WeightedJetExpressions +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVector + +namespace OAI + +/-! Uniform spatial estimates after any fixed number of angular derivatives. +Angular differentiation does not increase the polynomial scale loss. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open LocalPeriodicExpansion WeightedEstimates + +namespace Expression + +def angles (e : Expression) : ℕ → Expression + | 0 => e + | k + 1 => (e.angles k).angle + +@[simp] lemma order_angles (e : Expression) (k : ℕ) : (e.angles k).order = e.order := by + induction k with + | zero => rfl + | succ k ih => simpa only [angles, order_angle] using ih + +@[simp] lemma loss_angles (e : Expression) (k : ℕ) : (e.angles k).loss = e.loss := by + induction k with + | zero => rfl + | succ k ih => simpa only [angles, loss_angle] using ih + +lemma smoothCoeffs_angles {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (k : ℕ) : (e.angles k).SmoothCoeffs O := by + induction k with + | zero => exact he + | succ k ih => exact smoothCoeffs_angle hO ih + +end Expression + +namespace VectorExpression + +def angles (R : VectorExpression) (k : ℕ) : VectorExpression := fun i => (R i).angles k + +def angularFamily {S : TopologicalSpace.Opens Base} (U : Family S R4) : ℕ → Family S R4 + | 0 => U + | k + 1 => (angularFamily U k).angle + +lemma represents_angles {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) + (hR : Represents G R U) (k : ℕ) : Represents G (R.angles k) (angularFamily U k) := by + induction k with + | zero => exact hR + | succ k ih => + exact represents_angle hO hQ (fun i => Expression.smoothCoeffs_angles hO (hRs i) k) ih + +/-- The constant may depend on the derivative orders, but the scale exponent +is unchanged by angular or spatial differentiation. -/ +theorem compact_angular_bound {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (R : VectorExpression) (hRs : R.SmoothCoeffs O) (i : Fin 4) (k m : ℕ) + (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s : ℝ), 0 < s → s ≤ 1 → + ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) S K → + WeightedBound S s (m + (R i).order) B (lowJet G) → + ∀ (U : Family S R4), Represents G R U → ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound S s m (D / s ^ (R i).loss) + (fun p => (angularFamily U k).val p (t : CovarianceCorrector.Period) i) := by + obtain ⟨D, hD, hd⟩ := Expression.compact_expression_bound S.isOpen hO hK hKO + ((R i).angles k) (Expression.smoothCoeffs_angles hO (hRs i) k) m B hB + refine ⟨D, hD, ?_⟩ + intro G s hs hs1 hG hGK hb U hR t ht + have hQ : Set.MapsTo (lowJet G) S O := fun _ hp => hKO (hGK hp) + have hrep := represents_angles hO hQ hRs hR k + have hb' : WeightedBound S s (m + ((R i).angles k).order) B (lowJet G) := by + simpa only [Expression.order_angles] using hb + have h := hd G s hs hs1 hG hGK hb' t ht + simp only [Expression.loss_angles] at h + exact h.congr (fun p hp => (hrep i p hp t).symm) + +end VectorExpression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAtlasPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAtlasPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3b1f122a3eeba25c95c1f4f1d08e088de65a18e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedAtlasPhases.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GlobalPhaseGerms +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothingLinearity + +namespace OAI + +/-! Frequency scaling of the actual smooth global atlas phases. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4 + +lemma phaseLinear_smul (c : ℝ) (ξ : SmallModes.Base) : + phaseLinear (c • ξ) = c • phaseLinear ξ := by + apply ContinuousLinearMap.ext + intro x + change phaseLinear (c • ξ) x = c * phaseLinear ξ x + simp only [phaseLinear_apply,Prod.smul_fst,Prod.smul_snd,smul_eq_mul] + ring + +namespace FiniteOrderSmoothing +open PhaseGeometry +open JetPolynomial (planeCoordinateIsometry) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma linearAtlasPhase_smooth (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.linearAtlasPhase Q w a) := + restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) + ((phaseLinear (w a.1 a.2 • (Q a.1).ξ a.2)).contDiff.comp planeCoordinateIsometry.contDiff) + +lemma linearAtlasPhase_smul_unit (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) : + A.linearAtlasPhase Q w a = w a.1 a.2 • A.linearAtlasPhase Q (fun _ _ => 1) a := by + unfold linearAtlasPhase + simp only [one_smul] + have he : phaseLinear (w a.1 a.2 • (Q a.1).ξ a.2) ∘ planeCoordinateIsometry = + w a.1 a.2 • (phaseLinear ((Q a.1).ξ a.2) ∘ planeCoordinateIsometry) := by + funext x + rw [phaseLinear_smul] + rfl + rw [he,restore_smul] + +lemma vectorPlaneRead_real_smul {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + (k : A.centers) (c : ℝ) (F : M → V) : + A.vectorPlaneRead k (c • F) = c • A.vectorPlaneRead k F := by + funext x + change localize (k : M) (A.outer k) (c • F) (planeCoordinateIsometry.symm x) = _ + rw [localize_smul] + rfl + +variable [CompactSpace M] + +/-- Frequency weights scale the read phase derivative everywhere, not +just on the compact supports used to establish good geometry. -/ +lemma linearAtlasPhase_read_derivative_smul_unit (Q : A.centers → PhaseBasis) + (w : A.centers → Fin 3 → ℝ) (a : A.centers × Fin 3) (k : A.centers) + (x : SmallModes.Base) : + phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q w a)) x = + w a.1 a.2 • + phaseDerivative (A.vectorPlaneRead k (A.linearAtlasPhase Q (fun _ _ => 1) a)) x := by + rw [A.linearAtlasPhase_smul_unit Q w a,A.vectorPlaneRead_real_smul] + exact phaseDerivative_const_smul + ((A.vectorPlaneRead_smooth k (A.linearAtlasPhase_smooth Q (fun _ _ => 1) a)).differentiable + (by simp) x) _ + +end SmoothingAtlas +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedCoefficientVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedCoefficientVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d079715f2b847d1c7f6f8f38f57402d9e6bfd370 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedCoefficientVariation.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVariation +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedLowCoefficients + +namespace OAI + +/-! A low-jet coefficient variation is linear in the varied map and loses +only the two derivatives in its second jet. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +theorem compact_low_coefficient_vector {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + {c : LowJet × ℝ → E} (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (Q : Base → LowJet) (s : ℝ), 0 < s → + ContDiffOn ℝ ∞ Q U → Set.MapsTo Q U K → WeightedBound U s m B Q → + ∀ t ∈ Set.Icc (0 : ℝ) 1, WeightedBound U s m D (fun p => c (Q p, t)) := by + have hsub : K ×ˢ Set.Icc (0 : ℝ) 1 ⊆ O ×ˢ Set.univ := + fun _ hz => ⟨hKO hz.1, Set.mem_univ _⟩ + obtain ⟨D, hD, hb⟩ := smooth_compact_weighted_bound hU.uniqueDiffOn + (hO.prod isOpen_univ).uniqueDiffOn (hK.prod isCompact_Icc) hsub hc m + refine ⟨(m.factorial : ℝ) * D * (2 * B) ^ m, by positivity, ?_⟩ + intro Q s hs hQ hQK hQB t ht + exact hb (fun p => (Q p, t)) s (2 * B) hs (by linarith) + (hQ.prodMk contDiffOn_const) (fun p hp => ⟨hQK hp, ht⟩) + (weighted_lowJet_pair hU hQ hs hB m hQB ht) + +theorem compact_coefficient_variation {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + {c : LowJet × ℝ → ℝ} (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G H : Base → Space) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → + Set.MapsTo (lowJet G) U K → WeightedBound U s m B (lowJet G) → + WeightedBound U s (m + 2) C H → ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D * C / s ^ 2) + (fun p => fderiv ℝ c (lowJet G p, t) (variationLowJet H p, 0)) := by + have hdc : ContDiffOn ℝ ∞ (fderiv ℝ c) (O ×ˢ Set.univ) := + hc.fderiv_of_isOpen (hO.prod isOpen_univ) (m := ∞) (by simp) + obtain ⟨D, hD, hb⟩ := compact_low_coefficient_vector hU hO hK hKO hdc m B hB + refine ⟨2 ^ m * D, by positivity, ?_⟩ + intro G H s C hs hs1 hC hG hH hGK hGb hHb t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have hdb := hb (lowJet G) s hs (lowJet_smooth hG).contDiffOn hGK hGb t ht + have hvb := weighted_variationLowJet hU hH hs hs1 hC m hHb + have hpair : WeightedBound U s m (C / s ^ 2) + (fun p => (variationLowJet H p, (0 : ℝ))) := by + simpa only [ContinuousLinearMap.norm_inl, one_mul, Function.comp_def, + ContinuousLinearMap.inl_apply] using + hvb.linear hU.uniqueDiffOn hs.le (variationLowJet_smooth hH).contDiffOn + (ContinuousLinearMap.inl ℝ LowJet ℝ) + have hds : ContDiffOn ℝ ∞ (fun p => fderiv ℝ c (lowJet G p, t)) U := + hdc.comp ((lowJet_smooth hG).contDiffOn.prodMk contDiffOn_const) + (fun p hp => ⟨hQ hp, Set.mem_univ t⟩) + have hvar := hdb.clm_apply hU.uniqueDiffOn hs.le hD (div_nonneg hC (sq_nonneg s)) hds + ((variationLowJet_smooth hH).contDiffOn.prodMk contDiffOn_const) hpair + convert hvar using 1 + ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedComplexMixedJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedComplexMixedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..9fcb8c7fd9407614cbd0ab8b1e09fe50eb3f818c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedComplexMixedJets.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexMixedJets +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedCoefficientVariation + +namespace OAI + +/-! Two-scale evaluation: the output is measured at the slow scale, while +only the explicit jet excess contributes short-scale loss. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression +open WeightedEstimates + +def slotLoss (i : Fin 4) (w : List (Fin 2)) : ℕ := + if i = 0 then w.length - 2 else w.length + +theorem compact_complex_mixed_bound {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : MixedExpression) (he : e.SmoothCoeffs O) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (J : JetData) (s τ : ℝ), + 0 < s → 0 < τ → τ ≤ 1 → ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) U K → + WeightedBound U s m B (lowJet G) → + (∀ i w a, ContDiffOn ℝ ∞ (J i w a) U) → + (∀ i w a, w.length ≤ e.order → + WeightedBound U s m (B / τ ^ slotLoss i w) (J i w a)) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D / τ ^ e.loss) (fun p => e.evalComplex G J (p, t)) := by + induction e with + | coeff c => + have hc := Complex.ofRealCLM.contDiff.comp_contDiffOn he + obtain ⟨D, hD, hd⟩ := compact_low_coefficient_vector hU hO hK hKO hc m B hB + refine ⟨D, hD, ?_⟩ + intro G J s τ hs _ _ hG hGK hb _ _ t ht + simpa only [loss, pow_zero, div_one, evalComplex, Function.comp_def, + Complex.ofRealCLM_apply] using hd (lowJet G) s hs (lowJet_smooth hG).contDiffOn hGK hb t ht + | atom i w a e ih => + obtain ⟨D, hD, hd⟩ := ih he + refine ⟨2 ^ m * B * D, by positivity, ?_⟩ + intro G J s τ hs hτ hτ1 hG hGK hb hJ hJB t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have htBound := hd G J s τ hs hτ hτ1 hG hGK hb hJ + (fun j v b hv => hJB j v b (hv.trans (le_max_right _ _))) t ht + have hjBound := hJB i w a (le_max_left _ _) + have hp := hjBound.mul hU.uniqueDiffOn hs.le (by positivity) (by positivity) + (hJ i w a) (evalComplex_parameter_smooth hG hQ hJ (e := e) he t) htBound + convert hp using 1 <;> first | rfl | simp only [loss, slotLoss, pow_add]; ring + | add e f ihe ihf => + obtain ⟨D, hD, hd⟩ := ihe he.1 + obtain ⟨C, hC, hc⟩ := ihf he.2 + refine ⟨D + C, add_nonneg hD hC, ?_⟩ + intro G J s τ hs hτ hτ1 hG hGK hb hJ hJB t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have hd' := hd G J s τ hs hτ hτ1 hG hGK hb hJ + (fun i w a hw => hJB i w a (hw.trans (le_max_left _ _))) t ht + have hc' := hc G J s τ hs hτ hτ1 hG hGK hb hJ + (fun i w a hw => hJB i w a (hw.trans (le_max_right _ _))) t ht + have hd'' : WeightedBound U s m (D / τ ^ max e.loss f.loss) + (fun p => e.evalComplex G J (p, t)) := + hd'.mono_const (div_le_div_of_nonneg_left hD (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le hτ1 (le_max_left _ _))) + have hc'' : WeightedBound U s m (C / τ ^ max e.loss f.loss) + (fun p => f.evalComplex G J (p, t)) := + hc'.mono_const (div_le_div_of_nonneg_left hC (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le hτ1 (le_max_right _ _))) + simpa only [loss, add_div, evalComplex] using hd''.add hU.uniqueDiffOn hs.le + (evalComplex_parameter_smooth hG hQ hJ (e := e) he.1 t) + (evalComplex_parameter_smooth hG hQ hJ (e := f) he.2 t) hc'' + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseJacobian.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseJacobian.lean new file mode 100644 index 0000000000000000000000000000000000000000..1e9ed9fea0ee94255fa84812361b091ffa07c35d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseJacobian.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneAdjugate +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedReciprocal +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! Explicit polynomial bounds for the inverse Jacobian field in dimension two. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +def inverseJacobianField (A : Base → Base →L[ℝ] Base) (x : Base) : Base →L[ℝ] Base := + (coordDet (A x))⁻¹ • planeAdjugate (A x) + +lemma contDiffOn_coordDet {U : Set Base} {A : Base → Base →L[ℝ] Base} + (hA : ContDiffOn ℝ ∞ A U) : ContDiffOn ℝ ∞ (fun x => coordDet (A x)) U := by + have hx : ContDiffOn ℝ ∞ (fun x => A x dx) U := hA.clm_apply contDiffOn_const + have hy : ContDiffOn ℝ ∞ (fun x => A x dy) U := hA.clm_apply contDiffOn_const + exact (hx.fst.mul hy.snd).sub (hx.snd.mul hy.fst) + +lemma contDiffOn_inverseJacobianField {U : Set Base} {A : Base → Base →L[ℝ] Base} + (hA : ContDiffOn ℝ ∞ A U) (hne : ∀ x ∈ U, coordDet (A x) ≠ 0) : + ContDiffOn ℝ ∞ (inverseJacobianField A) U := + ((contDiffOn_coordDet hA).inv hne).smul + (planeAdjugateOperator.contDiff.comp_contDiffOn hA) + +lemma weighted_coordDet {U : Set Base} (hU : UniqueDiffOn ℝ U) + {A : Base → Base →L[ℝ] Base} (hA : ContDiffOn ℝ ∞ A U) + {s C : ℝ} {m : ℕ} (hs : 0 ≤ s) (hC : 0 ≤ C) + (hb : WeightedBound U s m C A) : + WeightedBound U s m (2^(m+1)*C^2) (fun x => coordDet (A x)) := by + have he (v : Base) (hv : ‖v‖ ≤ 1) (π : Base →L[ℝ] ℝ) (hπ : ‖π‖ ≤ 1) : + WeightedBound U s m C (fun x => π (A x v)) := by + have hh := (hb.clm_apply_const hU hs hA v).linear hU hs + (hA.clm_apply contDiffOn_const) π + apply hh.mono_const + calc + ‖π‖*(‖v‖*C) ≤ 1*(1*C) := by gcongr + _ = C := by ring + have hdx : ‖dx‖ ≤ (1 : ℝ) := by simp [dx] + have hdy : ‖dy‖ ≤ (1 : ℝ) := by simp [dy] + have ha := he dx hdx (ContinuousLinearMap.fst ℝ ℝ ℝ) (ContinuousLinearMap.norm_fst_le ..) + have hb' := he dy hdy (ContinuousLinearMap.fst ℝ ℝ ℝ) (ContinuousLinearMap.norm_fst_le ..) + have hc := he dx hdx (ContinuousLinearMap.snd ℝ ℝ ℝ) (ContinuousLinearMap.norm_snd_le ..) + have hd := he dy hdy (ContinuousLinearMap.snd ℝ ℝ ℝ) (ContinuousLinearMap.norm_snd_le ..) + have hx : ContDiffOn ℝ ∞ (fun x => A x dx) U := hA.clm_apply contDiffOn_const + have hy : ContDiffOn ℝ ∞ (fun x => A x dy) U := hA.clm_apply contDiffOn_const + have had := ha.mul_real hU hs hC hC hx.fst hy.snd hd + have hcb := hc.mul_real hU hs hC hC hx.snd hy.fst hb' + have hh := had.sub hU hs (hx.fst.mul hy.snd) (hx.snd.mul hy.fst) hcb + convert hh using 1 + · rw [pow_succ] + ring + · rfl + +def inverseJacobianBudget (m : ℕ) (C K : ℝ) : ℝ := + 2^m*((m.factorial : ℝ)^2*K^(m+1)*(1+2^(m+1)*C^2)^m)*(2*C) + +theorem weighted_inverseJacobianField {U : Set Base} (hU : UniqueDiffOn ℝ U) + {A : Base → Base →L[ℝ] Base} (hA : ContDiffOn ℝ ∞ A U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + (hb : WeightedBound U s m C A) + (hne : ∀ x ∈ U, coordDet (A x) ≠ 0) + (hinv : ∀ x ∈ U, ‖(coordDet (A x))⁻¹‖ ≤ K) : + WeightedBound U s m (inverseJacobianBudget m C K) (inverseJacobianField A) := by + have hC0 := zero_le_one.trans hC + have hd := weighted_coordDet hU hA hs.le hC0 hb + have hD : 0 ≤ 2^(m+1)*C^2 := by positivity + have hd' := hd.mono_const (le_add_of_nonneg_left zero_le_one) + have hi := hd'.inv_real hU hs (by linarith : 1 ≤ 1+2^(m+1)*C^2) hK + (contDiffOn_coordDet hA) hne hinv + have ha := (hb.linear hU hs.le hA planeAdjugateOperator).mono_const + (mul_le_mul_of_nonneg_right planeAdjugateOperator_norm_le hC0) + exact hi.smul_real hU hs.le (by positivity) (by positivity) + ((contDiffOn_coordDet hA).inv hne) (planeAdjugateOperator.contDiff.comp_contDiffOn hA) ha + +lemma inverseJacobianBudget_polynomial (m : ℕ) (C K : ℝ → ℝ) + (hC : HasPolynomialBound C) (hK : HasPolynomialBound K) : + HasPolynomialBound (fun x => inverseJacobianBudget m (C x) (K x)) := by + unfold inverseJacobianBudget + repeat first + | exact hC + | exact hK + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseSqrt.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseSqrt.lean new file mode 100644 index 0000000000000000000000000000000000000000..69576fc10917d239f64e8ab94ab575826ccb9bfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedInverseSqrt.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedReciprocal + +namespace OAI + +/-! Polynomial weighted bounds for normalization by a positive square root. -/ +noncomputable section +open Set Polynomial +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.WeightedEstimates + +lemma norm_iteratedFDerivWithin_inverse_half (j : ℕ) {x : ℝ} (hx : 0 < x) : + ‖iteratedFDerivWithin ℝ j (fun y : ℝ => y^(-1/2 : ℝ)) (Ioi 0) x‖ = + ‖(descPochhammer ℝ j).eval (-1/2)‖*x^(-1/2-(j : ℝ)) := by + rw [norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin, + iteratedDerivWithin_of_isOpen_eq_iterate isOpen_Ioi hx,Real.iter_deriv_rpow_const] + simp only [norm_mul,Real.norm_eq_abs,abs_of_pos (Real.rpow_pos_of_pos hx _)] + +lemma inverse_half_power_bound {x K : ℝ} (hx : 0 < x) (hK : 1 ≤ K) + (hi : x⁻¹ ≤ K) {j m : ℕ} (hj : j ≤ m) : + x^(-1/2-(j : ℝ)) ≤ K^(m+1) := by + have he : x^(-1/2-(j : ℝ)) = (x⁻¹)^((j : ℝ)+1/2) := by + rw [← Real.rpow_neg_one x,← Real.rpow_mul hx.le] + congr 1 + ring + rw [he] + have hj0 : 0 ≤ (j : ℝ)+1/2 := by positivity + calc + (x⁻¹)^((j : ℝ)+1/2) ≤ K^((j : ℝ)+1/2) := + Real.rpow_le_rpow (inv_nonneg.mpr hx.le) hi hj0 + _ ≤ K^((m+1 : ℕ) : ℝ) := Real.rpow_le_rpow_of_exponent_le hK (by + have hj' : (j : ℝ) ≤ m := by exact_mod_cast hj + push_cast + linarith) + _ = K^(m+1) := Real.rpow_natCast _ _ + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem weighted_inverse_sqrt (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ {U : Set E}, UniqueDiffOn ℝ U → + ∀ {s C K : ℝ} {f : E → ℝ}, 0 < s → 1 ≤ C → 1 ≤ K → + ContDiffOn ℝ ∞ f U → (∀ x ∈ U, 0 < f x) → + (∀ x ∈ U, (f x)⁻¹ ≤ K) → WeightedBound U s m C f → + WeightedBound U s m ((m.factorial : ℝ)*D*K^(m+1)*C^m) + (fun x => (Real.sqrt (f x))⁻¹) := by + let D : ℝ := 1+∑ j ∈ Finset.range (m+1), ‖(descPochhammer ℝ j).eval (-1/2)‖ + have hD : 1 ≤ D := by + have hh : 0 ≤ ∑ j ∈ Finset.range (m+1), ‖(descPochhammer ℝ j).eval (-1/2)‖ := + Finset.sum_nonneg (fun _ _ => norm_nonneg _) + dsimp only [D] + linarith + have hDj {j : ℕ} (hj : j ≤ m) : ‖(descPochhammer ℝ j).eval (-1/2)‖ ≤ D := by + have hh := Finset.single_le_sum (fun i (_ : i ∈ Finset.range (m+1)) => + norm_nonneg ((descPochhammer ℝ i).eval (-1/2))) (Finset.mem_range.mpr (by omega : j < m+1)) + dsimp only [D] + linarith + refine ⟨D,hD,?_⟩ + intro U hU s C K f hs hC hK hf hpos hi hb + have hg : ContDiffOn ℝ ∞ (fun y : ℝ => y^(-1/2 : ℝ)) (Ioi 0) := by + intro x hx + exact (Real.contDiffAt_rpow_const_of_ne (ne_of_gt hx)).contDiffWithinAt + have hd : ∀ j ≤ m, ∀ x ∈ U, + ‖iteratedFDerivWithin ℝ j (fun y : ℝ => y^(-1/2 : ℝ)) (Ioi 0) (f x)‖ ≤ D*K^(m+1) := by + intro j hj x hx + rw [norm_iteratedFDerivWithin_inverse_half j (hpos x hx)] + exact mul_le_mul (hDj hj) (inverse_half_power_bound (hpos x hx) hK (hi x hx) hj) + (Real.rpow_nonneg (hpos x hx).le _) (zero_le_one.trans hD) + have hbound := hb.comp hU isOpen_Ioi.uniqueDiffOn hs hC (by positivity : 0 ≤ D*K^(m+1)) + hf hg hpos hd + have hbound' : WeightedBound U s m ((m.factorial : ℝ)*D*K^(m+1)*C^m) + ((fun y : ℝ => y^(-1/2 : ℝ)) ∘ f) := by + convert hbound using 1 + ring + apply hbound'.congr + intro x hx + simp only [Function.comp_apply,Real.sqrt_eq_rpow] + rw [show (-1/2 : ℝ) = -(1/2) by ring,Real.rpow_neg (hpos x hx).le] + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedLowCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedLowCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..125437596a26cc48fc1b18269b115e848db661ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedLowCoefficients.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedActualJets +import OAI.Geometry.SurfaceImmersion.Correction.HigherJetPolynomial + +namespace OAI + +/-! Uniform angular-slice estimates for smooth low-jet coefficients on a +compact admissible set. The angular parameter adds no scale loss. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma weighted_lowJet_pair {U : Set Base} (hU : IsOpen U) {Q : Base → LowJet} + (hQ : ContDiffOn ℝ ∞ Q U) {s B : ℝ} (hs : 0 < s) (hB : 1 ≤ B) (m : ℕ) + (hb : WeightedBound U s m B Q) {t : ℝ} (ht : t ∈ Set.Icc 0 1) : + WeightedBound U s m (2 * B) (fun p => (Q p, t)) := by + have hleft : WeightedBound U s m B (fun p => (Q p, (0 : ℝ))) := by + simpa only [ContinuousLinearMap.norm_inl, one_mul, Function.comp_def, + ContinuousLinearMap.inl_apply] using + hb.linear hU.uniqueDiffOn hs.le hQ (ContinuousLinearMap.inl ℝ LowJet ℝ) + have hc : ‖((0 : LowJet), t)‖ ≤ 1 := by + rw [Prod.norm_def, norm_zero, Real.norm_of_nonneg ht.1] + exact max_le (by norm_num) ht.2 + have hright : WeightedBound U s m 1 (fun _ : Base => ((0 : LowJet), t)) := + (weightedBound_const U s m ((0 : LowJet), t)).mono_const hc + have hsum := hleft.add hU.uniqueDiffOn hs.le (hQ.prodMk contDiffOn_const) contDiffOn_const hright + have hp : WeightedBound U s m (B + 1) (fun p => (Q p, t)) := by + simpa only [Prod.mk_add_mk, add_zero, zero_add] using hsum + exact hp.mono_const (by linarith) + +/-- The same constant controls every angular slice over the unit period. -/ +theorem compact_low_coefficient {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + {c : LowJet × ℝ → ℝ} (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (Q : Base → LowJet) (s : ℝ), 0 < s → + ContDiffOn ℝ ∞ Q U → Set.MapsTo Q U K → WeightedBound U s m B Q → + ∀ t ∈ Set.Icc (0 : ℝ) 1, WeightedBound U s m D (fun p => c (Q p, t)) := by + have hcompact : IsCompact (K ×ˢ Set.Icc (0 : ℝ) 1) := hK.prod isCompact_Icc + have hsub : K ×ˢ Set.Icc (0 : ℝ) 1 ⊆ O ×ˢ Set.univ := + fun _ hz => ⟨hKO hz.1, Set.mem_univ _⟩ + obtain ⟨D, hD, hb⟩ := smooth_compact_weighted_bound hU.uniqueDiffOn + (hO.prod isOpen_univ).uniqueDiffOn hcompact hsub hc m + refine ⟨(m.factorial : ℝ) * D * (2 * B) ^ m, by positivity, ?_⟩ + intro Q s hs hQ hQK hQB t ht + exact hb (fun p => (Q p, t)) s (2 * B) hs (by linarith) + (hQ.prodMk contDiffOn_const) (fun p hp => ⟨hQK hp, ht⟩) + (weighted_lowJet_pair hU hQ hs hB m hQB ht) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMixedJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMixedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..7378261ddf01d0d1c0b0a176db524bfd554b9656 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMixedJets.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetRegularity +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialVariation + +namespace OAI + +/-! Uniform mixed-variation bounds with the sharp excess-jet scale loss. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression +open WeightedEstimates + +/-- Unit weighted bounds on the direction maps cost their full jet orders; +the base map costs only the order beyond its controlled second jet. -/ +theorem compact_mixed_bound {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : MixedExpression) (he : e.SmoothCoeffs O) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Fin 4 → Base → Space) (s : ℝ), 0 < s → s ≤ 1 → + (∀ i, ContDiff ℝ ∞ (G i)) → Set.MapsTo (lowJet (G 0)) U K → + WeightedBound U s (m + e.order) B (lowJet (G 0)) → + (∀ i : Fin 3, WeightedBound U s (m + e.order) 1 (G i.succ)) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D / s ^ e.loss) (fun p => e.eval G (p, t)) := by + induction e with + | coeff c => + obtain ⟨D, hD, hd⟩ := compact_low_coefficient hU hO hK hKO he m B hB + refine ⟨D, hD, ?_⟩ + intro G s hs _ hG hGK hb _ t ht + simpa only [loss, pow_zero, div_one, eval] using + hd (lowJet (G 0)) s hs (lowJet_smooth (hG 0)).contDiffOn hGK + (hb.mono_order (by omega)) t ht + | atom i w a e ih => + obtain ⟨D, hD, hd⟩ := ih he + refine ⟨2 ^ m * B * D, by positivity, ?_⟩ + intro G s hs hs1 hG hGK hb hv t ht + have hQ : Set.MapsTo (lowJet (G 0)) U O := fun _ hp => hKO (hGK hp) + have htail := hd G s hs hs1 hG hGK + (hb.mono_order (by simp only [order]; omega)) + (fun j => (hv j).mono_order (by simp only [order]; omega)) t ht + have hj : WeightedBound U s m + (B / s ^ (if i = 0 then w.length - 2 else w.length)) (jet (G i) w a) := by + by_cases hi : i = 0 + · subst i + simp only [↓reduceIte] + exact weighted_actual_jet hU (hG 0) hs (zero_le_one.trans hB) m w a + (hb.mono_order (by simp only [order]; omega)) + · let j : Fin 3 := i.pred hi + have hij : i = j.succ := (Fin.succ_pred i hi).symm + rw [hij] + simp only [Fin.succ_ne_zero, ↓reduceIte] + exact (weighted_plain_jet hU (hG j.succ) hs zero_le_one m w a + ((hv j).mono_order (by simp only [order]; omega))).mono_const + (div_le_div_of_nonneg_right hB (pow_nonneg hs.le _)) + have hp := hj.mul_real hU.uniqueDiffOn hs.le (by positivity) (by positivity) + (jet_smooth (hG i) w a).contDiffOn (parameter_smooth hG hQ (e := e) he t) htail + convert hp using 1 <;> first | rfl | simp only [loss, pow_add]; ring + | add e f ihe ihf => + obtain ⟨D, hD, hd⟩ := ihe he.1 + obtain ⟨C, hC, hc⟩ := ihf he.2 + refine ⟨D + C, add_nonneg hD hC, ?_⟩ + intro G s hs hs1 hG hGK hb hv t ht + have hQ : Set.MapsTo (lowJet (G 0)) U O := fun _ hp => hKO (hGK hp) + have hd' := hd G s hs hs1 hG hGK (hb.mono_order (by simp only [order]; omega)) + (fun j => (hv j).mono_order (by simp only [order]; omega)) t ht + have hc' := hc G s hs hs1 hG hGK (hb.mono_order (by simp only [order]; omega)) + (fun j => (hv j).mono_order (by simp only [order]; omega)) t ht + have hd'' : WeightedBound U s m (D / s ^ max e.loss f.loss) (fun p => e.eval G (p, t)) := + hd'.mono_const (div_le_div_of_nonneg_left hD (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_left _ _))) + have hc'' : WeightedBound U s m (C / s ^ max e.loss f.loss) (fun p => f.eval G (p, t)) := + hc'.mono_const (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_right _ _))) + simpa only [loss, add_div, eval] using hd''.add hU.uniqueDiffOn hs.le + (parameter_smooth hG hQ (e := e) he.1 t) (parameter_smooth hG hQ (e := f) he.2 t) hc'' + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedModulatedJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedModulatedJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..47d2bfe1a46463f8d6064c1eb11175aecc0f9e3f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedModulatedJets.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ModulatedJets + +namespace OAI + +/-! Slow-scale bounds on the amplitudes of fast oscillatory jets. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.ModulatedJets +open WeightedEstimates + +lemma weighted_complexify {U : Set Base} (hU : UniqueDiffOn ℝ U) + {f : Base → ℝ} {s C : ℝ} {m : ℕ} (hs : 0 ≤ s) (hC : 0 ≤ C) + (hf : ContDiffOn ℝ ∞ f U) (hb : WeightedBound U s m C f) : + WeightedBound U s m C (fun p => (f p : ℂ)) := by + have hh := hb.linear hU hs hf Complex.ofRealCLM + have hn : ‖Complex.ofRealCLM‖ ≤ 1 := by + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro x + simp + simpa only [Function.comp_def, Complex.ofRealCLM_apply] using + hh.mono_const (mul_le_of_le_one_left hC hn) + +lemma weighted_amplitudeDerivative {U : Set Base} (hU : IsOpen U) + {φ : Base → ℝ} {Z : Base → ℂ} {τ s C P : ℝ} {m : ℕ} + (hτ : 0 < τ) (hs : 0 < s) (hτs : τ ≤ s) (hC : 0 ≤ C) (hP : 0 ≤ P) + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) + (hb : WeightedBound U s (m + 1) C Z) (v : Base) (hv : ‖v‖ ≤ 1) + (hp : WeightedBound U s m P (fun p => fderiv ℝ φ p v)) : + WeightedBound U s m ((1 + 2 ^ m * P) * C / τ) (amplitudeDerivative τ φ v Z) := by + have hd := (hb.directional hU hs hZ.contDiffOn v).mono_const + (mul_le_of_le_one_left (div_nonneg hC hs.le) hv) + have hd' := hd.mono_const (div_le_div_of_nonneg_left hC hτ hτs) + have hds : ContDiff ℝ ∞ (fun p => fderiv ℝ φ p v) := + (hφ.fderiv_right (m := ∞) (by simp)).clm_apply (contDiff_const (c := v)) + have hc := weighted_complexify hU.uniqueDiffOn hs.le hP hds.contDiffOn hp + have hcs := Complex.ofRealCLM.contDiff.comp hds + have hc' := hc.const_mul hU.uniqueDiffOn hcs.contDiffOn (Complex.I / (τ : ℂ)) + have hn : ‖Complex.I / (τ : ℂ)‖ = 1 / τ := by + simp [Complex.norm_I, Complex.norm_real, Real.norm_of_nonneg hτ.le] + rw [hn] at hc' + have hcm := (contDiff_const (c := Complex.I / (τ : ℂ))).mul hcs + have hz := hc'.mul hU.uniqueDiffOn hs.le (by positivity) hC hcm.contDiffOn hZ.contDiffOn + (hb.mono_order (Nat.le_succ m)) + have ha := hd'.add hU.uniqueDiffOn hs.le + ((hZ.fderiv_right (m := ∞) (by simp)).clm_apply (contDiff_const (c := v))).contDiffOn + (hcm.mul hZ).contDiffOn hz + convert ha using 1 <;> first | rfl | ring + +def jetConstant (P : ℝ) : ℕ → ℕ → ℝ + | _, 0 => 1 + | m, r + 1 => (1 + 2 ^ m * P) * jetConstant P (m + 1) r + +lemma jetConstant_nonneg {P : ℝ} (hP : 0 ≤ P) (m r : ℕ) : 0 ≤ jetConstant P m r := by + induction r generalizing m with + | zero => exact zero_le_one + | succ r ih => exact mul_nonneg (by positivity) (ih (m + 1)) + +/-- Output derivatives remain at the slow scale. Only the length of the jet +word contributes short-scale powers. -/ +theorem weighted_amplitudeJet {U : Set Base} (hU : IsOpen U) + {φ : Base → ℝ} {Z : Base → ℂ} {τ s C P : ℝ} + (hτ : 0 < τ) (hs : 0 < s) (hτs : τ ≤ s) (hC : 0 ≤ C) (hP : 0 ≤ P) + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) (w : List Base) + (hw : ∀ v ∈ w, ‖v‖ ≤ 1) (m : ℕ) + (hb : WeightedBound U s (m + w.length) C Z) + (hp : ∀ v ∈ w, WeightedBound U s (m + w.length) P (fun p => fderiv ℝ φ p v)) : + WeightedBound U s m (jetConstant P m w.length * C / τ ^ w.length) + (amplitudeJet τ φ w Z) := by + induction w generalizing m with + | nil => simpa only [amplitudeJet, List.length_nil, Nat.add_zero, jetConstant, one_mul, pow_zero, div_one] using hb + | cons v w ih => + have hlen : m + (v :: w).length = (m + 1) + w.length := by simp; omega + have hb' := ih (fun x hx => hw x (List.mem_cons_of_mem _ hx)) (m + 1) + (hlen ▸ hb) (fun x hx => hlen ▸ hp x (List.mem_cons_of_mem _ hx)) + have hd := weighted_amplitudeDerivative hU hτ hs hτs + (div_nonneg (mul_nonneg (jetConstant_nonneg hP _ _) hC) (pow_nonneg hτ.le _)) hP + hφ (amplitudeJet_smooth hφ hZ τ w) hb' v (hw v (List.mem_cons_self ..)) + ((hp v (List.mem_cons_self ..)).mono_order (by simp)) + convert hd using 1 + · simp only [List.length_cons, jetConstant, pow_succ] + ring + · rfl + +end ClosedSurfaceR4.JetPolynomial.ModulatedJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMultilinearVariations.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMultilinearVariations.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d45d7cc32d90b99312926ec77dad664f9ced6dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedMultilinearVariations.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationScaling + +namespace OAI + +/-! Product bounds for non-normalized variation maps. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression WeightedEstimates + +namespace MixedExpression + +lemma rescale_succ (G : Fin 4 → Base → Space) (c : Fin 3 → ℝ) (i : Fin 3) : + rescale G c i.succ = fun p => c i • G i.succ p := by + fin_cases i <;> rfl + +lemma rescale_inverse (G : Fin 4 → Base → Space) (C : Fin 3 → ℝ) + (hC : ∀ i, C i ≠ 0) : rescale (rescale G (fun i => (C i)⁻¹)) C = G := by + funext i p + fin_cases i <;> simp [rescale, smul_smul, hC] + +end MixedExpression +namespace Expression + +/-- Bounds for the first three actual variations, linear in each participating +map bound and with a single accuracy-independent scale exponent. -/ +theorem compact_multilinear_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 : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Fin 4 → Base → Space) (s : ℝ) (C : Fin 3 → ℝ), + 0 < s → s ≤ 1 → (∀ i, 0 < C i) → + (∀ i, ContDiff ℝ ∞ (G i)) → Set.MapsTo (lowJet (G 0)) U K → + WeightedBound U s (m + e.order) B (lowJet (G 0)) → + (∀ i : Fin 3, WeightedBound U s (m + e.order) (C i) (G i.succ)) → + ∀ 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)) / + s ^ (e.loss + 6)) (fun p => (e.variations i).eval G (p, t)) := by + obtain ⟨D, hD, hb⟩ := e.compact_three_variation_bound hU hO hK hKO he m B hB + refine ⟨D, hD, ?_⟩ + intro G s C hs hs1 hC hG hGK hGb hHb t ht i + let H := rescale G (fun j => (C j)⁻¹) + have hH := rescale_smooth hG (fun j => (C j)⁻¹) + have hunit : ∀ j : Fin 3, WeightedBound U s (m + e.order) 1 (H j.succ) := by + intro j + have h := (hHb j).const_smul hU.uniqueDiffOn (hG j.succ).contDiffOn (C j)⁻¹ + simpa only [H, rescale_succ, abs_of_pos (inv_pos.mpr (hC j)), + inv_mul_cancel₀ (ne_of_gt (hC j))] using h + have hnorm := hb H s hs hs1 hH hGK hGb hunit 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 heval : (fun p => (e.variations i).eval G (p, t)) = + (fun p => W • (e.variations i).eval H (p, t)) := by + funext p + have hr := rescale_inverse G C (fun j => ne_of_gt (hC j)) + have hv := e.variations_rescale hH C (p, t) i + rw [hr] at hv + exact hv + rw [heval] + have hsmooth := MixedExpression.parameter_smooth hH + (fun p hp => hKO (hGK hp)) (e := e.variations i) (e.variations_smoothCoeffs hO he i) t + have h := hnorm.const_smul hU.uniqueDiffOn hsmooth W + convert h using 1 + rw [abs_of_pos hW] + ring + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedPhaseExpressions.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedPhaseExpressions.lean new file mode 100644 index 0000000000000000000000000000000000000000..12993f9de3b39bb50a771af124959173bfcc4738 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedPhaseExpressions.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Correction.WeightedJetExpressions + +namespace OAI + +/-! Two-scale estimates for the actual higher-jet expressions, with a varying +angular phase. The slow-jet loss is independent of the output derivative order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma weighted_pair {U : Set Base} (hU : IsOpen U) + {Q : Base → LowJet} {t : Base → ℝ} (hQ : ContDiffOn ℝ ∞ Q U) + (ht : ContDiffOn ℝ ∞ t U) {s B P : ℝ} {m : ℕ} (hs : 0 < s) + (hb : WeightedBound U s m B Q) (hp : WeightedBound U s m P t) : + WeightedBound U s m (B + P) (fun p => (Q p, t p)) := by + have hleft := hb.linear hU.uniqueDiffOn hs.le hQ (ContinuousLinearMap.inl ℝ LowJet ℝ) + have hright := hp.linear hU.uniqueDiffOn hs.le ht (ContinuousLinearMap.inr ℝ LowJet ℝ) + simp only [ContinuousLinearMap.norm_inl, ContinuousLinearMap.norm_inr, one_mul, + Function.comp_def, ContinuousLinearMap.inl_apply, ContinuousLinearMap.inr_apply] at hleft hright + simpa only [Prod.mk_add_mk, add_zero, zero_add] using + hleft.add hU.uniqueDiffOn hs.le (hQ.prodMk contDiffOn_const) + (contDiffOn_const.prodMk ht) hright + +namespace Expression + +lemma phase_smooth {O : Set LowJet} {U : Set Base} {G : Base → Space} {t : Base → ℝ} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (ht : ContDiffOn ℝ ∞ t U) {e : Expression} (he : e.SmoothCoeffs O) : + ContDiffOn ℝ ∞ (fun p => e.eval G (p, t p)) U := + (eval_smooth hG hQ he).comp (contDiffOn_id.prodMk ht) + (fun _ hp => ⟨hp, Set.mem_univ _⟩) + +/-- The constant is uniform over the open spatial domain and the phase. +The two scales are kept separate: differentiation is weighted at `τ`, whereas +higher jets only cost powers of the slower scale `s`. -/ +theorem compact_phase_bound {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (e : Expression) (he : e.SmoothCoeffs O) (m : ℕ) + (B P : ℝ) (hB : 1 ≤ B) (hP : 1 ≤ P) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (U : Set Base), IsOpen U → + ∀ (G : Base → Space) (t : Base → ℝ) (s τ : ℝ), + 0 < τ → τ ≤ s → s ≤ 1 → ContDiff ℝ ∞ G → + ContDiffOn ℝ ∞ t U → Set.MapsTo (lowJet G) U K → + Set.MapsTo t U (Set.Icc (-1) 2) → + WeightedBound U s (m + e.order) B (lowJet G) → + WeightedBound U τ m P t → + WeightedBound U τ m (D / s ^ e.loss) (fun p => e.eval G (p, t p)) := by + induction e with + | coeff c => + have hcompact : IsCompact (K ×ˢ Set.Icc (-1 : ℝ) 2) := hK.prod isCompact_Icc + have hsub : K ×ˢ Set.Icc (-1 : ℝ) 2 ⊆ O ×ˢ Set.univ := + fun _ hz => ⟨hKO hz.1, Set.mem_univ _⟩ + obtain ⟨D, hD, hd⟩ := compact_coefficient_bound + (hO.prod isOpen_univ).uniqueDiffOn hcompact hsub he m + refine ⟨(m.factorial : ℝ) * D * (B + P) ^ m, by positivity, ?_⟩ + intro U hU G t s τ hτ hτs _ hG ht hGK htk hb hp + have hb' := (hb.mono_order (by simp [order] : m ≤ m + (Expression.coeff c).order)).shrink_scale hτ.le hτs + have hpq := weighted_pair hU (lowJet_smooth hG).contDiffOn ht hτ hb' hp + have hh := hpq.comp hU.uniqueDiffOn (hO.prod isOpen_univ).uniqueDiffOn + hτ (by linarith : 1 ≤ B + P) (zero_le_one.trans hD) + ((lowJet_smooth hG).contDiffOn.prodMk ht) he + (fun x hx => ⟨hKO (hGK hx), Set.mem_univ _⟩) + (fun j hj x hx => hd j hj _ ⟨hGK hx, htk hx⟩) + simpa only [loss, pow_zero, div_one, eval, Function.comp_def] using hh + | atom w a e ih => + obtain ⟨D, hD, hd⟩ := ih he + refine ⟨2 ^ m * B * D, by positivity, ?_⟩ + intro U hU G t s τ hτ hτs hs1 hG ht hGK htk hb hp + have hs : 0 < s := hτ.trans_le hτs + have hQ : Set.MapsTo (lowJet G) U O := fun _ hx => hKO (hGK hx) + have hj := (weighted_actual_jet hU hG hs (zero_le_one.trans hB) m w a + (hb.mono_order (by simp only [order]; omega))).shrink_scale hτ.le hτs + have hb' := hd U hU G t s τ hτ hτs hs1 hG ht hGK htk + (hb.mono_order (by simp only [order]; omega)) hp + have hh := hj.mul_real hU.uniqueDiffOn hτ.le (by positivity) (by positivity) + (jet_smooth hG w a).contDiffOn (phase_smooth hG hQ ht (e := e) he) hb' + convert hh using 1 <;> first | rfl | simp only [loss, pow_add]; ring + | add e f ihe ihf => + obtain ⟨D, hD, hd⟩ := ihe he.1 + obtain ⟨C, hC, hc⟩ := ihf he.2 + refine ⟨D + C, add_nonneg hD hC, ?_⟩ + intro U hU G t s τ hτ hτs hs1 hG ht hGK htk hb hp + have hs : 0 < s := hτ.trans_le hτs + have hQ : Set.MapsTo (lowJet G) U O := fun _ hx => hKO (hGK hx) + have hd' := hd U hU G t s τ hτ hτs hs1 hG ht hGK htk + (hb.mono_order (by simp only [order]; omega)) hp + have hc' := hc U hU G t s τ hτ hτs hs1 hG ht hGK htk + (hb.mono_order (by simp only [order]; omega)) hp + have hd'' : WeightedBound U τ m (D / s ^ max e.loss f.loss) (fun p => e.eval G (p, t p)) := + hd'.mono_const (div_le_div_of_nonneg_left hD (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_left _ _))) + have hc'' : WeightedBound U τ m (C / s ^ max e.loss f.loss) (fun p => f.eval G (p, t p)) := + hc'.mono_const (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_right _ _))) + simpa only [loss, add_div, eval] using hd''.add hU.uniqueDiffOn hτ.le + (phase_smooth hG hQ ht (e := e) he.1) (phase_smooth hG hQ ht (e := f) he.2) hc'' + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedProjectionLinearization.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedProjectionLinearization.lean new file mode 100644 index 0000000000000000000000000000000000000000..4195108373055e0ebd3fc5c2f5242c1b0290d8ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedProjectionLinearization.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TangentSlopeLinearization + +namespace OAI + +/-! Positive scalar weights do not alter the crosscap linearization at a +projection kernel, except by the same nonzero scalar factor. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {n : ℕ} + +lemma weightedJet_product_germ {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + {w : Base → ℝ} {F l : Base → V} {x : Base} + (hw : ContDiff ℝ ∞ w) (hF : ContDiff ℝ ∞ F) + (he : l =ᶠ[𝓝 x] fun y => w y • F y) : + weightedJet w l =ᶠ[𝓝 x] fun y => (w y)^2 • fderiv ℝ F y := by + filter_upwards [he.eventuallyEq_nhds] with y hy + exact weightedJet_eq_smul (hw.differentiable (by simp) y) + (hF.differentiable (by simp) y) hy + +lemma directionJetLinearization_congr_germ + {H K : Base → Base →L[ℝ] ProjectionTarget n × ℝ} + {x : Base} (he : H =ᶠ[𝓝 x] K) (b : Bool) (t : ℝ) : + directionJetLinearization H b (x,t) = directionJetLinearization K b (x,t) := by + unfold directionJetLinearization + rw [he.self_of_nhds,he.fderiv_eq] + +lemma projected_directionJet_scaled + {H : Base → Base →L[ℝ] ProjectionTarget n × ℝ} {w : Base → ℝ} + (hH : ContDiff ℝ ∞ H) (hw : ContDiff ℝ ∞ w) + (a : ProjectionTarget n) (b : Bool) (x : Base) (t : ℝ) + (hker : graphProjection a (H x (tangentRay b t)) = 0) : + (graphProjection a).comp (directionJetLinearization (fun y => w y • H y) b (x,t)) = + w x • (graphProjection a).comp (directionJetLinearization H b (x,t)) := by + apply ContinuousLinearMap.ext + intro z + have hd : fderiv ℝ (fun y => w y • H y) x = + w x • fderiv ℝ H x + (fderiv ℝ w x).smulRight (H x) := + ((hw.differentiable (by simp) x).hasFDerivAt.smul + (hH.differentiable (by simp) x).hasFDerivAt).fderiv + simp only [ContinuousLinearMap.comp_apply,directionJetLinearization_apply,hd, + smul_apply,add_apply,ContinuousLinearMap.smulRight_apply, + map_add,map_smul,smul_add,smul_smul,hker,smul_zero,add_zero] + rw [mul_comm z.2 (w x)] + +theorem regular_weighted_directionJet + {H : Base → Base →L[ℝ] ProjectionTarget 3 × ℝ} {w : Base → ℝ} + {K : Base → Base →L[ℝ] ProjectionTarget 3 × ℝ} + (hH : ContDiff ℝ ∞ H) (hw : ContDiff ℝ ∞ w) + (a : ProjectionTarget 3) (b : Bool) (x : Base) (t : ℝ) + (hw0 : w x ≠ 0) (he : K =ᶠ[𝓝 x] fun y => w y • H y) + (hker : graphProjection a (H x (tangentRay b t)) = 0) + (hbij : Function.Bijective ((graphProjection a).comp (directionJetLinearization K b (x,t)))) : + Function.Bijective ((graphProjection a).comp (directionJetLinearization H b (x,t))) := by + rw [directionJetLinearization_congr_germ he b t, + projected_directionJet_scaled hH hw a b x t hker] at hbij + constructor + · intro v u h + apply hbij.1 + exact congrArg (w x • ·) h + · intro y + obtain ⟨v,hv⟩ := hbij.2 (w x • y) + exact ⟨v,(smul_right_injective _ hw0) hv⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedRealAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedRealAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..503063489a238f2fd533412c5d243fe9d4d3eb23 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedRealAlgebra.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedReciprocal + +namespace OAI + +/-! Real scalar and vector products used in the quantitative normal formula. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma WeightedBound.mul_real {U : Set E} (hU : UniqueDiffOn ℝ U) {s C D : ℝ} {m : ℕ} + {f g : E → ℝ} (hs : 0 ≤ s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (hbf : WeightedBound U s m C f) (hbg : WeightedBound U s m D g) : + WeightedBound U s m (2^m*C*D) (fun x => f x*g x) := by + intro j hj x hx + calc + _ ≤ s^j*(∑ i ∈ Finset.range (j+1), (j.choose i : ℝ)* + ‖iteratedFDerivWithin ℝ i f U x‖*‖iteratedFDerivWithin ℝ (j-i) g U x‖) := by + gcongr + exact norm_iteratedFDerivWithin_mul_le (n := j) (N := ∞) hf hg hU hx + (by exact_mod_cast (le_top : (j : ℕ∞) ≤ ⊤)) + _ ≤ 2^j*C*D := weighted_binomial_bound hs hC hD j _ _ + (fun _ => norm_nonneg _) (fun _ => norm_nonneg _) + (fun i hi => hbf i (hi.trans hj) x hx) (fun i hi => hbg i (hi.trans hj) x hx) + _ ≤ _ := by gcongr; norm_num + +lemma contDiffOn_dot_real {ι : Type*} [Fintype ι] {U : Set E} {f g : E → ι → ℝ} + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) : + ContDiffOn ℝ ∞ (fun x => dotProduct (f x) (g x)) U := + ContDiffOn.sum (fun i _ => (contDiffOn_pi.mp hf i).mul (contDiffOn_pi.mp hg i)) + +lemma WeightedBound.dot_real {ι : Type*} [Fintype ι] {U : Set E} + (hU : UniqueDiffOn ℝ U) {s C D : ℝ} {m : ℕ} {f g : E → ι → ℝ} + (hs : 0 ≤ s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (hbf : WeightedBound U s m C f) (hbg : WeightedBound U s m D g) : + WeightedBound U s m ((Fintype.card ι : ℝ)*(2^m*C*D)) + (fun x => dotProduct (f x) (g x)) := by + have hh := WeightedBound.finset_sum hU hs Finset.univ (fun _ : ι => 2^m*C*D) + (fun i x => f x i*g x i) + (fun i _ => (contDiffOn_pi.mp hf i).mul (contDiffOn_pi.mp hg i)) + (fun i _ => (hbf.component hU hs hC hf i).mul_real hU hs hC hD + (contDiffOn_pi.mp hf i) (contDiffOn_pi.mp hg i) (hbg.component hU hs hD hg i)) + simpa only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul,dotProduct] using hh + +lemma WeightedBound.smul_real_pi {ι : Type*} [Fintype ι] {U : Set E} + (hU : UniqueDiffOn ℝ U) {s C D : ℝ} {m : ℕ} {f : E → ℝ} {g : E → ι → ℝ} + (hs : 0 < s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (hbf : WeightedBound U s m C f) (hbg : WeightedBound U s m D g) : + WeightedBound U s m (2^m*C*D) (fun x => f x • g x) := by + apply WeightedBound.pi hU hs (by positivity) + · intro i + exact hf.mul (contDiffOn_pi.mp hg i) + · intro i + exact hbf.mul_real hU hs.le hC hD hf (contDiffOn_pi.mp hg i) + (hbg.component hU hs.le hD hg i) + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedReciprocal.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedReciprocal.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a1acc23e34b6909c83364f9d30491939dfdc4e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/WeightedReciprocal.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds +import Mathlib.Analysis.Calculus.IteratedDeriv.WithinZpow + +namespace OAI + +/-! Polynomial weighted bounds for the reciprocal operations occurring in +metric inversion and normal reconstruction. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.WeightedEstimates + +lemma norm_iteratedFDerivWithin_inv (j : ℕ) {x : ℝ} (hx : x ≠ 0) : + ‖iteratedFDerivWithin ℝ j (fun y : ℝ => y⁻¹) ({0}ᶜ) x‖ = + (j.factorial : ℝ)*‖x⁻¹‖^(j+1) := by + rw [norm_iteratedFDerivWithin_eq_norm_iteratedDerivWithin] + have h := iteratedDerivWithin_one_div j isOpen_compl_singleton + (show x ∈ ({0}ᶜ : Set ℝ) from hx) + simp only [one_div] at h + rw [h,norm_mul,norm_mul,norm_pow,norm_neg,norm_one,one_pow,one_mul, + Real.norm_natCast,norm_zpow] + have he : (-1-(j : ℤ)) = -((j+1 : ℕ) : ℤ) := by omega + rw [he,zpow_neg,zpow_natCast,← inv_pow,← norm_inv] + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Both the input size and inverse denominator enter polynomially at each +fixed derivative order. There is no compact-range hypothesis. -/ +theorem WeightedBound.inv_real {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} {f : E → ℝ} + (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + (hf : ContDiffOn ℝ ∞ f U) (hne : ∀ x ∈ U, f x ≠ 0) + (hInv : ∀ x ∈ U, ‖(f x)⁻¹‖ ≤ K) (hb : WeightedBound U s m C f) : + WeightedBound U s m ((m.factorial : ℝ)^2*K^(m+1)*C^m) (fun x => (f x)⁻¹) := by + have hV : UniqueDiffOn ℝ ({0}ᶜ : Set ℝ) := isOpen_compl_singleton.uniqueDiffOn + have hg : ContDiffOn ℝ ∞ (fun x : ℝ => x⁻¹) ({0}ᶜ) := + contDiffOn_id.inv (fun x hx => hx) + have hD : 0 ≤ (m.factorial : ℝ)*K^(m+1) := by positivity + have hd : ∀ j ≤ m, ∀ x ∈ U, + ‖iteratedFDerivWithin ℝ j (fun y : ℝ => y⁻¹) ({0}ᶜ) (f x)‖ ≤ + (m.factorial : ℝ)*K^(m+1) := by + intro j hj x hx + rw [norm_iteratedFDerivWithin_inv j (hne x hx)] + apply mul_le_mul + · exact_mod_cast Nat.factorial_le hj + · exact (pow_le_pow_left₀ (norm_nonneg _) (hInv x hx) _).trans + (pow_le_pow_right₀ hK (by omega)) + · positivity + · positivity + have hh := hb.comp hU hV hs hC hD hf hg (fun x hx => hne x hx) hd + convert hh using 1 <;> first | rfl | ring + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Atlas/ZeroSliceLineChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ZeroSliceLineChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..f390dfeed7877ffb11326a1255b29a31212fc559 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Atlas/ZeroSliceLineChart.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MatchedSubsetChart + +namespace OAI + +/-! The zero slice in a product is a copy of the line; this converts +submersion coordinates into charts on matched zero subsets. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X E : Type*} [TopologicalSpace X] [TopologicalSpace E] [Zero E] + +def zeroSliceLineHomeomorph : {z : E × ℝ // z.1 = 0} ≃ₜ ℝ where + toFun := fun z => z.val.2 + invFun := fun t => ⟨(0,t),rfl⟩ + left_inv := by + intro z + apply Subtype.ext + apply Prod.ext + · exact z.property.symm + · rfl + right_inv := fun _ => rfl + continuous_toFun := continuous_subtype_val.snd + continuous_invFun := (continuous_const.prodMk continuous_id).subtype_mk _ + +theorem matched_zero_subset_line_chart (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 := by + obtain ⟨a,ha,_,_,_,_⟩ := matched_subset_chart e S {z | z.1 = 0} p hp hpS hmatch + let h := (zeroSliceLineHomeomorph (E := E)).toOpenPartialHomeomorph + refine ⟨a.trans h,?_⟩ + change (⟨p,hpS⟩ : S) ∈ a.source ∧ a ⟨p,hpS⟩ ∈ h.source + exact ⟨ha,mem_univ _⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ActualSmoothedStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ActualSmoothedStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..822353d38cb7750b0d2d42d87e9e7edbecb67f33 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ActualSmoothedStep.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothedMetricIncrement +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 + +/-! 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 actualSmoothedStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualSmoothedStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance actualSmoothedStepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance actualSmoothedStepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance actualSmoothedStepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualSmoothedStepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The explicit normalized metric error of a constructed step. Its +dependence on the uncontrolled input norm `C` is linear. -/ +def normalizedStepBound (r q : ℕ) (B₀ D E V W C δ δ' τ s t : ℝ) : ℝ := + (δ'^2)⁻¹ * ((δ^2 + E*(V*(δ*τ))/τ) * + (D*tailConstant r*(B₀*(s/t)^r+C*(τ/t)^r)) + + W*(δ*(τ/s)^(q+1)+δ^3/τ)) + +/-- An actual smooth correction and its all-order normalized defect +recurrence, constructed from one fixed finite-order input budget. -/ +theorem actual_smoothed_step (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (r q : ℕ) {B₀ : ℝ} (hB₀ : 0 ≤ B₀) : + ∃ a ρ η D K : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < η ∧ η ≤ 1 ∧ 0 ≤ D ∧ 0 ≤ K ∧ + ∃ B T Dm Em : ℕ → ℝ, + (∀ 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,ρ,η,D,K,ha,hρ,hη,hη1,hD,hK,B,T,hB,hT,hbuild⟩ := + d.smoothed_increment_of_input hF r q hB₀ + choose Dm Em hDm hEm hmetric using fun m => d.A.smoothed_normalized_metric_step_bound r m + refine ⟨a,ρ,η,D,K,ha,hρ,hη,hη1,hD,hK,B,T,Dm,Em,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/Correction/AdaptedSmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptedSmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3f33d9d9d0c4f3a98f936499e827423e7f9e1e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptedSmoothingAtlas.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Smoothing atlases whose actual centers index prescribed neighborhoods. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +/-- The finite atlas retains the point indexing of prescribed neighborhoods. +Its outer cutoffs equal one on a neighborhood of every weight-support point. -/ +theorem exists_smoothingAtlas_subordinate_locally_one (V : M → Set M) + (hV : ∀ p, IsOpen (V p)) (hpV : ∀ p, p ∈ V p) : + ∃ A : SmoothingAtlas M, + (∀ i : A.centers, tsupport (A.weight i) ⊆ V (i : M)) ∧ + ∀ (i : A.centers) (x : M), x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1) := by + classical + obtain ⟨t,ψ,hψ,hsupp,_,_,hsum⟩ := + PhaseGeometry.exists_finite_smooth_square_partition (E := Plane) + (fun p : M => V p ∩ (chart p).source) + (fun p => (hV p).inter (chart p).open_source) + (fun p => ⟨hpV p,by rw [chart_source]; exact mem_chart_source Plane p⟩) + have hchart (i : t) : tsupport (ψ i) ⊆ (chart (i : M)).source := + fun x hx => (hsupp i hx).2 + have hout : ∀ i : t, ∃ χ : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ χ ∧ + tsupport χ ⊆ (chart (i : M)).source ∧ + ∀ x ∈ tsupport (ψ i), χ =ᶠ[𝓝 x] (fun _ => 1) := by + intro i + have hc : IsCompact (tsupport (ψ i)) := (isClosed_tsupport _).isCompact + obtain ⟨B,hB,hKB,hBc⟩ := hc.exists_isOpen_closure_subset + (((hV (i : M)).inter (chart (i : M)).open_source).mem_nhdsSet.mpr (hsupp i)) + obtain ⟨O,hO,hKO,hOc⟩ := hc.exists_isOpen_closure_subset (hB.mem_nhdsSet.mpr hKB) + obtain ⟨χ,hχ,_,hχs,hχone⟩ := + exists_contMDiff_support_eq_eq_one_iff (I := planeModel) (n := (⊤ : ℕ∞)) + hB isClosed_closure hOc + refine ⟨χ,hχ,?_,?_⟩ + · change closure (Function.support χ) ⊆ _ + rw [hχs] + exact fun x hx => (hBc hx).2 + · intro x hx + filter_upwards [hO.mem_nhds (hKO hx)] with y hy + exact (hχone y).mp (subset_closure hy) + choose χ hχ hχs hχone using hout + let A : SmoothingAtlas M := + ⟨t,ψ,χ,hψ,hchart,hχ,hχs,fun i x hx => (hχone i x hx).eq_of_nhds,hsum⟩ + exact ⟨A,(fun i x hx => (hsupp i hx).1),hχone⟩ + +/-- The finite atlas weights are subordinate to their actual centers' +prescribed open neighborhoods. -/ +theorem exists_smoothingAtlas_subordinate (V : M → Set M) + (hV : ∀ p, IsOpen (V p)) (hpV : ∀ p, p ∈ V p) : + ∃ A : SmoothingAtlas M, ∀ i : A.centers, tsupport (A.weight i) ⊆ V (i : M) := by + obtain ⟨A,hA,_⟩ := exists_smoothingAtlas_subordinate_locally_one V hV hpV + exact ⟨A,hA⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionSequence.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionSequence.lean new file mode 100644 index 0000000000000000000000000000000000000000..0decbdbdca0b1f39ef211ae727148a643bdc9be8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionSequence.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveCorrectionStep +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveOrderControl +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldCorrectionLimit + +namespace OAI + +/-! Construction of the correction sequence, and unbounded growth of the +finite derivative order despite the absence of uniform high-order input bounds. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection WeightedEstimates +local instance sequenceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance sequenceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance (p : Prop) : Decidable p := Classical.propDecidable p +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance sequenceDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance sequenceDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance sequenceSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance sequenceSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +namespace PreparedCorrection +variable (c : PreparedCorrection d) (hF : ContMDiff planeModel spaceModel ∞ F) + {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) + +def chosenTransition {n : ℕ} (s : c.Stage t n) : c.Transition s := + Classical.choice (c.transition_nonempty hF ht htsmall s) + +def sequence (seed : c.Stage t 0) : (n : ℕ) → c.Stage t n + | 0 => seed + | n+1 => (c.chosenTransition hF ht htsmall (sequence seed n)).next + +def increment (seed : c.Stage t 0) (n : ℕ) : M → Space := + (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).increment + +lemma sequence_succ_map (seed : c.Stage t 0) (n : ℕ) : + (c.sequence hF ht htsmall seed (n+1)).map = + (c.sequence hF ht htsmall seed n).map+c.increment hF ht htsmall seed n := + (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).map_eq + +lemma sequence_succ_order (seed : c.Stage t 0) (n : ℕ) : + (c.sequence hF ht htsmall seed (n+1)).order = + if (c.sequence hF ht htsmall seed n).CanAdvance then + (c.sequence hF ht htsmall seed n).order+1 else + (c.sequence hF ht htsmall seed n).order := + (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).order_eq + +lemma sequence_order_monotone (seed : c.Stage t 0) : + Monotone (fun n => (c.sequence hF ht htsmall seed n).order) := by + apply monotone_nat_of_le_succ + intro n + rw [c.sequence_succ_order hF ht htsmall seed n] + split_ifs <;> omega + +lemma increment_smooth (seed : c.Stage t 0) (n : ℕ) : + ContMDiff planeModel spaceModel ∞ (c.increment hF ht htsmall seed n) := + (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).smooth + +lemma sequence_partialMap (seed : c.Stage t 0) (n : ℕ) : + (c.sequence hF ht htsmall seed n).map = + manifoldPartialMap seed.map (c.increment hF ht htsmall seed) n := by + induction n with + | zero => funext x; simp [sequence,manifoldPartialMap] + | succ n ih => + rw [c.sequence_succ_map hF ht htsmall seed n,ih] + funext x + simp only [Pi.add_apply,manifoldPartialMap,Finset.sum_range_succ] + abel + +lemma sequence_size_recurrence (seed : c.Stage t 0) (m n : ℕ) : + (c.sequence hF ht htsmall seed (n+1)).size m ≤ c.baseline+ + c.N (c.sequence hF ht htsmall seed n).order m*(correctionScale t n)^(1/5 : ℝ)* + (1+(c.sequence hF ht htsmall seed n).size m) := by + let s := c.sequence hF ht htsmall seed n + have hex := s.finiteInput ht htsmall m + have hx : 0 ≤ s.size m := d.A.inputSize_nonneg hex + have hbound := (c.chosenTransition hF ht htsmall s).recurrence m (s.size m) + hx (d.A.inputSize_bound hex) + exact d.A.inputSize_le (add_nonneg c.baseline_nonneg + (mul_nonneg (mul_nonneg (c.N_nonneg s.order m) + (Real.rpow_nonneg (correctionScale_pos ht n).le _)) (by linarith))) hbound + +/-- The adaptive order really tends to infinity. The proof uses the actual +finite norm of every stage and the all-order affine recurrence. -/ +theorem sequence_order_tendsto (seed : c.Stage t 0) : + Tendsto (fun n => (c.sequence hF ht htsmall seed n).order) atTop atTop := by + apply adaptive_order_tendsto (x := fun m n => (c.sequence hF ht htsmall seed n).size m) + (t := correctionScale t) (N := c.N) (ε := c.ε) (r := correctionInputOrder) + c.baseline_nonneg (lt_trans c.baseline_lt (by linarith [c.budget_pos])) c.budget_pos + c.N_nonneg c.ε_pos (correctionScale_pos ht) + (correctionScale_tendsto_zero ht.le htsmall) + · intro m n + exact d.A.inputSize_nonneg ((c.sequence hF ht htsmall seed n).finiteInput ht htsmall m) + · exact c.sequence_size_recurrence hF ht htsmall seed + · exact c.sequence_order_monotone hF ht htsmall seed + · intro n hε hb + have ha : (c.sequence hF ht htsmall seed n).CanAdvance := ⟨hε,hb⟩ + rw [c.sequence_succ_order hF ht htsmall seed n,ite_eq_left ha] + +lemma increment_eventual_bound (seed : c.Stage t 0) (m : ℕ) : + ∀ᶠ n in atTop, d.A.WeightedBound 1 m (c.ρ*correctionScale t n) + (c.increment hF ht htsmall seed n) := by + filter_upwards [(c.sequence_order_tendsto hF ht htsmall seed).eventually + (eventually_ge_atTop (2*m))] with n hn + exact (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).small m + (by unfold correctionOrder; omega) + +lemma sequence_amplitude_tendsto (seed : c.Stage t 0) : + Tendsto (fun n => (correctionScale t n)^ + (correctionOrder (c.sequence hF ht htsmall seed n).order : ℝ)) atTop (𝓝 0) := by + apply squeeze_zero (fun n => Real.rpow_nonneg (correctionScale_pos ht n).le _) + (fun n => ?_) (correctionScale_tendsto_zero ht.le htsmall) + have hsn := correctionScale_pos ht n + have hs1 : correctionScale t n ≤ 1 := + (correctionScale_le_initial ht.le htsmall n).trans (by linarith) + have hexp : (1 : ℝ) ≤ (correctionOrder (c.sequence hF ht htsmall seed n).order : ℝ) := by + unfold correctionOrder + exact_mod_cast (show 1 ≤ (c.sequence hF ht htsmall seed n).order+10 by omega) + simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge hsn hs1 hexp + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..7002c7fc5fa1d6fbc7d69c06ac3433d4b15e3fc0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveCorrectionStep.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PreparedCorrection +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleControl + +namespace OAI + +/-! A single adaptive transition, with all admissibility conditions preserved. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection WeightedEstimates +local instance (p : Prop) : Decidable p := Classical.propDecidable p +local instance adaptiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance adaptiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance adaptiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance adaptiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance adaptiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance adaptiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} + +namespace PreparedCorrection +variable (c : PreparedCorrection d) + +def stageRadius (t : ℝ) (n : ℕ) : ℝ := + c.ρ/8+c.ρ*(∑ i ∈ Finset.range n, correctionScale t i) + +structure Stage (t : ℝ) (n : ℕ) where + order : ℕ + map : M → Space + smooth : ContMDiff planeModel spaceModel ∞ map + scale_small : correctionScale t n < c.ε order + input : d.A.InputBound (correctionScale t n) (correctionInputOrder order) c.budget map + (normalizedTensorDefect g.inner ((correctionScale t n)^(correctionOrder order : ℝ)) map) + near : d.A.WeightedBound 1 2 (c.stageRadius t n) (map-F) + metric : ∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner + ((correctionScale t n)^(correctionOrder order : ℝ)) map) x- + d.A.tensorEncode g.inner x‖ ≤ c.a/8 + +namespace Stage +variable {c} {t : ℝ} {n : ℕ} + +def defect (s : c.Stage t n) : ∀ p : M, CovariantTwoTensor p := + normalizedTensorDefect g.inner ((correctionScale t n)^(correctionOrder s.order : ℝ)) s.map + +lemma finiteInput (s : c.Stage t n) (ht : 0 < t) (htsmall : t ≤ 1/32) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ d.A.InputBound (correctionScale t n) m C s.map s.defect := by + exact d.A.exists_input_bound (correctionScale_pos ht n).le + ((correctionScale_le_initial ht.le htsmall n).trans (by linarith)) m s.smooth + (d.A.normalizedTensorDefect_smooth g.contMDiff _ s.smooth) + +def size (s : c.Stage t n) (m : ℕ) : ℝ := + d.A.inputSize (correctionScale t n) m s.map s.defect + +def CanAdvance (s : c.Stage t n) : Prop := + correctionScale t n < c.ε (s.order+1) ∧ + c.baseline+c.N s.order (correctionInputOrder (s.order+1))* + (correctionScale t n)^(1/5 : ℝ)*(1+s.size (correctionInputOrder (s.order+1))) ≤ c.budget + +end Stage + +structure Transition {t : ℝ} {n : ℕ} (s : c.Stage t n) where + next : c.Stage t (n+1) + increment : M → Space + smooth : ContMDiff planeModel spaceModel ∞ increment + map_eq : next.map = s.map+increment + order_eq : next.order = if s.CanAdvance then s.order+1 else s.order + small : ∀ m ≤ correctionOrder s.order/2, + d.A.WeightedBound 1 m (c.ρ*correctionScale t n) increment + recurrence : ∀ m C, 0 ≤ C → + d.A.InputBound (correctionScale t n) m C s.map s.defect → + d.A.InputBound (correctionScale t (n+1)) m + (c.baseline+c.N s.order m*(correctionScale t n)^(1/5 : ℝ)*(1+C)) next.map next.defect + +/-- At every stage the order can be held. It is increased as soon as the next +finite input bound and the next geometric threshold permit it. -/ +theorem transition_nonempty (hF : ContMDiff planeModel spaceModel ∞ F) + {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) {n : ℕ} (s : c.Stage t n) : + Nonempty (c.Transition s) := by + classical + let k := if s.CanAdvance then s.order+1 else s.order + have hk : s.order ≤ k ∧ k ≤ s.order+1 := by dsimp [k]; split_ifs <;> omega + have htime := correctionScale_pos ht n + have htime1 : correctionScale t n ≤ 1 := + (correctionScale_le_initial ht.le htsmall n).trans (by linarith) + have hnext : correctionScale t (n+1) ≤ correctionScale t n := by + exact (scale_step_le_half htime.le + ((correctionScale_le_initial ht.le htsmall n).trans htsmall)).trans (by linarith) + have hnear : d.A.WeightedBound 1 2 (c.ρ/4) (s.map-F) := by + intro i + exact (s.near i).mono_const (correction_displacement_budget ht.le htsmall c.ρ_pos.le n) + obtain ⟨U,hU,hsmall,herror,hinput⟩ := c.step s.order s.map s.smooth + (correctionScale t n) htime s.scale_small (correctionOrder k) + (by unfold correctionOrder; omega) (by unfold correctionOrder; omega) + s.input hnear s.metric + have he : (correctionScale t n)^((6/5 : ℝ)*(correctionOrder k : ℝ)) = + (correctionScale t (n+1))^(correctionOrder k : ℝ) := by + rw [correctionScale,← Real.rpow_mul htime.le] + have hε : correctionScale t (n+1) < c.ε k := by + dsimp [k] + split_ifs with h + · exact hnext.trans_lt h.1 + · exact hnext.trans_lt s.scale_small + have hin : d.A.InputBound (correctionScale t (n+1)) (correctionInputOrder k) + c.budget (s.map+U) + (normalizedTensorDefect g.inner + ((correctionScale t (n+1))^(correctionOrder k : ℝ)) (s.map+U)) := by + by_cases hadv : s.CanAdvance + · have hk' : k = s.order+1 := ite_eq_left hadv + obtain ⟨C,hC,hCb⟩ := s.finiteInput ht htsmall (correctionInputOrder (s.order+1)) + have hsize := d.A.inputSize_bound ⟨C,hC,hCb⟩ + have hnsize := d.A.inputSize_nonneg ⟨C,hC,hCb⟩ + have hh := hinput (correctionInputOrder (s.order+1)) _ hnsize hsize + rw [he] at hh + rw [hk'] at hh ⊢ + exact d.A.inputBound_mono_const hh hadv.2 + · have hk' : k = s.order := ite_eq_right hadv + have hh := hinput (correctionInputOrder s.order) c.budget c.budget_pos.le s.input + rw [he] at hh + rw [hk'] at hh ⊢ + exact d.A.inputBound_mono_const hh (c.preserve s.order _ htime s.scale_small).1 + have hmet : ∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner + ((correctionScale t (n+1))^(correctionOrder k : ℝ)) (s.map+U)) x- + d.A.tensorEncode g.inner x‖ ≤ c.a/8 := by + have hL := c.L_nonneg s.order + have hB := c.budget_pos + have hb := d.A.tensorEncode_bound + ((d.A.normalizedTensorDefect_smooth g.contMDiff _ (s.smooth.add hU)).sub_section g.contMDiff) + (Real.rpow_pos_of_pos htime _) (by positivity) herror + intro x + have hh := hb.norm_le (mem_univ x) + rw [he] at hh + simpa only [d.A.tensorEncode_sub,Pi.sub_apply] using + hh.trans (c.preserve s.order _ htime s.scale_small).2 + have hmap : d.A.WeightedBound 1 2 (c.stageRadius t (n+1)) (s.map+U-F) := by + have hu := hsmall 2 (by unfold correctionOrder; omega) + have hb := d.A.weightedBound_add (s.smooth.sub hF) hU zero_le_one s.near hu + have heq : s.map+U-F = (s.map-F)+U := by abel + rw [heq] + convert hb using 1 + simp only [stageRadius,Finset.sum_range_succ] + ring + refine ⟨⟨⟨k,s.map+U,s.smooth.add hU,hε,hin,hmap,hmet⟩,U,hU,rfl,rfl,hsmall,?_⟩⟩ + intro m C hC hb + have hh := hinput m C hC hb + rw [he] at hh + exact hh + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..b01fa45002e08c8d117bb05391939923982ed049 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactControl.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveExactCorrection +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCorrectionBudget + +namespace OAI + +/-! The constructed exact correction retains the C² geometry budget. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +namespace PreparedCorrection + +/-- The same, concretely constructed limit is isometric and close in C² to +both the initial stage and the fixed reference immersion. -/ +theorem exact_correction_with_control (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) + (seed : c.Stage t 0) : + ∃ G : M → Space, IsSmoothIsometricImmersion M g G ∧ + d.A.WeightedBound 1 2 (2*c.ρ*t) (G-seed.map) ∧ + d.A.WeightedBound 1 2 (c.ρ/4) (G-F) := by + exact ⟨_,c.sequence_limit_isometric hF ht htsmall seed, + c.limit_seed_displacement_bound hF ht htsmall seed, + c.limit_reference_displacement_bound hF ht htsmall seed⟩ + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..81fc24b4633f7ede1b698c5e63e81ca449c564ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveExactCorrection.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveCorrectionSequence +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricLimit + +namespace OAI + +/-! The adaptive construction produces a smooth isometric immersion +from admissible finite initial data by choosing a correction sequence. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection +local instance exactFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance exactFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance exactDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance exactDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance exactSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance exactSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +namespace PreparedCorrection + +/-- Construction, growth of derivative order, and passage to the actual +metric limit are combined here. Only finite initial input data remain. -/ +theorem sequence_limit_isometric (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) + (seed : c.Stage t 0) : IsSmoothIsometricImmersion M g + (manifoldLimitMap seed.map (c.increment hF ht htsmall seed)) := by + let U := c.increment hF ht htsmall seed + let δ := fun n => (correctionScale t n)^ + (correctionOrder (c.sequence hF ht htsmall seed n).order : ℝ) + change IsSmoothIsometricImmersion M g (manifoldLimitMap seed.map U) + apply d.A.correction_limit_isometric_of_encoded_bound seed.smooth + (c.increment_smooth hF ht htsmall seed) + ((correctionScale_summable ht.le htsmall).1.mul_left c.ρ) + (c.increment_eventual_bound hF ht htsmall seed) d.outer_locally_one g + (δ := δ) (B := c.a/8) + · intro n + exact ne_of_gt (Real.rpow_pos_of_pos (correctionScale_pos ht n) _) + · exact c.sequence_amplitude_tendsto hF ht htsmall seed + · intro n x + have hh := (c.sequence hF ht htsmall seed n).metric x + rw [c.sequence_partialMap hF ht htsmall seed n] at hh + exact hh + + +theorem exists_isometric_of_stage (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) + (seed : c.Stage t 0) : ∃ G : M → Space, IsSmoothIsometricImmersion M g G := + ⟨_,c.sequence_limit_isometric hF ht htsmall seed⟩ + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {g : SmoothMetric M} {F : M → Space} + +namespace MetricGoodPhaseData +/-- Finite quantitative initial conditions suffice for an exact smooth +correction. The derivative order is exactly the initial order 440, and all +later higher norms are dealt with by the constructed adaptive sequence. -/ +theorem finite_input_exact_correction (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ a ρ B ε : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < B ∧ 0 < ε ∧ ε ≤ 1/32 ∧ + ∀ (t : ℝ), 0 < t → t < ε → ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → + d.A.InputBound t 440 B G (normalizedTensorDefect g.inner (t^(10 : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/8) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner (t^(10 : ℝ)) G) x- + d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ G' : M → Space, IsSmoothIsometricImmersion M g G' := by + classical + let c := Classical.choice (d.preparedCorrection_nonempty hF) + refine ⟨c.a,c.ρ,c.budget,min (c.ε 0) (1/32),c.a_pos,c.ρ_pos,c.budget_pos, + lt_min (c.ε_pos 0) (by norm_num),min_le_right _ _,?_⟩ + intro t ht htε G hG hin hnear hmetric + apply c.exists_isometric_of_stage hF ht (htε.le.trans (min_le_right _ _)) + refine ⟨0,G,hG,?_,?_,?_,?_⟩ + · exact htε.trans_le (min_le_left _ _) + · simpa only [ExactCorrection.correctionScale,correctionInputOrder,correctionOrder, + Nat.zero_add,Nat.cast_ofNat,show 40*(10+1) = 440 from rfl] using hin + · simpa only [PreparedCorrection.stageRadius,Finset.range_zero,Finset.sum_empty, + mul_zero,add_zero] using hnear + · simpa only [ExactCorrection.correctionScale,correctionOrder,Nat.zero_add,Nat.cast_ofNat] using hmetric +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveOrderControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveOrderControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..9489c4ce879e6c1d5cff785b1d5c240e7e53e7d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AdaptiveOrderControl.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ExactCorrectionRecurrence +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionBudgetThresholds + +namespace OAI + +/-! Scalar progress of an adaptive derivative order. No uniform control of +all the higher input norms is required. -/ +noncomputable section +open Filter +open scoped Topology +namespace ClosedSurfaceR4.ExactCorrection + +lemma eventually_lt_of_eventual_vanishing_recurrence + {x c : ℕ → ℝ} {A L : ℝ} (hx : ∀ n, 0 ≤ x n) (hA : 0 ≤ A) + (hc : Tendsto c atTop (𝓝 0)) + (hstep : ∀ᶠ n in atTop, x (n+1) ≤ A+c n*(1+x n)) (hAL : A < L) : + ∀ᶠ n in atTop, x n < L := by + let a : ℝ := (L-A)/(2*(L+1)) + have hL : 0 < L := lt_of_le_of_lt hA hAL + have hden : 0 < 2*(L+1) := by positivity + have ha : 0 < a := div_pos (sub_pos.mpr hAL) hden + have ha1 : a < 1 := by + dsimp [a] + apply (div_lt_one hden).mpr + linarith + have hafix : (A+a)/(1-a) < L := by + apply (div_lt_iff₀ (sub_pos.mpr ha1)).mpr + have heq : a*(L+1) = (L-A)/2 := by dsimp [a]; field_simp + nlinarith + obtain ⟨N,hN⟩ := eventually_atTop.mp (hstep.and (hc.eventually (gt_mem_nhds ha))) + apply eventually_lt_of_affine_tail ha.le ha1 hafix N + intro n hn + have h1 := (hN n hn).1 + have h2 := mul_le_mul_of_nonneg_right (hN n hn).2.le (by linarith [hx n] : 0 ≤ 1+x n) + nlinarith + +lemma order_tendsto_of_no_constant_tail {k : ℕ → ℕ} (hmono : Monotone k) + (hno : ∀ j N, ¬ ∀ n ≥ N, k n = j) : Tendsto k atTop atTop := by + apply hmono.tendsto_atTop_atTop_iff.mpr + intro m + induction m with + | zero => exact ⟨0,Nat.zero_le _⟩ + | succ m ih => + obtain ⟨N,hN⟩ := ih + by_contra h + push Not at h + apply hno m N + intro n hn + have hupper := h n + have hlower := hN.trans (hmono hn) + omega + +/-- Holding one order forever is impossible: every fixed higher input norm +contracts toward the baseline, so the rule must eventually advance. -/ +theorem adaptive_order_tendsto + {k : ℕ → ℕ} {x : ℕ → ℕ → ℝ} {t : ℕ → ℝ} + {A B : ℝ} {N : ℕ → ℕ → ℝ} {ε : ℕ → ℝ} {r : ℕ → ℕ} + (hA : 0 ≤ A) (hAB : A < B) (_hB : 0 < B) + (hN : ∀ j m, 0 ≤ N j m) (hε : ∀ j, 0 < ε j) + (ht : ∀ n, 0 < t n) (ht0 : Tendsto t atTop (𝓝 0)) + (hx : ∀ m n, 0 ≤ x m n) + (hstep : ∀ m n, x m (n+1) ≤ A+N (k n) m*(t n)^(1/5 : ℝ)*(1+x m n)) + (hmono : Monotone k) + (hadvance : ∀ n, t n < ε (k n+1) → + A+N (k n) (r (k n+1))*(t n)^(1/5 : ℝ)*(1+x (r (k n+1)) n) ≤ B → + k (n+1) = k n+1) : Tendsto k atTop atTop := by + apply order_tendsto_of_no_constant_tail hmono + intro j K hconstant + have hpow : Tendsto (fun n => (t n)^(1/5 : ℝ)) atTop (𝓝 0) := by + simpa only [Real.zero_rpow (by norm_num : (1/5 : ℝ) ≠ 0)] using + ht0.rpow_const (Or.inr (by norm_num : (0 : ℝ) ≤ 1/5)) + have hc : Tendsto (fun n => N j (r (j+1))*(t n)^(1/5 : ℝ)) atTop (𝓝 0) := by + simpa only [mul_zero] using hpow.const_mul (N j (r (j+1))) + have hrec : ∀ᶠ n in atTop, + x (r (j+1)) (n+1) ≤ A+N j (r (j+1))*(t n)^(1/5 : ℝ)*(1+x (r (j+1)) n) := by + filter_upwards [eventually_ge_atTop K] with n hn + simpa only [hconstant n hn] using hstep (r (j+1)) n + have hxB := eventually_lt_of_eventual_vanishing_recurrence (hx (r (j+1))) hA hc hrec hAB + obtain ⟨η,hη,_,hηbound⟩ := correction_budget_threshold + (N := N j (r (j+1))) (L := (0 : ℝ)) hAB (by norm_num : (0 : ℝ) < 1) + have hsmall := ht0.eventually (gt_mem_nhds (lt_min (hε (j+1)) hη)) + obtain ⟨n,hnK,hnB,hnt⟩ := (eventually_ge_atTop K |>.and (hxB.and hsmall)).exists + have hkn := hconstant n hnK + have hknext := hconstant (n+1) (by omega) + have hb := (hηbound (t n) (ht n) (hnt.trans_le (min_le_right _ _))).1 + have hxle : x (r (j+1)) n ≤ B := hnB.le + have hmul : N j (r (j+1))*(t n)^(1/5 : ℝ)*(1+x (r (j+1)) n) ≤ + N j (r (j+1))*(t n)^(1/5 : ℝ)*(1+B) := + mul_le_mul_of_nonneg_left (add_le_add le_rfl hxle) + (mul_nonneg (hN j (r (j+1))) (Real.rpow_nonneg (ht n).le _)) + have hadv := hadvance n (by rw [hkn]; exact hnt.trans_le (min_le_left _ _)) + (by rw [hkn]; linarith) + omega + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredPreparedCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredPreparedCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3a36f4611fdf139288a5517c07bf01594a2d048 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredPreparedCorrection.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AnchoredInputStep +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCorrectionBudget +import OAI.Geometry.SurfaceImmersion.Correction.PreparedCorrection + +namespace OAI + +/-! Actual adaptive data with a polynomially controlled initial threshold. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry +local instance anchoredPreparedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredPreparedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredPreparedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredPreparedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredPreparedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredPreparedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_prepared_correction (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ a D : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < a ∧ 1 ≤ D ∧ + ∀ Base Wish : ℝ → ℝ, HasPolynomialBound Base → HasPolynomialBound Wish → + ∃ Budget EpsInv : ℝ → ℝ, HasPolynomialBound Budget ∧ HasPolynomialBound EpsInv ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + A.ShiftedBound 2 0 1 (Base z⁻¹) F → + ∃ p : PreparedCorrection (⟨A,houter⟩ : CorrectionGeometry g F), + p.a = a ∧ p.ρ = z^4/D ∧ p.budget = Budget z⁻¹ ∧ + Wish z⁻¹ < p.budget/4 ∧ (p.ε 0)⁻¹ ≤ EpsInv z⁻¹ := by + classical + obtain ⟨z₀,a,D,hz₀,hz₀1,ha,hD,hall⟩ := A.anchored_input_step g houter R c B b hc hB hb + refine ⟨z₀,a,D,hz₀,hz₀1,ha,hD,?_⟩ + intro Base Wish hBase hWish + obtain ⟨A₀,hA₀,hsteps⟩ := hall Base hBase + let Budget := fun x => 4*(A₀ x+Wish x+1) + have hBudget : HasPolynomialBound Budget := (polynomialBound_const (by norm_num : (0:ℝ) ≤ 4)).mul + ((hA₀.add hWish).add (polynomialBound_const zero_le_one)) + have hgap (x : ℝ) (hx : 1 ≤ x) : 1 ≤ Budget x-A₀ x := by + have hA := hA₀.nonneg hx + have hW := hWish.nonneg hx + dsimp [Budget]; linarith + have hBp (x : ℝ) (hx : 1 ≤ x) : 0 < Budget x := by + have hA := hA₀.nonneg hx + have hW := hWish.nonneg hx + dsimp [Budget]; linarith + have horders (k : ℕ) := hsteps Budget hBudget (correctionOrder k) (by unfold correctionOrder; omega) + choose ε L N hε hL hN hεp hstep using horders + let η := fun k x => ExactCorrection.correctionBudgetThreshold (A₀ x) (Budget x) a + (N k (correctionInputOrder k) x) (L k x) + have hpres (k : ℕ) (x : ℝ) (hx : 1 ≤ x) := + ExactCorrection.correctionBudgetThreshold_spec (A := A₀ x) (B := Budget x) + (N := N k (correctionInputOrder k) x) (L := L k x) (by linarith [hgap x hx]) ha + have hη (k : ℕ) : HasPolynomialBound (fun x => (η k x)⁻¹) := + ExactCorrection.correctionBudgetThreshold_inverse_polynomial A₀ Budget + (N k (correctionInputOrder k)) (L k) a ha hBudget (hN k _) (hL k) hgap + let EpsInv := fun x => (min (ε 0 x) (η 0 x))⁻¹ + have hEpsInv : HasPolynomialBound EpsInv := ExactCorrection.polynomial_inverse_min + (hε 0) (hη 0) (fun x hx => (hεp 0 x hx).1) (fun x hx => (hpres 0 x hx).1) + refine ⟨Budget,EpsInv,hBudget,hEpsInv,?_⟩ + intro z hz hzsmall F hF hFb hFm hbase + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + let p : PreparedCorrection (⟨A,houter⟩ : CorrectionGeometry g F) := { + a := a + ρ := z^4/D + baseline := A₀ z⁻¹ + budget := Budget z⁻¹ + a_pos := ha + ρ_pos := div_pos (pow_pos hz 4) (zero_lt_one.trans_le hD) + baseline_nonneg := hA₀.nonneg hx + budget_pos := hBp z⁻¹ hx + baseline_lt := by + have hw := hWish.nonneg hx + dsimp [Budget]; linarith + ε := fun k => min (ε k z⁻¹) (η k z⁻¹) + L := fun k => L k z⁻¹ + N := fun k m => N k m z⁻¹ + ε_pos := fun k => lt_min (hεp k z⁻¹ hx).1 (hpres k z⁻¹ hx).1 + ε_le_one := fun k => (min_le_left _ _).trans (hεp k z⁻¹ hx).2 + L_nonneg := fun k => (hL k).nonneg hx + N_nonneg := fun k m => (hN k m).nonneg hx + preserve := by + intro k t ht htε + exact (hpres k z⁻¹ hx).2.2 t ht (htε.trans_le (min_le_right _ _)) + step := by + intro k G hG t ht htε j hj hj' hin hnear hmetric + exact hstep k z hz hzsmall F hF hFb hFm hbase G hG t ht + (htε.trans_le (min_le_left _ _)) j hj hj' hin hnear hmetric + } + refine ⟨p,rfl,rfl,rfl,?_,le_rfl⟩ + change Wish z⁻¹ < Budget z⁻¹/4 + have hA := hA₀.nonneg hx + dsimp [Budget]; linarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredSmoothedIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredSmoothedIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f9cce6964c88475b8dc3c920d58c40a4dbf8890 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AnchoredSmoothedIncrement.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AnchoredAtlasIncrement +import OAI.Geometry.SurfaceImmersion.Geometry.ReadJetBallBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSmoothingProfiles +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialReadProfiles +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothingSymmetry +import OAI.Geometry.SurfaceImmersion.Correction.GlobalSmoothedMetricStep + +namespace OAI + +/-! The actual anchored increment at the smoothed input, with polynomial budgets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry +local instance anchoredSmoothFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredSmoothFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredSmoothDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredSmoothDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredSmoothSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredSmoothSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_smoothed_increment (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ a D : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < a ∧ 1 ≤ D ∧ + ∀ (r q : ℕ) (Budget : ℝ → ℝ), HasPolynomialBound Budget → + ∃ e : ℕ, ∃ E : ℝ, ∃ P Q : ℕ → ℝ → ℝ, 1 ≤ E ∧ + (∀ m, HasPolynomialBound (P m)) ∧ (∀ m, HasPolynomialBound (Q m)) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + ∀ (G : M → Space) (H : ∀ y : M, CovariantTwoTensor y), + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (H y)) → + (∀ y v w, H y v w = H y w v) → + ∀ t s : ℝ, 0 < t → t ≤ 1 → 0 < s → s ≤ 1 → + A.InputBound t r (Budget z⁻¹) G H → + A.WeightedBound 1 2 (z^4/D) (A.smooth r s G-F) → + ∀ δ δ' τ : ℝ, 0 < δ → 0 ≤ δ' → δ' ≤ δ → 0 < τ → τ ≤ s → δ ≤ τ → + τ/s ≤ min 1 ((a-a/2)/(2*(E*(z⁻¹)^e))) → + (∀ y, ‖A.tensorEncode (A.tensorSmooth r s H-(δ'/δ)^2 • g.inner) y- + A.tensorEncode g.inner y‖ ≤ a/2) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m (P m z⁻¹*(δ*τ)) U) ∧ + (∀ m, A.TensorWeightedBound τ m (Q m z⁻¹*(δ*(τ/s)^(q+1)+δ^3/τ)) + (realizedTensorError g.inner (A.tensorSmooth r s H) δ δ' (A.smooth r s G) U)) := by + classical + obtain ⟨z₀,a,hz₀,hz₀1,ha,hstep⟩ := A.anchored_atlas_increment g houter R c B b hc hB hb + obtain ⟨D,hD,hball⟩ := A.readJetBall_radius + refine ⟨z₀,a,D,hz₀,hz₀1,ha,hD,?_⟩ + intro r q Budget hBudget + obtain ⟨PG,CH,hPG,hCH,hCH1,hprofiles⟩ := A.polynomial_smoothing_input_profiles r Budget hBudget + obtain ⟨FJ,hFJ,hFJ1,hreads⟩ := A.polynomial_plane_read_profiles PG hPG + choose CG hCG hgb using fun m => A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain m g.contMDiff + let Y := fun m x => CH m x+CG m + have hY (m : ℕ) : HasPolynomialBound (Y m) := (hCH m).add (polynomialBound_const (hCG m)) + have hY1 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ Y m x := + (hCH1 m x hx).trans (le_add_of_nonneg_right (hCG m)) + obtain ⟨e,E,P,Q,hE,hP,hQ,hbuild⟩ := hstep FJ Y hFJ hY hFJ1 hY1 q + refine ⟨e,E,P,Q,hE,hP,hQ,?_⟩ + intro z hz hzsmall F hF hFb hFm G H hG hH hsym t s ht ht1 hs hs1 + hinput hnear δ δ' τ hδ hδ' hδ'δ hτ hτs hδτ hsmall hTensorNear + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + obtain ⟨hPG',hCH'⟩ := hprofiles z⁻¹ hx G H t s ht ht1 hs hs1 hG hH hinput + let α := (δ'/δ)^2 + have hα : 0 ≤ α := sq_nonneg _ + have hα1 : α ≤ 1 := by + have hdiv : 0 ≤ δ'/δ := div_nonneg hδ' hδ.le + have hdiv1 : δ'/δ ≤ 1 := (div_le_one hδ).mpr hδ'δ + dsimp [α]; nlinarith + have hGs := A.smooth_smooth r hs hG + have hHs := A.tensorSmooth_smooth r hs hH + have htarget : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y ((A.tensorSmooth r s H-α • g.inner) y)) := + hHs.sub_section g.contMDiff.const_smul_section + have htargetBound (m : ℕ) : A.TensorWeightedBound s m (Y m z⁻¹) + (A.tensorSmooth r s H-α • g.inner) := by + have hmetric : A.TensorWeightedBound s m (CG m) g.inner := + fun i => (hgb m i).shrink_scale hs.le hs1 + have hscaled := A.tensorWeightedBound_const_smul g.contMDiff hmetric α + have hscaled' : A.TensorWeightedBound s m (CG m) (α • g.inner) := by + intro i + apply (hscaled i).mono_const + rw [abs_of_nonneg hα] + exact mul_le_of_le_one_left (hCG m) hα1 + exact A.tensorWeightedBound_sub hHs g.contMDiff.const_smul_section hs.le (hCH' m) hscaled' + have htargetSym : ∀ y v w, + (A.tensorSmooth r s H-α • g.inner) y v w = (A.tensorSmooth r s H-α • g.inner) y w v := by + intro y v w + simp only [Pi.sub_apply,Pi.smul_apply,sub_apply,smul_apply,smul_eq_mul] + rw [A.tensorSmooth_symmetric r hs hH hsym y v w,g.symm y v w] + obtain ⟨U,hU,hsize,herror⟩ := hbuild z hz hzsmall F hF hFb hFm + (A.smooth r s G) (hball z F (A.smooth r s G) hF hGs hnear) + τ ⟨s,hs.le⟩ hτ hs hτs hs1 (hreads z⁻¹ hx (A.smooth r s G) hGs s hs hs1 hPG') + hsmall (A.tensorSmooth r s H-α • g.inner) htarget htargetSym hTensorNear htargetBound δ hδ hδτ + refine ⟨U,hU,hsize,?_⟩ + have hαδ : δ^2*α = δ'^2 := by dsimp [α]; field_simp [hδ.ne'] + have he : δ^2 • (A.tensorSmooth r s H-α • g.inner) = + δ^2 • A.tensorSmooth r s H-δ'^2 • g.inner := by + rw [smul_sub,smul_smul,hαδ] + intro m + convert herror m using 1 <;> first | rfl | simp only [realizedTensorError,he] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ArbitraryPhasePolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ArbitraryPhasePolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..91b9fcbb19886d92d76d63cfc6f4eecee606b36d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ArbitraryPhasePolynomial.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartBounds + +namespace OAI + +/-! The polynomial conjugation estimate and its real realization for an +arbitrary smooth phase, before changing to a first-coordinate chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates ModulatedJets + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +def phaseCoordinatePolynomialOperator (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 ℝ ∞ φ) (τ ε : ℝ) : + SupportedField (F := Fin 4 → ℂ) (modeSupport K) →ₗ[ℝ] + SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K) := + transportSupportedLM planeCoordinateIsometry K + (tensorConjugatedLM hO hU P hP hG hQ K hKU hφ τ ε 0) + +theorem phaseCoordinatePolynomialOperator_bounds {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) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (B F : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hF : ∀ m, 0 ≤ F m) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ ∀ (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 → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + (∀ m v, WeightedBound U s (m + tensorOrder P) (F m) + (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ m Z, supportedWeightedSeminorm (modeSupport K) s m + (phaseCoordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) + K hKU hφ τ ε Z) ≤ + ε / τ ^ tensorLoss P * D m * supportedWeightedSeminorm (modeSupport K) s (m + tensorOrder P) Z := by + have hex (m : ℕ) := tensorConjugatedLM_bound hU hO hQ hQO P hP K hKU m (B m) (F m) (hB m) (hF m) + choose D hD hd using hex + refine ⟨D,hD,?_⟩ + intro G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb m Z + have hl := hd m G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 + (hGb m) (hφb m) 0 (by simp) + have ht := transportSupportedLM_bound planeCoordinateIsometry K + (tensorConjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε 0) + hs m (m + tensorOrder P) (D m * ε / τ ^ tensorLoss P) hl Z + change supportedWeightedSeminorm _ s m (transportSupportedLM planeCoordinateIsometry K _ Z) ≤ _ + convert ht using 1 + ring + +lemma phaseCoordinatePolynomialOperator_realization + (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 ℝ ∞ φ) (τ ε : ℝ) + (Z : SupportedField (F := Fin 4 → ℂ) (modeSupport K)) : + coordinateRealLinearized P ε G (QuadraticMean.displacement τ (coordinatePhase φ) Z) 0 = + QuadraticMean.displacement τ (coordinatePhase φ) + (phaseCoordinatePolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε Z) := by + let H := (supportedCoordinateEquiv planeCoordinateIsometry K).symm Z + have hf : QuadraticMean.displacement τ (coordinatePhase φ) Z ∘ planeCoordinateIsometry = + realField (fun x => phase τ φ x • H x) := by + funext x a + change (QuadraticMean.phase (φ (planeCoordinateIsometry.symm (planeCoordinateIsometry x)) / τ) * + Z (planeCoordinateIsometry x) a).re = (phase τ φ x * H x a).re + rw [planeCoordinateIsometry.symm_apply_apply, coordinate_phase_value] + rfl + funext p k + change linearized (P k) ε G + (QuadraticMean.displacement τ (coordinatePhase φ) Z ∘ planeCoordinateIsometry) 0 + (planeCoordinateIsometry.symm p) = + (QuadraticMean.phase (φ (planeCoordinateIsometry.symm p) / τ) * + conjugatedLM hO hU (P k) (hP k) hG hQ K hKU hφ τ ε 0 H (planeCoordinateIsometry.symm p)).re + rw [coordinate_phase_value, hf, conjugatedLM_realization hO hU (P k) (hP k) hG hQ K hKU hφ τ ε 0 H] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d3e4187ca77abd20f3ca3f3a22563fbd803357d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledCombinedMean.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanChart +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMeanFamily + +namespace OAI + +/-! Assemble the actual local mean corrections and perform a finite number +of substitutions with one common scale threshold and derivative loss. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.PhaseMean +open SmallModes WeightedEstimates FiniteMean +variable {ι : Type*} {s r ρ R₀ : ℝ} {reference : Base → Tensor} {n L : ℕ} + +def assembledCombinedMean (a : Finset ι) (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hρ : 0 < ρ) (δ τ ε : ℝ) (R : ∀ i, (c i).Operator) (q : ℕ) : + (Base → Tensor) → Base → Tensor := + fun A x => ∑ i ∈ a, (c i).mean hρ δ τ ε (R i) q A x + +theorem finite_assembled_combined_mean (a : Finset ι) + (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hs : 0 < s) (hs1 : s ≤ 1) (hρ : 0 < ρ) (q steps : ℕ) + {H : Base → Tensor} {r₀ : ℝ} (hgap : r₀ < r) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) : + let ℓ := a.sup (fun i => (c i).loss q) + let p₀ := a.sup (fun i => (c i).exponent) + ∃ B K : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (δ τ ε : ℝ) (p : ℕ), 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + p₀ ≤ p → τ / s + ε / τ ^ p ≤ η₀ → + ∀ R : ∀ i, (c i).Operator, + (∀ i ∈ a, (c i).OperatorBound hs τ ε p (R i)) → + let T := assembledCombinedMean a c hρ δ τ ε R q + ∀ j ≤ steps, ContDiff ℝ ∞ (fixedTrial H T j) ∧ + InTrialBall Set.univ reference r (fixedTrial H T j) ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound ℓ C B j m) (fixedTrial H T j)) ∧ + (∀ m, WeightedBound Set.univ s m (differenceBound ℓ C B K j m * (τ / s + ε / τ ^ p) ^ (j + 1)) + (fixedTrial H T j + T (fixedTrial H T j) - H)) := by + classical + have hex (i : ι) := (c i).majorants hs hs1 hρ q + choose B K hB using hex + have hL (i : ι) (hi : i ∈ a) : (c i).loss q ≤ a.sup (fun j => (c j).loss q) := Finset.le_sup (f := fun j => (c j).loss q) hi + obtain ⟨η₀, hη₀, hη₁, ht⟩ := finite_mean_family isOpen_univ.uniqueDiffOn hs.le hgap a + (fun i => (c i).loss q) (a.sup (fun i => (c i).loss q)) hL B K hC hH.contDiffOn + (fun x _ => hH0 x) hbH steps + refine ⟨(fun m C => 1 + ∑ i ∈ a, B i m C), (fun m C => 1 + ∑ i ∈ a, K i m C), η₀, hη₀, hη₁, ?_⟩ + intro δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR + have hη : 0 < τ / s + ε / τ ^ p := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + have hm (i : ι) (hi : i ∈ a) : + MeanBounds Set.univ s reference r ((c i).loss q) + (rescaledMean (τ / s + ε / τ ^ p) ((c i).mean hρ δ τ ε (R i) q)) (B i) (K i) := + hB i δ τ ε p hδ hτ hτs hε hε1 ((Finset.le_sup (f := fun j => (c j).exponent) hi).trans hp) (hsmall.trans hη₁) (R i) (hR i hi) + dsimp only + intro j hj + obtain ⟨ha, hb, hc, hd⟩ := ht _ hη hsmall (fun i => (c i).mean hρ δ τ ε (R i) q) hm j hj + exact ⟨contDiffOn_univ.mp ha, hb, hc, hd⟩ + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledZeroMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledZeroMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c052756e2552adddb3557dd3edf132508dff51a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AssembledZeroMean.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AssembledCombinedMean +import OAI.Geometry.SurfaceImmersion.Correction.CombinedZeroMean + +namespace OAI + +/-! The finite assembled mean correction is the actual quadratic zero-phase +error once the positive phase decomposition is supplied. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +variable {s r ρ R₀ : ℝ} {reference : Base → Tensor} {n L : ℕ} + +namespace CombinedMeanChart + +def leading (c : CombinedMeanChart s r ρ R₀ reference n L) (A : Base → Tensor) : Base → Tensor := + c.source.indicator (chartLeadingTensor (RootMean.phaseAmplitude c.cutoff + (PhaseMean.coefficient c.coefficient c.inverse A)) c.chart) + +def quadraticMean (c : CombinedMeanChart s r ρ R₀ reference n L) (hρ : 0 < ρ) + (δ τ ε : ℝ) (R : c.Operator) (q : ℕ) (A : Base → Tensor) : Base → Tensor := + c.source.indicator (localQuadraticMean c.localBounds hρ c.support_target c.polynomial c.jetMap δ τ ε R q A) + +lemma mean_smooth (c : CombinedMeanChart s r ρ R₀ reference n L) (hρ : 0 < ρ) + (δ τ ε : ℝ) (R : c.Operator) (q : ℕ) (A : Base → Tensor) : + ContDiff ℝ ∞ (c.mean hρ δ τ ε R q A) := + extendedCombinedMean_smooth c.localBounds hρ c.support_target c.outer_closed c.outer_source c.support_chart + c.jetSource_open c.coefficientDomain_open c.coefficients_smooth c.jetMap_smooth + (fun _ hx => c.compactJets_domain (c.jetMap_range hx)) c.support_jetSource δ τ ε R q A + +lemma quadraticMean_eq (c : CombinedMeanChart s r ρ R₀ reference n L) (hρ : 0 < ρ) + (δ τ ε : ℝ) (hδ : δ ≠ 0) (hτ : τ ≠ 0) (R : c.Operator) (q : ℕ) + {A : Base → Tensor} (hA : ContDiff ℝ ∞ A) (hball : InTrialBall Set.univ reference r A) : + c.quadraticMean hρ δ τ ε R q A = + fun x => δ ^ 2 • (c.leading A x + c.mean hρ δ τ ε R q A x) := by + funext x + by_cases hx : x ∈ c.source + · simp only [quadraticMean, leading, mean, extendedCombinedMean, Set.indicator_of_mem hx] + exact localQuadraticMean_eq c.localBounds hρ c.support_target c.polynomial c.jetMap δ τ ε hδ hτ R q + hA.contDiffOn (fun p _ => hball p (Set.mem_univ p)) hx + · simp only [quadraticMean, leading, mean, extendedCombinedMean, Set.indicator_of_notMem hx, + zero_add, smul_zero] + +end CombinedMeanChart + +variable {ι : Type*} + +def assembledQuadraticMean (a : Finset ι) (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hρ : 0 < ρ) (δ τ ε : ℝ) (R : ∀ i, (c i).Operator) (q : ℕ) (A : Base → Tensor) : Base → Tensor := + fun x => ∑ i ∈ a, (c i).quadraticMean hρ δ τ ε (R i) q A x + +lemma assembledQuadraticMean_eq (a : Finset ι) (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hρ : 0 < ρ) (δ τ ε : ℝ) (hδ : δ ≠ 0) (hτ : τ ≠ 0) (R : ∀ i, (c i).Operator) (q : ℕ) + {A : Base → Tensor} (hA : ContDiff ℝ ∞ A) (hball : InTrialBall Set.univ reference r A) + (hdecomp : ∀ x, ∑ i ∈ a, (c i).leading A x = A x) : + assembledQuadraticMean a c hρ δ τ ε R q A = + fun x => δ ^ 2 • (A x + assembledCombinedMean a c hρ δ τ ε R q A x) := by + funext x + simp only [assembledQuadraticMean, CombinedMeanChart.quadraticMean_eq _ hρ δ τ ε hδ hτ _ q hA hball] + rw [← Finset.smul_sum, Finset.sum_add_distrib, hdecomp x] + rfl + +lemma assembledQuadraticMean_residual (a : Finset ι) (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hρ : 0 < ρ) (δ τ ε : ℝ) (hδ : δ ≠ 0) (hτ : τ ≠ 0) (R : ∀ i, (c i).Operator) (q : ℕ) + {A H : Base → Tensor} (hA : ContDiff ℝ ∞ A) (hH : ContDiff ℝ ∞ H) + (hball : InTrialBall Set.univ reference r A) + (hdecomp : ∀ x, ∑ i ∈ a, (c i).leading A x = A x) {m : ℕ} {C : ℝ} + (hb : WeightedBound Set.univ s m C (A + assembledCombinedMean a c hρ δ τ ε R q A - H)) : + WeightedBound Set.univ s m (δ ^ 2 * C) + (assembledQuadraticMean a c hρ δ τ ε R q A - δ ^ 2 • H) := by + have hT : ContDiff ℝ ∞ (assembledCombinedMean a c hρ δ τ ε R q A) := + ContDiff.sum (fun i _ => (c i).mean_smooth hρ δ τ ε (R i) q A) + have hh := hb.const_smul isOpen_univ.uniqueDiffOn ((hA.add hT).sub hH).contDiffOn (δ ^ 2) + rw [abs_of_nonneg (sq_nonneg δ)] at hh + apply hh.congr + intro x _ + rw [assembledQuadraticMean_eq a c hρ δ τ ε hδ hτ R q hA hball hdecomp] + simp only [Pi.sub_apply, Pi.smul_apply, smul_sub] + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCombinedModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCombinedModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d9324419f0ff447e7748da2c605b57d6640f9e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCombinedModes.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasModePolynomialQuadratic +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Geometry.CombinedQuadraticExpansion +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargets + +namespace OAI + +/-! The full quadratic global interaction has one supported family of +oscillatory targets, including the polynomial perturbation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance combinedModesFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance combinedModesFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance combinedModesDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance combinedModesDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance combinedModesSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance combinedModesSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +def globalPolynomialQuadraticMean {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) (F : M → Space) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) : ∀ p : M, CovariantTwoTensor p := + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + combinedQuadraticMean (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 x) + +def globalPolynomialQuadraticTarget {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) + (i : A.centers) (l : RealModes.QuadraticLabel ι) : + SupportedField (F := ComplexTensor) (modeSupport (A.chartWeightCompact i)) where + toFun := fun x => (A.planeWeight i x)^2 • + combinedQuadraticCoefficient (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 l x + contDiff' := by + apply ((A.planeWeight_smooth i).pow 2).smul + apply ContDiff.add + · exact RealModes.quadraticAmplitude_smooth + (fun j => A.vectorPlaneRead_smooth i (hφ j)) + (fun j => A.vectorPlaneRead_smooth i (hZ j)) τ l + · apply contDiff_pi.mpr + intro k + exact (contDiffOn_univ.mp (quadraticFamilyCoefficient_smooth isOpen_univ (hQ i k) + (A.jetChartMap_smooth i hF) (fun j => A.vectorChartRead_smooth i (hφ j)) + (fun j => A.vectorChartRead_smooth i (hZ j)) (fun _ _ => mem_univ _) ε τ 0 l)).comp + planeCoordinateIsometry.symm.contDiff + zero_on_compl' := by + intro x hx + have hw := (A.supportedPlaneWeight i).zero_on_compl hx + change A.planeWeight i x = 0 at hw + simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul,Pi.zero_apply] + +theorem globalPolynomialQuadraticTarget_expansion {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) : + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x) = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + (RealModes.nonzeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x + + ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun j => coordinatePhase (A.vectorChartRead i (φ j))) l) + (coordinateQuadraticCoefficient (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 l) x)) := by + congr 1 + funext i x + rw [RealModes.nonzeroPhaseSum_eq_quadraticFamily,← Finset.sum_add_distrib, + Finset.smul_sum] + apply Finset.sum_congr rfl + intro l _ + have hp : coordinatePhase (A.globalQuadraticPhase φ i l) = + RealModes.quadraticPhase (fun j => A.vectorPlaneRead i (φ j)) l := by + funext y + simp only [coordinatePhase,globalQuadraticPhase,Function.comp_apply, + planeCoordinateIsometry.apply_symm_apply] + rw [hp] + change QuadraticMean.realMode _ ((A.planeWeight i x)^2 • (_ + _)) = _ + rw [realMode_smul] + change (A.planeWeight i x)^2 • QuadraticMean.displacement τ _ + (combinedQuadraticCoefficient (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 l) x = _ + rw [combinedQuadraticCoefficient,displacement_add] + rfl + +theorem global_modes_full_quadratic {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) : + let W := spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j) + inducedTensor W + A.atlasPolynomialQuadratic P ε F W = + A.globalPolynomialQuadraticMean Q F ε τ φ Z + + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x) := by + dsimp only + rw [A.global_modes_metric τ φ Z hφ hZ, + A.atlas_mode_polynomial_quadratic P Q hrep F hF ε τ φ Z hφ hZ, + A.globalPolynomialQuadraticTarget_expansion Q hQ F hF ε τ φ Z hφ hZ] + have hm : A.globalPolynomialQuadraticMean Q F ε τ φ Z = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + RealModes.zeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x) + + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + coordinateQuadraticMean (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 x) := by + rw [← A.tensorPlaneRestore_add] + unfold globalPolynomialQuadraticMean + congr 1 + funext i x + exact smul_add _ _ _ + rw [hm] + have ha (f g : A.centers → SmallModes.Base → Tensor) : + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • (f i x + g i x)) = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • f i x) + + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • g i x) := by + rw [← A.tensorPlaneRestore_add] + congr 1 + funext i x + exact smul_add _ _ _ + rw [ha] + abel + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionAssembly.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d42a0372134e0afcef78bc24f420266c3560d70 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionAssembly.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver + +namespace OAI + +/-! Assemble actual local supported corrections. Atlas constants are chosen before the phase family and its cardinality. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance localCorrectionAssemblyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance localCorrectionAssemblyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance localCorrectionAssemblyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance localCorrectionAssemblyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance localCorrectionAssemblySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance localCorrectionAssemblySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_local_correction_assembly : + ∃ Dv Dt : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)], + ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → SmallModes.Base → ℝ) + (_hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts SmallModes.Base), + (∀ i j, (K i j : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ τ : ℝ, 0 < τ → τ ≤ 1 → + ∀ (X : (i : A.centers) → ι i → RealModes.RField 4), + (∀ i j, ContDiff ℝ ∞ (X i j)) → (∀ i j, tsupport (X i j) ⊆ K i j) → + ∀ (target : ∀ i j, SupportedField (F := ComplexTensor) (K i j)) + (Cv Ct : (i : A.centers) → ι i → ℕ → ℝ), + (∀ i j m, 0 ≤ Cv i j m) → (∀ i j m, 0 ≤ Ct i j m) → + (∀ i j m, WeightedEstimates.WeightedBound univ τ m (Cv i j m) (X i j)) → + (∀ i j m, WeightedEstimates.WeightedBound univ τ m (Ct i j m) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) + + QuadraticMean.displacement τ (φ i j) (target i j))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (Dv m*∑ i : A.centers, ∑ j, Cv i j m) W) ∧ + (∀ m, A.TensorWeightedBound τ m (Dt m*∑ i : A.centers, ∑ j, Ct i j m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (φ i j) (target i j) x))) := by + classical + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.global_linearized_residual_bound m + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro ι inst F hF φ hφ K hK τ hτ hτ1 X hX hsp target Cv Ct hCv hCt hsize hres + let Y : A.centers → RealModes.RField 4 := fun i x => ∑ j, X i j x + have hY (i : A.centers) : ContDiff ℝ ∞ (Y i) := ContDiff.sum (fun j _ => hX i j) + have hYs (i : A.centers) : tsupport (Y i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + apply closure_minimal _ (modeSupport (A.chartWeightCompact i)).isCompact.isClosed + intro x hx + by_contra hn + apply hx + apply Finset.sum_eq_zero + intro j _ + exact image_eq_zero_of_notMem_tsupport (fun hj => hn (hK i j (hsp i j hj))) + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (φ i j) (target i j) x + have htarget (i : A.centers) (j : ι i) : ContDiff ℝ ∞ + (QuadraticMean.displacement τ (φ i j) (target i j)) := + contDiffOn_univ.mp (RealModes.contDiffOn_displacement (hφ i j).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := ContDiff.sum (fun j _ => htarget i j) + have hvn (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, Cv i j m := + Finset.sum_nonneg (fun j _ => hCv i j m) + have htn (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, Ct i j m := + Finset.sum_nonneg (fun j _ => hCt i j m) + have hyv (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m + (∑ j, Cv i j m) (Y i) := + WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ _ _ + (fun j _ => (hX i j).contDiffOn) (fun j _ => hsize i j m) + have hlin (i : A.centers) : + RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i) = + fun x => ∑ j, RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) x := by + simpa only [coordinateFullLinearized_unperturbed,A.jetChartMap_plane] using + coordinateFullLinearized_sum emptyMetricPolynomial 0 (A.jetChartMap i F) + Finset.univ (X i) (hX i) + have hyr (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m + (∑ j, Ct i j m) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i)+T i) := by + have he : (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (Y i)+T i) = + fun x => ∑ j, (RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (X i j) x+ + QuadraticMean.displacement τ (φ i j) (target i j) x) := by + funext x + rw [Pi.add_apply,hlin] + exact Finset.sum_add_distrib.symm + rw [he] + exact WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ _ _ + (fun j _ => (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn + (hX i j).contDiffOn).add (htarget i j).contDiffOn) + (fun j _ => hres i j m) + refine ⟨A.vectorPlaneRestore Y,A.vectorPlaneRestore_smooth Y hY,?_,?_⟩ + · intro m + apply hv m Y τ (∑ i : A.centers, ∑ j, Cv i j m) hτ hτ1 + (Finset.sum_nonneg (fun i _ => hvn i m)) hY + intro i + exact (hyv i m).mono_const + (Finset.single_le_sum (fun k _ => hvn k m) (Finset.mem_univ i)) + · intro m + apply ht m F hF Y hY hYs T hT τ (∑ i : A.centers, ∑ j, Ct i j m) hτ hτ1 + (Finset.sum_nonneg (fun i _ => htn i m)) + intro i + exact (hyr i m).mono_const + (Finset.single_le_sum (fun k _ => htn k m) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionBudget.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..f6d2b6dae7da0eb416a6828c891574bbeede2310 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionBudget.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveCorrectionSequence +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCorrectionLimit + +namespace OAI + +/-! The actual correction series retains its finite atlas displacement budget. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open ExactCorrection WeightedEstimates + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma localize_tsum (p : M) (χ : M → ℝ) (U : ℕ → M → Space) : + localize p χ (fun x => ∑' n, U n x) = fun x => ∑' n, localize p χ (U n) x := by + funext x + by_cases hx : x ∈ (chart p).target + · simp only [localize,indicator_of_mem hx] + exact (tsum_const_smul'' _).symm + · simp only [localize,indicator_of_notMem hx,tsum_zero] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Bounds at a fixed finite order pass to the actual sum with the sum of +the bounds, rather than a larger coordinate-transition constant. -/ +theorem weightedBound_tsum {U : ℕ → M → Space} {ρ : ℕ → ℝ} {m : ℕ} + (hU : ∀ n, ContMDiff planeModel spaceModel ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ n, A.WeightedBound 1 m (ρ n) (U n)) : + A.WeightedBound 1 m (∑' n, ρ n) (fun x => ∑' n, U n x) := by + intro i + rw [localize_tsum] + have hs (n : ℕ) : ContDiff ℝ ∞ (localize (i : M) (A.weight i) (U n)) := + localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (hU n) + have hb (j : ℕ) (hj : j ≤ m) (n : ℕ) (x : JetPolynomial.Base) : + ‖iteratedFDeriv ℝ j (localize (i : M) (A.weight i) (U n)) x‖ ≤ ρ n := by + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using + hbound n i j hj x (mem_univ x) + intro j hj x _ + simp only [one_pow,one_mul,iteratedFDerivWithin_univ] + rw [iteratedFDeriv_tsum_apply (N := (m : ℕ∞)) + (v := fun _ => ρ) (fun n => (hs n).of_le (by simp)) + (fun _ _ => hρ) (fun k n y hk => hb k (by exact_mod_cast hk) n y) + (by exact_mod_cast hj) x] + exact tsum_of_norm_bounded hρ.hasSum (fun n => hb j hj n x) + +end SmoothingAtlas + +namespace PreparedCorrection +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +variable (c : PreparedCorrection d) (hF : ContMDiff planeModel spaceModel ∞ F) + {t : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) + +/-- Every constructed increment has the zeroth, first, and second derivative +budget, including the stages before the order has increased. -/ +lemma increment_c2_bound (seed : c.Stage t 0) (n : ℕ) : + d.A.WeightedBound 1 2 (c.ρ*correctionScale t n) + (c.increment hF ht htsmall seed n) := + (c.chosenTransition hF ht htsmall (c.sequence hF ht htsmall seed n)).small 2 + (by unfold correctionOrder; omega) + +/-- The limit remains within the total C² displacement budget of its seed. -/ +theorem limit_seed_displacement_bound (seed : c.Stage t 0) : + d.A.WeightedBound 1 2 (2*c.ρ*t) + (manifoldLimitMap seed.map (c.increment hF ht htsmall seed)-seed.map) := by + have hsum := (correctionScale_summable ht.le htsmall).1.mul_left c.ρ + have hb := d.A.weightedBound_tsum (c.increment_smooth hF ht htsmall seed) + hsum (c.increment_c2_bound hF ht htsmall seed) + have he : manifoldLimitMap seed.map (c.increment hF ht htsmall seed)-seed.map = + (fun x => ∑' n, c.increment hF ht htsmall seed n x) := by + funext x + simp only [Pi.sub_apply,manifoldLimitMap,add_sub_cancel_left] + rw [he] + intro i + apply (hb i).mono_const + rw [tsum_mul_left] + calc + c.ρ*(∑' n, correctionScale t n) ≤ c.ρ*(2*t) := + mul_le_mul_of_nonneg_left (correctionScale_tsum_le ht.le htsmall) c.ρ_pos.le + _ = 2*c.ρ*t := by ring + +/-- The initial margin and the convergent correction budget preserve the +same fixed C² neighborhood used to construct the entire sequence. -/ +theorem limit_reference_displacement_bound (seed : c.Stage t 0) : + d.A.WeightedBound 1 2 (c.ρ/4) + (manifoldLimitMap seed.map (c.increment hF ht htsmall seed)-F) := by + have hsum := (correctionScale_summable ht.le htsmall).1.mul_left c.ρ + have hs := (d.A.correction_limit seed.smooth (c.increment_smooth hF ht htsmall seed) + hsum (c.increment_eventual_bound hF ht htsmall seed) d.outer_locally_one).1 + have hseed : d.A.WeightedBound 1 2 (c.ρ/8) (seed.map-F) := by + simpa only [stageRadius,Finset.range_zero,Finset.sum_empty,mul_zero,add_zero] using seed.near + have hb := d.A.weightedBound_add (seed.smooth.sub hF) (hs.sub seed.smooth) + zero_le_one hseed (c.limit_seed_displacement_bound hF ht htsmall seed) + have he : manifoldLimitMap seed.map (c.increment hF ht htsmall seed)-F = + (seed.map-F)+(manifoldLimitMap seed.map (c.increment hF ht htsmall seed)-seed.map) := by + abel + rw [he] + intro i + apply (hb i).mono_const + have hρ := c.ρ_pos.le + nlinarith [mul_le_mul_of_nonneg_left htsmall c.ρ_pos.le] + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..dce1a15cc11b86b776642467bb12c4bf34f43cfa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasCorrectionLimit.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Correction.OrderwiseCorrectionLimit +import OAI.Geometry.SurfaceImmersion.Atlas.GlobalPhaseGerms + +namespace OAI + +/-! The actual fixed-atlas correction bounds imply a smooth manifold limit +and convergence of the manifold differentials. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates +open ExactCorrection + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +/-- Every point is seen by at least one genuine partition weight. -/ +lemma exists_weight_ne_zero (p : M) : ∃ i : A.centers, A.weight i p ≠ 0 := by + classical + by_contra h + push Not at h + have hp := A.partition p + simp only [h,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hp + norm_num at hp + +omit [CompactSpace M] in +/-- Where its outer cutoff is one, the coordinate representative agrees +with the original map, for every map simultaneously. -/ +lemma vectorPlaneRead_coordinateChart_of_outer_one (i : A.centers) (V : M → Space) + {x : M} (hx : x ∈ (chart (i : M)).source) (ho : A.outer i x = 1) : + V x = A.vectorPlaneRead i V (coordinateChart (i : M) x) := by + change V x = localize (i : M) (A.outer i) V + (planeCoordinateIsometry.symm (planeCoordinateIsometry (chart (i : M) x))) + rw [LinearIsometryEquiv.symm_apply_apply,localize_chart _ _ _ hx,ho,one_pow,one_smul] + +/-- The global atlas norm can be used directly; the summable bound only has +to hold eventually for each fixed derivative order. -/ +theorem correction_limit + {F : M → Space} {U : ℕ → M → Space} {ρ : ℕ → ℝ} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hU : ∀ n, ContMDiff planeModel spaceModel ∞ (U n)) + (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, A.WeightedBound 1 m (ρ n) (U n)) + (houter : ∀ i x, x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1)) : + ContMDiff planeModel spaceModel ∞ (manifoldLimitMap F U) ∧ + ∀ p, Tendsto (fun N => mfderiv planeModel spaceModel (manifoldPartialMap F U N) p) + atTop (𝓝 (mfderiv planeModel spaceModel (manifoldLimitMap F U) p)) := by + have hpoint (p : M) : ContMDiffAt planeModel spaceModel ∞ (manifoldLimitMap F U) p ∧ + Tendsto (fun N => mfderiv planeModel spaceModel (manifoldPartialMap F U N) p) + atTop (𝓝 (mfderiv planeModel spaceModel (manifoldLimitMap F U) p)) := by + obtain ⟨i,hi⟩ := A.exists_weight_ne_zero p + have hp : p ∈ tsupport (A.weight i) := subset_tsupport _ hi + have hpS := A.weight_support i hp + have hpC : p ∈ (coordinateChart (i : M)).source := by + simpa only [coordinateChart_source,chart_source] using hpS + have hc := ((coordinateChart_smoothOn (i : M)) p hpC).contMDiffAt + ((coordinateChart (i : M)).open_source.mem_nhds hpC) + choose C hC hread using fun m => A.vectorPlaneRead_bound (V := Space) i m + have hlocal (m : ℕ) : ∀ᶠ n in atTop, ∀ x, + ‖iteratedFDeriv ℝ m (A.vectorPlaneRead i (U n)) x‖ ≤ C m*ρ n := by + filter_upwards [hbound m] with n hn x + have hρn : 0 ≤ ρ n := + (norm_nonneg _).trans ((hn i).norm_le (mem_univ (0 : JetPolynomial.Base))) + have hb := hread m (U n) 1 (ρ n) zero_lt_one le_rfl hρn (hU n) hn + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using + hb m le_rfl x (mem_univ x) + have heq : ∀ᶠ x in 𝓝 p, + F x = A.vectorPlaneRead i F (coordinateChart (i : M) x) ∧ + ∀ n, U n x = A.vectorPlaneRead i (U n) (coordinateChart (i : M) x) := by + filter_upwards [houter i p hp,(chart (i : M)).open_source.mem_nhds hpS] with x ho hx + exact ⟨A.vectorPlaneRead_coordinateChart_of_outer_one i F hx ho, + fun n => A.vectorPlaneRead_coordinateChart_of_outer_one i (U n) hx ho⟩ + exact local_coordinate_correction_limit + (A := fun n => A.vectorPlaneRead i (U n)) (ρ := fun m n => C m*ρ n) p hc + (A.vectorPlaneRead_smooth i hF) (fun n => A.vectorPlaneRead_smooth i (hU n)) + (fun m => hρ.mul_left (C m)) hlocal heq + exact ⟨fun p => (hpoint p).1,fun p => (hpoint p).2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeMetricSplit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeMetricSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..81ff69988b0aaf13279a4dbbc48f01820fbff323 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeMetricSplit.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricExpansion +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeMetricSplit +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeOscillation +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPlaneReconstruction + +namespace OAI + +/-! The actual global free oscillation has the restored quadratic mean +plus its local oscillations and all cross-chart oscillations. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean JetPolynomial.Perturbation + +local instance freeMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance freeMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance freeMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance freeMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance freeMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance freeMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {n : A.centers → ℕ} + {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + +def atlasFreeQuadraticOscillation + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => (d i).quadraticOscillation hρ δ q (A.tensorPlaneRead i u)) + + A.atlasMetricCross (fun i => spaceCoordinates.symm ∘ + chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u)) + +theorem atlas_free_metric_split + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u) = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) + + A.atlasFreeQuadraticOscillation d hρ δ q u := by + have hsp (i : A.centers) : + tsupport (chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u)) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp + ((chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).2 hx) + exact hK i j hj + rw [atlasFreeOscillation, A.euclidean_vectorPlaneRestore_metric _ + (fun i => (chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).1) hsp] + have he : (fun i => RealModes.realMetricTensor + (chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u))) = + (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) + + (fun i => (d i).quadraticOscillation hρ δ q (A.tensorPlaneRead i u)) := by + funext i + exact (d i).free_metric_split hρ δ q (A.tensorPlaneRead i u) + rw [he,A.tensorPlaneRestore_add] + change (_ + _) + _ = _ + (_ + _) + exact add_assoc _ _ _ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeOscillation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeOscillation.lean new file mode 100644 index 0000000000000000000000000000000000000000..47f982838136732dd9ccdc171f85e098b1d3122c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeOscillation.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeFamily +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneCoordinates +import OAI.Geometry.SurfaceImmersion.Geometry.VectorPlaneRestore + +namespace OAI + +/-! The actual global free oscillation and its weighted displacement bound. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance atlasFreeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasFreeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasFreeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasFreeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasFreeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasFreeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def atlasFreeOscillation + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : M → RealModes.RVec 4 := + A.vectorPlaneRestore (fun i => chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u)) + +omit [CompactSpace M] in +lemma atlasFreeOscillation_smooth + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ (A.atlasFreeOscillation d hρ δ q u) := + A.vectorPlaneRestore_smooth _ (fun i => (chartedFreeSum_smooth_support + (d i).data hρ δ q (A.tensorPlaneRead i u)).1) + +theorem uniform_atlas_free_size + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (q m : ℕ) (C : ℝ) (hC : 0 ≤ C) : + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ B : ℝ, 1 ≤ B ∧ ∀ {ε τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → τ/s + ε/τ^loss ≤ 1 → ∀ δ : ℝ, 0 ≤ δ → + ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + A.TensorWeightedBound s N C u → + A.WeightedBound τ m (B*(δ*τ)) (A.atlasFreeOscillation d hρ δ q u) := by + classical + dsimp only + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i + (PolynomialSolveData.inputOrder (P := P i) q m) + let C' := fun i => max 1 (D i*C) + choose B E hB hE hfree using fun i : A.centers => + uniform_charted_free_family (R := R) (r := r i) (reference := reference i) (p i) hρ q m (C' i) + let S := 1 + ∑ i : A.centers, B i + have hS (i : A.centers) : B i ≤ S := by + have hh := Finset.single_le_sum (s := (Finset.univ : Finset A.centers)) + (f := B) (fun i _ => zero_le_one.trans (hB i)) (Finset.mem_univ i) + change B i ≤ 1 + ∑ i : A.centers, B i + linarith + have hS0 : 0 ≤ S := by + have hh : 0 ≤ ∑ i : A.centers, B i := Finset.sum_nonneg (fun i _ => zero_le_one.trans (hB i)) + change 0 ≤ 1 + ∑ i : A.centers, B i + linarith + obtain ⟨D₀,hD₀,hrestore⟩ := A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + refine ⟨max 1 (D₀*S),le_max_left _ _,?_⟩ + intro ε τ s d hd hτ hs hτs hs1 hε hsmall δ hδ u hu hball hbu + have hη (i : A.centers) : τ/s + ε/τ^tensorLoss (P i) ≤ 1 := by + apply le_trans _ hsmall + apply add_le_add le_rfl + apply div_le_div_of_nonneg_left hε (pow_pos hτ _) + apply pow_le_pow_of_le_one hτ.le (hτs.trans hs1) + exact Finset.le_sup (f := fun i : A.centers => tensorLoss (P i)) (Finset.mem_univ i) + have hlocal (i : A.centers) : WeightedEstimates.WeightedBound univ s + (PolynomialSolveData.inputOrder (P := P i) q m) (C' i) (A.tensorPlaneRead i u) := by + have horder : PolynomialSolveData.inputOrder (P := P i) q m ≤ N := Finset.le_sup + (f := fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + (Finset.mem_univ i) + have hbu' : A.TensorWeightedBound s (PolynomialSolveData.inputOrder (P := P i) q m) C u := + fun k => (hbu k).mono_order horder + exact (hread i u s C hs hs1 hC hu hbu').mono_const (le_max_right _ _) + have hsize (i : A.centers) : WeightedEstimates.WeightedBound univ τ m (S*(δ*τ)) + (chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u)) := by + have hh := (hfree i (d i).data (hd i) hτ hs hτs hs1 hε (hη i) δ hδ + (A.tensorPlaneRead i u) (zero_le_one.trans (le_max_left _ _)) + (A.tensorPlaneRead_smooth i hu) (hball i) (hlocal i)).1 + exact hh.mono_const (mul_le_mul_of_nonneg_right (hS i) (mul_nonneg hδ hτ.le)) + have hh := hrestore _ τ (S*(δ*τ)) hτ (hτs.trans hs1) + (mul_nonneg hS0 (mul_nonneg hδ hτ.le)) + (fun i => (chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).1) hsize + intro i + apply (hh i).mono_const + calc + D₀*(S*(δ*τ)) = (D₀*S)*(δ*τ) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hδ hτ.le) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeQuadraticCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeQuadraticCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c5fcefd180653ad1d6ecf56a672da4e35928fcc9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeQuadraticCorrection.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformGlobalQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasAmplitudeReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasAmplitudeSupport + +namespace OAI + +/-! Construct a uniform forced correction for the actual atlas free oscillation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance freeQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance freeQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance freeQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance freeQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance freeQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance freeQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_free_quadratic_correction + {n : A.centers → ℕ} {P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression} + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r r₀ : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 (r₀ i) ρ R (reference i)) + (c₀ : ∀ k l, PolynomialSolveData (P k) 0 (A.jetChartMap k F) + (A.jetChartMap_smooth k hF) + (A.globalQuadraticPhase (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) k l) + (A.quadraticOverlapCompact (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) 1 1) + (I : A.centers → RealModes.QuadraticLabel (A.centers × Fin 3) → ℕ → ℝ) + (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) + (C : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (q : ℕ) : + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ {τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ i, (d i).phase = (d₀ i).phase) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + ∃ 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.atlasFreeQuadraticOscillation d hρ δ q u)) := by + classical + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q (m+1)) + choose a ha hamp using fun m => + A.uniform_atlas_amplitude_reads p hρ r reference q (m+1) (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := A.uniform_global_quadratic_cancellation P F hF + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d₀ a.1 a.2) + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) c₀ I hI hi a + (fun m => zero_le_one.trans (ha m)) q + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro τ s d hfit hphase hτ hs hτs hs1 hK δ hδ u hu hball hbu + let Z := fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2 + have hZ (a) : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a) := + A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2 + have hsp (a) : tsupport (Z a) ⊆ tsupport (A.weight a.1) := + A.freeGlobalAmplitude_tsupport d hρ δ q u hK a.1 a.2 + have hreads (k a₀ m) : WeightedEstimates.WeightedBound univ s (m+1) + (a m*(δ*τ)) (A.vectorPlaneRead k (Z a₀)) := + hamp m d hfit hτ hs hτs hs1 δ hδ u hu hball (hbu (N m)) k a₀.1 a₀.2 + obtain ⟨W,hW,hsize,hres⟩ := hcorr τ δ s hτ hs hτs hs1 hδ Z hZ hsp hreads + have hph (a : A.centers × Fin 3) : A.freeGlobalPhase d a.1 a.2 = A.freeGlobalPhase d₀ a.1 a.2 := by + unfold freeGlobalPhase + rw [hphase a.1] + refine ⟨W,hW,hsize,?_⟩ + intro m + rw [A.atlas_quadratic_oscillation_eq_global d hρ δ q u hK] + simpa only [atlasGlobalNonzero,hph] using hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..85e4a7a88be7a8cd3988dc69b250b78d7c3bbf67 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasFreeResidual.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeOscillation + +namespace OAI + +/-! Uniform global metric-linear residual of the actual free oscillation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance freeResidualFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance freeResidualFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance freeResidualDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance freeResidualDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance freeResidualSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance freeResidualSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_free_residual + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (q m : ℕ) (C : ℝ) (hC : 0 ≤ C) : + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + ∃ B : ℝ, 1 ≤ B ∧ ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + {τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).G = A.jetChartMap i F) → + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + A.TensorWeightedBound s N C u → + A.TensorWeightedBound τ m (B*(δ*τ)*(τ/s)^(q+1)) + (linearMetricTensor F (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u)) := by + classical + dsimp only + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i + (PolynomialSolveData.inputOrder (P := P i) q m) + let C' := fun i => max 1 (D i*C) + choose B E hB hE hfree using fun i : A.centers => + uniform_charted_free_family (R := R) (r := r i) (reference := reference i) (p i) hρ q m (C' i) + let S := 1 + ∑ i : A.centers, E i + have hS (i : A.centers) : E i ≤ S := by + have hh := Finset.single_le_sum (s := (Finset.univ : Finset A.centers)) + (f := E) (fun i _ => zero_le_one.trans (hE i)) (Finset.mem_univ i) + change E i ≤ 1 + ∑ i : A.centers, E i + linarith + have hS0 : 0 ≤ S := by + have hh : 0 ≤ ∑ i : A.centers, E i := Finset.sum_nonneg (fun i _ => zero_le_one.trans (hE i)) + change 0 ≤ 1 + ∑ i : A.centers, E i + linarith + obtain ⟨D₀,hD₀,hrestore⟩ := A.tensorPlaneRestore_bound m + refine ⟨max 1 (D₀*S),le_max_left _ _,?_⟩ + intro F hF τ s d hG hd hτ hs hτs hs1 hK δ hδ u hu hball hbu + have hη : τ/s ≤ 1 := (div_le_one₀ hs).mpr hτs + have hlocal (i : A.centers) : WeightedEstimates.WeightedBound univ s + (PolynomialSolveData.inputOrder (P := P i) q m) (C' i) (A.tensorPlaneRead i u) := by + have horder : PolynomialSolveData.inputOrder (P := P i) q m ≤ N := Finset.le_sup + (f := fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + (Finset.mem_univ i) + have hbu' : A.TensorWeightedBound s (PolynomialSolveData.inputOrder (P := P i) q m) C u := + fun k => (hbu k).mono_order horder + exact (hread i u s C hs hs1 hC hu hbu').mono_const (le_max_right _ _) + let f := fun i => chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u) + have hf (i : A.centers) : ContDiff ℝ ∞ (f i) := + (chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).1 + have hsp (i : A.centers) : tsupport (f i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp + ((chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).2 hx) + exact hK i j hj + have hres (i : A.centers) : WeightedEstimates.WeightedBound univ τ m + (S*(δ*τ)*(τ/s)^(q+1)) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (f i)) := by + have hh := (hfree i (d i).data (hd i) hτ hs hτs hs1 (le_refl 0) + (by simpa only [zero_div,add_zero] using hη) δ hδ + (A.tensorPlaneRead i u) (zero_le_one.trans (le_max_left _ _)) + (A.tensorPlaneRead_smooth i hu) (hball i) (hlocal i)).2 + simp only [coordinateFullLinearized_unperturbed,zero_div,add_zero,hG i,A.jetChartMap_plane] at hh + exact hh.mono_const (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (hS i) (mul_nonneg hδ hτ.le)) + (pow_nonneg (div_nonneg hτ.le hs.le) _)) + change A.TensorWeightedBound τ m _ + (linearMetricTensor F (spaceCoordinates.symm ∘ A.vectorPlaneRestore f)) + rw [A.euclidean_vectorPlaneRestore_linearized hF f hf hsp] + have hh := hrestore _ τ (S*(δ*τ)*(τ/s)^(q+1)) hτ (hτs.trans hs1) + (by positivity) (fun i => contDiffOn_univ.mp + (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn + (hf i).contDiffOn)) hres + intro i + apply (hh i).mono_const + calc + D₀*(S*(δ*τ)*(τ/s)^(q+1)) = (D₀*S)*(δ*τ)*(τ/s)^(q+1) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hδ hτ.le)) + (pow_nonneg (div_nonneg hτ.le hs.le) _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalFreeModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalFreeModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..f219c6b9f361faaa55b227de1c42145467270a64 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalFreeModes.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalOscillatoryModes +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeOscillation + +namespace OAI + +/-! The finite free correction is an actual sum of globally smooth phase modes. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma coordinateAmplitude_support {K : TopologicalSpace.Compacts JetPolynomial.Base} + (Z : SupportedField (F := Fin 4 → ℂ) K) : + tsupport (coordinateAmplitude Z) ⊆ (modeSupport K : Set SmallModes.Base) := + (pushSupported planeCoordinateIsometry K Z).tsupport_subset + +variable {n : A.centers → ℕ} + {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + +/-- The outer cutoff makes the original local phase a globally smooth scalar. -/ +def freeGlobalPhase + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (i : A.centers) (j : Fin 3) : M → ℝ := + restore (i : M) (A.outer i) ((d i).phase j) + +/-- The global complex amplitude retains the original compact support. -/ +def freeGlobalAmplitude + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : Fin 3) : M → Fin 4 → ℂ := + restore (i : M) (A.outer i) ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)) + +omit [CompactSpace M] in +lemma freeGlobalPhase_smooth + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (i : A.centers) (j : Fin 3) : ContMDiff planeModel 𝓘(ℝ) ∞ (A.freeGlobalPhase d i j) := + restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) ((d i).solver j).smoothPhase + +omit [CompactSpace M] in +lemma freeGlobalAmplitude_smooth + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : Fin 3) : + ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (A.freeGlobalAmplitude d hρ δ q u i j) := + restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff + +theorem atlas_free_global_modes + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.atlasFreeOscillation d hρ δ q u = ∑ i : A.centers, ∑ j : Fin 3, + surfaceMode τ (A.freeGlobalPhase d i j) (A.freeGlobalAmplitude d hρ δ q u i j) := by + classical + unfold atlasFreeOscillation vectorPlaneRestore + apply Finset.sum_congr rfl + intro i _ + have he : (chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u)) ∘ planeCoordinateIsometry = + ∑ j : Fin 3, (QuadraticMean.displacement τ (coordinatePhase ((d i).phase j)) + (coordinateAmplitude ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)))) ∘ + planeCoordinateIsometry := by + funext x + simp only [chartedFreeSum,QuadraticMean.sumDisplacement,Function.comp_apply,Finset.sum_apply] + rw [he] + have hsum (f : Fin 3 → JetPolynomial.Base → RealModes.RVec 4) : + restore (i : M) (A.outer i) (∑ j, f j) = ∑ j, restore (i : M) (A.outer i) (f j) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source <;> + simp [restore,hp,Finset.smul_sum] + rw [hsum] + apply Finset.sum_congr rfl + intro j _ + have hs := (coordinateAmplitude_support + ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u))).trans (hK i j) + simpa only [freeGlobalPhase,freeGlobalAmplitude,coordinatePhase,coordinateAmplitude, + Function.comp_def,LinearIsometryEquiv.symm_apply_apply] using A.restore_displacement i τ (coordinatePhase ((d i).phase j)) + (coordinateAmplitude ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u))) hs + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..8b172500a04cb68899a084f97a62e442d3a78837 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasGlobalPolynomialMean.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RestoredQuadratureMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRestoreFinite +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedMeanIdentity +import OAI.Geometry.SurfaceImmersion.Correction.RestoredPolynomialModeMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeMetricSplit + +namespace OAI + +/-! The global finite phase expansion has the prescribed quadratic mean. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance globalPolynomialMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalPolynomialMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance globalPolynomialMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalPolynomialMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalPolynomialMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalPolynomialMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_global_polynomial_mean {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (Q i) ε τ s (r i) ρ R (reference i)) + (hmap : ∀ i, (d i).G = A.jetChartMap i F) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.globalPolynomialQuadraticMean Q F ε τ + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d a.1 a.2) + (fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2) = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) := by + classical + let Z₀ := fun (a : A.centers × Fin 3) (x : SmallModes.Base) => + RealModes.phaseZeroTensor τ (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) x + + (fun k => quadraticMeanCoefficient (Q a.1 k) ε (A.jetChartMap a.1 F) + ((d a.1).phase a.2) + ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)) τ 0 + (planeCoordinateIsometry.symm x)) + let T := fun (a : A.centers × Fin 3) (k : A.centers) (x : SmallModes.Base) => + (A.planeWeight k x)^2 • + (RealModes.phaseZeroTensor τ + (A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x + + (fun j => quadraticMeanCoefficient (Q k j) ε (A.jetChartMap k F) + (A.vectorChartRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorChartRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) τ 0 + (planeCoordinateIsometry.symm x))) + have ht (a : A.centers × Fin 3) : A.tensorPlaneRestore (T a) = + A.bundleRestore A.tensorTriv a.1 (fun y => fiberFromThree (Z₀ a (planeCoordinateIsometry y))) := by + have hs := (coordinateAmplitude_support + ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))).trans (hK a.1 a.2) + have hp := A.restored_zeroPhase a.1 τ (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + (((d a.1).solver a.2).smoothPhase.comp planeCoordinateIsometry.symm.contDiff) + ((((d a.1).data a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff.comp + planeCoordinateIsometry.symm.contDiff) hs + have hpoly := A.restored_polynomial_mode_mean P Q hrep F hF ε τ a.1 + (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + (((d a.1).solver a.2).smoothPhase.comp planeCoordinateIsometry.symm.contDiff) + ((((d a.1).data a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff.comp + planeCoordinateIsometry.symm.contDiff) hs + have hT : T a = + (fun k x => (A.planeWeight k x)^2 • RealModes.phaseZeroTensor τ + (A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x) + + (fun k x => (A.planeWeight k x)^2 • (fun j => + quadraticMeanCoefficient (Q k j) ε (A.jetChartMap k F) + (A.vectorChartRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorChartRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) τ 0 + (planeCoordinateIsometry.symm x))) := by + funext k x + exact smul_add _ _ _ + rw [hT,A.tensorPlaneRestore_add] + have hp' : A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • + RealModes.phaseZeroTensor τ (A.vectorPlaneRead k (A.freeGlobalPhase d a.1 a.2)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) x) = + A.bundleRestore A.tensorTriv a.1 (fun y => fiberFromThree + (RealModes.phaseZeroTensor τ (coordinatePhase ((d a.1).phase a.2)) + (coordinateAmplitude ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + (planeCoordinateIsometry y))) := by + simpa only [freeGlobalPhase,freeGlobalAmplitude,coordinatePhase,coordinateAmplitude, + Function.comp_def,planeCoordinateIsometry.symm_apply_apply] using hp + rw [hp'] + have hpoly' : A.polynomialModeMean Q F ε τ (A.freeGlobalPhase d a.1 a.2) + (A.freeGlobalAmplitude d hρ δ q u a.1 a.2) = + A.bundleRestore A.tensorTriv a.1 (fun y => fiberFromThree + (fun k => quadraticMeanCoefficient (Q a.1 k) ε (A.jetChartMap a.1 F) + ((d a.1).phase a.2) + ((d a.1).data a.2 |>.freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)) τ 0 y)) := by + simpa only [freeGlobalPhase,freeGlobalAmplitude,coordinatePhase,coordinateAmplitude, + Function.comp_def,planeCoordinateIsometry.symm_apply_apply] using hpoly + change _ + A.polynomialModeMean Q F ε τ _ _ = _ + rw [hpoly',← A.bundleRestore_add] + congr 1 + funext y + simp only [Pi.add_apply,Z₀,planeCoordinateIsometry.symm_apply_apply,map_add] + have he : (fun k x => (A.planeWeight k x)^2 • + combinedQuadraticMean (Q k) ε (A.jetChartMap k F) + (fun a : A.centers × Fin 3 => A.vectorChartRead k (A.freeGlobalPhase d a.1 a.2)) + (fun a : A.centers × Fin 3 => A.vectorChartRead k (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) τ 0 x) = + ∑ a : A.centers × Fin 3, T a := by + funext k x j + simp only [T,combinedQuadraticMean,RealModes.zeroPhaseSum,coordinateQuadraticMean, + Pi.add_apply,Pi.smul_apply,smul_eq_mul,Finset.sum_apply,Finset.mul_sum, + Finset.sum_add_distrib,mul_add] + rfl + have hz (i : A.centers) : (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u) = + ∑ j : Fin 3, Z₀ (i,j) := by + ext x k + simp only [ChartedMeanFamilyData.quadraticMean,combinedQuadraticMean, + coordinateQuadraticMean,RealModes.zeroPhaseSum,Z₀,hmap,Pi.add_apply, + Finset.sum_apply,Finset.sum_add_distrib] + unfold globalPolynomialQuadraticMean + rw [he,A.tensorPlaneRestore_sum] + simp_rw [ht] + rw [Fintype.sum_prod_type] + funext p + simp only [tensorPlaneRestore,Finset.sum_apply] + apply Finset.sum_congr rfl + intro i _ + rw [hz i] + simp only [bundleRestore,Finset.sum_apply,map_sum,Finset.smul_sum] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasLinearizedMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasLinearizedMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..90c38cae85bb05d975f6f31d6a98362ff6c2b8f0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasLinearizedMetric.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RestoredLinearizedMetric +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricExpansion + +namespace OAI + +/-! Transport the actual local linear residuals to the global metric tensor. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance atlasLinearFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasLinearFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasLinearDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasLinearDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasLinearSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasLinearSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma linearMetricTensor_finite_sum {ι : Type*} [Fintype ι] + (F : M → Space) (f : ι → M → Space) (hf : ∀ i, ContMDiff planeModel spaceModel ∞ (f i)) : + linearMetricTensor F (∑ i, f i) = fun p => ∑ i, linearMetricTensor F (f i) p := by + funext p + ext v w + simpa only [sum_apply,linearMetricTensor_apply] using + linearMetricForm_finite_sum F f (fun i => ((hf i) p).mdifferentiableAt (by simp)) v w + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem vectorPlaneRestore_linearized {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (f : A.centers → SmallModes.Base → Space) (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (hsp : ∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + linearMetricTensor F (A.vectorPlaneRestore f) = + A.tensorPlaneRestore (fun i => RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (spaceCoordinates ∘ f i)) := by + unfold vectorPlaneRestore + rw [linearMetricTensor_finite_sum F + (fun i : A.centers => restore (i : M) (A.outer i) (f i ∘ planeCoordinateIsometry)) + (fun i => restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((hf i).comp planeCoordinateIsometry.contDiff))] + funext p + apply Finset.sum_congr rfl + intro i _ + exact congrFun (A.restored_linearized_metric i hF (f i) (hf i) (hsp i)) p + +theorem euclidean_vectorPlaneRestore_linearized {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (f : A.centers → SmallModes.Base → RealModes.RVec 4) (hf : ∀ i, ContDiff ℝ ∞ (f i)) + (hsp : ∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + linearMetricTensor F (spaceCoordinates.symm ∘ A.vectorPlaneRestore f) = + A.tensorPlaneRestore (fun i => RealModes.realLinearizedTensor + (spaceCoordinates ∘ A.vectorPlaneRead i F) (f i)) := by + rw [A.euclidean_vectorPlaneRestore] + have hh := A.vectorPlaneRestore_linearized hF (fun i => spaceCoordinates.symm ∘ f i) + (fun i => spaceCoordinates.symm.contDiff.comp (hf i)) + (fun i => (tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) (f i)).trans (hsp i)) + have he (i : A.centers) : spaceCoordinates ∘ (spaceCoordinates.symm ∘ f i) = f i := by + funext x + simp only [Function.comp_apply,ContinuousLinearEquiv.apply_symm_apply] + simpa only [he] using hh + +theorem global_linearized_residual_bound (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (f : A.centers → SmallModes.Base → RealModes.RVec 4), + (∀ i, ContDiff ℝ ∞ (f i)) → + (∀ i, tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ (T : A.centers → SmallModes.Base → Tensor), (∀ i, ContDiff ℝ ∞ (T i)) → + ∀ s C : ℝ, 0 < s → s ≤ 1 → 0 ≤ C → + (∀ i, WeightedEstimates.WeightedBound univ s m C + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (f i) + T i)) → + A.TensorWeightedBound s m (D*C) + (linearMetricTensor F (spaceCoordinates.symm ∘ A.vectorPlaneRestore f) + A.tensorPlaneRestore T) := by + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + refine ⟨D,hD,?_⟩ + intro F hF f hf hsp T hT s C hs hs1 hC hb + rw [A.euclidean_vectorPlaneRestore_linearized hF f hf hsp,← A.tensorPlaneRestore_add] + apply hd _ s C hs hs1 hC _ hb + intro i + apply ContDiff.add _ (hT i) + exact contDiffOn_univ.mp (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn (hf i).contDiffOn) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasMetricLocalModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasMetricLocalModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..71b81967343ac32b02ce1279b7663bf6f2fc1c2c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasMetricLocalModel.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLocalModel + +namespace OAI + +/-! Local coordinate models of the complete perturbed global metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance metricLocalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricLocalFiberAdd : AddCommGroup TensorFiber := + metricLocalFiberNormed.toAddCommGroup +local instance metricLocalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricLocalDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricLocalDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricLocalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricLocalSectionAdd (p : M) : AddCommGroup (CovariantTwoTensor p) := + (metricLocalSectionNormed p).toAddCommGroup +local instance metricLocalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorChartRead_add (i : A.centers) (u v : ∀ p : M, CovariantTwoTensor p) : + A.tensorChartRead i (u+v) = A.tensorChartRead i u+A.tensorChartRead i v := by + have h := A.tensorChartRead_sum i ![u,v] + simpa only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one] using h + +lemma metric_read_on_support (i : A.centers) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) {x : Base} + (hx : x ∈ (A.chartWeightCompact i : Set Base)) : + RealModes.realMetricTensor (A.jetChartMap i F ∘ planeCoordinateIsometry.symm) + (planeCoordinateIsometry x) = A.tensorChartRead i (inducedTensor F) x := by + obtain ⟨p,hp,rfl⟩ := hx + have hread := A.tensorChartRead_on_weight i (inducedTensor F) hp + rw [A.metric_component_on_weight i hF hp,fiberToThree_fromThree] at hread + exact hread.symm + +theorem atlas_metric_local_model {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) (i : A.centers) : + ∃ Q : Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ k r, (Q k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinateMetricMap Q ε (A.jetChartMap i F) (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialMetric P ε F) x := by + obtain ⟨Q,hQ,hvalue⟩ := A.atlas_polynomial_representation_on_support P hP i + refine ⟨Q,hQ,?_⟩ + intro F hF x hx ε + simp only [coordinateMetricMap,Pi.add_apply,atlasPolynomialMetric,A.tensorChartRead_add, + A.metric_read_on_support i hF hx,hvalue F hF x hx ε] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..719e6bdf1b5023e456828bfbeb13dec1ad822dd0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeGerms.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalOscillatoryModes +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! Every global mode sum has the expected local oscillatory germ on an +active atlas chart. No equality of cutoffs outside that locus is assumed. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +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_euclidean (i : A.centers) (X : M → RealModes.RVec 4) : + A.jetChartMap i (spaceCoordinates.symm ∘ X) = A.vectorChartRead i X := by + funext x + change spaceCoordinates (localize (i : M) (A.outer i) (spaceCoordinates.symm ∘ X) x) = _ + by_cases hx : x ∈ (chart (i : M)).target + · simp only [localize,indicator_of_mem hx,Function.comp_apply,map_smul, + ContinuousLinearEquiv.apply_symm_apply,vectorChartRead] + · simp only [localize,indicator_of_notMem hx,map_zero,vectorChartRead] + +lemma jetChartMap_modes_germ {ι : Type*} [Fintype ι] + (i : A.centers) (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + {x : Base} (hx : A.chartWeight i x ≠ 0) : + A.jetChartMap i (spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j)) =ᶠ[𝓝 x] + (QuadraticMean.sumDisplacement τ + (fun j => coordinatePhase (A.vectorChartRead i (φ j))) + (fun j => coordinateAmplitude (A.vectorChartRead i (Z j))) ∘ planeCoordinateIsometry) := by + have hopen := (A.chartWeight_smooth i).continuous.isOpen_support + rw [A.jetChartMap_euclidean] + filter_upwards [hopen.mem_nhds hx] with y hy + have hys : y ∈ (A.chartWeightCompact i : Set Base) := by + rw [← A.chartWeight_tsupport i] + exact subset_tsupport (A.chartWeight i) hy + change localize (i : M) (A.outer i) (∑ j, surfaceMode τ (φ j) (Z j)) y = _ + rw [localize_sum] + simp only [Function.comp_apply,QuadraticMean.sumDisplacement, + QuadraticMean.displacement,coordinatePhase,coordinateAmplitude, + planeCoordinateIsometry.symm_apply_apply] + apply Finset.sum_congr rfl + intro j _ + exact A.vectorChartRead_mode_on_support i τ (φ j) (Z j) hys + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModePolynomialQuadratic.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModePolynomialQuadratic.lean new file mode 100644 index 0000000000000000000000000000000000000000..980f47892a6e491f29528863aec721721bd9bb29 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModePolynomialQuadratic.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasModeQuadraticExpansion +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLocalModel + +namespace OAI + +/-! The polynomial part of the quadratic global mode interaction splits +into its zero-phase mean and all nonzero quadratic phases. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance modePolynomialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance modePolynomialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance modePolynomialDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance modePolynomialDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance modePolynomialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance modePolynomialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_mode_polynomial_quadratic {n : A.centers → ℕ} {m : ℕ} + {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) : + A.atlasPolynomialQuadratic P ε F + (spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j)) = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + coordinateQuadraticMean (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 x)+ + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun j => coordinatePhase (A.vectorChartRead i (φ j))) l) + (coordinateQuadraticCoefficient (Q i) ε (A.jetChartMap i F) + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) τ 0 l) x) := by + let W : M → Space := spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j) + have hsum : ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ + (∑ j, surfaceMode τ (φ j) (Z j)) := by + convert ContMDiff.sum (t := Finset.univ) (fun j _ => surfaceMode_smooth τ (hφ j) (hZ j)) using 1 + funext p + simp only [Finset.sum_apply] + have hW : ContMDiff planeModel spaceModel ∞ W := + spaceCoordinates.symm.contDiff.contMDiff.comp hsum + have hsym : ∀ p v w, A.atlasPolynomialQuadratic P ε F W p v w = + A.atlasPolynomialQuadratic P ε F W p w v := A.tensorPlaneRestore_symmetric _ + change A.atlasPolynomialQuadratic P ε F W = _ + rw [← A.tensorPlaneRestore_encode (A.atlasPolynomialQuadratic P ε F W) hsym, + ← A.tensorPlaneRestore_add] + congr 1 + funext i y + rw [A.tensorPlaneEncode_weight] + by_cases hz : A.planeWeight i y = 0 + · simp only [hz,zero_pow (by decide : 2 ≠ 0),zero_smul,Pi.add_apply,zero_add] + · have hx : A.chartWeight i (planeCoordinateIsometry.symm y) ≠ 0 := hz + have hs : planeCoordinateIsometry.symm y ∈ (A.chartWeightCompact i : Set Base) := by + rw [← A.chartWeight_tsupport i] + exact subset_tsupport (A.chartWeight i) hx + have hr := hrep F W hF hW i (planeCoordinateIsometry.symm y) hs ε + simp only [planeCoordinateIsometry.apply_symm_apply] at hr + have he := A.local_mode_polynomial_quadratic i (Q i) ε (A.jetChartMap i F) + τ φ Z hφ hZ hx + simp only [planeCoordinateIsometry.apply_symm_apply] at he + change (A.planeWeight i y)^2 • A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F W) + (planeCoordinateIsometry.symm y) = _ + rw [← hr,he,smul_add] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeQuadraticExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeQuadraticExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..40125633300af1c57074079d06cfad69691593ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasModeQuadraticExpansion.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasModeGerms +import OAI.Geometry.SurfaceImmersion.Correction.MixedPolynomialLocality + +namespace OAI + +/-! The genuine quadratic polynomial of a global mode sum has the usual +mean and nonzero-phase expansion in each active chart. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem local_mode_polynomial_quadratic {n : ℕ} {ι : Type*} + [Fintype ι] [DecidableEq ι] (i : A.centers) + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → JetPolynomial.Space) + (τ : ℝ) (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) + {x : Base} (hx : A.chartWeight i x ≠ 0) : + let φlocal := fun j => A.vectorChartRead i (φ j) + let Zlocal := fun j => A.vectorChartRead i (Z j) + coordinateQuadraticPolynomial P ε G + (A.jetChartMap i (spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j)) ∘ + planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + coordinateQuadraticMean P ε G φlocal Zlocal τ 0 (planeCoordinateIsometry x)+ + ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun j => coordinatePhase (φlocal j)) l) + (coordinateQuadraticCoefficient P ε G φlocal Zlocal τ 0 l) + (planeCoordinateIsometry x) := by + dsimp only + let V := QuadraticMean.sumDisplacement τ + (fun j => coordinatePhase (A.vectorChartRead i (φ j))) + (fun j => coordinateAmplitude (A.vectorChartRead i (Z j))) + have hg : + (A.jetChartMap i (spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j)) ∘ + planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry =ᶠ[𝓝 x] + V ∘ planeCoordinateIsometry := by + have hh := A.jetChartMap_modes_germ i τ φ Z hx + simpa only [Function.comp_def,planeCoordinateIsometry.symm_apply_apply,V] using hh + rw [coordinateQuadraticPolynomial_eq_of_eventuallyEq P ε G hg 0] + exact congrFun (coordinate_quadratic_polynomial_expansion P ε G + (fun j => A.vectorChartRead i (φ j)) (fun j => A.vectorChartRead i (Z j)) + (fun j => A.vectorChartRead_smooth i (hφ j)) + (fun j => A.vectorChartRead_smooth i (hZ j)) τ 0) (planeCoordinateIsometry x) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPhaseMeanDomains.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPhaseMeanDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..08cee1a00333a6ecac98036af915c74caa4145df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPhaseMeanDomains.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PhaseMeanDomains +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSupportedWeights +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! Fixed mean domains and common margins obtained from compact atlas geometry. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +structure PhaseMeanDomains (F : M → Space) (Q : A.centers → PhaseBasis) + (reference : A.centers → SmallModes.Base → Tensor) where + r : ℝ + ρ : ℝ + R : ℝ + r_pos : 0 < r + ρ_pos : 0 < ρ + R_pos : 0 < R + Ω : A.centers → Fin 3 → Set SmallModes.Base + U : A.centers → Fin 3 → Set SmallModes.Base + K : A.centers → Fin 3 → Set SmallModes.Base + openΩ : ∀ i j, IsOpen (Ω i j) + openU : ∀ i j, IsOpen (U i j) + compactK : ∀ i j, IsCompact (K i j) + UK : ∀ i j, U i j ⊆ K i j + KΩ : ∀ i j, K i j ⊆ Ω i j + support : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j + immersion : ∀ i j x, x ∈ Ω i j → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + good : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j) + U₀ : A.centers → Set JetPolynomial.Base + K₀ : A.centers → Compacts JetPolynomial.Base + openU₀ : ∀ i, IsOpen (U₀ i) + U₀K₀ : ∀ i, U₀ i ⊆ K₀ i + supportU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i + margin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r ≤ (Q i).Q j (reference i x) ∧ + (Q i).Q j (reference i x) ≤ R - ‖(Q i).Q j‖*r + +/-- Strict positivity and good geometry on the actual compact supports +supply all domain and margin data for the mean constructor. -/ +theorem exists_phaseMeanDomains (F : M → Space) + (hF : ContMDiff planeModel spaceModel ∞ F) (Q : A.centers → PhaseBasis) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (reference : A.centers → SmallModes.Base → Tensor) + (href : ∀ i, Continuous (reference i)) + (hpos : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + 0 < (Q i).Q j (reference i x)) : Nonempty (A.PhaseMeanDomains F Q reference) := by + classical + choose r ρ R hr hρ hR U K Ω hU hK hΩ hs hUK hKΩ hg hm using fun i : A.centers => + compact_phase_mean_domains + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)) + (modeSupport (A.chartWeightCompact i)) (hImm i) (Q i).ξ (hgood i) + (Q i).Q (reference i) (href i) (hpos i) + obtain ⟨r₀,hr₀,_,hrr⟩ := finite_positive_threshold r hr + obtain ⟨ρ₀,hρ₀,_,hρρ⟩ := finite_positive_threshold ρ hρ + let R₀ : ℝ := 1 + ∑ i : A.centers, R i + have hR₀ : 0 < R₀ := by + have hsum : 0 ≤ ∑ i : A.centers, R i := Finset.sum_nonneg (fun i _ => (hR i).le) + exact add_pos_of_pos_of_nonneg zero_lt_one hsum + have hRR (i : A.centers) : R i ≤ R₀ := by + have hh := Finset.single_le_sum (fun j _ => (hR j).le) (Finset.mem_univ i) + exact hh.trans (le_add_of_nonneg_left zero_le_one) + choose U₀ hU₀ hKU₀ hUc₀ _ using fun i : A.centers => + CollarVelocity.compact_open_thickening (A.chartWeightCompact i).isCompact + isOpen_univ (subset_univ _) + refine ⟨{ + r := r₀, ρ := ρ₀, R := R₀, r_pos := hr₀, ρ_pos := hρ₀, R_pos := hR₀ + Ω := Ω, U := U, K := K, openΩ := hΩ, openU := hU, compactK := hK + UK := hUK, KΩ := hKΩ, support := hs + immersion := fun i j x hx => (hg i j x hx).1 + good := fun i j x hx => (hg i j x hx).2 + U₀ := U₀, K₀ := fun i => ⟨closure (U₀ i),hUc₀ i⟩ + openU₀ := hU₀, U₀K₀ := fun _ => subset_closure, supportU₀ := hKU₀ + margin := ?_ + }⟩ + intro i j x hx + have hh := hm i j x (hUK i j hx) + have hn := mul_le_mul_of_nonneg_left (hrr i) (norm_nonneg ((Q i).Q j)) + have hl := hρρ i + have hu := hRR i + constructor <;> linarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialAmplitudeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialAmplitudeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca519664adbe82f2f899e99d8b2d3ce3e2b6d63b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialAmplitudeBounds.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformSeed +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds + +namespace OAI + +/-! Uniform slow-scale bounds on every chart reading of the actual complex amplitudes. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance ampReadPolynomialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance ampReadPolynomialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance ampReadPolynomialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance ampReadPolynomialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance ampReadPolynomialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance ampReadPolynomialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_polynomial_atlas_amplitude_reads + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (q m : ℕ) (C : ℝ) (hC : 0 ≤ C) : + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + ∃ B : ℝ, 1 ≤ B ∧ ∀ {ε τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → (∀ i, τ/s+ε/τ^tensorLoss (P i) ≤ 1) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + A.TensorWeightedBound s N C u → + ∀ k i j, WeightedEstimates.WeightedBound univ s m (B*(δ*τ)) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u i j)) := by + classical + dsimp only + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i + (PolynomialSolveData.inputOrder (P := P i) q m) + let C' := fun i => max 1 (D i*C) + choose B hB hb using fun (i : A.centers) (j : Fin 3) => + uniform_charted_seed_bound (R := R) (p i j) hρ q m (C' i) + choose E hE he using fun k i : A.centers => + A.localize_outer_restore_bound (V := Fin 4 → ℂ) k i m + let Q := fun a : A.centers × A.centers × Fin 3 => E a.1 a.2.1 * B a.2.1 a.2.2 + have hQ (a) : 0 ≤ Q a := mul_nonneg (hE a.1 a.2.1) (zero_le_one.trans (hB a.2.1 a.2.2)) + have htotal : 0 ≤ ∑ a, Q a := Finset.sum_nonneg (fun a _ => hQ a) + refine ⟨1+∑ a, Q a,by linarith,?_⟩ + intro ε τ s d hd hτ hs hτs hs1 hε hsmall δ hδ u hu hball hbu k i j + have horder : PolynomialSolveData.inputOrder (P := P i) q m ≤ N := Finset.le_sup + (f := fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) (Finset.mem_univ i) + have hlocal := (hread i u s C hs hs1 hC hu (fun k => (hbu k).mono_order horder)).mono_const + (le_max_right 1 (D i*C)) + have hseed := hb i j ((d i).data j) (hd i j) hτ hs hτs hs1 hε (hsmall i) δ hδ + (A.tensorPlaneRead i u) (zero_le_one.trans (le_max_left _ _)) + (A.tensorPlaneRead_smooth i hu) (hball i) hlocal + have hout := he k i ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)) s + (B i j*(δ*τ)) hs hs1 (mul_nonneg (zero_le_one.trans (hB i j)) (mul_nonneg hδ hτ.le)) + (((d i).data j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff hseed + have hplane := weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth k (A.freeGlobalAmplitude_smooth d hρ δ q u i j)) hout + change WeightedEstimates.WeightedBound univ s m (E k i*(B i j*(δ*τ))) + (A.vectorPlaneRead k (A.freeGlobalAmplitude d hρ δ q u i j)) at hplane + apply hplane.mono_const + have ht : E k i*B i j ≤ ∑ a, Q a := + Finset.single_le_sum (fun a _ => hQ a) (Finset.mem_univ (k,i,j)) + calc + E k i*(B i j*(δ*τ)) = (E k i*B i j)*(δ*τ) := by ring + _ ≤ (1+∑ a, Q a)*(δ*τ) := + mul_le_mul_of_nonneg_right (by linarith) (mul_nonneg hδ hτ.le) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ed36857557275f04758339e3438f2600da12f91 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCalculus.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Correction.CoordinatePolynomialCalculus +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorDerivatives + +namespace OAI + +/-! First and second derivatives of the globally restored polynomial +are the operators used in its exact Taylor identity. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialDerivativeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialDerivativeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialDerivativeDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialDerivativeDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialDerivativeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialDerivativeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma jetChartMap_affine (i : A.centers) (F X : M → Space) (s : ℝ) : + A.jetChartMap i (F+s • X) = A.jetChartMap i F+s • A.jetChartMap i X := by + rw [A.jetChartMap_add] + congr 1 + funext x + change spaceCoordinates (localize (i : M) (A.outer i) (s • X) x) = + s • spaceCoordinates (localize (i : M) (A.outer i) X x) + rw [localize_smul] + exact map_smul spaceCoordinates s _ + +lemma atlasPolynomialValue_hasDerivAt {n : A.centers → ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) (ε : ℝ) + {F X : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hX : ContMDiff planeModel spaceModel ∞ X) (p : M) : + HasDerivAt (fun s : ℝ => A.atlasPolynomialValue P ε (F+s • X) p) + (A.atlasPolynomialVariation P ε F X p) 0 := by + unfold atlasPolynomialValue atlasPolynomialVariation + apply A.tensorPlaneRestore_hasDerivAt + intro i + simp only [A.jetChartMap_affine] + exact coordinatePolynomialValue_hasDerivAt (hP i) ε 0 + (A.jetChartMap_smooth i hF) (A.jetChartMap_smooth i hX) (chart (i : M) p) + +lemma atlasPolynomialVariation_hasDerivAt {n : A.centers → ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) (ε : ℝ) + {F X : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hX : ContMDiff planeModel spaceModel ∞ X) (p : M) : + HasDerivAt (fun s : ℝ => A.atlasPolynomialVariation P ε (F+s • X) X p) + ((2 : ℝ) • A.atlasPolynomialQuadratic P ε F X p) 0 := by + have hd := A.tensorPlaneRestore_hasDerivAt + (f := fun s i => coordinateRealLinearized (P i) ε + (A.jetChartMap i F+s • A.jetChartMap i X) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0) + (f' := fun i => (2 : ℝ) • coordinateQuadraticPolynomial (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0) p (fun i => + coordinateRealLinearized_hasDerivAt (hP i) ε 0 + (A.jetChartMap_smooth i hF) (A.jetChartMap_smooth i hX) (chart (i : M) p)) + change HasDerivAt _ (A.tensorPlaneRestore ((2 : ℝ) • fun i => + coordinateQuadraticPolynomial (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0) p) 0 at hd + rw [A.tensorPlaneRestore_smul] at hd + simpa only [atlasPolynomialVariation,atlasPolynomialQuadratic,A.jetChartMap_affine, + Pi.smul_apply] using hd + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f16f13644e3512b246157fb209ad81b059c41e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCancellation.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLinearized +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialCancellation + +namespace OAI + +/-! Finite cancellation for the derivative of the actual globally restored +polynomial metric, with local polynomials derived from that metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance polyCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polyCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polyCancellationDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polyCancellationDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polyCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polyCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_polynomial_finite_cancellation + {n : A.centers → ℕ} {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) : + ∃ (Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression) + (Dv Dt : ℕ → ℝ), + (∀ i k l, (Q i k l).SmoothCoeffs univ) ∧ + A.PolynomialQuadraticRepresentation P Q ∧ + A.PolynomialLinearRepresentation P Q ∧ + (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : ∀ i : A.centers, ι i → Base → ℝ) + (K : ∀ i : A.centers, ι i → TopologicalSpace.Compacts Base) + (ε τ : ℝ) (s : ℝ≥0) + (c : ∀ i j, PolynomialSolveData (Q i) ε (A.jetChartMap i F) + (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ 1) → + (∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), ∀ q : ℕ, + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (Dv m * ∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (Dt m * ∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + obtain ⟨Q,hQ,hquad,hrepr⟩ := A.full_linearized_representatives P hP + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.tensorPlaneRestore_bound m + refine ⟨Q,Dv,Dt,hQ,hquad,hrepr,hDv,hDt,?_⟩ + intro F hF φ K ε τ s c hτ hs hτs hs1 hε hsmall hK target q + choose X hX hsupport hsize hres using fun i : A.centers => + finite_polynomial_cancellation (Q i) ε (A.jetChartMap_smooth i hF) (φ i) (K i) (c i) + hτ hs hτs hs1 hε (hsmall i) (target i) q + have hsp (i : A.centers) : tsupport (X i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp (hsupport i hx) + exact hK i j hj + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := by + apply ContDiff.sum + intro j _ + exact contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((c i j).smoothPhase.comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hsz (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).size (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).size_nonneg (target i j) q m) + have hrr (i : A.centers) (m : ℕ) : 0 ≤ ∑ j, (c i j).residual (target i j) q m := + Finset.sum_nonneg (fun j _ => (c i j).residual_nonneg + (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) + (target i j) q m) + refine ⟨A.vectorPlaneRestore X,A.vectorPlaneRestore_smooth X hX,?_,?_⟩ + · intro m + apply hv m X τ (∑ i : A.centers, ∑ j, (c i j).size (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hsz i m)) hX + intro i + exact (hsize i m).mono_const (Finset.single_le_sum (fun k _ => hsz k m) (Finset.mem_univ i)) + · intro m + rw [hrepr F hF X hX hsp ε,← A.tensorPlaneRestore_add] + apply ht m _ τ (∑ i : A.centers, ∑ j, (c i j).residual (target i j) q m) + hτ (hτs.trans hs1) (Finset.sum_nonneg (fun i _ => hrr i m)) + · intro i + apply ContDiff.add _ (hT i) + exact coordinateFullLinearized_smooth isOpen_univ isOpen_univ (Q i) (hQ i) + (A.jetChartMap_smooth i hF) (fun _ _ => mem_univ _) + (A.chartWeightCompact i) (subset_univ _) (hX i) (hsp i) ε + · intro i + exact (hres i m).mono_const (Finset.single_le_sum (fun k _ => hrr k m) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCoordinateRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCoordinateRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..145b8231d7142fe8701e5adc4b4a69041d5a64f8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialCoordinateRead.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LocalizedCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Atlas.CompactCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation + +namespace OAI + +/-! A polynomial in one localized atlas map has an actual finite jet +expression in another chart, on the nonzero partition-weight locus. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_polynomial_coordinate_read (i j : A.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {K : Set Base} (hK : IsCompact K) + (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), x ∈ U → A.weight i ((chart (i : M)).symm x) ≠ 0 → + ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t (JetPolynomial.planeCoordinateIsometry x) = + coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x)) := by + let e := transition (i : M) (j : M) + have hei : ContDiffOn ℝ ∞ e.symm e.target := by + have hs : e.symm = transition (j : M) (i : M) := by + simp [e,transition,OpenPartialHomeomorph.trans_symm_eq_symm_trans_symm] + rw [hs] + exact transition_smooth (j : M) (i : M) + obtain ⟨U₁,hU₁,hKU₁,hU₁e,T,S,hT,hS,hTe,hST,hTS⟩ := + JetPolynomial.compact_coordinate_representatives e (transition_smooth (i : M) (j : M)) hei hK hKe + obtain ⟨U₂,hU₂,hKU₂,hU₂e,a,ha,hae,_,hrel⟩ := A.compact_jetChartMap_transition i j hK hKe + let U := U₁ ∩ U₂ + refine ⟨U,hU₁.inter hU₂,fun x hx => ⟨hKU₁ hx,hKU₂ hx⟩, + fun x hx => hU₁e hx.1,localizedPolynomialPullback P T S a, + localizedPolynomialPullback_smooth hP hT hS ha,?_⟩ + intro F hF x hx hw ε t + have hgerm : (fun y => a y • A.jetChartMap i F y) =ᶠ[𝓝 x] + (A.jetChartMap j F ∘ T) := by + filter_upwards [hrel F x hx.2 hw,hU₁.mem_nhds hx.1] with y hy hyU + change a y • A.jetChartMap i F y = A.jetChartMap j F (T y) + rw [hTe hyU] + exact hy.symm + have hv := localizedPolynomialPullback_eval P hT hS ha hU₁ hST hTS + (A.jetChartMap_smooth j hF) (A.jetChartMap_smooth i hF) hx.1 hgerm ε t + simpa only [hTe hx.1] using hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..ee267672476300c994b6e17d987b0b50395c15ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeResidual.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeOscillation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLinearized +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedIncrementEstimate + +namespace OAI + +/-! Uniform global metric-linear residual of the actual free oscillation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance polynomialFreeResidualFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialFreeResidualFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialFreeResidualDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialFreeResidualDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialFreeResidualSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialFreeResidualSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_polynomial_free_residual + {n : A.centers → ℕ} {mQ : ℕ} + (Pglobal : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (P : A.centers → Fin 3 → Fin mQ → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (hrep : A.PolynomialLinearRepresentation Pglobal P) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (q m : ℕ) (C : ℝ) (hC : 0 ≤ C) : + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + ∃ B : ℝ, 1 ≤ B ∧ ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + {ε τ η : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)), + (∀ i, (d i).G = A.jetChartMap i F) → + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → 0 ≤ η → η ≤ 1 → + (∀ i, τ/s + ε/τ^tensorLoss (P i) ≤ η) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + A.TensorWeightedBound s N C u → + A.TensorWeightedBound τ m (B*(δ*τ)*η^(q+1)) + (linearMetricTensor F (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u)+ + A.atlasPolynomialVariation Pglobal ε F + (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u)) := by + classical + dsimp only + let N := Finset.univ.sup (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + choose D hD hread using fun i : A.centers => A.tensorPlaneRead_bound i + (PolynomialSolveData.inputOrder (P := P i) q m) + let C' := fun i => max 1 (D i*C) + choose B E hB hE hfree using fun i : A.centers => + uniform_charted_free_family (R := R) (r := r i) (reference := reference i) (p i) hρ q m (C' i) + let S := 1 + ∑ i : A.centers, E i + have hS (i : A.centers) : E i ≤ S := by + have hh := Finset.single_le_sum (s := (Finset.univ : Finset A.centers)) + (f := E) (fun i _ => zero_le_one.trans (hE i)) (Finset.mem_univ i) + change E i ≤ 1 + ∑ i : A.centers, E i + linarith + have hS0 : 0 ≤ S := by + have hh : 0 ≤ ∑ i : A.centers, E i := Finset.sum_nonneg (fun i _ => zero_le_one.trans (hE i)) + change 0 ≤ 1 + ∑ i : A.centers, E i + linarith + obtain ⟨D₀,hD₀,hrestore⟩ := A.tensorPlaneRestore_bound m + refine ⟨max 1 (D₀*S),le_max_left _ _,?_⟩ + intro F hF ε τ η s d hG hd hτ hs hτs hs1 hε hη hη1 hηle hK δ hδ u hu hball hbu + have hlocal (i : A.centers) : WeightedEstimates.WeightedBound univ s + (PolynomialSolveData.inputOrder (P := P i) q m) (C' i) (A.tensorPlaneRead i u) := by + have horder : PolynomialSolveData.inputOrder (P := P i) q m ≤ N := Finset.le_sup + (f := fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q m) + (Finset.mem_univ i) + have hbu' : A.TensorWeightedBound s (PolynomialSolveData.inputOrder (P := P i) q m) C u := + fun k => (hbu k).mono_order horder + exact (hread i u s C hs hs1 hC hu hbu').mono_const (le_max_right _ _) + let f := fun i => chartedFreeSum (d i).data hρ δ q (A.tensorPlaneRead i u) + have hf (i : A.centers) : ContDiff ℝ ∞ (f i) := + (chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).1 + have hsp (i : A.centers) : tsupport (f i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp + ((chartedFreeSum_smooth_support (d i).data hρ δ q (A.tensorPlaneRead i u)).2 hx) + exact hK i j hj + have hres (i : A.centers) : WeightedEstimates.WeightedBound univ τ m + (S*(δ*τ)*η^(q+1)) + (coordinateFullLinearized (P i) ε (A.jetChartMap i F) (f i)) := by + have hh := (hfree i (d i).data (hd i) hτ hs hτs hs1 hε + ((hηle i).trans hη1) δ hδ + (A.tensorPlaneRead i u) (zero_le_one.trans (le_max_left _ _)) + (A.tensorPlaneRead_smooth i hu) (hball i) (hlocal i)).2 + change WeightedEstimates.WeightedBound univ τ m + (E i*(δ*τ)*(τ/s+ε/τ^tensorLoss (P i))^(q+1)) + (coordinateFullLinearized (P i) ε (d i).G (f i)) at hh + rw [hG i] at hh + apply hh.mono_const + have hlocalη : 0 ≤ τ/s+ε/τ^tensorLoss (P i) := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + exact mul_le_mul (mul_le_mul_of_nonneg_right (hS i) (mul_nonneg hδ hτ.le)) + (pow_le_pow_left₀ hlocalη (hηle i) _) (pow_nonneg hlocalη _) + (mul_nonneg hS0 (mul_nonneg hδ hτ.le)) + change A.TensorWeightedBound τ m _ + (linearMetricTensor F (spaceCoordinates.symm ∘ A.vectorPlaneRestore f)+ + A.atlasPolynomialVariation Pglobal ε F (spaceCoordinates.symm ∘ A.vectorPlaneRestore f)) + rw [hrep F hF f hf hsp ε] + have hh := hrestore _ τ (S*(δ*τ)*η^(q+1)) hτ (hτs.trans hs1) + (by positivity) (fun i => coordinateFullLinearized_smooth_global (hP i) + (A.jetChartMap_smooth i hF) (hf i) ε) hres + intro i + apply (hh i).mono_const + calc + D₀*(S*(δ*τ)*η^(q+1)) = (D₀*S)*(δ*τ)*η^(q+1) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hδ hτ.le)) + (pow_nonneg hη _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeSplit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..aa06850ffc4b93cf3846e4163dc1b5ed39bc7b6a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialFreeSplit.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RestoredQuadratureMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalFreeModes +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRestoreFinite +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedMeanIdentity +import OAI.Geometry.SurfaceImmersion.Correction.RestoredPolynomialModeMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLinearity +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeMetricSplit + +namespace OAI + +/-! The global finite phase expansion has the prescribed quadratic mean. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance polynomialFreeSplitFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialFreeSplitFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialFreeSplitDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialFreeSplitDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialFreeSplitSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialFreeSplitSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +attribute [local instance] Classical.propDecidable + +theorem atlas_free_full_polynomial_split {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (Q i) ε τ s (r i) ρ R (reference i)) + (hmap : ∀ i, (d i).G = A.jetChartMap i F) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + inducedTensor U+A.atlasPolynomialQuadratic P ε F U = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u))+ + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel (A.centers × Fin 3), + QuadraticMean.displacement τ + (coordinatePhase (A.globalQuadraticPhase + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d a.1 a.2) i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d a.1 a.2) + (fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d a.1 a.2) + (fun a => A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2) i l) x) := by + classical + have hh := A.global_modes_full_quadratic P Q hQ hrep F hF ε τ + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d a.1 a.2) + (fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d a.1 a.2) + (fun a => A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2) + have he : (∑ a : A.centers × Fin 3, + surfaceMode τ (A.freeGlobalPhase d a.1 a.2) (A.freeGlobalAmplitude d hρ δ q u a.1 a.2)) = + A.atlasFreeOscillation d hρ δ q u := by + rw [Fintype.sum_prod_type] + exact (A.atlas_free_global_modes d hρ δ q u hK).symm + dsimp only at hh ⊢ + rw [he,A.atlas_global_polynomial_mean P Q hrep F hF d hmap hρ δ q u hK] at hh + exact hh + + +/-- Exact error decomposition before estimating the mixed and cubic terms. -/ +theorem polynomial_modes_free_forced_increment {n : A.centers → ℕ} {m : ℕ} + {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F V : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (hV : ContMDiff planeModel spaceModel ∞ V) (ε τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) + (T : ∀ p : M, CovariantTwoTensor p) : + let U := spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j) + let O := A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x) + A.atlasPolynomialMetric P ε (F+(U+V))-A.atlasPolynomialMetric P ε F-T = + (linearMetricTensor F U+A.atlasPolynomialVariation P ε F U)+ + (linearMetricTensor F V+A.atlasPolynomialVariation P ε F V+O)+ + (A.globalPolynomialQuadraticMean Q F ε τ φ Z-T)+ + ((inducedTensor (U+V)+A.atlasPolynomialQuadratic P ε F (U+V))- + (inducedTensor U+A.atlasPolynomialQuadratic P ε F U))+ + A.atlasPolynomialRemainder P ε F (U+V) := by + classical + let U := spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j) + have hsum : ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ + (∑ j, surfaceMode τ (φ j) (Z j)) := by + convert ContMDiff.sum (t := Finset.univ) (fun j _ => surfaceMode_smooth τ (hφ j) (hZ j)) using 1 + funext p + simp only [Finset.sum_apply] + have hU : ContMDiff planeModel spaceModel ∞ U := + spaceCoordinates.symm.contDiff.contMDiff.comp hsum + have he := A.global_modes_full_quadratic P Q hQ hrep F hF ε τ φ Z hφ hZ + dsimp only at he ⊢ + have ht := A.atlas_polynomial_metric_taylor_identity P ε hF (hU.add hV) + have hl := A.atlasPolynomialVariation_add P ε F hU hV + have hm : linearMetricTensor F (U+V) = linearMetricTensor F U+linearMetricTensor F V := by + have hh := linearMetricTensor_finite_sum F ![U,V] (by + intro j + fin_cases j + · exact hU + · exact hV) + convert hh using 1 + · simp only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one] + · funext p + simp only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one,Pi.add_apply] + rw [ht,hl,hm] + change _ = _ + rw [he] + abel + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialIncrementBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialIncrementBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4ad343f1200246b736833d49d6937cea6a833a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialIncrementBound.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialSmooth +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLinearity + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance polynomialIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance polynomialIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialIncrementSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + + + +/-- Combine the actual free, forced and mean residuals, with the derived +mixed-polynomial and Taylor bounds, into a bound for the changed metric. -/ +theorem atlas_polynomial_increment_bound (m : ℕ) (A₀ B₀ : ℝ) + (hA : 0 ≤ A₀) (hB : 0 ≤ B₀) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (_hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (F U V : M → Space), ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ U → ContMDiff planeModel spaceModel ∞ V → + ∀ (T H : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (T p)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + ∀ (τ ε δ C₁ C₂ C₃ E₁ E₂ : ℝ), 0 < τ → τ ≤ 1 → 0 ≤ δ → δ ≤ τ → + A.WeightedBound τ (m+1) (A₀*(δ*τ)) U → + A.WeightedBound τ (m+1) (B₀*δ^2) V → + A.TensorWeightedBound τ m C₁ + (linearMetricTensor F U+A.atlasPolynomialVariation P ε F U) → + A.TensorWeightedBound τ m C₂ + (linearMetricTensor F V+A.atlasPolynomialVariation P ε F V+ + (inducedTensor U+A.atlasPolynomialQuadratic P ε F U)-H) → + A.TensorWeightedBound τ m C₃ (H-T) → + A.TensorWeightedBound τ m (E₁*(δ^3/τ)) + (A.atlasPolynomialQuadratic P ε F (U+V)-A.atlasPolynomialQuadratic P ε F U) → + A.TensorWeightedBound τ m (E₂*(δ^3/τ)) (A.atlasPolynomialRemainder P ε F (U+V)) → + A.TensorWeightedBound τ m (C₁+C₂+C₃+(D+E₁+E₂)*(δ^3/τ)) + (A.atlasPolynomialMetric P ε (F+(U+V))-A.atlasPolynomialMetric P ε F-T) := by + obtain ⟨D,hD,hd⟩ := A.global_cubic_remainder_bound m A₀ B₀ hA hB + refine ⟨D,hD,?_⟩ + intro n P hP F U V hF hU hV T H hT hH τ ε δ C₁ C₂ C₃ E₁ E₂ + hτ hτ1 hδ hδτ hbU hbV h₁ h₂ h₃ h₄ h₅ + have hUV := hU.add hV + have hLU := (A.linearMetricTensor_smooth hF hU).add_section + (A.atlasPolynomialVariation_smooth hP hF hU ε) + have hLV := (A.linearMetricTensor_smooth hF hV).add_section + (A.atlasPolynomialVariation_smooth hP hF hV ε) + have hQU := (A.inducedTensor_smooth hU).add_section + (A.atlasPolynomialQuadratic_smooth hP hF hU ε) + have hs₂ := (hLV.add_section hQU).sub_section hH + have hs₃ := hH.sub_section hT + have hM := (A.linearMetricTensor_smooth hU hV).add_section (A.inducedTensor_smooth hV) + have hPol := (A.atlasPolynomialQuadratic_smooth hP hF hUV ε).sub_section + (A.atlasPolynomialQuadratic_smooth hP hF hU ε) + have hRem := A.atlasPolynomialRemainder_smooth hP hF hUV ε + have hb₁ := A.tensorWeightedBound_add hLU hs₂ hτ.le h₁ h₂ + have hb₂ := A.tensorWeightedBound_add (hLU.add_section hs₂) hs₃ hτ.le hb₁ h₃ + have hb₃ := A.tensorWeightedBound_add ((hLU.add_section hs₂).add_section hs₃) hM hτ.le hb₂ + (hd τ δ hτ hτ1 hδ hδτ U V hU hV hbU hbV) + have hb₄ := A.tensorWeightedBound_add + (((hLU.add_section hs₂).add_section hs₃).add_section hM) hPol hτ.le hb₃ h₄ + have hb₅ := A.tensorWeightedBound_add + ((((hLU.add_section hs₂).add_section hs₃).add_section hM).add_section hPol) hRem hτ.le hb₄ h₅ + have hlin : linearMetricTensor F (U+V) = linearMetricTensor F U+linearMetricTensor F V := by + have hh := linearMetricTensor_finite_sum F ![U,V] (by + intro j + fin_cases j + · exact hU + · exact hV) + convert hh using 1 + · simp only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one] + · funext p + simp only [Fin.sum_univ_two,Matrix.cons_val_zero,Matrix.cons_val_one,Pi.add_apply] + have herr : A.atlasPolynomialMetric P ε (F+(U+V))-A.atlasPolynomialMetric P ε F-T = + (((((linearMetricTensor F U+A.atlasPolynomialVariation P ε F U)+ + (linearMetricTensor F V+A.atlasPolynomialVariation P ε F V+ + (inducedTensor U+A.atlasPolynomialQuadratic P ε F U)-H))+(H-T))+ + (linearMetricTensor U V+inducedTensor V))+ + (A.atlasPolynomialQuadratic P ε F (U+V)-A.atlasPolynomialQuadratic P ε F U))+ + A.atlasPolynomialRemainder P ε F (U+V) := by + rw [A.atlas_polynomial_metric_taylor_identity P ε hF hUV, + A.atlasPolynomialVariation_add P ε F hU hV,hlin,inducedTensor_add hU hV] + abel + rw [herr] + convert hb₅ using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInputCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInputCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc76fc43bb64430640e7a3231dda60ebb898d2b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInputCancellation.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialNearbyCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseStability + +namespace OAI + +/-! Uniform atlas cancellation from the global norms used in the iteration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputPhasePolynomialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputPhasePolynomialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputPhasePolynomialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputPhasePolynomialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputPhasePolynomialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputPhasePolynomialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_polynomial_input_cancellation_all_profiles + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (Q : A.centers → Fin 3 → Fin nq → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hrepr : A.PolynomialLinearRepresentation Pol Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hUK : ∀ i, U i ⊆ KU i) (hKU : ∀ i j, (K i j : Set JetPolynomial.Base) ⊆ U i) + : ∃ ρ : ℝ, 0 < ρ ∧ ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → ∀ q : ℕ, + ∃ C D : (i : A.centers) → ι i → ℕ → ℝ, + (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → A.WeightedBound 1 2 B (G-F) → + ∀ (τ ε η : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → 0 ≤ η → η ≤ 1 → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ η) → + (∀ m, A.ShiftedBound 2 m s (P m) G) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (η^(q+1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.atlasPolynomialVariation Pol ε G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + choose E hE he using fun (i : A.centers) m => A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + choose E₀ hE₀ he₀ using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i 2 + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + obtain ⟨r,hr,hall⟩ := A.atlas_polynomial_nearby_cancellation_all_profiles Pol Q hQ hrepr F hF φ hφ K hK + hImm hgood U hU KU hUK hKU + have hL₀ (i) : 0 ≤ L*E₀ i := mul_nonneg (norm_nonneg _) (hE₀ i) + obtain ⟨ρ,hρ,_,hρr⟩ := finite_positive_threshold + (fun a : (i : A.centers) × ι i => r a.1 a.2/(1+L*E₀ a.1)) + (fun a => div_pos (hr a.1 a.2) (by linarith [hL₀ a.1])) + refine ⟨ρ,hρ,?_⟩ + intro P hP q + let R := fun i m => L*E i m*P m + have hR (i m) : 0 ≤ R i m := mul_nonneg (mul_nonneg (norm_nonneg _) (hE i m)) (hP m) + obtain ⟨C,D,hC,hD,hsolve⟩ := hall R hR q + refine ⟨C,D,hC,hD,?_⟩ + intro G hG B hB hBρ hb τ ε η s hτ hs hτs hs1 hε hε1 hη hη1 hsmall hp target + have hbnd (i j) : L*E₀ i*B < r i j := by + have hh := (lt_div_iff₀ (show 0 < 1+L*E₀ i by linarith [hL₀ i])).mp + (hBρ.trans_le (hρr ⟨i,j⟩)) + nlinarith + apply hsolve G hG (fun i _ => L*E₀ i*B) + (fun i _ => mul_nonneg (hL₀ i) hB) hbnd _ τ ε η s hτ hs hτs hs1 hε hε1 hη hη1 hsmall _ target + · intro i _ + have hh := (he₀ i (G-F) 1 B zero_lt_one le_rfl hB (hG.sub hF) hb).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn + spaceCoordinates.toContinuousLinearMap + simp only [ContinuousLinearEquiv.coe_coe] at hh + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hh + have hsub : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [hsub] at hh + simpa only [L,mul_assoc] using hh + · intro i m j hj + have hh := (he i m G s (P m) hs hs1 (hP m) hG (hp m) j (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + simpa only [R,L,mul_assoc,mul_div_assoc,ContinuousLinearEquiv.coe_coe] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInteractionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInteractionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..542bcf875b8ae059676a41bc1c20f955a1de48dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialInteractionBounds.lean @@ -0,0 +1,118 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorLocalBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInteractionBounds + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance atlasInteractionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasInteractionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance atlasInteractionDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasInteractionDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasInteractionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasInteractionSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + + +lemma atlasPolynomialQuadratic_difference {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) (ε : ℝ) + (F X Y : M → Space) (hX : ContMDiff planeModel spaceModel ∞ X) + (hY : ContMDiff planeModel spaceModel ∞ Y) : + A.atlasPolynomialQuadratic P ε F (X+Y)-A.atlasPolynomialQuadratic P ε F X = + A.tensorPlaneRestore (fun i => coordinatePolynomialInteraction (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm)) := by + unfold atlasPolynomialQuadratic + rw [← A.tensorPlaneRestore_sub] + congr 1 + funext i + have he : A.jetChartMap i (X+Y) ∘ planeCoordinateIsometry.symm = + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)+ + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm) := by + rw [A.jetChartMap_add] + rfl + simp only [Pi.sub_apply,he,coordinate_quadratic_add (P i) ε (A.jetChartMap i F) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + ((A.jetChartMap_smooth i hY).comp planeCoordinateIsometry.symm.contDiff),add_sub_cancel_left] + +/-- The mixed polynomial error is cubic in the correction amplitude after +using the fixed loss condition. -/ +theorem atlas_polynomial_interaction_bound {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) + (Q : A.centers → Set LowJet) (hQ : ∀ i, IsCompact (Q i)) + (m : ℕ) (B C D : A.centers → ℝ) (hB : ∀ i, 1 ≤ B i) + (hC : ∀ i, 0 < C i) (hD : ∀ i, 0 < D i) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (F X Y : M → Space), + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ X → + ContMDiff planeModel spaceModel ∞ Y → + ∀ τ ε δ : ℝ, 0 < τ → τ ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < δ → δ ≤ τ → + (∀ i, ε/τ^tensorLoss (P i) ≤ 1) → + (∀ i, MapsTo (lowJet (A.jetChartMap i F)) (U i) (Q i)) → + (∀ i, WeightedEstimates.WeightedBound (U i) τ (m+tensorOrder (P i)) (B i) + (lowJet (A.jetChartMap i F))) → + (∀ i, WeightedEstimates.WeightedBound univ τ (m+tensorOrder (P i)+1) + (C i*δ*τ) (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)) → + (∀ i, WeightedEstimates.WeightedBound univ τ (m+tensorOrder (P i)+1) + (D i*δ^2) (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm)) → + A.TensorWeightedBound τ m (E*(δ^3/τ)) + (A.atlasPolynomialQuadratic P ε F (X+Y)-A.atlasPolynomialQuadratic P ε F X) := by + classical + choose E hE he using fun i : A.centers => scaled_polynomial_interaction_bound (hU i) (hQ i) + (P i) (hP i) m (B i) (hB i) + obtain ⟨D₀,hD₀,hd⟩ := A.tensorPlaneRestore_bound_on_outer U hU houter m + let S := ∑ i : A.centers, E i*(C i*D i+(D i)^2) + have hS : 0 ≤ S := Finset.sum_nonneg (fun i _ => mul_nonneg (hE i) + (add_nonneg (mul_nonneg (hC i).le (hD i).le) (sq_nonneg _))) + refine ⟨D₀*S,mul_nonneg hD₀ hS,?_⟩ + intro F X Y hF hX hY τ ε δ hτ hτ1 hε hε1 hδ hδτ hsmall hGQ hGb hXb hYb + have hlocal (i : A.centers) := he i (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm) τ ε δ (C i) (D i) + hτ hτ1 hε hε1 hδ hδτ (hC i) (hD i) (hsmall i) (A.jetChartMap_smooth i hF) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + ((A.jetChartMap_smooth i hY).comp planeCoordinateIsometry.symm.contDiff) + (hGQ i) (hGb i) (hXb i) (hYb i) + have hb (i : A.centers) : WeightedEstimates.WeightedBound + (planeCoordinateIsometry.symm ⁻¹' U i) τ m (S*(δ^3/τ)) + (coordinatePolynomialInteraction (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm)) := + (hlocal i).mono_const (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => mul_nonneg (hE j) + (add_nonneg (mul_nonneg (hC j).le (hD j).le) (sq_nonneg _))) (Finset.mem_univ i)) + (div_nonneg (pow_nonneg hδ.le _) hτ.le)) + have hh := hd _ (fun i => coordinatePolynomialInteraction_smooth (hP i) + (A.jetChartMap_smooth i hF) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + ((A.jetChartMap_smooth i hY).comp planeCoordinateIsometry.symm.contDiff) ε) + τ (S*(δ^3/τ)) hτ hτ1 (mul_nonneg hS (div_nonneg (pow_nonneg hδ.le _) hτ.le)) hb + rw [A.atlasPolynomialQuadratic_difference P ε F X Y hX hY] + simpa only [mul_assoc] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..cc6407a24884e963892ba73f6daaffebde03cb04 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearity.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialSupport + +namespace OAI + +/-! Finite linearity in the direction of the actual global polynomial. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma coordinateRealLinearized_add {n : ℕ} (P : Fin 3 → Fin n → Expression) + (ε : ℝ) (G : Base → Space) {X Y : RealModes.RField 4} + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) (t : ℝ) : + coordinateRealLinearized P ε G (X+Y) t = + coordinateRealLinearized P ε G X t+coordinateRealLinearized P ε G Y t := by + funext p k + change linearized (P k) ε G (fun x => X (planeCoordinateIsometry x)+Y (planeCoordinateIsometry x)) + t (planeCoordinateIsometry.symm p) = _ + exact linearized_add (P k) ε G (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) t (planeCoordinateIsometry.symm p) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialLinearFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialLinearFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialLinearDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialLinearDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialLinearSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialLinearSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma atlasPolynomialVariation_add {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) (ε : ℝ) (F : M → Space) + {X Y : M → Space} (hX : ContMDiff planeModel spaceModel ∞ X) + (hY : ContMDiff planeModel spaceModel ∞ Y) : + A.atlasPolynomialVariation P ε F (X+Y) = + A.atlasPolynomialVariation P ε F X+A.atlasPolynomialVariation P ε F Y := by + unfold atlasPolynomialVariation + rw [← A.tensorPlaneRestore_add] + congr 1 + funext i + have he : A.jetChartMap i (X+Y) ∘ planeCoordinateIsometry.symm = + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)+ + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm) := by + rw [A.jetChartMap_add] + rfl + rw [he,coordinateRealLinearized_add (P i) ε _ + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + ((A.jetChartMap_smooth i hY).comp planeCoordinateIsometry.symm.contDiff)] + rfl + +omit [CompactSpace M] in +lemma atlasPolynomialVariation_zero {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) (ε : ℝ) (F : M → Space) : + A.atlasPolynomialVariation P ε F 0 = 0 := by + funext p + exact A.atlasPolynomialVariation_zero_of_notMem P ε F 0 (by simp) + +lemma atlasPolynomialVariation_sum {n : A.centers → ℕ} {ι : Type*} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) (ε : ℝ) (F : M → Space) + (S : Finset ι) (X : ι → M → Space) (hX : ∀ i, ContMDiff planeModel spaceModel ∞ (X i)) : + A.atlasPolynomialVariation P ε F (∑ i ∈ S, X i) = + ∑ i ∈ S, A.atlasPolynomialVariation P ε F (X i) := by + classical + induction S using Finset.induction_on with + | empty => simp only [Finset.sum_empty,A.atlasPolynomialVariation_zero] + | @insert i S hi ih => + have hs : ContMDiff planeModel spaceModel ∞ (∑ j ∈ S, X j) := by + convert ContMDiff.sum (t := S) (fun j _ => hX j) using 1 + funext p + simp only [Finset.sum_apply] + rw [Finset.sum_insert hi,A.atlasPolynomialVariation_add P ε F (hX i) hs,ih, + Finset.sum_insert hi] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearized.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearized.lean new file mode 100644 index 0000000000000000000000000000000000000000..a16dd3239ed6db3e0e7c26db16d447f445a05ce1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLinearized.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasRestoredPolynomialDirection +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLinearity + +namespace OAI + +/-! The actual global polynomial linearization is assembled from the +constructed local representatives, for every supported family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialAssemblyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialAssemblyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialAssemblyDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialAssemblyDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialAssemblySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialAssemblySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_linearized_representatives {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) : + ∃ Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ i k r, (Q i k r).SmoothCoeffs univ) ∧ + A.PolynomialQuadraticRepresentation P Q ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (X : A.centers → RealModes.RField 4), (∀ i, ContDiff ℝ ∞ (X i)) → + (∀ i, tsupport (X i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ ε : ℝ, + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ A.vectorPlaneRestore X) = + A.tensorPlaneRestore (fun i => coordinateRealLinearized (Q i) ε (A.jetChartMap i F) (X i) 0) := by + classical + choose Q hQ _ hfirst hsecond using fun i => A.atlas_polynomial_local_model P hP i + refine ⟨Q,hQ,?_,?_⟩ + · intro F X hF hX i x hx ε + exact hsecond i F X hF hX x hx ε + · intro F hF X hX hsp ε + let Y : A.centers → M → Space := fun i => restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X i) ∘ planeCoordinateIsometry) + have hY (i : A.centers) : ContMDiff planeModel spaceModel ∞ (Y i) := + restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((spaceCoordinates.symm.contDiff.comp (hX i)).comp planeCoordinateIsometry.contDiff) + have hdir (i : A.centers) : A.atlasPolynomialVariation P ε F (Y i) = + A.bundleRestore A.tensorTriv i (fun x => fiberFromThree + (coordinateRealLinearized (Q i) ε (A.jetChartMap i F) (X i) 0 (planeCoordinateIsometry x))) := by + apply A.restored_polynomial_direction P i (Q i) F (X i) (hsp i) ε + intro x hx + have hh := hfirst i F (Y i) hF (hY i) x hx ε + have he : A.jetChartMap i (Y i) ∘ planeCoordinateIsometry.symm = X i := by + rw [show Y i = restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X i) ∘ planeCoordinateIsometry) from rfl, + A.jetChartMap_restored_direction i (X i) (hsp i)] + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + rwa [he] at hh + have he : spaceCoordinates.symm ∘ A.vectorPlaneRestore X = ∑ i : A.centers, Y i := + A.euclidean_vectorPlaneRestore X + rw [he,A.atlasPolynomialVariation_sum P ε F Finset.univ Y hY] + funext p + simp only [tensorPlaneRestore,Finset.sum_apply] + apply Finset.sum_congr rfl + intro i _ + exact congrFun (hdir i) p + +/-- The local linearized operators act on the same global polynomial metric. -/ +def PolynomialLinearRepresentation {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) : Prop := + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (X : A.centers → RealModes.RField 4), (∀ i, ContDiff ℝ ∞ (X i)) → + (∀ i, tsupport (X i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ ε : ℝ, + linearMetricTensor F (spaceCoordinates.symm ∘ A.vectorPlaneRestore X)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ A.vectorPlaneRestore X) = + A.tensorPlaneRestore (fun i => coordinateFullLinearized (Q i) ε (A.jetChartMap i F) (X i)) + +theorem full_linearized_representatives {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) : + ∃ Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ i k r, (Q i k r).SmoothCoeffs univ) ∧ + A.PolynomialQuadraticRepresentation P Q ∧ + A.PolynomialLinearRepresentation P Q := by + obtain ⟨Q,hQ,hquad,hpoly⟩ := A.polynomial_linearized_representatives P hP + refine ⟨Q,hQ,hquad,?_⟩ + intro F hF X hX hsp ε + rw [A.euclidean_vectorPlaneRestore_linearized hF X hX hsp,hpoly F hF X hX hsp ε, + ← A.tensorPlaneRestore_add] + congr 1 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLocalModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLocalModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7450d41e827261f1ff7d2426f5aae0af68d2d95 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialLocalModel.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialVariationRepresentation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricRead + +namespace OAI + +/-! A single local polynomial models the global perturbation, with its +first and second variations, on the entire compact chart support. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance localModelFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance localModelFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance localModelDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance localModelDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance localModelSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance localModelSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_polynomial_representation_on_support {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) (i : A.centers) : + ∃ Q : Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ k r, (Q k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x := by + obtain ⟨Q,hQ,hrep⟩ := A.atlas_polynomial_representation P hP i + refine ⟨Q,hQ,?_⟩ + intro F hF x hx ε + have hc := isClosed_eq + ((coordinatePolynomialValue_smooth hQ (A.jetChartMap_smooth i hF) ε).continuous.comp + planeCoordinateIsometry.continuous) + (A.tensorChartRead_smooth i (A.atlasPolynomialValue_smooth hP hF ε)).continuous + have hd : Function.support (A.chartWeight i) ⊆ + {x | coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x} := + fun y hy => hrep F hF y hy ε + exact closure_minimal hd hc (by rwa [← A.chartWeight_tsupport i] at hx) + +theorem atlas_polynomial_local_model {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) (i : A.centers) : + ∃ Q : Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ k r, (Q k r).SmoothCoeffs univ) ∧ + (∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x) ∧ + (∀ (F X : M → Space), ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ X → + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinateRealLinearized Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialVariation P ε F X) x) ∧ + (∀ (F X : M → Space), ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ X → + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F X) x) := by + obtain ⟨Q,hQ,hvalue⟩ := A.atlas_polynomial_representation_on_support P hP i + refine ⟨Q,hQ,hvalue,?_,?_⟩ + · intro F X hF hX x hx ε + exact A.polynomial_first_of_representation hP i hQ x + (fun G hG ε => hvalue G hG x hx ε) hF hX ε + · intro F X hF hX x hx ε + exact A.polynomial_quadratic_of_representation hP i hQ x + (fun G hG ε => hvalue G hG x hx ε) hF hX ε + +/-- The same local polynomials represent the global quadratic variation. -/ +def PolynomialQuadraticRepresentation {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) : Prop := + ∀ (F X : M → Space), ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ X → ∀ i : A.centers, + ∀ x ∈ (A.chartWeightCompact i : Set Base), ∀ ε : ℝ, + coordinateQuadraticPolynomial (Q i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F X) x + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..d74e14efca9543ebfce25fa77e03758ad27da612 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialMetric.lean @@ -0,0 +1,159 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialValueBounds +import OAI.Geometry.SurfaceImmersion.Geometry.TensorRestoreFinite +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds + +namespace OAI + +/-! The actual globally restored polynomial perturbation of the metric, +with its exact first, second and higher-order variation decomposition. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma coordinate_polynomial_taylor_identity {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) {G : Base → Space} + {X : RealModes.RField 4} (hG : ContDiff ℝ ∞ G) (hX : ContDiff ℝ ∞ X) : + coordinatePolynomialValue P ε (fun x => G x+X (planeCoordinateIsometry x)) 0- + coordinatePolynomialValue P ε G 0 = + coordinateRealLinearized P ε G X 0 + coordinateQuadraticPolynomial P ε G X 0 + + coordinateTaylorRemainder P ε G X := by + funext p k + simp only [coordinateRealLinearized,coordinateQuadraticPolynomial,coordinatePolynomialValue, + coordinateTaylorRemainder,linearized,Pi.add_apply,Pi.sub_apply,Expression.taylorRemainder] + simp only [second_diagonal_eq_pair _ hG (hX.comp planeCoordinateIsometry.contDiff), + mul_sub,Finset.sum_sub_distrib,Function.comp_apply] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {n : A.centers → ℕ} + +def atlasPolynomialValue (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G : M → Space) : ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => coordinatePolynomialValue (P i) ε (A.jetChartMap i G) 0) + +def atlasPolynomialMetric (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G : M → Space) : ∀ x : M, CovariantTwoTensor x := + inducedTensor G+A.atlasPolynomialValue P ε G + +def atlasPolynomialVariation (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G X : M → Space) : ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => coordinateRealLinearized (P i) ε (A.jetChartMap i G) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0) + +def atlasPolynomialQuadratic (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G X : M → Space) : ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => coordinateQuadraticPolynomial (P i) ε (A.jetChartMap i G) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0) + +def atlasPolynomialRemainder (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G X : M → Space) : ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => coordinateTaylorRemainder (P i) ε (A.jetChartMap i G) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)) + +omit [CompactSpace M] in +lemma atlasPolynomialValue_symmetric + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε : ℝ) (G : M → Space) : + ∀ x v w, A.atlasPolynomialValue P ε G x v w = A.atlasPolynomialValue P ε G x w v := + A.tensorPlaneRestore_symmetric _ + +omit [CompactSpace M] in +lemma atlasPolynomialMetric_symmetric + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε : ℝ) (G : M → Space) : + ∀ x v w, A.atlasPolynomialMetric P ε G x v w = A.atlasPolynomialMetric P ε G x w v := by + intro x v w + change inducedTensor G x v w+A.atlasPolynomialValue P ε G x v w = + inducedTensor G x w v+A.atlasPolynomialValue P ε G x w v + rw [inducedTensor_symmetric G x v w,A.atlasPolynomialValue_symmetric P ε G x v w] + +lemma atlasPolynomialValue_smooth + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (ε : ℝ) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.atlasPolynomialValue P ε G x)) := + A.tensorPlaneRestore_smooth (fun i => coordinatePolynomialValue_smooth (hP i) + (A.jetChartMap_smooth i hG) ε) + +lemma atlasPolynomialMetric_smooth + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {G : M → Space} + (hG : ContMDiff planeModel spaceModel ∞ G) (ε : ℝ) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.atlasPolynomialMetric P ε G x)) := + (A.inducedTensor_smooth hG).add_section (A.atlasPolynomialValue_smooth hP hG ε) + +omit [CompactSpace M] in +lemma jetChartMap_add (i : A.centers) (G X : M → Space) : + A.jetChartMap i (G+X) = A.jetChartMap i G+A.jetChartMap i X := by + have h := A.vectorPlaneRead_add i G X + funext x + have hh := congrFun h (planeCoordinateIsometry x) + change spaceCoordinates (A.vectorChartRead i (G+X) x) = + spaceCoordinates (A.vectorChartRead i G x)+spaceCoordinates (A.vectorChartRead i X x) + simpa only [vectorPlaneRead,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply, + Pi.add_apply,map_add] using congrArg spaceCoordinates hh + +lemma atlas_polynomial_taylor_identity + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε : ℝ) + {G X : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) + (hX : ContMDiff planeModel spaceModel ∞ X) : + A.atlasPolynomialValue P ε (G+X)-A.atlasPolynomialValue P ε G = + A.atlasPolynomialVariation P ε G X+A.atlasPolynomialQuadratic P ε G X+ + A.atlasPolynomialRemainder P ε G X := by + unfold atlasPolynomialValue atlasPolynomialVariation atlasPolynomialQuadratic atlasPolynomialRemainder + rw [← A.tensorPlaneRestore_sub,← A.tensorPlaneRestore_add,← A.tensorPlaneRestore_add] + congr 1 + funext i + simp only [Pi.sub_apply,Pi.add_apply] + rw [A.jetChartMap_add] + have hh := coordinate_polynomial_taylor_identity (P i) ε (A.jetChartMap_smooth i hG) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + change coordinatePolynomialValue (P i) ε (fun x => A.jetChartMap i G x+A.jetChartMap i X x) 0- + coordinatePolynomialValue (P i) ε (A.jetChartMap i G) 0 = _ + simpa only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] using hh + +lemma atlas_polynomial_metric_taylor_identity + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε : ℝ) + {G X : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) + (hX : ContMDiff planeModel spaceModel ∞ X) : + A.atlasPolynomialMetric P ε (G+X)-A.atlasPolynomialMetric P ε G = + (linearMetricTensor G X+A.atlasPolynomialVariation P ε G X)+ + (inducedTensor X+A.atlasPolynomialQuadratic P ε G X)+ + A.atlasPolynomialRemainder P ε G X := by + have hp := A.atlas_polynomial_taylor_identity P ε hG hX + have hm := inducedTensor_add hG hX + unfold atlasPolynomialMetric + rw [hm] + have hi : (inducedTensor G+linearMetricTensor G X+inducedTensor X+ + A.atlasPolynomialValue P ε (G+X))-(inducedTensor G+A.atlasPolynomialValue P ε G) = + linearMetricTensor G X+inducedTensor X+ + (A.atlasPolynomialValue P ε (G+X)-A.atlasPolynomialValue P ε G) := by abel + rw [hi,hp] + abel + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialModeMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialModeMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..5bf6ec751517437de9c2c2cb410434b7cb68ea25 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialModeMean.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCombinedModes +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadrature +import OAI.Geometry.SurfaceImmersion.Correction.AtlasSupportedPolynomialQuadratic +import OAI.Geometry.SurfaceImmersion.Correction.AtlasMetricLocalModel + +namespace OAI + +/-! The full quadratic global interaction has one supported family of +oscillatory targets, including the polynomial perturbation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance modeMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance modeMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance modeMeanDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance modeMeanDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance modeMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance modeMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + +def polynomialModeMean {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) (F : M → Space) (ε τ : ℝ) + (φ : M → ℝ) (Z : M → Fin 4 → ℂ) : ∀ p : M, CovariantTwoTensor p := + A.tensorPlaneRestore (fun i y => (A.planeWeight i y)^2 • + (fun k => quadraticMeanCoefficient (Q i k) ε (A.jetChartMap i F) + (A.vectorChartRead i φ) (A.vectorChartRead i Z) τ 0 (planeCoordinateIsometry.symm y))) + +lemma local_single_mode_quadratic {m : ℕ} (i : A.centers) + (Q : Fin 3 → Fin m → Expression) (ε : ℝ) (G : Base → JetPolynomial.Space) + (τ : ℝ) (φ : M → ℝ) (Z : M → Fin 4 → ℂ) + {x : Base} (hx : A.chartWeight i x ≠ 0) : + coordinateQuadraticPolynomial Q ε G + (A.jetChartMap i (spaceCoordinates.symm ∘ surfaceMode τ φ Z) ∘ planeCoordinateIsometry.symm) + 0 (planeCoordinateIsometry x) = + coordinateQuadraticPolynomial Q ε G + (QuadraticMean.displacement τ (A.vectorPlaneRead i φ) (A.vectorPlaneRead i Z)) + 0 (planeCoordinateIsometry x) := by + have hh := A.jetChartMap_modes_germ (ι := Unit) i τ (fun _ => φ) (fun _ => Z) hx + have he : (A.jetChartMap i (spaceCoordinates.symm ∘ surfaceMode τ φ Z) ∘ + planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry =ᶠ[𝓝 x] + QuadraticMean.displacement τ (A.vectorPlaneRead i φ) (A.vectorPlaneRead i Z) ∘ + planeCoordinateIsometry := by + simpa only [Fintype.sum_unique,QuadraticMean.sumDisplacement,vectorPlaneRead, + Function.comp_def,planeCoordinateIsometry.symm_apply_apply] using hh + exact coordinateQuadraticPolynomial_eq_of_eventuallyEq Q ε G he 0 + +theorem polynomial_mode_quadrature {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (φ : M → ℝ) (Z : M → Fin 4 → ℂ) + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ Z) : + A.atlasPolynomialQuadratic P ε F (spaceCoordinates.symm ∘ surfaceMode τ φ Z)+ + A.atlasPolynomialQuadratic P ε F + (spaceCoordinates.symm ∘ surfaceMode τ φ (fun p => Complex.I • Z p)) = + (2 : ℝ) • A.polynomialModeMean Q F ε τ φ Z := by + let W := spaceCoordinates.symm ∘ surfaceMode τ φ Z + let WI := spaceCoordinates.symm ∘ surfaceMode τ φ (fun p => Complex.I • Z p) + have hi : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (fun p => Complex.I • Z p) := + ((contDiff_const (c := Complex.I)).smul contDiff_id).contMDiff.comp hZ + have hW : ContMDiff planeModel spaceModel ∞ W := + spaceCoordinates.symm.contDiff.contMDiff.comp (surfaceMode_smooth τ hφ hZ) + have hWI : ContMDiff planeModel spaceModel ∞ WI := + spaceCoordinates.symm.contDiff.contMDiff.comp (surfaceMode_smooth τ hφ hi) + let R := A.atlasPolynomialQuadratic P ε F W+A.atlasPolynomialQuadratic P ε F WI + have hs : ∀ p v w, R p v w = R p w v := by + intro p v w + exact congrArg₂ (· + ·) (A.tensorPlaneRestore_symmetric _ p v w) + (A.tensorPlaneRestore_symmetric _ p v w) + change R = _ + rw [← A.tensorPlaneRestore_encode R hs] + unfold polynomialModeMean + rw [← A.tensorPlaneRestore_smul] + congr 1 + funext i y + rw [A.tensorPlaneEncode_weight] + by_cases hz : A.planeWeight i y = 0 + · simp only [hz,zero_pow (by decide : 2 ≠ 0),zero_smul,Pi.smul_apply,smul_zero] + · have hx : A.chartWeight i (planeCoordinateIsometry.symm y) ≠ 0 := hz + have hc : planeCoordinateIsometry.symm y ∈ (A.chartWeightCompact i : Set Base) := by + rw [← A.chartWeight_tsupport i] + exact subset_tsupport _ hx + have hr := hrep F W hF hW i _ hc ε + have hri := hrep F WI hF hWI i _ hc ε + have he := A.local_single_mode_quadratic i (Q i) ε (A.jetChartMap i F) τ φ Z hx + have hei := A.local_single_mode_quadratic i (Q i) ε (A.jetChartMap i F) τ φ + (fun p => Complex.I • Z p) hx + simp only [planeCoordinateIsometry.apply_symm_apply] at hr hri he hei + change (A.planeWeight i y)^2 • A.tensorChartRead i R (planeCoordinateIsometry.symm y) = _ + dsimp only [R] + rw [A.tensorChartRead_add] + simp only [Pi.add_apply] + rw [← hr,← hri,he,hei] + have hreadI : A.vectorPlaneRead i (fun p => Complex.I • Z p) = + coordinateAmplitude (fun x => Complex.I • A.vectorChartRead i Z x) := by + rw [A.vectorPlaneRead_const_smul] + rfl + rw [hreadI] + have hq := congrFun (coordinate_polynomial_quadrature (Q i) ε (A.jetChartMap i F) + (A.vectorChartRead_smooth i hφ) (A.vectorChartRead_smooth i hZ) τ 0) y + simp only [Pi.add_apply,Pi.smul_apply] at hq ⊢ + rw [show A.vectorPlaneRead i φ = coordinatePhase (A.vectorChartRead i φ) from rfl, + show A.vectorPlaneRead i Z = coordinateAmplitude (A.vectorChartRead i Z) from rfl,hq] + exact smul_comm _ _ _ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNearbyCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNearbyCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7567f29c6b198f5e61e3240414d6fca0cef965ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNearbyCancellation.lean @@ -0,0 +1,211 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialNearbyCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCancellation + +namespace OAI + +/-! +Atlas cancellation uniform over a neighborhood of a fixed immersion. +The reference geometry, per-chart shifted profiles and finite phase family +determine all constants before the varying map, target or scale is chosen. +-/ + +noncomputable section + +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance nearbyPhasePolynomialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance nearbyPhasePolynomialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance nearbyPhasePolynomialDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance nearbyPhasePolynomialDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance nearbyPhasePolynomialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance nearbyPhasePolynomialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas + +variable (A : SmoothingAtlas M) + +/-- Fixed good-phase geometry gives uniform global cancellation for nearby +maps with the specified shifted derivative profiles at the actual slow scale. -/ +theorem atlas_polynomial_nearby_cancellation_all_profiles + {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {nq : ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (Q : A.centers → Fin 3 → Fin nq → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hrepr : A.PolynomialLinearRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : (i : A.centers) → ι i → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (K : (i : A.centers) → ι i → TopologicalSpace.Compacts JetPolynomial.Base) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (hImm : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) p)) + (hgood : ∀ i j p, p ∈ (modeSupport (K i j) : Set SmallModes.Base) → + PhaseGeometry.Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) p) + (phaseDerivative (coordinatePhase (φ i j)) p)) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hUK : ∀ i, U i ⊆ KU i) (hKU : ∀ i j, (K i j : Set JetPolynomial.Base) ⊆ U i) + : ∃ ρ : (i : A.centers) → ι i → ℝ, (∀ i j, 0 < ρ i j) ∧ + ∀ (R : A.centers → ℕ → ℝ), (∀ i m, 0 ≤ R i m) → ∀ q : ℕ, + ∃ C D : (i : A.centers) → ι i → ℕ → ℝ, + (∀ i j m, 0 ≤ C i j m) ∧ (∀ i j m, 0 ≤ D i j m) ∧ + ∀ (G : M → Space) (_hG : ContMDiff planeModel spaceModel ∞ G) + (B : (i : A.centers) → ι i → ℝ), + (∀ i j, 0 ≤ B i j) → (∀ i j, B i j < ρ i j) → + (∀ i j, WeightedEstimates.WeightedBound univ 1 2 (B i j) + ((spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F))) → + ∀ (τ ε η : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → 0 ≤ η → η ≤ 1 → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ η) → + (∀ i m l, l ≤ m + 2 → WeightedEstimates.WeightedBound univ 1 l + (R i m / (s : ℝ) ^ (l - 2)) (spaceCoordinates ∘ A.vectorPlaneRead i G)) → + ∀ target : ∀ i j, SupportedField (F := ComplexTensor) (modeSupport (K i j)), + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (∑ i : A.centers, ∑ j, C i j m * supportedWeightedSeminorm (modeSupport (K i j)) + s (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (η ^ (q + 1) * ∑ i : A.centers, ∑ j, D i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j)) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.atlasPolynomialVariation P ε G (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x))) := by + classical + have hlocal (i : A.centers) (j : ι i) := + PhaseGeometry.uniform_polynomial_nearby_cancellation_all_profiles (Q i) (hQ i) (A.jetChartMap_smooth i hF) + (hφ i j) (modeSupport (K i j)) + (by simpa only [A.jetChartMap_plane] using hImm i j) + (by simpa only [A.jetChartMap_plane] using hgood i j) + (hU i) (KU i) (hUK i) (by + rintro x ⟨y,⟨z,hz,rfl⟩,rfl⟩ + simpa only [planeCoordinateIsometry.symm_apply_apply] using hKU i j hz) + choose ρ hρ hall using hlocal + refine ⟨ρ,hρ,?_⟩ + intro R hR q + choose Cv Ct hCv hCt solve using fun i j => hall i j (R i) (hR i) q + choose Dv hDv hv using fun m => A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + choose Dt hDt ht using fun m => A.tensorPlaneRestore_bound m + refine ⟨fun i j m => Dv m * Cv i j m, fun i j m => Dt m * Ct i j m, + fun i j m => mul_nonneg (hDv m) (hCv i j m), + fun i j m => mul_nonneg (hDt m) (hCt i j m), ?_⟩ + intro G hG B hB hBρ hnear τ ε η s hτ hs hτs hs1 hε hε1 hη hη1 hsmall hprefix target + choose X hX hsp hb hr using fun i j => solve i j (A.jetChartMap i G) + (A.jetChartMap_smooth i hG) (B i j) (hB i j) (hBρ i j) + (by simpa only [A.jetChartMap_plane] using hnear i j) τ ε s hτ hs hτs hs1 hε hε1 ((hsmall i).trans hη1) + (by simpa only [A.jetChartMap_plane] using hprefix i) (target i j) + let Y : A.centers → RealModes.RField 4 := fun i x => ∑ j, X i j x + have hY (i : A.centers) : ContDiff ℝ ∞ (Y i) := + ContDiff.sum (fun j _ => hX i j) + have hYs (i : A.centers) : tsupport (Y i) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + apply closure_minimal _ (modeSupport (A.chartWeightCompact i)).isCompact.isClosed + intro x hx + by_contra hn + apply hx + apply Finset.sum_eq_zero + intro j _ + exact image_eq_zero_of_notMem_tsupport (fun hxj => hn (hK i j (hsp i j hxj))) + let T : A.centers → SmallModes.Base → Tensor := fun i x => ∑ j, + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x + have hd (i : A.centers) (j : ι i) : ContDiff ℝ ∞ + (QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) := + contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((hφ i j).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + (target i j).contDiff.contDiffOn τ) + have hT (i : A.centers) : ContDiff ℝ ∞ (T i) := ContDiff.sum (fun j _ => hd i j) + let v : A.centers → ℕ → ℝ := fun i m => ∑ j, Cv i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j) + let t : A.centers → ℕ → ℝ := fun i m => ∑ j, Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j) + have hvn (i : A.centers) (m : ℕ) : 0 ≤ v i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCv i j m) (apply_nonneg _ _)) + have htn (i : A.centers) (m : ℕ) : 0 ≤ t i m := + Finset.sum_nonneg (fun j _ => mul_nonneg (hCt i j m) (apply_nonneg _ _)) + have hsize (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m (v i m) (Y i) := + WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ _ _ + (fun j _ => (hX i j).contDiffOn) (fun j _ => hb i j m) + have hlin (i : A.centers) : + coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (Y i) = + fun x => ∑ j, coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (X i j) x := by + exact coordinateFullLinearized_sum (Q i) ε (A.jetChartMap i G) + Finset.univ (X i) (hX i) + have hres (i : A.centers) (m : ℕ) : WeightedEstimates.WeightedBound univ τ m + (η ^ (q + 1) * t i m) + (coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (Y i) + T i) := by + have he : (coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (Y i) + T i) = + fun x => ∑ j, (coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (X i j) x + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j) x) := by + funext x + rw [Pi.add_apply, hlin] + exact Finset.sum_add_distrib.symm + rw [he] + have hsum := WeightedEstimates.WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ + (fun j => η ^ (q + 1) * Ct i j m * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j)) + (fun j => coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (X i j) + + QuadraticMean.displacement τ (coordinatePhase (φ i j)) (target i j)) + (fun j _ => (coordinateFullLinearized_smooth isOpen_univ isOpen_univ (Q i) (hQ i) + (A.jetChartMap_smooth i hG) (fun _ _ => mem_univ _) (A.chartWeightCompact i) + (subset_univ _) (hX i j) ((hsp i j).trans (hK i j)) ε).contDiffOn.add (hd i j).contDiffOn) + (fun j _ => (hr i j m).mono_const (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (pow_le_pow_left₀ + (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) + (hsmall i) (q+1)) (hCt i j m)) (apply_nonneg _ _))) + simpa only [t, Finset.mul_sum, mul_assoc, Pi.add_apply] using hsum + refine ⟨A.vectorPlaneRestore Y, A.vectorPlaneRestore_smooth Y hY, ?_, ?_⟩ + · intro m + have hh := hv m Y τ (∑ i, v i m) hτ (hτs.trans hs1) + (Finset.sum_nonneg (fun i _ => hvn i m)) hY + (fun i => (hsize i m).mono_const + (Finset.single_le_sum (fun k _ => hvn k m) (Finset.mem_univ i))) + simpa only [v, Finset.mul_sum, mul_assoc] using hh + · intro m + have hηpow : 0 ≤ η ^ (q + 1) := pow_nonneg hη _ + rw [hrepr G hG Y hY hYs ε, ← A.tensorPlaneRestore_add] + have hh := ht m (fun i => coordinateFullLinearized (Q i) ε (A.jetChartMap i G) (Y i)+T i) + τ (η^(q+1) * ∑ i, t i m) hτ (hτs.trans hs1) + (mul_nonneg hηpow (Finset.sum_nonneg (fun i _ => htn i m))) + (fun i => (coordinateFullLinearized_smooth isOpen_univ isOpen_univ (Q i) (hQ i) + (A.jetChartMap_smooth i hG) (fun _ _ => mem_univ _) (A.chartWeightCompact i) + (subset_univ _) (hY i) (hYs i) ε).add (hT i)) + (fun i => (hres i m).mono_const (mul_le_mul_of_nonneg_left + (Finset.single_le_sum (fun k _ => htn k m) (Finset.mem_univ i)) hηpow)) + have he : Dt m * (η^(q+1) * ∑ i, t i m) = + η^(q+1) * ∑ i : A.centers, ∑ j, (Dt m * Ct i j m) * + supportedWeightedSeminorm (modeSupport (K i j)) s + (PolynomialSolveData.inputOrder (P := Q i) q m) (target i j) := by + calc + _ = η^(q+1) * (Dt m * ∑ i, t i m) := by ring + _ = _ := by simp only [t, Finset.mul_sum, mul_assoc] + rw [he] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNonlinearProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNonlinearProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..54b4e1be44f2a4425f3f4c7cbfacc156b2057d95 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialNonlinearProfiles.lean @@ -0,0 +1,132 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialInteractionBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialRemainderBounds +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasJetProfiles +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetReadBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetSegmentEnlargement + +namespace OAI + +/-! Uniform nonlinear error bounds from the global norms used by the iteration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology NNReal BigOperators Pointwise +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_polynomial_nonlinear_profiles {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (Ω : A.centers → Set JetPolynomial.Base) (hΩ : ∀ i, IsOpen (Ω i)) + (KΩ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hΩK : ∀ i, Ω i ⊆ KΩ i) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ Ω i) + (R U V : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) (hU : ∀ m, 0 ≤ U m) (hV : ∀ m, 0 ≤ V m) : + ∃ E₁ E₂ : ℕ → ℝ, (∀ m, 0 ≤ E₁ m) ∧ (∀ m, 0 ≤ E₂ m) ∧ + ∀ (G X Y : M → Space), ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel spaceModel ∞ X → ContMDiff planeModel spaceModel ∞ Y → + ∀ (s : ℝ≥0) (τ ε δ : ℝ), 0 < τ → 0 < (s:ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → 0 < δ → δ ≤ τ → + (∀ i, ε/τ^tensorLoss (P i) ≤ 1) → + (∀ m, A.ShiftedBound 2 m s (R m) G) → + (∀ m, A.WeightedBound τ m (U m*(δ*τ)) X) → + (∀ m, A.WeightedBound τ m (V m*δ^2) Y) → + (∀ m, A.TensorWeightedBound τ m (E₁ m*(δ^3/τ)) + (A.atlasPolynomialQuadratic P ε G (X+Y)-A.atlasPolynomialQuadratic P ε G X)) ∧ + (∀ m, A.TensorWeightedBound τ m (E₂ m*(δ^3/τ)) + (A.atlasPolynomialRemainder P ε G (X+Y))) := by + classical + obtain ⟨K,B,hK,hB,hjet⟩ := A.atlas_jet_profiles Ω hΩ KΩ hΩK R hR + choose D hD hd using fun i m => A.jetPlaneRead_bound i m + let Cx := fun i m => 1+D i m*U m + let Cy := fun i m => 1+D i m*V m + let C := fun i m => Cx i m+Cy i m + have hCx (i m) : 0 < Cx i m := by + dsimp [Cx] + linarith [mul_nonneg (hD i m) (hU m)] + have hCy (i m) : 0 < Cy i m := by + dsimp [Cy] + linarith [mul_nonneg (hD i m) (hV m)] + have hC (i m) : 0 < C i m := add_pos (hCx i m) (hCy i m) + let K' := fun i => K i+Metric.closedBall (0 : LowJet) (C i 2) + have hK' (i) : IsCompact (K' i) := (hK i).add (isCompact_closedBall _ _) + choose E₁ hE₁ he₁ using fun m => A.atlas_polynomial_interaction_bound P hP Ω hΩ houter K hK m + (fun i => B i (m+tensorOrder (P i))) + (fun i => Cx i (m+tensorOrder (P i)+1)) (fun i => Cy i (m+tensorOrder (P i)+1)) + (fun i => hB i _) (fun i => hCx i _) (fun i => hCy i _) + choose E₂ hE₂ he₂ using fun m => A.atlas_polynomial_remainder_bound P hP Ω hΩ houter K' hK' m + (fun i => B i (m+tensorOrder (P i))+C i (m+tensorOrder (P i)+2)) + (fun i => C i (m+tensorOrder (P i))) + (fun i => (hB i _).trans (le_add_of_nonneg_right (hC i _).le)) (fun i => hC i _) + refine ⟨E₁,E₂,hE₁,hE₂,?_⟩ + intro G X Y hG hX hY s τ ε δ hτ hs hτs hs1 hε hε1 hδ hδτ hsmall hGb hXb hYb + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hδ2 : δ^2 ≤ δ*τ := by nlinarith + obtain ⟨hmap,hbound⟩ := hjet G hG s hs hs1 hGb + have hx (i m) : WeightedEstimates.WeightedBound univ τ m (Cx i m*δ*τ) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) := by + have hh := hd i m X hX τ (U m*(δ*τ)) hτ hτ1 (mul_nonneg (hU m) (mul_nonneg hδ.le hτ.le)) (hXb m) + apply hh.mono_const + dsimp [Cx] + nlinarith [mul_nonneg hδ.le hτ.le] + have hy (i m) : WeightedEstimates.WeightedBound univ τ m (Cy i m*δ^2) + (A.jetChartMap i Y ∘ planeCoordinateIsometry.symm) := by + have hh := hd i m Y hY τ (V m*δ^2) hτ hτ1 (mul_nonneg (hV m) (sq_nonneg δ)) (hYb m) + apply hh.mono_const + dsimp [Cy] + nlinarith [sq_nonneg δ] + have hc (i m) : WeightedEstimates.WeightedBound univ τ m (C i m*δ*τ) + (A.jetChartMap i (X+Y) ∘ planeCoordinateIsometry.symm) := by + have hh := (hx i m).add uniqueDiffOn_univ hτ.le + (((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff).contDiffOn) + (((A.jetChartMap_smooth i hY).comp planeCoordinateIsometry.symm.contDiff).contDiffOn) (hy i m) + have he : A.jetChartMap i (X+Y) ∘ planeCoordinateIsometry.symm = + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)+(A.jetChartMap i Y ∘ planeCoordinateIsometry.symm) := by + rw [A.jetChartMap_add] + rfl + rw [he] + apply hh.mono_const + have hh' := mul_le_mul_of_nonneg_left hδ2 (hCy i m).le + dsimp only [C] + nlinarith only [hh'] + have hc' (i m) : WeightedEstimates.WeightedBound (Ω i) τ m (C i m*δ*τ) + (A.jetChartMap i (X+Y)) := by + have hh := weightedBound_comp_isometry planeCoordinateIsometry + ((A.jetChartMap_smooth i (hX.add hY)).comp planeCoordinateIsometry.symm.contDiff) (hc i m) + have he : (A.jetChartMap i (X+Y) ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = + A.jetChartMap i (X+Y) := by + funext x + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + rw [he] at hh + exact hh.restrict_open (hΩ i) + have hseg (i t) (ht : t ∈ Icc (0:ℝ) 1) : MapsTo + (lowJet (fun x => A.jetChartMap i G x+t • A.jetChartMap i (X+Y) x)) (Ω i) (K' i) := + lowJet_segment_mem_add_closedBall (hΩ i) (A.jetChartMap_smooth i hG) + (A.jetChartMap_smooth i (hX.add hY)) (hmap i) hτ hτ1 hδ.le hδτ (hC i 2).le (hc' i 2) ht + have hsegb (i m t) (ht : t ∈ Icc (0:ℝ) 1) : WeightedEstimates.WeightedBound (Ω i) τ m + (B i m+C i (m+2)) + (lowJet (fun x => A.jetChartMap i G x+t • A.jetChartMap i (X+Y) x)) := by + have hh := lowJet_segment_bound (hΩ i) (A.jetChartMap_smooth i hG) + (A.jetChartMap_smooth i (hX.add hY)) hτ hτ1 (mul_nonneg (mul_nonneg (hC i (m+2)).le hδ.le) hτ.le) + ((hbound i m).shrink_scale hτ.le hτs) (hc' i (m+2)) ht + apply hh.mono_const + apply add_le_add le_rfl + 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 i (m+2)).le] + constructor + · intro m + exact he₁ m G X Y hG hX hY τ ε δ hτ hτ1 hε hε1 hδ hδτ hsmall hmap + (fun i => (hbound i _).shrink_scale hτ.le hτs) (fun i => hx i _) (fun i => hy i _) + · intro m + exact he₂ m G (X+Y) hG (hX.add hY) τ ε δ hτ hτ1 hε hε1 hδ hsmall hseg + (fun i t ht => hsegb i _ t ht) (fun i => hc i _) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlap.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlap.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef79a6466e6a212b37470e71a100b861da71f61a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlap.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticOverlapSupports +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCombinedModes + +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 polynomialOverlapFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialOverlapFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialOverlapDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialOverlapDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialOverlapSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialOverlapSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + +omit [Fintype ι] [DecidableEq ι] in +lemma globalPolynomialQuadraticTarget_overlap {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (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) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + tsupport (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l) ⊆ + (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) := by + intro x hx + let V := combinedQuadraticCoefficient (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l + have hw : x ∈ tsupport (fun y => (A.planeWeight k y)^2) := + tsupport_smul_subset_left (fun y => (A.planeWeight k y)^2) V 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 := (A.supportedPlaneWeight k).tsupport_subset hw' + have hv : x ∈ tsupport V := tsupport_smul_subset_right (fun y => (A.planeWeight k y)^2) V hx + have hqq : x ∈ RealModes.quadraticSupport (fun a => tsupport (A.vectorPlaneRead k (Z a))) l := by + have hadd := tsupport_add + (RealModes.quadraticAmplitude τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) l) + (coordinateQuadraticCoefficient (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l) hv + rcases hadd with hm | hp + · exact RealModes.quadraticAmplitude_tsupport τ _ _ (fun _ => Subset.rfl) l hm + · have hc := tsupport_comp_preimage + (quadraticFamilyTensor (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l) + planeCoordinateIsometry.symm planeCoordinateIsometry.symm.continuous hp + have hh := quadraticFamilyTensor_tsupport (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 + (fun a => isClosed_tsupport (A.vectorChartRead k (Z a))) (fun _ => Subset.rfl) l hc + have hread (a) (ha : planeCoordinateIsometry.symm x ∈ tsupport (A.vectorChartRead k (Z a))) : + x ∈ tsupport (A.vectorPlaneRead k (Z a)) := by + have he : A.vectorPlaneRead k (Z a) ∘ planeCoordinateIsometry = A.vectorChartRead k (Z a) := by + funext y + simp only [vectorPlaneRead,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + rw [← he] at ha + have hv := tsupport_comp_preimage (A.vectorPlaneRead k (Z a)) planeCoordinateIsometry + planeCoordinateIsometry.continuous ha + simpa only [Set.mem_preimage,planeCoordinateIsometry.apply_symm_apply] using hv + rcases l with a | ⟨a,b,c⟩ + · exact hread a hh + · exact ⟨hread a hh.1,hread b hh.2⟩ + 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 [planeCoordinateIsometry.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 globalPolynomialQuadraticTargetRestricted {m : ℕ} + (Q : A.centers → Fin 3 → Fin m → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (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) + (k : A.centers) (l : RealModes.QuadraticLabel ι) : + SupportedField (F := ComplexTensor) (modeSupport (A.quadraticOverlapCompact S hS k l)) := + ContDiffMapSupportedIn.of_support_subset + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l).contDiff + (subset_closure.trans + (A.globalPolynomialQuadraticTarget_overlap Q hQ F hF ε τ φ Z hφ hZ S hS hSZ k l)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlapCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlapCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..e91042a3c6bdb19a36f3060a9a4b798a57b84200 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialOverlapCancellation.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCombinedModes +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialOverlap + +namespace OAI + +/-! Cancel every nonzero quadratic phase of the actual global polynomial +metric using its derived local linearized solvers. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance overlapPolynomialCancellationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance overlapPolynomialCancellationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance overlapPolynomialCancellationDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance overlapPolynomialCancellationDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance overlapPolynomialCancellationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance overlapPolynomialCancellationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem global_polynomial_quadratic_cancellation_on + {n : A.centers → ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) : + ∃ (Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression) + (Dv Dt : ℕ → ℝ) (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ), + A.PolynomialQuadraticRepresentation P Q ∧ + A.PolynomialLinearRepresentation P Q ∧ + (∀ 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 (Q k) ε (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 → 0 ≤ ε → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ 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.globalPolynomialQuadraticTargetRestricted Q hQ F hF ε τ φ 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.globalPolynomialQuadraticTargetRestricted Q hQ F hF ε τ φ Z hφ hZ S hS hSZ k l) q m) + (linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + (inducedTensor (spaceCoordinates.symm ∘ ∑ a, surfaceMode τ (φ a) (Z a))+ + A.atlasPolynomialQuadratic P ε F + (spaceCoordinates.symm ∘ ∑ a, surfaceMode τ (φ a) (Z a)))- + A.globalPolynomialQuadraticMean Q F ε τ φ Z)) := by + classical + obtain ⟨Q,Dv,Dt,hQ,hrep,hlin,hDv,hDt,hcancel⟩ := + A.atlas_polynomial_finite_cancellation (ι := fun _ => RealModes.QuadraticLabel ι) P hP + refine ⟨Q,Dv,Dt,hQ,hrep,hlin,hDv,hDt,?_⟩ + intro F hF φ Z hφ hZ S hS hSZ ε τ s c hτ hs hτs hs1 hε hsmall q + obtain ⟨W,hW,hsize,hres⟩ := hcancel F hF (A.globalQuadraticPhase φ) + (A.quadraticOverlapCompact S hS) ε τ s c hτ hs hτs hs1 hε hsmall + (fun k l => Set.image_mono (A.quadraticOverlapCompact_subset S hS k l)) + (A.globalPolynomialQuadraticTargetRestricted Q hQ F hF ε τ φ Z hφ hZ S hS hSZ) q + refine ⟨W,hW,hsize,?_⟩ + have he := A.global_modes_full_quadratic P Q hQ hrep F hF ε τ φ Z hφ hZ + dsimp only at he + intro m + rw [he] + have ha : linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + (A.globalPolynomialQuadraticMean Q F ε τ φ Z+ + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x))- + A.globalPolynomialQuadraticMean Q F ε τ φ Z = + linearMetricTensor F (spaceCoordinates.symm ∘ W)+ + A.atlasPolynomialVariation P ε F (spaceCoordinates.symm ∘ W)+ + A.tensorPlaneRestore (fun i x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ i l)) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ i l) x) := by abel + rw [ha] + exact hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialQuadraticBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialQuadraticBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..b13463fec0cf9d4bfca9694cd0fbb1bb3715e925 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialQuadraticBounds.lean @@ -0,0 +1,129 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Atlas.CutoffQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCombinedModes +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledQuadraticTargets + +namespace OAI + +/-! Uniform delta-squared bounds for the actual global quadratic targets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance polynomialQuadraticBoundsFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialQuadraticBoundsFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialQuadraticBoundsDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialQuadraticBoundsDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialQuadraticBoundsSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialQuadraticBoundsSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : Type*} [Fintype ι] [DecidableEq ι] + + +omit [Fintype ι] [DecidableEq ι] in +theorem globalPolynomialQuadraticTarget_bound {n : ℕ} + (Q : A.centers → Fin 3 → Fin n → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) (k : A.centers) + {U : Set Base} (hU : IsOpen U) (hKU : (A.chartWeightCompact k : Set Base) ⊆ U) + {K : Set LowJet} (hK : IsCompact K) (m : ℕ) + (B F₀ A₀ P₀ : ℝ) (hB : 1 ≤ B) (hF₀ : 0 ≤ F₀) (hA₀ : 0 < A₀) (hP₀ : 0 ≤ P₀) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (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 δ τ ε : ℝ), 0 < δ → 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ/s+ε/τ^tensorLoss (Q k) ≤ 1 → + MapsTo (lowJet (A.jetChartMap k F)) U K → + WeightedEstimates.WeightedBound U s (m+tensorOrder (Q k)) B (lowJet (A.jetChartMap k F)) → + (∀ a, WeightedEstimates.WeightedBound univ s (m+tensorOrder (Q k)+1) + (A₀*(δ*τ)) (A.vectorChartRead k (Z a))) → + (∀ a v, WeightedEstimates.WeightedBound U s (m+tensorOrder (Q k)) F₀ + (fun x => fderiv ℝ (A.vectorChartRead k (φ a)) x (coordinateVector v))) → + (∀ a v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m P₀ + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∀ l : RealModes.QuadraticLabel ι, WeightedEstimates.WeightedBound univ s m (E*δ^2) + (A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l) := by + obtain ⟨M,hM,hm⟩ := A.globalQuadraticTarget_bound (ι := ι) k m A₀ P₀ + obtain ⟨D,hD,hd⟩ := A.planeWeight_square_bound k m + obtain ⟨E,hE,he⟩ := scaled_quadraticFamilyTensor_bound (ι := ι) + hU isOpen_univ hK (subset_univ _) (Q k) (hQ k) m B F₀ hB hF₀ + let C := 2^m*D*(E*A₀^2) + have hC : 0 ≤ C := by dsimp [C]; positivity + refine ⟨M+C,add_nonneg hM hC,?_⟩ + intro F hF φ Z hφ hZ s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall hjet hb hZb hφb hφm l + have hpoly := he (A.jetChartMap k F) (fun a => A.vectorChartRead k (φ a)) + (fun a => A.vectorChartRead k (Z a)) s δ τ ε A₀ (tensorLoss (Q k)) + hδ hτ hs hτs hs1 hε hε1 hA₀ le_rfl (A.jetChartMap_smooth k hF) + (fun a => A.vectorChartRead_smooth k (hφ a)) (fun a => A.vectorChartRead_smooth k (hZ a)) + hjet hb (fun a => ((hZb a).mono_order (by omega)).restrict_open hU) hφb l 0 (by simp) + have hpoly' := hpoly.mono_const + (mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left hsmall (sq_nonneg δ)) hE) (sq_nonneg A₀)) + simp only [mul_one] at hpoly' + have hsm : ContDiff ℝ ∞ (quadraticFamilyTensor (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l) := by + apply contDiff_pi.mpr + intro j + exact contDiffOn_univ.mp (quadraticFamilyCoefficient_smooth isOpen_univ (hQ k j) + (A.jetChartMap_smooth k hF) (fun a => A.vectorChartRead_smooth k (hφ a)) + (fun a => A.vectorChartRead_smooth k (hZ a)) (fun _ _ => mem_univ _) ε τ 0 l) + let V := planeCoordinateIsometry.symm ⁻¹' U + have hV : IsOpen V := hU.preimage planeCoordinateIsometry.symm.continuous + have hpc := weightedBound_comp_isometry_on planeCoordinateIsometry.symm hU hsm hpoly' + have hcs : ContDiff ℝ ∞ (coordinateQuadraticCoefficient (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l) := + hsm.comp planeCoordinateIsometry.symm.contDiff + let T := fun x => (A.planeWeight k x)^2 • + coordinateQuadraticCoefficient (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l x + have hT : ContDiff ℝ ∞ T := ((A.planeWeight_smooth k).pow 2).smul hcs + have hprod := ((hd s hs hs1).restrict_open hV).smul_real hV.uniqueDiffOn hs.le hD + (by positivity : 0 ≤ δ^2*E*A₀^2) ((A.planeWeight_smooth k).pow 2).contDiffOn hcs.contDiffOn hpc + have hsp : tsupport T ⊆ V := by + intro x hx + have hw := tsupport_smul_subset_left (fun x => (A.planeWeight k x)^2) _ hx + have hw' : x ∈ tsupport (A.planeWeight k) := by + apply (show tsupport (fun x => (A.planeWeight k x)^2) ⊆ tsupport (A.planeWeight k) from ?_) hw + simpa only [pow_two] using (tsupport_mul_subset_left (f := A.planeWeight k) (g := A.planeWeight k)) + obtain ⟨y,hy,heq⟩ := (A.supportedPlaneWeight k).tsupport_subset hw' + change planeCoordinateIsometry.symm x ∈ U + rw [← heq,planeCoordinateIsometry.symm_apply_apply] + exact hKU hy + have hpg : WeightedEstimates.WeightedBound univ s m (C*δ^2) T := by + have hh := hprod.extend_support hV hsp (by positivity) + convert hh using 1 + dsimp [C] + ring + have hmetric := hm τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ.le hA₀.le hP₀ + (fun a => weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth k (hZ a)) ((hZb a).mono_order (by omega))) hφm l + have hms := (A.globalQuadraticTarget τ φ Z hφ hZ k l).contDiff + have hadd := hmetric.add uniqueDiffOn_univ hs.le hms.contDiffOn hT.contDiffOn hpg + have heq : A.globalPolynomialQuadraticTarget Q hQ F hF ε τ φ Z hφ hZ k l = + (fun x => A.globalQuadraticTarget τ φ Z hφ hZ k l x+T x) := by + funext x + exact smul_add ((A.planeWeight k x)^2) + (RealModes.quadraticAmplitude τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) l x) + (coordinateQuadraticCoefficient (Q k) ε (A.jetChartMap k F) + (fun a => A.vectorChartRead k (φ a)) (fun a => A.vectorChartRead k (Z a)) τ 0 l x) + rw [heq] + convert hadd using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRemainderBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRemainderBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2156e8591692467d41c1b104c210149aabb59f4b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRemainderBounds.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorLocalBounds +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledNonlinearBounds + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance atlasRemainderFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasRemainderFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance atlasRemainderDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasRemainderDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasRemainderSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasRemainderSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + +/-- The cubic Taylor remainder of the actual global polynomial metric. -/ +theorem atlas_polynomial_remainder_bound {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) + (Q : A.centers → Set LowJet) (hQ : ∀ i, IsCompact (Q i)) + (m : ℕ) (B C : A.centers → ℝ) (hB : ∀ i, 1 ≤ B i) (hC : ∀ i, 0 < C i) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (F X : M → Space), + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ X → + ∀ τ ε δ : ℝ, 0 < τ → τ ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < δ → + (∀ i, ε/τ^tensorLoss (P i) ≤ 1) → + (∀ i t, t ∈ Icc (0 : ℝ) 1 → MapsTo + (lowJet (fun x => A.jetChartMap i F x+t • A.jetChartMap i X x)) (U i) (Q i)) → + (∀ i t, t ∈ Icc (0 : ℝ) 1 → WeightedEstimates.WeightedBound (U i) τ + (m+tensorOrder (P i)) (B i) + (lowJet (fun x => A.jetChartMap i F x+t • A.jetChartMap i X x))) → + (∀ i, WeightedEstimates.WeightedBound univ τ (m+tensorOrder (P i)) + (C i*δ*τ) (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)) → + A.TensorWeightedBound τ m (E*(δ^3/τ)) (A.atlasPolynomialRemainder P ε F X) := by + classical + choose E hE he using fun i : A.centers => scaled_coordinate_taylor_bound (hU i) (hQ i) + (P i) (hP i) m (B i) (hB i) + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound_on_outer U hU houter m + let S := ∑ i : A.centers, E i*(C i)^3 + have hS : 0 ≤ S := Finset.sum_nonneg (fun i _ => mul_nonneg (hE i) (pow_nonneg (hC i).le _)) + refine ⟨D*S,mul_nonneg hD hS,?_⟩ + intro F X hF hX τ ε δ hτ hτ1 hε hε1 hδ hsmall hseg hsegb hXb + have hlocal (i : A.centers) := he i (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) τ ε δ (C i) + hτ hτ1 hε hε1 hδ (hC i) (hsmall i) (A.jetChartMap_smooth i hF) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) + have hbound (i : A.centers) : WeightedEstimates.WeightedBound + (planeCoordinateIsometry.symm ⁻¹' U i) τ m (S*(δ^3/τ)) + (coordinateTaylorRemainder (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)) := by + have hb := hlocal i + (by simpa only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] using hseg i) + (by simpa only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] using hsegb i) + (hXb i) + exact hb.mono_const (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => mul_nonneg (hE j) (pow_nonneg (hC j).le _)) + (Finset.mem_univ i)) (div_nonneg (pow_nonneg hδ.le _) hτ.le)) + have hsmooth (i : A.centers) : ContDiff ℝ ∞ + (coordinateTaylorRemainder (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm)) := by + exact (tensorTaylorRemainder_smooth (hP i) (A.jetChartMap_smooth i hF) + (((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff).comp + planeCoordinateIsometry.contDiff) ε 0).comp planeCoordinateIsometry.symm.contDiff + have hh := hd _ hsmooth τ (S*(δ^3/τ)) hτ hτ1 + (mul_nonneg hS (div_nonneg (pow_nonneg hδ.le _) hτ.le)) hbound + simpa only [atlasPolynomialRemainder,mul_assoc] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f8529ccde3c7302ddd0f35ef820de34a4f6cab6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRepresentation.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasRestoredPolynomialRepresentation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteAssembly +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric + +namespace OAI + +/-! Constructed coordinate representatives of the same global polynomial +tensor. These are derived from the actual read/restore maps. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance polyRepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polyRepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polyRepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polyRepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polyRepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polyRepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorChartRead_sum {ι : Type*} [Fintype ι] (i : A.centers) + (u : ι → ∀ p : M, CovariantTwoTensor p) : + A.tensorChartRead i (∑ k, u k) = ∑ k, A.tensorChartRead i (u k) := by + classical + funext x + by_cases hx : x ∈ (chart (i : M)).target + · simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_mem hx,bundleComponent,Finset.sum_apply,map_sum,Finset.smul_sum] + · simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_notMem hx,map_zero,Finset.sum_apply,Finset.sum_const_zero] + +/-- Every correction chart reads the globally restored polynomial as a +single finite polynomial in that chart's actual localized map. -/ +theorem atlas_polynomial_representation {n : A.centers → ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) (i : A.centers) : + ∃ Q : Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ k r, (Q k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), A.chartWeight i x ≠ 0 → ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x := by + classical + choose Q hQ hvalue using fun j : A.centers => + A.restored_polynomial_representation i j (P j) (hP j) + refine ⟨sumTensorPolynomials Q,sumTensorPolynomials_smooth hQ,?_⟩ + intro F hF x hx ε + have hrestore : A.atlasPolynomialValue P ε F = + ∑ j : A.centers, A.bundleRestore A.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue (P j) ε (A.jetChartMap j F) 0 + (JetPolynomial.planeCoordinateIsometry y))) := by + funext p + simp only [atlasPolynomialValue,tensorPlaneRestore,Finset.sum_apply] + rw [sumTensorPolynomials_value,hrestore,A.tensorChartRead_sum] + simp only [Finset.sum_apply] + apply Finset.sum_congr rfl + intro j _ + exact hvalue j F hF x hx ε 0 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRestoredRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRestoredRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..629772436aead4791a107fba3a7ea42b4d4a9b28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialRestoredRead.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCoordinateRead +import OAI.Geometry.SurfaceImmersion.Geometry.TensorExpressionLinearMap +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasTensorTransition + +namespace OAI + +/-! A restored polynomial tensor has a constructed finite jet expression +in every overlapping correction chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance restoredReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem compact_restored_polynomial_read (i j : A.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {K : Set Base} (hK : IsCompact K) + (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), x ∈ U → A.weight i ((chart (i : M)).symm x) ≠ 0 → + ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (A.bundleRestore A.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue P ε + (A.jetChartMap j F) t (JetPolynomial.planeCoordinateIsometry y)))) x := by + obtain ⟨U₁,hU₁,hKU₁,hU₁e,Q,hQ,hvalue⟩ := + A.compact_polynomial_coordinate_read i j P hP hK hKe + obtain ⟨U₂,hU₂,hKU₂,hU₂e,L,hL,hLe,_⟩ := + A.compact_tensorRestoreTransition i j hK hKe + refine ⟨U₁ ∩ U₂,hU₁.inter hU₂,fun x hx => ⟨hKU₁ hx,hKU₂ hx⟩, + fun x hx => hU₁e hx.1,mapTensorPolynomial L Q, + mapTensorPolynomial_smooth hL hQ,?_⟩ + intro F hF x hx hw ε t + have hq := hvalue F hF x hx.1 hw ε t + have hr := A.tensorChartRead_restoreThree i j + (fun y => coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry y)) (hU₁e hx.1) + (A.outer_one i _ (subset_tsupport (A.weight i) hw)) + calc + _ = L x (coordinatePolynomialValue Q ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x)) := + mapTensorPolynomial_eval L Q ε (A.jetChartMap i F) t x + _ = L x (coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x))) := + congrArg (L x) hq + _ = A.tensorRestoreTransition i j x + (coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x))) := + congrArg (fun C : PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor => C + (coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x)))) (hLe hx.2) + _ = _ := hr.symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSmooth.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSmooth.lean new file mode 100644 index 0000000000000000000000000000000000000000..debecbbd6663ba174e47e1db20bc0dbfc9997d09 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSmooth.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedIncrementEstimate + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance polynomialSmoothFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialSmoothFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance polynomialSmoothDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialSmoothDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialSmoothSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialSmoothSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + + +lemma atlasPolynomialVariation_smooth {n : A.centers → ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {F X : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hX : ContMDiff planeModel spaceModel ∞ X) + (ε : ℝ) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.atlasPolynomialVariation P ε F X p)) := by + apply A.tensorPlaneRestore_smooth + intro i + apply contDiff_pi.mpr + intro k + change ContDiff ℝ ∞ (fun p => ∑ l, ε^(l.val+1) * + (P i k l).variation (A.jetChartMap i F) + ((A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry) + (planeCoordinateIsometry.symm p,0)) + apply ContDiff.sum + intro l _ + apply contDiff_const.mul + have hs := (P i k l).variation_smooth (U := univ) isOpen_univ + (A.jetChartMap_smooth i hF) + (((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff).comp + planeCoordinateIsometry.contDiff) (fun _ _ => mem_univ _) (hP i k l) + have hs' : ContDiff ℝ ∞ ((P i k l).variation (A.jetChartMap i F) + ((A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry)) := by + apply contDiffOn_univ.mp + simpa only [univ_prod_univ] using hs + exact hs'.comp (planeCoordinateIsometry.symm.contDiff.prodMk contDiff_const) + +lemma atlasPolynomialQuadratic_smooth {n : A.centers → ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {F X : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hX : ContMDiff planeModel spaceModel ∞ X) + (ε : ℝ) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.atlasPolynomialQuadratic P ε F X p)) := + A.tensorPlaneRestore_smooth (fun i => coordinateQuadraticPolynomial_smooth (hP i) + (A.jetChartMap_smooth i hF) + ((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff) ε 0) + +lemma atlasPolynomialRemainder_smooth {n : A.centers → ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {F X : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hX : ContMDiff planeModel spaceModel ∞ X) + (ε : ℝ) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.atlasPolynomialRemainder P ε F X p)) := + A.tensorPlaneRestore_smooth (fun i => + (tensorTaylorRemainder_smooth (hP i) (A.jetChartMap_smooth i hF) + (((A.jetChartMap_smooth i hX).comp planeCoordinateIsometry.symm.contDiff).comp + planeCoordinateIsometry.contDiff) ε 0).comp planeCoordinateIsometry.symm.contDiff) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..6514d4d1b8b144cfb0ede957c93da5539255d982 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialSupport.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCalculus +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialLocality + +namespace OAI + +/-! The global polynomial variation is local in its varying field. +In particular, restoring the polynomial does not enlarge that support. -/ +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialSupportFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialSupportFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance polynomialSupportDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialSupportDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialSupportSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialSupportSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma jetChartMap_eventually_zero (i : A.centers) {X : M → Space} {p : M} + (hp : p ∈ (chart (i : M)).source) (hX : X =ᶠ[𝓝 p] 0) : + A.jetChartMap i X =ᶠ[𝓝 (chart (i : M) p)] 0 := by + have ht := (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 + ((chart (i : M)).continuousAt_symm ht).tendsto + have he := hX.comp_tendsto hc + filter_upwards [he,(chart (i : M)).open_target.mem_nhds ht] with y hy hyt + change X ((chart (i : M)).symm y) = 0 at hy + change spaceCoordinates (localize (i : M) (A.outer i) X y) = 0 + simp only [localize,indicator_of_mem hyt,hy,smul_zero,map_zero] + +lemma atlasPolynomialVariation_zero_of_notMem {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) (ε : ℝ) + (F X : M → Space) {p : M} (hp : p ∉ tsupport X) : + A.atlasPolynomialVariation P ε F X p = 0 := by + classical + unfold atlasPolynomialVariation tensorPlaneRestore + apply Finset.sum_eq_zero + intro i _ + by_cases ho : A.outer i p = 0 + · simp only [bundleRestore,ho,zero_smul] + · have hps := A.outer_support i (subset_tsupport (A.outer i) ho) + have hz := A.jetChartMap_eventually_zero i hps (notMem_tsupport_iff_eventuallyEq.mp hp) + have hn : chart (i : M) p ∉ tsupport (A.jetChartMap i X) := + notMem_tsupport_iff_eventuallyEq.mpr hz + have hcomp : (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i X := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + have he : coordinateRealLinearized (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 + (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + funext k + simp only [coordinateRealLinearized,linearized,hcomp, + planeCoordinateIsometry.symm_apply_apply,Pi.zero_apply] + apply Finset.sum_eq_zero + intro l _ + rw [(P i k l).variation_zero_of_notMem (A.jetChartMap i F) hn 0,mul_zero] + simp only [bundleRestore,he,map_zero,smul_zero] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialTargetProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialTargetProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..5eecc3b2e4e42a101ded41c7a89ce554e8e12fb9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialTargetProfiles.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseChartBounds +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasJetProfiles + +namespace OAI + +/-! Numerical profiles for full quadratic targets, derived before varying maps and scales. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology NNReal BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlas_polynomial_target_profiles {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (Q : A.centers → Fin 3 → Fin n → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (φ : ι → M → ℝ) (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hUK : ∀ i, U i ⊆ KU i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U i) + (R a : ℕ → ℝ) (hR : ∀ m, 0 ≤ R m) (ha : ∀ m, 0 ≤ a m) : + ∃ E : A.centers → ℕ → ℝ, (∀ i m, 0 ≤ E i m) ∧ + ∀ (G : M → Space) (hG : ContMDiff planeModel spaceModel ∞ G) + (Z : ι → M → Fin 4 → ℂ) (hZ : ∀ b, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z b)) + (s : ℝ≥0) (δ τ ε : ℝ), 0 < δ → 0 < τ → 0 < (s:ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ 1) → + (∀ m, A.ShiftedBound 2 m s (R m) G) → + (∀ i b m, WeightedEstimates.WeightedBound univ s m (a m*(δ*τ)) (A.vectorPlaneRead i (Z b))) → + ∀ i m l, WeightedEstimates.WeightedBound univ s m (E i m*δ^2) + (A.globalPolynomialQuadraticTarget Q hQ G hG ε τ φ Z hφ hZ i l) := by + classical + obtain ⟨K,B,hK,hB,hjet⟩ := A.atlas_jet_profiles U hU KU hUK R hR + choose Fp hFp hfp using fun m => A.phase_chart_gradient_bound φ hφ m + choose Mp hMp hmp using fun m => A.phase_read_gradient_bound φ hφ m + let Ap := fun i m => 1+a (m+tensorOrder (Q i)+1) + have hAp (i m) : 0 < Ap i m := by dsimp [Ap]; linarith [ha (m+tensorOrder (Q i)+1)] + choose E hE he using fun i m => A.globalPolynomialQuadraticTarget_bound Q hQ i + (hU i) (hweight i) (hK i) m (B i (m+tensorOrder (Q i))) + (Fp (m+tensorOrder (Q i))) (Ap i m) (Mp m) + (hB i _) (hFp _) (hAp i m) (hMp m) + refine ⟨E,hE,?_⟩ + intro G hG Z hZ s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall hr hz i m l + obtain ⟨hmap,hbound⟩ := hjet G hG s hs hs1 hr + apply he i m G hG φ Z hφ hZ s δ τ ε hδ hτ hs hτs hs1 hε hε1 (hsmall i) + (hmap i) (hbound i _) _ _ _ l + · intro b + have hh := weightedBound_comp_isometry planeCoordinateIsometry + (A.vectorPlaneRead_smooth i (hZ b)) (hz i b (m+tensorOrder (Q i)+1)) + have heq : A.vectorPlaneRead i (Z b) ∘ planeCoordinateIsometry = A.vectorChartRead i (Z b) := by + funext x + simp only [vectorPlaneRead,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + rw [heq] at hh + apply hh.mono_const + exact mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_one) (mul_nonneg hδ.le hτ.le) + · intro b v + exact (hfp (m+tensorOrder (Q i)) i b s s.coe_nonneg hs1 v).restrict_open (hU i) + · intro b v hv + exact hmp m i b s s.coe_nonneg hs1 v hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialValueBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialValueBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3aaea40ef7a29cc055abb1379ed74dd7e71b7128 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialValueBounds.lean @@ -0,0 +1,180 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport + +namespace OAI + +/-! The restored polynomial value has one fixed finite loss. Compact local +jet ranges suffice: a fixed cutoff removes the irrelevant values away from +the outer atlas supports before applying the restoration estimate. -/ +noncomputable section +open Set Manifold Bundle TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance polynomialValueFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialValueFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance polynomialValueDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialValueDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialValueSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialValueSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_outer_cutoff (i : A.centers) + {U : Set JetPolynomial.Base} (hU : IsOpen U) + (houter : (chart (i : M)) '' tsupport (A.outer i) ⊆ U) : + ∃ (K : Compacts JetPolynomial.Base) (χ : SupportedField (F := ℝ) K), + tsupport (χ : JetPolynomial.Base → ℝ) ⊆ U ∧ + ∀ p ∈ tsupport (A.outer i), χ (chart (i : M) p) = 1 := by + let S : Set JetPolynomial.Base := (chart (i : M)) '' tsupport (A.outer i) + have hS : IsCompact S := (isClosed_tsupport (A.outer i)).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (A.outer_support i)) + obtain ⟨V,hV,hSV,hVU,hVc⟩ := exists_open_between_and_isCompact_closure hS hU houter + obtain ⟨χ,hχ,_,hχs,hχone⟩ := + exists_contDiff_support_eq_eq_one_iff (n := (⊤ : ℕ∞)) hV hS.isClosed hSV + let K : Compacts JetPolynomial.Base := ⟨closure V,hVc⟩ + let χ' : SupportedField (F := ℝ) K := ContDiffMapSupportedIn.of_support_subset hχ + (by rw [hχs]; exact subset_closure) + refine ⟨K,χ',?_,?_⟩ + · change closure (Function.support χ) ⊆ U + rw [hχs] + exact hVU + · intro p hp + exact (hχone (chart (i : M) p)).mp ⟨p,hp,rfl⟩ + +/-- Fixed local low-jet bounds give a global bound on the actual restored +polynomial value. Its scale loss is the maximum of the chartwise losses. -/ +theorem atlas_polynomial_value_bound {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) + (Q : A.centers → Set LowJet) (hQ : ∀ i, IsCompact (Q i)) + (m : ℕ) (B : A.centers → ℝ) (hB : ∀ i, 1 ≤ B i) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + (∀ i, MapsTo (lowJet (A.jetChartMap i G)) (U i) (Q i)) → + ∀ (s ε : ℝ), 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + (∀ i, WeightedEstimates.WeightedBound (U i) s (m + tensorOrder (P i)) (B i) + (lowJet (A.jetChartMap i G))) → + A.TensorWeightedBound s m + (D * ε / s ^ (Finset.univ.sup fun i : A.centers => tensorLoss (P i))) + (A.atlasPolynomialValue P ε G) := by + classical + choose K χ hχU hχone using fun i => A.polynomial_outer_cutoff i (hU i) (houter i) + choose C hC hc using fun i => coordinatePolynomialValue_bound (hQ i) (P i) (hP i) + m (B i) (hB i) + obtain ⟨D,hD,hd⟩ := A.tensorPlaneRestore_bound m + let N : A.centers → ℝ := fun i => supportedWeightedSeminorm (K i) 1 m (χ i) + have hN (i) : 0 ≤ N i := apply_nonneg _ _ + let E : A.centers → ℝ := fun i => 2 ^ m * N i * C i + have hE (i) : 0 ≤ E i := mul_nonneg (mul_nonneg (by positivity) (hN i)) (hC i) + let E₀ : ℝ := ∑ i, E i + have hE₀ : 0 ≤ E₀ := Finset.sum_nonneg (fun i _ => hE i) + let loss : ℕ := Finset.univ.sup fun i : A.centers => tensorLoss (P i) + refine ⟨D * E₀,mul_nonneg hD hE₀,?_⟩ + intro G hG hGQ s ε hs hs1 hε hε1 hb + let f : A.centers → SmallModes.Base → Tensor := + fun i => coordinatePolynomialValue (P i) ε (A.jetChartMap i G) 0 + let ψ : A.centers → SmallModes.Base → ℝ := + fun i => (χ i) ∘ planeCoordinateIsometry.symm + let g : A.centers → SmallModes.Base → Tensor := fun i x => ψ i x • f i x + have hf (i) : ContDiff ℝ ∞ (f i) := + coordinatePolynomialValue_smooth (hP i) (A.jetChartMap_smooth i hG) ε + have hψ (i) : ContDiff ℝ ∞ (ψ i) := (χ i).contDiff.comp planeCoordinateIsometry.symm.contDiff + have hg (i) : ContDiff ℝ ∞ (g i) := (hψ i).smul (hf i) + have hψsp (i) : tsupport (ψ i) ⊆ planeCoordinateIsometry.symm ⁻¹' U i := by + apply (show tsupport (ψ i) ⊆ + planeCoordinateIsometry.symm ⁻¹' tsupport (χ i) from ?_).trans (preimage_mono (hχU i)) + apply closure_minimal _ ((isClosed_tsupport (χ i)).preimage + planeCoordinateIsometry.symm.continuous) + intro x hx + exact subset_tsupport (χ i) hx + have hψb (i) : WeightedEstimates.WeightedBound univ s m (N i) (ψ i) := + weightedBound_comp_isometry planeCoordinateIsometry.symm (χ i).contDiff + ((weightedBound_of_supportedSeminorm (1 : ℝ≥0) m (χ i)).shrink_scale hs.le hs1) + have hgb (i) : WeightedEstimates.WeightedBound univ s m (E i * ε / s ^ tensorLoss (P i)) (g i) := by + let V := planeCoordinateIsometry.symm ⁻¹' U i + have hV : IsOpen V := (hU i).preimage planeCoordinateIsometry.symm.continuous + have hlocal := (hψb i).restrict_open hV + have hpoly := hc i (U i) (hU i) (A.jetChartMap_smooth i hG) (hGQ i) + s ε hs hs1 hε hε1 (hb i) + have hprod := hlocal.smul_real hV.uniqueDiffOn hs.le (hN i) + (div_nonneg (mul_nonneg (hC i) hε) (pow_nonneg hs.le _)) + (hψ i).contDiffOn (hf i).contDiffOn hpoly + have heq : 2 ^ m * N i * (C i * ε / s ^ tensorLoss (P i)) = + E i * ε / s ^ tensorLoss (P i) := by dsimp [E]; ring + rw [heq] at hprod + exact hprod.extend_support hV + ((tsupport_smul_subset_left (ψ i) (f i)).trans (hψsp i)) + (div_nonneg (mul_nonneg (hE i) hε) (pow_nonneg hs.le _)) + have hglobal (i) : WeightedEstimates.WeightedBound univ s m (E₀ * ε / s ^ loss) (g i) := by + apply (hgb i).mono_const + have hEi : E i ≤ E₀ := Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ i) + calc + E i * ε / s ^ tensorLoss (P i) ≤ E₀ * ε / s ^ tensorLoss (P i) := + div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right hEi hε) (pow_nonneg hs.le _) + _ ≤ E₀ * ε / s ^ loss := div_le_div_of_nonneg_left (mul_nonneg hE₀ hε) + (pow_pos hs _) (pow_le_pow_of_le_one hs.le hs1 + (Finset.le_sup (f := fun i : A.centers => tensorLoss (P i)) (Finset.mem_univ i))) + have hout := hd g s (E₀ * ε / s ^ loss) hs hs1 + (div_nonneg (mul_nonneg hE₀ hε) (pow_nonneg hs.le _)) hg hglobal + have heq : A.tensorPlaneRestore g = A.atlasPolynomialValue P ε G := by + funext p + apply Finset.sum_congr rfl + intro i _ + by_cases hp : p ∈ tsupport (A.outer i) + · have hχp := hχone i p hp + change A.outer i p • (A.tensorTriv i).symmL ℝ p + (fiberFromThree ((χ i) (planeCoordinateIsometry.symm + (planeCoordinateIsometry (chart (i : M) p))) • f i + (planeCoordinateIsometry (chart (i : M) p)))) = _ + simp only [LinearIsometryEquiv.symm_apply_apply,hχp,one_smul] + rfl + · have hz : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport hp + simp only [bundleRestore,hz,zero_smul] + rw [heq] at hout + convert hout using 1 + dsimp [loss] + ring + + +/-- One profile controls every derivative order, before the actual map and +scales are chosen. -/ +theorem atlas_polynomial_value_bounds {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ U i) + (Q : A.centers → Set LowJet) (hQ : ∀ i, IsCompact (Q i)) + (B : A.centers → ℕ → ℝ) (hB : ∀ i m, 1 ≤ B i m) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + ∀ (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + (∀ i, MapsTo (lowJet (A.jetChartMap i G)) (U i) (Q i)) → + ∀ (s ε : ℝ), 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + (∀ i m, WeightedEstimates.WeightedBound (U i) s (m + tensorOrder (P i)) (B i m) + (lowJet (A.jetChartMap i G))) → + ∀ m, A.TensorWeightedBound s m + (D m * ε / s ^ (Finset.univ.sup fun i : A.centers => tensorLoss (P i))) + (A.atlasPolynomialValue P ε G) := by + choose D hD hb using fun m => A.atlas_polynomial_value_bound P hP U hU houter Q hQ + m (fun i => B i m) (fun i => hB i m) + refine ⟨D,hD,?_⟩ + intro G hG hGQ s ε hs hs1 hε hε1 hjet m + exact hb m G hG hGQ s ε hs hs1 hε hε1 (fun i => hjet i m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialVariationRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialVariationRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..570452069663a7db111778f0430aea5aec26c3f2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPolynomialVariationRepresentation.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialRepresentation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialCalculus +import OAI.Geometry.SurfaceImmersion.Geometry.InitialInputBounds + +namespace OAI + +/-! The local representatives differentiate to the same first and second +variations as the global polynomial tensor. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance variationRepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance variationRepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance variationRepDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance variationRepDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance variationRepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance variationRepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorChartRead_smul (i : A.centers) (c : ℝ) (u : ∀ p : M, CovariantTwoTensor p) : + A.tensorChartRead i (c • u) = c • A.tensorChartRead i u := by + funext x + by_cases hx : x ∈ (chart (i : M)).target + · simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_mem hx,bundleComponent,Pi.smul_apply,map_smul] + rw [smul_comm] + · simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_notMem hx,map_zero,Pi.smul_apply,smul_zero] + +lemma polynomial_first_of_representation {n : A.centers → ℕ} {m : ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (i : A.centers) {Q : Fin 3 → Fin m → Expression} + (hQ : ∀ k l, (Q k l).SmoothCoeffs univ) + (x : Base) + (hrep : ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x) + {F X : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hX : ContMDiff planeModel spaceModel ∞ X) (ε : ℝ) : + coordinateRealLinearized Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialVariation P ε F X) x := by + have hl := coordinatePolynomialValue_hasDerivAt hQ ε 0 + (A.jetChartMap_smooth i hF) (A.jetChartMap_smooth i hX) x + have hr := A.tensorChartRead_hasDerivAt i x + (A.atlasPolynomialValue_hasDerivAt hP ε hF hX ((chart (i : M)).symm x)) + have he : (fun s : ℝ => coordinatePolynomialValue Q ε + (A.jetChartMap i F+s • A.jetChartMap i X) 0 (planeCoordinateIsometry x)) = + (fun s : ℝ => A.tensorChartRead i (A.atlasPolynomialValue P ε (F+s • X)) x) := by + funext s + rw [← A.jetChartMap_affine] + exact hrep (F+s • X) (hF.add (space_smul_contMDiff hX s)) ε + rw [he] at hl + exact hl.unique hr + +lemma polynomial_quadratic_of_representation {n : A.centers → ℕ} {m : ℕ} + {P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (i : A.centers) {Q : Fin 3 → Fin m → Expression} + (hQ : ∀ k l, (Q k l).SmoothCoeffs univ) + (x : Base) + (hrep : ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialValue P ε F) x) + {F X : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + (hX : ContMDiff planeModel spaceModel ∞ X) (ε : ℝ) : + coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F X) x := by + have hl := coordinateRealLinearized_hasDerivAt hQ ε 0 + (A.jetChartMap_smooth i hF) (A.jetChartMap_smooth i hX) x + have hr := A.tensorChartRead_hasDerivAt + (f := fun s => A.atlasPolynomialVariation P ε (F+s • X) X) + (f' := (2 : ℝ) • A.atlasPolynomialQuadratic P ε F X) i x + (A.atlasPolynomialVariation_hasDerivAt hP ε hF hX ((chart (i : M)).symm x)) + have he : (fun s : ℝ => coordinateRealLinearized Q ε + (A.jetChartMap i F+s • A.jetChartMap i X) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x)) = + (fun s : ℝ => A.tensorChartRead i (A.atlasPolynomialVariation P ε (F+s • X) X) x) := by + funext s + rw [← A.jetChartMap_affine] + exact A.polynomial_first_of_representation hP i hQ x hrep + (hF.add (space_smul_contMDiff hX s)) hX ε + rw [he] at hl + have hh := hl.unique hr + have hs := congrFun (A.tensorChartRead_smul i (2 : ℝ) + (A.atlasPolynomialQuadratic P ε F X)) x + rw [hs] at hh + have hc := congrArg (fun t : Tensor => (1/2 : ℝ) • t) hh + simpa only [Pi.smul_apply,smul_smul,show (1/2 : ℝ)*2 = 1 by norm_num,one_smul] using hc + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitiveMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitiveMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..f45864ebbd7021940992bdb6efc8007cf01ef859 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitiveMean.lean @@ -0,0 +1,188 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledInitialMap + +namespace OAI + +/-! Exact normalized mean identities for the global primitive iteration. +The residual is always that of the actual restored polynomial metric. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +local instance atlasPrimitiveFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasPrimitiveFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasPrimitiveDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasPrimitiveDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasPrimitiveSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasPrimitiveSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {n : A.centers → ℕ} + +def normalizedPolynomialDefect + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε δ : ℝ) + (γ : ∀ x : M, CovariantTwoTensor x) (G : M → Space) : ∀ x : M, CovariantTwoTensor x := + (δ^2)⁻¹ • (γ-A.atlasPolynomialMetric P ε G)-γ + +def polynomialMeanTarget + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε δ δ' : ℝ) + (γ : ∀ x : M, CovariantTwoTensor x) (G : M → Space) : ∀ x : M, CovariantTwoTensor x := + (δ^2)⁻¹ • (γ-A.atlasPolynomialMetric P ε G-δ'^2 • γ) + +omit [CompactSpace M] in +lemma polynomialMeanTarget_eq + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε δ δ' : ℝ) + (γ : ∀ x : M, CovariantTwoTensor x) (G : M → Space) : + A.polynomialMeanTarget P ε δ δ' γ G = + γ+A.normalizedPolynomialDefect P ε δ γ G-(δ'^2/δ^2) • γ := by + funext x + ext v w + change (δ^2)⁻¹*(γ x v w-A.atlasPolynomialMetric P ε G x v w-δ'^2*γ x v w) = + γ x v w+((δ^2)⁻¹*(γ x v w-A.atlasPolynomialMetric P ε G x v w)-γ x v w)- + (δ'^2/δ^2)*γ x v w + ring + +lemma normalizedPolynomialDefect_smooth + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {ε δ : ℝ} + {γ : ∀ x : M, CovariantTwoTensor x} + (hγ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x))) + {G : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.normalizedPolynomialDefect P ε δ γ G x)) := + (((hγ.sub_section (A.atlasPolynomialMetric_smooth hP hG ε)).const_smul_section).sub_section hγ) + +lemma polynomialMeanTarget_smooth + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) {ε δ δ' : ℝ} + {γ : ∀ x : M, CovariantTwoTensor x} + (hγ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x))) + {G : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.polynomialMeanTarget P ε δ δ' γ G x)) := + ((hγ.sub_section (A.atlasPolynomialMetric_smooth hP hG ε)).sub_section + (hγ.const_smul_section (a := δ'^2))).const_smul_section + +omit [CompactSpace M] in +lemma normalizedPolynomialDefect_seed + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε : ℝ) + {F : M → Space} (hF : ContMDiff planeModel spaceModel ∞ F) + {δ : ℝ} (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) : + A.normalizedPolynomialDefect P ε δ (inducedTensor F) (Real.sqrt (1-δ^2) • F) = + (-(δ^2)⁻¹) • A.atlasPolynomialValue P ε (Real.sqrt (1-δ^2) • F) := by + unfold normalizedPolynomialDefect atlasPolynomialMetric + rw [inducedTensor_const_smul hF,Real.sq_sqrt (sub_nonneg.mpr hδ1)] + funext x + ext v w + change (δ^2)⁻¹*(inducedTensor F x v w- + ((1-δ^2)*inducedTensor F x v w+ + A.atlasPolynomialValue P ε (Real.sqrt (1-δ^2) • F) x v w))-inducedTensor F x v w = + -(δ^2)⁻¹*A.atlasPolynomialValue P ε (Real.sqrt (1-δ^2) • F) x v w + field_simp + ring + +lemma normalizedPolynomialDefect_after_step + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + {ε δ δ' s C : ℝ} {m : ℕ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + {γ : ∀ x : M, CovariantTwoTensor x} + (hγ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x))) + {G G' : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) + (hG' : ContMDiff planeModel spaceModel ∞ G') + (hb : A.TensorWeightedBound s m C + (A.atlasPolynomialMetric P ε G'-A.atlasPolynomialMetric P ε G- + δ^2 • A.polynomialMeanTarget P ε δ δ' γ G)) : + A.TensorWeightedBound s m (C/δ'^2) (A.normalizedPolynomialDefect P ε δ' γ G') := by + have he : A.normalizedPolynomialDefect P ε δ' γ G' = + (-(δ'^2)⁻¹) • (A.atlasPolynomialMetric P ε G'-A.atlasPolynomialMetric P ε G- + δ^2 • A.polynomialMeanTarget P ε δ δ' γ G) := by + funext x + ext v w + change (δ'^2)⁻¹*(γ x v w-A.atlasPolynomialMetric P ε G' x v w)-γ x v w = + -(δ'^2)⁻¹*(A.atlasPolynomialMetric P ε G' x v w-A.atlasPolynomialMetric P ε G x v w- + δ^2*((δ^2)⁻¹*(γ x v w-A.atlasPolynomialMetric P ε G x v w-δ'^2*γ x v w))) + field_simp + ring + have hT := A.polynomialMeanTarget_smooth (ε := ε) (δ := δ) (δ' := δ') hP hγ hG + have hsmooth := ((A.atlasPolynomialMetric_smooth hP hG' ε).sub_section + (A.atlasPolynomialMetric_smooth hP hG ε)).sub_section + (hT.const_smul_section (a := δ^2)) + have hh := A.tensorWeightedBound_const_smul hsmooth hb (-(δ'^2)⁻¹) + rw [← he] at hh + convert hh using 1 + rw [abs_neg,abs_of_pos (inv_pos.mpr (sq_pos_of_ne_zero hδ'))] + ring + + +/-- The next input stays in the same bounded family whenever the old +normalized defect does. -/ +lemma polynomialMeanTarget_bound + {P : (i : A.centers) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + {ε δ δ' s A₀ B₀ : ℝ} {m : ℕ} (hδ : 0 < δ) (hδ' : 0 ≤ δ') + (hδδ : δ' ≤ δ) (hs : 0 ≤ s) (hA₀ : 0 ≤ A₀) + {γ : ∀ x : M, CovariantTwoTensor x} + (hγ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (γ x))) + {G : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) + (hγb : A.TensorWeightedBound s m A₀ γ) + (hDb : A.TensorWeightedBound s m B₀ (A.normalizedPolynomialDefect P ε δ γ G)) : + A.TensorWeightedBound s m (2*A₀+B₀) (A.polynomialMeanTarget P ε δ δ' γ G) := by + have hr : 0 ≤ δ'^2/δ^2 := div_nonneg (sq_nonneg _) (sq_nonneg _) + have hr1 : δ'^2/δ^2 ≤ 1 := (div_le_one (sq_pos_of_pos hδ)).2 (by nlinarith) + have hscaled := A.tensorWeightedBound_const_smul hγ hγb (δ'^2/δ^2) + have hscaled' : A.TensorWeightedBound s m A₀ ((δ'^2/δ^2) • γ) := by + intro i + apply (hscaled i).mono_const + rw [abs_of_nonneg hr] + exact mul_le_of_le_one_left hA₀ hr1 + have hD := A.normalizedPolynomialDefect_smooth (ε := ε) (δ := δ) hP hγ hG + have hsum := A.tensorWeightedBound_add hγ hD hs hγb hDb + have hsub := A.tensorWeightedBound_sub (hγ.add_section hD) + (hγ.const_smul_section (a := δ'^2/δ^2)) hs hsum hscaled' + rw [A.polynomialMeanTarget_eq] + convert hsub using 1 + ring + +omit [CompactSpace M] in +/-- Quantitative closeness of the next input in the fixed tensor encoding. -/ +lemma polynomialMeanTarget_distance + (P : (i : A.centers) → Fin 3 → Fin (n i) → Expression) (ε δ δ' : ℝ) + (γ : ∀ x : M, CovariantTwoTensor x) (G : M → Space) + (x : JetPolynomial.Base) {a b : ℝ} + (hD : ‖A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x‖ ≤ a) + (hγ : ‖A.tensorEncode γ x‖ ≤ b) : + ‖A.tensorEncode (A.polynomialMeanTarget P ε δ δ' γ G) x-A.tensorEncode γ x‖ ≤ + a+(δ'^2/δ^2)*b := by + rw [A.polynomialMeanTarget_eq,A.tensorEncode_sub,A.tensorEncode_add,A.tensorEncode_smul] + change ‖(A.tensorEncode γ x+A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x- + (δ'^2/δ^2) • A.tensorEncode γ x)-A.tensorEncode γ x‖ ≤ _ + have he : (A.tensorEncode γ x+A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x- + (δ'^2/δ^2) • A.tensorEncode γ x)-A.tensorEncode γ x = + A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x- + (δ'^2/δ^2) • A.tensorEncode γ x := by abel + rw [he] + calc + _ ≤ ‖A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x‖+ + ‖(δ'^2/δ^2) • A.tensorEncode γ x‖ := norm_sub_le _ _ + _ = ‖A.tensorEncode (A.normalizedPolynomialDefect P ε δ γ G) x‖+ + (δ'^2/δ^2)*‖A.tensorEncode γ x‖ := by + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (div_nonneg (sq_nonneg _) (sq_nonneg _))] + _ ≤ _ := add_le_add hD (mul_le_mul_of_nonneg_left hγ + (div_nonneg (sq_nonneg _) (sq_nonneg _))) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitivePolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitivePolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7cb249032bc13f4c4b45853a5e0adecfc557f26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasPrimitivePolynomial.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric +import OAI.Geometry.SurfaceImmersion.Correction.SurfaceMeanTensor + +namespace OAI + +/-! Embed the three mean-polynomial coefficients of one primitive in the +actual global atlas operator, with zero contribution from every other chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial JetPolynomial.Perturbation +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +lemma meanTensorPolynomial_global_extension {Q : Set LowJet} (hQ : IsCompact Q) + (hQO : Q ⊆ O) (n : ℕ) : + ∃ P : Fin 3 → Fin n → Expression, + (∀ k r, (P k r).SmoothCoeffs univ) ∧ + (∀ k r, (P k r).order = (l.meanTensorPolynomial n k r).order) ∧ + (∀ k r, (P k r).loss = (l.meanTensorPolynomial n k r).loss) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space), ContDiff ℝ ∞ G → + ∀ (z : ℝ) (p : JetPolynomial.Base), lowJet G p ∈ Q → + coordinateMetricMap P z G (planeCoordinateIsometry p) = + l.meanTensorOperator n z G (planeCoordinateIsometry p) := by + classical + choose P hs ho hl he using fun k r => Expression.exists_global_extension O.isOpen + (l.meanTensorPolynomial_smooth n k r) hQ hQO + refine ⟨P,hs,ho,hl,?_⟩ + intro G hG z p hp + rw [← l.coordinateMetricMap_eq_meanTensorOperator hG] + have hpoly : coordinatePolynomialValue P z G 0 (planeCoordinateIsometry p) = + coordinatePolynomialValue (l.meanTensorPolynomial n) z G 0 (planeCoordinateIsometry p) := by + funext k + unfold coordinatePolynomialValue + apply Finset.sum_congr rfl + intro r _ + rw [he k r G (planeCoordinateIsometry.symm (planeCoordinateIsometry p),0) + (by simpa only [planeCoordinateIsometry.symm_apply_apply] using hp)] + change RealModes.realMetricTensor (G ∘ planeCoordinateIsometry.symm) (planeCoordinateIsometry p)+ + coordinatePolynomialValue P z G 0 (planeCoordinateIsometry p) = _ + rw [hpoly] + rfl + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +local instance primitivePolyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitivePolyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitivePolyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitivePolyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitivePolySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitivePolySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- A single primitive's mean polynomial in the fixed atlas. -/ +def primitiveAtlasPolynomial {n : ℕ} (i : A.centers) (P : Fin 3 → Fin n → Expression) + (j : A.centers) : Fin 3 → Fin n → Expression := by + classical + exact if j = i then P else fun _ _ => Expression.coeff (fun _ => 0) + +omit [CompactSpace M] in +lemma primitiveAtlasPolynomial_smooth {n : ℕ} (i : A.centers) + {P : Fin 3 → Fin n → Expression} (hP : ∀ k r, (P k r).SmoothCoeffs univ) : + ∀ j k r, (A.primitiveAtlasPolynomial i P j k r).SmoothCoeffs univ := by + classical + intro j k r + by_cases hji : j = i + · simpa only [primitiveAtlasPolynomial,ite_eq_left hji] using hP k r + · simp only [primitiveAtlasPolynomial,ite_eq_right hji,Expression.SmoothCoeffs] + exact contDiffOn_const + +omit [CompactSpace M] in +lemma atlasPolynomialValue_primitive {n : ℕ} (i : A.centers) + (P : Fin 3 → Fin n → Expression) (z : ℝ) (G : M → Space) : + A.atlasPolynomialValue (A.primitiveAtlasPolynomial i P) z G = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (coordinatePolynomialValue P z (A.jetChartMap i G) 0 (planeCoordinateIsometry y))) := by + classical + funext p + unfold atlasPolynomialValue tensorPlaneRestore + rw [Finset.sum_eq_single i] + · simp [primitiveAtlasPolynomial] + · intro j _ hji + have hz : coordinatePolynomialValue (A.primitiveAtlasPolynomial i P j) z (A.jetChartMap j G) 0 = 0 := by + funext x k + simp only [primitiveAtlasPolynomial,ite_eq_right hji,coordinatePolynomialValue,Expression.eval, + mul_zero,Finset.sum_const_zero,Pi.zero_apply] + simp only [hz,Pi.zero_apply,map_zero,bundleRestore,smul_zero] + · exact fun hi => False.elim (hi (Finset.mem_univ _)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialDirection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialDirection.lean new file mode 100644 index 0000000000000000000000000000000000000000..731073932f7ba5a5bd6eb6e9db12a0b8575cb5c2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialDirection.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasSupportedPolynomialVariation +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasDifferential + +namespace OAI + +/-! A supported Euclidean field is restored with exactly its original +localized jet, so the local polynomial solver acts on the actual direction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance restoredDirectionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredDirectionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredDirectionDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredDirectionDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredDirectionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredDirectionSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma jetChartMap_restored_direction (i : A.centers) (X : RealModes.RField 4) + (hX : tsupport X ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.jetChartMap i (restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) = X ∘ planeCoordinateIsometry := by + have hsp := (tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) X).trans hX + funext x + by_cases hx : x ∈ (chart (i : M)).target + · change spaceCoordinates (localize (i : M) (A.outer i) + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) x) = _ + rw [localize,indicator_of_mem hx,A.restore_plane_in_coordinates i _ hsp hx] + simp only [Function.comp_apply,map_smul,ContinuousLinearEquiv.apply_symm_apply] + by_cases hz : X (planeCoordinateIsometry x) = 0 + · rw [hz,smul_zero] + · have hp : (chart (i : M)).symm x ∈ tsupport (A.weight i) := by + apply A.mem_weight_support_of_plane i ((chart (i : M)).map_target hx) + rw [(chart (i : M)).right_inv hx] + exact hX (subset_tsupport X hz) + rw [A.outer_one i _ hp,one_pow,one_smul] + · have hz : X (planeCoordinateIsometry x) = 0 := by + by_contra hn + obtain ⟨y,hy,he⟩ := hX (subset_tsupport X hn) + have hyx : y = x := planeCoordinateIsometry.injective he + subst y + obtain ⟨p,hp,rfl⟩ := hy + exact hx ((chart (i : M)).map_source (A.weight_support i hp)) + change spaceCoordinates (localize (i : M) (A.outer i) _ x) = _ + rw [localize,indicator_of_notMem hx,map_zero] + exact hz.symm + +theorem restored_polynomial_direction {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (i : A.centers) (Q : Fin 3 → Fin m → Expression) + (F : M → Space) (X : RealModes.RField 4) + (hsp : tsupport X ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) (ε : ℝ) + (hread : ∀ x ∈ (A.chartWeightCompact i : Set Base), + coordinateRealLinearized Q ε (A.jetChartMap i F) X 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialVariation P ε F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry))) x) : + A.atlasPolynomialVariation P ε F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun x => fiberFromThree + (coordinateRealLinearized Q ε (A.jetChartMap i F) X 0 (planeCoordinateIsometry x))) := by + have hs := A.restore_plane_tsupport i (spaceCoordinates.symm ∘ X) + ((tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) X).trans hsp) + have he : A.jetChartMap i (restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) ∘ planeCoordinateIsometry.symm = X := by + rw [A.jetChartMap_restored_direction i X hsp] + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + have hh := A.supported_polynomial_variation P i Q F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) hs ε + simpa only [he] using hh (by simpa only [he] using hread) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..507c7a3280d5839ef5294ffcaa127a63a11054ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasRestoredPolynomialRepresentation.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialRestoredRead + +namespace OAI + +/-! Global coefficient extensions for one restored polynomial tensor. +The representation holds on the open nonzero partition-weight locus, +including chart points outside the support of the restored term. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance restoredPolyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredPolyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredPolyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredPolyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredPolySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredPolySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorChartRead_restore_zero (i j : A.centers) (f : Base → TensorFiber) + {x : Base} (hx : x ∈ (chart (i : M)).target) + (hz : A.outer j ((chart (i : M)).symm x) = 0) : + A.tensorChartRead i (A.bundleRestore A.tensorTriv j f) x = 0 := by + simp only [tensorChartRead,Function.comp_apply,bundleCutoff,localize, + indicator_of_mem hx,bundleComponent,bundleRestore,hz,zero_smul,map_zero,smul_zero] + +theorem restored_polynomial_representation (i j : A.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) : + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), A.chartWeight i x ≠ 0 → ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (A.bundleRestore A.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue P ε + (A.jetChartMap j F) t (JetPolynomial.planeCoordinateIsometry y)))) x := by + obtain ⟨U,hU,hKU,hUe,Q,hQ,hread⟩ := A.compact_restored_polynomial_read i j P hP + (A.pairSupport_compact i j) (A.pairSupport_transition i j) + obtain ⟨χ,hχ,_,_,hχU,hχone⟩ := + CollarVelocity.compact_cutoff (A.pairSupport_compact i j) hU hKU + let L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + fun x => χ x • ContinuousLinearMap.id ℝ PhaseMean.Tensor + have hL : ContDiff ℝ ∞ L := hχ.smul contDiff_const + refine ⟨mapTensorPolynomial L Q,mapTensorPolynomial_smooth hL hQ,?_⟩ + intro F hF x hx ε t + have hxt : x ∈ (chart (i : M)).target := by + by_contra hn + exact hx (by simp only [chartWeight,indicator_of_notMem hn]) + have hw : A.weight i ((chart (i : M)).symm x) ≠ 0 := by + simpa only [chartWeight,indicator_of_mem hxt] using hx + have hvalue := mapTensorPolynomial_eval L Q ε (A.jetChartMap i F) t x + rw [hvalue] + change χ x • coordinatePolynomialValue Q ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x) = _ + by_cases hz : A.outer j ((chart (i : M)).symm x) = 0 + · have hzero := A.tensorChartRead_restore_zero i j + (fun y => fiberFromThree (coordinatePolynomialValue P ε (A.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry y))) hxt hz + by_cases hxU : x ∈ U + · rw [hread F hF x hxU hw ε t,hzero,smul_zero] + · have hχx : χ x = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hxU (hχU h)) + rw [hχx,zero_smul,hzero] + · have hxK : x ∈ A.pairSupport i j := by + refine ⟨(chart (i : M)).symm x,⟨subset_tsupport _ hw,subset_tsupport _ hz⟩,?_⟩ + exact (chart (i : M)).right_inv hxt + rw [hχone x hxK,one_smul,hread F hF x (hKU hxK) hw ε t] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialQuadratic.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialQuadratic.lean new file mode 100644 index 0000000000000000000000000000000000000000..2da4ef95f9125948daab33546adde227faa11eac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialQuadratic.lean @@ -0,0 +1,152 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasSupportedPolynomialVariation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanSupport +import OAI.Geometry.SurfaceImmersion.Correction.AtlasRestoredPolynomialDirection + +namespace OAI + +noncomputable section +open Set Filter Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance quadraticSupportFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance quadraticSupportFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance quadraticSupportDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance quadraticSupportDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance quadraticSupportSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance quadraticSupportSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + + +/-- A quadratic variation vanishes wherever its varying field vanishes as a germ. -/ +lemma second_variation_zero_of_notMem (e : Expression) (G : Base → JetPolynomial.Space) + {H : Base → JetPolynomial.Space} {p : Base} (hp : p ∉ tsupport H) (t : ℝ) : + (e.variations 1).eval ![G,H,H,0] (p,t) = 0 := by + let J : DirectionJets := fun w a p => (jet H w a p : ℂ) + have hz : quadraticComplex e G J J (p,t) = 0 := by + apply quadraticComplex_zero_at + intro w a + change (jet H w a p : ℂ) = 0 + rw [image_eq_zero_of_notMem_tsupport (fun h => hp (tsupport_jet H w a h))] + rfl + have he := quadraticComplex_real_fields e G H H (p,t) + rw [show quadraticComplex e G (fun w a p => (jet H w a p : ℂ)) + (fun w a p => (jet H w a p : ℂ)) (p,t) = 0 from hz] at he + exact Complex.ofReal_eq_zero.mp he.symm + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma atlasPolynomialQuadratic_zero_of_notMem {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) (ε : ℝ) + (F X : M → Space) {p : M} (hp : p ∉ tsupport X) : + A.atlasPolynomialQuadratic P ε F X p = 0 := by + classical + unfold atlasPolynomialQuadratic tensorPlaneRestore + apply Finset.sum_eq_zero + intro i _ + by_cases ho : A.outer i p = 0 + · simp only [bundleRestore,ho,zero_smul] + · have hps := A.outer_support i (subset_tsupport (A.outer i) ho) + have hz := A.jetChartMap_eventually_zero i hps (notMem_tsupport_iff_eventuallyEq.mp hp) + have hn : chart (i : M) p ∉ tsupport (A.jetChartMap i X) := + notMem_tsupport_iff_eventuallyEq.mpr hz + have hcomp : (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i X := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + have he : coordinateQuadraticPolynomial (P i) ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 + (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + funext k + simp only [coordinateQuadraticPolynomial,hcomp, + planeCoordinateIsometry.symm_apply_apply,Pi.zero_apply] + apply Finset.sum_eq_zero + intro l _ + rw [second_variation_zero_of_notMem (P i k l) (A.jetChartMap i F) hn 0,mul_zero,mul_zero] + simp only [bundleRestore,he,map_zero,smul_zero] + + +theorem supported_polynomial_quadratic {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (i : A.centers) (Q : Fin 3 → Fin m → Expression) + (F X : M → Space) + (hsp : tsupport X ⊆ tsupport (A.weight i)) (ε : ℝ) + (hread : ∀ x ∈ (A.chartWeightCompact i : Set Base), + coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F X) x) : + A.atlasPolynomialQuadratic P ε F X = A.bundleRestore A.tensorTriv i + (fun x => fiberFromThree (coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x))) := by + funext p + by_cases hp : p ∈ tsupport (A.weight i) + · have he := A.restore_chart_read_on_weight i (A.atlasPolynomialQuadratic P ε F X) hp + (A.tensorPlaneRestore_symmetric _ p) + have hr := hread (chart (i : M) p) ⟨p,hp,rfl⟩ + change _ = A.outer i p • (A.tensorTriv i).symmL ℝ p (fiberFromThree _) + rw [hr] + exact he.symm + · have hX : p ∉ tsupport X := fun hx => hp (hsp hx) + rw [A.atlasPolynomialQuadratic_zero_of_notMem P ε F X hX] + by_cases ho : A.outer i p = 0 + · simp only [bundleRestore,ho,zero_smul] + · have hsource := A.outer_support i (subset_tsupport (A.outer i) ho) + have hn : chart (i : M) p ∉ tsupport (A.jetChartMap i X) := + notMem_tsupport_iff_eventuallyEq.mpr + (A.jetChartMap_eventually_zero i hsource (notMem_tsupport_iff_eventuallyEq.mp hX)) + have hcomp : (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i X := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + have hz : coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 + (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + funext k + simp only [coordinateQuadraticPolynomial,hcomp, + planeCoordinateIsometry.symm_apply_apply,Pi.zero_apply] + apply Finset.sum_eq_zero + intro l _ + rw [second_variation_zero_of_notMem (Q k l) (A.jetChartMap i F) hn 0,mul_zero,mul_zero] + simp only [bundleRestore,hz,map_zero,smul_zero] + + +theorem restored_polynomial_quadratic {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (i : A.centers) (Q : Fin 3 → Fin m → Expression) + (F : M → Space) (X : RealModes.RField 4) + (hsp : tsupport X ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) (ε : ℝ) + (hread : ∀ x ∈ (A.chartWeightCompact i : Set Base), + coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) X 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialQuadratic P ε F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry))) x) : + A.atlasPolynomialQuadratic P ε F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun x => fiberFromThree + (coordinateQuadraticPolynomial Q ε (A.jetChartMap i F) X 0 (planeCoordinateIsometry x))) := by + have hs := A.restore_plane_tsupport i (spaceCoordinates.symm ∘ X) + ((tsupport_comp_subset (g := spaceCoordinates.symm) (map_zero _) X).trans hsp) + have he : A.jetChartMap i (restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) ∘ planeCoordinateIsometry.symm = X := by + rw [A.jetChartMap_restored_direction i X hsp] + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + have hh := A.supported_polynomial_quadratic P i Q F + (restore (i : M) (A.outer i) ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry)) hs ε + simpa only [he] using hh (by simpa only [he] using hread) + + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..9f1662be59e0113982f95efd63bc7f7bb496afb0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/AtlasSupportedPolynomialVariation.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialLocalModel +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialSupport + +namespace OAI + +/-! The variation of a globally defined polynomial in a chart-supported +direction is the restoration of that chart's actual local linearization. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance supportedVariationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance supportedVariationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance supportedVariationDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance supportedVariationDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance supportedVariationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance supportedVariationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma restore_chart_read_on_weight (i : A.centers) (u : ∀ p : M, CovariantTwoTensor p) + {p : M} (hp : p ∈ tsupport (A.weight i)) (hu : ∀ v w, u p v w = u p w v) : + A.bundleRestore A.tensorTriv i (fun x => fiberFromThree (A.tensorChartRead i u x)) p = u p := by + have hsource := A.weight_support i hp + have hc : ∀ v w, A.bundleComponent A.tensorTriv i u p v w = + A.bundleComponent A.tensorTriv i u p w v := by + intro v w + rw [A.tensorComponent_apply i u hsource,A.tensorComponent_apply i u hsource] + exact hu _ _ + change A.outer i p • (A.tensorTriv i).symmL ℝ p + (fiberFromThree (A.tensorChartRead i u (chart (i : M) p))) = _ + rw [A.tensorChartRead_on_weight i u hp,fiberFromThree_toThree _ hc, + A.outer_one i p hp,one_smul] + exact (A.tensorTriv i).symmL_continuousLinearMapAt (A.tensorTriv_domain i hsource) _ + +theorem supported_polynomial_variation {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (i : A.centers) (Q : Fin 3 → Fin m → Expression) + (F X : M → Space) + (hsp : tsupport X ⊆ tsupport (A.weight i)) (ε : ℝ) + (hread : ∀ x ∈ (A.chartWeightCompact i : Set Base), + coordinateRealLinearized Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x) = + A.tensorChartRead i (A.atlasPolynomialVariation P ε F X) x) : + A.atlasPolynomialVariation P ε F X = A.bundleRestore A.tensorTriv i + (fun x => fiberFromThree (coordinateRealLinearized Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 (planeCoordinateIsometry x))) := by + funext p + by_cases hp : p ∈ tsupport (A.weight i) + · have he := A.restore_chart_read_on_weight i (A.atlasPolynomialVariation P ε F X) hp + (A.tensorPlaneRestore_symmetric _ p) + have hr := hread (chart (i : M) p) ⟨p,hp,rfl⟩ + change _ = A.outer i p • (A.tensorTriv i).symmL ℝ p (fiberFromThree _) + rw [hr] + exact he.symm + · have hX : p ∉ tsupport X := fun hx => hp (hsp hx) + rw [A.atlasPolynomialVariation_zero_of_notMem P ε F X hX] + by_cases ho : A.outer i p = 0 + · simp only [bundleRestore,ho,zero_smul] + · have hsource := A.outer_support i (subset_tsupport (A.outer i) ho) + have hn : chart (i : M) p ∉ tsupport (A.jetChartMap i X) := + notMem_tsupport_iff_eventuallyEq.mpr + (A.jetChartMap_eventually_zero i hsource (notMem_tsupport_iff_eventuallyEq.mp hX)) + have hcomp : (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) ∘ + planeCoordinateIsometry = A.jetChartMap i X := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + have hz : coordinateRealLinearized Q ε (A.jetChartMap i F) + (A.jetChartMap i X ∘ planeCoordinateIsometry.symm) 0 + (planeCoordinateIsometry (chart (i : M) p)) = 0 := by + funext k + simp only [coordinateRealLinearized,linearized,hcomp, + planeCoordinateIsometry.symm_apply_apply,Pi.zero_apply] + apply Finset.sum_eq_zero + intro l _ + rw [(Q k l).variation_zero_of_notMem (A.jetChartMap i F) hn 0,mul_zero] + simp only [bundleRestore,hz,map_zero,smul_zero] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/BoundedSurfaceCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/BoundedSurfaceCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..a53aa193929e570fc345cbff07f37cc70cc23bbc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/BoundedSurfaceCorrection.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceVelocityIdentities +import OAI.Geometry.SurfaceImmersion.Geometry.BoundedCoefficientRecursion +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicGlobalization + +namespace OAI + +/-! Apply the finite periodic correction to the actual geometric second-jet +family, including global smooth extension and its uniform scale bound. -/ +noncomputable section +open Set +open scoped ContDiff + +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 yData (J : LowJet) : Euclidean := ι (slot 2 J) +def cData (J : LowJet) : Euclidean := ι (slot 6 J) +def xData (J : LowJet) : Euclidean := ι (tangent J) + +def coefficientExpressions (n : ℕ) : ℕ → VectorExpression := + MetricPolynomial.coefficients yData cData xData l.euclideanVelocity l.q 0 1 n + +lemma yData_smooth : ContDiffOn ℝ ∞ yData O := + (JetVelocityCoordinates.toEuclidean.contDiff.comp (slot_smooth 2)).contDiffOn + +lemma cData_smooth : ContDiffOn ℝ ∞ cData O := + (JetVelocityCoordinates.toEuclidean.contDiff.comp (slot_smooth 6)).contDiffOn + +include l in +lemma xData_smooth : ContDiffOn ℝ ∞ xData O := + JetVelocityCoordinates.toEuclidean.contDiff.comp_contDiffOn l.smoothTangent + +/-- The loss exponent is fixed by the geometric loop and finite depth, +before choosing a slow map or a differentiation order. The same coefficients +have cancellation, support, polynomial representation, and the scale bound. -/ +theorem bounded_surface_correction {S : TopologicalSpace.Opens JetPolynomial.Base} + {K : Set LowJet} (hK : IsCompact K) (hKO : K ⊆ O) + (n : ℕ) (ℓ : JetPolynomial.Base →L[ℝ] ℝ) : + ∃ d : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) + (hGK : MapsTo (lowJet G) S K), + let g := l.geometry G hG (fun _ hp => hKO (hGK hp)) + ∀ A : Set JetPolynomial.Base, IsClosed A → A ⊆ S → + (∀ p ∈ S, p ∉ A → ∀ t, l.velocity (lowJet G p, t) = normal (lowJet G p)) → + ∃ U : ℕ → Family S Euclidean, + U 0 = g.initial ∧ (∀ i p, p ∈ S → average ((U i).val p) = 0) ∧ + (∀ i, ContDiff ℝ ∞ (fun z : JetPolynomial.Base × ℝ => (U i).val z.1 (z.2 : Period))) ∧ + (∀ i p, p ∉ A → (U i).val p = 0) ∧ + (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) ∧ + (∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) ∧ + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m + (2 * n + 2)) B (lowJet G) → + WeightedBound S z m (D * z / s ^ d) + (fun p => finiteAnsatz (fun q => ι (G q)) U ℓ (n + 1) z p - ι (G p)) := by + obtain ⟨d, hd⟩ := exists_bounded_coefficients (S := S) O.isOpen hK hKO 0 1 n ℓ + yData_smooth cData_smooth (xData_smooth l) l.euclideanVelocity_smooth + (fun J hJ => by rw [yData, cData, gram_toEuclidean]; exact l.gram_ne J hJ) + l.smoothQ (fun _ hJ => l.q_pos hJ) (fun _ hJ => l.euclideanVelocity_length hJ) + refine ⟨d, ?_⟩ + intro m B hB + obtain ⟨D, hD, hcoeff⟩ := hd m B hB + refine ⟨D, hD, ?_⟩ + intro G hG hGK g A hA hAS hz + obtain ⟨U, hinit, hmean, hy, hsupport, hc, hrep, hb⟩ := hcoeff G g hG hGK + (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) + (fun _ hp => l.geometry_velocity hG (fun _ hp => hKO (hGK hp)) hp) (fun _ _ => rfl) + have hzero : ∀ i p, p ∈ S → p ∉ A → (U i).val p = 0 := by + intro i p hp hpA + exact hsupport ((S : Set JetPolynomial.Base) ∩ Aᶜ) + (S.isOpen.inter hA.isOpen_compl) inter_subset_left + (fun q hq => l.geometry_initial_zero hG (fun _ hp => hKO (hGK hp)) hq.1 (hz q hq.1 hq.2)) + i p ⟨hp, hpA⟩ + refine ⟨U, hinit, hmean, ?_, ?_, hy, hc, hrep, ?_⟩ + · exact fun i => (U i).smooth_global hA hAS (hzero i) + · intro i p hp + by_cases hpS : p ∈ S + · exact hzero i p hpS hp + · exact (U i).outside hpS + · intro s z hz hzs hs1 hbound + exact hb s z hz hzs hs1 hbound (fun q => ι (G q)) + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..fea9a7682bfab2ef2592dc35878409fbf3af8545 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothing.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingLocalSections +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothing + +namespace OAI + +/-! An actual finite-atlas smoothing operator on smooth vector-bundle sections. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + [ContMDiffVectorBundle ∞ F E planeModel] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] + +/-- Fiber coordinates, used only on the corresponding base chart. -/ +def bundleComponent (i : A.centers) (u : ∀ x, E x) (x : M) : F := + (e i).continuousLinearMapAt ℝ x (u x) + +def bundleLocalize (i : A.centers) (u : ∀ x, E x) : Base → F := + localize (i : M) (A.weight i) (A.bundleComponent e i u) + +def bundleRestore (i : A.centers) (h : Base → F) (x : M) : E x := + A.outer i x • (e i).symmL ℝ x (h (chart (i : M) x)) + +def bundleSmooth (r : ℕ) (s : ℝ) (u : ∀ x, E x) (x : M) : E x := + ∑ i : A.centers, A.bundleRestore e i (finiteSmooth r s (A.bundleLocalize e i u)) x + +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +lemma bundleComponent_smooth_on (i : A.centers) {u : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) : + ContMDiffOn planeModel 𝓘(ℝ, F) ∞ (A.bundleComponent e i u) (chart (i : M)).source := by + have h := ((e i).contMDiffOn_section_iff (chart (i : M)).open_source (hdomain i)).mp + hu.contMDiffOn + apply h.congr + intro x hx + exact (e i).continuousLinearMapAt_apply_of_mem ℝ (hdomain i hx) (u x) + +variable [CompactSpace M] + +lemma bundleLocalize_smooth (i : A.centers) {u : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) : + ContDiff ℝ ∞ (A.bundleLocalize e i u) := + localize_smooth_on (i : M) (A.weight_smooth i) (A.weight_support i) + (A.bundleComponent_smooth_on e hdomain i hu) + +omit [CompactSpace M] in +lemma bundleRestore_smooth (i : A.centers) {h : Base → F} (hh : ContDiff ℝ ∞ h) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (A.bundleRestore e i h x)) := by + have hsec : ContMDiffOn planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x ((e i).symmL ℝ x (h (chart (i : M) x)))) + (chart (i : M)).source := by + apply ((e i).contMDiffOn_section_iff (chart (i : M)).open_source (hdomain i)).mpr + apply (hh.contMDiff.comp_contMDiffOn (chart_smooth (i : M))).congr + intro x hx + rw [← (e i).continuousLinearMapAt_apply_of_mem ℝ (hdomain i hx), + (e i).continuousLinearMapAt_symmL (hdomain i hx)] + rfl + exact (A.outer_smooth i).contMDiffOn.smul_section_of_tsupport + (chart (i : M)).open_source (A.outer_support i) hsec + +/-- Smoothing produces a smooth section of the original bundle. -/ +theorem bundleSmooth_smooth (r : ℕ) {s : ℝ} (hs : 0 < s) {u : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (A.bundleSmooth e r s u x)) := by + apply ContMDiff.sum_section + intro i _ + exact A.bundleRestore_smooth e hdomain i + (finiteSmooth_smooth r hs (A.bundleLocalize_smooth e hdomain i hu)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..815db9eaff14ca269fbeabf9de90632b0fd41091 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingIdentity.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothing + +namespace OAI + +/-! Exact reconstruction and error identities for bundle smoothing. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] + +lemma bundleRestore_sub (i : A.centers) (f g : Base → F) (x : M) : + A.bundleRestore e i (f - g) x = A.bundleRestore e i f x - A.bundleRestore e i g x := by + simp only [bundleRestore, Pi.sub_apply, map_sub, smul_sub] + +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +lemma bundleRestore_localize (i : A.centers) (u : ∀ x, E x) (x : M) : + A.bundleRestore e i (A.bundleLocalize e i u) x = (A.weight i x) ^ 2 • u x := by + by_cases hx : x ∈ (chart (i : M)).source + · rw [bundleRestore, bundleLocalize, localize_chart _ _ _ hx, bundleComponent, map_smul, + (e i).symmL_continuousLinearMapAt (hdomain i hx)] + by_cases hz : A.weight i x = 0 + · simp [hz] + · rw [A.outer_one i x (subset_tsupport _ hz), one_smul] + · have ho : A.outer i x = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hx (A.outer_support i h)) + have hw : A.weight i x = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hx (A.weight_support i h)) + simp only [bundleRestore, ho, hw, zero_smul, zero_pow (by decide : 2 ≠ 0)] + +lemma bundle_sum_restore_localize (u : ∀ x, E x) (x : M) : + (∑ i : A.centers, A.bundleRestore e i (A.bundleLocalize e i u) x) = u x := by + simp_rw [A.bundleRestore_localize e hdomain] + rw [← Finset.sum_smul, A.partition x, one_smul] + +/-- The smoothing tail is exactly the finite restoration of coordinate tails. -/ +theorem bundle_smoothing_error (r : ℕ) (s : ℝ) (u : ∀ x, E x) (x : M) : + u x - A.bundleSmooth e r s u x = + ∑ i : A.centers, A.bundleRestore e i (residual s r (A.bundleLocalize e i u)) x := by + rw [← A.bundle_sum_restore_localize e hdomain u x] + unfold bundleSmooth + rw [← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro i _ + rw [← A.bundleRestore_sub, ← error_finiteSmooth] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..d6a17838ba8b3cef9ac351526d3a5d662164ae94 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingLinearity.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothingIdentity + +namespace OAI + +/-! Linearity of the concrete finite-atlas bundle smoother. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] + +lemma bundleLocalize_add (i : A.centers) (u v : ∀ x, E x) : + A.bundleLocalize e i (u + v) = A.bundleLocalize e i u + A.bundleLocalize e i v := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> + simp [bundleLocalize, localize, bundleComponent, hx, smul_add] + +lemma bundleLocalize_smul (i : A.centers) (a : ℝ) (u : ∀ x, E x) : + A.bundleLocalize e i (a • u) = a • A.bundleLocalize e i u := by + funext x + by_cases hx : x ∈ (chart (i : M)).target <;> + simp [bundleLocalize, localize, bundleComponent, hx, smul_smul, mul_comm] + +lemma bundleRestore_add (i : A.centers) (f g : Base → F) : + A.bundleRestore e i (f + g) = A.bundleRestore e i f + A.bundleRestore e i g := by + funext x + simp only [bundleRestore, Pi.add_apply, map_add, smul_add] + +lemma bundleRestore_smul (i : A.centers) (a : ℝ) (f : Base → F) : + A.bundleRestore e i (a • f) = a • A.bundleRestore e i f := by + funext x + simp only [bundleRestore, Pi.smul_apply, map_smul, smul_smul] + rw [mul_comm] + +lemma bundleSmooth_smul (r : ℕ) (s a : ℝ) (u : ∀ x, E x) : + A.bundleSmooth e r s (a • u) = a • A.bundleSmooth e r s u := by + funext x + simp only [bundleSmooth, A.bundleLocalize_smul, finiteSmooth_smul, + A.bundleRestore_smul, Pi.smul_apply, Finset.smul_sum] + +variable [ContMDiffVectorBundle ∞ F E planeModel] [CompactSpace M] +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +lemma bundleSmooth_add (r : ℕ) {s : ℝ} (hs : 0 < s) {u v : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) + (hv : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (v x))) : + A.bundleSmooth e r s (u + v) = A.bundleSmooth e r s u + A.bundleSmooth e r s v := by + funext x + simp only [bundleSmooth, A.bundleLocalize_add] + have hi (i : A.centers) := finiteSmooth_add r hs + (A.bundleLocalize_smooth e hdomain i hu) (A.bundleLocalize_smooth e hdomain i hv) + simp only [hi, A.bundleRestore_add, Pi.add_apply, Finset.sum_add_distrib] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..56e95c5c3fc945fce5fe624a3e85e210f182312a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/BundleSmoothingTransition.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothingIdentity +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTransition +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedBundleBounds + +namespace OAI + +/-! Chart transitions for the actual bundle smoother. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + [ContMDiffVectorBundle ∞ F E planeModel] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] + +def bundleTransition (i j : A.centers) (x : Base) : F →L[ℝ] F := + (e j).coordChangeL ℝ (e i) ((chart (i : M)).symm x) + +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +lemma bundleTransition_smooth (i j : A.centers) : + ContDiffOn ℝ ∞ (A.bundleTransition e i j) (transition (i : M) (j : M)).source := by + apply ContMDiffOn.contDiffOn + apply (contMDiffOn_coordChangeL (e j) (e i)).comp + ((chart_symm_smooth (i : M)).mono (fun _ hx => hx.1)) + intro x hx + exact ⟨hdomain j hx.2, hdomain i ((chart (i : M)).map_target hx.1)⟩ + +omit [ContMDiffVectorBundle ∞ F E planeModel] in +lemma bundleLocalize_restore (i j : A.centers) (h : Base → F) : + A.bundleLocalize e i (A.bundleRestore e j h) = + fun x => A.pairWeight i j x • A.bundleTransition e i j x + (h (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 + · have hbi := hdomain i ((chart (i : M)).map_target hi) + have hbj := hdomain j hj + simp only [bundleLocalize, bundleComponent, localize, indicator_of_mem hi, + bundleRestore, map_smul, pairWeight, bundleTransition] + rw [(e i).continuousLinearMapAt_apply_of_mem ℝ hbi, + (e j).symmL_apply (R := ℝ) hbj, ← (e j).coordChangeL_apply (R := ℝ) (e i) ⟨hbj, hbi⟩, smul_smul] + rfl + · have hz : A.outer j ((chart (i : M)).symm x) = 0 := + image_eq_zero_of_notMem_tsupport (fun hp => hj (A.outer_support j hp)) + simp only [bundleLocalize, bundleComponent, localize, indicator_of_mem hi, + bundleRestore, hz, zero_smul, map_zero, smul_zero, pairWeight] + · simp only [bundleLocalize, localize, pairWeight, indicator_of_notMem hi, zero_smul] + +variable [CompactSpace M] + +/-- Fiber transitions preserve each weighted derivative norm without a scale loss. -/ +theorem bundle_pair_weighted_bound (i j : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : Base → F) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ h → WeightedBound Set.univ s m C h → + WeightedBound Set.univ s m (D * C) + (A.bundleLocalize e i (A.bundleRestore e j h)) := by + obtain ⟨D, hD, hb⟩ := compact_localized_clm_composition_bound + (transition (i : M) (j : M)).open_source (A.pairSupport_compact i j) + (A.pairSupport_transition i j) (A.pairWeight_smooth i j) (A.pairWeight_support i j) + (A.bundleTransition_smooth e hdomain i j) (transition_smooth (i : M) (j : M)) m + refine ⟨D, hD, ?_⟩ + intro h s C hs hs1 hC hh hbh + rw [A.bundleLocalize_restore e hdomain] + exact hb h s C hs hs1 hC hh hbh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/C1ManifoldSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/C1ManifoldSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0bc021808441de493cc72ee670f95122424b29c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/C1ManifoldSmoothing.lean @@ -0,0 +1,177 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1LocalizedComposition +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingC1Approximation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds + +namespace OAI + +/-! Smoothing C1 maps on the fixed finite surface atlas. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma localize_C1 (p : M) {ψ : M → ℝ} (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) + (hsupp : tsupport ψ ⊆ (chart p).source) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) 1 f) : ContDiff ℝ 1 (localize p ψ f) := by + have hchart := (chart_symm_smooth p).of_le (by simp : (1 : ℕ∞ω) ≤ ∞) + have hlocal : ContDiffOn ℝ 1 + (fun x => (ψ ((chart p).symm x)) ^ 2 • f ((chart p).symm x)) (chart p).target := + ((((hψ.of_le (by simp)).comp_contMDiffOn hchart).pow 2).smul + (hf.comp_contMDiffOn hchart)).contDiffOn + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport (localize p ψ f) + · obtain ⟨y,hy,hxy⟩ := localize_tsupport p hsupp f hx + have hxT : x ∈ (chart p).target := hxy ▸ (chart p).map_source (hsupp hy) + apply (hlocal.contDiffAt ((chart p).open_target.mem_nhds hxT)).congr_of_eventuallyEq + filter_upwards [(chart p).open_target.mem_nhds hxT] with z hz + exact indicator_of_mem hz _ + · exact contDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hx) + +omit [CompactSpace M] in +lemma restore_C1 (p : M) {χ : M → ℝ} (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + (hs : tsupport χ ⊆ (chart p).source) {h : Base → V} (hh : ContDiff ℝ 1 h) : + ContMDiff planeModel 𝓘(ℝ, V) 1 (restore p χ h) := by + have heq : restore p χ h = fun x => χ x • h (chart p x) := by + funext x + by_cases hx : x ∈ (chart p).source + · simp [restore,hx] + · have hz : χ x = 0 := image_eq_zero_of_notMem_tsupport (fun h => hx (hs h)) + simp [restore,hx,hz] + rw [heq] + apply contMDiff_of_tsupport + intro x hx + have hxχ : x ∈ tsupport χ := tsupport_smul_subset_left χ (fun y => h (chart p y)) hx + have hxs := hs hxχ + have hlocal : ContMDiffOn planeModel 𝓘(ℝ,V) 1 + (fun x => χ x • h (chart p x)) (chart p).source := + (hχ.of_le (by simp)).contMDiffOn.smul + (hh.contMDiff.comp_contMDiffOn ((chart_smooth p).of_le (by simp))) + exact (hlocal x hxs).contMDiffAt ((chart p).open_source.mem_nhds hxs) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The already defined first-order finite smoother is smooth even when its +input map has only one derivative. -/ +lemma smooth_C1_input {s : ℝ} (hs : 0 < s) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) 1 f) : + ContMDiff planeModel 𝓘(ℝ, V) ∞ (A.smooth 1 s f) := by + have heq : A.smooth 1 s f = fun x => ∑ i : A.centers, + restore (i : M) (A.outer i) (finiteSmooth 1 s (localize (i : M) (A.weight i) f)) x := by + funext x + simp only [smooth,Finset.sum_apply] + rw [heq] + apply ContMDiff.sum + intro i _ + apply restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + have hi := localize_C1 (i : M) (A.weight_smooth i) (A.weight_support i) hf + simpa only [finiteSmooth,Finset.sum_range_one,residual] using + (FiniteOrderSmoothing.smooth_smooth 0 hs hi.continuous.locallyIntegrable) + +/-- The value and derivative bounds used to preserve immersion under smoothing. -/ +def C1Bound (C : ℝ) (f : M → V) : Prop := + ∀ i : A.centers, ∀ x : Base, + ‖localize (i : M) (A.weight i) f x‖ ≤ C ∧ + ‖fderiv ℝ (localize (i : M) (A.weight i) f) x‖ ≤ C + +theorem restoration_C1_bound : + ∃ D : ℝ, 0 < D ∧ ∀ (h : A.centers → Base → V) (C : ℝ), 0 ≤ C → + (∀ i, ContDiff ℝ 1 (h i)) → + (∀ i x, ‖h i x‖ ≤ C ∧ ‖fderiv ℝ (h i) x‖ ≤ C) → + A.C1Bound (D*C) (∑ i : A.centers, restore (i : M) (A.outer i) (h i)) := by + classical + choose D hD hb using fun i j : A.centers => compact_localized_C1_bound (V := V) + (transition (i : M) (j : M)).open_source (A.pairSupport_compact i j) + (A.pairSupport_transition i j) (A.pairWeight_smooth i j) (A.pairWeight_support i j) + (transition_smooth (i : M) (j : M)) + let S := ∑ i : A.centers, ∑ j : A.centers, D i j + have hS : 0 ≤ S := Finset.sum_nonneg (fun i _ => Finset.sum_nonneg (fun j _ => hD i j)) + refine ⟨1+S,by linarith,?_⟩ + intro h C hC hh hnorm i x + let H : A.centers → Base → V := fun j => + localize (i : M) (A.weight i) (restore (j : M) (A.outer j) (h j)) + have hH (j : A.centers) : ContDiff ℝ 1 (H j) := by + dsimp [H] + rw [A.localize_restore] + exact localizedComposition_C1 (transition (i : M) (j : M)).open_source + (A.pairWeight_smooth i j) ((A.pairWeight_support i j).trans (A.pairSupport_transition i j)) + (transition_smooth (i : M) (j : M)) (hh j) + have hHb (j : A.centers) : ‖H j x‖ ≤ D i j*C ∧ ‖fderiv ℝ (H j) x‖ ≤ D i j*C := by + dsimp [H] + rw [A.localize_restore] + exact hb i j (h j) C hC (hh j) (hnorm j) x + have hsum : (∑ j : A.centers, D i j)*C ≤ (1+S)*C := by + apply mul_le_mul_of_nonneg_right _ hC + have ht : (∑ j : A.centers, D i j) ≤ S := + Finset.single_le_sum (fun k _ => Finset.sum_nonneg (fun j _ => hD k j)) (Finset.mem_univ i) + linarith + change ‖localize (i : M) (A.weight i) (∑ j : A.centers, restore (j : M) (A.outer j) (h j)) x‖ ≤ _ ∧ _ + rw [localize_sum] + constructor + · exact ((norm_sum_le _ _).trans (Finset.sum_le_sum (fun j _ => (hHb j).1))).trans + (by simpa only [Finset.sum_mul] using hsum) + · rw [fderiv_fun_sum (fun j _ => (hH j).differentiable one_ne_zero x)] + exact ((norm_sum_le _ _).trans (Finset.sum_le_sum (fun j _ => (hHb j).2))).trans + (by simpa only [Finset.sum_mul] using hsum) + +variable [CompleteSpace V] + +/-- The fixed atlas smoother converges in C1 for C1 input maps. -/ +theorem smooth_C1_approximation {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) {ε : ℝ} (hε : 0 < ε) : + ∃ η : ℝ, 0 < η ∧ ∀ s : ℝ, 0 < s → s < η → + ContMDiff planeModel 𝓘(ℝ,V) ∞ (A.smooth 1 s f) ∧ + A.C1Bound ε (A.smooth 1 s f-f) := by + classical + obtain ⟨D,hD,hrestore⟩ := A.restoration_C1_bound (V := V) + let l : A.centers → Base → V := fun i => localize (i : M) (A.weight i) f + have hl (i : A.centers) : ContDiff ℝ 1 (l i) := + localize_C1 (i : M) (A.weight_smooth i) (A.weight_support i) hf + have hlc (i : A.centers) : HasCompactSupport (l i) := + localize_compact (i : M) (A.weight_support i) f + choose η hη hb using fun i : A.centers => + FiniteOrderSmoothing.smooth_C1_approximation 0 (hl i) (hlc i) (div_pos hε hD) + have hev : ∀ᶠ s in 𝓝 (0 : ℝ), ∀ i : A.centers, s < η i := + Filter.eventually_all.mpr (fun i => gt_mem_nhds (hη i)) + obtain ⟨r,hr,hrb⟩ := Metric.eventually_nhds_iff.mp hev + refine ⟨r,hr,?_⟩ + intro s hs hsr + have hsi (i : A.centers) : s < η i := + hrb (by simpa only [Real.dist_eq,sub_zero,abs_of_pos hs] using hsr) i + let e : A.centers → Base → V := fun i => FiniteOrderSmoothing.smooth 0 s (l i)-l i + have he (i : A.centers) : ContDiff ℝ 1 (e i) := + ((hb i s hs (hsi i)).1.of_le (by simp)).sub (hl i) + have heb (i : A.centers) (x : Base) : + ‖e i x‖ ≤ ε/D ∧ ‖fderiv ℝ (e i) x‖ ≤ ε/D := by + have hh := (hb i s hs (hsi i)).2 x + refine ⟨hh.1,?_⟩ + change ‖fderiv ℝ (FiniteOrderSmoothing.smooth 0 s (l i)-l i) x‖ ≤ _ + rw [fderiv_sub ((hb i s hs (hsi i)).1.differentiable (by simp) x) + ((hl i).differentiable one_ne_zero x)] + exact hh.2 + have hsum := hrestore e (ε/D) (div_nonneg hε.le hD.le) he heb + have heq : (∑ i : A.centers, restore (i : M) (A.outer i) (e i)) = A.smooth 1 s f-f := by + simp only [e,restore_sub,Finset.sum_sub_distrib] + change (∑ i : A.centers, restore (i : M) (A.outer i) + (FiniteOrderSmoothing.smooth 0 s (l i))) - + (∑ i : A.centers, restore (i : M) (A.outer i) + (localize (i : M) (A.weight i) f)) = _ + rw [A.sum_restore_localize] + congr 1 + simp only [l,smooth,finiteSmooth,Finset.sum_range_one,residual] + refine ⟨A.smooth_C1_input hs hf,?_⟩ + rw [heq] at hsum + simpa only [mul_div_cancel₀ _ hD.ne'] using hsum + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CatalogGlobalQuadraticCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CatalogGlobalQuadraticCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..df6afd19300065ba837cf17514815ffda6a974a0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CatalogGlobalQuadraticCorrection.lean @@ -0,0 +1,177 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasCatalogCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseCatalog +import OAI.Geometry.SurfaceImmersion.Geometry.CardinalityQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargetBudget + +namespace OAI + +/-! Actual global quadratic correction with explicit polynomial budgets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance catalogGlobalQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance catalogGlobalQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance catalogGlobalQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance catalogGlobalQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance catalogGlobalQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance catalogGlobalQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem catalog_global_quadratic_correction + (V : Finset SmallModes.Base) {ε b D : ℝ} + (hε : 0 < ε) (hb : 0 < b) (hD : 1 ≤ D) (hDB : (ε*b)⁻¹ ≤ D) + (B α β : ℕ → ℝ → ℝ) + (hB : ∀ m, RealModes.HasPolynomialBound (B m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) + (hα : ∀ m, RealModes.HasPolynomialBound (α m)) + (hβ : ∀ m, RealModes.HasPolynomialBound (β m)) (q : ℕ) : + ∃ (d : ℕ → ℕ) (E : ℕ → ℝ), (∀ m, 1 ≤ E m) ∧ + ∀ {ι : Type*} [Fintype ι] [DecidableEq ι], ∀ n : ℕ, Fintype.card ι ≤ n → + ∀ x : ℝ, 1 ≤ x → + ∀ (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)), + (∀ a, φ a ∈ A.linearPhaseCatalog V) → (∀ a, tsupport (Z a) ⊆ S a) → + (∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead k F) y)) → + (∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + b ≤ ‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y‖) → + (∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : Set SmallModes.Base) → + ε*‖RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y‖ ≤ + ‖PhaseGeometry.secondQuadratic + (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) y) + (-(phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) y).2, + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase φ k l)) y).1)‖) → + (∀ k l y, y ∈ (modeSupport (A.quadraticOverlapCompact S hS k l) : 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) → + ∀ (τ δ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → + (∀ k m j, j ≤ m+3 → WeightedEstimates.WeightedBound univ 1 j + (B m x/(s : ℝ)^(j-2)) (spaceCoordinates ∘ A.vectorPlaneRead k F)) → + (∀ k a m, WeightedEstimates.WeightedBound univ s (m+1) + (α m x*(δ*τ)) (A.vectorPlaneRead k (Z a))) → + (∀ k a m v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m + (β m x) (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(d m))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1)*(δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(d m)))) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k y => (A.planeWeight k y)^2 • + RealModes.nonzeroPhaseSum τ (fun a => A.vectorPlaneRead k (φ a)) + (fun a => A.vectorPlaneRead k (Z a)) y))) := by + classical + obtain ⟨e,C,hC,hcancel⟩ := A.finite_catalog_atlas_cancellation + (A.localQuadraticPhaseCatalog V) (A.localQuadraticPhaseCatalog_smooth V) + hε hb hD hDB B hB hB1 q + choose T hT ht using fun (k : A.centers) m => + cutoff_square_complex_bound (A.supportedPlaneWeight k) m + let T₀ := fun m => ∑ k : A.centers, T k m + have hT₀ (m : ℕ) : 0 ≤ T₀ m := Finset.sum_nonneg (fun k _ => hT k m) + have hTT (k : A.centers) (m : ℕ) : T k m ≤ T₀ m := + Finset.single_le_sum (fun i _ => hT i m) (Finset.mem_univ k) + let N := fun m => PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m + let H := fun m x => (Fintype.card A.centers : ℝ)*(C m*x^(e m))* + quadraticTargetBudget (N m) (T₀ (N m)) (α (N m) x) (β (N m) x) + have hH (m : ℕ) : RealModes.HasPolynomialBound (H m) := + ((RealModes.polynomialBound_const (Nat.cast_nonneg _)).mul + ((RealModes.polynomialBound_const (zero_le_one.trans (hC m))).mul + (RealModes.polynomialBound_id.pow (e m)))).mul + (quadraticTargetBudget_polynomial (N m) _ _ _ + (RealModes.polynomialBound_const (hT₀ _)) (hα _) (hβ _)) + choose d E hE hbound using hH + refine ⟨d,E,hE,?_⟩ + intro ι inst dec n hn x hx F hF φ Z hφ hZ S hS hcat hSZ hImm hnormal hrel hgram + τ δ s hτ hs hτs hs1 hδ hFj hz hp + let : DecidableEq ι := dec + let K := fun k l => modeSupport (A.quadraticOverlapCompact S hS k l) + let target := A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ + 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 + have htarget (k : A.centers) (l : RealModes.QuadraticLabel ι) (m : ℕ) : + supportedWeightedSeminorm (K k l) s m (target k l) ≤ + quadraticTargetBudget m (T₀ m) (α m x) (β m x)*δ^2 := by + have hcut : ∀ t : ℝ, 0 < t → t ≤ 1 → WeightedEstimates.WeightedBound univ t m (T₀ m) + (fun y => ((A.supportedPlaneWeight k y*A.supportedPlaneWeight k y : ℝ) : ℂ)) := + fun t htpos ht1 => (ht k m t htpos ht1).mono_const (hTT k m) + apply supportedSeminorm_le_of_weightedBound hs (by + have hTn := hT₀ m + dsimp [quadraticTargetBudget] + positivity) + exact cutoff_quadratic_bound_explicit (A.supportedPlaneWeight k) m (hT₀ m) hcut + (α m x) (β m x) τ 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δ + (hα0 m) (hβ0 m) (fun a => hz k a m) (fun a v hv => hp k a m v hv) l + obtain ⟨W,hW,hv,hr⟩ := hcancel x hx F hF + (fun k l => coordinatePhase (A.globalQuadraticPhase φ k l)) + (A.globalQuadraticPhase_mem_catalog V φ hcat) K + (fun k l => Set.image_mono (A.quadraticOverlapCompact_subset S hS k l)) + hImm hnormal hrel hgram τ s hτ hs hτs hs1 hFj target + have hsum (m : ℕ) : + (∑ k : A.centers, ∑ l : RealModes.QuadraticLabel ι, + supportedWeightedSeminorm (K k l) s (N m) (target k l)) ≤ + (Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)* + (quadraticTargetBudget (N m) (T₀ (N m)) (α (N m) x) (β (N m) x)*δ^2) := by + apply A.quadratic_family_sum_le hn _ _ (fun k l => htarget k l (N m)) + have ht0 := hT₀ (N m) + dsimp [quadraticTargetBudget] + positivity + have hcoefficient (m : ℕ) : + (C m*x^(e m))*(∑ k : A.centers, ∑ l : RealModes.QuadraticLabel ι, + supportedWeightedSeminorm (K k l) s (N m) (target k l)) ≤ + δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(d m)) := by + have hc0 : 0 ≤ C m*x^(e m) := + mul_nonneg (zero_le_one.trans (hC m)) (pow_nonneg (zero_le_one.trans hx) _) + calc + _ ≤ (C m*x^(e m))*((Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)* + (quadraticTargetBudget (N m) (T₀ (N m)) (α (N m) x) (β (N m) x)*δ^2)) := + mul_le_mul_of_nonneg_left (hsum m) hc0 + _ = δ^2*((n : ℝ)+2*(n : ℝ)^2)*H m x := by dsimp [H]; ring + _ ≤ _ := mul_le_mul_of_nonneg_left (hbound m x hx).2 (by positivity) + refine ⟨W,hW,?_,?_⟩ + · intro m k + exact (hv m k).mono_const (hcoefficient m) + · intro m k + have hh := (hr m k).mono_const (by + have h := mul_le_mul_of_nonneg_left (hcoefficient m) + (pow_nonneg (div_nonneg hτ.le hs.le) (q+1)) + simpa only [mul_assoc] using h) + have he := A.globalQuadraticTarget_expansion τ φ Z hφ hZ + have hrest : A.tensorPlaneRestore (fun i y => + ∑ j : RealModes.QuadraticLabel ι, QuadraticMean.displacement τ + (coordinatePhase (A.globalQuadraticPhase φ i j)) (target i j) y) = + A.tensorPlaneRestore (fun i y => + ∑ j : RealModes.QuadraticLabel ι, QuadraticMean.displacement τ + (coordinatePhase (A.globalQuadraticPhase φ i j)) + (A.globalQuadraticTarget τ φ Z hφ hZ i j) y) := by + congr 1 + rw [hrest] at hh + rw [he] + simpa only [mul_assoc] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredPairModels.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredPairModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..5753e23f22b818100759048d310b3edb92930c8d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredPairModels.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ThinPairCoordinates + +namespace OAI + +/-! The signed canonical normal fields and their scaled frame fillings. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def centeredOppositeNormal (c h s : ℝ) (x : Base) : Base := + ![(x 1-c)^2-h^2,s*x 0] + +def centeredEqualNormal (c h k s : ℝ) (x : Base) : Base := + ![(x 1-c)^2-h^2-(h*k*x 0)^2,s*((x 1-c)/h)*x 0] + +def centeredEqualHomotopy (c h k s v : ℝ) (x : Base) : Base := + ![(x 1-c)^2-h^2-v*(h*k*x 0)^2,s*((x 1-c)/h)*x 0] + +lemma centeredEqualHomotopy_smooth (c h k s : ℝ) : + ContDiff ℝ ∞ (fun z : ℝ × Base => centeredEqualHomotopy c h k s z.1 z.2) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [centeredEqualHomotopy] <;> fun_prop + +lemma centeredEqualHomotopy_zero_iff {c h k s v : ℝ} (hh : 0 < h) (hs : s ≠ 0) + (hv : 0 ≤ v) (x : Base) : + centeredEqualHomotopy c h k s v x = 0 ↔ + x = crosscapAxis (c-h) ∨ x = crosscapAxis (c+h) := by + constructor + · intro he + have h0 : (x 1-c)^2-h^2-v*(h*k*x 0)^2 = 0 := congrFun he 0 + have h1 : s*((x 1-c)/h)*x 0 = 0 := congrFun he 1 + have hx0 : x 0 = 0 := by + by_contra hn + have hc : x 1 = c := by + have hc' := (mul_eq_zero.mp ((mul_eq_zero.mp h1).resolve_right hn)).resolve_left hs + exact sub_eq_zero.mp ((div_eq_zero_iff).mp hc' |>.resolve_right hh.ne') + rw [hc] at h0 + have := mul_nonneg hv (sq_nonneg (h*k*x 0)) + nlinarith [sq_pos_of_pos hh] + rw [hx0] at h0 + have hf : (x 1-(c-h))*(x 1-(c+h)) = 0 := by nlinarith [h0] + rcases mul_eq_zero.mp hf with hl | hr + · left + ext i + fin_cases i <;> simp [crosscapAxis_apply,hx0,sub_eq_zero.mp hl] + · right + ext i + fin_cases i <;> simp [crosscapAxis_apply,hx0,sub_eq_zero.mp hr] + · rintro (rfl | rfl) <;> ext i <;> fin_cases i <;> + simp [centeredEqualHomotopy,crosscapAxis_apply] + +lemma centeredOppositeNormal_scaled (c h k s : ℝ) (hh : h ≠ 0) (hk : k ≠ 0) (x : Base) : + (normalPairScale (h^2) (s/k)).comp (oppositeIndexFrame (pairCoordinateMap c h k x)) = + defectFrame (centeredOppositeNormal c h s) x := by + rw [oppositeIndexFrame,normalPairScale_axis] + congr 1 <;> dsimp [pairCoordinateMap,defectFrame,centeredOppositeNormal] + · field_simp + · field_simp + +lemma centeredEqualNormal_scaled (c h k s : ℝ) (hh : h ≠ 0) (hk : k ≠ 0) (x : Base) : + (normalPairScale (h^2) (s/(2*k))).comp (equalIndexFrame (pairCoordinateMap c h k x)) = + defectFrame (centeredEqualNormal c h k s) x := by + rw [equalIndexFrame,normalPairScale_axis] + congr 1 <;> dsimp [pairCoordinateMap,defectFrame,centeredEqualNormal] + · field_simp + ring + · field_simp + +theorem centeredOppositeNormal_filling {c h s : ℝ} (hh : 0 < h) (hs : s ≠ 0) + {U : Set Base} (hU : IsOpen U) + (haxis : ∀ t ∈ Icc (c-h) (c+h), crosscapAxis t ∈ U) : + HasRelativeDefectFilling (centeredOppositeNormal c h s) U := by + obtain ⟨R,k,hR,hk,hbox⟩ := thin_pair_coordinates hh hU haxis + obtain ⟨B,K,hB,hBI,hK,hKR,hBe⟩ := compact_opposite_index_frame_filling_radius hR + obtain ⟨A,hA,hAI,hK',hAe⟩ := pullback_model_filling hB hBI hK hBe c h k (h^2) (s/k) + hh.ne' hk.ne' (pow_ne_zero _ hh.ne') (div_ne_zero hs hk.ne') + refine ⟨A,(pairCoordinates c h k hh.ne' hk.ne') ⁻¹' K,hA,hK',?_,fun x _ => hAI x,?_⟩ + · intro x hx + exact hbox (hKR hx) + · intro x hx + rw [hAe x hx] + exact centeredOppositeNormal_scaled c h k s hh.ne' hk.ne' x + +theorem centeredEqualNormal_filling {c h k s R : ℝ} (hh : 0 < h) (hk : 0 < k) + (hs : s ≠ 0) (hR : 1 < R) {U : Set Base} + (hbox : (pairCoordinateMap c h k) ⁻¹' ball (0:Base) R ⊆ U) : + HasRelativeDefectFilling (centeredEqualNormal c h k s) U := by + obtain ⟨B,K,hB,hBI,hK,hKR,hBe⟩ := compact_equal_index_frame_filling_radius hR + obtain ⟨A,hA,hAI,hK',hAe⟩ := pullback_model_filling hB hBI hK hBe c h k (h^2) (s/(2*k)) + hh.ne' hk.ne' (pow_ne_zero _ hh.ne') (div_ne_zero hs (mul_ne_zero (by norm_num) hk.ne')) + refine ⟨A,(pairCoordinates c h k hh.ne' hk.ne') ⁻¹' K,hA,hK',?_,fun x _ => hAI x,?_⟩ + · intro x hx + exact hbox (hKR hx) + · intro x hx + rw [hAe x hx] + exact centeredEqualNormal_scaled c h k s hh.ne' hk.ne' x + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredSmoothStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredSmoothStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..fafd15c33c5b6a750161e2701e213abbf0548d3e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CenteredSmoothStep.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RegularCurveGerms +import Mathlib.Analysis.SpecialFunctions.SmoothTransition + +namespace OAI + +/-! A centered flat step with strict separation of opposite parameters, +used to round a tangential return between two disjoint curve branches. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +def centeredSmoothStep (t : ℝ) : ℝ := Real.smoothTransition ((t+1)/2) + +lemma centeredSmoothStep_smooth : ContDiff ℝ ∞ centeredSmoothStep := + Real.smoothTransition.contDiff.comp ((contDiff_id.add contDiff_const).div_const 2) + +lemma centeredSmoothStep_zero {t : ℝ} (ht : t ≤ -1) : centeredSmoothStep t = 0 := + Real.smoothTransition.zero_of_nonpos (by linarith) + +lemma centeredSmoothStep_one {t : ℝ} (ht : 1 ≤ t) : centeredSmoothStep t = 1 := + Real.smoothTransition.one_of_one_le (by linarith) + +lemma centeredSmoothStep_bounds (t : ℝ) : centeredSmoothStep t ∈ Icc (0:ℝ) 1 := + ⟨Real.smoothTransition.nonneg _,Real.smoothTransition.le_one _⟩ + +lemma expNegInvGlue_strict {x y : ℝ} (hx : 0 < x) (hxy : x < y) : + expNegInvGlue x < expNegInvGlue y := by + simp only [expNegInvGlue,not_le.mpr hx,not_le.mpr (hx.trans hxy),ite_false] + apply Real.exp_lt_exp.mpr + exact neg_lt_neg (inv_strictAnti₀ hx hxy) + +lemma centeredSmoothStep_opposite_lt {t : ℝ} (ht : 0 < t) : + centeredSmoothStep (-t) < centeredSmoothStep t := by + let u := (t+1)/2 + let v := (-t+1)/2 + have hu : 0 < u := by dsimp [u]; linarith + have hvu : v < u := by dsimp [u,v]; linarith + have hev : expNegInvGlue v < expNegInvGlue u := by + by_cases hv : 0 < v + · exact expNegInvGlue_strict hv hvu + · rw [expNegInvGlue.zero_of_nonpos (not_lt.mp hv)] + exact expNegInvGlue.pos_of_pos hu + have huv : 1-u = v := by dsimp [u,v]; ring + have hvu' : 1-v = u := by dsimp [u,v]; ring + change Real.smoothTransition v < Real.smoothTransition u + rw [Real.smoothTransition,Real.smoothTransition,huv,hvu',add_comm (expNegInvGlue v)] + exact div_lt_div_of_pos_right hev (Real.smoothTransition.pos_denom u |>.trans_eq (by rw [huv])) + +lemma expNegInvGlue_hasDerivAt (x : ℝ) : + HasDerivAt expNegInvGlue ((x⁻¹)^2 * expNegInvGlue x) x := by + simpa using expNegInvGlue.hasDerivAt_polynomial_eval_inv_mul (1 : Polynomial ℝ) x + +lemma centeredSmoothStep_hasDerivAt_zero : HasDerivAt centeredSmoothStep 1 0 := by + let e := expNegInvGlue (1/2) + have he : 0 < e := expNegInvGlue.pos_of_pos (by norm_num) + have hE : HasDerivAt expNegInvGlue (4*e) (1/2) := by + convert expNegInvGlue_hasDerivAt (1/2) using 1 + norm_num [e] + have hL : HasDerivAt (fun t : ℝ => (t+1)/2) (1/2) 0 := by + convert ((hasDerivAt_id (0:ℝ)).add_const 1).div_const 2 using 1 + norm_num + have hR : HasDerivAt (fun t : ℝ => 1-(t+1)/2) (-1/2) 0 := by + convert hL.const_sub 1 using 1 + norm_num + have hA : HasDerivAt (fun t : ℝ => expNegInvGlue ((t+1)/2)) (2*e) 0 := by + have hE' : HasDerivAt expNegInvGlue (4*e) ((0+1)/2) := by + convert hE using 1 + norm_num + convert hE'.comp 0 hL using 1 <;> first | rfl | ring + have hB : HasDerivAt (fun t : ℝ => expNegInvGlue (1-(t+1)/2)) (-2*e) 0 := by + have hE' : HasDerivAt expNegInvGlue (4*e) (1-(0+1)/2) := by + convert hE using 1 + norm_num + convert hE'.comp 0 hR using 1 <;> first | rfl | ring + have hD := hA.div (hA.add hB) (by + norm_num only [Pi.add_apply,zero_add] + change e+e ≠ 0 + positivity) + convert hD using 1 + · rfl + · norm_num only [Pi.add_apply,zero_add] + change 1 = ((2*e)*(e+e)-e*(2*e+ -2*e))/(e+e)^2 + field_simp [ne_of_gt he] + ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartResidualBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartResidualBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..8da9ff530eb8d2c6e2a8eac932b4a1ad23a255b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartResidualBounds.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.TensorChartBounds + +namespace OAI + +/-! Transfer a residual estimate back through its phase chart and extend +it globally using the already established compact support. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open WeightedEstimates + +lemma real_pullbackField_inverse {χ e : SmallModes.Base → SmallModes.Base} {x : SmallModes.Base} + (hχ : DifferentiableAt ℝ χ x) (he : DifferentiableAt ℝ e (χ x)) + (hi : e ∘ χ =ᶠ[nhds x] id) (A : Tensor) : + pullbackField χ x (pullbackField e (χ x) A) = A := by + have hc := congrArg QuadraticMean.realPart + (complexPullbackField_inverse hχ he hi (RealModes.complexify A)) + simpa only [complexPullbackField, realPart_complexPullback, realPart_complexify, pullbackField] using hc + +lemma weighted_residual_from_chart + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e e.source) (hi : ContDiffOn ℝ ∞ e.symm e.target) + {R : SmallModes.Base → Tensor} (hRs : tsupport R ⊆ e.source) + {τ C J D : ℝ} {m : ℕ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) + (hC : 0 ≤ C) (hJ : 1 ≤ J) (hD : 0 ≤ D) + (hcoords : ∀ j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J) + (hfield : ∀ v, ‖v‖ ≤ 1 → WeightedBound e.source τ m D (SmallModes.coordDeriv v e)) + (hsm : ContDiffOn ℝ ∞ (fun y => pullbackField e.symm y (R (e.symm y))) e.target) + (hb : WeightedBound e.target τ m C (fun y => pullbackField e.symm y (R (e.symm y)))) : + WeightedBound Set.univ τ m (JetPolynomial.tensorChartBudget m J D * C) R := by + have hc := hb.comp_coordinates e.open_source.uniqueDiffOn e.open_target.uniqueDiffOn hτ hτ1 hJ hC + he hsm (fun _ hx => e.map_source hx) hcoords + have hp := weighted_pullbackField_apply e.open_source hτ (by positivity) hD + (hsm.comp he (fun _ hx => e.map_source hx)) he hc hfield + have hid (x : SmallModes.Base) (hx : x ∈ e.source) : + pullbackField e x (pullbackField e.symm (e x) (R (e.symm (e x)))) = R x := by + rw [e.left_inv hx] + apply real_pullbackField_inverse + · exact (he.contDiffAt (e.open_source.mem_nhds hx)).differentiableAt (by simp) + · exact (hi.contDiffAt (e.open_target.mem_nhds (e.map_source hx))).differentiableAt (by simp) + · filter_upwards [e.open_source.mem_nhds hx] with z hz using e.left_inv hz + have hl : WeightedBound e.source τ m (JetPolynomial.tensorChartBudget m J D * C) R := by + have hh := hp.congr (fun x hx => (hid x hx).symm) + convert hh using 1 + unfold JetPolynomial.tensorChartBudget + ring + exact hl.extend_support e.open_source hRs + (mul_nonneg (JetPolynomial.tensorChartBudget_nonneg m (zero_le_one.trans hJ) hD) hC) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAdjustedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAdjustedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..1ed73531d7d1f661642906b36d0f3f05ff1de8e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAdjustedMean.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFiniteMean + +namespace OAI + +/-! The actual original-coordinate quadratic mean after finite substitution. +The threshold in this statement still concerns fixed scale data. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + +lemma chartedFamilyMean_smooth (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) + (A : SmallModes.Base → Tensor) : ContDiff ℝ ∞ (chartedFamilyMean d hρ δ q A) := + ContDiff.sum (fun i _ => ((c i).combinedMeanField δ q ((d i).amplitude hρ A)).contDiff) + +lemma charted_quadratic_mean_residual (hρ : 0 < ρ) {δ : ℝ} + (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) {A H : SmallModes.Base → Tensor} + (hA : ContDiff ℝ ∞ A) (hH : ContDiff ℝ ∞ H) + (hdecomp : chartedFamilyLeading d hρ A = A) {m : ℕ} {C : ℝ} + (hb : WeightedBound Set.univ s m C (A + chartedFamilyMean d hρ δ q A - H)) : + WeightedBound Set.univ s m (δ ^ 2 * C) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 - δ ^ 2 • H) := by + have hh := hb.const_smul isOpen_univ.uniqueDiffOn + ((hA.add (chartedFamilyMean_smooth d hρ δ q A)).sub hH).contDiffOn (δ ^ 2) + rw [abs_of_nonneg (sq_nonneg δ)] at hh + apply hh.congr + intro x _ + rw [charted_family_zero_phase_identity d hρ hδ hτ q A, hdecomp] + simp only [Pi.sub_apply, Pi.smul_apply, Pi.add_apply, smul_sub] + +theorem finite_charted_adjusted_quadratic_mean (hρ : 0 < ρ) (hτ : 0 < τ) + (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q steps : ℕ) + {H : SmallModes.Base → Tensor} {r₀ : ℝ} (hgap : r₀ < r) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) + (hdecomp : ∀ A, ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + chartedFamilyLeading d hρ A = A) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ δ : ℝ, 0 < δ → τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + ∀ j ≤ steps, ∃ A : SmallModes.Base → Tensor, ContDiff ℝ ∞ A ∧ + InTrialBall Set.univ reference r A ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound L C β j m) A) ∧ + (∀ m, WeightedBound Set.univ s m + (δ ^ 2 * (differenceBound L C β κ j m * + (τ / s + ε / τ ^ tensorLoss P) ^ (j + 1))) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 - δ ^ 2 • H)) := by + obtain ⟨β,κ,η₀,hη₀,hη₁,ht⟩ := finite_charted_mean_adjustment d hρ hτ hs hτs hs1 + hε hε1 hsmall q steps hgap hC hH hH0 hbH + refine ⟨β,κ,η₀,hη₀,hη₁,?_⟩ + intro δ hδ hη j hj + obtain ⟨ha,hb,hc,hd⟩ := ht δ hδ hη j hj + refine ⟨fixedTrial H (chartedFamilyMean d hρ δ q) j,ha,hb,hc,?_⟩ + intro m + exact charted_quadratic_mean_residual d hρ hδ.ne' hτ.ne' q ha hH (hdecomp _ ha hb) (hd m) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasMeanIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasMeanIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..d9147fb5673cc9d5be8e76495278b3432fe0a225 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasMeanIdentity.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedPartitionLeading +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight + +namespace OAI + +/-! The actual quadratic zero-phase terms of the charted free oscillations +restore to the input global tensor plus the global nonlinear mean. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance chartedAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance chartedAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance chartedAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance chartedAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance chartedAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance chartedAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem charted_atlas_mean_identity + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {G : A.centers → Base → JetPolynomial.Space} + {hG : ∀ i, ContDiff ℝ ∞ (G i)} {φ : A.centers → Fin 3 → Base → ℝ} + {K : A.centers → Fin 3 → TopologicalSpace.Compacts Base} + {c : ∀ i j, PolynomialSolveData (P i) ε (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) (hρ : 0 < ρ) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (hphase : ∀ i j, coordinatePhase (φ i j) = phaseLinear (w i j • (Q i).ξ j)) + (hcutoff : ∀ i j x, x ∈ (c i j).e.source → + (d i j).cutoff ((c i j).e x) = A.planeWeight i x / w i j) + (hform : ∀ i j x, x ∈ (c i j).e.source → (d i j).form ((c i j).e x) = (Q i).Q j) + (hsupport : ∀ i j, tsupport (A.planeWeight i) ⊆ (c i j).e.source) + (u : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hsym : ∀ p v v', u p v v' = u p v' v) + (hball : ∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) : + A.tensorPlaneRestore (fun i => combinedQuadraticMean (P i) ε (G i) (φ i) + (fun j => (d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) τ 0) = + δ^2 • (u + A.atlasMean (fun i => chartedFamilyMean (n := n i) (ι := Fin 3) (P := P i) (ε := ε) (τ := τ) (s := s) (G := G i) (hG := hG i) (φ := φ i) (K := K i) (c := c i) (r := r i) (ρ := ρ) (R := R) (reference := reference i) (d i) hρ δ q) u) := by + have hleading (i : A.centers) : + chartedFamilyLeading (n := n i) (ι := Fin 3) (P := P i) (ε := ε) (τ := τ) (s := s) (G := G i) (hG := hG i) (φ := φ i) (K := K i) (c := c i) (r := r i) (ρ := ρ) (R := R) (reference := reference i) (d i) hρ (A.tensorPlaneRead i u) = A.tensorPlaneEncode u i := by + rw [charted_partition_leading (d i) hρ (A.planeWeight i) (Q i) (w i) + (hw i) (hphase i) (hcutoff i) (hform i) (hsupport i) + (A.tensorPlaneRead_smooth i hu) (hball i)] + funext x + exact (A.tensorPlaneEncode_weight i u x).symm + have he : (fun i => combinedQuadraticMean (P i) ε (G i) (φ i) + (fun j => (d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) τ 0) = + δ^2 • (A.tensorPlaneEncode u + + (fun i => chartedFamilyMean (n := n i) (ι := Fin 3) (P := P i) (ε := ε) (τ := τ) (s := s) (G := G i) (hG := hG i) (φ := φ i) (K := K i) (c := c i) (r := r i) (ρ := ρ) (R := R) (reference := reference i) (d i) hρ δ q (A.tensorPlaneRead i u))) := by + funext i + rw [charted_family_zero_phase_identity (d i) hρ hδ hτ q, hleading i] + rfl + rw [he, A.tensorPlaneRestore_smul, A.tensorPlaneRestore_add, A.tensorPlaneRestore_encode u hsym] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasQuadraticResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasQuadraticResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..24c4305a01af4da36a8c4ec26fd4913b56d9a23a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedAtlasQuadraticResidual.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasMeanIdentity + +namespace OAI + +/-! Exact zero-phase residual of the actual charted free family. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance quadraticAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance quadraticAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance quadraticAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance quadraticAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance quadraticAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance quadraticAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorWeightedBound_const_smul + {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + {s C : ℝ} {m : ℕ} + (hb : A.TensorWeightedBound s m C u) (a : ℝ) : + A.TensorWeightedBound s m (|a| * C) (a • u) := by + intro i + have hb' := (hb i).const_smul uniqueDiffOn_univ + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hu).contDiffOn a + change WeightedBound univ s m (|a| * C) (A.bundleLocalize A.tensorTriv i (a • u)) + rw [A.bundleLocalize_smul] + exact hb' + +theorem charted_family_atlas_mean_identity + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) (hρ : 0 < ρ) + (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)) + (hcutoff : ∀ 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) + (hform : ∀ 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) + (hsupport : ∀ i j, tsupport (A.planeWeight i) ⊆ ((d i).solver j).e.source) + (u : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hsym : ∀ x v v', u x v v' = u x v' v) + (hball : ∀ i, InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) : + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) = + δ^2 • (u + A.atlasMean (fun i => (d i).mean hρ δ q) u) := + A.charted_atlas_mean_identity (fun i => (d i).data) hρ Q w hw hphase hcutoff hform hsupport + u hu hsym hball hδ hτ q + +theorem charted_family_atlas_quadratic_residual + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {ε τ : ℝ} {s : ℝ≥0} {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (r i) ρ R (reference i)) (hρ : 0 < ρ) + (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)) + (hcutoff : ∀ 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) + (hform : ∀ 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) + (hsupport : ∀ i j, tsupport (A.planeWeight i) ⊆ ((d i).solver j).e.source) + (u H : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x))) + (hsym : ∀ x v v', u x v v' = u x v' v) + (hball : ∀ i, InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ C : ℝ} {m : ℕ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) + (q : ℕ) + (hb : A.TensorWeightedBound s m C + (u + A.atlasMean (fun i => (d i).mean hρ δ q) u - H)) : + A.TensorWeightedBound s m (δ^2*C) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H) := by + have hm : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.atlasMean (fun i => (d i).mean hρ δ q) u x)) := + A.tensorPlaneRestore_smooth (fun i => (d i).mean_smooth hρ δ q _) + have hr := (hu.add_section hm).sub_section hH + rw [A.charted_family_atlas_mean_identity d hρ Q w hw hphase hcutoff hform hsupport + u hu hsym hball hδ hτ q, ← smul_sub] + have hh := A.tensorWeightedBound_const_smul hr hb (δ^2) + rw [abs_of_nonneg (sq_nonneg δ)] at hh + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..9995e2eb05bcd81ab9a2d806333abbf91826576d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMean.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMetricMeanDifference +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedQuadraticFamily +import OAI.Geometry.Immersion.ClosedSurface.FreeAmplitude + +namespace OAI + +/-! The combined mean of the actual transported free amplitude, with the +polynomial evaluated in the original coordinates and the metric transformed +as a two-tensor. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +def polynomialMeanField (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) K := + ⟨(fun x k => normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0 x), + contDiff_pi.mpr (fun k => normalizedPolynomialMean_smooth c.openU c.openO (c.smoothP k) + hG c.smoothPhase c.mapsG K c.supportU (c.originalFreeSeed δ q b) δ ε τ 0), + fun x hx => by + ext k + exact image_eq_zero_of_notMem_tsupport (fun hz => hx + ((c.originalFreeSeed δ q b).tsupport_subset + (normalizedPolynomialMean_tsupport (P k) δ ε G c.smoothPhase + (c.originalFreeSeed δ q b).contDiff τ 0 hz)))⟩ + +def combinedMeanField (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) (modeSupport K) := + c.metricMeanField δ q b + pushSupported planeCoordinateIsometry K (c.polynomialMeanField δ q b) + +def leadingFieldInChart (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) c.chartCompact := + ⟨c.leadingInChart b, + contDiff_pi.mpr (fun k => ((b.contDiff.pow 2).mul contDiff_const).mul contDiff_const), + fun x hx => by + ext k + change b x ^ 2 * _ * _ = 0 + have hb : b x = (0 : ℝ) := b.zero_on_compl hx + simp only [hb, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, zero_mul]⟩ + +def leadingField (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) (modeSupport K) := + realTensorChartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.leadingFieldInChart b) + +lemma metric_zero_phase_identity {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) (x : SmallModes.Base) : + phaseZeroTensor τ (coordinatePhase φ) (coordinateAmplitude (c.originalFreeSeed δ q b)) x = + δ ^ 2 • (c.leadingField b x + c.metricMeanField δ q b x) := by + by_cases hx : x ∈ c.e.source + · rw [c.originalFreeSeed_zeroPhase hδ hτ q b hx] + simp only [leadingField, realTensorChartPull_apply, metricMeanField_apply, Set.indicator_of_mem hx] + rfl + · have hn : x ∉ tsupport (coordinateAmplitude (c.originalFreeSeed δ q b)) := + fun hs => hx (c.supportChart (coordinateAmplitude_tsupport (c.originalFreeSeed δ q b) hs)) + have hz := RealModes.phaseZeroTensor_congr (φ := coordinatePhase φ) (ψ := coordinatePhase φ) + Filter.EventuallyEq.rfl (notMem_tsupport_iff_eventuallyEq.mp hn) τ + rw [hz] + change phaseZeroTensor τ (coordinatePhase φ) (fun _ => (0 : SmallModes.Ambient 4)) x = _ + rw [RealModes.phaseZeroTensor_zero] + simp only [leadingField, realTensorChartPull_apply, metricMeanField_apply, + Set.indicator_of_notMem hx, zero_add, smul_zero] + +theorem combined_zero_phase_identity {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) (x : SmallModes.Base) : + phaseZeroTensor τ (coordinatePhase φ) (coordinateAmplitude (c.originalFreeSeed δ q b)) x + + (fun k => quadraticMeanCoefficient (P k) ε G φ (c.originalFreeSeed δ q b) τ 0 + (planeCoordinateIsometry.symm x)) = + δ ^ 2 • (c.leadingField b x + c.combinedMeanField δ q b x) := by + rw [c.metric_zero_phase_identity hδ hτ q b x] + funext k + change δ ^ 2 * (_ + _) + _ = δ ^ 2 * (_ + (_ + + normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0 (planeCoordinateIsometry.symm x))) + unfold normalizedPolynomialMean + field_simp [hδ] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMeanBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMeanBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d74658d242b2bcc75f86a0a7ee5d0f053c5678ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedCombinedMeanBounds.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedCombinedMean + +namespace OAI + +/-! Value and finite-loss difference bounds for the actual combined mean +of a free mode in an arbitrary permitted phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +theorem combined_mean_bounds {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ c.O) + (q m : ℕ) (B F A N : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (hGQ : Set.MapsTo (lowJet G) c.U Q) + (hGb : WeightedBound c.U s (m + tensorOrder P) B (lowJet G)) + (hφb : ∀ v, WeightedBound c.U s (m + tensorOrder P) F + (fun x => fderiv ℝ φ x (coordinateVector v))) + (hn : WeightedBound c.e.target s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap)) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ δ : ℝ, 0 < δ → + ∀ (b d : SupportedField (F := ℝ) c.chartCompact) (z : ℝ), 0 ≤ z → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) b ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) d ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) (b - d) ≤ A * z → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * E) (c.combinedMeanField δ q b) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * (2 * E) * z) + (fun x => c.combinedMeanField δ q b x - c.combinedMeanField δ q d x) := by + have ho (k : Fin 3) : order (P k) ≤ tensorOrder P := + Finset.le_sup (f := fun i => order (P i)) (Finset.mem_univ k) + have hi (k : Fin 3) : m + order (P k) + (q + 1) * (tensorOrder P + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) := by have := ho k; omega + have hm : m + 1 + (q + 1) * (tensorOrder P + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) := by omega + have hex (k : Fin 3) := c.polynomial_mean_bounds hQ hQO k q m B F A N hB hF hA hN + hτ hs hτs hs1 hε hε1 hsmall hGQ (hGb.mono_order (Nat.add_le_add_left (ho k) m)) + (fun v => (hφb v).mono_order (Nat.add_le_add_left (ho k) m)) (hn.mono_order (hi k)) + choose E hE he using hex + let T := tensorChartBudget m (c.J m) (c.J (m + 1)) + let M := normalizedMeanBudget (tensorOrder P) c.C c.D q m N + have hT : 0 ≤ T := tensorChartBudget_nonneg m (zero_le_one.trans (c.oneLEJ m)) + (zero_le_one.trans (c.oneLEJ (m + 1))) + have hM : 0 ≤ M := normalizedMeanBudget_nonneg (tensorOrder P) c.C c.D c.nonnegC q m N + have hsum : 0 ≤ ∑ k, E k := Finset.sum_nonneg (fun k _ => hE k) + refine ⟨T * M * A ^ 2 + ∑ k, E k, by positivity, ?_⟩ + intro δ hδ b d z hz hb hd hbd + let η := τ / s + ε / τ ^ tensorLoss P + have hη : 0 ≤ η := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hp (k : Fin 3) := he k δ hδ b d z hz + ((supportedWeightedSeminorm_mono s (hi k) b).trans hb) + ((supportedWeightedSeminorm_mono s (hi k) d).trans hd) + ((supportedWeightedSeminorm_mono s (hi k) (b - d)).trans hbd) + have hle (k : Fin 3) : E k ≤ ∑ j, E j := + Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ k) + have hpv : WeightedBound Set.univ s m (η * ∑ k, E k) (c.polynomialMeanField δ q b) := + WeightedBound.pi isOpen_univ.uniqueDiffOn hs (mul_nonneg hη hsum) + (contDiffOn_pi.mp (c.polynomialMeanField δ q b).contDiff.contDiffOn) + (fun k => (hp k).1.mono_const (mul_le_mul_of_nonneg_left (hle k) hη)) + have hpd : WeightedBound Set.univ s m (η * (2 * ∑ k, E k) * z) + ((c.polynomialMeanField δ q b) - (c.polynomialMeanField δ q d)) := by + apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + (contDiffOn_pi.mp ((c.polynomialMeanField δ q b).contDiff.sub + (c.polynomialMeanField δ q d).contDiff).contDiffOn) + intro k + exact (hp k).2.mono_const (by gcongr; exact hle k) + have hpvc := weightedBound_comp_isometry planeCoordinateIsometry.symm + (c.polynomialMeanField δ q b).contDiff hpv + have hpdc := weightedBound_comp_isometry planeCoordinateIsometry.symm + ((c.polynomialMeanField δ q b).contDiff.sub (c.polynomialMeanField δ q d).contDiff) hpd + have hmv := c.metricMeanField_bound hδ hτ hs hτs hs1 hε hsmall q m hA hN (hn.mono_order hm) + b ((supportedWeightedSeminorm_mono s hm b).trans hb) + have hmd := c.metricMeanField_difference_bound hδ hτ hs hτs hs1 hε hsmall q m hA hN + (mul_nonneg hA hz) (hn.mono_order hm) b d + ((supportedWeightedSeminorm_mono s hm b).trans hb) + ((supportedWeightedSeminorm_mono s hm d).trans hd) + ((supportedWeightedSeminorm_mono s hm (b - d)).trans hbd) + constructor + · have hh := hmv.add isOpen_univ.uniqueDiffOn s.coe_nonneg + (c.metricMeanField δ q b).contDiff.contDiffOn + ((c.polynomialMeanField δ q b).contDiff.comp planeCoordinateIsometry.symm.contDiff).contDiffOn hpvc + convert hh using 1 <;> first | rfl | (dsimp only [T, M, η]; ring) + · have hh := hmd.add isOpen_univ.uniqueDiffOn s.coe_nonneg + ((c.metricMeanField δ q b).contDiff.sub (c.metricMeanField δ q d).contDiff).contDiffOn + (((c.polynomialMeanField δ q b).contDiff.sub (c.polynomialMeanField δ q d).contDiff).comp + planeCoordinateIsometry.symm.contDiff).contDiffOn hpdc + apply (hh.congr (fun x _ => show + c.combinedMeanField δ q b x - c.combinedMeanField δ q d x = _ by + change (c.metricMeanField δ q b x + c.polynomialMeanField δ q b (planeCoordinateIsometry.symm x)) - + (c.metricMeanField δ q d x + c.polynomialMeanField δ q d (planeCoordinateIsometry.symm x)) = + (c.metricMeanField δ q b x - c.metricMeanField δ q d x) + + (c.polynomialMeanField δ q b (planeCoordinateIsometry.symm x) - + c.polynomialMeanField δ q d (planeCoordinateIsometry.symm x)) + abel)).mono_const + apply le_of_eq + dsimp only [T, M, η] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..5caf3468f4a4b0154ac7f74edfb267503c27f20c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFiniteMean.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamily + +namespace OAI + +/-! Finite substitution for the actual charted mean family. The threshold +here is for the fixed geometric and scale data in the supplied charts. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + +theorem charted_family_majorants (hρ : 0 < ρ) (hτ : 0 < τ) (hs : 0 < (s : ℝ)) + (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q : ℕ) : + ∃ β κ : ℕ → ℝ → ℝ, ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (chartedFamilyMean d hρ δ q)) β κ := by + classical + choose β κ hm using fun i => (d i).majorants hρ hτ hs hτs hs1 hε hε1 hsmall q + refine ⟨(fun m C => 1 + ∑ i, β i m C), (fun m C => 1 + ∑ i, κ i m C), ?_⟩ + intro δ hδ + exact MeanBounds.finset_rescaled isOpen_univ.uniqueDiffOn s.coe_nonneg Finset.univ + (fun i => (d i).mean hρ δ q) (fun _ => tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) β κ (fun _ _ => le_rfl) + (fun i _ => hm i δ hδ) + +theorem finite_charted_mean_adjustment (hρ : 0 < ρ) (hτ : 0 < τ) (hs : 0 < (s : ℝ)) + (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q steps : ℕ) + {H : SmallModes.Base → Tensor} {r₀ : ℝ} (hgap : r₀ < r) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ δ : ℝ, 0 < δ → τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + ∀ j ≤ steps, + ContDiff ℝ ∞ (fixedTrial H (chartedFamilyMean d hρ δ q) j) ∧ + InTrialBall Set.univ reference r (fixedTrial H (chartedFamilyMean d hρ δ q) j) ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound L C β j m) + (fixedTrial H (chartedFamilyMean d hρ δ q) j)) ∧ + (∀ m, WeightedBound Set.univ s m + (differenceBound L C β κ j m * (τ / s + ε / τ ^ tensorLoss P) ^ (j + 1)) + (fixedTrial H (chartedFamilyMean d hρ δ q) j + + chartedFamilyMean d hρ δ q (fixedTrial H (chartedFamilyMean d hρ δ q) j) - H)) := by + obtain ⟨β,κ,hm⟩ := charted_family_majorants d hρ hτ hs hτs hs1 hε hε1 hsmall q + obtain ⟨η₀,hη₀,hη₁,ht⟩ := finite_substitution_uniform (B := β) (K := κ) + isOpen_univ.uniqueDiffOn s.coe_nonneg hgap hC hH.contDiffOn (fun x _ => hH0 x) hbH steps + refine ⟨β,κ,η₀,hη₀,hη₁,?_⟩ + intro δ hδ hsmall' j hj + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨ha,hb,hc,hd⟩ := ht _ (hm δ hδ) _ hη hsmall' j hj + exact ⟨contDiffOn_univ.mp (by simpa only [trial_rescaledMean hη.ne'] using ha), + by simpa only [trial_rescaledMean hη.ne'] using hb, + by simpa only [trial_rescaledMean hη.ne'] using hc, + by simpa only [trial_rescaledMean hη.ne', rescaledMean_self hη.ne'] using hd⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedForcedMode.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedForcedMode.lean new file mode 100644 index 0000000000000000000000000000000000000000..7acacba50d9b93317149d54e09a2c85686493107 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedForcedMode.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartDisplacement +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedForcedSize + +namespace OAI + +/-! The finite perturbed correction algorithm applied to an actual local +phase chart, with real displacement, support, size and residual estimates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +theorem charted_forced_mode + (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) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (hFc : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm)) + (hM : SmallModes.ModeDomain (fun p => RealModes.complexify + (G (planeCoordinateIsometry.symm (e.symm p)))) e.target) + {s : ℝ≥0} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (C D J : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hD : ∀ m, 0 ≤ D m) (hJ : ∀ m, 1 ≤ J m) + (hcoords : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound + (fun p => RealModes.complexify (G (planeCoordinateIsometry.symm (e.symm p)))) + e.target s (m + 1) (C m)) + (hR : ∀ m Z, supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s m + (phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe Z) ≤ + ε / τ ^ tensorLoss P * D m * + supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s (m + tensorOrder P) Z) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q : ℕ) : + let Kc := chartSupport e (modeSupport K) hKe + let fc := tensorChartPush e hi (modeSupport K) hKe f + let κ := fun m => max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ (modeSupport K : Set SmallModes.Base) ∧ + ContDiffOn ℝ ∞ (fun y => pullbackField e.symm y + (coordinateFullLinearized P ε G X (e.symm y) + + QuadraticMean.displacement τ (coordinatePhase φ) f (e.symm y))) e.target ∧ + (∀ m, WeightedBound Set.univ τ m + ((m.factorial : ℝ) * (2 ^ m * (SmallModes.forcedModeBudget 4 (tensorOrder P) C D q m * + supportedWeightedSeminorm Kc s (m + (q + 1) * (tensorOrder P + 1)) fc)) * J m ^ m) X) ∧ + (∀ m, WeightedBound e.target τ m + (2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm Kc s (r + (tensorOrder P + 1)) fc) q m)) + (fun y => pullbackField e.symm y + (coordinateFullLinearized P ε G X (e.symm y) + + QuadraticMean.displacement τ (coordinatePhase φ) f (e.symm y)))) := by + let Kc := chartSupport e (modeSupport K) hKe + let fc := tensorChartPush e hi (modeSupport K) hKe f + let Fc := (G ∘ planeCoordinateIsometry.symm) ∘ e.symm + let Gc := fun p => RealModes.complexify (Fc p) + have hGc : ContDiff ℝ ∞ Gc := (RealModes.complexifyCLM 4).contDiff.comp hFc + let R := phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe + let Z := SmallModes.perturbedMode τ hGc hM Kc (chartSupport_subset e (modeSupport K) hKe) R (-fc) q + let A := (SmallModes.conjugatedDLM τ hGc Kc).restrictScalars ℝ + R + let W := A Z + fc + let X := QuadraticMean.displacement τ (coordinatePhase φ) (chartPull e he (modeSupport K) hKe Z) + have hx := chart_displacement_smooth_support e he (modeSupport K) hKe (coordinatePhase φ) + (hφ.comp planeCoordinateIsometry.symm.contDiff) τ Z + have hid (y : SmallModes.Base) (hy : y ∈ e.target) : + pullbackField e.symm y (coordinateFullLinearized P ε G X (e.symm y) + + QuadraticMean.displacement τ (coordinatePhase φ) f (e.symm y)) = RealModes.realOsc τ W y := by + rw [map_add, phaseChartFullLinearization hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe hphase Z hy, + chart_forcing_realization e hi (modeSupport K) hKe (coordinatePhase φ) hphase τ f hy] + change RealModes.realOsc τ _ y + RealModes.realOsc τ fc y = RealModes.realOsc τ W y + rw [← RealModes.realOsc_add_value] + rfl + dsimp only + refine ⟨X,hx.1,hx.2,?_,?_,?_⟩ + · exact (RealModes.contDiffOn_realOsc W.contDiff.contDiffOn τ).congr hid + · intro m + have hb := SmallModes.perturbedMode_size τ hGc hM Kc (chartSupport_subset e (modeSupport K) hKe) + hτ hs hτs hs1 hε hsmall C D hC hD hc R hR (-fc) q m + simp only [map_neg_eq_map] at hb + exact chart_displacement_bound e he (modeSupport K) hKe (coordinatePhase φ) hphase + hs hτ hτs (hτs.trans (show (s : ℝ) ≤ 1 from hs1)) + (mul_nonneg (SmallModes.forcedModeBudget_nonneg 4 (tensorOrder P) C D hC q m) (apply_nonneg _ _)) + (hJ m) (hcoords m) Z hb + · intro m + let κ := fun r => max (SmallModes.errorConstant r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + let E := (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm Kc s (r + (tensorOrder P + 1)) fc) q m + have hr := SmallModes.perturbedMode_residual_bound τ hGc hM Kc (chartSupport_subset e (modeSupport K) hKe) + hτ hs hτs hs1 hε C D hC hD hc R hR (-fc) q m + have hb : supportedWeightedSeminorm Kc s m W ≤ E := by + dsimp only at hr + simp only [map_neg_eq_map, sub_neg_eq_add, mul_assoc] at hr + rw [FiniteParametrix.boundProfile_const_mul] at hr + simpa only [W,Z,A,E,κ,pow_succ,mul_assoc] using hr + have hE : 0 ≤ E := (apply_nonneg _ _).trans hb + have hw := RealModes.weighted_realOsc isOpen_univ hτ hτs hE W.contDiff.contDiffOn + ((weightedBound_of_supportedSeminorm s m W).mono_const hb) + apply (hw.restrict_open e.open_target).congr + intro y hy + exact hid y hy + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeDisplacement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeDisplacement.lean new file mode 100644 index 0000000000000000000000000000000000000000..017f99b6662cf784a10e45f69870025a8ccadf69 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeDisplacement.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeSeed +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors + +namespace OAI + +/-! The real displacement of the actual charted free amplitude. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + +lemma coordinate_originalFreeSeed (δ : ℝ) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) : + coordinateAmplitude (c.originalFreeSeed δ q b) = + (chartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.freeSeed δ q b) : + SmallModes.Field 4) := by + funext x + change (chartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.freeSeed δ q b)) + (planeCoordinateIsometry (planeCoordinateIsometry.symm x)) = _ + rw [planeCoordinateIsometry.apply_symm_apply] + +def freeDisplacement (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : RField 4 := + QuadraticMean.displacement τ (coordinatePhase φ) (coordinateAmplitude (c.originalFreeSeed δ q b)) + +lemma freeDisplacement_smooth_support (δ : ℝ) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) : + ContDiff ℝ ∞ (c.freeDisplacement δ q b) ∧ + tsupport (c.freeDisplacement δ q b) ⊆ (modeSupport K : Set SmallModes.Base) := by + unfold freeDisplacement + rw [c.coordinate_originalFreeSeed] + exact chart_displacement_smooth_support c.e c.smoothForward (modeSupport K) c.supportChart + (coordinatePhase φ) (c.smoothPhase.comp planeCoordinateIsometry.symm.contDiff) τ (c.freeSeed δ q b) + +def freeSizeFactor (q m : ℕ) (N : ℝ) : ℝ := + (m.factorial : ℝ) * 2 ^ m * correctedSeedBudget (tensorOrder P) c.C c.D q m N * c.J m ^ m + +theorem freeDisplacement_bound {δ A N : ℝ} (hδ : 0 ≤ δ) (hτ : 0 < τ) + (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q m : ℕ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hn : WeightedBound c.e.target s (inputOrder (P := P) q m) N (freeNormal c.realMap)) + (b : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (inputOrder (P := P) q m) b ≤ A) : + WeightedBound Set.univ τ m (c.freeSizeFactor q m N * A * (δ * τ)) (c.freeDisplacement δ q b) := by + have hz := correctedNormalSeed_bound δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) hδ hτ hs hτs hs1 hε hsmall + c.C c.D c.nonnegC c.nonnegD c.coefficients c.operator c.polynomial q m A N hA hN hn b hb + have hbudget := correctedSeedBudget_nonneg (tensorOrder P) c.C c.D c.nonnegC q m hN + have hh := chart_displacement_bound c.e c.smoothForward (modeSupport K) c.supportChart + (coordinatePhase φ) c.phase hs hτ hτs (hτs.trans (show (s : ℝ) ≤ 1 from hs1)) + (show 0 ≤ correctedSeedBudget (tensorOrder P) c.C c.D q m N * A * (δ * τ) by positivity) + (c.oneLEJ m) (c.coordinates m) (c.freeSeed δ q b) hz + unfold freeDisplacement + rw [c.coordinate_originalFreeSeed] + convert hh using 1 + unfold freeSizeFactor + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..3aaffffb9f1186493a5413ebeb5da4be50ac6701 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeFamily.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFree +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamily +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedCalculus + +namespace OAI + +/-! The actual finite free oscillation and its original-coordinate linear +residual. The constants precede the immersion and scales. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +def chartedFreeSum (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : RField 4 := + QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude ((d i).freeAmplitude hρ δ q A)) + +lemma chartedFreeSum_eq (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + chartedFreeSum d hρ δ q A = fun x => ∑ i, (d i).displacement hρ δ q A x := rfl + +lemma chartedFreeSum_smooth_support (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + ContDiff ℝ ∞ (chartedFreeSum d hρ δ q A) ∧ + tsupport (chartedFreeSum d hρ δ q A) ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) := by + rw [chartedFreeSum_eq] + refine ⟨ContDiff.sum (fun i _ => ((d i).displacement_smooth_support hρ δ q A).1),?_⟩ + apply closure_minimal _ (isClosed_iUnion_of_finite fun i => (modeSupport (K i)).isCompact.isClosed) + intro x hx + by_contra hn + apply hx + apply Finset.sum_eq_zero + intro i _ + exact image_eq_zero_of_notMem_tsupport (fun hz => hn (Set.mem_iUnion.mpr + ⟨i,((d i).displacement_smooth_support hρ δ q A).2 hz⟩)) + +theorem uniform_charted_free_family (p : ι → ChartedMeanProfile P) + (hρ : 0 < ρ) (q m : ℕ) (C : ℝ) : + ∃ B E : ℝ, 1 ≤ B ∧ 1 ≤ E ∧ ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : ι → Base → ℝ} {K : ι → Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 ≤ δ → + ∀ A : SmallModes.Base → Tensor, 0 ≤ C → ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + WeightedBound Set.univ s (PolynomialSolveData.inputOrder (P := P) q m) C A → + WeightedBound Set.univ τ m (B * (δ * τ)) (chartedFreeSum d hρ δ q A) ∧ + WeightedBound Set.univ τ m (E * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1)) + (coordinateFullLinearized P ε G (chartedFreeSum d hρ δ q A)) := by + classical + choose B E hB hE he using fun i => uniform_charted_free_bounds (R := R) (p i) hρ q m C + refine ⟨1 + ∑ i, B i,1 + ∑ i, E i,?_,?_,?_⟩ + · exact le_add_of_nonneg_right (Finset.sum_nonneg fun i _ => zero_le_one.trans (hB i)) + · exact le_add_of_nonneg_right (Finset.sum_nonneg fun i _ => zero_le_one.trans (hE i)) + intro G hG φ K ε τ s c d hd hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + have hm (i : ι) := he i (d i) (hd i) hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + rw [chartedFreeSum_eq] + constructor + · have hh := WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ + (fun i => B i * (δ * τ)) (fun i => (d i).displacement hρ δ q A) + (fun i _ => ((d i).displacement_smooth_support hρ δ q A).1.contDiffOn) + (fun i _ => (hm i).1) + apply hh.mono_const + rw [← Finset.sum_mul] + exact mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_one) (mul_nonneg hδ hτ.le) + · rw [coordinateFullLinearized_sum P ε G Finset.univ _ + (fun i => ((d i).displacement_smooth_support hρ δ q A).1)] + have hh := WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ + (fun i => E i * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1)) + (fun i => coordinateFullLinearized P ε G ((d i).displacement hρ δ q A)) + (fun i _ => (coordinateFullLinearized_smooth (c i).openO (c i).openU P (c i).smoothP hG + (c i).mapsG (K i) (c i).supportU ((d i).displacement_smooth_support hρ δ q A).1 + ((d i).displacement_smooth_support hρ δ q A).2 ε).contDiffOn) + (fun i _ => (hm i).2) + apply hh.mono_const + rw [← Finset.sum_mul, ← Finset.sum_mul] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_one) (mul_nonneg hδ hτ.le)) + (pow_nonneg (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) _) + +theorem uniform_charted_free_family_all_inputs (p : ι → ChartedMeanProfile P) + (hρ : 0 < ρ) (q m : ℕ) (C : ℝ) : + ∃ B E : ℝ, 1 ≤ B ∧ 1 ≤ E ∧ ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : ι → Base → ℝ} {K : ι → Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 ≤ δ → + ∀ A : SmallModes.Base → Tensor, 0 ≤ C → ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + WeightedBound Set.univ s (PolynomialSolveData.inputOrder (P := P) q m) C A → + WeightedBound Set.univ τ m (B * (δ * τ)) (chartedFreeSum d hρ δ q A) ∧ + WeightedBound Set.univ τ m (E * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1)) + (coordinateFullLinearized P ε G (chartedFreeSum d hρ δ q A)) := by + classical + choose B E hB hE he using fun i => uniform_charted_free_bounds (R := R) (p i) hρ q m C + refine ⟨1 + ∑ i, B i,1 + ∑ i, E i,?_,?_,?_⟩ + · exact le_add_of_nonneg_right (Finset.sum_nonneg fun i _ => zero_le_one.trans (hB i)) + · exact le_add_of_nonneg_right (Finset.sum_nonneg fun i _ => zero_le_one.trans (hE i)) + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + have hm (i : ι) := he i (d i) (hd i) hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + rw [chartedFreeSum_eq] + constructor + · have hh := WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ + (fun i => B i * (δ * τ)) (fun i => (d i).displacement hρ δ q A) + (fun i _ => ((d i).displacement_smooth_support hρ δ q A).1.contDiffOn) + (fun i _ => (hm i).1) + apply hh.mono_const + rw [← Finset.sum_mul] + exact mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_one) (mul_nonneg hδ hτ.le) + · rw [coordinateFullLinearized_sum P ε G Finset.univ _ + (fun i => ((d i).displacement_smooth_support hρ δ q A).1)] + have hh := WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ + (fun i => E i * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1)) + (fun i => coordinateFullLinearized P ε G ((d i).displacement hρ δ q A)) + (fun i _ => (coordinateFullLinearized_smooth (c i).openO (c i).openU P (c i).smoothP hG + (c i).mapsG (K i) (c i).supportU ((d i).displacement_smooth_support hρ δ q A).1 + ((d i).displacement_smooth_support hρ δ q A).2 ε).contDiffOn) + (fun i _ => (hm i).2) + apply hh.mono_const + rw [← Finset.sum_mul, ← Finset.sum_mul] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left zero_le_one) (mul_nonneg hδ hτ.le)) + (pow_nonneg (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) _) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeMetricSplit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeMetricSplit.lean new file mode 100644 index 0000000000000000000000000000000000000000..51504f4af0117b0f2ed857593dbf3498ceda1093 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeMetricSplit.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeFamily +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData +import OAI.Geometry.SurfaceImmersion.Correction.FreeForcedIncrementIdentity + +namespace OAI + +/-! Exact mean/oscillation split of the metric of the actual free family +when the polynomial perturbation parameter is zero. -/ +noncomputable section +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes +namespace ChartedMeanFamilyData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} {s : ℝ≥0} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +def quadraticOscillation (d : ChartedMeanFamilyData P ε τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : SmallModes.Base → Tensor := + combinedNonzeroQuadratic P ε d.G d.phase + (fun j => (d.data j).freeAmplitude hρ δ q f) τ + +lemma free_metric_split (d : ChartedMeanFamilyData P 0 τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : + realMetricTensor (chartedFreeSum d.data hρ δ q f) = + d.quadraticMean hρ δ q f + d.quadraticOscillation hρ δ q f := by + have he := combined_quadratic_expansion P 0 d.G d.phase + (fun j => (d.data j).freeAmplitude hρ δ q f) + (fun j => (d.solver j).smoothPhase) + (fun j => ((d.data j).freeAmplitude hρ δ q f).contDiff) τ 0 + dsimp only at he + have hz : coordinateQuadraticPolynomial P 0 d.G + (chartedFreeSum d.data hρ δ q f) 0 = 0 := by + ext x k + simp [coordinateQuadraticPolynomial] + change realMetricTensor (chartedFreeSum d.data hρ δ q f) + + coordinateQuadraticPolynomial P 0 d.G (chartedFreeSum d.data hρ δ q f) 0 = _ at he + rw [hz,add_zero] at he + exact he + +end ChartedMeanFamilyData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..dcec088b41e9ccb35db2be53bec2a77ec10d3582 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeResidual.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeDisplacement + +namespace OAI + +/-! The actual free displacement solves the full metric/polynomial +linearization to arbitrary finite order, in the original coordinates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + +def freeResidual (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := ComplexTensor) c.chartCompact := + ((SmallModes.conjugatedDLM τ (contDiff_complexify c.smoothMap) c.chartCompact).restrictScalars ℝ + + c.operator) (c.freeSeed δ q b) + +def freeInitialFactor (m : ℕ) : ℝ := max (SmallModes.fullErrorConstant 4 m (c.C m)) + (c.D m * SmallModes.initialConstant 4 (m + tensorOrder P) (c.C (m + tensorOrder P))) + +def freeChartResidualFactor (q m : ℕ) (N : ℝ) : ℝ := + FiniteParametrix.boundProfile (tensorOrder P + 1) c.κ c.freeInitialFactor q m * + (Real.sqrt 2 * 2 ^ (inputOrder (P := P) q m) * N) + +def freeResidualFactor (q m : ℕ) (N : ℝ) : ℝ := + tensorChartBudget m (c.J m) (c.J (m + 1)) * 2 ^ m * c.freeChartResidualFactor q m N + +theorem freeResidual_bound {δ A N : ℝ} (hδ : 0 ≤ δ) (hτ : 0 < τ) + (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (q m : ℕ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hn : WeightedBound c.e.target s (inputOrder (P := P) q m) N (freeNormal c.realMap)) + (b : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (inputOrder (P := P) q m) b ≤ A) : + supportedWeightedSeminorm c.chartCompact s m (c.freeResidual δ q b) ≤ + (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * c.freeChartResidualFactor q m N * A * (δ * τ) := by + let V := supportedFreeSeed δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) b + have hv := supportedFreeSeed_isFree δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) b + have hr := SmallModes.perturbedFreeMode_residual_bound τ (contDiff_complexify c.smoothMap) + (c.realDomain.complexDomain c.smoothMap) c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) hτ hs hτs hs1 hε + c.C c.D c.nonnegC c.nonnegD c.coefficients c.operator c.polynomial V + hv.perpX hv.perpY hv.perpSecond q m + rw [← SmallModes.perturbedFreeLM_apply] at hr + change supportedWeightedSeminorm c.chartCompact s m (c.freeResidual δ q b) ≤ + (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) c.κ + (fun r => c.freeInitialFactor r * supportedWeightedSeminorm c.chartCompact s + (r + (tensorOrder P + 1)) V) q m at hr + rw [FiniteParametrix.boundProfile_terminal (tensorOrder P + 1) c.κ c.freeInitialFactor + (fun r => supportedWeightedSeminorm c.chartCompact s r V) q m] at hr + have hseed := supportedFreeSeed_bound c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) b hδ hτ.le hs hA hN + (inputOrder (P := P) q m) hb hn + have hγ (j : ℕ) : 0 ≤ c.freeInitialFactor j := + (SmallModes.fullErrorConstant_nonneg 4 j (c.nonnegC j)).trans (le_max_left _ _) + have hp := FiniteParametrix.boundProfile_nonneg (L := tensorOrder P + 1) c.κ_nonneg hγ q m + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + apply hr.trans + calc + _ ≤ (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + (FiniteParametrix.boundProfile (tensorOrder P + 1) c.κ c.freeInitialFactor q m * + ((Real.sqrt 2 * 2 ^ (inputOrder (P := P) q m) * A * N) * (δ * τ))) := + mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hseed hp) (pow_nonneg hη _) + _ = _ := by unfold freeChartResidualFactor; ring + +lemma freeResidual_identity (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) + {y : SmallModes.Base} (hy : y ∈ c.e.target) : + pullbackField c.e.symm y (coordinateFullLinearized P ε G (c.freeDisplacement δ q b) (c.e.symm y)) = + realOsc τ (c.freeResidual δ q b) y := by + unfold freeDisplacement + rw [c.coordinate_originalFreeSeed, + phaseChartFullLinearization c.openO c.openU P c.smoothP hG c.mapsG K c.supportU + c.smoothPhase τ ε c.e c.smoothForward c.smoothInverse c.supportChart c.phase (c.freeSeed δ q b) hy] + rfl + +theorem freeDisplacement_residual_bound {δ A N : ℝ} (hδ : 0 ≤ δ) (hτ : 0 < τ) + (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (q m : ℕ) (hA : 0 ≤ A) (hN : 0 ≤ N) + (hn : WeightedBound c.e.target s (inputOrder (P := P) q m) N (freeNormal c.realMap)) + (b : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (inputOrder (P := P) q m) b ≤ A) : + WeightedBound Set.univ τ m + ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * c.freeResidualFactor q m N * A * (δ * τ)) + (coordinateFullLinearized P ε G (c.freeDisplacement δ q b)) := by + let E := (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * c.freeChartResidualFactor q m N * A * (δ * τ) + have hb' := c.freeResidual_bound hδ hτ hs hτs hs1 hε q m hA hN hn b hb + have hE : 0 ≤ E := (apply_nonneg _ _).trans hb' + have hw := RealModes.weighted_realOsc isOpen_univ hτ hτs hE (c.freeResidual δ q b).contDiff.contDiffOn + ((weightedBound_of_supportedSeminorm s m (c.freeResidual δ q b)).mono_const hb') + have hr : WeightedBound c.e.target τ m (2 ^ m * E) + (fun y => pullbackField c.e.symm y + (coordinateFullLinearized P ε G (c.freeDisplacement δ q b) (c.e.symm y))) := + (hw.restrict_open c.e.open_target).congr (fun y hy => c.freeResidual_identity δ q b hy) + have hsm : ContDiffOn ℝ ∞ (fun y => pullbackField c.e.symm y + (coordinateFullLinearized P ε G (c.freeDisplacement δ q b) (c.e.symm y))) c.e.target := + (RealModes.contDiffOn_realOsc (c.freeResidual δ q b).contDiff.contDiffOn τ).congr + (fun y hy => c.freeResidual_identity δ q b hy) + have hsupport := ((coordinateFullLinearized_tsupport P ε G (c.freeDisplacement δ q b)).trans + (c.freeDisplacement_smooth_support δ q b).2).trans c.supportChart + have hτ1 : τ ≤ 1 := hτs.trans (show (s : ℝ) ≤ 1 from hs1) + have hfield := RealModes.weighted_coordDeriv_of_jets c.e.open_source c.smoothForward hτ.le hτ1 + (zero_le_one.trans (c.oneLEJ (m + 1))) (c.coordinates (m + 1)) + have hh := weighted_residual_from_chart c.e c.smoothForward c.smoothInverse hsupport hτ hτ1 + (show 0 ≤ 2 ^ m * E by positivity) (c.oneLEJ m) + (zero_le_one.trans (c.oneLEJ (m + 1))) (c.coordinates m) hfield hsm hr + convert hh using 1 + unfold freeResidualFactor E + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..f936919ee1908513a9c757ff59ad958d57fb4986 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedFreeSeed.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveData +import OAI.Geometry.SurfaceImmersion.Atlas.CorrectedSeedCoordinates + +namespace OAI + +/-! The free geometric amplitude in the original coordinates. The same +actual polynomial operator is conjugated into the phase chart, and the +resulting amplitude is transported back with controlled derivative loss. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes + +lemma RealModeDomain.of_complex {F : RField 4} {U : Set Base} + (hF : ContDiff ℝ ∞ F) (h : ModeDomain (fun p => complexify (F p)) U) : + RealModeDomain F U := by + refine ⟨h.isOpen, ?_, ?_⟩ + · intro p hp hz + have hd := h.determinant p hp + rw [coordDeriv_complexify (hF.differentiable (by simp) p), + coordDeriv_complexify (hF.differentiable (by simp) p), complexify_gram, hz, + Complex.ofReal_zero] at hd + exact hd rfl + · intro p hp hz + have hg := h.good p hp + rw [← complexify_realSecond hF, hz] at hg + simp only [complexify, map_zero, dotProduct, Pi.zero_apply, zero_mul, Finset.sum_const_zero] at hg + exact hg rfl + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open WeightedEstimates RealModes +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +abbrev chartCompact : Compacts SmallModes.Base := chartSupport c.e (modeSupport K) c.supportChart + +abbrev realMap : RealModes.RField 4 := (G ∘ planeCoordinateIsometry.symm) ∘ c.e.symm + +theorem realDomain : RealModeDomain c.realMap c.e.target := RealModeDomain.of_complex c.smoothMap c.domain + +def operator : SupportedField (F := SmallModes.Ambient 4) c.chartCompact →ₗ[ℝ] + SupportedField (F := PhaseMean.ComplexTensor) c.chartCompact := + phaseChartPolynomialOperator c.openO c.openU P c.smoothP hG c.mapsG K c.supportU c.smoothPhase + τ ε c.e c.smoothForward c.smoothInverse c.supportChart + +def freeSeed (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := SmallModes.Ambient 4) c.chartCompact := + correctedNormalSeed δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) c.operator q b + +def originalFreeSeed (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Fin 4 → ℂ) K := + (supportedCoordinateEquiv planeCoordinateIsometry K).symm + ((chartEquiv c.e c.smoothForward c.smoothInverse (modeSupport K) c.supportChart).symm + (c.freeSeed δ q b)) + +lemma originalFreeSeed_sub (δ : ℝ) (q : ℕ) + (b d : SupportedField (F := ℝ) c.chartCompact) : + c.originalFreeSeed δ q (b - d) = c.originalFreeSeed δ q b - c.originalFreeSeed δ q d := by + simp only [originalFreeSeed, freeSeed, correctedNormalSeed_sub, map_sub] + +theorem originalFreeSeed_bound {δ : ℝ} (hδ : 0 ≤ δ) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q m : ℕ) {A N : ℝ} + (hA : 0 ≤ A) (hN : 0 ≤ N) + (hn : WeightedBound c.e.target s (m + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap)) + (b : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (m + (q + 1) * (tensorOrder P + 1)) b ≤ A) : + supportedWeightedSeminorm K s m (c.originalFreeSeed δ q b) ≤ + ((m.factorial : ℝ) * c.J m ^ m * correctedSeedBudget (tensorOrder P) c.C c.D q m N) * A * (δ * τ) := by + have hz := correctedNormalSeed_bound δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) hδ hτ hs hτs hs1 hε hsmall + c.C c.D c.nonnegC c.nonnegD c.coefficients c.operator c.polynomial q m A N hA hN hn b hb + unfold originalFreeSeed + rw [inverse_supportedCoordinateEquiv_norm _ _ hs] + have hp := chartPull_bound c.e c.smoothForward (modeSupport K) c.supportChart hs hs1 + (c.oneLEJ m) (c.coordinates m) (c.freeSeed δ q b) + apply hp.trans + calc + _ ≤ (m.factorial : ℝ) * + (correctedSeedBudget (tensorOrder P) c.C c.D q m N * A * (δ * τ)) * c.J m ^ m := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hz (Nat.cast_nonneg _)) + (pow_nonneg (zero_le_one.trans (c.oneLEJ m)) _) + _ = _ := by ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..e32c942f6cb4a3a11e17b2ae824456942657e5b5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanData.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedTrialMajorants + +namespace OAI + +/-! Fixed geometric and jet bounds for the actual mean map of one phase. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +structure ChartedMeanData {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + (r ρ R : ℝ) (reference : SmallModes.Base → Tensor) where + cutoff : SupportedField (F := ℝ) c.chartCompact + form : SmallModes.Base → Tensor →L[ℝ] ℝ + localBounds : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap cutoff form c.e c.e.symm + budgets : Budgets c.e.source c.e.target s c.realMap cutoff form c.e c.e.symm + compactJets : Set LowJet + compact : IsCompact compactJets + subsetDomain : compactJets ⊆ c.O + mapsJets : Set.MapsTo (lowJet G) c.U compactJets + B : ℕ → ℝ + F : ℕ → ℝ + oneLEB : ∀ m, 1 ≤ B m + nonnegF : ∀ m, 0 ≤ F m + jetsBound : ∀ m, WeightedBound c.U s (m + tensorOrder P) (B m) (lowJet G) + phaseBound : ∀ m v, WeightedBound c.U s (m + tensorOrder P) (F m) + (fun x => fderiv ℝ φ x (coordinateVector v)) + +namespace ChartedMeanData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference) + +def amplitude (hρ : 0 < ρ) (A : SmallModes.Base → Tensor) : SupportedField (F := ℝ) c.chartCompact := + c.trialAmplitude d.cutoff d.form d.localBounds hρ A + +def mean (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : SmallModes.Base → Tensor := + c.combinedMeanField δ q (d.amplitude hρ A) + +def leading (hρ : 0 < ρ) (A : SmallModes.Base → Tensor) : SmallModes.Base → Tensor := + c.leadingField (d.amplitude hρ A) + +def freeAmplitude (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + SupportedField (F := Fin 4 → ℂ) K := c.originalFreeSeed δ q (d.amplitude hρ A) + +theorem majorants (hρ : 0 < ρ) (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q : ℕ) : + ∃ β κ : ℕ → ℝ → ℝ, ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (d.mean hρ δ q)) β κ := + c.trialMean_majorants d.cutoff d.form d.localBounds d.budgets hρ d.compact d.subsetDomain + q d.B d.F d.oneLEB d.nonnegF hτ hs hτs hs1 hε hε1 hsmall d.mapsJets d.jetsBound d.phaseBound + +lemma zero_phase_identity (hρ : 0 < ρ) {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (A : SmallModes.Base → Tensor) (x : SmallModes.Base) : + phaseZeroTensor τ (coordinatePhase φ) (coordinateAmplitude (d.freeAmplitude hρ δ q A)) x + + (fun k => quadraticMeanCoefficient (P k) ε G φ (d.freeAmplitude hρ δ q A) τ 0 + (planeCoordinateIsometry.symm x)) = + δ ^ 2 • (d.leading hρ A x + d.mean hρ δ q A x) := + c.combined_zero_phase_identity hδ hτ q (d.amplitude hρ A) x + +end ChartedMeanData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..0fd34f817ec02a7fc0dca15b92cd5fc7d9bb8ea9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamily.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMeanFamily + +namespace OAI + +/-! Assemble the actual charted free amplitudes and their zero-phase tensors. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + +def chartedFamilyMean (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + SmallModes.Base → Tensor := fun x => ∑ i, (d i).mean hρ δ q A x + +def chartedFamilyLeading (hρ : 0 < ρ) (A : SmallModes.Base → Tensor) : + SmallModes.Base → Tensor := fun x => ∑ i, (d i).leading hρ A x + +theorem charted_family_zero_phase_identity (hρ : 0 < ρ) {δ : ℝ} + (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) (A : SmallModes.Base → Tensor) : + combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 = + δ ^ 2 • (chartedFamilyLeading d hρ A + chartedFamilyMean d hρ δ q A) := by + funext x k + simp only [combinedQuadraticMean, zeroPhaseSum, coordinateQuadraticMean, Pi.add_apply, + Finset.sum_apply] + change (∑ i, phaseZeroTensor τ (coordinatePhase (φ i)) + (coordinateAmplitude ((d i).freeAmplitude hρ δ q A)) x k) + + (∑ i, quadraticMeanCoefficient (P k) ε G (φ i) ((d i).freeAmplitude hρ δ q A) τ 0 + (planeCoordinateIsometry.symm x)) = _ + rw [← Finset.sum_add_distrib] + simp_rw [show ∀ i, phaseZeroTensor τ (coordinatePhase (φ i)) + (coordinateAmplitude ((d i).freeAmplitude hρ δ q A)) x k + + quadraticMeanCoefficient (P k) ε G (φ i) ((d i).freeAmplitude hρ δ q A) τ 0 + (planeCoordinateIsometry.symm x) = + δ ^ 2 * ((d i).leading hρ A x k + (d i).mean hρ δ q A x k) from + fun i => congrFun ((d i).zero_phase_identity hρ hδ hτ q A x) k] + simp only [Finset.mul_sum, Finset.sum_add_distrib, Pi.smul_apply, smul_eq_mul, + Pi.add_apply, chartedFamilyLeading, chartedFamilyMean, Finset.sum_apply, mul_add] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamilyData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamilyData.lean new file mode 100644 index 0000000000000000000000000000000000000000..847fadd25cd3d9f97534d454a3093b7cdc472553 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanFamilyData.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFiniteMean + +namespace OAI + +/-! A finite charted phase family with its actual solvers and amplitudes, +packaged for assembling different coordinate patches on one surface. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +structure ChartedMeanFamilyData {n : ℕ} (P : Fin 3 → Fin n → Expression) + (ε τ : ℝ) (s : ℝ≥0) (r ρ R : ℝ) (reference : SmallModes.Base → Tensor) where + G : Base → Space + smoothG : ContDiff ℝ ∞ G + phase : Fin 3 → Base → ℝ + support : Fin 3 → Compacts Base + solver : ∀ j, PolynomialSolveData P ε G smoothG (phase j) (support j) τ s + data : ∀ j, ChartedMeanData (solver j) r ρ R reference + +namespace ChartedMeanFamilyData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} {s : ℝ≥0} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +def mean (d : ChartedMeanFamilyData P ε τ s r ρ R reference) (hρ : 0 < ρ) + (δ : ℝ) (q : ℕ) : (SmallModes.Base → Tensor) → SmallModes.Base → Tensor := + chartedFamilyMean d.data hρ δ q + +def Fits (d : ChartedMeanFamilyData P ε τ s r ρ R reference) + (p : Fin 3 → ChartedMeanProfile P) : Prop := ∀ j, (p j).Fits (d.data j) + +lemma mean_smooth (d : ChartedMeanFamilyData P ε τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : + ContDiff ℝ ∞ (d.mean hρ δ q f) := chartedFamilyMean_smooth d.data hρ δ q f + +/-- The actual zero-phase tensor of the finite free family in original coordinates. -/ +def quadraticMean (d : ChartedMeanFamilyData P ε τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : SmallModes.Base → Tensor := + combinedQuadraticMean P ε d.G d.phase + (fun j => (d.data j).freeAmplitude hρ δ q f) τ 0 + +end ChartedMeanFamilyData + +theorem uniform_chartedFamilyData_majorants {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : Fin 3 → ChartedMeanProfile P) {ρ R : ℝ} (hρ : 0 < ρ) (q : ℕ) : + ∃ β κ : ℕ → ℝ → ℝ, ∀ {ε τ : ℝ} {s : ℝ≥0} {r : ℝ} + {reference : SmallModes.Base → Tensor} (d : ChartedMeanFamilyData P ε τ s r ρ R reference), + d.Fits p → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r + (tensorOrder P + 1 + (q+1)*(tensorOrder P+1)) + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (d.mean hρ δ q)) β κ := by + obtain ⟨β,κ,h⟩ := uniform_charted_family_majorants (R := R) p hρ q + refine ⟨β,κ,?_⟩ + intro ε τ s r reference d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + exact h d.data hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..6900c421c1ffc47226c6a1cb7cb247fa62e27e07 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMeanProfile.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData + +namespace OAI + +/-! Numerical and compact geometric data kept fixed while scales and maps +vary in the small-increment construction. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +structure ChartedMeanProfile {n : ℕ} (P : Fin 3 → Fin n → Expression) where + U : Set Base + O : Set LowJet + Q : Set LowJet + V : Set SmallModes.Base + openU : IsOpen U + openO : IsOpen O + openV : IsOpen V + compact : IsCompact Q + subsetDomain : Q ⊆ O + smoothP : ∀ k l, (P k l).SmoothCoeffs O + C : ℕ → ℝ + D : ℕ → ℝ + J : ℕ → ℝ + inv : ℕ → ℝ + forms : ℕ → ℝ + psi : ℕ → ℝ + normal : ℕ → ℝ + B : ℕ → ℝ + F : ℕ → ℝ + nonnegC : ∀ m, 0 ≤ C m + oneLEJ : ∀ m, 1 ≤ J m + oneLEInv : ∀ m, 1 ≤ inv m + oneLEForms : ∀ m, 1 ≤ forms m + oneLEPsi : ∀ m, 1 ≤ psi m + oneLENormal : ∀ m, 1 ≤ normal m + oneLEB : ∀ m, 1 ≤ B m + nonnegF : ∀ m, 0 ≤ F m + +namespace ChartedMeanProfile +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : ChartedMeanProfile P) {ε τ : ℝ} {s : ℝ≥0} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} {K : Compacts Base} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +structure Fits (d : ChartedMeanData c r ρ R reference) : Prop where + domain : c.U = p.U + coefficients : c.C = p.C + perturbation : c.D = p.D + coordinates : c.J = p.J + target : c.e.target = p.V + inverse : d.budgets.inv = p.inv + forms : d.budgets.forms = p.forms + cutoff : d.budgets.psi = p.psi + normal : d.budgets.normal = p.normal + jets : d.B = p.B + phase : d.F = p.F + range : d.compactJets = p.Q + +end ChartedMeanProfile +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..877f0606315c64ca21257b9c63427f0c57138f90 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMean.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedZeroMean +import OAI.Geometry.SurfaceImmersion.Atlas.RealTensorChart +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanGeometry + +namespace OAI + +/-! Global supported metric mean fields for the actual charted free seed. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes JetPolynomial +lemma normalizedPerturbedMean_smooth_general {F : RField 4} {U : Set SmallModes.Base} + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) (K : Compacts SmallModes.Base) + (hKU : (K : Set SmallModes.Base) ⊆ U) + (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K) + (δ τ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) K) (v w : SmallModes.Base) : + ContDiff ℝ ∞ (normalizedPerturbedMean δ τ hF h K hKU R q b v w) := + (seedMeanError_smooth τ (perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q) + (supportedFreeSeed δ τ hF h K hKU b) (supportedFreeSeed δ τ hF h K hKU b) v w).const_smul (δ⁻¹ ^ 2) +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +def metricMeanFieldInChart (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) c.chartCompact := + ⟨c.metricMeanInChart δ q b, + contDiff_pi.mpr (fun k => normalizedPerturbedMean_smooth_general c.smoothMap c.realDomain + c.chartCompact (chartSupport_subset c.e (modeSupport K) c.supportChart) c.operator δ τ q b + (firstDirection k) (secondDirection k)), + fun y hy => by + ext k + change δ⁻¹ ^ 2 * SmallModes.seedMeanError τ _ _ _ (firstDirection k) (secondDirection k) y = 0 + rw [SmallModes.seedMeanError_zero_outside τ c.chartCompact _ _ _ _ _ _ hy, mul_zero]⟩ + +def metricMeanField (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SupportedField (F := Tensor) (modeSupport K) := + realTensorChartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.metricMeanFieldInChart δ q b) + +lemma metricMeanField_apply (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) + (x : SmallModes.Base) : + c.metricMeanField δ q b x = c.e.source.indicator + (fun x => pullbackField c.e x (c.metricMeanInChart δ q b (c.e x))) x := rfl + +theorem metricMeanField_bound {δ : ℝ} (hδ : 0 < δ) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q m : ℕ) {A N : ℝ} + (hA : 0 ≤ A) (hN : 0 ≤ N) + (hn : WeightedBound c.e.target s (m + 1 + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap)) + (b : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (m + 1 + (q + 1) * (tensorOrder P + 1)) b ≤ A) : + WeightedBound Set.univ s m + (tensorChartBudget m (c.J m) (c.J (m + 1)) * + ((τ / s + ε / τ ^ tensorLoss P) * (normalizedMeanBudget (tensorOrder P) c.C c.D q m N * A ^ 2))) + (c.metricMeanField δ q b) := by + let C := (τ / s + ε / τ ^ tensorLoss P) * (normalizedMeanBudget (tensorOrder P) c.C c.D q m N * A ^ 2) + have hC : 0 ≤ C := mul_nonneg + (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) + (mul_nonneg (normalizedMeanBudget_nonneg (tensorOrder P) c.C c.D c.nonnegC q m N) (sq_nonneg A)) + have hv := normalizedMeanBudget_bound δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) hδ hτ hs hτs hs1 hε hsmall + c.C c.D c.nonnegC c.nonnegD c.coefficients c.operator c.polynomial q m A N hA hN hn b hb + have hfield : WeightedBound Set.univ s m C (c.metricMeanFieldInChart δ q b) := + WeightedBound.pi isOpen_univ.uniqueDiffOn hs hC + (contDiffOn_pi.mp (c.metricMeanFieldInChart δ q b).contDiff.contDiffOn) + (fun k => hv (firstDirection k) (secondDirection k) (firstDirection_norm k) (secondDirection_norm k)) + have hf := supportedSeminorm_le_of_weightedBound hs hC (c.metricMeanFieldInChart δ q b) hfield + have hD := zero_le_one.trans (c.oneLEJ (m + 1)) + have hcoords := RealModes.weighted_coordDeriv_of_jets c.e.open_source c.smoothForward s.coe_nonneg hs1 + hD (c.coordinates (m + 1)) + have ht := realTensorChartPull_bound c.e c.smoothForward (modeSupport K) c.supportChart + hs hs1 (c.oneLEJ m) hD (c.coordinates m) hcoords (c.metricMeanFieldInChart δ q b) + have hT := tensorChartBudget_nonneg m (zero_le_one.trans (c.oneLEJ m)) hD + have hbound : supportedWeightedSeminorm (modeSupport K) s m (c.metricMeanField δ q b) ≤ + tensorChartBudget m (c.J m) (c.J (m + 1)) * C := + ht.trans (mul_le_mul_of_nonneg_left hf hT) + exact (weightedBound_of_supportedSeminorm s m (c.metricMeanField δ q b)).mono_const hbound + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMeanDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMeanDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4c31d580e2f17ef10b7b19b9e292a61443af175 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedMetricMeanDifference.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMetricMean + +namespace OAI + +/-! The metric mean difference is linear in the change of the trial +amplitude norm, and retains the same small parameter after chart transport. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +theorem metricMeanField_difference_bound {δ : ℝ} (hδ : 0 < δ) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hε : 0 ≤ ε) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) (q m : ℕ) {A N d : ℝ} + (hA : 0 ≤ A) (hN : 0 ≤ N) (hd : 0 ≤ d) + (hn : WeightedBound c.e.target s (m + 1 + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap)) + (b b' : SupportedField (F := ℝ) c.chartCompact) + (hb : supportedWeightedSeminorm c.chartCompact s (m + 1 + (q + 1) * (tensorOrder P + 1)) b ≤ A) + (hb' : supportedWeightedSeminorm c.chartCompact s (m + 1 + (q + 1) * (tensorOrder P + 1)) b' ≤ A) + (hbb' : supportedWeightedSeminorm c.chartCompact s (m + 1 + (q + 1) * (tensorOrder P + 1)) (b - b') ≤ d) : + WeightedBound Set.univ s m + (tensorChartBudget m (c.J m) (c.J (m + 1)) * + (2 * normalizedMeanBudget (tensorOrder P) c.C c.D q m N * A * + (τ / s + ε / τ ^ tensorLoss P) * d)) + (fun x => c.metricMeanField δ q b x - c.metricMeanField δ q b' x) := by + let C := 2 * normalizedMeanBudget (tensorOrder P) c.C c.D q m N * A * + (τ / s + ε / τ ^ tensorLoss P) * d + have hM := normalizedMeanBudget_nonneg (tensorOrder P) c.C c.D c.nonnegC q m N + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hC : 0 ≤ C := by dsimp only [C]; positivity + have hv := normalizedMeanBudget_difference δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) hδ hτ hs hτs hs1 hε hsmall + c.C c.D c.nonnegC c.nonnegD c.coefficients c.operator c.polynomial q m A N hA hN hn b b' d hd hb hb' hbb' + let f := c.metricMeanFieldInChart δ q b - c.metricMeanFieldInChart δ q b' + have hfield : WeightedBound Set.univ s m C f := + WeightedBound.pi isOpen_univ.uniqueDiffOn hs hC (contDiffOn_pi.mp f.contDiff.contDiffOn) + (fun k => hv (firstDirection k) (secondDirection k) (firstDirection_norm k) (secondDirection_norm k)) + have hf := supportedSeminorm_le_of_weightedBound hs hC f hfield + have hD := zero_le_one.trans (c.oneLEJ (m + 1)) + have hcoords := RealModes.weighted_coordDeriv_of_jets c.e.open_source c.smoothForward s.coe_nonneg hs1 + hD (c.coordinates (m + 1)) + have ht := realTensorChartPull_bound c.e c.smoothForward (modeSupport K) c.supportChart + hs hs1 (c.oneLEJ m) hD (c.coordinates m) hcoords f + have hT := tensorChartBudget_nonneg m (zero_le_one.trans (c.oneLEJ m)) hD + have hbound : supportedWeightedSeminorm (modeSupport K) s m + (realTensorChartPull c.e c.smoothForward (modeSupport K) c.supportChart f) ≤ + tensorChartBudget m (c.J m) (c.J (m + 1)) * C := + ht.trans (mul_le_mul_of_nonneg_left hf hT) + have hout := (weightedBound_of_supportedSeminorm s m + (realTensorChartPull c.e c.smoothForward (modeSupport K) c.supportChart f)).mono_const hbound + dsimp only [f] at hout + rw [realTensorChartPull_sub] at hout + exact hout + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..22642a55943689d2b80871b4e49fe63d93f98375 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedPolynomialMean.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeSeed +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialSupport + +namespace OAI + +/-! Polynomial mean estimates for the actual free amplitude transported +from a phase chart. The polynomial is evaluated in the original coordinates; +no transformed polynomial expression is assumed. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open WeightedEstimates RealModes +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +theorem polynomial_mean_bounds {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ c.O) + (k : Fin 3) (q m : ℕ) (B F A N : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) + (hA : 0 ≤ A) (hN : 0 ≤ N) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (hGQ : Set.MapsTo (lowJet G) c.U Q) + (hGb : WeightedBound c.U s (m + order (P k)) B (lowJet G)) + (hφb : ∀ v, WeightedBound c.U s (m + order (P k)) F + (fun x => fderiv ℝ φ x (coordinateVector v))) + (hn : WeightedBound c.e.target s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap)) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ δ : ℝ, 0 < δ → + ∀ (b d : SupportedField (F := ℝ) c.chartCompact) (z : ℝ), 0 ≤ z → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) b ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) d ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) (b - d) ≤ A * z → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * E) + (normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * (2 * E) * z) + (fun x => normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0 x - + normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q d) τ 0 x) := by + obtain ⟨E₀,hE₀,he⟩ := normalizedPolynomialMean_bounds c.openU c.openO hQ hQO + (P k) (c.smoothP k) m B F hB hF + let r := m + order (P k) + let S := (r.factorial : ℝ) * c.J r ^ r * correctedSeedBudget (tensorOrder P) c.C c.D q r N + have hS : 0 ≤ S := mul_nonneg (mul_nonneg (Nat.cast_nonneg _) + (pow_nonneg (zero_le_one.trans (c.oneLEJ r)) _)) + (correctedSeedBudget_nonneg (tensorOrder P) c.C c.D c.nonnegC q r hN) + refine ⟨E₀ * (S * A) ^ 2, mul_nonneg hE₀ (sq_nonneg _), ?_⟩ + intro δ hδ b d z hz hb hd hbd + have hzb := c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r hA hN hn b hb + have hzd := c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r hA hN hn d hd + have hdiff := c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r + (mul_nonneg hA hz) hN hn (b - d) hbd + rw [c.originalFreeSeed_sub] at hdiff + have hp : loss (P k) ≤ tensorLoss P := + Finset.le_sup (f := fun i => loss (P i)) (Finset.mem_univ k) + have hh := he G φ hG c.smoothPhase K (c.originalFreeSeed δ q b) (c.originalFreeSeed δ q d) + s δ τ ε (S * A) (S * (A * z)) (tensorLoss P) hδ hτ hs hτs hs1 hε hε1 + (mul_nonneg hS hA) (mul_nonneg hS (mul_nonneg hA hz)) hp hGQ hGb hφb hzb hzd hdiff 0 (by simp) + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + constructor + · convert normalizedPolynomialMean_extend c.openU c.smoothPhase K c.supportU + (c.originalFreeSeed δ q b) δ ε τ 0 (by positivity) hh.1 using 1 + ring + · have hdif := normalizedPolynomialMean_difference_extend c.openU c.smoothPhase K c.supportU + (c.originalFreeSeed δ q b) (c.originalFreeSeed δ q d) δ ε τ 0 (by positivity) hh.2 + convert hdif using 1 + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedTrialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedTrialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..429ab71e0a284f7f6396f2d7d778482d4b573965 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedTrialMean.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedTrialAmplitude + +namespace OAI + +/-! The actual trial-tensor mean map used by finite substitution. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes WeightedEstimates FiniteMean +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Q : SmallModes.Base → Tensor →L[ℝ] ℝ) + (h : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ Q c.e c.e.symm) + +def trialMean (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + SmallModes.Base → Tensor := c.combinedMeanField δ q (c.trialAmplitude ψ Q h hρ A) + +theorem trialMean_estimates + (d : Budgets c.e.source c.e.target s c.realMap ψ Q c.e c.e.symm) + (hρ : 0 < ρ) {Q₀ : Set LowJet} (hQ : IsCompact Q₀) (hQO : Q₀ ⊆ c.O) + (q m : ℕ) (C B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hε1 : ε ≤ 1) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (hGQ : Set.MapsTo (lowJet G) c.U Q₀) + (hGb : WeightedBound c.U s (m + tensorOrder P) B (lowJet G)) + (hφb : ∀ v, WeightedBound c.U s (m + tensorOrder P) F + (fun x => fderiv ℝ φ x (coordinateVector v))) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℝ, 1 ≤ β ∧ 1 ≤ κ ∧ ∀ δ : ℝ, 0 < δ → + ∀ (A B : SmallModes.Base → Tensor) (D : ℝ), 0 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ A c.e.source → ContDiffOn ℝ ∞ B c.e.source → + InTrialBall c.e.source reference r A → InTrialBall c.e.source reference r B → + WeightedBound c.e.source s (m + L) C A → WeightedBound c.e.source s (m + L) C B → + WeightedBound c.e.source s (m + L) D (A - B) → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * β) + (c.trialMean ψ Q h hρ δ q A) ∧ + WeightedBound Set.univ s m (κ * (τ / s + ε / τ ^ tensorLoss P) * D) + (c.trialMean ψ Q h hρ δ q A - c.trialMean ψ Q h hρ δ q B) := by + let j := m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + obtain ⟨A₀,hA₀,ha⟩ := c.trialAmplitude_bounds ψ Q h d hs hs1 hρ j C + have hA0 : 0 ≤ A₀ := zero_le_one.trans hA₀ + have hN : 0 ≤ d.normal j := zero_le_one.trans (d.normal_pos j) + obtain ⟨E,hE,he⟩ := c.combined_mean_bounds hQ hQO q m B F A₀ (d.normal j) hB hF hA0 hN + hτ hs hτs hs1 hε hε1 hsmall hGQ hGb hφb (d.normal_bound j) + refine ⟨max 1 E, max 1 (2 * E * inputFactor d j), le_max_left _ _, le_max_left _ _, ?_⟩ + intro δ hδ A B D hC hD hA hB hballA hballB hbA hbB hbD + have hj : m + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) = j := by dsimp [j]; omega + rw [hj] at hbA hbB hbD + obtain ⟨hu,hv,hd⟩ := ha A B D hC hD hA hB hballA hballB hbA hbB hbD + have hz : 0 ≤ inputFactor d j * D := mul_nonneg (inputFactor_nonneg d j) hD + have hdiff : supportedWeightedSeminorm c.chartCompact s j + (c.trialAmplitude ψ Q h hρ A - c.trialAmplitude ψ Q h hρ B) ≤ A₀ * (inputFactor d j * D) := by + simpa only [mul_assoc] using hd + have hh := he δ hδ _ _ (inputFactor d j * D) hz hu hv hdiff + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + constructor + · exact hh.1.mono_const (mul_le_mul_of_nonneg_left (le_max_right _ _) hη) + · apply hh.2.mono_const + calc + _ = (2 * E * inputFactor d j) * (τ / s + ε / τ ^ tensorLoss P) * D := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) hη) hD + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..7b242337bfdc49a172cd0d50d76133b26ef2875c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformCombinedMean.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedCombinedMeanBounds + +namespace OAI + +/-! Uniform combined mean estimates. Constants precede every scale, map and +actual phase solver with the specified common geometric bounds. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem uniform_charted_combined_mean {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 l, (P k l).SmoothCoeffs O) + (C D J : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hJ : ∀ m, 1 ≤ J m) + (q m : ℕ) (B F A N : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) (hA : 0 ≤ A) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) + (φ : Base → ℝ) (K : Compacts Base) (ε τ : ℝ) (s : ℝ≥0) + (c : PolynomialSolveData P ε G hG φ K τ s), + c.U = U → c.C = C → c.D = D → c.J = J → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + tensorOrder P) B (lowJet G) → + (∀ v, WeightedBound U s (m + tensorOrder P) F + (fun x => fderiv ℝ φ x (coordinateVector v))) → + WeightedBound c.e.target s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap) → + ∀ δ : ℝ, 0 < δ → ∀ (b d : SupportedField (F := ℝ) c.chartCompact) (z : ℝ), + 0 ≤ z → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) b ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) d ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) (b - d) ≤ A * z → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * E) + (c.combinedMeanField δ q b) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * (2 * E) * z) + (fun x => c.combinedMeanField δ q b x - c.combinedMeanField δ q d x) := by + have ho (k : Fin 3) : order (P k) ≤ tensorOrder P := + Finset.le_sup (f := fun i => order (P i)) (Finset.mem_univ k) + have hi (k : Fin 3) : m + order (P k) + (q + 1) * (tensorOrder P + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) := by have := ho k; omega + have hm : m + 1 + (q + 1) * (tensorOrder P + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) := by omega + have hex (k : Fin 3) := uniform_charted_polynomial_mean hU hO hQ hQO + P hP C D J hC hJ k q m B F A N hB hF hA hN + choose E hE he using hex + let T := tensorChartBudget m (J m) (J (m + 1)) + let M := normalizedMeanBudget (tensorOrder P) C D q m N + have hT : 0 ≤ T := tensorChartBudget_nonneg m (zero_le_one.trans (hJ m)) + (zero_le_one.trans (hJ (m + 1))) + have hM : 0 ≤ M := normalizedMeanBudget_nonneg (tensorOrder P) C D hC q m N + have hsum : 0 ≤ ∑ k, E k := Finset.sum_nonneg (fun k _ => hE k) + refine ⟨T * M * A ^ 2 + ∑ k, E k, by positivity, ?_⟩ + intro G hG φ K ε τ s c hUeq hCeq hDeq hJeq hτ hs hτs hs1 hε hε1 hsmall hGQ hGb hφb hn + δ hδ b d z hz hb hd hbd + let η := τ / s + ε / τ ^ tensorLoss P + have hη : 0 ≤ η := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hp (k : Fin 3) := he k G hG φ K ε τ s c hUeq hCeq hDeq hJeq + hτ hs hτs hs1 hε hε1 hsmall hGQ (hGb.mono_order (Nat.add_le_add_left (ho k) m)) + (fun v => (hφb v).mono_order (Nat.add_le_add_left (ho k) m)) (hn.mono_order (hi k)) + δ hδ b d z hz + ((supportedWeightedSeminorm_mono s (hi k) b).trans hb) + ((supportedWeightedSeminorm_mono s (hi k) d).trans hd) + ((supportedWeightedSeminorm_mono s (hi k) (b - d)).trans hbd) + have hle (k : Fin 3) : E k ≤ ∑ j, E j := + Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ k) + have hpv : WeightedBound Set.univ s m (η * ∑ k, E k) (c.polynomialMeanField δ q b) := + WeightedBound.pi isOpen_univ.uniqueDiffOn hs (mul_nonneg hη hsum) + (contDiffOn_pi.mp (c.polynomialMeanField δ q b).contDiff.contDiffOn) + (fun k => (hp k).1.mono_const (mul_le_mul_of_nonneg_left (hle k) hη)) + have hpd : WeightedBound Set.univ s m (η * (2 * ∑ k, E k) * z) + ((c.polynomialMeanField δ q b) - (c.polynomialMeanField δ q d)) := by + apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + (contDiffOn_pi.mp ((c.polynomialMeanField δ q b).contDiff.sub + (c.polynomialMeanField δ q d).contDiff).contDiffOn) + intro k + exact (hp k).2.mono_const (by gcongr; exact hle k) + have hpvc := weightedBound_comp_isometry planeCoordinateIsometry.symm + (c.polynomialMeanField δ q b).contDiff hpv + have hpdc := weightedBound_comp_isometry planeCoordinateIsometry.symm + ((c.polynomialMeanField δ q b).contDiff.sub (c.polynomialMeanField δ q d).contDiff) hpd + have hmv := c.metricMeanField_bound hδ hτ hs hτs hs1 hε hsmall q m hA hN (hn.mono_order hm) + b ((supportedWeightedSeminorm_mono s hm b).trans hb) + have hmd := c.metricMeanField_difference_bound hδ hτ hs hτs hs1 hε hsmall q m hA hN + (mul_nonneg hA hz) (hn.mono_order hm) b d + ((supportedWeightedSeminorm_mono s hm b).trans hb) + ((supportedWeightedSeminorm_mono s hm d).trans hd) + ((supportedWeightedSeminorm_mono s hm (b - d)).trans hbd) + simp only [hCeq, hDeq, hJeq] at hmv hmd + constructor + · have hh := hmv.add isOpen_univ.uniqueDiffOn s.coe_nonneg + (c.metricMeanField δ q b).contDiff.contDiffOn + ((c.polynomialMeanField δ q b).contDiff.comp planeCoordinateIsometry.symm.contDiff).contDiffOn hpvc + convert hh using 1 <;> first | rfl | (dsimp only [T, M, η]; ring) + · have hh := hmd.add isOpen_univ.uniqueDiffOn s.coe_nonneg + ((c.metricMeanField δ q b).contDiff.sub (c.metricMeanField δ q d).contDiff).contDiffOn + (((c.polynomialMeanField δ q b).contDiff.sub (c.polynomialMeanField δ q d).contDiff).comp + planeCoordinateIsometry.symm.contDiff).contDiffOn hpdc + apply (hh.congr (fun x _ => show + c.combinedMeanField δ q b x - c.combinedMeanField δ q d x = _ by + change (c.metricMeanField δ q b x + c.polynomialMeanField δ q b (planeCoordinateIsometry.symm x)) - + (c.metricMeanField δ q d x + c.polynomialMeanField δ q d (planeCoordinateIsometry.symm x)) = + (c.metricMeanField δ q b x - c.metricMeanField δ q d x) + + (c.polynomialMeanField δ q b (planeCoordinateIsometry.symm x) - + c.polynomialMeanField δ q d (planeCoordinateIsometry.symm x)) + abel)).mono_const + apply le_of_eq + dsimp only [T, M, η] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..d268a59037081bfe7205993da352a72df3db46e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFiniteMean.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformMajorants +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAdjustedMean + +namespace OAI + +/-! A uniform threshold for the actual finite family of transported means. +The profiles, target and their bounds precede the threshold; the map, both +scales, and the actual polynomial solvers follow it. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_charted_family_majorants {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} (p : ι → ChartedMeanProfile P) + {ρ R : ℝ} (hρ : 0 < ρ) (q : ℕ) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : ι → Base → ℝ} {K : ι → Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds Set.univ s reference r L + (rescaledMean (τ / s + ε / τ ^ tensorLoss P) (chartedFamilyMean d hρ δ q)) β κ := by + classical + choose β κ hm using fun i => uniform_charted_majorants (R := R) (p i) hρ q + refine ⟨(fun m C => 1 + ∑ i, β i m C),(fun m C => 1 + ∑ i, κ i m C),?_⟩ + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + exact MeanBounds.finset_rescaled isOpen_univ.uniqueDiffOn s.coe_nonneg Finset.univ + (fun i => (d i).mean hρ δ q) (fun _ => tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) β κ (fun _ _ => le_rfl) + (fun i _ => hm i (d i) (hd i) hτ hs hτs hs1 hε hε1 hsmall δ hδ) + +theorem uniform_finite_charted_quadratic_mean {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} (p : ι → ChartedMeanProfile P) + {s : ℝ≥0} (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) {ρ R r r₀ : ℝ} + (hρ : 0 < ρ) (hgap : r₀ < r) (q steps : ℕ) + {reference H : SmallModes.Base → Tensor} {C : ℕ → ℝ} + (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {ε τ : ℝ} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + (∀ A, ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + chartedFamilyLeading d hρ A = A) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ A : SmallModes.Base → Tensor, + ContDiff ℝ ∞ A ∧ InTrialBall Set.univ reference r A ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound L C β j m) A) ∧ + (∀ m, WeightedBound Set.univ s m + (δ ^ 2 * (differenceBound L C β κ j m * + (τ / s + ε / τ ^ tensorLoss P) ^ (j + 1))) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 - δ ^ 2 • H)) := by + obtain ⟨β,κ,hm⟩ := uniform_charted_family_majorants (R := R) p hρ q + obtain ⟨η₀,hη₀,hη₁,ht⟩ := finite_substitution_uniform (B := β) (K := κ) + isOpen_univ.uniqueDiffOn s.coe_nonneg hgap hC hH.contDiffOn (fun x _ => hH0 x) hbH steps + refine ⟨β,κ,η₀,hη₀,hη₁,?_⟩ + intro G hG φ K ε τ c d hd hτ hτs hε hε1 hsmall hdecomp δ hδ j hj + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨ha,hb,hc,he⟩ := ht _ + (hm d hd hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) _ hη hsmall j hj + have ha' : ContDiff ℝ ∞ (fixedTrial H (chartedFamilyMean d hρ δ q) j) := + contDiffOn_univ.mp (by simpa only [trial_rescaledMean hη.ne'] using ha) + have hb' : InTrialBall Set.univ reference r (fixedTrial H (chartedFamilyMean d hρ δ q) j) := by + simpa only [trial_rescaledMean hη.ne'] using hb + refine ⟨fixedTrial H (chartedFamilyMean d hρ δ q) j,ha',hb',?_,?_⟩ + · simpa only [trial_rescaledMean hη.ne'] using hc + · intro m + apply charted_quadratic_mean_residual d hρ hδ.ne' hτ.ne' q ha' hH (hdecomp _ ha' hb') + simpa only [trial_rescaledMean hη.ne', rescaledMean_self hη.ne'] using he m + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFree.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFree.lean new file mode 100644 index 0000000000000000000000000000000000000000..30393bf3b47cd8e256ac66a0609f4961bccfbf62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformFree.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeResidual +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanProfile +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformAmplitude + +namespace OAI + +/-! Uniform size and full-linearization residuals for the actual free +oscillation used by the charted mean construction. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +namespace ChartedMeanData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +def displacement (d : ChartedMeanData c r ρ R reference) (hρ : 0 < ρ) + (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : RField 4 := + c.freeDisplacement δ q (d.amplitude hρ A) + +lemma displacement_smooth_support (d : ChartedMeanData c r ρ R reference) (hρ : 0 < ρ) + (δ : ℝ) (q : ℕ) (A : SmallModes.Base → Tensor) : + ContDiff ℝ ∞ (d.displacement hρ δ q A) ∧ + tsupport (d.displacement hρ δ q A) ⊆ (modeSupport K : Set SmallModes.Base) := + c.freeDisplacement_smooth_support δ q (d.amplitude hρ A) + +end ChartedMeanData + +theorem uniform_charted_free_bounds {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : ChartedMeanProfile P) {ρ R : ℝ} (hρ : 0 < ρ) (q m : ℕ) (C : ℝ) : + ∃ B E : ℝ, 1 ≤ B ∧ 1 ≤ E ∧ ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), p.Fits d → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → ∀ δ : ℝ, 0 ≤ δ → + ∀ A : SmallModes.Base → Tensor, 0 ≤ C → ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + WeightedBound Set.univ s (PolynomialSolveData.inputOrder (P := P) q m) C A → + WeightedBound Set.univ τ m (B * (δ * τ)) (d.displacement hρ δ q A) ∧ + WeightedBound Set.univ τ m (E * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1)) + (coordinateFullLinearized P ε G (d.displacement hρ δ q A)) := by + let j := PolynomialSolveData.inputOrder (P := P) q m + obtain ⟨A₀,hA₀,ha⟩ := uniform_charted_trial_amplitude (R := R) p.openV hρ j C + (p.inv j) (p.forms j) (p.psi j) (p.oneLEInv j) (p.oneLEForms j) (p.oneLEPsi j) + let B₀ := (m.factorial : ℝ) * 2 ^ m * correctedSeedBudget (tensorOrder P) p.C p.D q m (p.normal j) * + p.J m ^ m + let κ := fun k => max (SmallModes.errorConstant k (p.C k)) + (p.D k * SmallModes.initialConstant 4 (k + tensorOrder P) (p.C (k + tensorOrder P))) + let γ := fun k => max (SmallModes.fullErrorConstant 4 k (p.C k)) + (p.D k * SmallModes.initialConstant 4 (k + tensorOrder P) (p.C (k + tensorOrder P))) + let E₀ := tensorChartBudget m (p.J m) (p.J (m + 1)) * 2 ^ m * + (FiniteParametrix.boundProfile (tensorOrder P + 1) κ γ q m * (Real.sqrt 2 * 2 ^ j * p.normal j)) + refine ⟨max 1 (B₀ * A₀),max 1 (E₀ * A₀),le_max_left _ _,le_max_left _ _,?_⟩ + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hsmall δ hδ A hC hA hball hbA + have hi : d.budgets.inv j = p.inv j := congrFun hd.inverse j + have hq : d.budgets.forms j = p.forms j := congrFun hd.forms j + have hp : d.budgets.psi j = p.psi j := congrFun hd.cutoff j + have hz : WeightedBound c.e.source s j 0 (A - A) := by + apply (weightedBound_zero c.e.source s j (F := Tensor)).congr + intro x _ + exact sub_self (A x) + obtain ⟨hu,_,_⟩ := ha c d.cutoff d.form d.localBounds d.budgets hd.target hi hq hp hs hs1 + A A 0 hC le_rfl hA.contDiffOn hA.contDiffOn + (fun x _ => hball x (Set.mem_univ x)) (fun x _ => hball x (Set.mem_univ x)) + (hbA.restrict_open c.e.open_source) (hbA.restrict_open c.e.open_source) hz + have hn : WeightedBound c.e.target s j (p.normal j) (freeNormal c.realMap) := by + simpa only [hd.normal] using d.budgets.normal_bound j + have hsize := c.freeDisplacement_bound hδ hτ hs hτs hs1 hε hsmall q m + (zero_le_one.trans hA₀) (zero_le_one.trans (p.oneLENormal j)) hn (d.amplitude hρ A) hu + have hres := c.freeDisplacement_residual_bound hδ hτ hs hτs hs1 hε q m + (zero_le_one.trans hA₀) (zero_le_one.trans (p.oneLENormal j)) hn (d.amplitude hρ A) hu + have heqB : c.freeSizeFactor q m (p.normal j) = B₀ := by + simp only [PolynomialSolveData.freeSizeFactor,hd.coefficients,hd.perturbation,hd.coordinates,B₀] + have heqE : c.freeResidualFactor q m (p.normal j) = E₀ := by + have hk : c.κ = κ := by + funext k + simp only [PolynomialSolveData.κ,hd.coefficients,hd.perturbation,κ] + have hg : c.freeInitialFactor = γ := by + funext k + simp only [PolynomialSolveData.freeInitialFactor,hd.coefficients,hd.perturbation,γ] + simp only [PolynomialSolveData.freeResidualFactor,PolynomialSolveData.freeChartResidualFactor, + hk,hg,hd.coordinates,E₀,j] + rw [heqB] at hsize + rw [heqE] at hres + constructor + · apply hsize.mono_const + simpa only [mul_assoc] using mul_le_mul_of_nonneg_right (le_max_right 1 (B₀ * A₀)) + (mul_nonneg hδ hτ.le) + · apply hres.mono_const + have hη : 0 ≤ (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) := + pow_nonneg (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _))) _ + calc + _ = (E₀ * A₀) * (δ * τ) * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hδ hτ.le)) hη + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..78a2e55fe33637a65ac3d0b67296032e4bd4d145 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformPolynomialMean.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedPolynomialMean + +namespace OAI + +/-! The polynomial mean constant is chosen before the immersion and scales. +Only the fixed polynomial, compact low-jet range and indicated finite bounds +enter the choice. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +theorem uniform_charted_polynomial_mean {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 l, (P k l).SmoothCoeffs O) + (C D J : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hJ : ∀ m, 1 ≤ J m) + (k : Fin 3) (q m : ℕ) (B F A N : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) + (hA : 0 ≤ A) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) + (φ : Base → ℝ) (K : Compacts Base) (ε τ : ℝ) (s : ℝ≥0) + (c : PolynomialSolveData P ε G hG φ K τ s), + c.U = U → c.C = C → c.D = D → c.J = J → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order (P k)) B (lowJet G) → + (∀ v, WeightedBound U s (m + order (P k)) F + (fun x => fderiv ℝ φ x (coordinateVector v))) → + WeightedBound c.e.target s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) N (freeNormal c.realMap) → + ∀ δ : ℝ, 0 < δ → ∀ (b d : SupportedField (F := ℝ) c.chartCompact) (z : ℝ), + 0 ≤ z → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) b ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) d ≤ A → + supportedWeightedSeminorm c.chartCompact s + (m + order (P k) + (q + 1) * (tensorOrder P + 1)) (b - d) ≤ A * z → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * E) + (normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * (2 * E) * z) + (fun x => normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q b) τ 0 x - + normalizedPolynomialMean (P k) δ ε G φ (c.originalFreeSeed δ q d) τ 0 x) := by + obtain ⟨E₀,hE₀,he⟩ := normalizedPolynomialMean_bounds hU hO hQ hQO + (P k) (hP k) m B F hB hF + let r := m + order (P k) + let S := (r.factorial : ℝ) * J r ^ r * correctedSeedBudget (tensorOrder P) C D q r N + have hS : 0 ≤ S := mul_nonneg (mul_nonneg (Nat.cast_nonneg _) + (pow_nonneg (zero_le_one.trans (hJ r)) _)) + (correctedSeedBudget_nonneg (tensorOrder P) C D hC q r hN) + refine ⟨E₀ * (S * A) ^ 2, mul_nonneg hE₀ (sq_nonneg _), ?_⟩ + intro G hG φ K ε τ s c hUeq hCeq hDeq hJeq hτ hs hτs hs1 hε hε1 hsmall hGQ hGb hφb hn + δ hδ b d z hz hb hd hbd + have hzb : supportedWeightedSeminorm K s r (c.originalFreeSeed δ q b) ≤ S * A * (δ * τ) := by + simpa only [S, hCeq, hDeq, hJeq] using + c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r hA hN hn b hb + have hzd : supportedWeightedSeminorm K s r (c.originalFreeSeed δ q d) ≤ S * A * (δ * τ) := by + simpa only [S, hCeq, hDeq, hJeq] using + c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r hA hN hn d hd + have hdiff : supportedWeightedSeminorm K s r + (c.originalFreeSeed δ q b - c.originalFreeSeed δ q d) ≤ S * (A * z) * (δ * τ) := by + simpa only [S, hCeq, hDeq, hJeq, c.originalFreeSeed_sub] using + c.originalFreeSeed_bound hδ.le hτ hs hτs hs1 hε hsmall q r + (mul_nonneg hA hz) hN hn (b - d) hbd + have hp : loss (P k) ≤ tensorLoss P := + Finset.le_sup (f := fun i => loss (P i)) (Finset.mem_univ k) + have hh := he G φ hG c.smoothPhase K (c.originalFreeSeed δ q b) (c.originalFreeSeed δ q d) + s δ τ ε (S * A) (S * (A * z)) (tensorLoss P) hδ hτ hs hτs hs1 hε hε1 + (mul_nonneg hS hA) (mul_nonneg hS (mul_nonneg hA hz)) hp hGQ hGb hφb hzb hzd hdiff 0 (by simp) + rw [← hUeq] at hh + constructor + · convert normalizedPolynomialMean_extend c.openU c.smoothPhase K c.supportU + (c.originalFreeSeed δ q b) δ ε τ 0 (by positivity) hh.1 using 1 + ring + · convert normalizedPolynomialMean_difference_extend c.openU c.smoothPhase K c.supportU + (c.originalFreeSeed δ q b) (c.originalFreeSeed δ q d) δ ε τ 0 (by positivity) hh.2 using 1 + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformTrialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformTrialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..5ea3b994fb78eb0bc755797b19b2a0a62d32e197 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedUniformTrialMean.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanProfile +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedUniformAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformCombinedMean + +namespace OAI + +/-! The actual trial mean has majorants depending only on the fixed profile, +before choosing either oscillation scale or immersion. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_charted_trial_mean {n : ℕ} {P : Fin 3 → Fin n → Expression} + (p : ChartedMeanProfile P) {ρ R : ℝ} (hρ : 0 < ρ) (q m : ℕ) (C : ℝ) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℝ, 1 ≤ β ∧ 1 ≤ κ ∧ ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} {ε τ : ℝ} {s : ℝ≥0} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), p.Fits d → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ tensorLoss P ≤ 1 → + ∀ δ : ℝ, 0 < δ → ∀ (A B : SmallModes.Base → Tensor) (D : ℝ), 0 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ A c.e.source → ContDiffOn ℝ ∞ B c.e.source → + InTrialBall c.e.source reference r A → InTrialBall c.e.source reference r B → + WeightedBound c.e.source s (m + L) C A → WeightedBound c.e.source s (m + L) C B → + WeightedBound c.e.source s (m + L) D (A - B) → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ tensorLoss P) * β) (d.mean hρ δ q A) ∧ + WeightedBound Set.univ s m (κ * (τ / s + ε / τ ^ tensorLoss P) * D) + (d.mean hρ δ q A - d.mean hρ δ q B) := by + let j := m + tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + let I := 2 ^ j * p.forms j * (j.factorial : ℝ) * p.inv j ^ j + have hI : 0 ≤ I := by + have := p.oneLEForms j + have := p.oneLEInv j + dsimp [I] + positivity + obtain ⟨A₀,hA₀,ha⟩ := uniform_charted_trial_amplitude (R := R) p.openV hρ j C + (p.inv j) (p.forms j) (p.psi j) (p.oneLEInv j) (p.oneLEForms j) (p.oneLEPsi j) + have hA0 : 0 ≤ A₀ := zero_le_one.trans hA₀ + obtain ⟨E,hE,he⟩ := uniform_charted_combined_mean p.openU p.openO p.compact p.subsetDomain + P p.smoothP p.C p.D p.J p.nonnegC p.oneLEJ q m (p.B m) (p.F m) A₀ (p.normal j) + (p.oneLEB m) (p.nonnegF m) hA0 (zero_le_one.trans (p.oneLENormal j)) + refine ⟨max 1 E,max 1 (2 * E * I),le_max_left _ _,le_max_left _ _,?_⟩ + intro G hG φ K ε τ s c r reference d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ A B D hC hD hA hB + hballA hballB hbA hbB hbD + have hj : m + (tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1)) = j := by dsimp [j]; omega + rw [hj] at hbA hbB hbD + have hi : d.budgets.inv j = p.inv j := congrFun hd.inverse j + have hq : d.budgets.forms j = p.forms j := congrFun hd.forms j + have hp : d.budgets.psi j = p.psi j := congrFun hd.cutoff j + obtain ⟨hu,hv,hbd⟩ := ha c d.cutoff d.form d.localBounds d.budgets hd.target hi hq hp hs hs1 + A B D hC hD hA hB hballA hballB hbA hbB hbD + have hmaps : Set.MapsTo (lowJet G) p.U p.Q := by + simpa only [hd.domain, hd.range] using d.mapsJets + have hgb : WeightedBound p.U s (m + tensorOrder P) (p.B m) (lowJet G) := by + simpa only [hd.domain, hd.jets] using d.jetsBound m + have hfb : ∀ v, WeightedBound p.U s (m + tensorOrder P) (p.F m) + (fun x => fderiv ℝ φ x (coordinateVector v)) := by + intro v + simpa only [hd.domain, hd.phase] using d.phaseBound m v + have hn : WeightedBound c.e.target s j (p.normal j) (freeNormal c.realMap) := by + simpa only [hd.normal] using d.budgets.normal_bound j + have hdiff : supportedWeightedSeminorm c.chartCompact s j + (d.amplitude hρ A - d.amplitude hρ B) ≤ A₀ * (I * D) := by + simpa only [ChartedMeanData.amplitude, I, mul_assoc] using hbd + have hh := he G hG φ K ε τ s c hd.domain hd.coefficients hd.perturbation hd.coordinates + hτ hs hτs hs1 hε hε1 hsmall hmaps hgb hfb hn δ hδ (d.amplitude hρ A) (d.amplitude hρ B) + (I * D) (mul_nonneg hI hD) hu hv hdiff + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + constructor + · exact hh.1.mono_const (mul_le_mul_of_nonneg_left (le_max_right _ _) hη) + · apply hh.2.mono_const + calc + _ = (2 * E * I) * (τ / s + ε / τ ^ tensorLoss P) * D := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) hη) hD + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedZeroMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedZeroMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..b62f3135bc567efe8bae8f484cdc467a012b0763 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ChartedZeroMean.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeSeed +import OAI.Geometry.Immersion.ClosedSurface.MeanBilinearity + +namespace OAI + +/-! The actual zero phase of a transported free amplitude. The metric +part transforms as a covariant tensor through the phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes +open QuadraticMean (derivativeAmplitude) + +lemma phaseZeroTensor_congr {n : ℕ} {φ ψ : Base → ℝ} {Z W : Field n} {p : Base} + (hφ : φ =ᶠ[nhds p] ψ) (hZ : Z =ᶠ[nhds p] W) (τ : ℝ) : + phaseZeroTensor τ φ Z p = phaseZeroTensor τ ψ W p := by + unfold phaseZeroTensor derivativeAmplitude + rw [Filter.EventuallyEq.fderiv_eq hφ, Filter.EventuallyEq.fderiv_eq hZ, hZ.eq_of_nhds] + +lemma phaseZeroTensor_chart {n : ℕ} + (e : OpenPartialHomeomorph Base Base) (he : ContDiffOn ℝ ∞ e e.source) + (K : Compacts Base) (hK : (K : Set Base) ⊆ e.source) + {φ : Base → ℝ} (hφ : ∀ x ∈ e.source, (e x).1 = φ x) (τ : ℝ) + (Z : JetPolynomial.SupportedField (F := Ambient n) (JetPolynomial.chartSupport e K hK)) + {p : Base} (hp : p ∈ e.source) : + phaseZeroTensor τ φ (JetPolynomial.chartPull e he K hK Z) p = + PhaseMean.pullbackField e p (phaseZeroTensor τ Prod.fst Z (e p)) := by + have hphase : φ =ᶠ[nhds p] (fun x => (e x).1) := by + filter_upwards [e.open_source.mem_nhds hp] with x hx using (hφ x hx).symm + have hseed : (JetPolynomial.chartPull e he K hK Z : Field n) =ᶠ[nhds p] Z ∘ e := by + filter_upwards [e.open_source.mem_nhds hp] with x hx + exact Set.indicator_of_mem hx _ + rw [phaseZeroTensor_congr hphase hseed τ] + exact phaseZeroTensor_coordinate (Z.contDiff.differentiable (by simp) _) + ((he.contDiffAt (e.open_source.mem_nhds hp)).differentiableAt (by simp)) τ + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes +open SmallModes (gradientAmplitude) +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +def metricMeanInChart (δ : ℝ) (q : ℕ) (b : SupportedField (F := ℝ) c.chartCompact) : + SmallModes.Base → Tensor := fun y k => + normalizedPerturbedMean δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) c.operator q b + (firstDirection k) (secondDirection k) y + +def leadingInChart (b : SupportedField (F := ℝ) c.chartCompact) : SmallModes.Base → Tensor := + fun y k => b y ^ 2 * (firstDirection k).1 * (secondDirection k).1 + +lemma freeSeed_zeroPhase {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) {y : SmallModes.Base} (hy : y ∈ c.e.target) : + phaseZeroTensor τ Prod.fst (c.freeSeed δ q b) y = + δ ^ 2 • (c.leadingInChart b y + c.metricMeanInChart δ q b y) := by + funext k + simp only [phaseZeroTensor, ← SmallModes.gradientAmplitude_eq, Pi.smul_apply, smul_eq_mul, Pi.add_apply] + exact perturbed_seed_mean_identity δ τ hδ hτ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) c.operator q b + (firstDirection k) (secondDirection k) y hy + +lemma originalFreeSeed_zeroPhase {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) {x : SmallModes.Base} (hx : x ∈ c.e.source) : + phaseZeroTensor τ (coordinatePhase φ) (coordinateAmplitude (c.originalFreeSeed δ q b)) x = + δ ^ 2 • (pullbackField c.e x (c.leadingInChart b (c.e x)) + + pullbackField c.e x (c.metricMeanInChart δ q b (c.e x))) := by + have he : coordinateAmplitude (c.originalFreeSeed δ q b) = + (chartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.freeSeed δ q b) : SmallModes.Field 4) := by + funext y + change (chartPull c.e c.smoothForward (modeSupport K) c.supportChart (c.freeSeed δ q b)) + (planeCoordinateIsometry (planeCoordinateIsometry.symm y)) = _ + rw [planeCoordinateIsometry.apply_symm_apply] + rw [he, phaseZeroTensor_chart c.e c.smoothForward (modeSupport K) c.supportChart c.phase τ _ hx, + c.freeSeed_zeroPhase hδ hτ q b (c.e.map_source hx), map_smul, map_add] + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CircularSmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CircularSmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..7f01e0b35e8bd0d5bfd340f43a517dc7823e5b88 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CircularSmoothingAtlas.lean @@ -0,0 +1,263 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFlatBump +import OAI.Geometry.Immersion.ClosedSurface.ChartTransition +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldFreeIncrement + +namespace OAI + +/-! A finite smoothing atlas whose positive loci are actual coordinate disks. +The cutoffs are flat circular functions, not arbitrary subordinate bumps. -/ +noncomputable section +open Set Manifold Filter +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def circularCoordinateRegion (p : M) (r : ℝ) : Set SmallModes.Base := + {x | circularRadiusSquared (coordinateChart p p) x ≤ r^2} + +def circularCoordinateDisk (p : M) (r : ℝ) : Set M := + (coordinateChart p).source ∩ + (coordinateChart p) ⁻¹' {x | circularRadiusSquared (coordinateChart p p) x < r^2} + +def circularDiskClosure (p : M) (r : ℝ) : Set M := + (coordinateChart p).symm '' circularCoordinateRegion p r + +def circularManifoldBump (p : M) (r : ℝ) : M → ℝ := + (coordinateChart p).source.indicator + (fun x => circularFlatBump (coordinateChart p p) r (coordinateChart p x)) + +lemma circularCoordinateRegion_compact (p : M) (r : ℝ) : + IsCompact (circularCoordinateRegion p r) := by + apply (isCompact_closedBall (coordinateChart p p) |r|).of_isClosed_subset + (isClosed_le (circularRadiusSquared_smooth _).continuous continuous_const) + intro x hx + rw [Metric.mem_closedBall,dist_eq_norm] + exact circularRadiusSquared_le_norm hx + +lemma circularManifoldBump_nonneg (p x : M) (r : ℝ) : + 0 ≤ circularManifoldBump p r x := by + classical + by_cases hx : x ∈ (coordinateChart p).source + · rw [circularManifoldBump,indicator_of_mem hx] + exact circularFlatBump_nonneg _ _ _ + · rw [circularManifoldBump,indicator_of_notMem hx] + +lemma circularManifoldBump_pos_iff (p x : M) (r : ℝ) : + 0 < circularManifoldBump p r x ↔ x ∈ circularCoordinateDisk p r := by + classical + by_cases hx : x ∈ (coordinateChart p).source + · simp only [circularManifoldBump,indicator_of_mem hx,circularCoordinateDisk, + mem_inter_iff,hx,true_and,mem_preimage,Set.mem_ofPred_eq,circularFlatBump_pos_iff] + · simp only [circularManifoldBump,indicator_of_notMem hx,circularCoordinateDisk, + mem_inter_iff,hx,false_and,lt_self_iff_false] + +variable [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +lemma circularCoordinateDisk_open (p : M) (r : ℝ) : + IsOpen (circularCoordinateDisk p r) := by + exact (coordinateChart p).continuousOn.isOpen_inter_preimage + (coordinateChart p).open_source + (isOpen_lt (circularRadiusSquared_smooth _).continuous continuous_const) + +omit [IsManifold planeModel ∞ M] in +lemma mem_circularCoordinateDisk (p : M) {r : ℝ} (hr : 0 < r) : + p ∈ circularCoordinateDisk p r := by + refine ⟨?_,?_⟩ + · rw [coordinateChart_source] + exact mem_chart_source Plane p + · change circularRadiusSquared (coordinateChart p p) (coordinateChart p p) < r^2 + simpa only [circularRadiusSquared,sub_self,zero_pow (by decide : 2 ≠ 0),zero_add] using + sq_pos_of_pos hr + +variable [T2Space M] + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_compact (p : M) (r : ℝ) + (hregion : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + IsCompact (circularDiskClosure p r) := + (circularCoordinateRegion_compact p r).image_of_continuousOn + ((coordinateChart p).continuousOn_symm.mono hregion) + +omit [IsManifold planeModel ∞ M] [T2Space M] in +lemma circularDiskClosure_source (p : M) (r : ℝ) + (hregion : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + circularDiskClosure p r ⊆ (coordinateChart p).source := by + rintro x ⟨y,hy,rfl⟩ + exact (coordinateChart p).map_target (hregion hy) + +lemma circularManifoldBump_smooth_support (p : M) (r : ℝ) + (hregion : circularCoordinateRegion p r ⊆ (coordinateChart p).target) : + ContMDiff planeModel 𝓘(ℝ) ∞ (circularManifoldBump p r) ∧ + tsupport (circularManifoldBump p r) ⊆ circularDiskClosure p r := by + apply contMDiff_indicator_of_support (coordinateChart p).open_source + (circularDiskClosure_compact p r hregion).isClosed + (circularDiskClosure_source p r hregion) + ((circularFlatBump_smooth _ r).contMDiff.comp_contMDiffOn (coordinateChart_smoothOn p)) + intro x hx hnot + apply (circularFlatBump_zero_iff _ r _).mpr + by_contra hlt + apply hnot + refine ⟨coordinateChart p x,?_,(coordinateChart p).left_inv hx⟩ + exact (not_le.mp hlt).le + +omit [IsManifold planeModel ∞ M] [T2Space M] in +/-- The disks can be chosen inside any given neighborhood of their centers. -/ +lemma exists_circularCoordinateDisk_subordinate (p : M) {V : Set M} + (hV : IsOpen V) (hpV : p ∈ V) : + ∃ r : ℝ, 0 < r ∧ + circularCoordinateRegion p r ⊆ (coordinateChart p).target ∧ + circularDiskClosure p r ⊆ V := by + let e := coordinateChart p + have hpS : p ∈ e.source := by rw [coordinateChart_source]; exact mem_chart_source Plane p + have hU : IsOpen (e.target ∩ e.symm ⁻¹' V) := + e.continuousOn_symm.isOpen_inter_preimage e.open_target hV + have hc : e p ∈ e.target ∩ e.symm ⁻¹' V := + ⟨e.map_source hpS,by simpa only [mem_preimage,e.left_inv hpS] using hpV⟩ + obtain ⟨eps,heps,hball⟩ := Metric.isOpen_iff.mp hU (e p) hc + have hsmall : ∀ x ∈ circularCoordinateRegion p (eps/2), + x ∈ e.target ∩ e.symm ⁻¹' V := by + intro x hx + apply hball + rw [Metric.mem_ball,dist_eq_norm] + have hb := circularRadiusSquared_le_norm hx + rw [abs_of_pos (half_pos heps)] at hb + exact hb.trans_lt (by linarith) + refine ⟨eps/2,half_pos heps,fun x hx => (hsmall x hx).1,?_⟩ + rintro x ⟨y,hy,rfl⟩ + exact (hsmall y hy).2 + +variable [CompactSpace M] + +/-- A finite collection of actual circular coordinate disks covers the +surface. Its flat cutoffs are smooth and subordinate to the given cover. -/ +theorem exists_finite_circular_cutoffs (V : M → Set M) + (hV : ∀ p, IsOpen (V p)) (hpV : ∀ p, p ∈ V p) : + ∃ (t : Finset M) (r : t → ℝ), + (∀ i : t, 0 < r i) ∧ + (∀ i : t, circularCoordinateRegion (i : M) (r i) ⊆ (coordinateChart (i : M)).target) ∧ + (∀ i : t, circularDiskClosure (i : M) (r i) ⊆ V i) ∧ + (∀ x : M, ∃ i : t, x ∈ circularCoordinateDisk (i : M) (r i)) ∧ + (∀ i : t, ContMDiff planeModel 𝓘(ℝ) ∞ (circularManifoldBump (i : M) (r i))) ∧ + (∀ i : t, tsupport (circularManifoldBump (i : M) (r i)) ⊆ V i) := by + classical + choose r hr ht hv using fun p => exists_circularCoordinateDisk_subordinate p (hV p) (hpV p) + have hc : (univ : Set M) ⊆ ⋃ p, circularCoordinateDisk p (r p) := by + intro p _ + exact mem_iUnion.mpr ⟨p,mem_circularCoordinateDisk p (hr p)⟩ + obtain ⟨t,hcover⟩ := isCompact_univ.elim_finite_subcover + (fun p => circularCoordinateDisk p (r p)) + (fun p => circularCoordinateDisk_open p (r p)) hc + refine ⟨t,fun i => r i,fun i => hr i,fun i => ht i,fun i => hv i,?_,?_,?_⟩ + · intro x + obtain ⟨i,hi,hxi⟩ := mem_iUnion₂.mp (hcover (mem_univ x)) + exact ⟨⟨i,hi⟩,hxi⟩ + · intro i + exact (circularManifoldBump_smooth_support (i : M) (r i) (ht i)).1 + · intro i + exact (circularManifoldBump_smooth_support (i : M) (r i) (ht i)).2.trans (hv i) + +omit [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] in +theorem normalize_finite_positive_cutoffs {ι : Type*} [Fintype ι] + (f : ι → M → ℝ) (hf : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (f i)) + (hnon : ∀ i x, 0 ≤ f i x) (hcover : ∀ x, ∃ i, 0 < f i x) : + ∃ w : ι → M → ℝ, + (∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (w i)) ∧ + (∀ i x, 0 ≤ w i x) ∧ (∀ i x, 0 < w i x ↔ 0 < f i x) ∧ + (∀ i, tsupport (w i) = tsupport (f i)) ∧ + ∀ x, ∑ i, (w i x)^2 = 1 := by + classical + let sigma : M → ℝ := fun x => ∑ i, (f i x)^2 + have hpos (x : M) : 0 < sigma x := by + obtain ⟨i,hi⟩ := hcover x + exact (sq_pos_of_pos hi).trans_le + (Finset.single_le_sum (fun j _ => sq_nonneg (f j x)) (Finset.mem_univ i)) + have hsigma : ContMDiff planeModel 𝓘(ℝ) ∞ sigma := + contMDiff_finsetSum (fun i _ => (hf i).pow 2) + have hsqrt : ContMDiff planeModel 𝓘(ℝ) ∞ (fun x => Real.sqrt (sigma x)) := by + intro x + exact (Real.contDiffAt_sqrt (hpos x).ne').contMDiffAt.comp x (hsigma x) + let w : ι → M → ℝ := fun i x => f i x / Real.sqrt (sigma x) + have hwpos (i : ι) (x : M) : 0 < w i x ↔ 0 < f i x := + div_pos_iff_of_pos_right (Real.sqrt_pos.mpr (hpos x)) + refine ⟨w,fun i => (hf i).div₀ hsqrt (fun x => (Real.sqrt_pos.mpr (hpos x)).ne'), + fun i x => div_nonneg (hnon i x) (Real.sqrt_nonneg _),hwpos,?_,?_⟩ + · intro i + change closure (Function.support (w i)) = closure (Function.support (f i)) + congr 1 + ext x + change w i x ≠ 0 ↔ f i x ≠ 0 + change f i x / Real.sqrt (sigma x) ≠ 0 ↔ f i x ≠ 0 + rw [div_ne_zero_iff] + exact and_iff_left (Real.sqrt_pos.mpr (hpos x)).ne' + · intro x + calc + ∑ i, (w i x)^2 = (∑ i, (f i x)^2) / (Real.sqrt (sigma x))^2 := by + simp only [w,div_pow,Finset.sum_div] + _ = sigma x / sigma x := by rw [Real.sq_sqrt (hpos x).le] + _ = 1 := div_self (hpos x).ne' + +/-- A finite atlas with circular positive loci. Outer cutoffs are identically +one near their supports, and all data stay inside the prescribed neighborhoods. -/ +theorem exists_circular_smoothingAtlas (V : M → Set M) + (hV : ∀ p, IsOpen (V p)) (hpV : ∀ p, p ∈ V p) : + ∃ (A : SmoothingAtlas M) (r : A.centers → ℝ), + (∀ i : A.centers, 0 < r i) ∧ + (∀ i : A.centers, circularCoordinateRegion (i : M) (r i) ⊆ (coordinateChart (i : M)).target) ∧ + (∀ i : A.centers, circularDiskClosure (i : M) (r i) ⊆ V i) ∧ + (∀ i x, 0 ≤ A.weight i x) ∧ + (∀ i x, 0 < A.weight i x ↔ x ∈ circularCoordinateDisk (i : M) (r i)) ∧ + (∀ i, tsupport (A.weight i) ⊆ V i) ∧ + ∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1) := by + classical + obtain ⟨t,r,hr,hregion,hinside,hcover,hsmooth,hsupport⟩ := + exists_finite_circular_cutoffs V hV hpV + let f : t → M → ℝ := fun i => circularManifoldBump (i : M) (r i) + obtain ⟨w,hw,hwnon,hwpos,hwsupport,hpart⟩ := normalize_finite_positive_cutoffs f hsmooth + (fun i x => circularManifoldBump_nonneg (i : M) x (r i)) (fun x => by + obtain ⟨i,hi⟩ := hcover x + exact ⟨i,(circularManifoldBump_pos_iff (i : M) x (r i)).mpr hi⟩) + have hwchart (i : t) : tsupport (w i) ⊆ (chart (i : M)).source := by + rw [hwsupport i] + intro x hx + have hxC := (circularManifoldBump_smooth_support (i : M) (r i) (hregion i)).2 hx + have hxS := circularDiskClosure_source (i : M) (r i) (hregion i) hxC + simpa only [coordinateChart_source,chart_source] using hxS + have hwV (i : t) : tsupport (w i) ⊆ V i := by + rw [hwsupport i] + exact hsupport i + have hout : ∀ i : t, ∃ chi : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ chi ∧ + tsupport chi ⊆ (chart (i : M)).source ∧ + ∀ x ∈ tsupport (w i), chi =ᶠ[𝓝 x] (fun _ => 1) := by + intro i + have hc : IsCompact (tsupport (w i)) := (isClosed_tsupport _).isCompact + obtain ⟨B,hB,hKB,hBc⟩ := hc.exists_isOpen_closure_subset + ((chart (i : M)).open_source.mem_nhdsSet.mpr (hwchart i)) + obtain ⟨O,hO,hKO,hOc⟩ := hc.exists_isOpen_closure_subset (hB.mem_nhdsSet.mpr hKB) + obtain ⟨chi,hchi,_,hchis,hchione⟩ := + exists_contMDiff_support_eq_eq_one_iff (I := planeModel) (n := (⊤ : ℕ∞)) + hB isClosed_closure hOc + refine ⟨chi,hchi,?_,?_⟩ + · change closure (Function.support chi) ⊆ _ + rw [hchis] + exact hBc + · intro x hx + filter_upwards [hO.mem_nhds (hKO hx)] with y hy + exact (hchione y).mp (subset_closure hy) + choose chi hchi hchis hchione using hout + let A : SmoothingAtlas M := + ⟨t,w,chi,hw,hwchart,hchi,hchis,fun i x hx => (hchione i x hx).eq_of_nhds,hpart⟩ + refine ⟨A,r,hr,hregion,hinside,hwnon,?_,hwV,hchione⟩ + intro i x + exact (hwpos i x).trans (circularManifoldBump_pos_iff (i : M) x (r i)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..5b5489207801c206645b5678a9d7820bb6cc4c6a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanChart.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanMajorants + +namespace OAI + +/-! The concrete fixed data of one chart for the combined mean. This record +only groups the geometric, support and polynomial data used by the local +construction; its mean estimates are proved from those data. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +open JetPolynomial (SupportedField supportedWeightedSeminorm) +open JetPolynomial.Perturbation (modeSupport) + +structure CombinedMeanChart (s r ρ R₀ : ℝ) (reference : Base → Tensor) (n L : ℕ) where + source : Set Base + target : Set Base + support : Compacts JetPolynomial.Base + cutoff : SupportedField (F := ℝ) (modeSupport support) + immersion : RField 4 + coefficient : Base → Tensor →L[ℝ] ℝ + chart : Base → Base + inverse : Base → Base + localBounds : LocalBounds source target s r ρ R₀ reference immersion cutoff coefficient chart inverse + budgets : Budgets source target s immersion cutoff coefficient chart inverse + support_target : (modeSupport support : Set Base) ⊆ target + outerSupport : Set Base + outer_closed : IsClosed outerSupport + outer_source : outerSupport ⊆ source + support_chart : ∀ x ∈ source, chart x ∈ (modeSupport support : Set Base) → x ∈ outerSupport + polynomial : Fin 3 → Fin n → JetPolynomial.Expression + jetSource : Set JetPolynomial.Base + coefficientDomain : Set JetPolynomial.LowJet + compactJets : Set JetPolynomial.LowJet + jetSource_open : IsOpen jetSource + coefficientDomain_open : IsOpen coefficientDomain + compactJets_compact : IsCompact compactJets + compactJets_domain : compactJets ⊆ coefficientDomain + coefficients_smooth : ∀ i l, (polynomial i l).SmoothCoeffs coefficientDomain + support_jetSource : (support : Set JetPolynomial.Base) ⊆ jetSource + jetMap : JetPolynomial.Base → JetPolynomial.Space + jetMap_smooth : ContDiff ℝ ∞ jetMap + jetMap_range : Set.MapsTo (JetPolynomial.lowJet jetMap) jetSource compactJets + operatorBudget : ℕ → ℝ + operatorBudget_nonneg : ∀ m, 0 ≤ operatorBudget m + jetBudget : ℕ → ℝ + jetBudget_pos : ∀ m, 1 ≤ jetBudget m + jets_bound : ∀ m, WeightedBound jetSource s + (m + JetPolynomial.Perturbation.tensorOrder polynomial) (jetBudget m) (JetPolynomial.lowJet jetMap) + +namespace CombinedMeanChart +variable {s r ρ R₀ : ℝ} {reference : Base → Tensor} {n L : ℕ} + +abbrev Operator (c : CombinedMeanChart s r ρ R₀ reference n L) := + SupportedField (F := Ambient 4) (modeSupport c.support) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport c.support) + +def mean (c : CombinedMeanChart s r ρ R₀ reference n L) (hρ : 0 < ρ) + (δ τ ε : ℝ) (R : c.Operator) (q : ℕ) : (Base → Tensor) → Base → Tensor := + extendedCombinedMean c.localBounds hρ c.support_target c.polynomial c.jetMap δ τ ε R q + +def loss (c : CombinedMeanChart s r ρ R₀ reference n L) (q : ℕ) : ℕ := + JetPolynomial.Perturbation.tensorOrder c.polynomial + 1 + (q + 1) * (L + 1) + +def exponent (c : CombinedMeanChart s r ρ R₀ reference n L) : ℕ := + JetPolynomial.Perturbation.tensorLoss c.polynomial + +def OperatorBound (c : CombinedMeanChart s r ρ R₀ reference n L) (hs : 0 < s) + (τ ε : ℝ) (p : ℕ) (R : c.Operator) : Prop := + ∀ m Z, supportedWeightedSeminorm (modeSupport c.support) ⟨s, hs.le⟩ m (R Z) ≤ + ε / τ ^ p * c.operatorBudget m * supportedWeightedSeminorm (modeSupport c.support) ⟨s, hs.le⟩ (m + L) Z + +theorem majorants (c : CombinedMeanChart s r ρ R₀ reference n L) + (hs : 0 < s) (hs1 : s ≤ 1) (hρ : 0 < ρ) (q : ℕ) : + ∃ B K : ℕ → ℝ → ℝ, ∀ δ τ ε : ℝ, ∀ p : ℕ, + 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → c.exponent ≤ p → + τ / s + ε / τ ^ p ≤ 1 → ∀ R : c.Operator, c.OperatorBound hs τ ε p R → + MeanBounds Set.univ s reference r (c.loss q) + (rescaledMean (τ / s + ε / τ ^ p) (c.mean hρ δ τ ε R q)) B K := + extendedCombinedMean_majorants c.localBounds c.budgets hs hs1 hρ c.support_target + c.outer_closed c.outer_source c.support_chart c.jetSource_open c.coefficientDomain_open + c.compactJets_compact c.compactJets_domain c.coefficients_smooth c.support_jetSource + c.jetMap_smooth c.jetMap_range c.operatorBudget c.jetBudget c.operatorBudget_nonneg c.jetBudget_pos c.jets_bound q + +end CombinedMeanChart +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..fc9de4af6a98f8211ccbe8e927a7af63b4bbe8b5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanGeometry.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedSeedMean + +namespace OAI + +/-! Exact mean identity, support and global smoothness for the combined mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial + +lemma seedMeanError_zero_outside {n : ℕ} (τ : ℝ) (K : Compacts Base) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W : SupportedField (F := Ambient n) K) (v w p : Base) (hp : p ∉ (K : Set Base)) : + seedMeanError τ T V W v w p = 0 := by + have hV : p ∉ tsupport V := fun hx => hp (V.tsupport_subset hx) + have hTV : p ∉ tsupport (T V) := fun hx => hp ((T V).tsupport_subset hx) + have hd : gradientAmplitude τ (T V) v p = 0 := by + simp only [gradientAmplitude, coordDeriv, fderiv_of_notMem_tsupport ℝ hTV, + zero_apply, image_eq_zero_of_notMem_tsupport hTV, smul_zero, add_zero] + have hl : leadingDerivative τ V v p = 0 := by + simp only [leadingDerivative, image_eq_zero_of_notMem_tsupport hV, smul_zero] + simp only [seedMeanError, hd, hl, QuadraticMean.zeroPair, zero_dotProduct, Complex.zero_re, + zero_div, sub_self] + +end ClosedSurfaceR4.SmallModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes +variable {n : ℕ} {F : RField 4} {V : Set SmallModes.Base} + +lemma combinedSeedMean_tsupport (P : Fin n → Expression) (δ τ ε : ℝ) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (v w : SmallModes.Base) : + tsupport (combinedSeedMean P δ τ ε G hF h K hKV R q b v w) ⊆ K := by + apply closure_minimal _ K.isCompact.isClosed + intro x hx + by_contra hn + have he : planeCoordinateIsometry x ∉ (modeSupport K : Set SmallModes.Base) := by + rintro ⟨y, hy, hey⟩ + exact hn (planeCoordinateIsometry.injective hey ▸ hy) + have hm : normalizedPerturbedMean δ τ hF h (modeSupport K) hKV R q b v w + (planeCoordinateIsometry x) = 0 := by + dsimp only [normalizedPerturbedMean] + rw [SmallModes.seedMeanError_zero_outside τ (modeSupport K) _ _ _ v w _ he, mul_zero] + let Z := coordinateCorrectedSeed δ τ hF h K hKV R q b + have hZ : x ∉ tsupport Z := fun hz => hn (Z.tsupport_subset hz) + have hp : normalizedPolynomialMean P δ ε G firstPhase Z τ 0 x = 0 := + image_eq_zero_of_notMem_tsupport (fun hz => hZ + (normalizedPolynomialMean_tsupport P δ ε G firstPhase_smooth Z.contDiff τ 0 hz)) + exact hx (by change _ + _ = 0; rw [hm, hp, zero_add]) + +lemma combinedSeedMean_smooth {P : Fin n → Expression} {U : Set Base} {O : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hP : ∀ l, (P l).SmoothCoeffs O) + (δ τ ε : ℝ) {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (lowJet G) U O) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (v w : SmallModes.Base) : + ContDiff ℝ ∞ (combinedSeedMean P δ τ ε G hF h K hKV R q b v w) := + ((normalizedPerturbedMean_smooth δ τ hF h K hKV R q b v w).comp planeCoordinateIsometry.contDiff).add + (normalizedPolynomialMean_smooth hU hO hP hG firstPhase_smooth hGQ K hKU + (coordinateCorrectedSeed δ τ hF h K hKV R q b) δ ε τ 0) + +lemma combined_seed_mean_identity (P : Fin n → Expression) (δ τ ε : ℝ) + (hδ : δ ≠ 0) (hτ : τ ≠ 0) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (v w : SmallModes.Base) + (x : Base) (hx : planeCoordinateIsometry x ∈ V) : + let Z := correctedNormalSeed δ τ hF h (modeSupport K) hKV R q b + let H := coordinateCorrectedSeed δ τ hF h K hKV R q b + QuadraticMean.zeroPair (SmallModes.gradientAmplitude τ Z v (planeCoordinateIsometry x)) + (SmallModes.gradientAmplitude τ Z w (planeCoordinateIsometry x)) + + quadraticMeanCoefficient P ε G firstPhase H τ 0 x = + δ ^ 2 * (b (planeCoordinateIsometry x) ^ 2 * v.1 * w.1 + + combinedSeedMean P δ τ ε G hF h K hKV R q b v w x) := by + dsimp only + rw [show correctedNormalSeed δ τ hF h (modeSupport K) hKV R q b = + SmallModes.perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) (modeSupport K) hKV R q + (supportedFreeSeed δ τ hF h (modeSupport K) hKV b) from rfl, + perturbed_seed_mean_identity δ τ hδ hτ hF h (modeSupport K) hKV R q b v w _ hx] + dsimp only [combinedSeedMean, normalizedPolynomialMean] + field_simp [hδ] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanMajorants.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanMajorants.lean new file mode 100644 index 0000000000000000000000000000000000000000..d4dc754b3790b849d66a09c1a847de1e89ea65d6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanMajorants.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ExtendedCombinedMean +import OAI.Geometry.SurfaceImmersion.Correction.FixedMeanSubstitution + +namespace OAI + +/-! Scale-independent majorants for the actual extended combined mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +open JetPolynomial (SupportedField supportedWeightedSeminorm) +open JetPolynomial.Perturbation (modeSupport) + +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +theorem extendedCombinedMean_majorants (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 : (modeSupport K : Set Base) ⊆ V) + {S : Set Base} (hS : IsClosed S) (hSU : S ⊆ U) + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + {P : Fin 3 → Fin n → JetPolynomial.Expression} {J : Set JetPolynomial.Base} + {O Q₀ : Set JetPolynomial.LowJet} (hJ : IsOpen J) (hO : IsOpen O) + (hQ₀ : IsCompact Q₀) (hQO : Q₀ ⊆ O) (hP : ∀ i l, (P i l).SmoothCoeffs O) + (hKJ : (K : Set JetPolynomial.Base) ⊆ J) + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (JetPolynomial.lowJet G) J Q₀) + {L : ℕ} (D B₀ : ℕ → ℝ) (hD : ∀ m, 0 ≤ D m) (hB₀ : ∀ m, 1 ≤ B₀ m) + (hGb : ∀ m, WeightedBound J s (m + JetPolynomial.Perturbation.tensorOrder P) (B₀ m) (JetPolynomial.lowJet G)) + (q : ℕ) : + ∃ β κ : ℕ → ℝ → ℝ, ∀ (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + JetPolynomial.Perturbation.tensorLoss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + ∀ (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ (m + L) Z) → + MeanBounds Set.univ s reference r (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1)) + (rescaledMean (τ / s + ε / τ ^ p) (extendedCombinedMean h hρ hKV P G δ τ ε R q)) β κ := by + have hex (m : ℕ) (C : ℝ) := localCombinedMean_estimates (L := L) h d hs hs1 hρ hKV + hJ hO hQ₀ hQO hP hKJ hG hGQ D hD q m C (B₀ m) (hB₀ m) (hGb m) + choose β κ hβ hκ he using hex + refine ⟨β, κ, ?_⟩ + intro δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR + have hη : 0 < τ / s + ε / τ ^ p := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + have hsm (A : Base → Tensor) := extendedCombinedMean_smooth h hρ hKV hS hSU hsp hJ hO hP hG + (fun _ hx => hQO (hGQ hx)) hKJ δ τ ε R q A + have hball {A : Base → Tensor} (ha : InTrialBall Set.univ reference r A) : + InTrialBall U reference r A := fun x _ => ha x (Set.mem_univ x) + apply rescaledMean_bounds isOpen_univ.uniqueDiffOn hη _ β κ + (fun m C _ => hβ m C) (fun m C _ => hκ m C) + · intro A _ _ + exact (hsm A).contDiffOn + · intro m C A hC hA hAball hbA + have hz : WeightedBound U s (m + (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1))) 0 + (A - A) := by + apply (weightedBound_zero U s _ (F := Tensor)).congr + intro x _ + exact sub_self (A x) + have hh := (he m C δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR A A 0 (zero_le_one.trans hC) + le_rfl (hA.mono (Set.subset_univ U)) (hA.mono (Set.subset_univ U)) (hball hAball) (hball hAball) + (hbA.restrict_open h.openU) (hbA.restrict_open h.openU) hz).1 + exact extendedCombinedMean_value h hρ hKV hS hSU hsp P G δ τ ε R q A + (mul_nonneg hη.le (zero_le_one.trans (hβ m C))) hh + · intro m C a A B hC ha hA hB hAball hBball hbA hbB hab + have hh := (he m C δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR A B a (zero_le_one.trans hC) + ha (hA.mono (Set.subset_univ U)) (hB.mono (Set.subset_univ U)) (hball hAball) (hball hBball) + (hbA.restrict_open h.openU) (hbB.restrict_open h.openU) (hab.restrict_open h.openU)).2 + exact extendedCombinedMean_difference h hρ hKV hS hSU hsp P G δ τ ε R q A B + (mul_nonneg (mul_nonneg (zero_le_one.trans (hκ m C)) hη.le) ha) hh + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..869bd26dcbcbd540c3d00e71baa4d1e607fc4ebf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedMeanTensor.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanGeometry +import OAI.Geometry.SurfaceImmersion.Correction.CombinedRootMean +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! The three actual components of the combined zero-phase mean, with one +finite loss and scale-independent square-root trial estimates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes +open PhaseMean (firstDirection secondDirection firstDirection_norm secondDirection_norm) +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +def combinedMeanTensor (P : Fin 3 → Fin n → Expression) (δ τ ε : ℝ) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (x : Base) : Fin 3 → ℝ := + fun i => combinedSeedMean (P i) δ τ ε G hF h K hKV R q b (firstDirection i) (secondDirection i) x + +theorem combinedRootTensor_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin 3 → Fin n → Expression) (hP : ∀ i l, (P i l).SmoothCoeffs O) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) {r R₀ C P₀ N : ℝ} (hr : 0 < r) (hC : 1 ≤ C) (hP₀ : 0 ≤ P₀) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (_hG : ContDiff ℝ ∞ G) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + tensorLoss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + tensorOrder P) B₀ (lowJet G) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (ψ : SupportedField (F := ℝ) (modeSupport K)) + (u v : SmallModes.Base → ℝ) (hu : ContDiffOn ℝ ∞ u V) (hv : ContDiffOn ℝ ∞ v V) + (hru : Set.MapsTo u V (Set.Icc r R₀)) (hrv : Set.MapsTo v V (Set.Icc r R₀)) + (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) ψ ≤ P₀ → + WeightedBound V s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) C u → + WeightedBound V s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) C v → + WeightedBound V s (m + tensorOrder P + 1 + (q + 1) * (L + 1)) d (fun x => u x - v x) → + let b := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let c := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (combinedMeanTensor P δ τ ε G hF h K hKV R q b) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => combinedMeanTensor P δ τ ε G hF h K hKV R q b x - + combinedMeanTensor P δ τ ε G hF h K hKV R q c x) := by + classical + have hex (i : Fin 3) := combinedRootMean_bounds (L := L) hU hO hQ hQO (P i) (hP i) m B₀ hB₀ + hF h K hKU hKV B D hB hD q (R₀ := R₀) hr hC hP₀ hN + choose E hE he using hex + refine ⟨∑ i, E i, Finset.sum_nonneg (fun i _ => hE i), ?_⟩ + intro G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hc R hR hbN + ψ u v hu hv hru hrv d hd hψ hbu hbv hdu + let b := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let c := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + have ho (i : Fin 3) : order (P i) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ i) + have hl (i : Fin 3) : loss (P i) ≤ tensorLoss P := + Finset.le_sup (f := fun j => loss (P j)) (Finset.mem_univ i) + have hi (i : Fin 3) : m + order (P i) + 1 + (q + 1) * (L + 1) ≤ + m + tensorOrder P + 1 + (q + 1) * (L + 1) := by have := ho i; omega + have hb (i : Fin 3) := he i G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 ((hl i).trans hp) + hsmall hGQ (hGb.mono_order (Nat.add_le_add_left (ho i) m)) hc R hR + (hbN.mono_order (hi i)) ψ u v hu hv hru hrv d hd + ((supportedWeightedSeminorm_mono s (hi i) ψ).trans hψ) + (hbu.mono_order (hi i)) (hbv.mono_order (hi i)) (hdu.mono_order (hi i)) + (firstDirection i) (secondDirection i) (firstDirection_norm i) (secondDirection_norm i) + have hEsum : 0 ≤ ∑ i, E i := Finset.sum_nonneg (fun i _ => hE i) + have hsum (i : Fin 3) : E i ≤ ∑ j, E j := + Finset.single_le_sum (fun j _ => hE j) (Finset.mem_univ i) + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hsm (a : SupportedField (F := ℝ) (modeSupport K)) (i : Fin 3) : + ContDiff ℝ ∞ (combinedSeedMean (P i) δ τ ε G hF h K hKV R q a (firstDirection i) (secondDirection i)) := + combinedSeedMean_smooth hU hO (hP i) δ τ ε hG (fun _ hx => hQO (hGQ hx)) + hF h K hKU hKV R q a (firstDirection i) (secondDirection i) + dsimp only + constructor + · apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + · intro i + exact (hsm b i).contDiffOn + · intro i + exact (hb i).1.mono_const (mul_le_mul_of_nonneg_left (hsum i) hη) + · apply WeightedBound.pi isOpen_univ.uniqueDiffOn hs (by positivity) + · intro i + exact ((hsm b i).sub (hsm c i)).contDiffOn + · intro i + apply (hb i).2.mono_const + gcongr + exact hsum i + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedRootMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedRootMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fdf22914bd8765fed5edba3b5cceba4f22388dc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedRootMean.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedSeedMean +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedRootAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.UniformNormalizedMean +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialSupport + +namespace OAI + +/-! Combine the actual metric and polynomial zero-phase errors with a common +finite input order and scale-independent constants. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +theorem combinedRootMean_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) {r R₀ C P₀ N : ℝ} (hr : 0 < r) (hC : 1 ≤ C) (hP₀ : 0 ≤ P₀) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (_hG : ContDiff ℝ ∞ G) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + loss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B₀ (lowJet G) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + order P + 1 + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (ψ : SupportedField (F := ℝ) (modeSupport K)) + (u v : SmallModes.Base → ℝ) (hu : ContDiffOn ℝ ∞ u V) (hv : ContDiffOn ℝ ∞ v V) + (hru : Set.MapsTo u V (Set.Icc r R₀)) (hrv : Set.MapsTo v V (Set.Icc r R₀)) + (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + order P + 1 + (q + 1) * (L + 1)) ψ ≤ P₀ → + WeightedBound V s (m + order P + 1 + (q + 1) * (L + 1)) C u → + WeightedBound V s (m + order P + 1 + (q + 1) * (L + 1)) C v → + WeightedBound V s (m + order P + 1 + (q + 1) * (L + 1)) d (fun x => u x - v x) → + let b := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let c := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + ∀ v w : SmallModes.Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (combinedSeedMean P δ τ ε G hF h K hKV R q b v w) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => combinedSeedMean P δ τ ε G hF h K hKV R q b v w x - + combinedSeedMean P δ τ ε G hF h K hKV R q c v w x) := by + obtain ⟨A, hA, ha⟩ := supportedRootAmplitude_bounds h.isOpen (modeSupport K) hKV + (R := R₀) hr hC hP₀ (m + order P + 1 + (q + 1) * (L + 1)) + obtain ⟨E, hE, he⟩ := combinedSeedMean_bounds hU hO hQ hQO P hP m B₀ hB₀ + hF h K hKU hKV B D hB hD q A N (zero_le_one.trans hA) hN + refine ⟨E, hE, ?_⟩ + intro G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hc R hR hbN + ψ u v hu hv hru hrv d hd hψ hbu hbv hdu + obtain ⟨hbu', hbv', hdu'⟩ := ha s ψ u v hu hv hru hrv d hs hd hψ hbu hbv hdu + dsimp only + exact he G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hc R hR hbN + _ _ d hd hbu' hbv' hdu' + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedSeedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedSeedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..cf951a65a45a8f9307e3392e0417f9bc46d974f5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedSeedMean.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectedPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.UniformNormalizedMean +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialSupport + +namespace OAI + +/-! Combine the actual metric and polynomial zero-phase errors with a common +finite input order and scale-independent constants. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +def combinedSeedMean (P : Fin n → Expression) (δ τ ε : ℝ) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (v w : SmallModes.Base) (x : Base) : ℝ := + normalizedPerturbedMean δ τ hF h (modeSupport K) hKV R q b v w (planeCoordinateIsometry x) + + normalizedPolynomialMean P δ ε G firstPhase (coordinateCorrectedSeed δ τ hF h K hKV R q b) τ 0 x + +lemma normalizedPerturbedMean_smooth (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (v w : SmallModes.Base) : + ContDiff ℝ ∞ (normalizedPerturbedMean δ τ hF h (modeSupport K) hKV R q b v w) := + (SmallModes.seedMeanError_smooth τ + (SmallModes.perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) (modeSupport K) hKV R q) + (supportedFreeSeed δ τ hF h (modeSupport K) hKV b) + (supportedFreeSeed δ τ hF h (modeSupport K) hKV b) v w).const_smul (δ⁻¹ ^ 2) + +theorem combinedSeedMean_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B₀ : ℝ) (hB₀ : 1 ≤ B₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (_hG : ContDiff ℝ ∞ G) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + loss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B₀ (lowJet G) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + order P + 1 + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (b c : SupportedField (F := ℝ) (modeSupport K)) (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + order P + 1 + (q + 1) * (L + 1)) b ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + order P + 1 + (q + 1) * (L + 1)) c ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + order P + 1 + (q + 1) * (L + 1)) (b - c) ≤ A * d → + ∀ v w : SmallModes.Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (combinedSeedMean P δ τ ε G hF h K hKV R q b v w) ∧ + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => combinedSeedMean P δ τ ε G hF h K hKV R q b v w x - + combinedSeedMean P δ τ ε G hF h K hKV R q c v w x) := by + obtain ⟨Ep, hEp, hpoly⟩ := correctedPolynomialMean_bounds hU hO hQ hQO P hP m B₀ 1 hB₀ zero_le_one + hF h K hKV B D hB hD q A N hA hN + let M := normalizedMeanBudget L B D q m N + have hM : 0 ≤ M := normalizedMeanBudget_nonneg L B D hB q m N + refine ⟨M * A ^ 2 + Ep, add_nonneg (mul_nonneg hM (sq_nonneg A)) hEp, ?_⟩ + intro G hG s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hc R hR hbN b c d hd hb hcb hbc v w hv hw + have hmOrder : m + 1 + (q + 1) * (L + 1) ≤ m + order P + 1 + (q + 1) * (L + 1) := by omega + have hpOrder : m + order P + (q + 1) * (L + 1) ≤ m + order P + 1 + (q + 1) * (L + 1) := by omega + have hbm := (supportedWeightedSeminorm_mono s hmOrder b).trans hb + have hcm := (supportedWeightedSeminorm_mono s hmOrder c).trans hcb + have hdm := (supportedWeightedSeminorm_mono s hmOrder (b - c)).trans hbc + have hnm := hbN.mono_order hmOrder + have hmv := normalizedMeanBudget_bound δ τ hF h (modeSupport K) hKV hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA hN hnm b hbm v w hv hw + have hmd := normalizedMeanBudget_difference δ τ hF h (modeSupport K) hKV hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA hN hnm b c (A * d) (mul_nonneg hA hd) hbm hcm hdm v w hv hw + have hsmb := normalizedPerturbedMean_smooth δ τ hF h K hKV R q b v w + have hsmc := normalizedPerturbedMean_smooth δ τ hF h K hKV R q c v w + have hmvc := weightedBound_comp_isometry planeCoordinateIsometry hsmb hmv + have hmdc := weightedBound_comp_isometry planeCoordinateIsometry (hsmb.sub hsmc) hmd + have hh := hpoly G firstPhase hG firstPhase_smooth s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall + hGQ hGb (firstPhase_derivative_bound U s (m + order P)) hc R hR (hbN.mono_order hpOrder) + b c d hd ((supportedWeightedSeminorm_mono s hpOrder b).trans hb) + ((supportedWeightedSeminorm_mono s hpOrder c).trans hcb) + ((supportedWeightedSeminorm_mono s hpOrder (b - c)).trans hbc) 0 (by simp) + let Zb := coordinateCorrectedSeed δ τ hF h K hKV R q b + let Zc := coordinateCorrectedSeed δ τ hF h K hKV R q c + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hpv := normalizedPolynomialMean_extend hU firstPhase_smooth K hKU Zb δ ε τ 0 + (mul_nonneg hη hEp) hh.1 + have hpd := normalizedPolynomialMean_difference_extend hU firstPhase_smooth K hKU Zb Zc δ ε τ 0 + (by positivity) hh.2 + have hpmb := normalizedPolynomialMean_smooth hU hO hP hG firstPhase_smooth + (fun _ hx => hQO (hGQ hx)) K hKU Zb δ ε τ 0 + have hpmc := normalizedPolynomialMean_smooth hU hO hP hG firstPhase_smooth + (fun _ hx => hQO (hGQ hx)) K hKU Zc δ ε τ 0 + constructor + · have hh := hmvc.add isOpen_univ.uniqueDiffOn hs.le + (hsmb.comp planeCoordinateIsometry.contDiff).contDiffOn hpmb.contDiffOn hpv + change WeightedBound Set.univ s m _ (combinedSeedMean P δ τ ε G hF h K hKV R q b v w) at hh + convert hh using 1 + dsimp only [M] + ring + · have hh := hmdc.add isOpen_univ.uniqueDiffOn hs.le + ((hsmb.sub hsmc).comp planeCoordinateIsometry.contDiff).contDiffOn (hpmb.sub hpmc).contDiffOn hpd + have he := hh.congr (fun x _ => show + combinedSeedMean P δ τ ε G hF h K hKV R q b v w x - + combinedSeedMean P δ τ ε G hF h K hKV R q c v w x = _ by + dsimp only [combinedSeedMean, Function.comp_apply, Pi.sub_apply] + ring) + convert he using 1 + dsimp only [M] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedZeroMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedZeroMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef4003dac76a0352db478f047d688b55c77936f3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CombinedZeroMean.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalCombinedMean +import OAI.Geometry.Immersion.ClosedSurface.FreeAmplitude + +namespace OAI + +/-! Identify the actual local quadratic zero phase with the leading tensor +plus the combined mean correction. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open RealModes WeightedEstimates +open PhaseMean (firstDirection secondDirection) +variable {n : ℕ} {F : RField 4} {V : Set SmallModes.Base} + +def seedQuadraticMeanTensor (P : Fin 3 → Fin n → Expression) (δ τ ε : ℝ) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (x : Base) : Fin 3 → ℝ := + let Z := correctedNormalSeed δ τ hF h (modeSupport K) hKV R q b + let H := coordinateCorrectedSeed δ τ hF h K hKV R q b + fun i => QuadraticMean.zeroPair + (SmallModes.gradientAmplitude τ Z (firstDirection i) (planeCoordinateIsometry x)) + (SmallModes.gradientAmplitude τ Z (secondDirection i) (planeCoordinateIsometry x)) + + quadraticMeanCoefficient (P i) ε G firstPhase H τ 0 x + +lemma seedQuadraticMeanTensor_eq (P : Fin 3 → Fin n → Expression) (δ τ ε : ℝ) + (hδ : δ ≠ 0) (hτ : τ ≠ 0) (G : Base → Space) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) (x : Base) + (hx : planeCoordinateIsometry x ∈ V) : + seedQuadraticMeanTensor P δ τ ε G hF h K hKV R q b x = + δ ^ 2 • ((fun i => b (planeCoordinateIsometry x) ^ 2 * (firstDirection i).1 * (secondDirection i).1) + + combinedMeanTensor P δ τ ε G hF h K hKV R q b x) := by + funext i + exact combined_seed_mean_identity (P i) δ τ ε hδ hτ G hF h K hKV R q b + (firstDirection i) (secondDirection i) x hx + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean +open JetPolynomial (SupportedField) +open JetPolynomial.Perturbation (modeSupport seedQuadraticMeanTensor) +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +def localQuadraticMean (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : Base → Tensor := + fun x => pullbackField χ x (seedQuadraticMeanTensor P δ τ ε G h.smoothF h.domain K hKV R q + (supportedTrialAmplitude h hρ hKV A) (JetPolynomial.planeCoordinateIsometry.symm (χ x))) + +lemma localQuadraticMean_eq (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (hδ : δ ≠ 0) (hτ : τ ≠ 0) + (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) {A : Base → Tensor} + (hA : ContDiffOn ℝ ∞ A U) (hball : InTrialBall U reference r A) + {x : Base} (hx : x ∈ U) : + localQuadraticMean h hρ hKV P G δ τ ε R q A x = + δ ^ 2 • (chartLeadingTensor (phaseAmplitude ψ (coefficient Q e A)) χ x + + localCombinedMean h hρ hKV P G δ τ ε R q A x) := by + have hpoint : JetPolynomial.planeCoordinateIsometry (JetPolynomial.planeCoordinateIsometry.symm (χ x)) ∈ V := by + rw [JetPolynomial.planeCoordinateIsometry.apply_symm_apply] + exact h.chiInto hx + dsimp only [localQuadraticMean] + rw [JetPolynomial.Perturbation.seedQuadraticMeanTensor_eq P δ τ ε hδ hτ G h.smoothF h.domain K hKV R q + (supportedTrialAmplitude h hρ hKV A) _ hpoint, map_smul, map_add] + congr 1 + apply congrArg₂ (· + ·) + · unfold chartLeadingTensor + congr 1 + funext i + rw [JetPolynomial.planeCoordinateIsometry.apply_symm_apply, + supportedTrialAmplitude_apply h hρ hKV hA hball] + · rfl + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactChartedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactChartedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..9b703580b4bbf909b783c921c4bfd4c7090198ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactChartedMeanData.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData + +namespace OAI + +/-! Complete the actual charted mean data from compact geometric data; +the remaining high-jet and phase profiles follow from smoothness. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem compact_charted_mean_data {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {s : ℝ≥0} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} (c : PolynomialSolveData P ε G hG φ K τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Q : SmallModes.Base → Tensor →L[ℝ] ℝ) + (hlocal : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ Q c.e c.e.symm) + (budgets : Budgets c.e.source c.e.target s c.realMap ψ Q c.e c.e.symm) + {K₀ : Set Base} (hK₀ : IsCompact K₀) (hUK : c.U ⊆ K₀) (hs1 : s ≤ 1) + {J : Set LowJet} (hJ : IsCompact J) (hJO : J ⊆ c.O) (hGJ : MapsTo (lowJet G) c.U J) : + ∃ d : ChartedMeanData c r ρ R reference, d.cutoff = ψ ∧ d.form = Q := by + choose B hB hb using fun m => compact_local_weighted_bound c.openU isOpen_univ hK₀ hUK + (subset_univ K₀) (lowJet_smooth hG).contDiffOn (m+tensorOrder P) + have hφ : ContDiff ℝ ∞ (fun x => fun v : Fin 2 => fderiv ℝ φ x (coordinateVector v)) := by + apply contDiff_pi.mpr + intro v + exact (c.smoothPhase.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose F hF hf using fun m => compact_local_weighted_bound c.openU isOpen_univ hK₀ hUK + (subset_univ K₀) hφ.contDiffOn (m+tensorOrder P) + refine ⟨{ + cutoff := ψ + form := Q + localBounds := hlocal + budgets := budgets + compactJets := J + compact := hJ + subsetDomain := hJO + mapsJets := hGJ + B := B + F := F + oneLEB := hB + nonnegF := fun m => zero_le_one.trans (hF m) + jetsBound := fun m => hb m s s.coe_nonneg hs1 + phaseBound := ?_ + },rfl,rfl⟩ + intro m v + exact (hf m s s.coe_nonneg hs1).component c.openU.uniqueDiffOn s.coe_nonneg + (zero_le_one.trans (hF m)) hφ.contDiffOn v + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactGeometryPolynomialIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactGeometryPolynomialIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..5a53c33fbc61c3e19b38fb9f9666ef331de58788 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactGeometryPolynomialIncrement.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialSmallIncrement +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasOuterDomains +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPhaseMeanDomains + +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 compactPolynomialSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance compactPolynomialSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance compactPolynomialSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance compactPolynomialSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance compactPolynomialSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance compactPolynomialSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Compact good phase geometry yields the actual small increment; no +mean data or linear solver is an input. -/ +theorem compact_geometry_polynomial_increment + {n : A.centers → ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hpos : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + 0 < (Q i).Q j (A.tensorPlaneRead i reference x)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + : ∃ loss : ℕ, ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → + (∀ m, 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → τ/s+ε/τ^loss ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, A.TensorWeightedBound τ m (T m*(δ*(τ/s+ε/τ^loss)^(q+1)+δ^3/τ)) + (A.atlasPolynomialMetric Pol ε (G+X)-A.atlasPolynomialMetric Pol ε G-δ^2 • H)) := by + obtain ⟨Ql,hQl,hquad,hlin⟩ := A.full_linearized_representatives Pol hPol + obtain ⟨Ωp,KΩp,hΩp,hΩpK,hweight,houter⟩ := A.exists_outer_domains + refine ⟨max (Finset.univ.sup (fun i : A.centers => tensorLoss (Ql i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i))),?_⟩ + intro P hP hPF q + obtain ⟨d⟩ := A.exists_phaseMeanDomains F hF Q hImm hgood + (fun i => A.tensorPlaneRead i reference) + (fun i => (A.tensorPlaneRead_smooth i href).continuous) hpos + apply A.uniform_polynomial_atlas_small_increment Pol hPol Ql hQl hquad hlin F hF Q w hw d.Ω d.U d.K + d.openΩ d.openU d.compactK d.UK d.KΩ d.immersion d.good d.support + d.U₀ d.openU₀ d.K₀ d.U₀K₀ d.supportU₀ d.r_pos d.ρ_pos reference href d.margin + ?_ hgoodQ Ωp hΩp KΩp hΩpK hweight houter P hP hPF q + intro k l x hx + apply hImm k x + exact Set.image_mono (A.quadraticOverlapCompact_subset + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) hx + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactMeanBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactMeanBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d650531b95edba6ca4dc663395855c5ec89abd3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactMeanBudgets.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactModeCoefficients +import OAI.Geometry.Immersion.ClosedSurface.LocalMean + +namespace OAI + +/-! Construction of all numerical mean budgets from compact geometric +margins. The same numerical profiles work at every smaller slow scale. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates + +lemma reconstruction_shrink_scale {G : Field 4} {U : Set SmallModes.Base} + {s t C : ℝ} {m : ℕ} (h : ReconstructionCoefficientBound G U s m C) + (ht : 0 ≤ t) (hts : t ≤ s) : ReconstructionCoefficientBound G U t m C := + ⟨⟨⟨h.xxX.shrink_scale ht hts,h.xxY.shrink_scale ht hts, + h.xyX.shrink_scale ht hts,h.xyY.shrink_scale ht hts, + h.yyX.shrink_scale ht hts,h.yyY.shrink_scale ht hts, + h.ratioxx.shrink_scale ht hts,h.ratioxy.shrink_scale ht hts⟩, + h.secondxx.shrink_scale ht hts,h.secondxy.shrink_scale ht hts⟩, + h.dualx.shrink_scale ht hts,h.dualy.shrink_scale ht hts,h.dualn.shrink_scale ht hts⟩ + +def Budgets.atScale {U V : Set SmallModes.Base} {F : RField 4} + {ψ : SmallModes.Base → ℝ} {Q : SmallModes.Base → Tensor →L[ℝ] ℝ} + {χ e : SmallModes.Base → SmallModes.Base} + (d : Budgets U V 1 F ψ Q χ e) (s : ℝ) (hs : 0 ≤ s) (hs1 : s ≤ 1) : + Budgets U V s F ψ Q χ e where + inv := d.inv + chi := d.chi + psi := d.psi + forms := d.forms + pull := d.pull + normal := d.normal + mode := d.mode + inv_pos := d.inv_pos + chi_pos := d.chi_pos + psi_pos := d.psi_pos + forms_pos := d.forms_pos + pull_pos := d.pull_pos + normal_pos := d.normal_pos + mode_pos := d.mode_pos + inv_bound := d.inv_bound + chi_bound := d.chi_bound + psi_bound := fun m => (d.psi_bound m).shrink_scale hs hs1 + forms_bound := fun m => (d.forms_bound m).shrink_scale hs hs1 + pull_bound := fun m => (d.pull_bound m).shrink_scale hs hs1 + normal_bound := fun m => (d.normal_bound m).shrink_scale hs hs1 + mode_bound := fun m => reconstruction_shrink_scale (d.mode_bound m) hs hs1 + +theorem compact_mean_budgets {U V ΩU ΩV KU KV : Set SmallModes.Base} + (hU : IsOpen U) (hV : IsOpen V) (hΩU : IsOpen ΩU) + (hKU : IsCompact KU) (hKV : IsCompact KV) + (hUK : U ⊆ KU) (hVK : V ⊆ KV) (hKUΩ : KU ⊆ ΩU) (hKVΩ : KV ⊆ ΩV) + {F : RField 4} (hF : ContDiff ℝ ∞ F) (hdom : RealModeDomain F ΩV) + {ψ : SmallModes.Base → ℝ} {Q : SmallModes.Base → Tensor →L[ℝ] ℝ} + {χ e : SmallModes.Base → SmallModes.Base} + (hψ : ContDiffOn ℝ ∞ ψ ΩV) (hQ : ContDiffOn ℝ ∞ Q ΩV) + (hχ : ContDiffOn ℝ ∞ χ ΩU) (he : ContDiffOn ℝ ∞ e ΩV) + (hpull : ContDiffOn ℝ ∞ (pullbackField χ) ΩU) : + Nonempty (Budgets U V 1 F ψ Q χ e) := by + choose I hI hbI using fun m => compact_local_weighted_bound hV hdom.isOpen hKV hVK hKVΩ he m + choose J hJ hbJ using fun m => compact_local_weighted_bound hU hΩU hKU hUK hKUΩ hχ m + choose P hP hbP using fun m => compact_local_weighted_bound hV hdom.isOpen hKV hVK hKVΩ hψ m + choose Qb hQb hbQ using fun m => compact_local_weighted_bound hV hdom.isOpen hKV hVK hKVΩ hQ m + choose T hT hbT using fun m => compact_local_weighted_bound hU hΩU hKU hUK hKUΩ hpull m + choose N hN hbN using fun m => compact_local_weighted_bound hV hdom.isOpen hKV hVK hKVΩ + (contDiffOn_freeNormal hF hdom) m + choose C hC hbC using fun m => (hdom.complexDomain hF).compact_reconstruction_bounds hV hKV hVK hKVΩ m + refine ⟨{ + inv := I + chi := J + psi := P + forms := Qb + pull := T + normal := N + mode := C + inv_pos := hI + chi_pos := hJ + psi_pos := hP + forms_pos := hQb + pull_pos := hT + normal_pos := hN + mode_pos := hC + inv_bound := ?_ + chi_bound := ?_ + psi_bound := ?_ + forms_bound := ?_ + pull_bound := ?_ + normal_bound := ?_ + mode_bound := ?_ + }⟩ + · intro m j _ hj x hx + simpa only [one_pow, one_mul] using hbI m 1 zero_le_one le_rfl j hj x hx + · intro m j _ hj x hx + simpa only [one_pow, one_mul] using hbJ m 1 zero_le_one le_rfl j hj x hx + · exact fun m => hbP m 1 zero_le_one le_rfl + · exact fun m => hbQ m 1 zero_le_one le_rfl + · exact fun m => hbT m 1 zero_le_one le_rfl + · exact fun m => hbN m 1 zero_le_one le_rfl + · exact fun m => hbC m 1 zero_lt_one le_rfl + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactModeCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactModeCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..ad9075074c34b65dfddcfbc9c2bb414275e72a49 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactModeCoefficients.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds +import OAI.Geometry.Immersion.ClosedSurface.ModeBounds + +namespace OAI + +/-! Actual reconstruction coefficients have finite bounds on compactly +contained good-mode domains, uniformly over slow scales at most one. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SmallModes +open WeightedEstimates + +theorem ModeDomain.compact_reconstruction_bounds {G : Field 4} {Ω V K : Set Base} + (h : ModeDomain G Ω) (hV : IsOpen V) (hK : IsCompact K) + (hVK : V ⊆ K) (hKΩ : K ⊆ Ω) (m : ℕ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → + ReconstructionCoefficientBound G V s m C := by + let S : Base → Fin 8 → ℂ := fun x => + ![ClosedSurfaceR4.SmallModes.connectionX G dx dx x, ClosedSurfaceR4.SmallModes.connectionY G dx dx x, + ClosedSurfaceR4.SmallModes.connectionX G dx dy x, ClosedSurfaceR4.SmallModes.connectionY G dx dy x, + ClosedSurfaceR4.SmallModes.connectionX G dy dy x, ClosedSurfaceR4.SmallModes.connectionY G dy dy x, + ClosedSurfaceR4.SmallModes.secondRatio G dx dx x, ClosedSurfaceR4.SmallModes.secondRatio G dx dy x] + let T : Base → Fin 5 → Ambient 4 := fun x => + ![ClosedSurfaceR4.SmallModes.secondForm G dx dx x, ClosedSurfaceR4.SmallModes.secondForm G dx dy x, + ClosedSurfaceR4.SmallModes.tangentDualX G x, ClosedSurfaceR4.SmallModes.tangentDualY G x, ClosedSurfaceR4.SmallModes.normalDual G x] + have hS : ContDiffOn ℝ ∞ S Ω := by + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact h.connectionX dx dx + · exact h.connectionY dx dx + · exact h.connectionX dx dy + · exact h.connectionY dx dy + · exact h.connectionX dy dy + · exact h.connectionY dy dy + · exact h.secondRatio dx dx + · exact h.secondRatio dx dy + have hT : ContDiffOn ℝ ∞ T Ω := by + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact h.secondForm dx dx + · exact h.secondForm dx dy + · exact h.tangentDualX + · exact h.tangentDualY + · exact h.normalDual + obtain ⟨B,hB,hb⟩ := compact_local_weighted_bound hV h.isOpen hK hVK hKΩ hS m + obtain ⟨D,hD,hd⟩ := compact_local_weighted_bound hV h.isOpen hK hVK hKΩ hT m + refine ⟨max B D, hB.trans (le_max_left _ _),?_⟩ + intro s hs hs1 + have hnonneg : 0 ≤ max B D := zero_le_one.trans (hB.trans (le_max_left _ _)) + have hb' := (hb s hs.le hs1).mono_const (le_max_left B D) + have hd' := (hd s hs.le hs1).mono_const (le_max_right B D) + have hscalar (i : Fin 8) := hb'.component hV.uniqueDiffOn hs.le hnonneg + (hS.mono (hVK.trans hKΩ)) i + have hvector (i : Fin 5) := hd'.component hV.uniqueDiffOn hs.le hnonneg + (hT.mono (hVK.trans hKΩ)) i + exact ⟨⟨⟨hscalar 0,hscalar 1,hscalar 2,hscalar 3,hscalar 4,hscalar 5,hscalar 6,hscalar 7⟩, + hvector 0,hvector 1⟩,hvector 2,hvector 3,hvector 4⟩ + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactPolynomialSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactPolynomialSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..89c1f0f1f728ac9bc9a6b13a7afc72a0678c0e1d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactPolynomialSolver.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactModeCoefficients +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveData +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds + +namespace OAI + +/-! Build the actual polynomial phase solver from compact geometric data. +All coefficient profiles precede the amplitude and frequency parameters. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes + +theorem compact_polynomial_solve_data {n : ℕ} {P : Fin 3 → Fin n → Expression} + {U : Set Base} (hU : IsOpen U) {O Q : Set LowJet} (hO : IsOpen O) + (hP : ∀ k l, (P k l).SmoothCoeffs O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hGQ : MapsTo (lowJet G) U Q) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + {KU : Set Base} (hKUc : IsCompact KU) (hUK : U ⊆ KU) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + {ΩE ΩV KE KV : Set SmallModes.Base} (hΩE : IsOpen ΩE) + (hKE : IsCompact KE) (hKV : IsCompact KV) + (hEK : e.source ⊆ KE) (hVK : e.target ⊆ KV) (hKEΩ : KE ⊆ ΩE) (hKVΩ : KV ⊆ ΩV) + (he : ContDiffOn ℝ ∞ e ΩE) (hi : ContDiffOn ℝ ∞ e.symm ΩV) + (hKe : (modeSupport K : Set SmallModes.Base) ⊆ e.source) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm)) + (hdom : RealModeDomain ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) ΩV) : + ∃ C D J : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ (∀ m, 1 ≤ J m) ∧ + ∀ (ε τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → ∃ c : PolynomialSolveData P ε G hG φ K τ s, + c.U = U ∧ c.O = O ∧ c.e = e ∧ c.C = C ∧ c.D = D ∧ c.J = J := by + have hforward := he.mono (hEK.trans hKEΩ) + have hinverse := hi.mono (hVK.trans hKVΩ) + 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))⟩ + choose B hB hb using fun m => compact_local_weighted_bound hU isOpen_univ hKUc hUK + (subset_univ KU) (lowJet_smooth hG).contDiffOn (m+tensorOrder P) + have hφ' : ContDiff ℝ ∞ (fun x => fun v : Fin 2 => fderiv ℝ φ x (coordinateVector v)) := by + apply contDiff_pi.mpr + intro v + exact (hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose F hF hf using fun m => compact_local_weighted_bound hU isOpen_univ hKUc hUK + (subset_univ KU) hφ'.contDiffOn (m+tensorOrder P) + choose J hJ hj using fun m => compact_local_weighted_bound e.open_source hΩE hKE hEK hKEΩ he m + choose I hI hi' using fun m => compact_local_weighted_bound e.open_target hdom.isOpen hKV hVK hKVΩ hi (m+1) + choose C hC hc using fun m => (hdom.complexDomain hmap).compact_reconstruction_bounds + e.open_target hKV hVK hKVΩ (m+1) + have hJb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m) (x : SmallModes.Base) (hx : x ∈ e.source) : + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m := by + simpa only [one_pow, one_mul] using hj m 1 zero_le_one le_rfl j hjm x hx + have hIb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m+1) (x : SmallModes.Base) (hx : x ∈ e.target) : + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I m := by + simpa only [one_pow, one_mul] using hi' m 1 zero_le_one le_rfl j hjm x hx + have hB' (s : ℝ≥0) (hs1 : s ≤ 1) (m : ℕ) := hb m s s.coe_nonneg hs1 + have hF' (s : ℝ≥0) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (m : ℕ) (v : Fin 2) : + WeightedBound U s (m+tensorOrder P) (F m) (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hf m s s.coe_nonneg hs1).component hU.uniqueDiffOn hs.le (zero_le_one.trans (hF m)) + hφ'.contDiffOn v + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds hU hO hQ hQO P hP K hKU e + hforward hinverse hKe B F J I hB (fun m => zero_le_one.trans (hF m)) hJ hI hJb hIb + refine ⟨C,D,J,(fun m => zero_le_one.trans (hC m)),hD,hJ,?_⟩ + intro ε τ s hτ hs hτs hs1 hε hε1 + refine ⟨{ + U := U + O := O + openU := hU + openO := hO + smoothP := hP + mapsG := fun x hx => hQO (hGQ hx) + supportU := hKU + smoothPhase := hφ + e := e + smoothForward := hforward + smoothInverse := hinverse + supportChart := hKe + phase := hphase + smoothMap := hmap + domain := hdomain.complexDomain hmap + C := C + D := D + J := J + nonnegC := fun m => zero_le_one.trans (hC m) + nonnegD := hD + oneLEJ := hJ + coordinates := hJb + coefficients := fun m => hc m s hs hs1 + polynomial := hd G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 (hB' s hs1) (hF' s hs hs1) + },rfl,rfl,rfl,rfl,rfl,rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSmoothCutoffs.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSmoothCutoffs.lean new file mode 100644 index 0000000000000000000000000000000000000000..667e36cf0f8103691c24a8e34bf526d1a06be930 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSmoothCutoffs.lean @@ -0,0 +1,108 @@ +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! Nested compact cutoffs in finite-dimensional parameter spaces. -/ +noncomputable section +open Set Metric Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.CollarVelocity + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [FiniteDimensional ℝ E] + +lemma compact_open_thickening {K U : Set E} (hK : IsCompact K) + (hU : IsOpen U) (hKU : K ⊆ U) : + ∃ V : Set E, IsOpen V ∧ K ⊆ V ∧ IsCompact (closure V) ∧ closure V ⊆ U := by + obtain ⟨r, hr⟩ := hK.isBounded.subset_ball (0 : E) + obtain ⟨V, hV, hKV, hVU⟩ := hK.exists_isOpen_closure_subset + ((hU.inter isOpen_ball).mem_nhdsSet.mpr (subset_inter hKU hr)) + refine ⟨V, hV, hKV, ?_, fun x hx => (hVU hx).1⟩ + exact (isCompact_closedBall (0 : E) r).of_isClosed_subset isClosed_closure + (fun x hx => ball_subset_closedBall (hVU hx).2) + +theorem compact_cutoff {K U : Set E} (hK : IsCompact K) + (hU : IsOpen U) (hKU : K ⊆ U) : + ∃ χ : E → ℝ, ContDiff ℝ ∞ χ ∧ HasCompactSupport χ ∧ + (∀ x, χ x ∈ Icc (0 : ℝ) 1) ∧ tsupport χ ⊆ U ∧ ∀ x ∈ K, χ x = 1 := by + obtain ⟨V, hV, hKV, hVc, hVU⟩ := compact_open_thickening hK hU hKU + obtain ⟨χ, hχ, hχr, hχs, hχone⟩ := + exists_contDiff_support_eq_eq_one_iff (n := (⊤ : ℕ∞)) hV hK.isClosed hKV + have hs : tsupport χ = closure V := by + change closure (Function.support χ) = closure V + rw [hχs] + refine ⟨χ, hχ, ?_, fun x => hχr (mem_range_self x), ?_, ?_⟩ + · change IsCompact (tsupport χ) + rw [hs] + exact hVc + · rw [hs] + exact hVU + · exact fun x hx => (hχone x).mp hx + +/-- The inner cutoff is one on an open collar, and the outer one is one +on the whole closed support of the inner cutoff. -/ +theorem nested_compact_cutoffs {K U : Set E} (hK : IsCompact K) + (hU : IsOpen U) (hKU : K ⊆ U) : + ∃ W : Set E, IsOpen W ∧ K ⊆ W ∧ W ⊆ U ∧ + ∃ φ χ : E → ℝ, ContDiff ℝ ∞ φ ∧ ContDiff ℝ ∞ χ ∧ + HasCompactSupport φ ∧ HasCompactSupport χ ∧ + (∀ x, φ x ∈ Icc (0 : ℝ) 1) ∧ (∀ x, χ x ∈ Icc (0 : ℝ) 1) ∧ + tsupport χ ⊆ U ∧ tsupport φ ⊆ U ∧ + (∀ x ∈ W, φ x = 1) ∧ (∀ x ∈ tsupport φ, χ x = 1) := by + obtain ⟨V, hV, hKV, hVc, hVU⟩ := compact_open_thickening hK hU hKU + obtain ⟨W, hW, hKW, hWc, hWV⟩ := compact_open_thickening hK hV hKV + obtain ⟨φ, hφ, hφc, hφr, hφs, hφone⟩ := compact_cutoff hWc hV hWV + obtain ⟨χ, hχ, hχc, hχr, hχs, hχone⟩ := compact_cutoff hVc hU hVU + refine ⟨W, hW, hKW, ?_, φ, χ, hφ, hχ, hφc, hχc, hφr, hχr, hχs, + hφs.trans (subset_closure.trans hVU), ?_, ?_⟩ + · exact subset_closure.trans (hWV.trans (subset_closure.trans hVU)) + · exact fun x hx => hφone x (subset_closure hx) + · exact fun x hx => hχone x (subset_closure (hφs hx)) + +omit [FiniteDimensional ℝ E] in +lemma supported_local_mul {χ f : E → ℝ} {U : Set E} + (hU : IsOpen U) (hχ : ContDiff ℝ ∞ χ) + (hf : ContDiffOn ℝ ∞ f U) (hs : tsupport χ ⊆ U) : + ContDiff ℝ ∞ (fun x => χ x * f x) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ U + · exact hχ.contDiffAt.mul (hf.contDiffAt (hU.mem_nhds hx)) + · have hn : x ∉ tsupport χ := fun h => hx (hs h) + have hz := notMem_tsupport_iff_eventuallyEq.mp hn + apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [hz] with y hy + exact (congrArg (fun t : ℝ => t * f y) hy).trans (zero_mul _) + +omit [FiniteDimensional ℝ E] in +lemma supported_local_smul {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + {χ : E → ℝ} {f : E → F} {U : Set E} + (hU : IsOpen U) (hχ : ContDiff ℝ ∞ χ) + (hf : ContDiffOn ℝ ∞ f U) (hs : tsupport χ ⊆ U) : + ContDiff ℝ ∞ (fun x => χ x • f x) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ U + · exact hχ.contDiffAt.smul (hf.contDiffAt (hU.mem_nhds hx)) + · have hn : x ∉ tsupport χ := fun h => hx (hs h) + have hz := notMem_tsupport_iff_eventuallyEq.mp hn + apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [hz] with y hy + exact (congrArg (fun t : ℝ => t • f y) hy).trans (zero_smul ℝ _) + +theorem compact_smooth_extension {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + {K U : Set E} (hK : IsCompact K) (hU : IsOpen U) (hKU : K ⊆ U) + {f : E → F} (hf : ContDiffOn ℝ ∞ f U) : + ∃ W : Set E, IsOpen W ∧ K ⊆ W ∧ W ⊆ U ∧ + ∃ g : E → F, ContDiff ℝ ∞ g ∧ EqOn g f W := by + obtain ⟨W, hW, hKW, hWU, φ, χ, hφ, _, _, _, _, _, _, hφs, hφone, _⟩ := + nested_compact_cutoffs hK hU hKU + exact ⟨W, hW, hKW, hWU, fun x => φ x • f x, + supported_local_smul hU hφ hf hφs, fun x hx => by simp only [hφone x hx, one_smul]⟩ + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSurfaceSmoothExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSurfaceSmoothExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..e64eddffe88e981c83e033f9aeae9b47d055cc0f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactSurfaceSmoothExtension.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcParameterExtension + +namespace OAI + +/-! Extend a smooth function from an open surface neighborhood of a +compact set, retaining its actual germ on a smaller neighborhood. -/ +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] [SigmaCompactSpace M] +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem compact_surface_smooth_extension {K U : Set M} (hK : IsCompact K) + (hU : IsOpen U) (hKU : K ⊆ U) {f : M → E} + (hf : ContMDiffOn planeModel 𝓘(ℝ,E) ∞ f U) : + ∃ (g : M → E) (V : Set M), ContMDiff planeModel 𝓘(ℝ,E) ∞ g ∧ + IsOpen V ∧ K ⊆ V ∧ V ⊆ U ∧ EqOn g f V := by + classical + let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace Plane M + obtain ⟨V,hV,hKV,hVU⟩ := hK.exists_isOpen_closure_subset (hU.mem_nhdsSet.mpr hKU) + let C : M → Set E := fun x => if x ∈ closure V then {f x} else univ + have hC : ∀ x, Convex ℝ (C x) := by + intro x + dsimp only [C] + split_ifs + · exact convex_singleton _ + · exact convex_univ + have hloc : ∀ x : M, ∃ W ∈ 𝓝 x, ∃ q : M → E, + ContMDiffOn planeModel 𝓘(ℝ,E) ∞ q W ∧ ∀ y ∈ W, q y ∈ C y := by + intro x + by_cases hx : x ∈ closure V + · refine ⟨U,hU.mem_nhds (hVU hx),f,hf,?_⟩ + intro y hy + dsimp only [C] + split_ifs <;> simp + · refine ⟨(closure V)ᶜ,isClosed_closure.isOpen_compl.mem_nhds hx,fun _ => 0,contMDiffOn_const,?_⟩ + intro y hy + have hy' : y ∉ closure V := hy + simp [C,hy'] + obtain ⟨g,hg⟩ := exists_contMDiffMap_forall_mem_convex_of_local planeModel hC hloc + refine ⟨g,V,g.contMDiff,hV,hKV,subset_closure.trans hVU,?_⟩ + intro x hx + have h := hg x + simpa [C,subset_closure hx] using h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactTransverseCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactTransverseCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..816236b28b4e62fd1d76e906ec9c44527ab3621e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CompactTransverseCorrection.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PrescribedTransverseDerivative +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! Compact transverse correction from local defining functions, with the cutoffs constructed. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.TransverseSmallFunction + +variable {E : Type} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] + +/-- Local defining functions on the support of the desired derivative suffice. -/ +theorem compact_transverse_correction {K O : Set E} {T : E → ℝ} (v : E) + (hK : IsCompact K) (hO : IsOpen O) (hKO : K ⊆ O) (hT : ContDiff ℝ ∞ T) + (hlocal : ∀ p ∈ K ∩ tsupport T, ∃ U : Set E, IsOpen U ∧ p ∈ U ∧ + ∃ f : E → ℝ, ContDiff ℝ ∞ f ∧ (∀ x ∈ K ∩ U, f x = 0) ∧ + ∀ x ∈ U, fderiv ℝ f x v ≠ 0) + {ε : ℝ} (hε : 0 < ε) : + ∃ H : E → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ O ∧ + (∀ x, |H x| < ε) ∧ ∀ x ∈ K, fderiv ℝ H x v = T x := by + classical + let I := {p : E // p ∈ K ∩ tsupport T} + have hl (p : I) := hlocal p.val p.property + choose U hU hpU f hf hzero hden using hl + let W : I → Set E := fun p => (U p ∩ O) ∩ Metric.ball p.val 1 + have hW (p : I) : IsOpen (W p) := ((hU p).inter hO).inter Metric.isOpen_ball + have hpW (p : I) : p.val ∈ W p := + ⟨⟨hpU p, hKO p.property.1⟩, Metric.mem_ball_self zero_lt_one⟩ + have hcover : K ∩ tsupport T ⊆ ⋃ p : I, W p := by + intro x hx + exact mem_iUnion.mpr ⟨⟨x, hx⟩, hpW ⟨x, hx⟩⟩ + have hC : IsCompact (K ∩ tsupport T) := hK.inter_right (isClosed_tsupport T) + obtain ⟨J, hJ⟩ := hC.elim_finite_subcover W hW hcover + have hcJ : K ∩ tsupport T ⊆ ⋃ p : J, W p.val := by + intro x hx + obtain ⟨p, hp, hxp⟩ := mem_iUnion₂.mp (hJ hx) + exact mem_iUnion.mpr ⟨⟨p, hp⟩, hxp⟩ + obtain ⟨χ, hχs⟩ := SmoothPartitionOfUnity.exists_isSubordinate (𝓘(ℝ, E)) + hC.isClosed (fun p : J => W p.val) (fun p => hW p.val) hcJ + have hχ (p : J) : ContDiff ℝ ∞ (χ p) := (χ p).contMDiff.contDiff + have hχc (p : J) : HasCompactSupport (χ p) := by + apply (isCompact_closedBall p.val.val 1).of_isClosed_subset (isClosed_tsupport _) + intro x hx + exact Metric.mem_closedBall.mpr (Metric.mem_ball.mp (hχs p hx).2).le + obtain ⟨H, hH, hHc, hHs, hHb, hHd⟩ := exists_prescribed_transverse_derivative + (f := fun p : J => f p.val) (χ := fun p : J => χ p) (K := K) v + (fun p => hf p.val) hχ hχc hT + (fun p x hx => hden p.val x (hχs p hx).1.1) + (fun p x hx hs => hzero p.val x ⟨hx, (hχs p hs).1.1⟩) + (fun x hx hTx => by + simpa only [finsum_eq_sum_of_fintype] using + χ.sum_eq_one ⟨hx, subset_tsupport T (Function.mem_support.mpr hTx)⟩) hε + refine ⟨H, hH, hHc, ?_, hHb, hHd⟩ + intro x hx + obtain ⟨p, hp⟩ := mem_iUnion.mp (hHs hx) + exact (hχs p hp).1.2 + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ComplexifiedPolynomialOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ComplexifiedPolynomialOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..d696ec7aa43529576e0fb58a82f434176e418539 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ComplexifiedPolynomialOperator.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedPolynomialOperator +import OAI.Geometry.SurfaceImmersion.Geometry.ComplexFirstVariation + +namespace OAI + +/-! Complexification of the actual supported polynomial linearization. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +def realFieldCLM : (Fin 4 → ℂ) →L[ℝ] Space := + ContinuousLinearMap.pi fun a => Complex.reCLM.comp (ContinuousLinearMap.proj a) + +def imagFieldCLM : (Fin 4 → ℂ) →L[ℝ] Space := + ContinuousLinearMap.pi fun a => Complex.imCLM.comp (ContinuousLinearMap.proj a) + +namespace Expression + +def complexVariationLM {O : Set LowJet} {U : Set Base} {G : Base → Space} {e : Expression} + (hO : IsOpen O) (hU : IsOpen U) (he : e.SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (t : ℝ) : + SupportedField (F := Fin 4 → ℂ) K →ₗ[ℝ] SupportedField (F := ℂ) K := + let R := variationLM hO hU he hG hQ K hKU t + (ContDiffMapSupportedIn.postcompLM Complex.ofRealCLM).comp + (R.comp (ContDiffMapSupportedIn.postcompLM realFieldCLM)) + + (ContDiffMapSupportedIn.postcompLM (Complex.I • Complex.ofRealCLM)).comp + (R.comp (ContDiffMapSupportedIn.postcompLM imagFieldCLM)) + +/-- The bundled operator is the same complex first variation whose +conjugated finite-jet estimates were proved above. -/ +lemma complexVariationLM_apply {O : Set LowJet} {U : Set Base} {G : Base → Space} {e : Expression} + (hO : IsOpen O) (hU : IsOpen U) (he : e.SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (t : ℝ) + (H : SupportedField (F := Fin 4 → ℂ) K) (p : Base) : + complexVariationLM hO hU he hG hQ K hKU t H p = + ((ofExpression e).differentiate 0).evalComplex G (complexDirectionData G H) (p, t) := by + change (e.variation G (realField H) (p, t) : ℂ) + + Complex.I * (e.variation G (imagField H) (p, t) : ℂ) = _ + exact (complex_first_variation e G H.contDiff (p, t)).symm + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ConjugatedPolynomialOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ConjugatedPolynomialOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..3cf4e1c89ae0e915cb39b09374f0decfb19403bf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ConjugatedPolynomialOperator.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ComplexifiedPolynomialOperator +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedPhaseOperators +import OAI.Geometry.SurfaceImmersion.Geometry.ConjugatedMultilinearBounds + +namespace OAI + +/-! The oscillatory estimates apply to the actual conjugated polynomial +linearization on supported smooth fields. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +lemma iteratedDirectional_zero {A F : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup F] [NormedSpace ℝ F] (w : List A) : + iteratedDirectional w (fun _ : A => (0 : F)) = fun _ => 0 := by + induction w with + | nil => rfl + | cons v w ih => simp [iteratedDirectional, ih] + +def singlePhase (φ : Base → ℝ) : Fin 3 → Base → ℝ := ![φ, 0, 0] +def singleDirection (H : Base → Fin 4 → ℂ) : DirectionFields := ![H, 0, 0] + +lemma singlePhase_smooth {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) : + ∀ i, ContDiff ℝ ∞ (singlePhase φ i) := by + intro i + fin_cases i + · exact hφ + · exact contDiff_const + · exact contDiff_const + +lemma singleDirection_smooth {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) : + ∀ i, ContDiff ℝ ∞ (singleDirection H i) := by + intro i + fin_cases i + · exact hH + · exact contDiff_const + · exact contDiff_const + +lemma single_oscillatoryData (G : Base → Space) (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) (τ : ℝ) : + oscillatoryData G (singlePhase φ) (singleDirection H) τ = + complexDirectionData G (fun p => phase τ φ p • H p) := by + funext i w a p + fin_cases i + · rfl + · rfl + · change iteratedDirectional (w.map coordinateVector) + (fun q => phase τ (fun _ => 0) q * (0 : ℂ)) p = 0 + simp only [mul_zero, iteratedDirectional_zero] + · change iteratedDirectional (w.map coordinateVector) + (fun q => phase τ (fun _ => 0) q * (0 : ℂ)) p = 0 + simp only [mul_zero, iteratedDirectional_zero] + +namespace Expression + +def conjugatedVariationLM {O : Set LowJet} {U : Set Base} {G : Base → Space} {e : Expression} + (hO : IsOpen O) (hU : IsOpen U) (he : e.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 := ℂ) K := + (inversePhaseLM K hφ τ).comp + ((complexVariationLM hO hU he hG hQ K hKU t).comp (phaseLM K hφ τ)) + +lemma conjugatedVariationLM_apply {O : Set LowJet} {U : Set Base} {G : Base → Space} {e : Expression} + (hO : IsOpen O) (hU : IsOpen U) (he : e.SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {φ : Base → ℝ} + (hφ : ContDiff ℝ ∞ φ) (τ t : ℝ) (H : SupportedField (F := Fin 4 → ℂ) K) (p : Base) : + conjugatedVariationLM hO hU he hG hQ K hKU hφ τ t H p = + conjugatedVariation e G (singlePhase φ) (singleDirection H) τ 0 (p, t) := by + change phase τ (fun q => -φ q) p * + complexVariationLM hO hU he hG hQ K hKU t (phaseLM K hφ τ H) p = _ + rw [complexVariationLM_apply, phase_neg_inv] + change (phase τ φ p)⁻¹ * ((ofExpression e).differentiate 0).evalComplex G + (complexDirectionData G (fun q => phase τ φ q • H q)) (p, t) = _ + rw [← single_oscillatoryData] + simp only [conjugatedVariation, phaseProduct, singlePhase, Matrix.cons_val_zero] + simp only [show ¬ (1 : Fin 3) ≤ 0 by decide, show ¬ (2 : Fin 3) ≤ 0 by decide, + ↓reduceIte, mul_one] + rfl + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..8711dbd075f9aeacd903cbaf83af497e78e282f9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedCalculus.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedSupport +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticInteraction + +namespace OAI + +/-! Finite additivity and smoothness of the actual full linearized operator. +Coefficient smoothness is required only near the support of the variation. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma coordinateFullLinearized_zero {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) : + coordinateFullLinearized P ε G 0 = 0 := by + funext p + exact coordinateFullLinearized_zero_of_notMem P ε G (by simp) + +lemma coordinateFullLinearized_sum {n : ℕ} {ι : Type*} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (a : Finset ι) (X : ι → RealModes.RField 4) (hX : ∀ i, ContDiff ℝ ∞ (X i)) : + coordinateFullLinearized P ε G (fun p => ∑ i ∈ a, X i p) = + fun p => ∑ i ∈ a, coordinateFullLinearized P ε G (X i) p := by + classical + induction a using Finset.induction_on with + | empty => + simp only [Finset.sum_empty] + change coordinateFullLinearized P ε G 0 = 0 + exact coordinateFullLinearized_zero P ε G + | @insert i a hi ih => + have hs : ContDiff ℝ ∞ (fun p => ∑ j ∈ a, X j p) := ContDiff.sum fun j _ => hX j + simp only [Finset.sum_insert hi] + change coordinateFullLinearized P ε G (X i + fun p => ∑ j ∈ a, X j p) = _ + rw [coordinateFullLinearized_add P ε G (hX i) hs, ih] + rfl + +lemma coordinateFullLinearized_smooth {n : ℕ} {O : Set LowJet} {U : Set Base} + (hO : IsOpen O) (hU : IsOpen U) (P : Fin 3 → Fin n → Expression) + (hP : ∀ k l, (P k l).SmoothCoeffs O) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + {X : RealModes.RField 4} (hX : ContDiff ℝ ∞ X) + (hXs : tsupport X ⊆ (modeSupport K : Set SmallModes.Base)) (ε : ℝ) : + ContDiff ℝ ∞ (coordinateFullLinearized P ε G X) := by + let Xs : SupportedField (F := Fin 4 → ℝ) (modeSupport K) := + ContDiffMapSupportedIn.of_support_subset hX (subset_closure.trans hXs) + let Xp := pullSupported planeCoordinateIsometry K Xs + have hp : ContDiff ℝ ∞ (coordinateRealLinearized P ε G X 0) := by + apply contDiff_pi.mpr + intro k + have hs : ContDiff ℝ ∞ (fun x => ∑ l, ε ^ (l.val + 1) * (P k l).variation G Xp (x, 0)) := + ContDiff.sum (s := Finset.univ) (fun l _ => + contDiff_const.mul ((P k l).variation_smooth_global hO hU K.isCompact.isClosed hKU + (hP k l) hG Xp.contDiff hQ Xp.tsupport_subset 0)) + exact hs.comp planeCoordinateIsometry.symm.contDiff + exact (contDiffOn_univ.mp (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (hG.comp planeCoordinateIsometry.symm.contDiff).contDiffOn hX.contDiffOn)).add hp + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..50597920814e6de84e60bbf0f6c1b9c184099dca --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedResidual.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinatePolynomialRealization + +namespace OAI + +/-! Exact realization of the full perturbed linear residual in real fields. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open SmallModes + +/-- The actual metric derivative plus the actual polynomial derivative, +written in the coordinates used by the finite solver. -/ +def coordinateFullLinearized {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X : RealModes.RField 4) : SmallModes.Base → Fin 3 → ℝ := + RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X + + coordinateRealLinearized P ε G X 0 + +lemma coordinateFullLinearized_residual {n : ℕ} {O : Set LowJet} {U : Set Base} + {G : Base → Space} (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) + (τ ε : ℝ) (Z : SupportedField (F := Fin 4 → ℂ) (modeSupport K)) + (f : SupportedField (F := Fin 3 → ℂ) (modeSupport K)) : + let R := coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε + let A := (conjugatedDLM τ (coordinateComplexField_smooth hG) (modeSupport K)).restrictScalars ℝ + R + coordinateFullLinearized P ε G (RealModes.realOsc τ Z) - RealModes.realOsc τ f = + RealModes.realOsc τ (A Z - f) := by + dsimp only + have hF : ContDiff ℝ ∞ (G ∘ planeCoordinateIsometry.symm) := + hG.comp planeCoordinateIsometry.symm.contDiff + have hp := coordinatePolynomialOperator_realization hO hU P hP hG hQ K hKU τ ε Z + funext p + have hm := RealModes.realLinearized_residual (hF.differentiable (by simp) p) + (Z.contDiff.differentiable (by simp) p) τ f + change RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) + (RealModes.realOsc τ Z) p + coordinateRealLinearized P ε G (RealModes.realOsc τ Z) 0 p - + RealModes.realOsc τ f p = _ + rw [hp] + have ha : RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) + (RealModes.realOsc τ Z) p + + RealModes.realOsc τ (coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε Z) p - + RealModes.realOsc τ f p = + (RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) + (RealModes.realOsc τ Z) p - RealModes.realOsc τ f p) + + RealModes.realOsc τ (coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε Z) p := by abel + rw [ha, hm] + funext i + change (unitMode τ p * (conjugatedD τ (coordinateComplexField G) Z p i - f p i)).re + + (unitMode τ p * (coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε Z p i)).re = + (unitMode τ p * (conjugatedD τ (coordinateComplexField G) Z p i + + coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε Z p i - f p i)).re + simp only [mul_add, mul_sub, Complex.add_re, Complex.sub_re] + ring + + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..ac936c476ad5aeb7f7c50aee37798d57a403598e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateLinearizedSupport.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartFullLinearization + +namespace OAI + +/-! The full linearized metric perturbation preserves the support of its +varying field, including every higher-jet polynomial term. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma coordinateFullLinearized_zero_of_notMem {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + {X : RealModes.RField 4} {p : SmallModes.Base} (hp : p ∉ tsupport X) : + coordinateFullLinearized P ε G X p = 0 := by + have hx : X =ᶠ[nhds p] (fun _ => 0) := notMem_tsupport_iff_eventuallyEq.mp hp + have hc : (X ∘ planeCoordinateIsometry) =ᶠ[nhds (planeCoordinateIsometry.symm p)] (fun _ => 0) := by + apply hx.comp_tendsto + simpa only [planeCoordinateIsometry.apply_symm_apply] using + (planeCoordinateIsometry.continuous.continuousAt (x := planeCoordinateIsometry.symm p)).tendsto + have hn : planeCoordinateIsometry.symm p ∉ tsupport (X ∘ planeCoordinateIsometry) := + notMem_tsupport_iff_eventuallyEq.mpr hc + have hm : RealModes.realLinearizedTensor (G ∘ planeCoordinateIsometry.symm) X p = 0 := by + rw [RealModes.realLinearizedTensor_congr_right hx, RealModes.realLinearizedTensor_zero_right] + funext k + simp only [coordinateFullLinearized, Pi.add_apply, hm, Pi.zero_apply, zero_add, + coordinateRealLinearized, linearized] + apply Finset.sum_eq_zero + intro l _ + rw [(P k l).variation_zero_of_notMem G hn 0, mul_zero] + +lemma coordinateFullLinearized_tsupport {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) (X : RealModes.RField 4) : + tsupport (coordinateFullLinearized P ε G X) ⊆ tsupport X := by + apply closure_minimal _ (isClosed_tsupport X) + intro p hp + by_contra hn + exact hp (coordinateFullLinearized_zero_of_notMem P ε G hn) + +lemma fullLinearized_residual_tsupport {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + {X : RealModes.RField 4} {f : SmallModes.Tensor} {S : Set SmallModes.Base} + (hS : IsClosed S) (hX : tsupport X ⊆ S) (hf : tsupport f ⊆ S) + (τ : ℝ) (φ : SmallModes.Base → ℝ) : + tsupport (fun p => coordinateFullLinearized P ε G X p + QuadraticMean.displacement τ φ f p) ⊆ S := by + apply closure_minimal _ hS + intro p hp + by_contra hn + apply hp + change coordinateFullLinearized P ε G X p + QuadraticMean.displacement τ φ f p = 0 + rw [coordinateFullLinearized_zero_of_notMem P ε G (fun hx => hn (hX hx)), + RealModes.displacement_zero_value τ φ (image_eq_zero_of_notMem_tsupport (fun hx => hn (hf hx))), + add_zero] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateModelGerm.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateModelGerm.lean new file mode 100644 index 0000000000000000000000000000000000000000..37aba06dff64f5395b1743a520f69909e409cbee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateModelGerm.lean @@ -0,0 +1,33 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateRegularReplacement + +namespace OAI + +/-! Germs of a Euclidean representative pull back to the original map. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {M : Type*} [TopologicalSpace M] +variable {V : Type*} + +theorem coordinate_model_germ (c : OpenPartialHomeomorph M Base) + {f : M → V} {φ : Base → V} {O : Set Base} (hO : IsOpen O) + (hmatch : EqOn φ (f ∘ c.symm) O) {x : M} (hx : x ∈ c.source) + (hcx : c x ∈ O) : φ ∘ c =ᶠ[𝓝 x] f := by + filter_upwards [c.open_source.mem_nhds hx, + (c.continuousAt hx).preimage_mem_nhds (hO.mem_nhds hcx)] with y hy hyO + have he := hmatch hyO + change φ (c y) = f (c.symm (c y)) at he + simpa only [Function.comp_apply,c.left_inv hy] using he + +theorem coordinate_replacement_germ (c : OpenPartialHomeomorph M Base) + {F G : Base → V} {x : M} (hx : x ∈ c.source) + (he : F =ᶠ[𝓝 (c x)] G) : F ∘ c =ᶠ[𝓝 x] G ∘ c := + he.comp_tendsto (c.continuousAt hx).tendsto + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..97f374bbb77042eb49c1e00f583cdf8d2eab338c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialCalculus.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationCalculus +import Mathlib.Analysis.Calculus.Deriv.Prod + +namespace OAI + +/-! Actual derivatives in the map variable of the coordinate polynomial. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma coordinatePolynomialValue_hasDerivAt {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs univ) + (ε t : ℝ) {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (x : Base) : + HasDerivAt (fun s : ℝ => coordinatePolynomialValue P ε (G+s • H) t + (planeCoordinateIsometry x)) + (coordinateRealLinearized P ε G (H ∘ planeCoordinateIsometry.symm) t + (planeCoordinateIsometry x)) 0 := by + have hcomp : (H ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = H := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + apply hasDerivAt_pi.mpr + intro k + have hd := variation_hasDerivAt isOpen_univ (hP k) ε hG hH (x,t) (mem_univ _) + simp only [coordinatePolynomialValue,coordinateRealLinearized,linearized,variation, + eval,hcomp,planeCoordinateIsometry.symm_apply_apply] at hd ⊢ + convert hd using 1 + + +lemma coordinateRealLinearized_hasDerivAt {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs univ) + (ε t : ℝ) {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (x : Base) : + HasDerivAt (fun s : ℝ => coordinateRealLinearized P ε (G+s • H) + (H ∘ planeCoordinateIsometry.symm) t (planeCoordinateIsometry x)) + ((2 : ℝ) • coordinateQuadraticPolynomial P ε G (H ∘ planeCoordinateIsometry.symm) t + (planeCoordinateIsometry x)) 0 := by + have hf : ∀ i : Fin 4, ContDiff ℝ ∞ (![G,H,H,0] i) := by + intro i + fin_cases i + · exact hG + · exact hH + · exact hH + · exact contDiff_const + apply hasDerivAt_pi.mpr + intro k + have hd := HasDerivAt.fun_sum (u := Finset.univ) (fun l _ => + ((P k l).second_variation_hasDerivAt isOpen_univ (hP k l) hf + (x,t) (mem_univ _)).const_mul (ε^(l.val+1))) + change HasDerivAt (fun s : ℝ => ∑ l, ε^(l.val+1) * + (P k l).variation (G+s • H) H (x,t)) + (∑ l, ε^(l.val+1) * ((P k l).variations 1).eval ![G,H,H,0] (x,t)) 0 at hd + have hcomp : (H ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = H := by + funext y + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + have hsecond : ((2 : ℝ) • coordinateQuadraticPolynomial P ε G + (H ∘ planeCoordinateIsometry.symm) t (planeCoordinateIsometry x)) k = + ∑ l, ε^(l.val+1) * ((P k l).variations 1).eval ![G,H,H,0] (x,t) := by + simp only [coordinateQuadraticPolynomial,hcomp, + planeCoordinateIsometry.symm_apply_apply,Pi.smul_apply,smul_eq_mul,Finset.mul_sum] + apply Finset.sum_congr rfl + intro l _ + ring + rw [hsecond] + simpa only [coordinateRealLinearized,linearized,hcomp, + planeCoordinateIsometry.symm_apply_apply] using hd + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialPullback.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialPullback.lean new file mode 100644 index 0000000000000000000000000000000000000000..dba8452ec94da119f022621b65d6f4de659fdfc8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialPullback.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetPullbackExpressions +import OAI.Geometry.SurfaceImmersion.Atlas.LowJetCoordinateChange + +namespace OAI + +/-! The coordinate pullback of a finite jet polynomial, with the low-jet +substitution and inverse differential proved from the actual local inverse. +No compatibility of the polynomial values is assumed. -/ +noncomputable section +open Set +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.JetPolynomial + +def coordinateLowJetSubstitution (T S : Base → Base) (J : LowJet) : LowJet := + lowJetCoordinateChange S (T (lowPosition J),J) + +lemma coordinateLowJetSubstitution_smooth {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) : + ContDiff ℝ ∞ (coordinateLowJetSubstitution T S) := + (lowJetCoordinateChange_smooth hS).comp + ((hT.comp lowPosition.contDiff).prodMk contDiff_id) + +lemma inverse_differential_of_local_inverse {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) (x : Base) + (hST : S (T x) = x) (hTS : (T ∘ S) =ᶠ[𝓝 (T x)] id) : + (fderiv ℝ T x).comp (fderiv ℝ S (T x)) = ContinuousLinearMap.id ℝ Base := by + have hd := hTS.fderiv_eq (𝕜 := ℝ) + rw [fderiv_comp (T x) (hT.differentiable (by simp) _) (hS.differentiable (by simp) _), + hST,fderiv_id] at hd + exact hd + +namespace Expression + +/-- Transport through a smooth local inverse, including the coefficient +dependence on all positional order-two jets. -/ +def localCoordinatePullback (e : Expression) (T S : Base → Base) : Expression := + e.coordinatePullback T S (coordinateLowJetSubstitution T S) + +lemma localCoordinatePullback_smooth {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {e : Expression} (he : e.SmoothCoeffs univ) : + (e.localCoordinatePullback T S).SmoothCoeffs univ := + coordinatePullback_smooth hT hS (coordinateLowJetSubstitution_smooth hT hS) he + +lemma localCoordinatePullback_eval {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hrel : ∀ x ∈ U, H x = G (T x)) + (e : Expression) (t : ℝ) {x : Base} (hx : x ∈ U) : + (e.localCoordinatePullback T S).eval H (x,t) = e.eval G (T x,t) := by + apply coordinatePullback_eval hT hS hU + (fun y hy => inverse_differential_of_local_inverse hT hS y (hST y hy) (hTS y hy)) + hG hH hrel _ e t hx + intro y hy + have hgerm : H =ᶠ[𝓝 y] (G ∘ T) := by + filter_upwards [hU.mem_nhds hy] with z hz + exact hrel z hz + exact (lowJetCoordinateChange_local_inverse hH hS y (hST y hy) (hTS y hy) hgerm).symm + +/-- At a boundary of a support it is enough to know the actual map relation +as a germ at the point under consideration. -/ +lemma localCoordinatePullback_eval_germ {T S : Base → Base} + (hT : ContDiff ℝ ∞ T) (hS : ContDiff ℝ ∞ S) + {U : Set Base} (hU : IsOpen U) + (hST : ∀ x ∈ U, S (T x) = x) + (hTS : ∀ x ∈ U, (T ∘ S) =ᶠ[𝓝 (T x)] id) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {x : Base} (hx : x ∈ U) (hrel : H =ᶠ[𝓝 x] (G ∘ T)) + (e : Expression) (t : ℝ) : + (e.localCoordinatePullback T S).eval H (x,t) = e.eval G (T x,t) := by + have hn : {y | H y = G (T y)} ∩ U ∈ 𝓝 x := + Filter.inter_mem hrel (hU.mem_nhds hx) + obtain ⟨V,hVsub,hV,hxV⟩ := mem_nhds_iff.mp hn + exact localCoordinatePullback_eval hT hS hV + (fun y hy => hST y (hVsub hy).2) (fun y hy => hTS y (hVsub hy).2) + hG hH (fun y hy => (hVsub hy).1) e t hxV + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d53b7d525e5c054f31ba4143b0db693730bbcb7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinatePolynomialRealization.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLinearModes +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeResidual + +namespace OAI + +/-! The coordinate operator used in the finite parametrix really is the +linearization of the polynomial perturbation on real oscillatory fields. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open ModulatedJets + +/-- Polynomial first variation in the product coordinates of the metric solver. -/ +def coordinateRealLinearized {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + (G : Base → Space) (X : RealModes.RField 4) (t : ℝ) : SmallModes.Base → Fin 3 → ℝ := + fun p i => linearized (P i) ε G (X ∘ planeCoordinateIsometry) t (planeCoordinateIsometry.symm p) + +lemma coordinatePolynomialOperator_realization {n : ℕ} {O : Set LowJet} {U : Set Base} + {G : Base → Space} (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) + (τ ε : ℝ) (Z : SupportedField (F := Fin 4 → ℂ) (modeSupport K)) : + coordinateRealLinearized P ε G (RealModes.realOsc τ Z) 0 = + RealModes.realOsc τ (coordinatePolynomialOperator hO hU P hP hG hQ K hKU τ ε Z) := by + let H := (supportedCoordinateEquiv planeCoordinateIsometry K).symm Z + have hf : RealModes.realOsc τ Z ∘ planeCoordinateIsometry = + realField (fun x => phase τ firstPhase x • H x) := by + funext x a + rfl + funext p i + change linearized (P i) ε G (RealModes.realOsc τ Z ∘ planeCoordinateIsometry) 0 + (planeCoordinateIsometry.symm p) = + (SmallModes.unitMode τ p * conjugatedLM hO hU (P i) (hP i) hG hQ K hKU + firstPhase_smooth τ ε 0 H (planeCoordinateIsometry.symm p)).re + rw [hf, conjugatedLM_realization hO hU (P i) (hP i) hG hQ K hKU firstPhase_smooth τ ε 0 H] + rfl + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateSurfaceModels.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateSurfaceModels.lean new file mode 100644 index 0000000000000000000000000000000000000000..d59d3b972d7158a0e9af101783452ddbd06c8244 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoordinateSurfaceModels.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SurfaceCurveCoordinates + +namespace OAI + +/-! Smooth representatives and intrinsic transversality in constructed +surface 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] + +theorem coordinate_representative (c : OpenPartialHomeomorph M Base) + (hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + {x : M} (hx : x ∈ c.source) : + ∃ (V : Set Base) (F : Base → ProjectionTarget 3), IsOpen V ∧ c x ∈ V ∧ + V ⊆ c.target ∧ ContDiff ℝ ∞ F ∧ EqOn F (f ∘ c.symm) V := by + have hlocal : ContDiffOn ℝ ∞ (f ∘ c.symm) c.target := (hf.comp_contMDiffOn hci).contDiffOn + obtain ⟨V,hV,hxV,hVT,F,hF,hEq⟩ := CollarVelocity.compact_smooth_extension + (isCompact_singleton (x := c x)) c.open_target (singleton_subset_iff.mpr (c.map_source hx)) hlocal + exact ⟨V,F,hV,hxV (by simp),hVT,hF,hEq⟩ + +omit [ChartedSpace Plane M] in +lemma coordinate_representative_germ (c : OpenPartialHomeomorph M Base) + {f : M → ProjectionTarget 3} {F : Base → ProjectionTarget 3} {x : M} (hx : x ∈ c.source) + {V : Set Base} (hV : IsOpen V) (hxV : c x ∈ V) (hEq : EqOn F (f ∘ c.symm) V) : + f =ᶠ[𝓝 x] F ∘ c := by + filter_upwards [c.open_source.mem_nhds hx,(c.continuousAt hx).preimage_mem_nhds (hV.mem_nhds hxV)] with y hy hyV + have he := hEq hyV + change F (c y) = f (c.symm (c y)) at he + rw [c.left_inv hy] at he + exact he.symm + +lemma coordinate_germ_mfderiv (c : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) {x : M} (hx : x ∈ c.source) + {f : M → ProjectionTarget 3} {F : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (he : f =ᶠ[𝓝 x] F ∘ c) : + mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x = + (fderiv ℝ F (c x)).comp (mfderiv planeModel 𝓘(ℝ,Base) c x) := by + apply ContinuousLinearMap.ext + intro v + rw [he.mfderiv_eq,mfderiv_comp x + (hF.contMDiff.mdifferentiable (by simp) (c x)) + ((hcs.contMDiffAt (c.open_source.mem_nhds hx)).mdifferentiableAt (by simp)),mfderiv_eq_fderiv] + rfl + +theorem coordinate_pair_surjective (c d : OpenPartialHomeomorph M Base) + (hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source) + (hds : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ d d.source) + {x y : M} (hx : x ∈ c.source) (hy : y ∈ d.source) + {f : M → ProjectionTarget 3} {F G : Base → ProjectionTarget 3} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (heF : f =ᶠ[𝓝 x] F ∘ c) (heG : f =ᶠ[𝓝 y] G ∘ d) + (hreg : Function.Surjective (surfacePairDerivative f x y)) : + Function.Surjective (fun z : Base × Base => + fderiv ℝ F (c x) z.1-fderiv ℝ G (d y) z.2) := by + intro w + obtain ⟨⟨u,v⟩,huv⟩ := hreg w + refine ⟨(mfderiv planeModel 𝓘(ℝ,Base) c x u,mfderiv planeModel 𝓘(ℝ,Base) d y v),?_⟩ + simp only [surfacePairDerivative] at huv + rw [coordinate_germ_mfderiv c hcs hx hF heF,coordinate_germ_mfderiv d hds hy hG heG] at huv + exact huv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..67e5ef0082fc1dcfc329b79e7c6ac863a68b6755 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialMean.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CorrectedSeedCoordinates +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialMean + +namespace OAI + +/-! The polynomial quadratic mean for the actual corrected geometric seeds. +All constants are chosen before the oscillation and amplitude scales. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +theorem correctedPolynomialMean_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B₀ F₀ : ℝ) (hB₀ : 1 ≤ B₀) (hF₀ : 0 ≤ F₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) (A N : ℝ) (hA : 0 ≤ A) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (_hG : ContDiff ℝ ∞ G) (_hφ : ContDiff ℝ ∞ φ) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + loss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B₀ (lowJet G) → + (∀ v, WeightedBound U s (m + order P) F₀ (fun x => fderiv ℝ φ x (coordinateVector v))) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + order P + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (b c : SupportedField (F := ℝ) (modeSupport K)) (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + order P + (q + 1) * (L + 1)) b ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + order P + (q + 1) * (L + 1)) c ≤ A → + supportedWeightedSeminorm (modeSupport K) s (m + order P + (q + 1) * (L + 1)) (b - c) ≤ A * d → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + let Zb := coordinateCorrectedSeed δ τ hF h K hKV R q b + let Zc := coordinateCorrectedSeed δ τ hF h K hKV R q c + WeightedBound U s m ((τ / s + ε / τ ^ p) * E) + (normalizedPolynomialMean P δ ε G φ Zb τ t) ∧ + WeightedBound U s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => normalizedPolynomialMean P δ ε G φ Zb τ t x - + normalizedPolynomialMean P δ ε G φ Zc τ t x) := by + obtain ⟨E₀, hE₀, he⟩ := normalizedPolynomialMean_bounds hU hO hQ hQO P hP m B₀ F₀ hB₀ hF₀ + let S := correctedSeedBudget L B D q (m + order P) N + have hS : 0 ≤ S := correctedSeedBudget_nonneg L B D hB q (m + order P) hN + refine ⟨E₀ * (S * A) ^ 2, mul_nonneg hE₀ (sq_nonneg _), ?_⟩ + intro G φ hG hφ s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hφb hc R hR hbN b c d hd hb hcb hbc t ht + let Zb := coordinateCorrectedSeed δ τ hF h K hKV R q b + let Zc := coordinateCorrectedSeed δ τ hF h K hKV R q c + have hzb : supportedWeightedSeminorm K s (m + order P) Zb ≤ S * A * (δ * τ) := + coordinateCorrectedSeed_bound δ τ hF h K hKV hδ.le hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q (m + order P) A N hA hN hbN b hb + have hzc : supportedWeightedSeminorm K s (m + order P) Zc ≤ S * A * (δ * τ) := + coordinateCorrectedSeed_bound δ τ hF h K hKV hδ.le hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q (m + order P) A N hA hN hbN c hcb + have hzd : supportedWeightedSeminorm K s (m + order P) (Zb - Zc) ≤ S * (A * d) * (δ * τ) := by + have hh := coordinateCorrectedSeed_bound δ τ hF h K hKV hδ.le hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q (m + order P) (A * d) N (mul_nonneg hA hd) hN hbN (b - c) hbc + rw [coordinateCorrectedSeed_sub] at hh + exact hh + have hh := he G φ hG hφ K Zb Zc s δ τ ε (S * A) (S * (A * d)) p + hδ hτ hs hτs hs1 hε hε1 (mul_nonneg hS hA) (mul_nonneg hS (mul_nonneg hA hd)) + hp hGQ hGb hφb hzb hzc hzd t ht + dsimp only + constructor + · convert hh.1 using 1 + ring + · convert hh.2 using 1 + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialRootMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialRootMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..8d4d3eff6fcd342c8d07475fe3c78d14b5c761a6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectedPolynomialRootMean.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectedPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialMean +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedRootAmplitude + +namespace OAI + +/-! The polynomial mean on actual cutoff square-root trial amplitudes. +Its constants are uniform before choosing the oscillation scales. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} +variable {F : RField 4} {V : Set SmallModes.Base} + +theorem correctedPolynomialRootMean_bounds + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B₀ F₀ : ℝ) (hB₀ : 1 ≤ B₀) (hF₀ : 0 ≤ F₀) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) {L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q : ℕ) {r R₀ C P₀ N : ℝ} (hr : 0 < r) (hC : 1 ≤ C) (hP₀ : 0 ≤ P₀) (hN : 0 ≤ N) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (_hG : ContDiff ℝ ∞ G) (_hφ : ContDiff ℝ ∞ φ) + (s : ℝ≥0) (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + loss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B₀ (lowJet G) → + (∀ v, WeightedBound U s (m + order P) F₀ (fun x => fderiv ℝ φ x (coordinateVector v))) → + (∀ m, SmallModes.ReconstructionCoefficientBound (fun x => complexify (F x)) V s (m + 1) (B m)) → + ∀ (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) s (m + L) Z) → + WeightedBound V s (m + order P + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (ψ : SupportedField (F := ℝ) (modeSupport K)) + (u v : SmallModes.Base → ℝ) (hu : ContDiffOn ℝ ∞ u V) (hv : ContDiffOn ℝ ∞ v V) + (hru : Set.MapsTo u V (Set.Icc r R₀)) (hrv : Set.MapsTo v V (Set.Icc r R₀)) + (d : ℝ), 0 ≤ d → + supportedWeightedSeminorm (modeSupport K) s (m + order P + (q + 1) * (L + 1)) ψ ≤ P₀ → + WeightedBound V s (m + order P + (q + 1) * (L + 1)) C u → + WeightedBound V s (m + order P + (q + 1) * (L + 1)) C v → + WeightedBound V s (m + order P + (q + 1) * (L + 1)) d (fun x => u x - v x) → + let b := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let c := supportedRootAmplitude h.isOpen (modeSupport K) hKV ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + ∀ t ∈ Set.Icc (0 : ℝ) 1, + let Zb := coordinateCorrectedSeed δ τ hF h K hKV R q b + let Zc := coordinateCorrectedSeed δ τ hF h K hKV R q c + WeightedBound U s m ((τ / s + ε / τ ^ p) * E) + (normalizedPolynomialMean P δ ε G φ Zb τ t) ∧ + WeightedBound U s m ((τ / s + ε / τ ^ p) * (2 * E) * d) + (fun x => normalizedPolynomialMean P δ ε G φ Zb τ t x - + normalizedPolynomialMean P δ ε G φ Zc τ t x) := by + obtain ⟨A, hA, ha⟩ := supportedRootAmplitude_bounds h.isOpen (modeSupport K) hKV + (R := R₀) hr hC hP₀ (m + order P + (q + 1) * (L + 1)) + obtain ⟨E, hE, he⟩ := correctedPolynomialMean_bounds hU hO hQ hQO P hP m B₀ F₀ hB₀ hF₀ + hF h K hKV B D hB hD q A N (zero_le_one.trans hA) hN + refine ⟨E, hE, ?_⟩ + intro G φ hG hφ s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hφb hc R hR hbN ψ u v hu hv hru hrv d hd hψ hbu hbv hdu + obtain ⟨hbu', hbv', hdu'⟩ := ha s ψ u v hu hv hru hrv d hs hd hψ hbu hbv hdu + dsimp only + exact he G φ hG hφ s δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb hφb hc R hR hbN + _ _ d hd hbu' hbv' hdu' + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionBudgetThresholds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionBudgetThresholds.lean new file mode 100644 index 0000000000000000000000000000000000000000..40ff613082c59967a8880427591ac7deb074b12d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionBudgetThresholds.lean @@ -0,0 +1,26 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold + +namespace OAI + +/-! Simultaneous preservation of the finite input and normalized metric budgets. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection + +theorem correction_budget_threshold {A B a N L : ℝ} (hAB : A < B) (ha : 0 < a) : + ∃ ε : ℝ, 0 < ε ∧ ε ≤ 1 ∧ ∀ t : ℝ, 0 < t → t < ε → + A+N*t^(1/5 : ℝ)*(1+B) ≤ B ∧ L*(1+2*B)*t^(1/5 : ℝ) ≤ a/8 := by + obtain ⟨ε₁,hε₁,hε₁1,h₁⟩ := positive_power_threshold (N*(1+B)) (1/5) (B-A) + (by norm_num) (sub_pos.mpr hAB) + obtain ⟨ε₂,hε₂,_,h₂⟩ := positive_power_threshold (L*(1+2*B)) (1/5) (a/8) + (by norm_num) (by positivity) + refine ⟨min ε₁ ε₂,lt_min hε₁ hε₂,(min_le_left _ _).trans hε₁1,?_⟩ + intro t ht htε + have hb := (h₁ t ht (htε.trans_le (min_le_left _ _))).le + have hm := (h₂ t ht (htε.trans_le (min_le_right _ _))).le + exact ⟨by nlinarith,hm⟩ + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionErrorEnvelope.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionErrorEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..1c779a117d0dd386ba1884205bfcb6b73a7e5125 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionErrorEnvelope.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScaleAlgebra + +namespace OAI + +/-! The six normalized errors satisfy the common all-order recurrence bound. -/ +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +/-- A common envelope for the six powers in the exact-correction error table. +The coefficients of both high-derivative terms remain linear. -/ +theorem normalized_error_envelope {t k B C P Q R : ℝ} + (ht : 0 < t) (ht1 : t ≤ 1) (hk : 10 ≤ k) + (hB : 0 ≤ B) (hC : 0 ≤ C) (hP : 0 ≤ P) (hQ : 0 ≤ Q) (hR : 0 ≤ R) : + P * (B * t ^ ((18 * k + 8) / 5) + C * t ^ ((38 * k + 28) / 5)) + + Q * (t ^ ((13 * k + 8) / 5) + t ^ ((3 * k - 18) / 5)) + + R * (B * t ^ ((13 * k + 8) / 5) + C * t ^ ((33 * k + 28) / 5)) ≤ + (P + 2 * Q + R) * (1 + B + C) * t ^ (1 / 5 : ℝ) := by + obtain ⟨h1, h2, h3, h4, _, h6⟩ := error_exponents_ge_common hk + have b1 := Real.rpow_le_rpow_of_exponent_ge ht ht1 h1 + have b2 := Real.rpow_le_rpow_of_exponent_ge ht ht1 h2 + have b3 := Real.rpow_le_rpow_of_exponent_ge ht ht1 h3 + have b4 := Real.rpow_le_rpow_of_exponent_ge ht ht1 h4 + have b6 := Real.rpow_le_rpow_of_exponent_ge ht ht1 h6 + calc + _ ≤ P * (B * t ^ (1 / 5 : ℝ) + C * t ^ (1 / 5 : ℝ)) + + Q * (t ^ (1 / 5 : ℝ) + t ^ (1 / 5 : ℝ)) + + R * (B * t ^ (1 / 5 : ℝ) + C * t ^ (1 / 5 : ℝ)) := by gcongr + _ = (P * (B + C) + 2 * Q + R * (B + C)) * t ^ (1 / 5 : ℝ) := by ring + _ ≤ _ := by + apply mul_le_mul_of_nonneg_right _ (Real.rpow_nonneg ht.le _) + nlinarith [mul_nonneg hQ hB, mul_nonneg hQ hC] + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..e4e3fe7b8d94ad0a62dc6f3c8d8feae73dee6e70 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionGeometry.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricGoodPhaseData + +namespace OAI + +/-! The fixed atlas data used when taking the smooth correction limit. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation + +local instance correctionGeometryFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance correctionGeometryFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance correctionGeometryDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance correctionGeometryDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance correctionGeometrySectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance correctionGeometrySectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +structure CorrectionGeometry (_g : SmoothMetric M) (_F : M → Space) where + A : SmoothingAtlas M + outer_locally_one : ∀ i x, x ∈ tsupport (A.weight i) → + A.outer i =ᶠ[𝓝 x] (fun _ => 1) + +namespace MetricGoodPhaseData + +abbrev toCorrectionGeometry {g : SmoothMetric M} {F : M → Space} + (d : MetricGoodPhaseData g F) : CorrectionGeometry g F := + ⟨d.A,d.outer_locally_one⟩ + +instance {g : SmoothMetric M} {F : M → Space} : + Coe (MetricGoodPhaseData g F) (CorrectionGeometry g F) := ⟨toCorrectionGeometry⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..867f513051436c02d1897700aa7758f835c34f4c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricBounds.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionMetricIdentity +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Weighted estimates for the bilinear smoothing-tail error. -/ + +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +open scoped ContDiff + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +/-- The symmetric mixed metric coefficient as a bounded bilinear map of +the two differentials. -/ +def crossBilinear (v w : E) : + (E →L[ℝ] V) →L[ℝ] (E →L[ℝ] V) →L[ℝ] ℝ := by + let L : (E →L[ℝ] V) →ₗ[ℝ] (E →L[ℝ] V) →ₗ[ℝ] ℝ := + LinearMap.mk₂ ℝ (fun A B => inner ℝ (A v) (B w) + inner ℝ (A w) (B v)) + (by intros; simp only [add_apply, inner_add_left]; ring) + (by intros; simp only [smul_apply, real_inner_smul_left]; ring) + (by intros; simp only [add_apply, inner_add_right]; ring) + (by intros; simp only [smul_apply, real_inner_smul_right]; ring) + exact L.mkContinuous₂ (2 * ‖v‖ * ‖w‖) (by + intro A B + change ‖inner ℝ (A v) (B w) + inner ℝ (A w) (B v)‖ ≤ _ + calc + _ ≤ ‖inner ℝ (A v) (B w)‖ + ‖inner ℝ (A w) (B v)‖ := norm_add_le _ _ + _ ≤ ‖A v‖ * ‖B w‖ + ‖A w‖ * ‖B v‖ := + add_le_add (norm_inner_le_norm _ _) (norm_inner_le_norm _ _) + _ ≤ (‖A‖ * ‖v‖) * (‖B‖ * ‖w‖) + (‖A‖ * ‖w‖) * (‖B‖ * ‖v‖) := by + gcongr <;> apply ContinuousLinearMap.le_opNorm + _ = _ := by ring) + +@[simp] lemma crossBilinear_apply (v w : E) (A B : E →L[ℝ] V) : + crossBilinear v w A B = inner ℝ (A v) (B w) + inner ℝ (A w) (B v) := rfl + +/-- Higher derivatives of the metric comparison depend linearly on the +smoothing tail when the new increment has its fixed weighted bound. -/ +theorem weighted_metricCrossTerm + {O : Set E} (hO : UniqueDiffOn ℝ O) {τ C D : ℝ} {m : ℕ} + (hτ : 0 ≤ τ) (hC : 0 ≤ C) (hD : 0 ≤ D) + {G U : E → V} + (hG : ContDiffOn ℝ ∞ (fderiv ℝ G) O) + (hU : ContDiffOn ℝ ∞ (fderiv ℝ U) O) + (hbG : WeightedEstimates.WeightedBound O τ m C (fderiv ℝ G)) + (hbU : WeightedEstimates.WeightedBound O τ m D (fderiv ℝ U)) + (v w : E) : + WeightedEstimates.WeightedBound O τ m + (2 * ‖v‖ * ‖w‖ * (2 ^ m * C * D)) + (fun x => metricCrossTerm G U x v w) := by + have hb := hbG.bilinear hO hτ hC hD hG hU hbU (crossBilinear v w) + apply hb.mono_const + apply mul_le_mul_of_nonneg_right _ (by positivity) + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro A + apply ContinuousLinearMap.opNorm_le_bound _ (by positivity) + intro B + change ‖inner ℝ (A v) (B w) + inner ℝ (A w) (B v)‖ ≤ _ + calc + _ ≤ ‖inner ℝ (A v) (B w)‖ + ‖inner ℝ (A w) (B v)‖ := norm_add_le _ _ + _ ≤ ‖A v‖ * ‖B w‖ + ‖A w‖ * ‖B v‖ := + add_le_add (norm_inner_le_norm _ _) (norm_inner_le_norm _ _) + _ ≤ (‖A‖ * ‖v‖) * (‖B‖ * ‖w‖) + (‖A‖ * ‖w‖) * (‖B‖ * ‖v‖) := by + gcongr <;> apply ContinuousLinearMap.le_opNorm + _ = _ := by ring + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..f456c546adeefd0e1092c5502927e783cfcab774 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionMetricIdentity.lean @@ -0,0 +1,78 @@ +import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.Tactic + +namespace OAI + +/-! +# Updating the unsmoothed map + +The exact algebraic identity in the smoothing iteration. The difference +between the true and smoothed metric increments is bilinear in the +smoothing tail and the new increment, with no square of the tail. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +def pullbackMetric (F : E → V) (x v w : E) : ℝ := + inner ℝ (fderiv ℝ F x v) (fderiv ℝ F x w) + +def metricCrossTerm (F U : E → V) (x v w : E) : ℝ := + inner ℝ (fderiv ℝ F x v) (fderiv ℝ U x w) + + inner ℝ (fderiv ℝ F x w) (fderiv ℝ U x v) + +theorem pullbackMetric_add {F U : E → V} {x : E} + (hF : DifferentiableAt ℝ F x) (hU : DifferentiableAt ℝ U x) (v w : E) : + pullbackMetric (fun y => F y + U y) x v w = + pullbackMetric F x v w + metricCrossTerm F U x v w + + pullbackMetric U x v w := by + simp only [pullbackMetric, metricCrossTerm, fderiv_fun_add hF hU, + add_apply, inner_add_left, inner_add_right] + rw [real_inner_comm (fderiv ℝ U x v) (fderiv ℝ F x w)] + ring + +theorem metricCrossTerm_sub {G S U : E → V} {x : E} + (hG : DifferentiableAt ℝ G x) (hS : DifferentiableAt ℝ S x) (v w : E) : + metricCrossTerm (fun y => G y - S y) U x v w = + metricCrossTerm G U x v w - metricCrossTerm S U x v w := by + simp only [metricCrossTerm, fderiv_fun_sub hG hS, sub_apply, + inner_sub_left] + ring + +/-- Comparing increments at the true map and its smoothing requires only +one copy of the smoothing tail. -/ +theorem unsmoothed_metric_increment {G S U : E → V} {x : E} + (hG : DifferentiableAt ℝ G x) (hS : DifferentiableAt ℝ S x) + (hU : DifferentiableAt ℝ U x) (v w : E) : + pullbackMetric (fun y => G y + U y) x v w - pullbackMetric G x v w = + pullbackMetric (fun y => S y + U y) x v w - pullbackMetric S x v w + + metricCrossTerm (fun y => G y - S y) U x v w := by + rw [pullbackMetric_add hG hU, pullbackMetric_add hS hU, + metricCrossTerm_sub hG hS] + ring + +/-- The normalized error identity after the target amplitude is changed. +The hypotheses identify the old defect, new defect, and smoothed increment +error; they impose no estimate or existence assumption. -/ +theorem normalized_defect_identity {G S U : E → V} {x : E} + (hG : DifferentiableAt ℝ G x) (hS : DifferentiableAt ℝ S x) + (hU : DifferentiableAt ℝ U x) (v w : E) + (δ δ' target H Hs H' error : ℝ) + (hold : δ ^ 2 * H = target - pullbackMetric G x v w) + (hnew : δ' ^ 2 * H' = target - pullbackMetric (fun y => G y + U y) x v w) + (herror : error = pullbackMetric (fun y => S y + U y) x v w - + pullbackMetric S x v w - (δ ^ 2 * Hs - δ' ^ 2 * target)) : + δ' ^ 2 * (H' - target) = δ ^ 2 * (H - Hs) - error - + metricCrossTerm (fun y => G y - S y) U x v w := by + have hi := unsmoothed_metric_increment hG hS hU v w + nlinarith + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..5e8cba5e649f1b5385f20e5994bba5fac9ebc19b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleAlgebra.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ExactCorrectionRecurrence +import Mathlib.Analysis.SpecialFunctions.Pow.Real + +namespace OAI + +/-! Exact scale arithmetic in the normalized metric-error estimate. -/ +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +lemma scale_quotient_product {t : ℝ} (ht : 0 < t) (a b c : ℝ) : + (t ^ a * t ^ b) / t ^ c = t ^ (a + b - c) := by + rw [← Real.rpow_add ht, Real.rpow_sub ht] + +lemma scale_ratio_power {t : ℝ} (ht : 0 < t) (a b c d e : ℝ) : + (t ^ a * (t ^ b / t ^ c) ^ d) / (t ^ e) ^ (2 : ℕ) = + t ^ (a + (b - c) * d - 2 * e) := by + rw [← Real.rpow_sub ht, ← Real.rpow_mul ht.le] + rw [← Real.rpow_natCast (t ^ e) 2, ← Real.rpow_mul ht.le] + rw [scale_quotient_product ht] + congr 1 + ring + +lemma scale_ratio_power_linear {t : ℝ} (ht : 0 < t) (a b d e : ℝ) : + (t ^ a * (t ^ b / t) ^ d) / (t ^ e) ^ (2 : ℕ) = + t ^ (a + (b - 1) * d - 2 * e) := by + simpa only [Real.rpow_one] using scale_ratio_power ht a b 1 d e + +lemma scale_cubic_quotient {t : ℝ} (ht : 0 < t) (a b c : ℝ) : + ((t ^ a) ^ (3 : ℕ) / t ^ b) / (t ^ c) ^ (2 : ℕ) = + t ^ (3 * a - b - 2 * c) := by + rw [← Real.rpow_natCast (t ^ a) 3, ← Real.rpow_mul ht.le] + rw [← Real.rpow_natCast (t ^ c) 2, ← Real.rpow_mul ht.le] + rw [← Real.rpow_sub ht, ← Real.rpow_sub ht] + congr 1 + ring + +/-- The six exponents remain above the common exponent used in the +all-order recurrence, including the smaller next-block amplitude. -/ +theorem error_exponents_ge_common {k : ℝ} (hk : 10 ≤ k) : + (1 / 5 : ℝ) ≤ (13 * k + 8) / 5 ∧ + (1 / 5 : ℝ) ≤ (3 * k - 18) / 5 ∧ + (1 / 5 : ℝ) ≤ (18 * k + 8) / 5 ∧ + (1 / 5 : ℝ) ≤ (38 * k + 28) / 5 ∧ + (1 / 5 : ℝ) ≤ (13 * k + 8) / 5 ∧ + (1 / 5 : ℝ) ≤ (33 * k + 28) / 5 := by + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> linarith + +/-- Exact normalization of the small-mode error term. -/ +theorem normalized_mode_scale {t : ℝ} (ht : 0 < t) (k : ℝ) : + (t ^ k * (t ^ (6 / 5 : ℝ) / t ^ (11 / 10 : ℝ)) ^ (40 * (k + 1))) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((13 * k + 8) / 5) := by + rw [scale_ratio_power ht] + congr 1 + ring + +/-- Exact normalization of the cubic error term. -/ +theorem normalized_cubic_scale {t : ℝ} (ht : 0 < t) (k : ℝ) : + ((t ^ k) ^ (3 : ℕ) / t ^ (6 / 5 : ℝ)) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((3 * k - 18) / 5) := by + rw [scale_cubic_quotient ht] + congr 1 + ring + +/-- The two powers in the smoothing defect, before their coefficients. -/ +theorem normalized_defect_tail_scales {t : ℝ} (ht : 0 < t) (k : ℝ) : + ((t ^ k) ^ (2 : ℕ) * (t ^ (11 / 10 : ℝ) / t) ^ (40 * (k + 1))) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((18 * k + 8) / 5) ∧ + ((t ^ k) ^ (2 : ℕ) * (t ^ (6 / 5 : ℝ) / t) ^ (40 * (k + 1))) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((38 * k + 28) / 5) := by + rw [← Real.rpow_natCast (t ^ k) 2, ← Real.rpow_mul ht.le] + constructor + · rw [scale_ratio_power_linear ht] + congr 1 + ring + · rw [scale_ratio_power_linear ht] + congr 1 + ring + +/-- The two powers in the bilinear cross term, before their coefficients. -/ +theorem normalized_cross_tail_scales {t : ℝ} (ht : 0 < t) (k : ℝ) : + (t ^ k * (t ^ (11 / 10 : ℝ) / t) ^ (40 * (k + 1))) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((13 * k + 8) / 5) ∧ + (t ^ k * (t ^ (6 / 5 : ℝ) / t) ^ (40 * (k + 1))) / + (t ^ ((6 / 5 : ℝ) * (k + 1))) ^ (2 : ℕ) = t ^ ((33 * k + 28) / 5) := by + constructor + · rw [scale_ratio_power_linear ht] + congr 1 + ring + · rw [scale_ratio_power_linear ht] + congr 1 + ring + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleControl.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleControl.lean new file mode 100644 index 0000000000000000000000000000000000000000..0852a60428de6c24a05ab2025033b9968675462c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScaleControl.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScales + +namespace OAI + +/-! Positivity and the cumulative displacement budget for the actual scales. -/ +noncomputable section +open Filter +open scoped Topology BigOperators +namespace ClosedSurfaceR4.ExactCorrection + +lemma correctionScale_pos {t : ℝ} (ht : 0 < t) (n : ℕ) : + 0 < correctionScale t n := by + induction n with + | zero => exact ht + | succ n hn => exact Real.rpow_pos_of_pos hn _ + +lemma correctionScale_le_initial {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1/32) (n : ℕ) : + correctionScale t n ≤ t := by + apply (correctionScale_le_geometric ht hsmall n).trans + simpa only [mul_one] using mul_le_mul_of_nonneg_left + (pow_le_one₀ (by norm_num : (0 : ℝ) ≤ 1/2) (by norm_num) : (1/2 : ℝ)^n ≤ 1) ht + +lemma correctionScale_tendsto_zero {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1/32) : + Tendsto (correctionScale t) atTop (𝓝 0) := + (correctionScale_summable ht hsmall).1.tendsto_atTop_zero + +lemma correctionScale_tsum_le {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1/32) : + (∑' n, correctionScale t n) ≤ 2*t := by + have hgeom : Summable (fun n : ℕ => t*(1/2 : ℝ)^n) := + (summable_geometric_of_abs_lt_one (by norm_num : |(1/2 : ℝ)| < 1)).mul_left t + have hh := (correctionScale_summable ht hsmall).1.tsum_le_tsum + (correctionScale_le_geometric ht hsmall) hgeom + rw [tsum_mul_left,tsum_geometric_of_abs_lt_one (by norm_num : |(1/2 : ℝ)| < 1)] at hh + convert hh using 1 + ring + +lemma correctionScale_partial_sum_le {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1/32) (N : ℕ) : + ∑ n ∈ Finset.range N, correctionScale t n ≤ 2*t := by + apply le_trans _ (correctionScale_tsum_le ht hsmall) + exact (correctionScale_summable ht hsmall).1.sum_le_tsum (Finset.range N) + (fun n _ => correctionScale_nonneg ht n) + +lemma correction_displacement_budget {t ρ : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1/32) + (hρ : 0 ≤ ρ) (N : ℕ) : + ρ/8 + ρ*(∑ n ∈ Finset.range N, correctionScale t n) ≤ ρ/4 := by + have hh := mul_le_mul_of_nonneg_left (correctionScale_partial_sum_le ht hsmall N) hρ + have hs := mul_le_mul_of_nonneg_left hsmall hρ + nlinarith + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScales.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScales.lean new file mode 100644 index 0000000000000000000000000000000000000000..23fb3729bba08d66f46a0122d693cba4db5932b1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CorrectionScales.lean @@ -0,0 +1,81 @@ +import Mathlib + +namespace OAI + +/-! +# Summability of the exact-correction scales + +The iteration uses `t ↦ t^(6/5)`. For an explicit sufficiently small initial +scale, the entire sequence is dominated by a geometric series. This gives +the displacement budget needed for the exact correction. +-/ + +namespace ClosedSurfaceR4.ExactCorrection + +open Filter +open scoped Topology + +/-- The fast-decaying scale used in successive smoothing steps. -/ +noncomputable def correctionScale (t : ℝ) : ℕ → ℝ + | 0 => t + | n + 1 => (correctionScale t n) ^ (6 / 5 : ℝ) + +lemma correctionScale_nonneg {t : ℝ} (ht : 0 ≤ t) (n : ℕ) : + 0 ≤ correctionScale t n := by + induction n with + | zero => exact ht + | succ n hn => exact Real.rpow_nonneg hn _ + +lemma scale_step_le_half {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1 / 32) : + t ^ (6 / 5 : ℝ) ≤ t / 2 := by + have hfifth : t ^ (1 / 5 : ℝ) ≤ 1 / 2 := by + calc + _ ≤ ((1 / 2 : ℝ) ^ (5 : ℕ)) ^ (1 / 5 : ℝ) := by + apply Real.rpow_le_rpow ht _ (by norm_num) + norm_num at hsmall ⊢ + exact hsmall + _ = 1 / 2 := by + rw [← Real.rpow_natCast_mul (by norm_num : 0 ≤ (1 / 2 : ℝ))] + norm_num + by_cases hzero : t = 0 + · subst t + norm_num + · have hpos : 0 < t := lt_of_le_of_ne ht (Ne.symm hzero) + rw [show (6 / 5 : ℝ) = 1 + 1 / 5 by norm_num, Real.rpow_add hpos, + Real.rpow_one] + nlinarith [mul_le_mul_of_nonneg_left hfifth ht] + +/-- A concrete geometric majorant, independent of the later block lengths. -/ +theorem correctionScale_le_geometric {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1 / 32) + (n : ℕ) : correctionScale t n ≤ t * (1 / 2 : ℝ) ^ n := by + induction n with + | zero => simp [correctionScale] + | succ n hn => + have hhalf : (1 / 2 : ℝ) ^ n ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + have hnt : correctionScale t n ≤ t := hn.trans (by nlinarith) + have hstep := scale_step_le_half (correctionScale_nonneg ht n) (hnt.trans hsmall) + change (correctionScale t n) ^ (6 / 5 : ℝ) ≤ _ + calc + _ ≤ correctionScale t n / 2 := hstep + _ ≤ (t * (1 / 2 : ℝ) ^ n) / 2 := by linarith + _ = t * (1 / 2 : ℝ) ^ (n + 1) := by rw [pow_succ]; ring + +/-- The exact-correction scales have total mass strictly less than `1/4`. -/ +theorem correctionScale_summable {t : ℝ} (ht : 0 ≤ t) (hsmall : t ≤ 1 / 32) : + Summable (correctionScale t) ∧ (∑' n, correctionScale t n) < 1 / 4 := by + have hgeom : Summable (fun n : ℕ => t * (1 / 2 : ℝ) ^ n) := + (summable_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)).mul_left t + have hs : Summable (correctionScale t) := + Summable.of_nonneg_of_le (correctionScale_nonneg ht) + (correctionScale_le_geometric ht hsmall) hgeom + refine ⟨hs, ?_⟩ + have hle := hs.tsum_le_tsum (correctionScale_le_geometric ht hsmall) hgeom + have hsum : (∑' n : ℕ, t * (1 / 2 : ℝ) ^ n) = 2 * t := by + rw [tsum_mul_left, tsum_geometric_of_abs_lt_one (by norm_num : |(1 / 2 : ℝ)| < 1)] + ring + rw [hsum] at hle + linarith + +end ClosedSurfaceR4.ExactCorrection + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CoupledSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoupledSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..52ecd4bc7d1c67774be754bbc37d2fe20692cda0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CoupledSmoothing.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothing +import OAI.Geometry.SurfaceImmersion.Correction.GlobalShiftedSmoothing + +namespace OAI + +/-! The joint map/tensor input bound and its actual two-scale smoothing tail. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open JetPolynomial (Base) + +local instance coupledModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance coupledModelSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance coupledModelComplete : CompleteSpace TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The map carries a two-derivative prefix, while the metric defect has none. -/ +def InputBound (t : ℝ) (m : ℕ) (C : ℝ) (G : M → Space) + (H : ∀ p : M, CovariantTwoTensor p) : Prop := + A.ShiftedBound 2 m t C G ∧ A.TensorWeightedBound t m C H + +/-- The two smoothing errors obey the finite-input estimate together, with +only linear dependence on the possibly large higher input norm. -/ +theorem coupled_smoothing_tail (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : M → Space) (H : ∀ p : M, CovariantTwoTensor p) + (s t τ B C : ℝ), + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + A.InputBound t r B G H → A.InputBound t m C G H → + A.InputBound τ m + (D * tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (G - A.smooth r s G) (fun p => H p - A.tensorSmooth r s H p) := by + obtain ⟨DG, hDG, hG⟩ := A.smoothing_shifted_tail (V := Space) r 2 m + obtain ⟨DH, hDH, hH⟩ := A.tensor_smoothing_tail r m + refine ⟨DG + DH, add_nonneg hDG hDH, ?_⟩ + intro G H s t τ B C hτ hτs hst ht1 hB hC hGs hHs hbr hcm + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hsize : 0 ≤ B * (s / t) ^ r + C * (τ / t) ^ r := by positivity + have hg := hG G s t τ B C hτ hτs hst ht1 hB hC hGs hbr.1 hcm.1 + have hh := hH H s t τ B C hτ hτs hst ht1 hB hC hHs hbr.2 hcm.2 + constructor + · intro i j hj x + exact (hg i j hj x).trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_right hDH) (tailConstant_nonneg r)) hsize) + · intro i + exact (hh i).mono_const (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hDG) (tailConstant_nonneg r)) hsize) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CovarianceCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CovarianceCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..84ca1f0e5a2521009807c92c393be4a9cc993552 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CovarianceCorrector.lean @@ -0,0 +1,367 @@ +import Mathlib + +namespace OAI + +/-! +The covariance solve in paper 094-01, Section 6, equations +`covariance-equation` and `covariance-solve`. The averaging operator below is +the actual normalized Haar integral on the period circle. The finite linear +solve is proved invertible using constant positive speed and connectedness. +-/ + +noncomputable section + +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.CovarianceCorrector + +abbrev Period := UnitAddCircle + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +/-- Normalized average over one period. -/ +def average (f : Period → E) : E := ∫ t, f t ∂AddCircle.haarAddCircle + +omit [InnerProductSpace ℝ E] [CompleteSpace E] in +lemma integrable_of_continuous {f : Period → E} (hf : Continuous f) : + Integrable f AddCircle.haarAddCircle := by + simpa only [IntegrableOn, Measure.restrict_univ] using + hf.continuousOn.integrableOn_compact isCompact_univ + +omit [CompleteSpace E] in +lemma average_add {f g : Period → E} (hf : Continuous f) (hg : Continuous g) : + average (fun t => f t + g t) = average f + average g := + integral_add (integrable_of_continuous hf) (integrable_of_continuous hg) + +omit [CompleteSpace E] in +lemma average_sub {f g : Period → E} (hf : Continuous f) (hg : Continuous g) : + average (fun t => f t - g t) = average f - average g := + integral_sub (integrable_of_continuous hf) (integrable_of_continuous hg) + +@[simp] lemma average_const (v : E) : average (fun _ : Period => v) = v := by + simp [average] + +omit [CompleteSpace E] in +lemma average_const_smul (c : ℝ) (f : Period → E) : + average (fun t => c • f t) = c • average f := integral_smul c f + +lemma average_smul_const (f : Period → ℝ) (v : E) : + average (fun t => f t • v) = average f • v := integral_smul_const f v + +lemma average_inner_right {f : Period → E} (hf : Continuous f) (m : E) : + average (fun t => inner ℝ (f t) m) = inner ℝ (average f) m := by + calc + _ = average (fun t => inner ℝ m (f t)) := by + congr 1 + funext t + exact real_inner_comm _ _ + _ = inner ℝ m (average f) := by + simpa only [average, innerSL_apply_apply] using + (innerSL ℝ m).integral_comp_comm (integrable_of_continuous hf) + _ = _ := real_inner_comm _ _ + +/-- The covariance operator applied to a vector. -/ +def covariance (V : Period → E) (v m : E) : E := + average (fun t => inner ℝ (V t - v) m • (V t - v)) + +def correctedScalar (V : Period → E) (v : E) (q : ℝ) + (r : Period → ℝ) (m : E) : Period → ℝ := + fun t => r t + inner ℝ (V t - v) m / q + +def correctedVector (V : Period → E) (v : E) (q : ℝ) + (r : Period → ℝ) (m : E) : Period → E := + fun t => q⁻¹ • (correctedScalar V v q r m t • V t - m) + +def fluctuation (r : Period → ℝ) : Period → ℝ := fun t => r t - average r + +lemma average_centered_inner {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) (m : E) : + average (fun t => inner ℝ (V t - v) m) = 0 := by + rw [average_inner_right (f := fun t => V t - v) (hV.sub continuous_const), + average_sub (f := V) (g := fun _ => v) hV continuous_const, + average_const, hv, sub_self, inner_zero_left] + +lemma average_centered_tensor {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) (m : E) : + average (fun t => inner ℝ (V t - v) m • V t) = covariance V v m := by + have hi : Continuous (fun t => inner ℝ (V t - v) m) := + (hV.sub continuous_const).inner continuous_const + calc + _ = average (fun t => inner ℝ (V t - v) m • (V t - v) + + inner ℝ (V t - v) m • v) := by + congr 1 + funext t + rw [← smul_add, sub_add_cancel] + _ = covariance V v m + average (fun t => inner ℝ (V t - v) m • v) := + average_add (hi.smul (hV.sub continuous_const)) (hi.smul continuous_const) + _ = covariance V v m := by + rw [average_smul_const, average_centered_inner hV hv, zero_smul, add_zero] + +theorem average_correctedScalar {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) {r : Period → ℝ} (hr : Continuous r) + (hr0 : average r = 0) (q : ℝ) (m : E) : + average (correctedScalar V v q r m) = 0 := by + have hi : Continuous (fun t => inner ℝ (V t - v) m) := + (hV.sub continuous_const).inner continuous_const + change average (fun t => r t + inner ℝ (V t - v) m * q⁻¹) = 0 + rw [average_add (f := r) (g := fun t => inner ℝ (V t - v) m * q⁻¹) + hr (hi.mul continuous_const)] + have he : average (fun t => inner ℝ (V t - v) m * q⁻¹) = + q⁻¹ * average (fun t => inner ℝ (V t - v) m) := by + simpa only [smul_eq_mul, mul_comm] using + average_const_smul q⁻¹ (fun t => inner ℝ (V t - v) m) + rw [he, average_centered_inner hV hv, hr0, mul_zero, add_zero] + +theorem average_weighted_correctedScalar {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) {r : Period → ℝ} (hr : Continuous r) + (q : ℝ) (m : E) + (hsolve : m - q⁻¹ • covariance V v m = average (fun t => r t • V t)) : + average (fun t => correctedScalar V v q r m t • V t) = m := by + have hi : Continuous (fun t => inner ℝ (V t - v) m) := + (hV.sub continuous_const).inner continuous_const + calc + _ = average (fun t => r t • V t + + q⁻¹ • (inner ℝ (V t - v) m • V t)) := by + congr 1 + funext t + simp only [correctedScalar, add_smul, div_eq_mul_inv, smul_smul] + rw [mul_comm] + _ = average (fun t => r t • V t) + + q⁻¹ • average (fun t => inner ℝ (V t - v) m • V t) := by + rw [average_add (f := fun t => r t • V t) + (g := fun t => q⁻¹ • (inner ℝ (V t - v) m • V t)) + (hr.smul hV) (continuous_const.smul (hi.smul hV)), + average_const_smul] + _ = average (fun t => r t • V t) + q⁻¹ • covariance V v m := by + rw [average_centered_tensor hV hv] + _ = m := (sub_eq_iff_eq_add.mp hsolve).symm + +theorem average_correctedVector {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) {r : Period → ℝ} (hr : Continuous r) + (q : ℝ) (m : E) + (hsolve : m - q⁻¹ • covariance V v m = average (fun t => r t • V t)) : + average (correctedVector V v q r m) = 0 := by + have hh : Continuous (correctedScalar V v q r m) := + hr.add (((hV.sub continuous_const).inner continuous_const).div_const q) + change average (fun t => q⁻¹ • (correctedScalar V v q r m t • V t - m)) = 0 + rw [average_const_smul, + average_sub (f := fun t => correctedScalar V v q r m t • V t) + (g := fun _ => m) (hh.smul hV) continuous_const, average_const, + average_weighted_correctedScalar hV hv hr q m hsolve, sub_self, smul_zero] + +omit [CompleteSpace E] in +theorem corrected_projection (V : Period → E) + (v : E) {r : Period → ℝ} (hr : Continuous r) (hr0 : average r = 0) + {q : ℝ} (hq : q ≠ 0) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) (m : E) : + fluctuation (fun t => inner ℝ (V t) (correctedVector V v q r m t)) = r := by + have he : ∀ t, inner ℝ (V t) (correctedVector V v q r m t) = + r t - inner ℝ v m / q := by + intro t + simp only [correctedVector, correctedScalar, inner_smul_right, inner_sub_right, + inner_sub_left, hcircle t] + field_simp [hq] + ring + have hav : average (fun t => inner ℝ (V t) (correctedVector V v q r m t)) = + -inner ℝ v m / q := by + simp_rw [he] + rw [average_sub hr continuous_const, average_const, hr0] + ring + funext t + rw [fluctuation, he, hav] + ring + +/-- The actual periodic covariance equation has a continuous zero-mean +solution as soon as the finite-dimensional covariance operator is onto. +In the manuscript, positivity of `Id - Σ/q` supplies precisely this last +linear algebra input. -/ +theorem exists_covariance_corrector {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) {r : Period → ℝ} (hr : Continuous r) + (hr0 : average r = 0) {q : ℝ} (hq : q ≠ 0) + (hcircle : ∀ t, inner ℝ (V t) (V t) = q) + (hsurj : Function.Surjective (fun m : E => m - q⁻¹ • covariance V v m)) : + ∃ W : Period → E, Continuous W ∧ average W = 0 ∧ + fluctuation (fun t => inner ℝ (V t) (W t)) = r := by + obtain ⟨m, hm⟩ := hsurj (average (fun t => r t • V t)) + refine ⟨correctedVector V v q r m, ?_, + average_correctedVector hV hv hr q m hm, + corrected_projection V v hr hr0 hq hcircle m⟩ + have hh : Continuous (correctedScalar V v q r m) := + hr.add (((hV.sub continuous_const).inner continuous_const).div_const q) + exact continuous_const.smul ((hh.smul hV).sub continuous_const) + +/-- A continuous scalar function on the period circle cannot switch between +the two roots of a fixed square without taking intermediate values. -/ +theorem constant_of_constant_square {a : Period → ℝ} (ha : Continuous a) + (hsq : ∀ t, a t ^ 2 = a 0 ^ 2) : a = fun _ => a 0 := by + have hfinite : (Set.range a).Finite := by + apply ((Set.finite_singleton (-a 0)).insert (a 0)).subset + rintro _ ⟨t, rfl⟩ + simpa only [Set.mem_insert_iff, Set.mem_singleton_iff] using + (sq_eq_sq_iff_eq_or_eq_neg.mp (hsq t)) + have hsub : (Set.range a).Subsingleton := + (isPreconnected_range ha).isDiscrete_iff_subsingleton.mp hfinite.isDiscrete + funext t + exact hsub ⟨t, rfl⟩ ⟨0, rfl⟩ + +/-- The covariance defines a linear operator on the orthogonal complement. -/ +def covarianceLinearMap (V : Period → E) (hV : Continuous V) (v : E) : E →ₗ[ℝ] E where + toFun := covariance V v + map_add' m n := by + change average (fun t => inner ℝ (V t - v) (m + n) • (V t - v)) = _ + simp_rw [inner_add_right, add_smul] + exact average_add + (((hV.sub continuous_const).inner continuous_const).smul (hV.sub continuous_const)) + (((hV.sub continuous_const).inner continuous_const).smul (hV.sub continuous_const)) + map_smul' c m := by + change average (fun t => inner ℝ (V t - v) (c • m) • (V t - v)) = _ + simp_rw [inner_smul_right, mul_smul] + exact average_const_smul c _ + +def meanOperator (V : Period → E) (hV : Continuous V) (v : E) (q : ℝ) : E →ₗ[ℝ] E := + LinearMap.id - q⁻¹ • covarianceLinearMap V hV v + +omit [CompleteSpace E] in +@[simp] lemma meanOperator_apply (V : Period → E) (hV : Continuous V) + (v : E) (q : ℝ) (m : E) : + meanOperator V hV v q m = m - q⁻¹ • covariance V v m := rfl + +theorem covariance_inner {V : Period → E} (hV : Continuous V) (v m : E) : + inner ℝ (covariance V v m) m = average (fun t => (inner ℝ (V t - v) m) ^ 2) := by + rw [covariance, ← average_inner_right + (f := fun t => inner ℝ (V t - v) m • (V t - v)) + (((hV.sub continuous_const).inner continuous_const).smul (hV.sub continuous_const)) m] + congr 1 + funext t + rw [real_inner_smul_left, pow_two] + +theorem average_centered_square {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) (m : E) : + average (fun t => (inner ℝ (V t - v) m) ^ 2) = + average (fun t => (inner ℝ (V t) m) ^ 2) - (inner ℝ v m) ^ 2 := by + let a : Period → ℝ := fun t => inner ℝ (V t) m + let c : ℝ := inner ℝ v m + have ha : Continuous a := hV.inner continuous_const + have hav : average a = c := (average_inner_right hV m).trans (congrArg (fun w => inner ℝ w m) hv) + have he : (fun t => (inner ℝ (V t - v) m) ^ 2) = + (fun t => a t ^ 2 - (2 * c) * a t + c ^ 2) := by + funext t + dsimp [a, c] + rw [inner_sub_left] + ring + have hasq : Continuous (fun t => a t ^ 2) := by fun_prop + have hscale : Continuous (fun t => (2 * c) * a t) := continuous_const.mul ha + have hscaled : average (fun t => (2 * c) * a t) = (2 * c) * average a := by + simpa only [smul_eq_mul] using average_const_smul (2 * c) a + rw [he, average_add (f := fun t => a t ^ 2 - (2 * c) * a t) + (g := fun _ => c ^ 2) (hasq.sub hscale) continuous_const, + average_sub (f := fun t => a t ^ 2) (g := fun t => (2 * c) * a t) + hasq hscale, hscaled, average_const, hav] + change average (fun t => a t ^ 2) - (2 * c) * c + c ^ 2 = + average (fun t => a t ^ 2) - c ^ 2 + ring + +theorem meanOperator_kernel_trivial {V : Period → E} (hV : Continuous V) + {v : E} (hv : average V = v) {q : ℝ} (hq : 0 < q) + (hcircle : ∀ t, inner ℝ (V t) (V t) = q) + (m : E) (hm : meanOperator V hV v q m = 0) : m = 0 := by + let a : Period → ℝ := fun t => inner ℝ (V t) m + let c : ℝ := inner ℝ v m + let gap : Period → ℝ := fun t => q * inner ℝ m m - a t ^ 2 + have ha : Continuous a := hV.inner continuous_const + have hgap : Continuous gap := continuous_const.sub (ha.pow 2) + have hgapnonneg : ∀ t, 0 ≤ gap t := by + intro t + have hcauchy := real_inner_mul_inner_self_le (V t) m + rw [hcircle t] at hcauchy + dsimp [gap, a] + nlinarith only [hcauchy] + have hmean : average gap = q * inner ℝ m m - average (fun t => a t ^ 2) := by + exact (average_sub (f := fun _ => q * inner ℝ m m) + (g := fun t => a t ^ 2) continuous_const (by fun_prop)).trans (by rw [average_const]) + have hkernel : inner ℝ (covariance V v m) m = q * inner ℝ m m := by + have he := congrArg (fun w => inner ℝ w m) hm + simp only [meanOperator_apply, inner_sub_left, real_inner_smul_left, inner_zero_left] at he + have hi : q⁻¹ * inner ℝ (covariance V v m) m = inner ℝ m m := by linarith + have he' := congrArg (fun x : ℝ => q * x) hi + simpa only [← mul_assoc, mul_inv_cancel₀ hq.ne', one_mul] using he' + have hvariance := (covariance_inner hV v m).trans (average_centered_square hV hv m) + have hsum : average gap + c ^ 2 = 0 := by + dsimp [c, a] at hmean ⊢ + linarith [hmean, hkernel, hvariance] + have hnonneg : 0 ≤ average gap := integral_nonneg hgapnonneg + have havzero : average gap = 0 := by nlinarith [sq_nonneg c] + have hczero : c = 0 := by nlinarith [sq_nonneg c] + have hae : gap =ᵐ[AddCircle.haarAddCircle] 0 := + (integral_eq_zero_iff_of_nonneg hgapnonneg (integrable_of_continuous hgap)).mp havzero + have hgapzero : gap = 0 := + (hgap.ae_eq_iff_eq AddCircle.haarAddCircle continuous_zero).mp hae + have hsq : ∀ t, a t ^ 2 = q * inner ℝ m m := by + intro t + have h := congrFun hgapzero t + dsimp [gap] at h + linarith + have haconst : a = fun _ => a 0 := + constant_of_constant_square ha (fun t => (hsq t).trans (hsq 0).symm) + have hav : average a = c := + (average_inner_right hV m).trans (congrArg (fun w => inner ℝ w m) hv) + have ha0 : a 0 = 0 := by + rw [haconst, average_const, hczero] at hav + exact hav + have hmm : inner ℝ m m = 0 := by + have he := hsq 0 + rw [ha0, zero_pow (by decide : 2 ≠ 0)] at he + exact (mul_eq_zero.mp he.symm).resolve_left hq.ne' + exact (inner_self_eq_zero.mp hmm) + +theorem meanOperator_surjective [FiniteDimensional ℝ E] + {V : Period → E} (hV : Continuous V) {v : E} (hv : average V = v) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + Function.Surjective (fun m : E => m - q⁻¹ • covariance V v m) := by + have hinj : Function.Injective (meanOperator V hV v q) := by + intro m n hmn + apply sub_eq_zero.mp + apply meanOperator_kernel_trivial hV hv hq hcircle + rw [map_sub, hmn, sub_self] + exact LinearMap.surjective_of_injective hinj + +/-- The finite covariance solve, with its invertibility now proved from the +constant positive speed and connectedness of the periodic parameter space. -/ +theorem exists_covariance_corrector_unconditional [FiniteDimensional ℝ E] + {V : Period → E} (hV : Continuous V) {v : E} (hv : average V = v) + {r : Period → ℝ} (hr : Continuous r) (hr0 : average r = 0) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + ∃ W : Period → E, Continuous W ∧ average W = 0 ∧ + fluctuation (fun t => inner ℝ (V t) (W t)) = r := + exists_covariance_corrector hV hv hr hr0 hq.ne' hcircle + (meanOperator_surjective hV hv hq hcircle) + +/-- Smooth periodic input gives a smooth periodic corrector. Smoothness here +is stated on the real lift, so no manifold structure on the quotient circle +is hidden in the statement. -/ +theorem exists_smooth_covariance_corrector [FiniteDimensional ℝ E] + {V : Period → E} (hV : Continuous V) {v : E} (hv : average V = v) + {r : Period → ℝ} (hr : Continuous r) (hr0 : average r = 0) + (hVsmooth : ContDiff ℝ ∞ (fun t : ℝ => V (t : Period))) + (hrsmooth : ContDiff ℝ ∞ (fun t : ℝ => r (t : Period))) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + ∃ W : Period → E, Continuous W ∧ + ContDiff ℝ ∞ (fun t : ℝ => W (t : Period)) ∧ average W = 0 ∧ + fluctuation (fun t => inner ℝ (V t) (W t)) = r := by + obtain ⟨m, hm⟩ := meanOperator_surjective hV hv hq hcircle + (average (fun t => r t • V t)) + have hh : Continuous (correctedScalar V v q r m) := + hr.add (((hV.sub continuous_const).inner continuous_const).div_const q) + refine ⟨correctedVector V v q r m, + continuous_const.smul ((hh.smul hV).sub continuous_const), ?_, + average_correctedVector hV hv hr q m hm, + corrected_projection V v hr hr0 hq.ne' hcircle m⟩ + have hs : ContDiff ℝ ∞ (fun t : ℝ => correctedScalar V v q r m (t : Period)) := + hrsmooth.add (((hVsmooth.sub contDiff_const).inner ℝ contDiff_const).div_const q) + exact contDiff_const.smul ((hs.smul hVsmooth).sub contDiff_const) + +end ClosedSurfaceR4.CovarianceCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..2bf99e64048b45369e12d0fece4d8db3c814afe7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRead.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LocalizedCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Atlas.CompactCoordinatePullback +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasJetRelation + +namespace OAI + +/-! A polynomial in one localized atlas map has an actual finite jet +expression in another chart, on the nonzero partition-weight locus. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem cross_compact_polynomial_coordinate_read (i : A.centers) (j : B.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {K : Set Base} (hK : IsCompact K) + (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), x ∈ U → A.weight i ((chart (i : M)).symm x) ≠ 0 → + ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t (JetPolynomial.planeCoordinateIsometry x) = + coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x)) := by + let e := transition (i : M) (j : M) + have hei : ContDiffOn ℝ ∞ e.symm e.target := by + have hs : e.symm = transition (j : M) (i : M) := by + simp [e,transition,OpenPartialHomeomorph.trans_symm_eq_symm_trans_symm] + rw [hs] + exact transition_smooth (j : M) (i : M) + obtain ⟨U₁,hU₁,hKU₁,hU₁e,T,S,hT,hS,hTe,hST,hTS⟩ := + JetPolynomial.compact_coordinate_representatives e (transition_smooth (i : M) (j : M)) hei hK hKe + obtain ⟨U₂,hU₂,hKU₂,hU₂e,a,ha,hae,_,hrel⟩ := A.cross_compact_jetChartMap_transition B i j hK hKe + let U := U₁ ∩ U₂ + refine ⟨U,hU₁.inter hU₂,fun x hx => ⟨hKU₁ hx,hKU₂ hx⟩, + fun x hx => hU₁e hx.1,localizedPolynomialPullback P T S a, + localizedPolynomialPullback_smooth hP hT hS ha,?_⟩ + intro F hF x hx hw ε t + have hgerm : (fun y => a y • A.jetChartMap i F y) =ᶠ[𝓝 x] + (B.jetChartMap j F ∘ T) := by + filter_upwards [hrel F x hx.2 hw,hU₁.mem_nhds hx.1] with y hy hyU + change a y • A.jetChartMap i F y = B.jetChartMap j F (T y) + rw [hTe hyU] + exact hy.symm + have hv := localizedPolynomialPullback_eval P hT hS ha hU₁ hST hTS + (B.jetChartMap_smooth j hF) (A.jetChartMap_smooth i hF) hx.1 hgerm ε t + simpa only [hTe hx.1] using hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..05b2a57e840d22ed3cf4b8ea71f2772ba9e582ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialRepresentation.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CrossAtlasRestoredPolynomial +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialRepresentation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialMetric + +namespace OAI + +/-! Constructed coordinate representatives of the same global polynomial +tensor. These are derived from the actual read/restore maps. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance crossPolyRepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossPolyRepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance crossPolyRepDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossPolyRepDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossPolyRepSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossPolyRepSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +/-- Every correction chart reads the globally restored polynomial as a +single finite polynomial in that chart's actual localized map. -/ +theorem cross_atlas_polynomial_representation {n : B.centers → ℕ} + (P : ∀ j : B.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) (i : A.centers) : + ∃ Q : Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ k r, (Q k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), A.chartWeight i x ≠ 0 → ∀ ε : ℝ, + coordinatePolynomialValue Q ε (A.jetChartMap i F) 0 (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (B.atlasPolynomialValue P ε F) x := by + classical + choose Q hQ hvalue using fun j : B.centers => + A.cross_restored_polynomial_representation B i j (P j) (hP j) + refine ⟨sumTensorPolynomials Q,sumTensorPolynomials_smooth hQ,?_⟩ + intro F hF x hx ε + have hrestore : B.atlasPolynomialValue P ε F = + ∑ j : B.centers, B.bundleRestore B.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue (P j) ε (B.jetChartMap j F) 0 + (JetPolynomial.planeCoordinateIsometry y))) := by + funext p + simp only [atlasPolynomialValue,tensorPlaneRestore,Finset.sum_apply] + rw [sumTensorPolynomials_value,hrestore,A.tensorChartRead_sum] + simp only [Finset.sum_apply] + apply Finset.sum_congr rfl + intro j _ + exact hvalue j F hF x hx ε 0 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..ceabfcd8414fdfa16e1f30b4f003f71561e22a00 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasPolynomialTransfer.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CrossAtlasPolynomialRepresentation +import OAI.Geometry.SurfaceImmersion.Atlas.TensorReadReconstruction + +namespace OAI + +/-! A finite polynomial mean tensor is independent of the correction atlas. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression planeCoordinateIsometry) +open JetPolynomial.Perturbation +local instance polyTransferFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polyTransferFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polyTransferDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polyTransferDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polyTransferSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polyTransferSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem cross_atlas_polynomial_transfer {n : B.centers → ℕ} + (P : ∀ j : B.centers, Fin 3 → Fin (n j) → Expression) + (hP : ∀ j k r, (P j k r).SmoothCoeffs univ) : + ∃ Q : A.centers → Fin 3 → Fin (polynomialFamilyDegree n) → Expression, + (∀ i k r, (Q i k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → ∀ ε : ℝ, + A.atlasPolynomialMetric Q ε F = B.atlasPolynomialMetric P ε F := by + classical + choose R hR hrep using fun i : A.centers => A.cross_atlas_polynomial_representation B P hP i + let L : A.centers → Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + fun i x => (A.chartWeight i x)^2 • ContinuousLinearMap.id ℝ PhaseMean.Tensor + have hL (i : A.centers) : ContDiff ℝ ∞ (L i) := (A.chartWeight_smooth i).pow 2 |>.smul contDiff_const + let Q := fun i => mapTensorPolynomial (L i) (R i) + refine ⟨Q,fun i => mapTensorPolynomial_smooth (hL i) (hR i),?_⟩ + intro F hF ε + have hvalue : A.atlasPolynomialValue Q ε F = B.atlasPolynomialValue P ε F := by + have heq : (fun i => coordinatePolynomialValue (Q i) ε (A.jetChartMap i F) 0) = + (fun i x => (A.planeWeight i x)^2 • A.tensorPlaneRead i (B.atlasPolynomialValue P ε F) x) := by + funext i x + let y := planeCoordinateIsometry.symm x + have hxy : planeCoordinateIsometry y = x := planeCoordinateIsometry.apply_symm_apply x + rw [← hxy,mapTensorPolynomial_eval] + change (A.chartWeight i y)^2 • coordinatePolynomialValue (R i) ε (A.jetChartMap i F) 0 + (planeCoordinateIsometry y) = + (A.planeWeight i (planeCoordinateIsometry y))^2 • + A.tensorPlaneRead i (B.atlasPolynomialValue P ε F) (planeCoordinateIsometry y) + simp only [planeWeight,tensorPlaneRead,Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + by_cases hy : A.chartWeight i y = 0 + · simp only [hy,zero_pow (by decide : 2 ≠ 0),zero_smul] + · rw [hrep i F hF y hy ε] + change A.tensorPlaneRestore _ = B.atlasPolynomialValue P ε F + rw [heq,A.tensorPlaneRestore_partition_read _ (B.atlasPolynomialValue_symmetric P ε F)] + exact congrArg (fun T => inducedTensor F+T) hvalue + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..047fd18c4d24dbe706a44394730f23babf83ca9c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomial.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CrossAtlasRestoredPolynomialRead + +namespace OAI + +/-! Global coefficient extensions for one restored polynomial tensor. +The representation holds on the open nonzero partition-weight locus, +including chart points outside the support of the restored term. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance crossRestoredPolyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossRestoredPolyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance crossRestoredPolyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossRestoredPolyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossRestoredPolySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossRestoredPolySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem cross_restored_polynomial_representation (i : A.centers) (j : B.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) : + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), A.chartWeight i x ≠ 0 → ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (B.bundleRestore B.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue P ε + (B.jetChartMap j F) t (JetPolynomial.planeCoordinateIsometry y)))) x := by + obtain ⟨U,hU,hKU,hUe,Q,hQ,hread⟩ := A.cross_compact_restored_polynomial_read B i j P hP + (A.cross_pairSupport_compact B i j) (A.cross_pairSupport_transition B i j) + obtain ⟨χ,hχ,_,_,hχU,hχone⟩ := + CollarVelocity.compact_cutoff (A.cross_pairSupport_compact B i j) hU hKU + let L : Base → PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor := + fun x => χ x • ContinuousLinearMap.id ℝ PhaseMean.Tensor + have hL : ContDiff ℝ ∞ L := hχ.smul contDiff_const + refine ⟨mapTensorPolynomial L Q,mapTensorPolynomial_smooth hL hQ,?_⟩ + intro F hF x hx ε t + have hxt : x ∈ (chart (i : M)).target := by + by_contra hn + exact hx (by simp only [chartWeight,indicator_of_notMem hn]) + have hw : A.weight i ((chart (i : M)).symm x) ≠ 0 := by + simpa only [chartWeight,indicator_of_mem hxt] using hx + have hvalue := mapTensorPolynomial_eval L Q ε (A.jetChartMap i F) t x + rw [hvalue] + change χ x • coordinatePolynomialValue Q ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x) = _ + by_cases hz : B.outer j ((chart (i : M)).symm x) = 0 + · have hzero := A.cross_tensorChartRead_restore_zero B i j + (fun y => fiberFromThree (coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry y))) hxt hz + by_cases hxU : x ∈ U + · rw [hread F hF x hxU hw ε t,hzero,smul_zero] + · have hχx : χ x = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hxU (hχU h)) + rw [hχx,zero_smul,hzero] + · have hxK : x ∈ A.cross_pairSupport B i j := by + refine ⟨(chart (i : M)).symm x,⟨subset_tsupport _ hw,subset_tsupport _ hz⟩,?_⟩ + exact (chart (i : M)).right_inv hxt + rw [hχone x hxK,one_smul,hread F hF x (hKU hxK) hw ε t] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomialRead.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomialRead.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b46e6e2cd35afb202491231dc309fca76dd8306 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CrossAtlasRestoredPolynomialRead.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CrossAtlasPolynomialRead +import OAI.Geometry.SurfaceImmersion.Geometry.TensorExpressionLinearMap +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorTransition + +namespace OAI + +/-! A restored polynomial tensor has a constructed finite jet expression +in every overlapping correction chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base Expression) +open JetPolynomial.Perturbation +local instance crossRestoredReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance crossRestoredReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance crossRestoredReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance crossRestoredReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance crossRestoredReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance crossRestoredReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A B : SmoothingAtlas M) + +theorem cross_compact_restored_polynomial_read (i : A.centers) (j : B.centers) {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k r, (P k r).SmoothCoeffs univ) + {K : Set Base} (hK : IsCompact K) + (hKe : K ⊆ (transition (i : M) (j : M)).source) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ + U ⊆ (transition (i : M) (j : M)).source ∧ + ∃ P' : Fin 3 → Fin n → Expression, (∀ k r, (P' k r).SmoothCoeffs univ) ∧ + ∀ (F : M → Space), ContMDiff planeModel spaceModel ∞ F → + ∀ (x : Base), x ∈ U → A.weight i ((chart (i : M)).symm x) ≠ 0 → + ∀ ε t : ℝ, + coordinatePolynomialValue P' ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x) = + A.tensorChartRead i (B.bundleRestore B.tensorTriv j + (fun y => fiberFromThree (coordinatePolynomialValue P ε + (B.jetChartMap j F) t (JetPolynomial.planeCoordinateIsometry y)))) x := by + obtain ⟨U₁,hU₁,hKU₁,hU₁e,Q,hQ,hvalue⟩ := + A.cross_compact_polynomial_coordinate_read B i j P hP hK hKe + obtain ⟨U₂,hU₂,hKU₂,hU₂e,L,hL,hLe⟩ := + A.cross_compact_tensorRestoreTransition B i j hK hKe + refine ⟨U₁ ∩ U₂,hU₁.inter hU₂,fun x hx => ⟨hKU₁ hx,hKU₂ hx⟩, + fun x hx => hU₁e hx.1,mapTensorPolynomial L Q, + mapTensorPolynomial_smooth hL hQ,?_⟩ + intro F hF x hx hw ε t + have hq := hvalue F hF x hx.1 hw ε t + have hr := A.cross_tensorChartRead_restoreThree B i j + (fun y => coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry y)) (hU₁e hx.1) + (A.outer_one i _ (subset_tsupport (A.weight i) hw)) + calc + _ = L x (coordinatePolynomialValue Q ε (A.jetChartMap i F) t + (JetPolynomial.planeCoordinateIsometry x)) := + mapTensorPolynomial_eval L Q ε (A.jetChartMap i F) t x + _ = L x (coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x))) := + congrArg (L x) hq + _ = A.cross_tensorRestoreTransition B i j x + (coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x))) := + congrArg (fun C : PhaseMean.Tensor →L[ℝ] PhaseMean.Tensor => C + (coordinatePolynomialValue P ε (B.jetChartMap j F) t + (JetPolynomial.planeCoordinateIsometry (transition (i : M) (j : M) x)))) (hLe hx.2) + _ = _ := hr.symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/CutoffTensorPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/CutoffTensorPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..54c81465826a8b5c154deed70fcb78afdfc96f9c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/CutoffTensorPolynomial.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTensorPullback + +namespace OAI + +/-! Positional cutoffs of the actual finite tensor polynomial. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def cutoffTensorPolynomial {n : ℕ} (χ : Base → ℝ) + (P : Fin 3 → Fin n → Expression) : Fin 3 → Fin n → Expression := + fun k r => (Expression.coeff (fun z => χ (lowPosition z.1))).mul (P k r) + +lemma cutoffTensorPolynomial_smooth {n : ℕ} {χ : Base → ℝ} + (hχ : ContDiff ℝ ∞ χ) {P : Fin 3 → Fin n → Expression} + (hP : ∀ k r, (P k r).SmoothCoeffs univ) (k : Fin 3) (r : Fin n) : + (cutoffTensorPolynomial χ P k r).SmoothCoeffs univ := + Expression.smoothCoeffs_mul + ((hχ.comp (lowPosition.contDiff.comp contDiff_fst)).contDiffOn) (hP k r) + +lemma cutoffTensorPolynomial_eval {n : ℕ} (χ : Base → ℝ) + (P : Fin 3 → Fin n → Expression) (G : Base → Space) (z t : ℝ) (x : Base) : + coordinatePolynomialValue (cutoffTensorPolynomial χ P) z G t (planeCoordinateIsometry x) = + χ x • coordinatePolynomialValue P z G t (planeCoordinateIsometry x) := by + ext k + simp only [coordinatePolynomialValue,cutoffTensorPolynomial,Expression.eval_mul, + Expression.eval,lowPosition_lowJet,LinearIsometryEquiv.symm_apply_apply,Pi.smul_apply,smul_eq_mul] + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro r _ + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/DiagonalDefectModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/DiagonalDefectModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..cb13a01b21e41e851361a43d9597a33931c182b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/DiagonalDefectModel.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.EndpointSignModel + +namespace OAI + +/-! Diagonal transverse models retain the two prescribed axial zeros. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def diagonalDefectModel (b : ℝ → ℝ) (p q : ℝ) (x : Base) : Base := + normalizedAxisPolynomial p q x+(x 0*b (x 1)) • (![0,1] : Base) + +lemma diagonalDefectModel_smooth {b : ℝ → ℝ} (hb : ContDiff ℝ ∞ b) (p q : ℝ) : + ContDiff ℝ ∞ (diagonalDefectModel b p q) := by + unfold diagonalDefectModel + exact (normalizedAxisPolynomial_smooth p q).add + (((contDiff_apply ℝ ℝ 0).mul (hb.comp (contDiff_apply ℝ ℝ 1))).smul contDiff_const) + +lemma diagonalDefectModel_apply (b : ℝ → ℝ) (p q : ℝ) (x : Base) : + diagonalDefectModel b p q x = ![(x 1-p)*(x 1-q),x 0*b (x 1)] := by + ext i + fin_cases i <;> simp [diagonalDefectModel,normalizedAxisPolynomial] + +lemma diagonalDefectModel_axis (b : ℝ → ℝ) (p q t : ℝ) : + diagonalDefectModel b p q (crosscapAxis t) = ![(t-p)*(t-q),0] := by + simp [diagonalDefectModel_apply,crosscapAxis_apply] + +lemma diagonalDefectModel_fderiv_axis {b : ℝ → ℝ} (hb : ContDiff ℝ ∞ b) (p q t : ℝ) : + fderiv ℝ (diagonalDefectModel b p q) (crosscapAxis t) = + triangularPlaneJet 0 (b t) ((t-p)+(t-q)) := by + have hb' := (hb.differentiable (by simp) t).hasFDerivAt.comp + (crosscapAxis t) (hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) (crosscapAxis t)) + have hh := (normalizedAxisPolynomial_hasFDerivAt p q (crosscapAxis t)).add + (((hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) (crosscapAxis t)).mul hb').smul_const + (![0,1] : Base)) + change HasFDerivAt (diagonalDefectModel b p q) _ _ at hh + rw [hh.fderiv] + ext v i + fin_cases i <;> simp [triangularPlaneJet,crosscapAxis_apply] + ring + +lemma diagonalDefectModel_zero_iff {b : ℝ → ℝ} {p q : ℝ} + (hp : b p ≠ 0) (hq : b q ≠ 0) (x : Base) : + diagonalDefectModel b p q x = 0 ↔ x = crosscapAxis p ∨ x = crosscapAxis q := by + rw [diagonalDefectModel_apply] + constructor + · intro he + have h0 : (x 1-p)*(x 1-q) = 0 := congrFun he 0 + have h1 : x 0*b (x 1) = 0 := congrFun he 1 + rcases mul_eq_zero.mp h0 with h | h + · have hx : x 1 = p := sub_eq_zero.mp h + rw [hx] at h1 + have hz := (mul_eq_zero.mp h1).resolve_right hp + left + ext i + fin_cases i <;> simp [crosscapAxis_apply,hz,hx] + · have hx : x 1 = q := sub_eq_zero.mp h + rw [hx] at h1 + have hz := (mul_eq_zero.mp h1).resolve_right hq + right + ext i + fin_cases i <;> simp [crosscapAxis_apply,hz,hx] + · rintro (rfl | rfl) <;> ext i <;> fin_cases i <;> simp [crosscapAxis_apply] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionConvergence.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionConvergence.lean new file mode 100644 index 0000000000000000000000000000000000000000..d1dc2d31932ce6e7e5bb36603b0ce018b29a9605 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionConvergence.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionScales +import OAI.Geometry.SurfaceImmersion.Correction.ExactCorrectionLimit + +namespace OAI + +/-! +# Convergence after the derivative orders have been scheduled + +This combines the particular scales and increasing derivative budgets of +the exact-correction iteration with the smooth-series limit argument. +Constructing the increments with these bounds remains a separate step. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +open Filter +open scoped Topology ContDiff + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] [CompleteSpace V] + +omit [CompleteSpace V] in +/-- Increasing finite derivative budgets suffice: every fixed derivative +order eventually has a summable bound. -/ +theorem eventual_increment_bound {U : ℕ → E → V} {t ρ : ℝ} {k : ℕ → ℕ} + (hk : Tendsto k atTop atTop) + (hU : ∀ n m, m ≤ k n / 2 → ∀ x, + ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ * correctionScale t n) (m : ℕ) : + ∀ᶠ n in atTop, ∀ x, + ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ * correctionScale t n := by + filter_upwards [hk.eventually (eventually_ge_atTop (2 * m))] with n hn + exact hU n m (by omega) + +/-- Quantitative conclusion of the last part of `exact-correction.tex`: +the superlinear scale decay, increasing derivative orders, and bounded +normalized defect imply a smooth exact isometric limit. -/ +theorem exact_limit_of_increment_bounds + {F : E → V} {U : ℕ → E → V} {t ρ C : ℝ} {k : ℕ → ℕ} + (ht : 0 ≤ t) (htsmall : t ≤ 1 / 32) (hC : 0 ≤ C) + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) + (hk : Tendsto k atTop atTop) (hkpos : ∀ n, 1 ≤ k n) + (hinc : ∀ n m, m ≤ k n / 2 → ∀ x, + ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ * correctionScale t n) + (g : E → E → E → ℝ) + (herror : ∀ n x v w, + |inner ℝ (fderiv ℝ (partialMap F U n) x v) + (fderiv ℝ (partialMap F U n) x w) - g x v w| ≤ + C * correctionScale t n ^ (2 * k n) * ‖v‖ * ‖w‖) : + ContDiff ℝ ∞ (limitMap F U) ∧ + ∀ x v w, inner ℝ (fderiv ℝ (limitMap F U) x v) + (fderiv ℝ (limitMap F U) x w) = g x v w := by + have hscale := (correctionScale_summable ht htsmall).1 + have hsum : Summable (fun n => ρ * correctionScale t n) := hscale.mul_left ρ + have hb := eventual_increment_bound hk hinc + refine ⟨smooth_limitMap hF hU hsum hb, ?_⟩ + apply limitMap_metric_of_error_bound hF hU hsum hb g + (ε := fun n => C * correctionScale t n) + · simpa using hscale.tendsto_atTop_zero.const_mul C + · intro n x v w + have hsnonneg := correctionScale_nonneg ht n + have hsone : correctionScale t n ≤ 1 := by + have hg := correctionScale_le_geometric ht htsmall n + have hp : (1 / 2 : ℝ) ^ n ≤ 1 := pow_le_one₀ (by norm_num) (by norm_num) + nlinarith + have hp : correctionScale t n ^ (2 * k n) ≤ correctionScale t n := by + have hn : 1 ≤ 2 * k n := by have := hkpos n; omega + simpa only [pow_one] using pow_le_pow_of_le_one hsnonneg hsone hn + exact (herror n x v w).trans (by gcongr) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..4c7cad197d0e94a9a5bb629a2f713bbb93b077a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionLimit.lean @@ -0,0 +1,163 @@ +import Mathlib.Analysis.Calculus.SmoothSeries +import Mathlib.Analysis.InnerProductSpace.Calculus +import Mathlib.Tactic + +namespace OAI + +/-! +# Passing the correction sequence to a smooth isometric limit + +A correction sequence with eventually summable bounds at every derivative +order converges smoothly in coordinate space. Convergence of its pullback +metrics then gives an isometric immersion whenever the limiting metric is +positive definite. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +open Filter +open scoped Topology ContDiff + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] [CompleteSpace V] + +/-- Finite-stage maps, with the initial map kept separate from the corrections. -/ +def partialMap (F : E → V) (U : ℕ → E → V) (N : ℕ) (x : E) : V := + F x + ∑ n ∈ Finset.range N, U n x + +/-- The limit map defined by the convergent correction series. -/ +def limitMap (F : E → V) (U : ℕ → E → V) (x : E) : V := + F x + ∑' n, U n x + +/-- Each derivative order only needs a summable bound after a finite waiting +period. This is why the initial, uncontrolled high derivatives cause no problem. -/ +theorem smooth_limitMap {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) : + ContDiff ℝ ∞ (limitMap F U) := by + apply hF.add + apply contDiff_tsum_of_eventually (N := ⊤) hU (fun _ _ => hρ) + intro m _ + simpa only [Nat.cofinite_eq_atTop] using hbound m + +/-- Derivatives of the sum are the sums of the derivatives even though their +uniform bound is only eventually available. -/ +theorem hasFDerivAt_limitMap {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) (x : E) : + HasFDerivAt (limitMap F U) + (fderiv ℝ F x + ∑' n, fderiv ℝ (U n) x) x := by + have hb0 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), ‖U n y‖ ≤ ρ n := by + filter_upwards [hbound 0] with n hn y _ + simpa only [norm_iteratedFDeriv_zero] using hn y + have hb1 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), + ‖fderiv ℝ (U n) y‖ ≤ ρ n := by + filter_upwards [hbound 1] with n hn y _ + simpa only [norm_iteratedFDeriv_one] using hn y + have hval := tendstoUniformlyOn_tsum_nat_eventually hρ hb0 + have hder := tendstoUniformlyOn_tsum_nat_eventually hρ hb1 + have hs : HasFDerivAt (fun y => ∑' n, U n y) + (∑' n, fderiv ℝ (U n) x) x := by + apply hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hder + · intro N y _ + exact HasFDerivAt.fun_sum fun n _ => + ((hU n).differentiable (by simp) y).hasFDerivAt + · intro y hy + exact hval.tendsto_at hy + · exact Set.mem_univ x + exact ((hF.differentiable (by simp) x).hasFDerivAt.add hs) + +/-- The finite-stage differential converges in operator norm. -/ +theorem tendsto_fderiv_partialMap {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) (x : E) : + Tendsto (fun N => fderiv ℝ (partialMap F U N) x) atTop + (𝓝 (fderiv ℝ (limitMap F U) x)) := by + have hb1 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), + ‖fderiv ℝ (U n) y‖ ≤ ρ n := by + filter_upwards [hbound 1] with n hn y _ + simpa only [norm_iteratedFDeriv_one] using hn y + have hder := (tendstoUniformlyOn_tsum_nat_eventually hρ hb1).tendsto_at (Set.mem_univ x) + have hfinite (N : ℕ) : fderiv ℝ (partialMap F U N) x = + fderiv ℝ F x + ∑ n ∈ Finset.range N, fderiv ℝ (U n) x := by + exact ((hF.differentiable (by simp) x).hasFDerivAt.add + (HasFDerivAt.fun_sum fun n _ => + ((hU n).differentiable (by simp) x).hasFDerivAt)).fderiv + simp_rw [hfinite] + rw [(hasFDerivAt_limitMap hF hU hρ hbound x).fderiv] + exact tendsto_const_nhds.add hder + +/-- The pullback metric is continuous under the differential convergence just +proved, so a vanishing metric defect gives the exact desired metric. -/ +theorem limitMap_metric {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) + (g : E → E → E → ℝ) + (hmetric : ∀ x v w, Tendsto + (fun N => inner ℝ (fderiv ℝ (partialMap F U N) x v) + (fderiv ℝ (partialMap F U N) x w)) atTop (𝓝 (g x v w))) : + ∀ x v w, inner ℝ (fderiv ℝ (limitMap F U) x v) + (fderiv ℝ (limitMap F U) x w) = g x v w := by + intro x v w + have hd := tendsto_fderiv_partialMap hF hU hρ hbound x + have hv := ((ContinuousLinearMap.apply ℝ V v).continuous.tendsto _).comp hd + have hw := ((ContinuousLinearMap.apply ℝ V w).continuous.tendsto _).comp hd + exact tendsto_nhds_unique (hv.inner hw) (hmetric x v w) + +/-- Quantitative metric defects tending to zero imply the metric convergence +needed above. The bound is the bilinear operator-norm form of the residual +estimate produced by the correction iteration. -/ +theorem limitMap_metric_of_error_bound + {F : E → V} {U : ℕ → E → V} {ρ ε : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) + (g : E → E → E → ℝ) (hε : Tendsto ε atTop (𝓝 0)) + (herror : ∀ n x v w, + |inner ℝ (fderiv ℝ (partialMap F U n) x v) + (fderiv ℝ (partialMap F U n) x w) - g x v w| ≤ ε n * ‖v‖ * ‖w‖) : + ∀ x v w, inner ℝ (fderiv ℝ (limitMap F U) x v) + (fderiv ℝ (limitMap F U) x w) = g x v w := by + apply limitMap_metric hF hU hρ hbound g + intro x v w + apply tendsto_iff_norm_sub_tendsto_zero.mpr + apply squeeze_zero (fun n => norm_nonneg _) (fun n => ?_) + (show Tendsto (fun n => ε n * ‖v‖ * ‖w‖) atTop (𝓝 0) from by + simpa only [zero_mul] using (hε.mul_const ‖v‖).mul_const ‖w‖) + simpa only [Real.norm_eq_abs] using herror n x v w + +/-- Positive definiteness supplies injectivity; no separate rank estimate is +needed after the metric has passed to the limit. -/ +theorem limitMap_immersion {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) (hρ : Summable ρ) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ n) + (g : E → E → E → ℝ) + (hmetric : ∀ x v w, Tendsto + (fun N => inner ℝ (fderiv ℝ (partialMap F U N) x v) + (fderiv ℝ (partialMap F U N) x w)) atTop (𝓝 (g x v w))) + (hpos : ∀ x v, v ≠ 0 → 0 < g x v v) : + ContDiff ℝ ∞ (limitMap F U) ∧ + ∀ x, Function.Injective (fderiv ℝ (limitMap F U) x) := by + refine ⟨smooth_limitMap hF hU hρ hbound, ?_⟩ + have hm := limitMap_metric hF hU hρ hbound g hmetric + intro x v w hvw + apply sub_eq_zero.mp + by_contra hne + have hz : fderiv ℝ (limitMap F U) x (v - w) = 0 := by + rw [map_sub, hvw, sub_self] + have hp := hm x (v - w) (v - w) + rw [hz, inner_zero_left] at hp + exact (ne_of_gt (hpos x (v - w) hne)) hp.symm + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionRecurrence.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionRecurrence.lean new file mode 100644 index 0000000000000000000000000000000000000000..55522bdb48221410a1013e565b94b92cd7e04314 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExactCorrectionRecurrence.lean @@ -0,0 +1,103 @@ +import Mathlib.Analysis.SpecificLimits.ArithmeticGeometric +import Mathlib.Tactic + +namespace OAI + +/-! +# Scalar estimates for the smooth correction iteration + +The scalar recurrence used in `exact-correction.tex`, subsection +"Initialization and passage through the derivative orders", is treated here. +These are estimates for that iteration, not an isometric immersion existence theorem. +-/ + +namespace ClosedSurfaceR4.ExactCorrection + +open Filter +open scoped Topology + +/-- A tail of a subsolution is dominated by the corresponding affine recurrence. -/ +theorem affine_tail_bound {x : ℕ → ℝ} {a b : ℝ} (ha : 0 ≤ a) (N : ℕ) + (hstep : ∀ n, N ≤ n → x (n + 1) ≤ a * x n + b) (j : ℕ) : + x (N + j) ≤ arithGeom a b (x N) j := by + induction j with + | zero => simp + | succ j hj => + calc + x (N + (j + 1)) ≤ a * x (N + j) + b := hstep (N + j) (by omega) + _ ≤ a * arithGeom a b (x N) j + b := by gcongr + _ = arithGeom a b (x N) (j + 1) := rfl + +/-- An affine subsolution with contraction coefficient eventually lies below any +strict upper bound for the fixed point. -/ +theorem eventually_lt_of_affine_tail {x : ℕ → ℝ} {a b L : ℝ} + (ha : 0 ≤ a) (ha1 : a < 1) (hL : b / (1 - a) < L) (N : ℕ) + (hstep : ∀ n, N ≤ n → x (n + 1) ≤ a * x n + b) : + ∀ᶠ n in atTop, x n < L := by + have ht : Tendsto (arithGeom a b (x N)) atTop (𝓝 (b / (1 - a))) := + tendsto_arithGeom_nhds_of_lt_one ha ha1 + obtain ⟨K, hK⟩ := eventually_atTop.mp (ht.eventually (gt_mem_nhds hL)) + filter_upwards [eventually_ge_atTop (N + K)] with n hn + have hNK : N + (n - N) = n := by omega + have hbound := affine_tail_bound ha N hstep (n - N) + rw [hNK] at hbound + exact lt_of_le_of_lt hbound (hK (n - N) (by omega)) + +/-- The all-order recurrence from the manuscript eventually enters every +strict upper neighborhood of its baseline. No initial bound on `x` is required. -/ +theorem eventually_lt_of_vanishing_recurrence {x c : ℕ → ℝ} {A L : ℝ} + (hx : ∀ n, 0 ≤ x n) (hA : 0 ≤ A) + (hc : Tendsto c atTop (𝓝 0)) + (hstep : ∀ n, x (n + 1) ≤ A + c n * (1 + x n)) (hAL : A < L) : + ∀ᶠ n in atTop, x n < L := by + let a : ℝ := (L - A) / (2 * (L + 1)) + have hL : 0 < L := lt_of_le_of_lt hA hAL + have hden : 0 < 2 * (L + 1) := by positivity + have ha : 0 < a := div_pos (sub_pos.mpr hAL) hden + have ha1 : a < 1 := by + dsimp [a] + apply (div_lt_one hden).mpr + linarith + have hafix : (A + a) / (1 - a) < L := by + apply (div_lt_iff₀ (sub_pos.mpr ha1)).mpr + have heq : a * (L + 1) = (L - A) / 2 := by + dsimp [a] + field_simp + nlinarith + obtain ⟨N, hN⟩ := eventually_atTop.mp (hc.eventually (gt_mem_nhds ha)) + apply eventually_lt_of_affine_tail ha.le ha1 hafix N + intro n hn + calc + x (n + 1) ≤ A + c n * (1 + x n) := hstep n + _ ≤ A + a * (1 + x n) := by + have hn0 : 0 ≤ 1 + x n := by linarith [hx n] + have hm := mul_le_mul_of_nonneg_right (hN n hn).le hn0 + exact add_le_add_right hm A + _ = a * x n + (A + a) := by ring + +/-- In particular, each fixed derivative order reaches the next block's +budget after finitely many steps, as asserted in the exact-correction proof. -/ +theorem eventually_below_budget {x c : ℕ → ℝ} {B : ℝ} + (hB : 0 < B) (hx : ∀ n, 0 ≤ x n) (hc : Tendsto c atTop (𝓝 0)) + (hstep : ∀ n, x (n + 1) ≤ B / 4 + c n * (1 + x n)) : + ∀ᶠ n in atTop, x n < B := + eventually_lt_of_vanishing_recurrence hx (by positivity) hc hstep (by linarith) + +/-- All six exponents in the exact-correction error table are positive at +and after the initial block `k = 10`. -/ +theorem error_exponents_pos {k : ℝ} (hk : 10 ≤ k) : + 0 < (13 * k + 8) / 5 ∧ + 0 < (3 * k - 18) / 5 ∧ + 0 < (18 * k + 8) / 5 ∧ + 0 < (38 * k + 28) / 5 ∧ + 0 < (13 * k + 8) / 5 ∧ + 0 < (33 * k + 28) / 5 := by + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> [linarith; skip] + constructor <;> linarith + +end ClosedSurfaceR4.ExactCorrection + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitCorrectionBudgetThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitCorrectionBudgetThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..ebf9986c3b4fb204516f98772ccb2720e3668bc4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitCorrectionBudgetThreshold.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitPowerThreshold + +namespace OAI + +/-! An explicit scale preserving the input and metric correction budgets. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection + +def correctionBudgetThreshold (A B a N L : ℝ) : ℝ := + min (powerThreshold 5 |N*(1+B)| (B-A)) + (powerThreshold 5 |L*(1+2*B)| (a/8)) + +theorem correctionBudgetThreshold_spec {A B a N L : ℝ} (hAB : A < B) (ha : 0 < a) : + 0 < correctionBudgetThreshold A B a N L ∧ + correctionBudgetThreshold A B a N L ≤ 1 ∧ + ∀ t : ℝ, 0 < t → t < correctionBudgetThreshold A B a N L → + A+N*t^(1/5 : ℝ)*(1+B) ≤ B ∧ L*(1+2*B)*t^(1/5 : ℝ) ≤ a/8 := by + have h₁ := powerThreshold_spec (n := 5) (by decide) (abs_nonneg (N*(1+B))) + (sub_pos.mpr hAB) (show ((5 : ℕ) : ℝ)⁻¹ ≤ (1/5 : ℝ) by norm_num) + have h₂ := powerThreshold_spec (n := 5) (by decide) (abs_nonneg (L*(1+2*B))) + (show 0 < a/8 by positivity) (show ((5 : ℕ) : ℝ)⁻¹ ≤ (1/5 : ℝ) by norm_num) + refine ⟨lt_min h₁.1 h₂.1, (min_le_left _ _).trans h₁.2.1,?_⟩ + intro t ht hsmall + have h₁t := (h₁.2.2 t ht (hsmall.trans_le (min_le_left _ _))).le + have h₂t := (h₂.2.2 t ht (hsmall.trans_le (min_le_right _ _))).le + have hpow : 0 ≤ t^(1/5 : ℝ) := Real.rpow_nonneg ht.le _ + have hn := mul_le_mul_of_nonneg_right (le_abs_self (N*(1+B))) hpow + have hl := mul_le_mul_of_nonneg_right (le_abs_self (L*(1+2*B))) hpow + constructor + · nlinarith + · exact hl.trans h₂t + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitGlobalQuadraticCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitGlobalQuadraticCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..15bcf4fa19100ba47c981f07ba47aec8108bcec0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExplicitGlobalQuadraticCorrection.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CardinalityQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitQuadraticSolverInput +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticInputBudgets + +namespace OAI + +/-! Actual global quadratic correction with explicit polynomial budgets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance explicitGlobalQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance explicitGlobalQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance explicitGlobalQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance explicitGlobalQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance explicitGlobalQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance explicitGlobalQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem explicit_global_quadratic_correction : + ∃ Dv Dt D : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ (∀ m, 0 ≤ D m) ∧ + ∀ {ι : Type*} [Fintype ι] [DecidableEq ι], ∀ n : ℕ, Fintype.card ι ≤ n → + ∀ (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 emptyMetricPolynomial 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 → ∀ δ : ℝ, 0 ≤ δ → ∀ q : ℕ, + ∀ C J I α β : ℕ → ℝ, (∀ m, 1 ≤ I m) → (∀ m, 0 ≤ α m) → (∀ m, 0 ≤ β m) → + (∀ k l, (c k l).C = C ∧ (c k l).D = (fun _ => 0) ∧ (c k l).J = J) → + (∀ 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 m) → + (∀ k a m, WeightedEstimates.WeightedBound univ s (m+1) (α m*(δ*τ)) + (A.vectorPlaneRead k (Z a))) → + (∀ k a m v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m (β m) + (SmallModes.coordDeriv v (A.vectorPlaneRead k (φ a)))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (δ^2*(Dv m*(Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)* + quadraticSizeBudget q m D C J I α β)) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (δ^2*(τ/s)^(q+1)*(Dt m*(Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)* + quadraticResidualBudget q m D C J I α β)) + (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 + choose E hE he using fun (k : A.centers) m => + cutoff_square_complex_bound (A.supportedPlaneWeight k) m + let D := fun m => ∑ k : A.centers, E k m + have hD (m : ℕ) : 0 ≤ D m := Finset.sum_nonneg (fun k _ => hE k m) + have hED (k : A.centers) (m : ℕ) : E k m ≤ D m := + Finset.single_le_sum (fun i _ => hE i m) (Finset.mem_univ k) + obtain ⟨Dv,Dt,hDv,hDt,hsolve⟩ := A.cardinality_quadratic_cancellation + refine ⟨Dv,Dt,D,hDv,hDt,hD,?_⟩ + intro ι inst dec n hn F hF φ Z hφ hZ S hS hSZ τ s c hτ hs hτs hs1 δ hδ q C J I α β hI hα hβ hc hi hz hp + let N := fun m => quadraticInputBudget m D I α β + have hN (m : ℕ) : 0 ≤ N m := by + have ht := tensorChartBudget_nonneg m (zero_le_one.trans (hI m)) + (zero_le_one.trans (hI (m+1))) + have hd := hD m + dsimp [N,quadraticInputBudget,quadraticTargetBudget] + positivity + have hinput (k : A.centers) (l : RealModes.QuadraticLabel ι) (m : ℕ) : + (c k l).norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m ≤ δ^2*N m := by + have hnorm := A.quadratic_solver_input_bound_of_cutoff_bound k m (hE k m) (he k m) + (α m) (β m) τ δ s φ Z hφ hZ S hS hSZ hτ hs hτs hs1 hδ (hα m) (hβ m) + (fun a => hz k a m) (fun a v hv => hp k a m v hv) l (c k l) I hI (hi k l) + have hquad : quadraticTargetBudget m (E k m) (α m) (β m) ≤ + quadraticTargetBudget m (D m) (α m) (β m) := by + dsimp [quadraticTargetBudget] + gcongr + exact hED k m + have ht := tensorChartBudget_nonneg m (zero_le_one.trans (hI m)) + (zero_le_one.trans (hI (m+1))) + apply hnorm.trans + dsimp [N,quadraticInputBudget] + exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hquad ht) (sq_nonneg δ) + have hsize (k l m) : (c k l).sizeFactor q m ≤ max 1 (metricForcedSizeBudget C J (fun _ => 1) q m) := by + rw [(c k l).metric_sizeFactor_eq (fun r => congrFun (hc k l).2.1 r) q m,(hc k l).1,(hc k l).2.2] + exact le_max_right _ _ + have hres (k l m) : (c k l).residualFactor q m ≤ max 1 (metricForcedResidualBudget C J (fun _ => 1) q m) := by + rw [(c k l).metric_residualFactor_eq (fun r => congrFun (hc k l).2.1 r) q m,(hc k l).1,(hc k l).2.2] + exact le_max_right _ _ + obtain ⟨W,hW,hv,ht⟩ := hsolve n hn F hF φ Z hφ hZ S hS hSZ c hτ hs hτs hs1 δ q + (fun m => max 1 (metricForcedSizeBudget C J (fun _ => 1) q m)) + (fun m => max 1 (metricForcedResidualBudget C J (fun _ => 1) q m)) N + (fun _ => zero_le_one.trans (le_max_left _ _)) + (fun _ => zero_le_one.trans (le_max_left _ _)) hN hsize hres hinput + refine ⟨W,hW,?_,?_⟩ + · intro m k + apply (hv m k).mono_const + apply le_of_eq + dsimp [N,quadraticSizeBudget] + ring + · intro m k + apply (ht m k).mono_const + apply le_of_eq + dsimp [N,quadraticResidualBudget] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ExtendedCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExtendedCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..cdecb402673b677f1fb3dc9a4e393e6e41cd2aef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ExtendedCombinedMean.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalCombinedMeanBounds + +namespace OAI + +/-! Extend the actual local combined mean through its fixed compact support. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +open JetPolynomial (SupportedField) +open JetPolynomial.Perturbation (modeSupport) + +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +def extendedCombinedMean (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : Base → Tensor := + U.indicator (localCombinedMean h hρ hKV P G δ τ ε R q A) + +lemma extendedCombinedMean_smooth (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + {S : Set Base} (hS : IsClosed S) (hSU : S ⊆ U) + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + {P : Fin 3 → Fin n → JetPolynomial.Expression} {J : Set JetPolynomial.Base} + {O : Set JetPolynomial.LowJet} (hJ : IsOpen J) (hO : IsOpen O) + (hP : ∀ i l, (P i l).SmoothCoeffs O) {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (JetPolynomial.lowJet G) J O) + (hKJ : (K : Set JetPolynomial.Base) ⊆ J) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : + ContDiff ℝ ∞ (extendedCombinedMean h hρ hKV P G δ τ ε R q A) := + contDiff_indicator_of_support h.openU hS hSU + (localCombinedMean_smooth h hρ hKV hJ hO hP hG hGQ hKJ δ τ ε R q A) + (localCombinedMean_vanishes h hρ hKV hsp P G δ τ ε R q A) + +lemma extendedCombinedMean_value (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + {S : Set Base} (hS : IsClosed S) (hSU : S ⊆ U) + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) + {m : ℕ} {C : ℝ} (hC : 0 ≤ C) + (hb : WeightedBound U s m C (localCombinedMean h hρ hKV P G δ τ ε R q A)) : + WeightedBound Set.univ s m C (extendedCombinedMean h hρ hKV P G δ τ ε R q A) := + hb.indicator_of_support h.openU hS hSU hC (localCombinedMean_vanishes h hρ hKV hsp P G δ τ ε R q A) + +lemma extendedCombinedMean_difference (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + {S : Set Base} (hS : IsClosed S) (hSU : S ⊆ U) + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A B : Base → Tensor) + {m : ℕ} {C : ℝ} (hC : 0 ≤ C) + (hb : WeightedBound U s m C (localCombinedMean h hρ hKV P G δ τ ε R q A - + localCombinedMean h hρ hKV P G δ τ ε R q B)) : + WeightedBound Set.univ s m C (extendedCombinedMean h hρ hKV P G δ τ ε R q A - + extendedCombinedMean h hρ hKV P G δ τ ε R q B) := by + have hz : ∀ x ∈ U, x ∉ S → (localCombinedMean h hρ hKV P G δ τ ε R q A - + localCombinedMean h hρ hKV P G δ τ ε R q B) x = 0 := by + intro x hx hs + rw [Pi.sub_apply, localCombinedMean_vanishes h hρ hKV hsp P G δ τ ε R q A x hx hs, + localCombinedMean_vanishes h hρ hKV hsp P G δ τ ε R q B x hx hs, sub_self] + have hh := hb.indicator_of_support h.openU hS hSU hC hz + apply hh.congr + intro x _ + by_cases hx : x ∈ U + · simp only [extendedCombinedMean, Set.indicator_of_mem hx, Pi.sub_apply] + · simp only [extendedCombinedMean, Set.indicator_of_notMem hx, Pi.sub_apply, sub_self] + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FinishSmoothTail.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinishSmoothTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..122f3fbf03e9b71079a2b499f453d12e16c1262b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinishSmoothTail.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ResolvedPrefixAppend +import OAI.Geometry.SurfaceImmersion.Whitney.EndpointRegularArcs +import OAI.Geometry.SurfaceImmersion.Geometry.OriginalRegularSegment + +namespace OAI + +/-! Finish a resolved smooth prefix at the original final endpoint. -/ +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 finish_smooth_tail (hγ : FiniteRegularPath planeModel γ) (hi : Function.Injective γ) + (B : ∀ i, LocalCornerBridge γ (T i) O) {J : Set ι} {a A : ℝ} + (ha : 0 < a) (ha1 : a < 1) (hAa : A < a) (hA : 0 ≤ A) + (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) + (hreg : ∀ t ∈ Ioo A 1, ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t)) + (P : SmoothArcTail γ.extend a) + (hPi : P.arc.curve '' Icc P.arc.start P.arc.finish ⊆ resolvedPrefixImage γ B J a) : + ∃ R : SmoothCompactArc planeModel M, + R.curve R.start = P.arc.curve P.arc.start ∧ R.curve R.finish = q ∧ + R.curve '' Icc R.start R.finish ⊆ resolvedPrefixImage γ B J 1 := by + obtain ⟨Q,l,hal,hl1,hQs,hQf,hQmatch,hQend,hQgerm⟩ := + last_regular_arc hγ hi (sub_pos.mpr ha1) (by linarith) + have hal' : a < l := by linarith + obtain ⟨S,hSs,hSf,hSc⟩ := original_regular_segment hi isOpen_Ioo + (fun _ ht => ⟨hA.trans_lt ht.1,ht.2⟩) hreg hal' + (fun u hu => ⟨hAa.trans_le hu.1,hu.2.trans_lt hl1⟩) + obtain ⟨P',hP'i,hP's⟩ := append_resolved_segment B hi ha.le hal' hl1.le hJ hsep P hPi S hSs hSf hSc + have hJ' : ∀ i ∈ J, (B i).right ≤ l := fun i hiJ => (hJ i hiJ).trans hal'.le + 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 + have ht' : t ∈ Ioc l 1 := by simpa only [hQs,hQf] using ht + rw [hQmatch t ⟨ht'.1.le,ht'.2⟩] + exact resolvedPrefixImage_avoids_future B hi hl1.le hJ' hsep _ + (hP'i (mem_image_of_mem P'.arc.curve hs)) t ht' + have hidg : Q.curve =ᶠ[𝓝 Q.start] γ.extend ∘ id := hQgerm + obtain ⟨R,e,hes,hei,hem,hRs,hRf,hRi,hRstart,hRend,_,_⟩ := + join_shared_parameter_arcs γ.extend P'.arc Q P'.parameter id P'.smooth contDiff_id + P'.forward (by simp) (P'.value.trans hQs.symm) P'.germ hidg hcross + refine ⟨R,hRstart.trans hP's,hRend.trans hQend,?_⟩ + rw [hRi] + apply union_subset + · exact hP'i.trans (resolvedPrefixImage_mono B (Subset.refl _) hl1.le) + · intro x hx + obtain ⟨u,hu,rfl⟩ := hx + have hu' : u ∈ Icc l 1 := by simpa only [hQs,hQf] using hu + rw [hQmatch u hu'] + exact Or.inl ⟨u,⟨ha.le.trans (hal'.le.trans hu'.1),hu'.2⟩,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAdjustedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAdjustedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca195719804449670dc9c9330daea991aae4150c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAdjustedMean.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AssembledZeroMean + +namespace OAI + +/-! The actual quadratic zero-phase tensor is adjusted to its target by a +finite construction; no derivative-losing infinite iteration is used. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.PhaseMean +open SmallModes WeightedEstimates FiniteMean +variable {ι : Type*} {s r ρ R₀ : ℝ} {reference : Base → Tensor} {n L : ℕ} + +theorem finite_adjusted_quadratic_mean (a : Finset ι) + (c : ι → CombinedMeanChart s r ρ R₀ reference n L) + (hs : 0 < s) (hs1 : s ≤ 1) (hρ : 0 < ρ) (q steps : ℕ) + {H : Base → Tensor} {r₀ : ℝ} (hgap : r₀ < r) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) + (hdecomp : ∀ A : Base → Tensor, ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + ∀ x, ∑ i ∈ a, (c i).leading A x = A x) : + let ℓ := a.sup (fun i => (c i).loss q) + let p₀ := a.sup (fun i => (c i).exponent) + ∃ B K : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (δ τ ε : ℝ) (p : ℕ), 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + p₀ ≤ p → τ / s + ε / τ ^ p ≤ η₀ → + ∀ R : ∀ i, (c i).Operator, + (∀ i ∈ a, (c i).OperatorBound hs τ ε p (R i)) → + ∀ j ≤ steps, ∃ A : Base → Tensor, ContDiff ℝ ∞ A ∧ + InTrialBall Set.univ reference r A ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound ℓ C B j m) A) ∧ + (∀ m, WeightedBound Set.univ s m (δ ^ 2 * + (differenceBound ℓ C B K j m * (τ / s + ε / τ ^ p) ^ (j + 1))) + (assembledQuadraticMean a c hρ δ τ ε R q A - δ ^ 2 • H)) := by + obtain ⟨B, K, η₀, hη₀, hη₁, ht⟩ := finite_assembled_combined_mean a c hs hs1 hρ q steps hgap hC hH hH0 hbH + refine ⟨B, K, η₀, hη₀, hη₁, ?_⟩ + intro δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR j hj + obtain ⟨ha, hb, hc, hd⟩ := ht δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR j hj + let A := fixedTrial H (assembledCombinedMean a c hρ δ τ ε R q) j + refine ⟨A, ha, hb, hc, ?_⟩ + intro m + exact assembledQuadraticMean_residual a c hρ δ τ ε hδ.ne' hτ.ne' R q ha hH hb (hdecomp A ha hb) (hd m) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..53421e453665ef5fb361cec3e05ab9d325ce76f2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeMetric.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasGlobalQuadratic +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamily + +namespace OAI + +/-! Exact global free-mode identities for an arbitrary finite family in +each fixed atlas chart. This accommodates the variable number of grid cells. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance finiteAtlasFreeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance finiteAtlasFreeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance finiteAtlasFreeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance finiteAtlasFreeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance finiteAtlasFreeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance finiteAtlasFreeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} +local instance finiteAtlasIndexDecidable : DecidableEq (Σ i, ι i) := Classical.decEq _ + +def finiteGlobalPhase (i : A.centers) (j : ι i) : M → ℝ := + restore (i : M) (A.outer i) (φ i j) + +def finiteGlobalAmplitude + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : ι i) : M → Fin 4 → ℂ := + restore (i : M) (A.outer i) ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) + +def finiteAtlasFreeOscillation + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + M → RealModes.RVec 4 := + ∑ a : Σ i, ι i, surfaceMode τ (A.finiteGlobalPhase (φ := φ) a.1 a.2) + (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2) + +omit [CompactSpace M] in +lemma finiteAtlasFreeOscillation_smooth + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) : + ContMDiff planeModel 𝓘(ℝ, RealModes.RVec 4) ∞ + (A.finiteAtlasFreeOscillation d hρ δ q u) := by + have hh := ContMDiff.sum (t := Finset.univ) (fun (a : Σ i, ι i) _ => surfaceMode_smooth τ + (restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) + (c a.1 a.2).smoothPhase) + (restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) + ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff)) + convert hh using 1 + funext x + simp only [finiteAtlasFreeOscillation,finiteGlobalPhase,finiteGlobalAmplitude,Finset.sum_apply] + +theorem finite_atlas_zeroPhase + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • RealModes.zeroPhaseSum τ + (fun a : Σ i, ι i => A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) a.1 a.2)) + (fun a : Σ i, ι i => A.vectorPlaneRead k + (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2)) x) = + A.tensorPlaneRestore (fun i => RealModes.zeroPhaseSum τ + (fun j => coordinatePhase (φ i j)) + (fun j => coordinateAmplitude ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)))) := by + classical + let Z₀ := fun (a : Σ i, ι i) => RealModes.phaseZeroTensor τ + (coordinatePhase (φ a.1 a.2)) + (coordinateAmplitude ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + let T := fun (a : Σ i, ι i) (k : A.centers) (x : SmallModes.Base) => + (A.planeWeight k x)^2 • RealModes.phaseZeroTensor τ + (A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) a.1 a.2)) + (A.vectorPlaneRead k (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2)) x + have ht (a : Σ i, ι i) : A.tensorPlaneRestore (T a) = + A.bundleRestore A.tensorTriv a.1 (fun y => fiberFromThree (Z₀ a (planeCoordinateIsometry y))) := by + have hs := (coordinateAmplitude_support + ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))).trans (hK a.1 a.2) + have hh := A.restored_zeroPhase a.1 τ (coordinatePhase (φ a.1 a.2)) + (coordinateAmplitude ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u))) + ((c a.1 a.2).smoothPhase.comp planeCoordinateIsometry.symm.contDiff) + (((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff.comp + planeCoordinateIsometry.symm.contDiff) hs + simpa only [T,Z₀,finiteGlobalPhase,finiteGlobalAmplitude,coordinatePhase,coordinateAmplitude, + Function.comp_def,LinearIsometryEquiv.symm_apply_apply] using hh + have he : (fun k x => (A.planeWeight k x)^2 • RealModes.zeroPhaseSum τ + (fun a : Σ i, ι i => A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) a.1 a.2)) + (fun a : Σ i, ι i => A.vectorPlaneRead k + (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2)) x) = ∑ a : Σ i, ι i, T a := by + funext k x + simp only [T,RealModes.zeroPhaseSum,Finset.smul_sum,Finset.sum_apply] + rw [he,A.tensorPlaneRestore_sum] + simp_rw [ht] + rw [Fintype.sum_sigma] + funext p + simp only [tensorPlaneRestore,RealModes.zeroPhaseSum,Z₀,Finset.sum_apply, + bundleRestore,map_sum,Finset.smul_sum] + +theorem finite_atlas_free_metric + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + inducedTensor (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u) = + δ^2 • A.tensorPlaneRestore (fun i => + chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) + + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) + + A.tensorPlaneRestore (fun k x => (A.planeWeight k x)^2 • RealModes.nonzeroPhaseSum τ + (fun a : Σ i, ι i => A.vectorPlaneRead k (A.finiteGlobalPhase (φ := φ) a.1 a.2)) + (fun a : Σ i, ι i => A.vectorPlaneRead k + (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2)) x) := by + classical + have hphase (a : Σ i, ι i) : ContMDiff planeModel 𝓘(ℝ) ∞ + (A.finiteGlobalPhase (φ := φ) a.1 a.2) := + restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) (c a.1 a.2).smoothPhase + have hamp (a : Σ i, ι i) : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ + (A.finiteGlobalAmplitude d hρ δ q u a.1 a.2) := + restore_smooth (a.1 : M) (A.outer_smooth a.1) (A.outer_support a.1) + ((d a.1 a.2).freeAmplitude hρ δ q (A.tensorPlaneRead a.1 u)).contDiff + have hm := A.global_modes_metric τ + (fun a : Σ i, ι i => A.finiteGlobalPhase (φ := φ) a.1 a.2) + (fun a : Σ i, ι i => A.finiteGlobalAmplitude d hρ δ q u a.1 a.2) hphase hamp + rw [A.finite_atlas_zeroPhase d hρ δ q u hK] at hm + have hlocal (i : A.centers) : RealModes.zeroPhaseSum τ + (fun j => coordinatePhase (φ i j)) + (fun j => coordinateAmplitude ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u))) = + δ^2 • (chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) + + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) := by + have hz : combinedQuadraticMean (P i) 0 (G i) (φ i) + (fun j => (d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) τ 0 = + RealModes.zeroPhaseSum τ (fun j => coordinatePhase (φ i j)) + (fun j => coordinateAmplitude ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u))) := by + ext x k + simp [combinedQuadraticMean,coordinateQuadraticMean,quadraticMeanCoefficient,conjugated] + rw [← hz] + exact charted_family_zero_phase_identity (d i) hρ hδ hτ q (A.tensorPlaneRead i u) + have he : (fun i => RealModes.zeroPhaseSum τ (fun j => coordinatePhase (φ i j)) + (fun j => coordinateAmplitude ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)))) = + δ^2 • (fun i => chartedFamilyLeading (d i) hρ (A.tensorPlaneRead i u) + + chartedFamilyMean (d i) hρ δ q (A.tensorPlaneRead i u)) := funext hlocal + rw [he,A.tensorPlaneRestore_smul] at hm + exact hm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeRestore.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeRestore.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1e9ad14d5e84ba2e6a51a6251d6f5436557a99c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteAtlasFreeRestore.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeMetric + +namespace OAI + +/-! The variable-family oscillation is the restoration of its local free sums. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + +lemma finiteAtlasFreeOscillation_eq_restore + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.finiteAtlasFreeOscillation d hρ δ q u = + A.vectorPlaneRestore (fun i => chartedFreeSum (d i) hρ δ q (A.tensorPlaneRead i u)) := by + classical + have hj (i : A.centers) (j : ι i) : + restore (i : M) (A.outer i) + ((d i j).displacement hρ δ q (A.tensorPlaneRead i u) ∘ planeCoordinateIsometry) = + surfaceMode τ (A.finiteGlobalPhase (φ := φ) i j) (A.finiteGlobalAmplitude d hρ δ q u i j) := by + have hh := A.restore_displacement i τ (coordinatePhase (φ i j)) + (coordinateAmplitude ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u))) + ((coordinateAmplitude_support _).trans (hK i j)) + simpa only [ChartedMeanData.displacement,PolynomialSolveData.freeDisplacement, + ChartedMeanData.freeAmplitude,finiteGlobalPhase,finiteGlobalAmplitude, + coordinatePhase,coordinateAmplitude,Function.comp_def,LinearIsometryEquiv.symm_apply_apply] using hh + have hi (i : A.centers) : + restore (i : M) (A.outer i) + (chartedFreeSum (d i) hρ δ q (A.tensorPlaneRead i u) ∘ planeCoordinateIsometry) = + ∑ j : ι i, surfaceMode τ (A.finiteGlobalPhase (φ := φ) i j) + (A.finiteGlobalAmplitude d hρ δ q u i j) := by + calc + _ = ∑ j : ι i, restore (i : M) (A.outer i) + ((d i j).displacement hρ δ q (A.tensorPlaneRead i u) ∘ planeCoordinateIsometry) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · simp only [restore,indicator_of_mem hp,Function.comp_apply,chartedFreeSum_eq, + Finset.sum_apply,Finset.smul_sum] + · simp only [restore,indicator_of_notMem hp,Finset.sum_apply,Finset.sum_const_zero] + _ = _ := Finset.sum_congr rfl (fun j _ => hj i j) + rw [finiteAtlasFreeOscillation,Fintype.sum_sigma] + exact (Finset.sum_congr rfl (fun i _ => hi i)).symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..885325095e45e51bedb3cfc11f9416e4a7dcc689 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCombinedMean.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CombinedMeanMajorants + +namespace OAI + +/-! Finite adjustment by the actual combined metric and polynomial mean. +The threshold is chosen before the short scale and perturbation operator. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +open JetPolynomial (SupportedField supportedWeightedSeminorm) +open JetPolynomial.Perturbation (modeSupport) + +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +theorem finite_combined_mean_adjustment (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 : (modeSupport K : Set Base) ⊆ V) + {S : Set Base} (hS : IsClosed S) (hSU : S ⊆ U) + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + {P : Fin 3 → Fin n → JetPolynomial.Expression} {J : Set JetPolynomial.Base} + {O Q₀ : Set JetPolynomial.LowJet} (hJ : IsOpen J) (hO : IsOpen O) + (hQ₀ : IsCompact Q₀) (hQO : Q₀ ⊆ O) (hP : ∀ i l, (P i l).SmoothCoeffs O) + (hKJ : (K : Set JetPolynomial.Base) ⊆ J) + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (JetPolynomial.lowJet G) J Q₀) + {L : ℕ} (D B₀ : ℕ → ℝ) (hD : ∀ m, 0 ≤ D m) (hB₀ : ∀ m, 1 ≤ B₀ m) + (hGb : ∀ m, WeightedBound J s (m + JetPolynomial.Perturbation.tensorOrder P) (B₀ m) (JetPolynomial.lowJet G)) + (q steps : ℕ) {H : Base → Tensor} {r₀ : ℝ} (hgap : r₀ < r) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiff ℝ ∞ H) + (hH0 : ∀ x, ‖H x - reference x‖ ≤ r₀) + (hbH : ∀ m, WeightedBound Set.univ s m (C m) H) : + let ℓ := JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (δ τ ε : ℝ) (p : ℕ), 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + JetPolynomial.Perturbation.tensorLoss P ≤ p → τ / s + ε / τ ^ p ≤ η₀ → + ∀ (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ (m + L) Z) → + let T := extendedCombinedMean h hρ hKV P G δ τ ε R q + ∀ j ≤ steps, ContDiff ℝ ∞ (fixedTrial H T j) ∧ + InTrialBall Set.univ reference r (fixedTrial H T j) ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound ℓ C β j m) (fixedTrial H T j)) ∧ + (∀ m, WeightedBound Set.univ s m + (differenceBound ℓ C β κ j m * (τ / s + ε / τ ^ p) ^ (j + 1)) + (fixedTrial H T j + T (fixedTrial H T j) - H)) := by + obtain ⟨β, κ, hm⟩ := extendedCombinedMean_majorants (L := L) h d hs hs1 hρ hKV hS hSU hsp + hJ hO hQ₀ hQO hP hKJ hG hGQ D B₀ hD hB₀ hGb q + obtain ⟨η₀, hη₀, hη₁, ht⟩ := finite_substitution_uniform (B := β) (K := κ) + isOpen_univ.uniqueDiffOn hs.le hgap hC hH.contDiffOn (fun x _ => hH0 x) hbH steps + refine ⟨β, κ, η₀, hη₀, hη₁, ?_⟩ + intro δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR + have hη : 0 < τ / s + ε / τ ^ p := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + have hT := hm δ τ ε p hδ hτ hτs hε hε1 hp (hsmall.trans hη₁) R hR + dsimp only + intro j hj + obtain ⟨ha, hb, hc, hd⟩ := ht _ hT _ hη hsmall j hj + refine ⟨?_, ?_, ?_, ?_⟩ + · exact contDiffOn_univ.mp (by simpa only [trial_rescaledMean hη.ne'] using ha) + · simpa only [trial_rescaledMean hη.ne'] using hb + · simpa only [trial_rescaledMean hη.ne'] using hc + · simpa only [trial_rescaledMean hη.ne', rescaledMean_self hη.ne'] using hd + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCorrectionGerms.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCorrectionGerms.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8245aa27818e82b44a94e8e8932f85eed22cf5f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteCorrectionGerms.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedSphericalGerm +import OAI.Geometry.SurfaceImmersion.Atlas.QuadraticCutoffBounds + +namespace OAI + +/-! Finite disjoint corrections retain each prescribed local jet. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.SphericalJets + +lemma finite_sum_germ_of_disjoint_supports {E V ι : Type*} + [TopologicalSpace E] [AddCommMonoid V] [DecidableEq ι] + (s : Finset ι) (q : ι → E → V) (K : ι → Set E) + (hs : ∀ i ∈ s, tsupport (q i) ⊆ K i) + (hdisj : (↑s : Set ι).Pairwise fun i j => Disjoint (K i) (K j)) + {i : ι} (hi : i ∈ s) {p : E} (hp : p ∈ K i) : + (fun x => ∑ j ∈ s, q j x) =ᶠ[𝓝 p] q i := by + have he : ∀ᶠ x in 𝓝 p, ∀ j ∈ s, j ≠ i → q j x = 0 := by + apply (eventually_all_finset s).mpr + intro j hj + by_cases hji : j = i + · exact Filter.Eventually.of_forall fun _ hn => False.elim (hn hji) + · have hnot : p ∉ tsupport (q j) := by + intro hq + exact Set.disjoint_left.mp (hdisj hj hi hji) (hs j hj hq) hp + exact (notMem_tsupport_iff_eventuallyEq.mp hnot).mono (fun _ hx _ => hx) + filter_upwards [he] with x hx + exact Finset.sum_eq_single i (fun j hj hji => hx j hj hji) (by simp [hi]) + +lemma scaledQuadraticCutoff_jets (B : SecondTensor) (hB : ∀ v w, B v w = B w v) + (p : Plane) {r : ℝ} (hr : 0 < r) : + scaledQuadraticCutoff B p r p = 0 ∧ + fderiv ℝ (scaledQuadraticCutoff B p r) p = 0 ∧ + ∀ v w, fderiv ℝ (fderiv ℝ (scaledQuadraticCutoff B p r)) p v w = -B v w := by + have he := scaledQuadraticCutoff_germ B p hr + refine ⟨?_,?_,?_⟩ + · rw [he.eq_of_nhds] + simp [quadraticCorrection] + · rw [he.fderiv_eq,quadraticCorrection_fderiv B hB] + simp + · intro v w + rw [he.fderiv.fderiv_eq,quadraticCorrection_second B hB] + +theorem finite_quadratic_flattening_jets (P : Finset Plane) (F : Plane → Space) + (hF : ContDiff ℝ ∞ F) (hunit : ∀ p : P, ∀ᶠ x in 𝓝 (p : Plane), ‖F x‖ = 1) + (r : P → ℝ) (hr : ∀ p, 0 < r p) + (hdisj : Pairwise fun p q : P => Disjoint (closedBall (p : Plane) (r p)) + (closedBall (q : Plane) (r q))) : + let Q := fun x => ∑ p : P, scaledQuadraticCutoff (sphericalSecondFormCLM F p) p (r p) x + let G := radialNormalize ∘ (F+Q) + ContDiff ℝ ∞ Q ∧ ∀ p : P, G p = F p ∧ fderiv ℝ G p = fderiv ℝ F p ∧ + ∀ v w, sphericalSecondForm G p v w = 0 := by + classical + let q (p : P) := scaledQuadraticCutoff (sphericalSecondFormCLM F p) p (r p) + let Q := fun x => ∑ p : P, q p x + have hQ : ContDiff ℝ ∞ Q := ContDiff.sum fun p _ => scaledQuadraticCutoff_smooth _ _ _ + refine ⟨hQ,?_⟩ + intro p + have he : Q =ᶠ[𝓝 (p : Plane)] q p := + finite_sum_germ_of_disjoint_supports Finset.univ q + (fun p => closedBall (p : Plane) (r p)) + (fun p _ => scaledQuadraticCutoff_tsupport _ _ (hr p)) + (fun p _ q _ hpq => hdisj hpq) (Finset.mem_univ p) + (mem_closedBall_self (hr p).le) + obtain ⟨hq0,hq1,hq2⟩ := scaledQuadraticCutoff_jets (sphericalSecondFormCLM F p) + (fun v w => sphericalSecondForm_symmetric hF p v w) p (hr p) + apply normalized_spherical_flattening hF hQ (hunit p) + · exact he.eq_of_nhds.trans hq0 + · exact he.fderiv_eq.trans hq1 + · intro v w + exact congrArg (fun L : Plane →L[ℝ] Plane →L[ℝ] Space => L v w) + he.fderiv.fderiv_eq |>.trans (hq2 v w) + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e6dbbda2787130cae2ab43ceb85977a93c8018e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanFamily.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMeanSums + +namespace OAI + +/-! Finite substitution for a sum of local mean operators. The common loss +and all majorants are fixed before the small parameter and actual operators. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.FiniteMean +open WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem finite_mean_family {ι : Type*} {U : Set E} (hU : UniqueDiffOn ℝ U) + {s : ℝ} (hs : 0 ≤ s) {reference H : E → F} {r0 r1 : ℝ} (hgap : r0 < r1) + (a : Finset ι) (L : ι → ℕ) (L' : ℕ) (hL : ∀ i ∈ a, L i ≤ L') + (B K : ι → ℕ → ℝ → ℝ) {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) + (hH : ContDiffOn ℝ ∞ H U) (hH0 : ∀ x ∈ U, ‖H x - reference x‖ ≤ r0) + (hbH : ∀ m, WeightedBound U s m (C m) H) (n : ℕ) : + let B' := fun m C => 1 + ∑ i ∈ a, B i m C + let K' := fun m C => 1 + ∑ i ∈ a, K i m C + ∃ η0 : ℝ, 0 < η0 ∧ η0 ≤ 1 ∧ ∀ η, 0 < η → η ≤ η0 → + ∀ A : ι → (E → F) → E → F, + (∀ i ∈ a, MeanBounds U s reference r1 (L i) (rescaledMean η (A i)) (B i) (K i)) → + let T := fun f x => ∑ i ∈ a, A i f x + ∀ j ≤ n, ContDiffOn ℝ ∞ (fixedTrial H T j) U ∧ + InTrialBall U reference r1 (fixedTrial H T j) ∧ + (∀ m, WeightedBound U s m (sizeBound L' C B' j m) (fixedTrial H T j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L' C B' K' j m * η ^ (j + 1)) + (fixedTrial H T j + T (fixedTrial H T j) - H)) := by + obtain ⟨η0, h0, h1, hh⟩ := finite_substitution_uniform + (B := fun m C => 1 + ∑ i ∈ a, B i m C) + (K := fun m C => 1 + ∑ i ∈ a, K i m C) hU hs hgap hC hH hH0 hbH n + refine ⟨η0, h0, h1, ?_⟩ + intro η hη hsmall A hA + have hm := MeanBounds.finset_rescaled hU hs a A L L' B K hL hA + dsimp only + intro j hj + simpa only [trial_rescaledMean hη.ne', rescaledMean_self hη.ne'] using + hh _ hm η hη hsmall j hj + +end ClosedSurfaceR4.FiniteMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanSums.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanSums.lean new file mode 100644 index 0000000000000000000000000000000000000000..f738fa5db1e0dcbc0e683d52eed09f01bda7657e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanSums.lean @@ -0,0 +1,51 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FixedMeanSubstitution +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport + +namespace OAI + +/-! Assemble finitely many actual mean operators with a common derivative +loss while retaining their scale-independent majorants. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.FiniteMean +open WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma MeanBounds.mono_loss {U : Set E} {s : ℝ} {reference : E → F} {r : ℝ} + {L L' : ℕ} {T : ℝ → (E → F) → E → F} {B K : ℕ → ℝ → ℝ} + (hT : MeanBounds U s reference r L T B K) (hL : L ≤ L') : + MeanBounds U s reference r L' T B K := by + refine ⟨hT.B_pos, hT.K_pos, hT.smooth, ?_, ?_⟩ + · intro η hη hη1 m C f hC hf hb hbf + exact hT.value η hη hη1 m C f hC hf hb (hbf.mono_order (Nat.add_le_add_left hL m)) + · intro η hη hη1 m C D f g hC hD hf hg hbf hbg hF hG hFG + exact hT.difference η hη hη1 m C D f g hC hD hf hg hbf hbg + (hF.mono_order (Nat.add_le_add_left hL m)) (hG.mono_order (Nat.add_le_add_left hL m)) + (hFG.mono_order (Nat.add_le_add_left hL m)) + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma rescaledMean_finset {ι : Type*} (a : Finset ι) (η : ℝ) + (A : ι → (E → F) → E → F) : + rescaledMean η (fun f x => ∑ i ∈ a, A i f x) = + fun θ f x => ∑ i ∈ a, rescaledMean η (A i) θ f x := by + funext θ f x + simp only [rescaledMean, Pi.smul_apply, Finset.smul_sum] + +lemma MeanBounds.finset_rescaled {ι : Type*} {U : Set E} (hU : UniqueDiffOn ℝ U) + {s : ℝ} (hs : 0 ≤ s) {reference : E → F} {r η : ℝ} + (a : Finset ι) (A : ι → (E → F) → E → F) (L : ι → ℕ) (L' : ℕ) + (B K : ι → ℕ → ℝ → ℝ) + (hL : ∀ i ∈ a, L i ≤ L') + (hA : ∀ i ∈ a, MeanBounds U s reference r (L i) (rescaledMean η (A i)) (B i) (K i)) : + MeanBounds U s reference r L' (rescaledMean η (fun f x => ∑ i ∈ a, A i f x)) + (fun m C => 1 + ∑ i ∈ a, B i m C) (fun m C => 1 + ∑ i ∈ a, K i m C) := by + rw [rescaledMean_finset] + exact MeanBounds.finset_sum hU hs a (fun i => rescaledMean η (A i)) B K + (fun i hi => (hA i hi).mono_loss (hL i hi)) + +end ClosedSurfaceR4.FiniteMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..a442cc0a46dcc7263689cb42fb2b401962bd51c9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMeanThreshold.lean @@ -0,0 +1,140 @@ +import OAI.Geometry.Immersion.ClosedSurface.FiniteMean + +namespace OAI + +/-! A quantitative threshold for the actual finite mean iteration. The +radius and the finite value bound stay explicit in the conclusion. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteMean +open WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem finite_substitution_at {U : Set E} (hU : UniqueDiffOn ℝ U) + {s : ℝ} (hs : 0 ≤ s) {reference H : E → F} {r0 r1 : ℝ} (hgap : r0 < r1) + {L : ℕ} {T : ℝ → (E → F) → E → F} {B K : ℕ → ℝ → ℝ} + (hT : MeanBounds U s reference r1 L T B K) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiffOn ℝ ∞ H U) + (hH0 : ∀ p ∈ U, ‖H p-reference p‖ ≤ r0) + (hbH : ∀ m, WeightedBound U s m (C m) H) (n : ℕ) (D : ℝ) + (hbD : ∀ j ≤ n, B 0 (sizeBound L C B j L) ≤ D) + {η : ℝ} (hη : 0 < η) (hη1 : η ≤ 1) (hηD : r0+η*D < r1) : + ∀ j ≤ n, ContDiffOn ℝ ∞ (trial H T η j) U ∧ + InTrialBall U reference r1 (trial H T η j) ∧ + (∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L C B K j m*η^(j+1)) + (trial H T η j+T η (trial H T η j)-H)) := by + have hstates : ∀ j ≤ n + 1, + ContDiffOn ℝ ∞ (trial H T η j) U ∧ InTrialBall U reference r1 (trial H T η j) ∧ + ∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j) := by + intro j + induction j with + | zero => + intro hj + exact ⟨hH, fun p hp => (hH0 p hp).trans_lt hgap, hbH⟩ + | succ j ih => + intro hj + obtain ⟨hjS, hjBall, hjB⟩ := ih (by omega) + have hTS := hT.smooth η hη hη1 _ hjS hjBall + have hVal (m : ℕ) := hT.value η hη hη1 m (sizeBound L C B j (m + L)) + (trial H T η j) (sizeBound_ge_one hC hT.B_pos _ _) hjS hjBall (hjB (m + L)) + refine ⟨hH.sub hTS, ?_, ?_⟩ + · intro p hp + calc + ‖trial H T η (j + 1) p - reference p‖ = + ‖(H p - reference p) - T η (trial H T η j) p‖ := by + congr 1 + dsimp [trial] + abel + _ ≤ ‖H p - reference p‖ + ‖T η (trial H T η j) p‖ := norm_sub_le _ _ + _ ≤ r0 + η * D := by + apply add_le_add (hH0 p hp) + exact ((hVal 0).norm_le hp).trans (mul_le_mul_of_nonneg_left (by simpa using hbD j (by omega)) hη.le) + _ < r1 := hηD + · intro m + have hh := (hbH m).sub hU hs hH hTS (hVal m) + apply hh.mono_const + dsimp only [sizeBound] + have hp : 0 ≤ B m (sizeBound L C B j (m + L)) := + le_trans zero_le_one (hT.B_pos m _ (sizeBound_ge_one hC hT.B_pos j (m + L))) + nlinarith + have hdiff : ∀ j ≤ n, ∀ m, + WeightedBound U s m (differenceBound L C B K j m * η ^ (j + 1)) + (trial H T η (j + 1) - trial H T η j) := by + intro j + induction j with + | zero => + intro hj m + have hBall : InTrialBall U reference r1 H := fun p hp => (hH0 p hp).trans_lt hgap + have hTS := hT.smooth η hη hη1 H hH hBall + have hh := (hT.value η hη hη1 m (C (m + L)) H (hC _) hH hBall (hbH _)).neg hU hTS + have he : trial H T η (0 + 1) - trial H T η 0 = -(T η H) := by + funext p; simp only [trial, Pi.sub_apply, Pi.neg_apply]; abel + rw [he] + have hh' : WeightedBound U s m (η * B m (C (m + L))) (-(T η H)) := + hh.congr (by intro p hp; rfl) + convert hh' using 1 + try rfl + dsimp only [differenceBound] + simp only [Nat.zero_add, pow_one] + ring + | succ j ih => + intro hj m + obtain ⟨hf, hfBall, hbf⟩ := hstates (j + 1) (by omega) + obtain ⟨hg, hgBall, hbg⟩ := hstates j (by omega) + let C' := max (sizeBound L C B (j + 1) (m + L)) (sizeBound L C B j (m + L)) + have hC' : 1 ≤ C' := (sizeBound_ge_one hC hT.B_pos _ _).trans (le_max_left _ _) + have hD' : 0 ≤ differenceBound L C B K j (m + L) * η ^ (j + 1) := + mul_nonneg (differenceBound_nonneg hC hT.B_pos hT.K_pos _ _) (pow_nonneg hη.le _) + have hh := hT.difference η hη hη1 m C' _ _ _ hC' hD' hf hg hfBall hgBall + ((hbf (m + L)).mono_const (le_max_left _ _)) + ((hbg (m + L)).mono_const (le_max_right _ _)) (ih (by omega) (m + L)) + have hTF := hT.smooth η hη hη1 _ hf hfBall + have hTG := hT.smooth η hη hη1 _ hg hgBall + have hn := hh.neg hU (hTF.sub hTG) + rw [show j + 1 + 1 = j + 2 by omega, trial_difference] + convert hn using 1 + try rfl + dsimp only [differenceBound, C'] + rw [pow_succ] + ring + intro j hj + obtain ⟨hjS, hjBall, hjB⟩ := hstates j (by omega) + refine ⟨hjS, hjBall, hjB, ?_⟩ + intro m + rw [trial_residual] + have hnext := (hstates (j + 1) (by omega)).1 + exact (hdiff j hj m).neg hU (hnext.sub hjS) + + +theorem finite_substitution_with_threshold {U : Set E} (hU : UniqueDiffOn ℝ U) + {s : ℝ} (hs : 0 ≤ s) {reference H : E → F} {r0 r1 : ℝ} (hgap : r0 < r1) + {L : ℕ} {T : ℝ → (E → F) → E → F} {B K : ℕ → ℝ → ℝ} + (hT : MeanBounds U s reference r1 L T B K) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiffOn ℝ ∞ H U) + (hH0 : ∀ p ∈ U, ‖H p-reference p‖ ≤ r0) + (hbH : ∀ m, WeightedBound U s m (C m) H) (n : ℕ) {D : ℝ} (hD : 0 < D) + (hbD : ∀ j ≤ n, B 0 (sizeBound L C B j L) ≤ D) : + 0 < min 1 ((r1-r0)/(2*D)) ∧ + ∀ η : ℝ, 0 < η → η ≤ min 1 ((r1-r0)/(2*D)) → + ∀ j ≤ n, ContDiffOn ℝ ∞ (trial H T η j) U ∧ + InTrialBall U reference r1 (trial H T η j) ∧ + (∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L C B K j m*η^(j+1)) + (trial H T η j+T η (trial H T η j)-H)) := by + refine ⟨lt_min zero_lt_one (div_pos (sub_pos.mpr hgap) (by positivity)),?_⟩ + intro η hη hsmall + have hη1 : η ≤ 1 := hsmall.trans (min_le_left _ _) + have hηD : r0+η*D < r1 := by + have hh := (le_div_iff₀ (by positivity : 0 < 2*D)).mp + (hsmall.trans (min_le_right _ _)) + nlinarith + exact finite_substitution_at hU hs hgap hT hC hH hH0 hbH n D hbD hη hη1 hηD + +end ClosedSurfaceR4.FiniteMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMetricPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMetricPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..a03c9246517b1f267553414a2e2abc4e3415eafc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteMetricPolynomial.lean @@ -0,0 +1,118 @@ +import Mathlib + +namespace OAI + +/-! Exact finite polynomial metric algebra for the periodic ansatz. -/ + +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +def vectorPolynomialValue (n : ℕ) (a : ℕ → E) (z : ℝ) : E := + ∑ i ∈ Finset.range (n + 1), z ^ i • a i + +def metricPolynomial (n : ℕ) (a b : ℕ → E) : Polynomial ℝ := + ∑ i ∈ Finset.range (n + 1), ∑ j ∈ Finset.range (n + 1), + Polynomial.monomial (i + j) (inner ℝ (a i) (b j)) + +lemma metricPolynomial_eval (n : ℕ) (a b : ℕ → E) (z : ℝ) : + (metricPolynomial n a b).eval z = + inner ℝ (vectorPolynomialValue n a z) (vectorPolynomialValue n b z) := by + simp only [metricPolynomial, Polynomial.eval_finsetSum, Polynomial.eval_monomial, + vectorPolynomialValue, sum_inner, inner_sum, real_inner_smul_left, real_inner_smul_right] + conv_rhs => rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i hi + apply Finset.sum_congr rfl + intro j hj + rw [pow_add] + ring + +/-- At each degree no larger than the vector degree, the usual convolution +contains every contributing term, with no truncation at either end. -/ +lemma metricPolynomial_coeff {n r : ℕ} (hr : r ≤ n) (a b : ℕ → E) : + (metricPolynomial n a b).coeff r = + ∑ i ∈ Finset.range (r + 1), inner ℝ (a i) (b (r - i)) := by + simp only [metricPolynomial, Polynomial.finsetSum_coeff] + have hrow (i : ℕ) : + (∑ j ∈ Finset.range (n + 1), (Polynomial.monomial (i + j) (inner ℝ (a i) (b j))).coeff r) = + if i ≤ r then inner ℝ (a i) (b (r - i)) else 0 := by + by_cases hi : i ≤ r + · rw [ite_eq_left hi] + have hc : (Polynomial.monomial (i + (r - i)) + (inner ℝ (a i) (b (r - i)))).coeff r = inner ℝ (a i) (b (r - i)) := by + simp [Nat.add_sub_of_le hi] + rw [← hc] + apply Finset.sum_eq_single (r - i) + · intro j hj hne + rw [Polynomial.coeff_monomial] + split_ifs with he + · omega + · rfl + · intro hn + exfalso + apply hn + exact Finset.mem_range.mpr (by omega) + · rw [ite_eq_right hi] + apply Finset.sum_eq_zero + intro j hj + rw [Polynomial.coeff_monomial] + split_ifs with he + · omega + · rfl + simp_rw [hrow] + have hsub : Finset.range (r + 1) ⊆ Finset.range (n + 1) := Finset.range_mono (by omega) + calc + _ = ∑ i ∈ Finset.range (r + 1), + if i ≤ r then inner ℝ (a i) (b (r - i)) else 0 := by + symm + apply Finset.sum_subset hsub + intro i hin hir + exact ite_eq_right (by simpa only [Finset.mem_range, Nat.lt_succ_iff] using hir) + _ = _ := by + apply Finset.sum_congr rfl + intro i hi + exact ite_eq_left (Nat.le_of_lt_succ (Finset.mem_range.mp hi)) + +lemma metricPolynomial_coeff_pos {n r : ℕ} (hr : r ≤ n) (hpos : 0 < r) + (a b : ℕ → E) : + (metricPolynomial n a b).coeff r = inner ℝ (a 0) (b r) + inner ℝ (a r) (b 0) + + ∑ i ∈ Finset.Ico 1 r, inner ℝ (a i) (b (r - i)) := by + rw [metricPolynomial_coeff hr, Finset.sum_range_succ, + ← Finset.sum_range_add_sum_Ico (fun i => inner ℝ (a i) (b (r - i))) hpos] + simp only [Finset.sum_range_one, Nat.sub_zero, Nat.sub_self] + ring + +lemma metricPolynomial_degree (n : ℕ) (a b : ℕ → E) : + (metricPolynomial n a b).natDegree ≤ 2 * n := by + apply Polynomial.natDegree_le_iff_coeff_eq_zero.mpr + intro r hr + simp only [metricPolynomial, Polynomial.finsetSum_coeff] + apply Finset.sum_eq_zero + intro i hi + apply Finset.sum_eq_zero + intro j hj + simp only [Finset.mem_range] at hi hj + rw [Polynomial.coeff_monomial] + exact ite_eq_right (by omega) + +/-- Split the exact metric polynomial at any chosen expansion order. -/ +lemma metricPolynomial_expansion (n k : ℕ) (hk : k ≤ 2 * n + 1) + (a b : ℕ → E) (z : ℝ) : + inner ℝ (vectorPolynomialValue n a z) (vectorPolynomialValue n b z) = + (∑ i ∈ Finset.range k, (metricPolynomial n a b).coeff i * z ^ i) + + ∑ i ∈ Finset.Ico k (2 * n + 1), (metricPolynomial n a b).coeff i * z ^ i := by + rw [← metricPolynomial_eval] + conv_lhs => rw [(metricPolynomial n a b).as_sum_range' (2 * n + 1) + (by have h := metricPolynomial_degree n a b; omega)] + simp only [Polynomial.eval_finsetSum, Polynomial.eval_monomial] + exact (Finset.sum_range_add_sum_Ico _ hk).symm + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteOrderSmoother.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteOrderSmoother.lean new file mode 100644 index 0000000000000000000000000000000000000000..a0068432c447bcb91fb5c782695e1cc827ac75e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteOrderSmoother.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingResidualOperator +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingGain + +namespace OAI + +/-! A concrete smoother of any prescribed finite approximation order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The finite sum `S + S(I-S) + ... + S(I-S)^(n-1)`. -/ +def finiteSmooth (n : ℕ) (s : ℝ) (f : Base → E) : Base → E := + ∑ i ∈ Finset.range n, smooth 0 s (residual s i f) + +lemma finiteSmooth_eq (n : ℕ) (s : ℝ) (f : Base → E) : + finiteSmooth n s f = f - residual s n f := by + induction n with + | zero => simp [finiteSmooth, residual] + | succ n ih => + unfold finiteSmooth at ih ⊢ + rw [Finset.sum_range_succ, ih] + funext x + simp only [Pi.sub_apply, Pi.add_apply, residual] + abel + +lemma finiteSmooth_smooth (n : ℕ) {s : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) : ContDiff ℝ ∞ (finiteSmooth n s f) := by + rw [finiteSmooth_eq] + exact hf.sub (residual_smooth hs n hf) + +lemma finiteSmooth_compact (n : ℕ) {s : ℝ} (hs : 0 < s) + {f : Base → E} (hfc : HasCompactSupport f) : HasCompactSupport (finiteSmooth n s f) := by + rw [finiteSmooth_eq] + exact hfc.sub (residual_compact hs n hfc) + +lemma fderiv_finiteSmooth (n : ℕ) {s : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) : + fderiv ℝ (finiteSmooth n s f) = finiteSmooth n s (fderiv ℝ f) := by + rw [finiteSmooth_eq, finiteSmooth_eq] + funext x + rw [fderiv_sub (hf.differentiable (by simp) x) + ((residual_smooth hs n hf).differentiable (by simp) x), + fderiv_residual hs n hf hfc] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..978eb8a8bc3e00f51fdb8430e41c3c2e91a7438b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialCancellation.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveData +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedCalculus + +namespace OAI + +/-! Finite cancellation by the actual polynomial phase solvers. All +summands are constructed with one common accuracy and wavelength. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +theorem finite_polynomial_cancellation {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) (K : ι → Compacts Base) + {τ : ℝ} {s : ℝ≥0} (c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s) + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (f : ∀ i, SupportedField (F := ComplexTensor) (modeSupport (K i))) (q : ℕ) : + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ + tsupport X ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m (∑ i, (c i).size (f i) q m) X) ∧ + (∀ m, WeightedBound Set.univ τ m (∑ i, (c i).residual (f i) q m) + (fun x => coordinateFullLinearized P ε G X x + + ∑ i, QuadraticMean.displacement τ (coordinatePhase (φ i)) (f i) x)) := by + classical + choose X hsm hsp hb hr using fun i => (c i).exists_solution hτ hs hτs hs1 hε hsmall (f i) q + refine ⟨(fun p => ∑ i, X i p), ContDiff.sum (fun i _ => hsm i), ?_, ?_, ?_⟩ + · apply closure_minimal _ (isClosed_iUnion_of_finite fun i => (modeSupport (K i)).isCompact.isClosed) + intro p hp + by_contra hn + apply hp + apply Finset.sum_eq_zero + intro i _ + exact image_eq_zero_of_notMem_tsupport (fun hx => hn (Set.mem_iUnion.mpr ⟨i, hsp i hx⟩)) + · intro m + exact WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ _ _ + (fun i _ => (hsm i).contDiffOn) (fun i _ => hb i m) + · intro m + have he : (fun x => coordinateFullLinearized P ε G (fun p => ∑ i, X i p) x + + ∑ i, QuadraticMean.displacement τ (coordinatePhase (φ i)) (f i) x) = + (fun x => ∑ i, (coordinateFullLinearized P ε G (X i) x + + QuadraticMean.displacement τ (coordinatePhase (φ i)) (f i) x)) := by + rw [coordinateFullLinearized_sum P ε G Finset.univ X hsm] + funext x + exact Finset.sum_add_distrib.symm + rw [he] + apply WeightedBound.finset_sum isOpen_univ.uniqueDiffOn hτ.le Finset.univ _ _ + (fun i _ => ?_) (fun i _ => hr i m) + exact ((coordinateFullLinearized_smooth (c i).openO (c i).openU P (c i).smoothP hG + (c i).mapsG (K i) (c i).supportU (hsm i) (hsp i) ε).add + (contDiffOn_univ.mp (RealModes.contDiffOn_displacement + (((c i).smoothPhase.comp planeCoordinateIsometry.symm.contDiff).contDiffOn) + (f i).contDiff.contDiffOn τ))).contDiffOn + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..c03c0946c959c21e29df28811c73349eeb5b97f2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FinitePolynomialPhases.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteQuadraticVariation + +namespace OAI + +/-! Exact finite expansion of the polynomial quadratic term before +separating its zero phases. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets + +lemma half_second_variation_sum {ι : Type*} [Fintype ι] + (e : Expression) (G : Base → Space) (H : ι → Base → Fin 4 → ℂ) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) (z : Base × ℝ) : + (1 / 2 : ℝ) * (e.variations 1).eval + ![G, realField (fun p => ∑ i, H i p), realField (fun p => ∑ i, H i p), 0] z = + (∑ i, ∑ j, (quadraticComplex e G (complexJet (H i)) (complexJet (H j)) z).re / 4) + + ∑ i, ∑ j, (quadraticComplex e G (complexJet (H i)) + (starDirectionJets (complexJet (H j))) z).re / 4 := by + have hsum : ContDiff ℝ ∞ (fun p => ∑ i, H i p) := ContDiff.sum (fun i _ => hH i) + rw [half_second_variation_real e G hsum, complexJet_sum Finset.univ H (fun i _ => hH i), + starDirectionJets_sum, quadraticComplex_sum, quadraticComplex_sum] + simp only [Complex.re_sum, Finset.sum_div, add_div] + + +def oscillatorySum {ι : Type*} [Fintype ι] (τ : ℝ) (φ : ι → Base → ℝ) + (H : ι → Base → Fin 4 → ℂ) : Base → Fin 4 → ℂ := + fun p => ∑ i, phase τ (φ i) p • H i p + +theorem half_second_variation_phases {ι : Type*} [Fintype ι] + (e : Expression) (G : Base → Space) (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) (τ : ℝ) (z : Base × ℝ) : + (1 / 2 : ℝ) * (e.variations 1).eval + ![G, realField (oscillatorySum τ φ H), realField (oscillatorySum τ φ H), 0] z = + (∑ i, ∑ j, ((phase τ (φ i) z.1 * phase τ (φ j) z.1) * + conjugatedVariation e G (pairPhases (φ i) (φ j)) (pairDirections (H i) (H j)) τ 1 z).re / 4) + + ∑ i, ∑ j, ((phase τ (φ i) z.1 * phase τ (fun p => -φ j p) z.1) * + conjugatedVariation e G (pairPhases (φ i) (fun p => -φ j p)) + (pairDirections (H i) (starField (H j))) τ 1 z).re / 4 := by + have hsm (i : ι) : ContDiff ℝ ∞ (fun p => phase τ (φ i) p • H i p) := + (phase_smooth (hφ i) τ).smul (hH i) + rw [show oscillatorySum τ φ H = fun p => ∑ i, phase τ (φ i) p • H i p from rfl, + half_second_variation_sum e G _ hsm] + congr 1 + · apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + rw [quadraticComplex_phase_factor] + · apply Finset.sum_congr rfl + intro i _ + apply Finset.sum_congr rfl + intro j _ + rw [← complexJet_starField (hsm j), starField_phase, quadraticComplex_phase_factor] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..1d14a7ca3b15daaf150cbd605e7d850e48e6b3a9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherApproximation.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherBounds + +namespace OAI + +/-! The finite-order smoother approximates using only the displayed finite +number of input derivatives. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma residual_add_orders (s : ℝ) (n m : ℕ) (f : Base → E) : + residual s (n + m) f = residual s n (residual s m f) := by + induction n with + | zero => simp only [Nat.zero_add, residual] + | succ n ih => + rw [show n + 1 + m = (n + m) + 1 by omega] + simp only [residual, ih] + +lemma error_finiteSmooth (n : ℕ) (s : ℝ) (f : Base → E) : + f - finiteSmooth n s f = residual s n f := by + rw [finiteSmooth_eq] + abel + +def approximationConstant (r j : ℕ) : ℝ := + (1 + ∫ y, ‖kernel 0 y‖) ^ j * firstMoment (kernel 0) ^ (r - j) + +lemma approximationConstant_nonneg (r j : ℕ) : 0 ≤ approximationConstant r j := + mul_nonneg + (pow_nonneg (add_nonneg zero_le_one (integral_nonneg fun _ => norm_nonneg _)) _) + (pow_nonneg (firstMoment_nonneg _) _) + +variable [CompleteSpace E] + +/-- The `q+j`-th error derivative gains `s^(r-j)`, using input derivatives +only through `q+r`. Constants do not depend on the input or the scale. -/ +theorem finiteSmooth_approximation (r q j : ℕ) (hj : j ≤ r) + {s C : ℝ} (hs : 0 < s) {f : Base → E} + (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ (q + r) f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ (q + j) (f - finiteSmooth r s f) x‖ ≤ + approximationConstant r j * s ^ (r - j) * C := by + rw [error_finiteSmooth] + have heq : residual s r f = residual s j (residual s (r - j) f) := by + rw [← residual_add_orders, Nat.add_sub_of_le hj] + rw [heq] + have hb' : ∀ y, ‖iteratedFDeriv ℝ (q + j) (residual s (r - j) f) y‖ ≤ + (s * firstMoment (kernel 0)) ^ (r - j) * C := by + intro y + apply iterated_residual_norm_le hs (r - j) (q + j) hf hfc + intro z + rw [show r - j + (q + j) = q + r by omega] + exact hb z + have h := iterated_residual_bounded hs j (q + j) + (residual_smooth hs (r - j) hf) (residual_compact hs (r - j) hfc) hb' x + apply h.trans_eq + unfold approximationConstant + rw [mul_pow] + ring + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..75e5002e8cbb1c07e1a2265a792b62b9999cbc04 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherBounds.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteOrderSmoother + +namespace OAI + +/-! Uniform bounds and derivative gain for the same finite-order smoother. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Every original derivative norm remains bounded independently of scale. -/ +theorem finiteSmooth_bounded (n m : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ m f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ m (finiteSmooth n s f) x‖ ≤ + (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ n) * C := by + rw [finiteSmooth_eq, iteratedFDeriv_sub_apply + ((hf.of_le (by simp)).contDiffAt) + (((residual_smooth hs n hf).of_le (by simp)).contDiffAt)] + calc + _ ≤ ‖iteratedFDeriv ℝ m f x‖ + ‖iteratedFDeriv ℝ m (residual s n f) x‖ := norm_sub_le _ _ + _ ≤ C + (1 + ∫ y, ‖kernel 0 y‖) ^ n * C := + add_le_add (hb x) (iterated_residual_bounded hs n m hf hfc hb x) + _ = _ := by ring + +def gainConstant (n m : ℕ) : ℝ := + ∑ i ∈ Finset.range n, (∫ y, ‖iteratedFDeriv ℝ m (kernel 0) y‖) * + (1 + ∫ y, ‖kernel 0 y‖) ^ i + +lemma gainConstant_nonneg (n m : ℕ) : 0 ≤ gainConstant n m := by + apply Finset.sum_nonneg + intro i _ + exact mul_nonneg (integral_nonneg fun _ => norm_nonneg _) + (pow_nonneg (add_nonneg zero_le_one (integral_nonneg fun _ => norm_nonneg _)) _) + +/-- A gain of `m` derivatives uses just the zeroth input norm. -/ +theorem finiteSmooth_gain (n m : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hb : ∀ x, ‖f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ m (finiteSmooth n s f) x‖ ≤ + (s ^ m)⁻¹ * gainConstant n m * C := by + unfold finiteSmooth + rw [iteratedFDeriv_sum_apply (fun i _ => + ((smooth_smooth 0 hs (residual_smooth hs i hf).continuous.locallyIntegrable).of_le + (by simp)).contDiffAt)] + calc + _ ≤ ∑ i ∈ Finset.range n, ‖iteratedFDeriv ℝ m (smooth 0 s (residual s i f)) x‖ := + norm_sum_le _ _ + _ ≤ ∑ i ∈ Finset.range n, (s ^ m)⁻¹ * + ((∫ y, ‖iteratedFDeriv ℝ m (kernel 0) y‖) * + (1 + ∫ y, ‖kernel 0 y‖) ^ i) * C := by + apply Finset.sum_le_sum + intro i _ + have h := smooth_derivative_gain 0 m hs (residual_smooth hs i hf).continuous + (fun y => residual_bounded hs i hb y) x + convert h using 1 + ring + _ = _ := by rw [← Finset.sum_mul, ← Finset.mul_sum]; rfl + +/-- Additional output derivatives cost the smoothing scale, while the +original `q` input derivatives commute through the same operator. -/ +theorem finiteSmooth_gain_from_derivatives (n q m : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ q f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ (q + m) (finiteSmooth n s f) x‖ ≤ + (s ^ m)⁻¹ * gainConstant n m * C := by + induction q generalizing E with + | zero => + rw [Nat.zero_add] + simp only [norm_iteratedFDeriv_zero] at hb + exact finiteSmooth_gain n m hs hf hb x + | succ q ih => + rw [show q + 1 + m = (q + m) + 1 by omega, ← norm_iteratedFDeriv_fderiv, + fderiv_finiteSmooth n hs hf hfc] + apply ih (hf.fderiv_right (m := ∞) (by simp)) (hfc.fderiv ℝ) + intro y + rw [norm_iteratedFDeriv_fderiv] + exact hb y + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..84997d848a6ba90c3fb8aaff0eb1999bfa23af0c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherLinearity.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherApproximation + +namespace OAI + +/-! Linearity of the actual finite-order smoothing construction. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma residual_add (n : ℕ) {s : ℝ} (hs : 0 < s) {f g : Base → E} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) : + residual s n (f + g) = residual s n f + residual s n g := by + induction n with + | zero => rfl + | succ n ih => + simp only [residual, ih] + rw [smooth_add 0 hs (residual_smooth hs n hf).continuous.locallyIntegrable + (residual_smooth hs n hg).continuous.locallyIntegrable] + abel + +lemma residual_smul (n : ℕ) (s a : ℝ) (f : Base → E) : + residual s n (a • f) = a • residual s n f := by + induction n with + | zero => rfl + | succ n ih => + simp only [residual, ih, smooth_smul, smul_sub] + +lemma finiteSmooth_add (n : ℕ) {s : ℝ} (hs : 0 < s) {f g : Base → E} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) : + finiteSmooth n s (f + g) = finiteSmooth n s f + finiteSmooth n s g := by + simp only [finiteSmooth_eq, residual_add n hs hf hg] + abel + +lemma finiteSmooth_smul (n : ℕ) (s a : ℝ) (f : Base → E) : + finiteSmooth n s (a • f) = a • finiteSmooth n s f := by + simp only [finiteSmooth_eq, residual_smul, smul_sub] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherWeighted.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherWeighted.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ba3e777d5867c7db94c8437076cfae208e8a1ef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSmootherWeighted.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherLinearity + +namespace OAI + +/-! Weighted bounds for finite-order smoothing in the chart norms used by +the correction iteration. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory WeightedEstimates +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Smoothing at one scale remains bounded in the original weighted norm +at any other positive scale. -/ +theorem finiteSmooth_weighted_bounded (n m : ℕ) {s t C : ℝ} + (hs : 0 < s) (ht : 0 < t) {f : Base → E} + (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : WeightedBound Set.univ t m C f) : + WeightedBound Set.univ t m ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ n) * C) + (finiteSmooth n s f) := by + intro j hj x _ + rw [iteratedFDerivWithin_univ] + have h := finiteSmooth_bounded n j hs hf hfc (C := C / t ^ j) + (fun y => by simpa only [iteratedFDerivWithin_univ] using hb.deriv_le ht hj (Set.mem_univ y)) x + calc + _ ≤ t ^ j * ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ n) * (C / t ^ j)) := + mul_le_mul_of_nonneg_left h (pow_nonneg ht.le _) + _ = _ := by field_simp + +def weightedGainConstant (n m : ℕ) : ℝ := + ∑ j ∈ Finset.range (m + 1), gainConstant n j + +lemma weightedGainConstant_nonneg (n m : ℕ) : 0 ≤ weightedGainConstant n m := + Finset.sum_nonneg (fun j _ => gainConstant_nonneg n j) + +/-- Every weighted output derivative is controlled by the zeroth input +norm; higher input derivatives do not enter the constant. -/ +theorem finiteSmooth_weighted_gain (n m : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hb : ∀ x, ‖f x‖ ≤ C) : + WeightedBound Set.univ s m (weightedGainConstant n m * C) (finiteSmooth n s f) := by + have hC : 0 ≤ C := (norm_nonneg (f 0)).trans (hb 0) + intro j hj x _ + rw [iteratedFDerivWithin_univ] + have h := finiteSmooth_gain n j hs hf hb x + have hsum : gainConstant n j ≤ weightedGainConstant n m := + Finset.single_le_sum (fun i _ => gainConstant_nonneg n i) (Finset.mem_range.mpr (by omega)) + calc + _ ≤ s ^ j * ((s ^ j)⁻¹ * gainConstant n j * C) := + mul_le_mul_of_nonneg_left h (pow_nonneg hs.le _) + _ = gainConstant n j * C := by field_simp + _ ≤ _ := mul_le_mul_of_nonneg_right hsum hC + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSpecialPointCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSpecialPointCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..7a4baced2917430be4f011907feb7f33130a66e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSpecialPointCorrection.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SpecialPointCorrection + +namespace OAI + +/-! Simultaneous small affine corrections around finitely many distinct special points. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.TransverseSmallFunction + +theorem exists_finite_special_correction {ι : Type*} [Fintype ι] + (p : ι → Base) (hp : Function.Injective p) {U : Set Base} + (hU : IsOpen U) (hpU : ∀ i, p i ∈ U) (B : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ H : Base → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ U ∧ + (∀ x, |H x| < ε) ∧ ∃ V : Set Base, IsOpen V ∧ (∀ i, p i ∈ V) ∧ V ⊆ U ∧ + ∀ x ∈ V, fderiv ℝ H x (0, 1) = B := by + classical + obtain ⟨W, hW, hdisj⟩ := (Set.finite_range p).t2_separation + let e := ε / ((Fintype.card ι : ℝ) + 1) + have hden : 0 < (Fintype.card ι : ℝ) + 1 := by positivity + have he : 0 < e := div_pos hε hden + have hlocal (i : ι) := exists_special_point_correction + ((hW (p i)).2.inter hU) ⟨(hW (p i)).1, hpU i⟩ B he + choose H hH hHc hHs hHb V hVo hpV hVU hVD using hlocal + let F : Base → ℝ := fun x => ∑ i, H i x + have hFs : tsupport F ⊆ ⋃ i, tsupport (H i) := by + apply closure_minimal + · intro x hx + by_contra hnot + have hz : F x = 0 := by + apply Finset.sum_eq_zero + intro i _ + exact image_eq_zero_of_notMem_tsupport (fun hi => hnot (mem_iUnion.mpr ⟨i, hi⟩)) + exact hx hz + · exact isClosed_iUnion_of_finite (fun i => isClosed_tsupport (H i)) + have hFc : HasCompactSupport F := + (isCompact_iUnion (fun i => hHc i)).of_isClosed_subset (isClosed_tsupport F) hFs + have hFU : tsupport F ⊆ U := by + intro x hx + obtain ⟨i, hi⟩ := mem_iUnion.mp (hFs hx) + exact (hHs i hi).2 + refine ⟨F, ContDiff.sum (fun i _ => hH i), hFc, hFU, ?_, ⋃ i, V i, + isOpen_iUnion hVo, (fun i => mem_iUnion.mpr ⟨i, hpV i⟩), ?_, ?_⟩ + · 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 _ => (hHb 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 + obtain ⟨i, hi⟩ := mem_iUnion.mp hx + exact (hVU i hi).2 + · intro x hx + obtain ⟨i, hi⟩ := mem_iUnion.mp hx + change fderiv ℝ (fun y => ∑ j, H j y) x (0, 1) = B + rw [fderiv_fun_sum (fun j _ => (hH j).differentiable (by simp) x), sum_apply] + rw [Finset.sum_eq_single i] + · exact hVD i x hi + · intro j _ hji + have hxWi : x ∈ W (p i) := (hVU i hi).1 + have hd : Disjoint (W (p i)) (W (p j)) := + hdisj (mem_range_self i) (mem_range_self j) (fun hij => hji (hp hij).symm) + have hnot : x ∉ tsupport (H j) := fun hh => + (Set.disjoint_left.mp hd) hxWi (hHs j hh).1 + rw [fderiv_of_notMem_tsupport ℝ hnot] + rfl + · simp + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..c09335309e65288c03bdba526ed54f5cb2091b79 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrection.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.EuclideanChartRead +import OAI.Geometry.SurfaceImmersion.Correction.FiniteCorrectionGerms + +namespace OAI + +/-! Finite spherical jet corrections on the actual surface. The disjoint +coordinate balls are chosen before restoring and normalizing the corrections. -/ +noncomputable section +open Set Filter Metric Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.SphericalJets + +lemma sphericalSecondForm_congr_germ {F G : Plane → Space} {p : Plane} + (h : F =ᶠ[𝓝 p] G) (v w : Plane) : + sphericalSecondForm F p v w = sphericalSecondForm G p v w := by + simp only [sphericalSecondForm,secondForm,normalSpace,h.eq_of_nhds,h.fderiv_eq, + h.fderiv.fderiv_eq] + +end ClosedSurfaceR4.SphericalJets +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) + +def finiteSurfaceQuadratic (P : Finset M) (c : P → A.centers) (r : P → ℝ) + (F : M → Space) : M → Space := fun x => ∑ p : P, + euclideanRestore (c p : M) (A.outer (c p)) + (scaledQuadraticCutoff (sphericalSecondFormCLM (A.euclideanChartRead (c p) F) + (chartAt Plane (c p : M) p)) (chartAt Plane (c p : M) p) (r p)) x + +omit [CompactSpace M] [T2Space M] in +lemma finiteSurfaceQuadratic_smooth (P : Finset M) (c : P → A.centers) (r : P → ℝ) + (F : M → Space) : + ContMDiff planeModel spaceModel ∞ (A.finiteSurfaceQuadratic P c r F) := by + apply ContMDiff.sum + intro p _ + exact euclideanRestore_smooth _ (A.outer_smooth _) (by simpa only [chart_source] + using (A.outer_support (c p))) (scaledQuadraticCutoff_smooth _ _ _) + +omit [CompactSpace M] in +lemma finiteSurfaceQuadratic_chart_germ (P : Finset M) (c : P → A.centers) (r : P → ℝ) + (F : M → Space) (hc : ∀ p, A.weight (c p) p ≠ 0) (hr : ∀ p, 0 < r p) + (hball : ∀ p, closedBall (chartAt Plane (c p : M) p) (r p) ⊆ + (chartAt Plane (c p : M)).target) + (hdisj : Pairwise fun p q : P => + Disjoint ((chartAt Plane (c p : M)).symm '' closedBall (chartAt Plane (c p : M) p) (r p)) + ((chartAt Plane (c q : M)).symm '' closedBall (chartAt Plane (c q : M) q) (r q))) + (p : P) : + (fun y => A.finiteSurfaceQuadratic P c r F ((chartAt Plane (c p : M)).symm y)) + =ᶠ[𝓝 (chartAt Plane (c p : M) p)] + scaledQuadraticCutoff (sphericalSecondFormCLM (A.euclideanChartRead (c p) F) + (chartAt Plane (c p : M) p)) (chartAt Plane (c p : M) p) (r p) := by + classical + let q (p : P) := scaledQuadraticCutoff + (sphericalSecondFormCLM (A.euclideanChartRead (c p) F) (chartAt Plane (c p : M) p)) + (chartAt Plane (c p : M) p) (r p) + let Q (p : P) := euclideanRestore (c p : M) (A.outer (c p)) (q p) + let K (p : P) := (chartAt Plane (c p : M)).symm '' + closedBall (chartAt Plane (c p : M) p) (r p) + have hps : (p : M) ∈ (chartAt Plane (c p : M)).source := by + simpa only [chart_source] using A.weight_support (c p) (subset_tsupport _ (hc p)) + have hpt := (chartAt Plane (c p : M)).map_source hps + have hpK : (p : M) ∈ K p := ⟨chartAt Plane (c p : M) p, + mem_closedBall_self (hr p).le,(chartAt Plane (c p : M)).left_inv hps⟩ + have he : A.finiteSurfaceQuadratic P c r F =ᶠ[𝓝 (p : M)] Q p := + finite_sum_germ_of_disjoint_supports Finset.univ Q K + (fun q _ => euclideanRestore_tsupport _ _ (isCompact_closedBall _ _) (hball q) + (scaledQuadraticCutoff_tsupport _ _ (hr q))) + (fun p _ q _ hpq => hdisj hpq) (Finset.mem_univ p) hpK + have ht : Tendsto (chartAt Plane (c p : M)).symm (𝓝 (chartAt Plane (c p : M) p)) + (𝓝 (p : M)) := by + have hh := ((chartAt Plane (c p : M)).continuousOn_symm _ hpt).continuousAt + ((chartAt Plane (c p : M)).open_target.mem_nhds hpt) + simpa only [(chartAt Plane (c p : M)).left_inv hps] using hh.tendsto + exact (he.comp_tendsto ht).trans + (euclideanRestore_chart_germ _ _ _ hpt (A.outer_one_chart_germ (c p) (hc p))) + +theorem finiteSurfaceQuadratic_flattening (P : Finset M) (c : P → A.centers) (r : P → ℝ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (hunit : ∀ p, ‖F p‖ = 1) (hc : ∀ p, A.weight (c p) p ≠ 0) (hr : ∀ p, 0 < r p) + (hball : ∀ p, closedBall (chartAt Plane (c p : M) p) (r p) ⊆ + (chartAt Plane (c p : M)).target) + (hdisj : Pairwise fun p q : P => + Disjoint ((chartAt Plane (c p : M)).symm '' closedBall (chartAt Plane (c p : M) p) (r p)) + ((chartAt Plane (c q : M)).symm '' closedBall (chartAt Plane (c q : M) q) (r q))) : + let G := radialNormalize ∘ (F + A.finiteSurfaceQuadratic P c r F) + ∀ 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 + intro G p + let x := chartAt Plane (c p : M) p + let f := A.euclideanChartRead (c p) F + let q := scaledQuadraticCutoff (sphericalSecondFormCLM f x) x (r p) + have hf := A.euclideanChartRead_smooth (c p) hF + have he := A.euclideanChartRead_germ (c p) F (hc p) + have hu : ∀ᶠ y in 𝓝 x, ‖f y‖ = 1 := + he.mono fun y hy => (congrArg norm hy).trans (hunit _) + obtain ⟨hq0,hq1,hq2⟩ := scaledQuadraticCutoff_jets (sphericalSecondFormCLM f x) + (fun v w => sphericalSecondForm_symmetric hf x v w) x (hr p) + obtain ⟨hg0,hg1,hg2⟩ := normalized_spherical_flattening hf + (scaledQuadraticCutoff_smooth _ _ _) hu hq0 hq1 hq2 + have hq := A.finiteSurfaceQuadratic_chart_germ P c r F hc hr hball hdisj p + have hg : G ∘ (chartAt Plane (c p : M)).symm =ᶠ[𝓝 x] radialNormalize ∘ (f+q) := by + filter_upwards [he,hq] with y hy hqy + change radialNormalize (F ((chartAt Plane (c p : M)).symm y) + + A.finiteSurfaceQuadratic P c r F ((chartAt Plane (c p : M)).symm y)) = _ + simp only [Function.comp_apply] at hy + rw [← hy,hqy] + rfl + have hps : (p : M) ∈ (chartAt Plane (c p : M)).source := by + simpa only [chart_source] using A.weight_support (c p) (subset_tsupport _ (hc p)) + refine ⟨?_,hg.fderiv_eq.trans (hg1.trans he.fderiv_eq),?_⟩ + · have hv := hg.eq_of_nhds.trans (hg0.trans he.eq_of_nhds) + simpa only [Function.comp_apply,x,(chartAt Plane (c p : M)).left_inv hps] using hv + · intro v w + exact (sphericalSecondForm_congr_germ hg v w).trans (hg2 v w) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrectionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrectionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c8dc048d162e9abcbe4a9e87c6ba10ff4a25c70 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FiniteSurfaceCorrectionBounds.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSurfaceCorrection +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasSphericalTensorBound +import OAI.Geometry.SurfaceImmersion.Geometry.SingleEuclideanRestoreBound +import OAI.Geometry.SurfaceImmersion.Atlas.DisjointAtlasBounds +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledQuadraticBudgets + +namespace OAI + +/-! The total finite-point correction is arbitrarily small in C1 and +uniformly bounded in C2, independently of the finite set. -/ +noncomputable section +open Set 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_surface_correction_budgets {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) (hunit : ∀ p, ‖F p‖ = 1) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (P : Finset M) (c : P → A.centers) (r : P → ℝ) (η : ℝ), + 0 < η → η ≤ 1 → (∀ p, A.weight (c p) p ≠ 0) → + (∀ p, 0 < r p ∧ r p ≤ η) → + (∀ p, closedBall (chartAt Plane (c p : M) p) (r p) ⊆ (chartAt Plane (c p : M)).target) → + (Pairwise fun p q : P => Disjoint + ((chartAt Plane (c p : M)).symm '' closedBall (chartAt Plane (c p : M) p) (r p)) + ((chartAt Plane (c q : M)).symm '' closedBall (chartAt Plane (c q : M) q) (r q))) → + A.WeightedBound 1 1 (D*η) (A.finiteSurfaceQuadratic P c r F) ∧ + A.WeightedBound 1 2 D (A.finiteSurfaceQuadratic P c r F) := by + classical + obtain ⟨K,hK,hKB⟩ := A.uniform_spherical_correction_tensor hF hunit + obtain ⟨C,hC,hCB⟩ := scaled_quadratic_C1_C2_budgets K hK + obtain ⟨D₁,hD₁,h₁⟩ := A.single_euclidean_restore_bound 1 + obtain ⟨D₂,hD₂,h₂⟩ := A.single_euclidean_restore_bound 2 + refine ⟨(D₁+D₂)*C,by positivity,?_⟩ + intro P c r η hη hη1 hc hr ht hd + let q (p : P) := scaledQuadraticCutoff + (sphericalSecondFormCLM (A.euclideanChartRead (c p) F) (chartAt Plane (c p : M) p)) + (chartAt Plane (c p : M) p) (r p) + let Q (p : P) := euclideanRestore (c p : M) (A.outer (c p)) (q p) + have hQs (p : P) : ContMDiff planeModel spaceModel ∞ (Q p) := + euclideanRestore_smooth _ (A.outer_smooth _) (by simpa only [chart_source] + using (A.outer_support (c p))) (scaledQuadraticCutoff_smooth _ _ _) + have hQd : (↑(Finset.univ : Finset P) : Set P).Pairwise + fun p q => Disjoint (tsupport (Q p)) (tsupport (Q q)) := by + intro p _ q _ hpq + exact (hd hpq).mono + (euclideanRestore_tsupport _ _ (isCompact_closedBall _ _) (ht p) + (scaledQuadraticCutoff_tsupport _ _ (hr p).1)) + (euclideanRestore_tsupport _ _ (isCompact_closedBall _ _) (ht q) + (scaledQuadraticCutoff_tsupport _ _ (hr q).1)) + have hbud (p : P) := hCB _ (hKB (c p) p (hc p)) (chartAt Plane (c p : M) p) (r p) (hr p).1 ((hr p).2.trans hη1) + have hsum : A.finiteSurfaceQuadratic P c r F = ∑ p : P, Q p := by + funext x + simp only [Finset.sum_apply] + rfl + rw [hsum] + constructor + · apply A.disjoint_weighted_sum_bound Finset.univ Q (fun p _ => hQs p) hQd + (mul_nonneg (mul_nonneg (add_nonneg hD₁ hD₂) hC) hη.le) + intro p _ i + apply (h₁ (c p) (q p) (C*r p) (mul_nonneg hC (hr p).1.le) + (scaledQuadraticCutoff_smooth _ _ _) (hbud p).1 i).mono_const + calc + D₁*(C*r p) ≤ D₁*(C*η) := by gcongr; exact (hr p).2 + _ ≤ ((D₁+D₂)*C)*η := by nlinarith [mul_nonneg hD₂ (mul_nonneg hC hη.le)] + · apply A.disjoint_weighted_sum_bound Finset.univ Q (fun p _ => hQs p) hQd + (mul_nonneg (add_nonneg hD₁ hD₂) hC) + intro p _ i + apply (h₂ (c p) (q p) C hC (scaledQuadraticCutoff_smooth _ _ _) (hbud p).2 i).mono_const + nlinarith [mul_nonneg hD₂ hC] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedBallProfiledAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedBallProfiledAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..e0145ebd39b360cd71b1cf5aa9b6c427bd6d2989 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedBallProfiledAtlasMean.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! The mean-adjustment tensor radius depends only on the fixed atlas and local geometric margin. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation +local instance fixedBallMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance fixedBallMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance fixedBallMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance fixedBallMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance fixedBallMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance fixedBallMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem profiled_atlas_adjusted_mean_fixed_ball + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) + {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))) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + let r := A.tensorTrialRadius r₁ + let D₀ := A.tensorReadBallConstant + 0 < r ∧ 1 ≤ D₀ ∧ D₀*r ≤ r₁ ∧ + ∃ β κ : ℕ → ℝ → ℝ, + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → ∀ steps : ℕ, + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (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 → 0 ≤ ε → ε ≤ 1 → τ/s + ε/τ^loss ≤ η₀ → + ∀ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference), + (∀ i, (d i).Fits (p i)) → + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) → + (∀ 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) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) ∧ + (∀ x v v', u x v v' = u x v' v) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) u) ∧ + (∀ m, A.TensorWeightedBound s m + (δ^2 * (differenceBound L C β κ j m * (τ/s + ε/τ^loss)^(j+1))) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H)) := by + let D₀ := A.tensorReadBallConstant + let r := A.tensorTrialRadius r₁ + have hD₀ : 1 ≤ D₀ := A.one_le_tensorReadBallConstant + have hr : 0 < r := A.tensorTrialRadius_pos hr₁ + have hDr : D₀*r = r₁/2 := A.tensorReadBallConstant_mul_trialRadius r₁ + have hall := A.uniform_atlas_mean_majorants_fixed_ball (R := R) p hρ reference href q + obtain ⟨hball,β,κ,hm⟩ := hall r hr.le + refine ⟨hr,hD₀,?_,β,κ,?_⟩ + · rw [hDr] + linarith + · intro C hC steps + obtain ⟨η₀,hη₀,hη₁,htall⟩ := A.tensor_finite_mean_substitution_uniform + (by linarith : r/2 < r) hC steps (B := β) (K := κ) + refine ⟨η₀,hη₀,hη₁,?_⟩ + intro s hs hs1 H hH hsym hH0 hHC ε τ hτ hτs hε hε1 hsmall d hfit hphase hcut hform hsup δ hδ j hj + have hη : 0 < τ/s + ε/τ^(Finset.univ.sup (fun i : A.centers => tensorLoss (P i))) := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨hu,hb,hsize,herror⟩ := htall s hs reference H hH hH0 hHC _ hη hsmall _ + (hm d hfit hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) j hj + have hsymu := A.tensorMeanTrial_symmetric H (A.atlasMean (fun i => (d i).mean hρ δ q)) hsym + (fun u _ => A.atlasMean_symmetric _ u) j + have hlocal (i : A.centers) := hball _ (A.tensorEncode_smooth hu) hb i + simp only [A.tensorDecode_encode] at hlocal + refine ⟨_,hu,hsymu,hb,hlocal,hsize,?_⟩ + intro m + exact A.charted_family_atlas_quadratic_residual d hρ Q w hw hphase hcut hform hsup + _ H hu hH hsymu hlocal hδ.ne' hτ.ne' q (herror m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedMeanSubstitution.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedMeanSubstitution.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b18e016699d746f42e95f8cf019073e491e2cd9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FixedMeanSubstitution.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformFiniteMean + +namespace OAI + +/-! Finite mean correction for one fixed operator with derivative loss. +The smallness threshold is uniform in the operator; no infinite-dimensional +inverse or convergence of a derivative-losing iteration is asserted. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.FiniteMean +open WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +def rescaledMean (η : ℝ) (A : (E → F) → E → F) (θ : ℝ) (f : E → F) : E → F := + (θ / η) • A f + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma rescaledMean_self {η : ℝ} (hη : η ≠ 0) (A : (E → F) → E → F) : + rescaledMean η A η = A := by + funext f + simp only [rescaledMean, div_self hη, one_smul] + +lemma rescaledMean_bounds {U : Set E} (hU : UniqueDiffOn ℝ U) {s : ℝ} + {reference : E → F} {r η : ℝ} {L : ℕ} (hη : 0 < η) + (A : (E → F) → E → F) (B K : ℕ → ℝ → ℝ) + (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) + (hsm : ∀ f, ContDiffOn ℝ ∞ f U → InTrialBall U reference r f → ContDiffOn ℝ ∞ (A f) U) + (hv : ∀ m C f, 1 ≤ C → ContDiffOn ℝ ∞ f U → InTrialBall U reference r f → + WeightedBound U s (m + L) C f → WeightedBound U s m (η * B m C) (A f)) + (hd : ∀ m C D f g, 1 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ f U → ContDiffOn ℝ ∞ g U → + InTrialBall U reference r f → InTrialBall U reference r g → + WeightedBound U s (m + L) C f → WeightedBound U s (m + L) C g → + WeightedBound U s (m + L) D (f - g) → + WeightedBound U s m (K m C * η * D) (A f - A g)) : + MeanBounds U s reference r L (rescaledMean η A) B K := by + refine ⟨hB, hK, ?_, ?_, ?_⟩ + · intro θ _ _ f hf hb + exact (hsm f hf hb).const_smul (θ / η) + · intro θ hθ _ m C f hC hf hb hbf + have hh := (hv m C f hC hf hb hbf).const_smul hU (hsm f hf hb) (θ / η) + change WeightedBound U s m _ (rescaledMean η A θ f) at hh + convert hh using 1 + rw [abs_of_pos (div_pos hθ hη)] + field_simp + · intro θ hθ _ m C D f g hC hD hf hg hb hc hbf hbg hbd + have hh := (hd m C D f g hC hD hf hg hb hc hbf hbg hbd).const_smul hU + ((hsm f hf hb).sub (hsm g hg hc)) (θ / η) + have he : (θ / η) • (A f - A g) = rescaledMean η A θ f - rescaledMean η A θ g := + smul_sub _ _ _ + change WeightedBound U s m _ ((θ / η) • (A f - A g)) at hh + rw [he] at hh + convert hh using 1 + rw [abs_of_pos (div_pos hθ hη)] + field_simp + +/-- The actual finite sequence depends only on the fixed mean operator. -/ +def fixedTrial (H : E → F) (A : (E → F) → E → F) (j : ℕ) : E → F := + trial H (fun _ => A) 1 j + +omit [NormedAddCommGroup E] [NormedSpace ℝ E] in +lemma trial_rescaledMean {η : ℝ} (hη : η ≠ 0) + (H : E → F) (A : (E → F) → E → F) (j : ℕ) : + trial H (rescaledMean η A) η j = fixedTrial H A j := by + induction j with + | zero => rfl + | succ j ih => + change H - rescaledMean η A η (trial H (rescaledMean η A) η j) = + H - A (fixedTrial H A j) + rw [rescaledMean_self hη, ih] + +/-- A fixed operator with an O(η) value bound and an O(η) finite-loss +Lipschitz bound admits any prescribed finite number of substitutions. -/ +theorem fixed_mean_substitution {U : Set E} (hU : UniqueDiffOn ℝ U) {s : ℝ} (hs : 0 ≤ s) + {reference H : E → F} {r0 r1 : ℝ} (hgap : r0 < r1) {L : ℕ} + {B K : ℕ → ℝ → ℝ} (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) + (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiffOn ℝ ∞ H U) + (hH0 : ∀ p ∈ U, ‖H p - reference p‖ ≤ r0) + (hbH : ∀ m, WeightedBound U s m (C m) H) (n : ℕ) : + ∃ η0 : ℝ, 0 < η0 ∧ η0 ≤ 1 ∧ ∀ η, 0 < η → η ≤ η0 → + ∀ A : (E → F) → E → F, + (∀ f, ContDiffOn ℝ ∞ f U → InTrialBall U reference r1 f → ContDiffOn ℝ ∞ (A f) U) → + (∀ m C f, 1 ≤ C → ContDiffOn ℝ ∞ f U → InTrialBall U reference r1 f → + WeightedBound U s (m + L) C f → WeightedBound U s m (η * B m C) (A f)) → + (∀ m C D f g, 1 ≤ C → 0 ≤ D → + ContDiffOn ℝ ∞ f U → ContDiffOn ℝ ∞ g U → + InTrialBall U reference r1 f → InTrialBall U reference r1 g → + WeightedBound U s (m + L) C f → WeightedBound U s (m + L) C g → + WeightedBound U s (m + L) D (f - g) → + WeightedBound U s m (K m C * η * D) (A f - A g)) → + ∀ j ≤ n, ContDiffOn ℝ ∞ (fixedTrial H A j) U ∧ + InTrialBall U reference r1 (fixedTrial H A j) ∧ + (∀ m, WeightedBound U s m (sizeBound L C B j m) (fixedTrial H A j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L C B K j m * η ^ (j + 1)) + (fixedTrial H A j + A (fixedTrial H A j) - H)) := by + obtain ⟨η0, h0, h1, hh⟩ := finite_substitution_uniform hU hs hgap hC hH hH0 hbH n + refine ⟨η0, h0, h1, ?_⟩ + intro η hη hsmall A hsm hv hd j hj + have hm := rescaledMean_bounds hU hη A B K hB hK hsm hv hd + have hout := hh (rescaledMean η A) hm η hη hsmall j hj + simpa only [trial_rescaledMean hη.ne', rescaledMean_self hη.ne'] using hout + +end ClosedSurfaceR4.FiniteMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedIncrementIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedIncrementIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..0c761bcd6cfb14b786e1fb87d8257e3da639132b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedIncrementIdentity.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.QuadraticInteraction +import OAI.Geometry.Immersion.ClosedSurface.ForcedSolve + +namespace OAI + +/-! Exact nonlinear error decomposition after the free oscillation and the +forced cancellation, for the actual metric plus polynomial perturbation. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def combinedNonzeroQuadratic {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ : ℝ) : + SmallModes.Base → PhaseMean.Tensor := + fun p => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun i => coordinatePhase (φ i)) l) + (combinedQuadraticCoefficient P ε G φ H τ 0 l) p + +theorem free_forced_metric_increment_identity {n : ℕ} {ι : Type*} + [Fintype ι] [DecidableEq ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) (τ : ℝ) + {V : RealModes.RField 4} (hV : ContDiff ℝ ∞ V) (T : SmallModes.Base → PhaseMean.Tensor) : + let U := QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + coordinateMetricMap P ε (fun x => G x + (U + V) (planeCoordinateIsometry x)) - + coordinateMetricMap P ε G - T = + coordinateFullLinearized P ε G U + + (coordinateFullLinearized P ε G V + combinedNonzeroQuadratic P ε G φ H τ) + + (combinedQuadraticMean P ε G φ H τ 0 - T) + + coordinateQuadraticInteraction P ε G U V + coordinateTaylorRemainder P ε G (U + V) := by + let U := QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + have hU : ContDiff ℝ ∞ U := by + apply ContDiff.sum + intro i hi + exact contDiffOn_univ.mp (RealModes.contDiffOn_displacement + ((hφ i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn + ((hH i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn τ) + have hquad : coordinateFullQuadratic P ε G U = + combinedQuadraticMean P ε G φ H τ 0 + combinedNonzeroQuadratic P ε G φ H τ := + combined_quadratic_expansion P ε G φ H hφ hH τ 0 + have hUV : ContDiff ℝ ∞ (U + V) := hU.add hV + dsimp only + rw [coordinate_metric_taylor_identity P ε hG hUV, + coordinateFullLinearized_add P ε G hU hV, + coordinateFullQuadratic_add P ε G hU hV, hquad] + funext p k + simp only [Pi.add_apply, Pi.sub_apply] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedSegment.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedSegment.lean new file mode 100644 index 0000000000000000000000000000000000000000..2746a7d5051470b1a6ad6ba7ad59e42f4e724aef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FreeForcedSegment.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetSegment +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledNonlinearBounds + +namespace OAI + +/-! The free and forced size estimates keep the whole Taylor segment in +one compact low-jet domain, with uniform bounds at every required order. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma free_forced_size {X Y : RealModes.RField 4} + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) + {τ δ A B : ℝ} {m : ℕ} (hτ : 0 < τ) (hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hB : 0 ≤ B) + (hXb : WeightedBound Set.univ τ m (A * δ * τ) X) + (hYb : WeightedBound Set.univ τ m (B * δ ^ 2) Y) : + WeightedBound Set.univ τ m ((A + B) * δ * τ) (X + Y) := by + have hb := hXb.add isOpen_univ.uniqueDiffOn hτ.le hX.contDiffOn hY.contDiffOn hYb + apply hb.mono_const + calc + _ ≤ A * δ * τ + B * (δ * τ) := by + gcongr + nlinarith + _ = _ := by ring + +lemma free_forced_lowJet_bounds {U : Set Base} (hU : IsOpen U) + {G : Base → Space} {X Y : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) + {τ δ A B B₀ : ℝ} {m : ℕ} (hτ : 0 < τ) (hτ1 : τ ≤ 1) + (hδ : 0 ≤ δ) (hδτ : δ ≤ τ) (hA : 0 ≤ A) (hB : 0 ≤ B) + (hGb : WeightedBound U τ m B₀ (lowJet G)) + (hXb : WeightedBound Set.univ τ (m + 2) (A * δ * τ) X) + (hYb : WeightedBound Set.univ τ (m + 2) (B * δ ^ 2) Y) : + ∀ t ∈ Set.Icc (0 : ℝ) 1, WeightedBound U τ m (B₀ + A + B) + (lowJet (fun p => G p + t • (X + Y) (planeCoordinateIsometry p))) := by + have hs := free_forced_size hX hY hτ hδ hδτ hB hXb hYb + have hsource := (weightedBound_comp_isometry planeCoordinateIsometry (hX.add hY) hs).restrict_open hU + intro t ht + have hb := lowJet_segment_bound hU hG ((hX.add hY).comp planeCoordinateIsometry.contDiff) + hτ hτ1 (by positivity : 0 ≤ (A + B) * δ * τ) hGb hsource ht + apply hb.mono_const + have he : (A + B) * δ * τ / τ ^ 2 = (A + B) * (δ / τ) := by field_simp + rw [he] + have hratio : δ / τ ≤ 1 := (div_le_one hτ).2 hδτ + have hh := mul_le_of_le_one_right (add_nonneg hA hB) hratio + linarith + +theorem free_forced_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 : Base → Space} {X Y : RealModes.RField 4}, + ContDiff ℝ ∞ G → ContDiff ℝ ∞ X → ContDiff ℝ ∞ Y → Set.MapsTo (lowJet G) U Q → + ∀ {τ δ A B : ℝ}, 0 < τ → τ ≤ 1 → 0 ≤ δ → δ ≤ τ → 0 ≤ A → 0 ≤ B → + (A + B) * (δ / τ) ≤ ρ → + WeightedBound Set.univ τ 2 (A * δ * τ) X → + WeightedBound Set.univ τ 2 (B * δ ^ 2) Y → + ∀ t ∈ Set.Icc (0 : ℝ) 1, Set.MapsTo + (lowJet (fun p => G p + t • (X + Y) (planeCoordinateIsometry p))) U Q' := by + obtain ⟨ρ,Q',hρ,hQ',hQQ',hQ'O,hm⟩ := exists_lowJet_segment_margin hQ hO hQO + refine ⟨ρ,Q',hρ,hQ',hQQ',hQ'O,?_⟩ + intro U hU G X Y hG hX hY hGQ τ δ A B hτ hτ1 hδ hδτ hA hB hsmall hXb hYb t ht + have hs := free_forced_size hX hY hτ hδ hδτ hB hXb hYb + have hsource := (weightedBound_comp_isometry planeCoordinateIsometry (hX.add hY) hs).restrict_open hU + apply hm hU hG ((hX.add hY).comp planeCoordinateIsometry.contDiff) hGQ hτ hτ1 + (by positivity : 0 ≤ (A + B) * δ * τ) _ hsource t ht + convert hsmall using 1 + field_simp + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/FullPeriodicCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/FullPeriodicCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d5fb49463560d3b43e03f4e3c97d2e60056c28f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/FullPeriodicCorrector.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCorrector +import OAI.Geometry.SurfaceImmersion.Primitive.SlowPeriodicDerivative + +namespace OAI + +/-! The three equations in the periodic corrector system of paper 094-01, +equation (periodic-corrector-system), with smooth dependence on slow parameters. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCorrector + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +/-- A mean-zero, jointly smooth solution of the complete periodic system. +The transverse equation follows from differentiating the pairing with `Y`. -/ +theorem solve_full_smooth_family (v : A) (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiff ℝ ∞ Y) (hC : ContDiff ℝ ∞ C) (hX₀ : ContDiff ℝ ∞ X₀) + (hYC : ∀ p, fderiv ℝ Y p v = C p) + (hdet : ∀ p, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p t, V p t ∈ S p) + (hV : ContDiff ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period))) + (q : A → ℝ) (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) + (h j e : A → C(Period, ℝ)) + (hhs : ContDiff ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period))) + (hjs : ContDiff ℝ ∞ (fun z : A × ℝ => j z.1 (z.2 : Period))) + (hes : ContDiff ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period))) + (hmh : ∀ p, average (h p) = 0) (hmj : ∀ p, average (j p) = 0) + (hme : ∀ p, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiff ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) ∧ + ContDiff ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) ∧ + (∀ p, average (U p) = 0) ∧ + (∀ (p : A) (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) + (D p (t : Period)) t) ∧ + (∀ p t, inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p (t : ℝ), inner ℝ (Y p) + (slowDerivative (fun z : A × ℝ => U z.1 (z.2 : Period)) v (p, t)) = j p (t : Period)) ∧ + (∀ p, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ O : Set A, IsOpen O → (∀ p ∈ O, h p = 0) → + (∀ p ∈ O, j p = 0) → (∀ p ∈ O, e p = 0) → ∀ p ∈ O, U p = 0) := by + let H := primitiveFamily h hhs hmh + have hHs : ContDiff ℝ ∞ (fun z : A × ℝ => H z.1 (z.2 : Period)) := + primitiveFamily_smooth h hhs hmh + have hH0 : ∀ p, average (H p) = 0 := primitiveFamily_mean_zero h hhs hmh + let Hᵥ := slowDerivativeFamily H hHs v + have hHᵥs : ContDiff ℝ ∞ (fun z : A × ℝ => Hᵥ z.1 (z.2 : Period)) := + slowDerivativeFamily_smooth H hHs v + let K : A → C(Period, ℝ) := fun p => Hᵥ p - j p + have hKs : ContDiff ℝ ∞ (fun z : A × ℝ => K z.1 (z.2 : Period)) := hHᵥs.sub hjs + have hK0 (p : A) : average (K p) = 0 := by + have hv0 : average (Hᵥ p) = 0 := slowDerivativeFamily_mean_zero H hHs hH0 v p + change average (fun t => Hᵥ p t - j p t) = 0 + rw [average_sub (f := Hᵥ p) (g := j p) (Hᵥ p).continuous (j p).continuous, + hv0, hmj p, sub_self] + obtain ⟨U, D, hUs, hDs, hU0, hUd, hpair, hfluc, hUH, hzero⟩ := + solve_smooth_family S Y C X₀ hY hC hX₀ hdet hPY hPC hPX V hVmem hV + q hq hqpos hcircle h K e hhs hKs hes hmh hK0 hme + refine ⟨U, D, hUs, hDs, hU0, hUd, fun p t => (hpair p t).2, ?_, hfluc, ?_⟩ + · intro p t + have hUt : ContDiff ℝ ∞ (fun p => U p (t : Period)) := + hUs.comp (contDiff_id.prodMk contDiff_const) + have hHt : ContDiff ℝ ∞ (fun p => H p (t : Period)) := + hHs.comp (contDiff_id.prodMk contDiff_const) + have he (p : A) : inner ℝ (Y p) (U p (t : Period)) = H p (t : Period) := hUH p t + have hK : inner ℝ (C p) (U p (t : Period)) = + fderiv ℝ (fun p => H p (t : Period)) p v - j p (t : Period) := by + rw [fderiv_slice hHs] + exact (hpair p (t : Period)).1 + have hd := directional_pairing_constraint + (hY.differentiable (by simp) p) (hUt.differentiable (by simp) p) + (hHt.differentiable (by simp) p) he (hYC p) hK + rwa [fderiv_slice hUs] at hd + · intro O hO hhO hjO heO p hp + have hHO : ∀ q ∈ O, H q = 0 := fun q hq => primitiveFamily_zero_at h hhs hmh (hhO q hq) + have hHvp : Hᵥ p = 0 := slowDerivativeFamily_zero_on H hHs hO hHO v hp + have hKp : K p = 0 := by + change Hᵥ p - j p = 0 + rw [hHvp, hjO p hp, sub_self] + exact hzero p (hhO p hp) hKp (heO p hp) + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GeometricAtlasAdjustedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GeometricAtlasAdjustedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..f12e8d9071e9df5019ef59b5cad573d07c05d3ee --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GeometricAtlasAdjustedMean.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformGeometricAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Finite adjustment of the actual global quadratic mean, starting from +fixed unit-scale geometric data and constructing all later local solvers. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance geometricAdjustedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance geometricAdjustedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance geometricAdjustedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance geometricAdjustedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance geometricAdjustedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance geometricAdjustedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem geometric_atlas_adjusted_mean + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : A.centers → Fin 3 → Base → ℝ} {K : A.centers → Fin 3 → TopologicalSpace.Compacts Base} + (c₀ : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) 1 1) + {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))) + (d₀ : ∀ i j, ChartedMeanData (c₀ i j) 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 (φ i j) = phaseLinear (w i j • (Q i).ξ j)) + (hcut₀ : ∀ i j x, x ∈ (c₀ i j).e.source → + (d₀ i j).cutoff ((c₀ i j).e x) = A.planeWeight i x / w i j) + (hform₀ : ∀ i j x, x ∈ (c₀ i j).e.source → (d₀ i j).form ((c₀ i j).e x) = (Q i).Q j) + (hsup₀ : ∀ i j, tsupport (A.planeWeight i) ⊆ (c₀ i j).e.source) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ r D₀ : ℝ, 0 < r ∧ 1 ≤ D₀ ∧ + ∃ p : ∀ i, Fin 3 → ChartedMeanProfile (P i), ∃ β κ : ℕ → ℝ → ℝ, + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (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) → + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ steps : ℕ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (ε τ : ℝ), 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → τ/s + ε/τ^loss ≤ η₀ → + ∃ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = G i ∧ (d i).phase = φ i ∧ (d i).support = K i) ∧ + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) ∧ + (∀ x v v', u x v v' = u x v' v) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) u) ∧ + (∀ m, A.TensorWeightedBound s m + (δ^2 * (differenceBound L C β κ j m * (τ/s + ε/τ^loss)^(j+1))) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H)) := by + obtain ⟨r,D₀,hr,hD₀,_,p,β,κ,hball,hbuild⟩ := + A.uniform_geometric_atlas_mean c₀ hr₁ hρ reference href d₀ q + refine ⟨r,D₀,hr,hD₀,p,β,κ,?_⟩ + intro s hs hs1 H hH hsym hH0 C hC hHC steps + obtain ⟨η₀,hη₀,hη₁,ht⟩ := A.tensor_finite_mean_substitution hs (by linarith : r/2 < r) + hC hH hH0 hHC steps (B := β) (K := κ) + refine ⟨η₀,hη₀,hη₁,?_⟩ + intro ε τ hτ hτs hε hε1 hsmall + have hη : 0 < τ/s + ε/τ^(Finset.univ.sup (fun i : A.centers => tensorLoss (P i))) := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨d,hfit,hgeom,hm⟩ := hbuild ε τ s hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) + have hphase (i : A.centers) (j : Fin 3) : + coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j) := by + rw [(hgeom i).2.1] + exact hphase₀ i j + have hcut (i : A.centers) (j : Fin 3) (x : SmallModes.Base) + (hx : 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 := by + obtain ⟨_,_,_,he,hc,_⟩ := hgeom i + rw [hc j _,he j] + exact hcut₀ i j x (by simpa only [he j] using hx) + have hform (i : A.centers) (j : Fin 3) (x : SmallModes.Base) + (hx : x ∈ ((d i).solver j).e.source) : + ((d i).data j).form (((d i).solver j).e x) = (Q i).Q j := by + obtain ⟨_,_,_,he,_,hf⟩ := hgeom i + rw [hf j,he j] + exact hform₀ i j x (by simpa only [he j] using hx) + have hsup (i : A.centers) (j : Fin 3) : tsupport (A.planeWeight i) ⊆ ((d i).solver j).e.source := by + obtain ⟨_,_,_,he,_,_⟩ := hgeom i + rw [he j] + exact hsup₀ i j + refine ⟨d,hfit,(fun i => ⟨(hgeom i).1,(hgeom i).2.1,(hgeom i).2.2.1⟩),?_⟩ + intro δ hδ j hj + obtain ⟨hu,hb,hsize,herror⟩ := ht _ hη hsmall _ (hm δ hδ) j hj + have hsymu := A.tensorMeanTrial_symmetric H (A.atlasMean (fun i => (d i).mean hρ δ q)) hsym + (fun u _ => A.atlasMean_symmetric _ u) j + have hlocal (i : A.centers) := hball _ (A.tensorEncode_smooth hu) hb i + simp only [A.tensorDecode_encode] at hlocal + refine ⟨_,hu,hsymu,hb,hlocal,hsize,?_⟩ + intro m + exact A.charted_family_atlas_quadratic_residual d hρ Q w hw hphase hcut hform hsup + _ H hu hH hsymu hlocal hδ.ne' hτ.ne' q (herror m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalBundleSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalBundleSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..3383d022b5bb451ead600d9ff828fd497ebdaf23 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalBundleSmoothing.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.BundleAtlasBounds +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTailBounds + +namespace OAI + +/-! Boundedness, gain and finite-input tails for bundle smoothing. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle MeasureTheory +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + [ContMDiffVectorBundle ∞ F E planeModel] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +/-- No derivative above the stated input order occurs in either bound. -/ +theorem bundle_smoothing_bounds (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ + (∀ (u : ∀ x, E x) (s t C : ℝ), 0 < s → 0 < t → t ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x)) → A.BundleWeightedBound e t m C u → + A.BundleWeightedBound e t m (D * (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) + (A.bundleSmooth e r s u)) ∧ + (∀ (u : ∀ x, E x) (s t C : ℝ), 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x)) → A.BundleWeightedBound e t 0 C u → + A.BundleWeightedBound e s m (D * weightedGainConstant r m * C) + (A.bundleSmooth e r s u)) := by + obtain ⟨D, hD, hd⟩ := A.bundle_restoration_bound e hdomain m + refine ⟨D, hD, ?_, ?_⟩ + · intro u s t C hs ht ht1 hC hu hb + have hnon : 0 ≤ (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C := by positivity + have h := hd (fun i => finiteSmooth r s (A.bundleLocalize e i u)) t + ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) ht ht1 hnon + (fun i => finiteSmooth_smooth r hs (A.bundleLocalize_smooth e hdomain i hu)) + (fun i => finiteSmooth_weighted_bounded r m hs ht + (A.bundleLocalize_smooth e hdomain i hu) + (localize_compact (i : M) (A.weight_support i) _) (hb i)) + rw [show A.bundleSmooth e r s u = (fun x => ∑ i : A.centers, + A.bundleRestore e i (finiteSmooth r s (A.bundleLocalize e i u)) x) from rfl] + simpa only [mul_assoc] using h + · intro u s t C hs hs1 hC hu hb + have h := hd (fun i => finiteSmooth r s (A.bundleLocalize e i u)) s + (weightedGainConstant r m * C) hs hs1 + (mul_nonneg (weightedGainConstant_nonneg r m) hC) + (fun i => finiteSmooth_smooth r hs (A.bundleLocalize_smooth e hdomain i hu)) + (fun i => finiteSmooth_weighted_gain r m hs + (A.bundleLocalize_smooth e hdomain i hu) (fun x => (hb i).norm_le (mem_univ x))) + rw [show A.bundleSmooth e r s u = (fun x => ∑ i : A.centers, + A.bundleRestore e i (finiteSmooth r s (A.bundleLocalize e i u)) x) from rfl] + simpa only [mul_assoc] using h + +variable [CompleteSpace F] + +/-- The high input norm remains linear after all bundle transition maps. -/ +theorem bundle_smoothing_tail (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ x, E x) (s t τ B C : ℝ), + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x)) → + A.BundleWeightedBound e t r B u → A.BundleWeightedBound e t m C u → + A.BundleWeightedBound e τ m + (D * tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (fun x => u x - A.bundleSmooth e r s u x) := by + obtain ⟨D, hD, hd⟩ := A.bundle_restoration_bound e hdomain m + refine ⟨D, hD, ?_⟩ + intro u s t τ B C hτ hτs hst ht1 hB hC hu hb hc + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hτ1 : τ ≤ 1 := hτs.trans (hst.trans ht1) + have hsize : 0 ≤ tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r) := + mul_nonneg (tailConstant_nonneg r) (by positivity) + have h := hd (fun i => residual s r (A.bundleLocalize e i u)) τ + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) hτ hτ1 hsize + (fun i => residual_smooth hs r (A.bundleLocalize_smooth e hdomain i hu)) + (fun i => by + rw [← error_finiteSmooth] + exact weighted_smoothing_tail r m hτ hτs hst + (A.bundleLocalize_smooth e hdomain i hu) + (localize_compact (i : M) (A.weight_support i) _) (hb i) (hc i)) + have heq : (fun x => u x - A.bundleSmooth e r s u x) = + fun x => ∑ i : A.centers, A.bundleRestore e i + (residual s r (A.bundleLocalize e i u)) x := + funext (A.bundle_smoothing_error e hdomain r s u) + rw [heq] + simpa only [mul_assoc] using h + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalChartedForcedMode.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalChartedForcedMode.lean new file mode 100644 index 0000000000000000000000000000000000000000..384336a9b188739a1af8dc1af3b42dc25a3389d0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalChartedForcedMode.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedForcedMode +import OAI.Geometry.SurfaceImmersion.Correction.ChartResidualBounds +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedSupport + +namespace OAI + +/-! Global residual estimates for the actual forced correction constructed +in a local phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +theorem global_charted_forced_mode + (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) + (hphase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x) + (hFc : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm)) + (hM : SmallModes.ModeDomain (fun p => RealModes.complexify + (G (planeCoordinateIsometry.symm (e.symm p)))) e.target) + {s : ℝ≥0} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (C D J : ℕ → ℝ) (hC : ∀ m, 0 ≤ C m) (hD : ∀ m, 0 ≤ D m) (hJ : ∀ m, 1 ≤ J m) + (hcoords : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound + (fun p => RealModes.complexify (G (planeCoordinateIsometry.symm (e.symm p)))) + e.target s (m + 1) (C m)) + (hR : ∀ m Z, supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s m + (phaseChartPolynomialOperator hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe Z) ≤ + ε / τ ^ tensorLoss P * D m * + supportedWeightedSeminorm (chartSupport e (modeSupport K) hKe) s (m + tensorOrder P) Z) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q : ℕ) : + let Kc := chartSupport e (modeSupport K) hKe + let fc := tensorChartPush e hi (modeSupport K) hKe f + let κ := fun m => max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ (modeSupport K : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m + ((m.factorial : ℝ) * (2 ^ m * (SmallModes.forcedModeBudget 4 (tensorOrder P) C D q m * + supportedWeightedSeminorm Kc s (m + (q + 1) * (tensorOrder P + 1)) fc)) * J m ^ m) X) ∧ + (∀ m, WeightedBound Set.univ τ m + (tensorChartBudget m (J m) (J (m + 1)) * + (2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm Kc s (r + (tensorOrder P + 1)) fc) q m))) + (fun x => coordinateFullLinearized P ε G X x + QuadraticMean.displacement τ (coordinatePhase φ) f x)) := by + obtain ⟨X,hX,hsp,hsm,hsize,hres⟩ := charted_forced_mode hO hU P hP hG hQ K hKU hφ τ ε e he hi hKe + hphase hFc hM hτ hs hτs hs1 hε hsmall C D J hC hD hJ hcoords hc hR f q + dsimp only + refine ⟨X,hX,hsp,hsize,?_⟩ + intro m + let Kc := chartSupport e (modeSupport K) hKe + let fc := tensorChartPush e hi (modeSupport K) hKe f + let κ := fun r => max (SmallModes.errorConstant r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + have hκ (r : ℕ) : 0 ≤ κ r := (SmallModes.errorConstant_nonneg r (hC r)).trans (le_max_left _ _) + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have herror : 0 ≤ 2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm Kc s (r + (tensorOrder P + 1)) fc) q m) := + mul_nonneg (by positivity) (mul_nonneg (pow_nonneg hη _) + (FiniteParametrix.boundProfile_nonneg hκ (fun r => mul_nonneg (hκ r) (apply_nonneg _ _)) q m)) + have hsupp := (fullLinearized_residual_tsupport P ε G (modeSupport K).isCompact.isClosed hsp + f.tsupport_subset τ (coordinatePhase φ)).trans hKe + have hτ1 : τ ≤ 1 := hτs.trans (show (s : ℝ) ≤ 1 from hs1) + have hfield := RealModes.weighted_coordDeriv_of_jets e.open_source he hτ.le hτ1 + (zero_le_one.trans (hJ (m + 1))) (hcoords (m + 1)) + exact weighted_residual_from_chart e he hi hsupp hτ hτ1 herror (hJ m) + (zero_le_one.trans (hJ (m + 1))) (hcoords m) hfield hsm (hres m) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalModeDifferential.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalModeDifferential.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ffb0e07c9bc3b06da34d4c26cd802a8d2107c54 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalModeDifferential.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalOscillatoryModes +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential + +namespace OAI + +/-! The actual chart differentials of global oscillatory modes. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (planeCoordinateIsometry) +open QuadraticMean (realMode realPartCLM) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma vectorChartRead_mode_fderiv {n : ℕ} (i : A.centers) (τ : ℝ) + {φ : M → ℝ} {Z : M → Fin n → ℂ} + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin n → ℂ) ∞ Z) + {x : JetPolynomial.Base} (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + fderiv ℝ (A.vectorChartRead i (surfaceMode τ φ Z)) x = + fderiv ℝ (fun y => realMode (A.vectorChartRead i φ y/τ) (A.vectorChartRead i Z y)) x := by + ext v : 1 + have hh := congrArg (fun T => T (fun _ : Fin 1 => v)) (A.vectorChartRead_mode_jets i τ hφ hZ 1 hx) + simpa only [iteratedFDeriv_one_apply] using hh + +lemma vectorPlaneRead_mode_fderiv {n : ℕ} (i : A.centers) (τ : ℝ) + {φ : M → ℝ} {Z : M → Fin n → ℂ} + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin n → ℂ) ∞ Z) + {x : SmallModes.Base} + (hx : x ∈ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + fderiv ℝ (A.vectorPlaneRead i (surfaceMode τ φ Z)) x = + fderiv ℝ (QuadraticMean.displacement τ (A.vectorPlaneRead i φ) (A.vectorPlaneRead i Z)) x := by + obtain ⟨y,hy,rfl⟩ := hx + let f := fun y => realMode (A.vectorChartRead i φ y/τ) (A.vectorChartRead i Z y) + have hf : ContDiff ℝ ∞ f := (realMode_contDiff τ).comp + ((A.vectorChartRead_smooth i hφ).prodMk (A.vectorChartRead_smooth i hZ)) + change fderiv ℝ (A.vectorChartRead i (surfaceMode τ φ Z) ∘ planeCoordinateIsometry.symm) _ = + fderiv ℝ (f ∘ planeCoordinateIsometry.symm) _ + rw [fderiv_comp _ ((A.vectorChartRead_smooth i (surfaceMode_smooth τ hφ hZ)).differentiable + (by simp) _) (planeCoordinateIsometry.symm.differentiableAt), + fderiv_comp _ (hf.differentiable (by simp) _) (planeCoordinateIsometry.symm.differentiableAt), + LinearIsometryEquiv.symm_apply_apply,A.vectorChartRead_mode_fderiv i τ hφ hZ hy] + +omit [CompactSpace M] in +lemma vectorPlaneRead_clm {V W : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + [NormedAddCommGroup W] [NormedSpace ℝ W] (i : A.centers) + (L : V →L[ℝ] W) (F : M → V) : + A.vectorPlaneRead i (L ∘ F) = L ∘ A.vectorPlaneRead i F := by + funext x + change localize (i : M) (A.outer i) (L ∘ F) (planeCoordinateIsometry.symm x) = + L (localize (i : M) (A.outer i) F (planeCoordinateIsometry.symm x)) + by_cases hx : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target <;> + simp [localize,hx,map_smul] + +omit [CompactSpace M] in +lemma vectorPlaneRead_sum {V ι : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + [Fintype ι] (i : A.centers) (F : ι → M → V) : + A.vectorPlaneRead i (∑ j, F j) = ∑ j, A.vectorPlaneRead i (F j) := by + funext x + simpa only [vectorPlaneRead,vectorChartRead,Function.comp_apply,Finset.sum_apply] using + congrFun (localize_sum Finset.univ (i : M) (A.outer i) F) (planeCoordinateIsometry.symm x) + +omit [CompactSpace M] in +lemma vectorPlaneRead_const_smul {n : ℕ} (i : A.centers) (c : ℂ) (Z : M → Fin n → ℂ) : + A.vectorPlaneRead i (fun p => c • Z p) = fun x => c • A.vectorPlaneRead i Z x := by + funext x + by_cases hx : planeCoordinateIsometry.symm x ∈ (chart (i : M)).target + · simp only [vectorPlaneRead,vectorChartRead,localize,Function.comp_apply,indicator_of_mem hx] + exact smul_comm _ _ _ + · simp only [vectorPlaneRead,vectorChartRead,localize,Function.comp_apply,indicator_of_notMem hx, + smul_zero] + +lemma vectorPlaneRead_modes_fderiv {ι : Type*} [Fintype ι] (i : A.centers) (τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) + {x : SmallModes.Base} + (hx : x ∈ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + fderiv ℝ (A.vectorPlaneRead i (∑ j, surfaceMode τ (φ j) (Z j))) x = + fderiv ℝ (QuadraticMean.sumDisplacement τ + (fun j => A.vectorPlaneRead i (φ j)) (fun j => A.vectorPlaneRead i (Z j))) x := by + classical + rw [A.vectorPlaneRead_sum] + change fderiv ℝ (∑ j, A.vectorPlaneRead i (surfaceMode τ (φ j) (Z j))) x = + fderiv ℝ (fun y => ∑ j, QuadraticMean.displacement τ (A.vectorPlaneRead i (φ j)) + (A.vectorPlaneRead i (Z j)) y) x + have he : (∑ j, A.vectorPlaneRead i (surfaceMode τ (φ j) (Z j))) = + fun y => ∑ j, A.vectorPlaneRead i (surfaceMode τ (φ j) (Z j)) y := by + funext y + exact Finset.sum_apply _ _ _ + have hloc (j : ι) : DifferentiableAt ℝ (QuadraticMean.displacement τ + (A.vectorPlaneRead i (φ j)) (A.vectorPlaneRead i (Z j))) x := + ((realMode_contDiff τ).comp ((A.vectorPlaneRead_smooth i (hφ j)).prodMk + (A.vectorPlaneRead_smooth i (hZ j)))).differentiable (by simp) x + rw [he,fderiv_fun_sum (fun j _ => + (A.vectorPlaneRead_smooth i (surfaceMode_smooth τ (hφ j) (hZ j))).differentiable (by simp) x), + fderiv_fun_sum (fun j _ => hloc j)] + apply Finset.sum_congr rfl + intro j _ + exact A.vectorPlaneRead_mode_fderiv i τ (hφ j) (hZ j) hx + +lemma vectorPlaneRead_modes_metric {ι : Type*} [Fintype ι] [DecidableEq ι] (i : A.centers) (τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) + {x : SmallModes.Base} + (hx : x ∈ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + RealModes.realMetricTensor (A.vectorPlaneRead i (∑ j, surfaceMode τ (φ j) (Z j))) x = + RealModes.zeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x + + RealModes.nonzeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x := by + classical + have hd := A.vectorPlaneRead_modes_fderiv i τ φ Z hφ hZ hx + have he : RealModes.realMetricTensor (A.vectorPlaneRead i (∑ j, surfaceMode τ (φ j) (Z j))) x = + RealModes.realMetricTensor (QuadraticMean.sumDisplacement τ + (fun j => A.vectorPlaneRead i (φ j)) (fun j => A.vectorPlaneRead i (Z j))) x := by + ext k + simp only [RealModes.realMetricTensor_apply, RealModes.realMetric,SmallModes.coordDeriv,hd] + rw [he] + exact RealModes.realMetric_sumDisplacement + (fun j => (A.vectorPlaneRead_smooth i (hφ j)).differentiable (by simp) x) + (fun j => (A.vectorPlaneRead_smooth i (hZ j)).differentiable (by simp) x) τ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalOscillatoryModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalOscillatoryModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8c3d5f8a2aafcfcb1a9c916b6896dace21e6b28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalOscillatoryModes.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.VectorChartRead +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedAtlasRestore +import OAI.Geometry.Immersion.ClosedSurface.CrossModes + +namespace OAI + +/-! Global phase/amplitude representatives of the actual supported oscillations. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (planeCoordinateIsometry) +open QuadraticMean (realMode realPartCLM) + +lemma realMode_smul {n : ℕ} (θ a : ℝ) (Z : Fin n → ℂ) : + realMode θ (a • Z) = a • realMode θ Z := by + change realPartCLM n (QuadraticMean.phase θ • (a • Z)) = + a • realPartCLM n (QuadraticMean.phase θ • Z) + rw [smul_comm, map_smul] + +lemma realMode_zero {n : ℕ} (θ : ℝ) : realMode θ (0 : Fin n → ℂ) = 0 := by + change realPartCLM n (QuadraticMean.phase θ • (0 : Fin n → ℂ)) = 0 + rw [smul_zero,map_zero] + +lemma realMode_contDiff {n : ℕ} (τ : ℝ) : + ContDiff ℝ ∞ (fun p : ℝ × (Fin n → ℂ) => realMode (p.1/τ) p.2) := by + change ContDiff ℝ ∞ (fun p : ℝ × (Fin n → ℂ) => + realPartCLM n (QuadraticMean.phase (p.1/τ) • p.2)) + apply (realPartCLM n).contDiff.comp + apply ContDiff.smul (f := fun p : ℝ × (Fin n → ℂ) => QuadraticMean.phase (p.1/τ)) + (g := fun p : ℝ × (Fin n → ℂ) => p.2) + · have ha : ContDiff ℝ ∞ (fun p : ℝ × (Fin n → ℂ) => ((p.1/τ : ℝ) : ℂ)) := + Complex.ofRealCLM.contDiff.comp (contDiff_fst.div_const τ) + exact Complex.contDiff_exp.comp (ha.mul contDiff_const) + · exact contDiff_snd + +def surfaceMode {X : Type*} {n : ℕ} (τ : ℝ) (φ : X → ℝ) (Z : X → Fin n → ℂ) : + X → Fin n → ℝ := fun p => realMode (φ p/τ) (Z p) + +lemma surfaceMode_tsupport {X : Type*} [TopologicalSpace X] {n : ℕ} + (τ : ℝ) (φ : X → ℝ) (Z : X → Fin n → ℂ) : + tsupport (surfaceMode τ φ Z) ⊆ tsupport Z := by + apply closure_mono + intro x hx + change Z x ≠ 0 + intro hz + exact hx (by simp only [surfaceMode,hz,realMode_zero]) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +lemma surfaceMode_smooth {n : ℕ} (τ : ℝ) {φ : M → ℝ} {Z : M → Fin n → ℂ} + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin n → ℂ) ∞ Z) : + ContMDiff planeModel 𝓘(ℝ,Fin n → ℝ) ∞ (surfaceMode τ φ Z) := + (realMode_contDiff τ).contMDiff.comp (hφ.prodMk_space hZ) + +variable [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma restore_displacement {n : ℕ} (i : A.centers) (τ : ℝ) + (φ : SmallModes.Base → ℝ) (Z : SmallModes.Base → Fin n → ℂ) + (hZ : tsupport Z ⊆ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + restore (i : M) (A.outer i) (QuadraticMean.displacement τ φ Z ∘ planeCoordinateIsometry) = + surfaceMode τ (restore (i : M) (A.outer i) (φ ∘ planeCoordinateIsometry)) + (restore (i : M) (A.outer i) (Z ∘ planeCoordinateIsometry)) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · simp only [restore,indicator_of_mem hp,Function.comp_apply,surfaceMode, + QuadraticMean.displacement] + by_cases hz : Z (planeCoordinateIsometry (chart (i : M) p)) = 0 + · simp only [hz,realMode_zero,smul_zero] + · rw [A.outer_one i p (A.mem_weight_support_of_plane i hp (hZ (subset_tsupport Z hz))), + one_smul,one_smul,one_smul] + · simp only [restore,indicator_of_notMem hp,surfaceMode,realMode_zero] + +lemma vectorChartRead_mode_on_support {n : ℕ} (i : A.centers) (τ : ℝ) + (φ : M → ℝ) (Z : M → Fin n → ℂ) {x : JetPolynomial.Base} + (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + A.vectorChartRead i (surfaceMode τ φ Z) x = + realMode (A.vectorChartRead i φ x/τ) (A.vectorChartRead i Z x) := by + rw [A.vectorChartRead_on_support i _ hx,A.vectorChartRead_on_support i _ hx, + A.vectorChartRead_on_support i _ hx] + rfl + +lemma vectorChartRead_mode_jets {n : ℕ} (i : A.centers) (τ : ℝ) + {φ : M → ℝ} {Z : M → Fin n → ℂ} + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin n → ℂ) ∞ Z) (m : ℕ) + {x : JetPolynomial.Base} (hx : x ∈ (A.chartWeightCompact i : Set JetPolynomial.Base)) : + iteratedFDeriv ℝ m (A.vectorChartRead i (surfaceMode τ φ Z)) x = + iteratedFDeriv ℝ m (fun y => + realMode (A.vectorChartRead i φ y/τ) (A.vectorChartRead i Z y)) x := by + apply iteratedFDeriv_eq_on_tsupport (A.chartWeight_smooth i).continuous + isOpen_univ (subset_univ _) (A.vectorChartRead_smooth i (surfaceMode_smooth τ hφ hZ)).contDiffOn + ((realMode_contDiff τ).comp ((A.vectorChartRead_smooth i hφ).prodMk + (A.vectorChartRead_smooth i hZ))).contDiffOn + (fun y hy => A.vectorChartRead_mode_on_support i τ φ Z (A.chartWeight_tsupport i ▸ hy)) m + rwa [A.chartWeight_tsupport] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalQuadraticModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalQuadraticModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..67c56f0a94994aee477c0b9c71511b21a44284cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalQuadraticModes.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricChartReconstruction +import OAI.Geometry.SurfaceImmersion.Correction.GlobalModeDifferential +import OAI.Geometry.SurfaceImmersion.Correction.QuadratureMean + +namespace OAI + +/-! Global quadratic phase expansion, retaining all cross-chart interactions. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance globalModeMetricFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance globalModeMetricFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance globalModeMetricDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance globalModeMetricDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance globalModeMetricSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance globalModeMetricSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem global_mode_metric (τ : ℝ) (φ : M → ℝ) (Z : M → Fin 4 → ℂ) + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ Z) : + inducedTensor (spaceCoordinates.symm ∘ surfaceMode τ φ Z) = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + RealModes.realMetricTensor (QuadraticMean.displacement τ + (A.vectorPlaneRead i φ) (A.vectorPlaneRead i Z)) x) := by + have he (i : A.centers) : + spaceCoordinates ∘ A.vectorPlaneRead i (spaceCoordinates.symm ∘ surfaceMode τ φ Z) = + A.vectorPlaneRead i (surfaceMode τ φ Z) := by + have hr : A.vectorPlaneRead i (spaceCoordinates.symm ∘ surfaceMode τ φ Z) = + spaceCoordinates.symm ∘ A.vectorPlaneRead i (surfaceMode τ φ Z) := + A.vectorPlaneRead_clm i spaceCoordinates.symm.toContinuousLinearMap (surfaceMode τ φ Z) + rw [hr] + funext x + exact spaceCoordinates.apply_symm_apply _ + rw [← A.metric_from_chart_reads + (spaceCoordinates.symm.contDiff.contMDiff.comp (surfaceMode_smooth τ hφ hZ))] + simp_rw [he] + congr 1 + funext i x + by_cases hw : A.planeWeight i x = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul] + · have hx : x ∈ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (A.supportedPlaneWeight i).tsupport_subset (subset_tsupport (A.planeWeight i) hw) + have hd := A.vectorPlaneRead_mode_fderiv i τ hφ hZ hx + congr 1 + ext k + simp only [RealModes.realMetricTensor_apply,RealModes.realMetric,SmallModes.coordDeriv,hd] + +theorem global_zeroPhase_quadrature (τ : ℝ) (φ : M → ℝ) (Z : M → Fin 4 → ℂ) + (hφ : ContMDiff planeModel 𝓘(ℝ) ∞ φ) + (hZ : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ Z) : + (2 : ℝ) • A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + RealModes.phaseZeroTensor τ (A.vectorPlaneRead i φ) (A.vectorPlaneRead i Z) x) = + inducedTensor (spaceCoordinates.symm ∘ surfaceMode τ φ Z) + + inducedTensor (spaceCoordinates.symm ∘ surfaceMode τ φ (fun p => Complex.I • Z p)) := by + have hIc : ContDiff ℝ ∞ (fun z : Fin 4 → ℂ => Complex.I • z) := + (contDiff_const (c := Complex.I)).smul contDiff_id + have hi : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (fun p => Complex.I • Z p) := + hIc.contMDiff.comp hZ + rw [A.global_mode_metric τ φ Z hφ hZ,A.global_mode_metric τ φ _ hφ hi, + ← A.tensorPlaneRestore_add,← A.tensorPlaneRestore_smul] + congr 1 + funext i x + simp only [Pi.smul_apply,Pi.add_apply,A.vectorPlaneRead_const_smul] + rw [smul_comm (2 : ℝ) ((A.planeWeight i x)^2), + RealModes.phaseZeroTensor_quadrature + ((A.vectorPlaneRead_smooth i hφ).differentiable (by simp) x) + ((A.vectorPlaneRead_smooth i hZ).differentiable (by simp) x),smul_add] + +theorem global_modes_metric {ι : Type*} [Fintype ι] [DecidableEq ι] (τ : ℝ) + (φ : ι → M → ℝ) (Z : ι → M → Fin 4 → ℂ) + (hφ : ∀ j, ContMDiff planeModel 𝓘(ℝ) ∞ (φ j)) + (hZ : ∀ j, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z j)) : + inducedTensor (spaceCoordinates.symm ∘ ∑ j, surfaceMode τ (φ j) (Z j)) = + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + RealModes.zeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x) + + A.tensorPlaneRestore (fun i x => (A.planeWeight i x)^2 • + RealModes.nonzeroPhaseSum τ (fun j => A.vectorPlaneRead i (φ j)) + (fun j => A.vectorPlaneRead i (Z j)) x) := by + classical + let U : M → RealModes.RVec 4 := ∑ j, surfaceMode τ (φ j) (Z j) + have hU : ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ U := by + have hh := ContMDiff.sum (t := Finset.univ) (fun j _ => surfaceMode_smooth τ (hφ j) (hZ j)) + convert hh using 1 + funext x + simp only [U,Finset.sum_apply] + have he (i : A.centers) : + spaceCoordinates ∘ A.vectorPlaneRead i (spaceCoordinates.symm ∘ U) = A.vectorPlaneRead i U := by + have hr : A.vectorPlaneRead i (spaceCoordinates.symm ∘ U) = + spaceCoordinates.symm ∘ A.vectorPlaneRead i U := + A.vectorPlaneRead_clm i spaceCoordinates.symm.toContinuousLinearMap U + rw [hr] + funext x + exact spaceCoordinates.apply_symm_apply _ + rw [← A.metric_from_chart_reads (spaceCoordinates.symm.contDiff.contMDiff.comp hU)] + simp_rw [he] + rw [← A.tensorPlaneRestore_add] + congr 1 + funext i x + by_cases hw : A.planeWeight i x = 0 + · simp only [hw,zero_pow (by decide : 2 ≠ 0),zero_smul,Pi.add_apply,zero_add] + · have hx : x ∈ (JetPolynomial.Perturbation.modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (A.supportedPlaneWeight i).tsupport_subset (subset_tsupport (A.planeWeight i) hw) + rw [A.vectorPlaneRead_modes_metric i τ φ Z hφ hZ hx,smul_add] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalShiftedSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalShiftedSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..ec7c7b52c3f91ed6bb32ea7c16745a529135bd53 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalShiftedSmoothing.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalSmoothingBounds +import OAI.Geometry.SurfaceImmersion.Correction.ShiftedSmoothingBounds + +namespace OAI + +/-! Fixed-atlas smoothing with an unweighted derivative prefix. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold MeasureTheory +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) + +/-- Localized norms whose first `q` derivatives are unweighted. -/ +def ShiftedBound (q m : ℕ) (s C : ℝ) (f : M → V) : Prop := + ∀ i : A.centers, FiniteOrderSmoothing.ShiftedBound q m s C + (localize (i : M) (A.weight i) f) + +/-- Fixed smooth chart transitions preserve the unweighted prefix. -/ +theorem restoration_shifted_bound (q m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : A.centers → Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (h i)) → + (∀ i, FiniteOrderSmoothing.ShiftedBound q m s C (h i)) → + A.ShiftedBound q m s (D * C) + (∑ i : A.centers, restore (i : M) (A.outer i) (h i)) := by + classical + choose D hD hd using fun j : ℕ => A.restoration_bound (V := V) j + refine ⟨∑ j ∈ Finset.range (q + m + 1), D j, + Finset.sum_nonneg (fun j _ => hD j), ?_⟩ + intro h s C hs hs1 hC hh hb i j hj x + have he : 0 < s ^ (j - q) := pow_pos hs _ + have ho := hd j h 1 (C / s ^ (j - q)) zero_lt_one le_rfl + (div_nonneg hC he.le) hh (fun k => (hb k).prefix hs hs1 hC hj) + have hi := ho i j le_rfl x (mem_univ x) + simp only [one_pow, one_mul, iteratedFDerivWithin_univ] at hi + calc + _ ≤ s ^ (j - q) * (D j * (C / s ^ (j - q))) := + mul_le_mul_of_nonneg_left hi he.le + _ = D j * C := by field_simp + _ ≤ (∑ k ∈ Finset.range (q + m + 1), D k) * C := + mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun k _ => hD k) (Finset.mem_range.mpr (by omega))) hC + +/-- Global gain of arbitrary higher derivatives uses only the fixed prefix. -/ +theorem smoothing_shifted_gain (r q m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : M → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ, V) ∞ f → + A.ShiftedBound q 0 1 C f → A.ShiftedBound q m s + (D * ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) + weightedGainConstant r m) * C) + (A.smooth r s f) := by + obtain ⟨D, hD, hd⟩ := A.restoration_shifted_bound (V := V) q m + refine ⟨D, hD, ?_⟩ + intro f s C hs hs1 hC hf hb + have hg := weightedGainConstant_nonneg r m + have h := hd (fun i => finiteSmooth r s (localize (i : M) (A.weight i) f)) s + (((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) + weightedGainConstant r m) * C) + hs hs1 (by positivity) + (fun i => finiteSmooth_smooth r hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => finiteSmooth_shifted_gain r q m hs hC + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) + (by simpa using (hb i).prefix zero_lt_one le_rfl hC (j := q) (by omega))) + simpa only [smooth, mul_assoc] using h + +/-- The same global smoother is bounded at every original shifted order. -/ +theorem smoothing_shifted_bounded (r q m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : M → V) (s t C : ℝ), + 0 < s → 0 < t → t ≤ 1 → 0 ≤ C → ContMDiff planeModel 𝓘(ℝ, V) ∞ f → + A.ShiftedBound q m t C f → A.ShiftedBound q m t + (D * (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) (A.smooth r s f) := by + obtain ⟨D, hD, hd⟩ := A.restoration_shifted_bound (V := V) q m + refine ⟨D, hD, ?_⟩ + intro f s t C hs ht ht1 hC hf hb + have h := hd (fun i => finiteSmooth r s (localize (i : M) (A.weight i) f)) t + ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) ht ht1 (by positivity) + (fun i => finiteSmooth_smooth r hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => finiteSmooth_shifted_bounded r q m hs ht + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) (hb i)) + simpa only [smooth, mul_assoc] using h + +variable [CompleteSpace V] + +/-- The actual global smoothing error obeys the shifted two-scale estimate. -/ +theorem smoothing_shifted_tail (r q m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : M → V) (s t τ B C : ℝ), + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → + ContMDiff planeModel 𝓘(ℝ, V) ∞ f → + A.ShiftedBound q r t B f → A.ShiftedBound q m t C f → + A.ShiftedBound q m τ + (D * tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (f - A.smooth r s f) := by + obtain ⟨D, hD, hd⟩ := A.restoration_shifted_bound (V := V) q m + refine ⟨D, hD, ?_⟩ + intro f s t τ B C hτ hτs hst ht1 hB hC hf hb hc + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hτ1 : τ ≤ 1 := hτs.trans (hst.trans ht1) + have hsize : 0 ≤ tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r) := + mul_nonneg (tailConstant_nonneg r) (by positivity) + have h := hd (fun i => residual s r (localize (i : M) (A.weight i) f)) τ + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) hτ hτ1 hsize + (fun i => residual_smooth hs r + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => by + rw [← error_finiteSmooth] + exact shifted_smoothing_tail r q m hτ hτs hst ht1 hB hC + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) (hb i) (hc i)) + rw [A.sub_smooth_eq_error] + simpa only [error, mul_assoc] using h + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothedMetricStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothedMetricStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..afd63d7b508512f03049380746e16eb441679019 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothedMetricStep.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalMetricStepBound +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalShiftedLinearMetricBound +import OAI.Geometry.SurfaceImmersion.Correction.CoupledSmoothing + +namespace OAI + +/-! The actual smoothed update has a defect bound linear in higher input norms. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance smoothStepFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance smoothStepFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem smoothed_normalized_metric_step_bound (r m : ℕ) : + ∃ D E : ℝ, 0 ≤ D ∧ 0 ≤ E ∧ + ∀ (target : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (target p)) → + ∀ (F U : M → Space), ContMDiff planeModel spaceModel ∞ F → + ContMDiff planeModel spaceModel ∞ U → + ∀ (δ δ' τ s t B C K R : ℝ), δ ≠ 0 → δ' ≠ 0 → + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → 0 ≤ K → + A.InputBound t r B F (normalizedTensorDefect target δ F) → + A.InputBound t m C F (normalizedTensorDefect target δ F) → + A.WeightedBound τ (m+1) K U → + A.TensorWeightedBound τ m R + (realizedTensorError target + (A.tensorSmooth r s (normalizedTensorDefect target δ F)) δ δ' (A.smooth r s F) U) → + A.TensorWeightedBound τ m + ((δ'^2)⁻¹ * + ((δ^2 + E*K/τ) * (D*tailConstant r*(B*(s/t)^r+C*(τ/t)^r)) + R)) + (normalizedTensorDefect target δ' (F+U)-target) := by + obtain ⟨D,hD,hd⟩ := A.coupled_smoothing_tail r m + obtain ⟨E,hE,he⟩ := A.global_shifted_linear_metric_bound m + refine ⟨D,E,hD,hE,?_⟩ + intro target ht F U hF hU δ δ' τ s t B C K R hδ hδ' hτ hτs hst ht1 hB hC hK hb hc hu hr + have hs : 0 < s := hτ.trans_le hτs + have htpos : 0 < t := hs.trans_le hst + have hτ1 : τ ≤ 1 := hτs.trans (hst.trans ht1) + have hH := A.normalizedTensorDefect_smooth ht δ hF + have hG := A.smooth_smooth r hs hF + have hHs := A.tensorSmooth_smooth r hs hH + let T := D*tailConstant r*(B*(s/t)^r+C*(τ/t)^r) + have hT : 0 ≤ T := by + dsimp [T] + exact mul_nonneg (mul_nonneg hD (tailConstant_nonneg r)) (by positivity) + have htail := hd F (normalizedTensorDefect target δ F) s t τ B C + hτ hτs hst ht1 hB hC hF hH hb hc + have hcross := he τ T K hτ hτ1 hT hK (F-A.smooth r s F) U + (hF.sub hG) hU (A.shiftedBound_lower_prefix htail.1 hτ.le hτ1 (by omega) (by omega)) hu + have hout := A.global_normalized_metric_step_bound ht hHs hδ hδ' hτ.le m + hF hG hU htail.2 hr hcross + convert hout using 1 + dsimp [T] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothingBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothingBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c604f864a17a87476cc9c4bc57918d9662b5de88 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GlobalSmoothingBounds.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasWeightedBounds +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTailBounds + +namespace OAI + +/-! Global smoothing estimates in the fixed finite atlas. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold MeasureTheory +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) + +/-- Global boundedness and smoothing gain use fixed chart constants and +no higher derivative of the true input. -/ +theorem smoothing_bounds (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ + (∀ (f : M → V) (s t C : ℝ), 0 < s → 0 < t → t ≤ 1 → 0 ≤ C → + ContMDiff planeModel 𝓘(ℝ, V) ∞ f → A.WeightedBound t m C f → + A.WeightedBound t m (D * (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) (A.smooth r s f)) ∧ + (∀ (f : M → V) (s t C : ℝ), 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel 𝓘(ℝ, V) ∞ f → A.WeightedBound t 0 C f → + A.WeightedBound s m (D * weightedGainConstant r m * C) (A.smooth r s f)) := by + obtain ⟨D, hD, hd⟩ := A.restoration_bound (V := V) m + refine ⟨D, hD, ?_, ?_⟩ + · intro f s t C hs ht ht1 hC hf hb + have hnon : 0 ≤ (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C := by positivity + have h := hd (fun i => finiteSmooth r s (localize (i : M) (A.weight i) f)) t + ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) ht ht1 hnon + (fun i => finiteSmooth_smooth r hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => finiteSmooth_weighted_bounded r m hs ht + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) (hb i)) + simpa only [smooth, mul_assoc] using h + · intro f s t C hs hs1 hC hf hb + have h := hd (fun i => finiteSmooth r s (localize (i : M) (A.weight i) f)) s + (weightedGainConstant r m * C) hs hs1 + (mul_nonneg (weightedGainConstant_nonneg r m) hC) + (fun i => finiteSmooth_smooth r hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => finiteSmooth_weighted_gain r m hs + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (fun x => (hb i).norm_le (mem_univ x))) + simpa only [smooth, mul_assoc] using h + +variable [CompleteSpace V] + +/-- The coordinate two-scale estimate survives finite atlas assembly. The +large higher input norm still occurs only linearly. -/ +theorem smoothing_tail_bound (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : M → V) (s t τ B C : ℝ), + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → + ContMDiff planeModel 𝓘(ℝ, V) ∞ f → + A.WeightedBound t r B f → A.WeightedBound t m C f → + A.WeightedBound τ m + (D * tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (f - A.smooth r s f) := by + obtain ⟨D, hD, hd⟩ := A.restoration_bound (V := V) m + refine ⟨D, hD, ?_⟩ + intro f s t τ B C hτ hτs hst ht1 hB hC hf hb hc + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hτ1 : τ ≤ 1 := hτs.trans (hst.trans ht1) + have hsize : 0 ≤ tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r) := + mul_nonneg (tailConstant_nonneg r) (add_nonneg + (mul_nonneg hB (pow_nonneg (div_nonneg hs.le ht.le) _)) + (mul_nonneg hC (pow_nonneg (div_nonneg hτ.le ht.le) _))) + have h := hd (fun i => residual s r (localize (i : M) (A.weight i) f)) τ + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) hτ hτ1 hsize + (fun i => residual_smooth hs r + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + (fun i => by + rw [← error_finiteSmooth] + exact weighted_smoothing_tail r m hτ hτs hst + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) (hb i) (hc i)) + rw [A.sub_smooth_eq_error] + simpa only [error, mul_assoc] using h + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GoodSmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GoodSmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..b7e03b0260dd9b60de717d0ab49f2482eddc03f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GoodSmoothingAtlas.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AdaptedSmoothingAtlas +import OAI.Geometry.Immersion.ClosedSurface.PhasePatches +import OAI.Geometry.Immersion.ClosedSurface.PhaseStock +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential + +namespace OAI + +/-! A smoothing atlas subordinate to actual good-phase neighborhoods. -/ +noncomputable section +open Set Manifold Filter TopologicalSpace +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4 +open SmallModes RealModes PhaseGeometry +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def PhasePatch.phaseBasis {F : M → Space} {H : Base → PhaseMean.Tensor} {p : M} + (P : PhasePatch F H p) : PhaseBasis where + ξ := P.ξ + Q := P.Q + decomposition := P.decomposition + nonzero := fun j => ((P.admissible _ P.centerO).2.2.1 j).1 + +namespace FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +omit [IsManifold planeModel ∞ M] in +lemma planeCoordinateIsometry_chart (p x : M) : + planeCoordinateIsometry (chart p x) = planeCoordinates (chartAt Plane p x) := rfl + +omit [IsManifold planeModel ∞ M] in +lemma coordinateMap_chart_symm (F : M → Space) (p : M) (x : SmallModes.Base) : + coordinateMap F p x = spaceCoordinates (F ((chart p).symm (planeCoordinateIsometry.symm x))) := rfl + +variable [T2Space M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [T2Space M] [CompactSpace M] in +/-- Locally constant outer cutoffs identify the entire coordinate germ on +the original weight support, and hence every derivative used by the phases. -/ +lemma vectorPlaneRead_eventually_coordinateMap + (F : M → Space) (i : A.centers) + (houter : ∀ x ∈ tsupport (A.weight i), A.outer i =ᶠ[𝓝 x] (fun _ => 1)) + {p : M} (hp : p ∈ tsupport (A.weight i)) : + (spaceCoordinates ∘ A.vectorPlaneRead i F) =ᶠ[ + 𝓝 (planeCoordinateIsometry (chart (i : M) p))] coordinateMap F (i : M) := by + let x := planeCoordinateIsometry (chart (i : M) p) + let inv : SmallModes.Base → M := fun z => (chart (i : M)).symm (planeCoordinateIsometry.symm z) + have hpS := A.weight_support i hp + have hinv : inv x = p := by + dsimp [inv,x] + rw [LinearIsometryEquiv.symm_apply_apply,(chart (i : M)).left_inv hpS] + have hc : ContinuousAt inv x := by + apply ContinuousAt.comp + · apply (chart (i : M)).continuousAt_symm + simpa only [x,LinearIsometryEquiv.symm_apply_apply] using (chart (i : M)).map_source hpS + · exact planeCoordinateIsometry.symm.continuous.continuousAt + have ht : Tendsto inv (𝓝 x) (𝓝 p) := by simpa only [ContinuousAt,hinv] using hc + have ho : ∀ᶠ z in 𝓝 x, A.outer i (inv z) = 1 := (houter p hp).comp_tendsto ht + have htarget : ∀ᶠ z in 𝓝 x, + planeCoordinateIsometry.symm z ∈ (chart (i : M)).target := + ((chart (i : M)).open_target.preimage planeCoordinateIsometry.symm.continuous).mem_nhds + (by simpa only [Set.mem_preimage,x,LinearIsometryEquiv.symm_apply_apply] using + (chart (i : M)).map_source hpS) + filter_upwards [ho,htarget] with z hz htgt + change spaceCoordinates (localize (i : M) (A.outer i) F (planeCoordinateIsometry.symm z)) = _ + rw [localize,indicator_of_mem htgt] + change spaceCoordinates (A.outer i (inv z)^2 • F (inv z)) = _ + rw [hz,one_pow,one_smul] + exact (coordinateMap_chart_symm F (i : M) z).symm + +end SmoothingAtlas + +/-- Good phase patches and a smoothing atlas share the same actual centers. +All local immersion, positivity and pure/mixed phase conditions are inherited +by the globally smooth coordinate readings on their compact supports. -/ +theorem exists_good_smoothingAtlas {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (hB : ∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0) + (H : M → SmallModes.Base → PhaseMean.Tensor) + (hH : ∀ p, ContinuousAt (H p) (coordinateCenter p)) + (hH0 : ∀ p, 0 < H p (coordinateCenter p) 0) + (hHdet : ∀ p, 0 < H p (coordinateCenter p) 0 * H p (coordinateCenter p) 2 - + (H p (coordinateCenter p) 1)^2) : + ∃ (A : SmoothingAtlas M) (P : ∀ p, PhasePatch F (H p) p), + (∀ i : A.centers, tsupport (A.weight i) ⊆ (P (i : M)).V) ∧ + (∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) ∧ + ∀ (i : A.centers) (x : SmallModes.Base), + x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ∧ + (∀ j, 0 < (P (i : M)).Q j (H (i : M) x)) ∧ + (∀ j, Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).ξ j)) ∧ + (∀ j k, j ≠ k → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).ξ j + (P (i : M)).ξ k) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).ξ j - (P (i : M)).ξ k)) := by + classical + let P : ∀ p, PhasePatch F (H p) p := fun p => + Classical.choice (exists_phasePatch hF p (hImm p) (hB p) (hH p) (hH0 p) (hHdet p)) + obtain ⟨A,hsub,houter⟩ := exists_smoothingAtlas_subordinate_locally_one + (fun p => (P p).V) (fun p => (P p).openV) (fun p => (P p).centerV) + refine ⟨A,P,hsub,houter,?_⟩ + intro i x hx + change x ∈ planeCoordinateIsometry '' ((chart (i : M)) '' tsupport (A.weight i)) at hx + rcases hx with ⟨y,⟨p,hp,rfl⟩,rfl⟩ + have hO : planeCoordinateIsometry (chart (i : M) p) ∈ (P (i : M)).O := by + simpa only [planeCoordinateIsometry_chart] using (P (i : M)).mapsV p (hsub i hp) + have he := A.vectorPlaneRead_eventually_coordinateMap F i (houter i) hp + have hder := he.fderiv_eq (𝕜 := ℝ) + have hsecond := (realSecondTensor_eventuallyEq he).eq_of_nhds + have ha := (P (i : M)).admissible _ hO + rw [← hder,← hsecond] at ha + exact ha + +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..a549b80fcd8ea7956f9b90f18ac0c41466251c98 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeCorrection.lean @@ -0,0 +1,131 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GridGlobalQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Correction.GridFreeSupport +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAtlasSeedProfile +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 gridFreeCorrectionFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridFreeCorrectionFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridFreeCorrectionDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridFreeCorrectionDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridFreeCorrectionSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridFreeCorrectionSectionSpace (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_quadratic_correction (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 : ℕ) : + ∃ (e : ℕ → ℕ) (E : ℕ → ℝ), (∀ m, 1 ≤ E 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)) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(e m))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1)*(δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(e m)))) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + A.finiteAtlasNonzero d hρ δ q u)) := by + obtain ⟨α,hα,hamp⟩ := A.polynomial_atlas_seed_profile q C J N B hC hJ hN hB hC1 hB1 + obtain ⟨P,hP,hphase⟩ := A.linearPhaseCatalog_derivative_bounds V + obtain ⟨e,E,hE,hquad⟩ := A.grid_global_quadratic_correction V houter hε hκ hb + FJ α (fun m _ => P m) hFJ hFJ1 hα (fun m => RealModes.polynomialBound_const + (zero_le_one.trans (hP m))) q + refine ⟨e,E,hE,?_⟩ + 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δ u hu hball hbu + let Z := fun l : A.GridPhaseIndex a => A.finiteGlobalAmplitude d hρ δ q u l.1 l.2 + have hZ (l : A.GridPhaseIndex a) : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z l) := + restore_smooth (l.1 : M) (A.outer_smooth l.1) (A.outer_support l.1) + ((d l.1 l.2).freeAmplitude hρ δ q (A.tensorPlaneRead l.1 u)).contDiff + have hSZ (l : A.GridPhaseIndex a) : tsupport (Z l) ⊆ A.gridPhaseSupport h l := + A.finiteGlobalAmplitude_grid_support d hρ δ q u l.1 l.2 + have hbound := hamp x hx F hF d hc hρ hτ hs hτs hs1 hρB hbud δ hδ u hu hball hbu + have hder (k : A.centers) (l : A.GridPhaseIndex a) (m : ℕ) (v : SmallModes.Base) (hv : ‖v‖ ≤ 1) := + hphase (A.gridRestoredPhase (s := a) ξ w l) + (A.restored_linear_phase_mem_catalog V l.1 (hV l)) k s hs hs1 m v hv + obtain ⟨W,hW,hsize,hres⟩ := hquad h a ξ w hw hV n hn x hx F hF + hlocal hpairs hImm hnormal hgram τ δ s hτ hs hτs hs1 hδ hFjets Z hZ hSZ + (fun k l m => hbound k l.1 l.2 m) hder + have hphases : A.gridRestoredPhase (s := a) ξ w = + (fun l : A.GridPhaseIndex a => A.finiteGlobalPhase (ι := fun i => (a i) × Fin 3) (φ := φ) l.1 l.2) := by + funext l + exact (A.finiteGlobalPhase_eq_gridRestoredPhase φ ξ w hφ l.1 l.2).symm + refine ⟨W,hW,hsize,?_⟩ + intro m + simpa only [hphases,finiteAtlasNonzero,Z] using hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeMeanIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeMeanIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..485519dcb9c0d040577086d5fbd29842961cf24e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeMeanIdentity.lean @@ -0,0 +1,134 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.FiniteAtlasIncrement +import OAI.Geometry.SurfaceImmersion.Atlas.GridAtlasMetric +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAdjustedMean +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPlaneWeight +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Exact metric expansion for the variable grid of phases in a fixed atlas. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry +open PhaseGrid (Index coverRegion supportedCellCutoff) +local instance gridFreeMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridFreeMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridFreeMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridFreeMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridFreeMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridFreeMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +local instance {a : A.centers → Finset Index} : DecidableEq (Σ i, ((a i) × Fin 3)) := + Classical.decEq _ + +theorem grid_free_mean_identity + {a : A.centers → Finset Index} {h : ℝ} (hh : 0 < h) + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion (a i) h) + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ((a i) × Fin 3) → Base → ℝ} + {K : ∀ i, ((a i) × Fin 3) → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) (hρ : 0 < ρ) + (Q : ∀ i, (a i) → PhaseBasis) (w : ∀ i, (a i) → Fin 3 → ℝ) + (hw : ∀ i k j, w i k j ≠ 0) + (hphase : ∀ i k j, coordinatePhase (φ i (k,j)) = phaseLinear (w i k j • (Q i k).ξ j)) + (hcutoff : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).cutoff ((c i (k,j)).e x) = + supportedCellCutoff (A.supportedPlaneWeight i) hh (hcover i) k.val x / w i k j) + (hform : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).form ((c i (k,j)).e x) = (Q i k).Q j) + (hsupport : ∀ i k j, tsupport (supportedCellCutoff + (A.supportedPlaneWeight i) hh (hcover i) k.val) ⊆ (c i (k,j)).e.source) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (u : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hsym : ∀ p v v', u p v v' = u p v' v) + (hball : ∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) : + A.finiteAtlasFreeMean d hρ δ q u = + δ^2 • (u+A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) u) := by + have hg := A.grid_atlas_free_metric hh hcover d hρ Q w hw hphase hcutoff hform + hsupport hK u hu hsym hball hδ hτ q + have hs := A.finite_atlas_metric_split d hρ hδ hτ q u hK + change inducedTensor (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u) = + δ^2 • (u+A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) u) + + A.finiteAtlasNonzero d hρ δ q u at hg + exact add_right_cancel (hs.symm.trans hg) + +theorem grid_free_mean_residual + {a : A.centers → Finset Index} {h : ℝ} (hh : 0 < h) + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ + coverRegion (a i) h) + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ((a i) × Fin 3) → Base → ℝ} + {K : ∀ i, ((a i) × Fin 3) → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} + {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)) (hρ : 0 < ρ) + (Q : ∀ i, (a i) → PhaseBasis) (w : ∀ i, (a i) → Fin 3 → ℝ) + (hw : ∀ i k j, w i k j ≠ 0) + (hphase : ∀ i k j, coordinatePhase (φ i (k,j)) = phaseLinear (w i k j • (Q i k).ξ j)) + (hcutoff : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).cutoff ((c i (k,j)).e x) = + supportedCellCutoff (A.supportedPlaneWeight i) hh (hcover i) k.val x / w i k j) + (hform : ∀ i k j x, x ∈ (c i (k,j)).e.source → + (d i (k,j)).form ((c i (k,j)).e x) = (Q i k).Q j) + (hsupport : ∀ i k j, tsupport (supportedCellCutoff + (A.supportedPlaneWeight i) hh (hcover i) k.val) ⊆ (c i (k,j)).e.source) + (hK : ∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) + (u : ∀ x : M, CovariantTwoTensor x) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + (hsym : ∀ p v v', u p v v' = u p v' v) + (hball : ∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) + {δ : ℝ} (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) + (f : ∀ x : M, CovariantTwoTensor x) + (hf : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (f x))) + {m : ℕ} {C : ℝ} (hτpos : 0 < τ) (hτs : τ ≤ s) + (hres : A.TensorWeightedBound s m C + (u+A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) u-f)) : + + A.TensorWeightedBound τ m (δ^2*C) (A.finiteAtlasFreeMean d hρ δ q u-δ^2 • f) := by + have hmean := A.grid_free_mean_identity hh hcover d hρ Q w hw hphase hcutoff hform + hsupport hK u hu hsym hball hδ hτ q + have hμ := A.tensorPlaneRestore_smooth + (fun i => chartedFamilyMean_smooth (d i) hρ δ q (A.tensorPlaneRead i u)) + have hr := (hu.add_section hμ).sub_section hf + have hb : A.TensorWeightedBound τ m C + (u+A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) u-f) := + fun i => (hres i).shrink_scale hτpos.le hτs + have hh := A.tensorWeightedBound_const_smul hr hb (δ^2) + rw [abs_of_nonneg (sq_nonneg δ)] at hh + rw [hmean,← smul_sub] + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..efd71df030cf7fc57b94daeca74369f00c45020f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridFreeSupport.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridCutoffSupport +import OAI.Geometry.SurfaceImmersion.Atlas.GridRestoredGeometry +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeMetric + +namespace OAI + +/-! The actual free amplitudes have precisely the global grid supports +used in the quadratic cancellation theorem. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGrid PhaseGeometry +local instance gridFreeSupportFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridFreeSupportFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridFreeSupportDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridFreeSupportDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridFreeSupportSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridFreeSupportSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma finiteGlobalAmplitude_grid_support + {a : A.centers → Finset Index} {h : ℝ} + {G : A.centers → JetPolynomial.Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ((a i) × Fin 3) → JetPolynomial.Base → ℝ} {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 (G i) (hG i) (φ 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)) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (u : ∀ x : M, CovariantTwoTensor x) + (i : A.centers) (j : (a i) × Fin 3) : + tsupport (A.finiteGlobalAmplitude d hρ δ q u i j) ⊆ + A.gridPhaseSupport h ⟨i,j⟩ := by + exact A.restore_cell_tsupport i (a i) h j.1.val + ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) + ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)).tsupport_subset + +omit [CompactSpace M] in +lemma finiteGlobalPhase_eq_gridRestoredPhase + {a : A.centers → Finset Index} + (φ : ∀ i, ((a i) × Fin 3) → JetPolynomial.Base → ℝ) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ) + (hφ : ∀ i j, φ i j = phaseLinear (w (i,j.1.val,j.2) • ξ (i,j.1.val,j.2)) ∘ + planeCoordinateIsometry) (i : A.centers) (j : (a i) × Fin 3) : + A.finiteGlobalPhase (ι := fun i => (a i) × Fin 3) (φ := φ) i j = A.gridRestoredPhase (s := a) ξ w ⟨i,j⟩ := by + simp only [finiteGlobalPhase,hφ,gridRestoredPhase,gridPhaseLabel] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridGlobalQuadraticCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridGlobalQuadraticCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..4b14d64ca3bf3e8f8368b2c6310f52b0d9f968ff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridGlobalQuadraticCorrection.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CatalogGlobalQuadraticCorrection +import OAI.Geometry.SurfaceImmersion.Atlas.GridRestoredGeometry + +namespace OAI + +/-! Actual correction for the variable grid with a fixed polynomial budget. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance gridGlobalQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridGlobalQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridGlobalQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridGlobalQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridGlobalQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridGlobalQuadraticSectionSpace (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_global_quadratic_correction (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) + (B α β : ℕ → ℝ → ℝ) + (hB : ∀ m, RealModes.HasPolynomialBound (B m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) + (hα : ∀ m, RealModes.HasPolynomialBound (α m)) + (hβ : ∀ m, RealModes.HasPolynomialBound (β m)) (q : ℕ) : + ∃ (d : ℕ → ℕ) (E : ℕ → ℝ), (∀ m, 1 ≤ E m) ∧ + ∀ (h : ℝ) (s₀ : A.centers → Finset Index) + (ξ : AtlasCellPhase (ι := A.centers) → SmallModes.Base) + (w : AtlasCellPhase (ι := A.centers) → ℝ), + (∀ a, 1 ≤ w a) → + (∀ a : A.GridPhaseIndex s₀, w (A.gridPhaseLabel a) • ξ (A.gridPhaseLabel a) ∈ V) → + ∀ n : ℕ, Fintype.card (A.GridPhaseIndex s₀) ≤ n → ∀ x : ℝ, 1 ≤ x → + ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F), + (∀ a p, atlasActive (fun i : A.centers => (i : M)) A.weight s₀ h a p → + atlasGram F (a.1 : M) p ≠ 0 ∧ atlasSecondTensor F (a.1 : M) p ≠ 0 ∧ + ε*‖atlasSecondTensor F (a.1 : M) p‖ ≤ + ‖secondQuadratic (atlasSecondTensor F (a.1 : M) p) (-(ξ a).2,(ξ a).1)‖) → + AtlasPairMargins (fun i : A.centers => (i : M)) A.weight s₀ 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₀) → + ∀ (τ δ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ δ → + (∀ k m j, j ≤ m+3 → WeightedEstimates.WeightedBound univ 1 j + (B m x/(s : ℝ)^(j-2)) (spaceCoordinates ∘ A.vectorPlaneRead k F)) → + ∀ (Z : A.GridPhaseIndex s₀ → M → Fin 4 → ℂ) + (_hZ : ∀ a, ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a)), + (∀ a, tsupport (Z a) ⊆ A.gridPhaseSupport h a) → + (∀ k a m, WeightedEstimates.WeightedBound univ s (m+1) + (α m x*(δ*τ)) (A.vectorPlaneRead k (Z a))) → + (∀ k a m v, ‖v‖ ≤ 1 → WeightedEstimates.WeightedBound univ s m + (β m x) (SmallModes.coordDeriv v (A.vectorPlaneRead k (A.gridRestoredPhase (s := s₀) ξ w a)))) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(d m))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + ((τ/s)^(q+1)*(δ^2*((n : ℝ)+2*(n : ℝ)^2)*(E m*x^(d m)))) + (linearMetricTensor F (spaceCoordinates.symm ∘ W) + + A.tensorPlaneRestore (fun k y => (A.planeWeight k y)^2 • + RealModes.nonzeroPhaseSum τ + (fun a => A.vectorPlaneRead k (A.gridRestoredPhase (s := s₀) ξ w a)) + (fun a => A.vectorPlaneRead k (Z a)) y))) := by + classical + obtain ⟨e,he,hmargin⟩ := A.grid_restored_quadratic_margin houter hε hκ + let D := max 1 (max D₀ (e*b)⁻¹) + have hD : 1 ≤ D := le_max_left _ _ + have hD₀ : D₀ ≤ D := (le_max_left _ _).trans (le_max_right _ _) + have hDB : (e*b)⁻¹ ≤ D := (le_max_right _ _).trans (le_max_right _ _) + obtain ⟨d,E,hE,hcancel⟩ := A.catalog_global_quadratic_correction V he hb hD hDB + B α β hB hB1 hα hβ q + refine ⟨d,E,hE,?_⟩ + intro h s₀ ξ w hw hV n hn x hx F hF hlocal hpairs hImm hnormal hgram + τ δ s hτ hs hτs hs1 hδ hFj Z hZ hSZ hz hp + have hcat (a : A.GridPhaseIndex s₀) : A.gridRestoredPhase (s := s₀) ξ w a ∈ A.linearPhaseCatalog V := + A.restored_linear_phase_mem_catalog V a.1 (hV a) + have hφ (a : A.GridPhaseIndex s₀) : ContMDiff planeModel 𝓘(ℝ) ∞ (A.gridRestoredPhase (s := s₀) ξ w a) := + A.linearPhaseCatalog_smooth V _ (hcat a) + have hsub (k : A.centers) (l : RealModes.QuadraticLabel (A.GridPhaseIndex s₀)) : + (modeSupport (A.quadraticOverlapCompact (A.gridPhaseSupport h) + (fun _ => isClosed_tsupport _) k l) : Set SmallModes.Base) ⊆ + modeSupport (A.chartWeightCompact k) := + Set.image_mono (A.quadraticOverlapCompact_subset (A.gridPhaseSupport h) + (fun _ => isClosed_tsupport _) k l) + exact hcancel n hn x hx F hF (A.gridRestoredPhase (s := s₀) ξ w) Z hφ hZ + (A.gridPhaseSupport h) (fun _ => isClosed_tsupport _) hcat hSZ + (fun k l y hy => hImm k y (hsub k l hy)) + (fun k l y hy => hnormal k y (hsub k l hy)) + (hmargin h s₀ ξ w hw F hF hlocal hpairs) + (fun k l y hy => (hgram k y (hsub k l hy)).trans hD₀) + τ δ s hτ hs hτs hs1 hδ hFj hz hp + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..3267224b2c920a77ba7ff0325c5b83f35fececf0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanBudgets.lean @@ -0,0 +1,38 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLinearMeanBudgets +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseCutoffBounds + +namespace OAI + +/-! Polynomial growth of the actual grid mean budgets in the inverse grid scale. -/ +noncomputable section +namespace ClosedSurfaceR4.PhaseMean +open RealModes JetPolynomial + +def gridMeanBudget (p : ℕ → ℕ) (A L : ℕ → ℝ) (B : ℕ → ℝ → ℝ) + (m : ℕ) (x : ℝ) : ℝ := + linearMeanGeometryBudget p A (fun j => B j x) + (fun j => 1+phaseCutoffBudget j (L j*x^(6*j)) (B j x) 1) m + +lemma gridMeanBudget_polynomial (p : ℕ → ℕ) (A L : ℕ → ℝ) + (B : ℕ → ℝ → ℝ) (hA : ∀ m, 0 ≤ A m) (hL : ∀ m, 0 ≤ L m) + (hB : ∀ m, HasPolynomialBound (B m)) (m : ℕ) : + HasPolynomialBound (gridMeanBudget p A L B m) := by + apply linearMeanGeometryBudget_growth p A B _ hA hB + intro j + exact (polynomialBound_const zero_le_one).add + (phaseCutoffBudget_polynomial j + ((polynomialBound_const (hL j)).mul (polynomialBound_id.pow (6*j))) + (hB j) (polynomialBound_const zero_le_one)) + +lemma gridMeanBudget_at_inverse (p : ℕ → ℕ) (A L : ℕ → ℝ) + (B : ℕ → ℝ → ℝ) (m : ℕ) (z : ℝ) : + gridMeanBudget p A L B m z⁻¹ = + linearMeanGeometryBudget p A (fun j => B j z⁻¹) + (fun j => 1+phaseCutoffBudget j (L j/z^(6*j)) (B j z⁻¹) 1) m := by + simp only [gridMeanBudget,inv_pow,div_eq_mul_inv] + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..e699f9e3c4a776854b376fe27cc2c84497f77104 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanData.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSupportedMeanData +import OAI.Geometry.SurfaceImmersion.Atlas.GridCutoffBounds +import OAI.Geometry.SurfaceImmersion.Geometry.UniformCoefficientMargins +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasOuterDomains +import OAI.Geometry.SurfaceImmersion.Atlas.MetricAtlasReference +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! Actual mean solvers for the variable grid, with common polynomial budgets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGrid PhaseGeometry RealModes +local instance gridMeanDataFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance gridMeanDataFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance gridMeanDataDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance gridMeanDataDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance gridMeanDataSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance gridMeanDataSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem polynomial_grid_mean_data (g : SmoothMetric M) {a₀ C₀ H : ℝ} + (ha₀ : 0 < a₀) (hC₀ : 0 ≤ C₀) (hH : 0 ≤ H) : + ∃ (p p' : ℕ → ℕ) (C C' L : ℕ → ℝ), + (∀ m, 1 ≤ C m) ∧ (∀ m, 1 ≤ C' m) ∧ (∀ m, 1 ≤ L m) ∧ + ∃ r ρ R : ℝ, 0 < r ∧ 0 < ρ ∧ 0 < R ∧ + ∀ (z : ℝ) (hz : 0 < z), z ≤ 1 → ∀ a : A.centers → Finset Index, + (hcover : ∀ i, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ coverRegion (a i) (z^6)) → + ∀ (Q : ∀ i, (a i) → PhaseBasis) (w : ∀ i, (a i) → Fin 3 → ℝ), + (∀ i k j, 1 ≤ w i k j) → (∀ i k j, ‖(Q i k).Q j‖ ≤ C₀) → + (∀ i k j x, (Q i k).Q j (A.tensorPlaneRead i g.inner x) ≤ H) → + (∀ i k j x, x ∈ (modeSupport (A.cellChartCompact i (a i) (z^6) k.val) : Set SmallModes.Base) → + a₀ ≤ (Q i k).Q j (A.tensorPlaneRead i g.inner x)) → + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → ∀ D : ℝ, 0 < D → + ∀ B : ℕ → ℝ, (∀ m, 1 ≤ B m) → (∀ m, 2*D ≤ B m ∧ C₀ ≤ B m) → + (∀ i k j m, ‖w i k j • (Q i k).ξ j‖ ≤ B m ∧ + ∀ hξ : w i k j • (Q i k).ξ j ≠ 0, + ‖(phaseEquiv (w i k j • (Q i k).ξ j) hξ).symm.toContinuousLinearMap‖ ≤ B m) → + (∀ i m l, l ≤ m+3 → WeightedEstimates.WeightedBound univ 1 l + (B m/(s : ℝ)^(l-2)) (spaceCoordinates ∘ A.vectorPlaneRead i F)) → + (∀ i k j x, x ∈ (modeSupport (A.cellChartCompact i (a i) (z^6) k.val) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (w i k j • (Q i k).ξ j) ∧ + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (SmallModes.coordDeriv SmallModes.dy (spaceCoordinates ∘ A.vectorPlaneRead i F) x))⁻¹‖ ≤ D ∧ + ‖secondQuadratic (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + (-(w i k j • (Q i k).ξ j).2,(w i k j • (Q i k).ξ j).1)‖⁻¹ ≤ D) → + ∃ c : ∀ i (j : (a i) × Fin 3), PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) + (phaseLinear (w i j.1 j.2 • (Q i j.1).ξ j.2) ∘ planeCoordinateIsometry) + (A.cellChartCompact i (a i) (z^6) j.1.val) τ s, + ∃ d : ∀ i j, ChartedMeanData (c i j) (A.tensorReadBallConstant*r) ρ R (A.tensorPlaneRead i g.inner), + (∀ i j m, (c i j).C m = C m*(B m)^(p m) ∧ + (c i j).J m = 1+2*B m ∧ (c i j).D m = 0) ∧ + (∀ i j x, x ∈ (c i j).e.source → (d i j).cutoff ((c i j).e x) = + supportedCellCutoff (A.supportedPlaneWeight i) (pow_pos hz 6) + (hcover i) j.1.val x / w i j.1 j.2) ∧ + (∀ i j, (d i j).form = fun _ => (Q i j.1).Q j.2) ∧ + (∀ i j, tsupport (fun x => A.planeWeight i x * normalizedCutoff (a i) (z^6) j.1.val x) ⊆ + (c i j).e.source) ∧ + ∀ i j m, let b := linearMeanGeometryBudget p' C' B (fun l => + 1+phaseCutoffBudget l (L l/z^(6*l)) (B l) 1) m; + (d i j).budgets.inv m ≤ b ∧ (d i j).budgets.chi m ≤ b ∧ + (d i j).budgets.forms m ≤ b ∧ (d i j).budgets.pull m ≤ b ∧ + (d i j).budgets.psi m ≤ b ∧ (d i j).budgets.normal m ≤ b ∧ (d i j).budgets.mode m ≤ b := by + classical + obtain ⟨p,p',C,C',hC,hC',hmean⟩ := polynomial_supported_linear_mean_data + obtain ⟨L,hL,hcut⟩ := A.grid_exact_cutoff_bounds + obtain ⟨r,ρ,R,hr,hρ,hR,hmargin⟩ := uniform_coefficient_margins ha₀ hC₀ hH + obtain ⟨U₀,K₀,hU₀,hUK,hKU,_⟩ := A.exists_outer_domains + have hball := zero_lt_one.trans_le A.one_le_tensorReadBallConstant + have hballr : A.tensorReadBallConstant*(r/A.tensorReadBallConstant) = r := + mul_div_cancel₀ r hball.ne' + refine ⟨p,p',C,C',L,hC,hC',hL,r/A.tensorReadBallConstant,ρ,R,div_pos hr hball,hρ,hR,?_⟩ + intro z hz hz1 a hcover Q w hw hQ hup hlow F hF τ s hs hs1 D hD B hB hBD hphase hjets hgeom + rw [hballr] + let K := fun i (j : (a i) × Fin 3) => A.cellChartCompact i (a i) (z^6) j.1.val + let φ := fun i (j : (a i) × Fin 3) => + phaseLinear (w i j.1 j.2 • (Q i j.1).ξ j.2) ∘ planeCoordinateIsometry + have local_data (i : A.centers) (j : (a i) × Fin 3) : + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 (A.jetChartMap i F) + (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s, + ∃ d : ChartedMeanData c r ρ R (A.tensorPlaneRead i g.inner), + (∀ m, c.C m = C m*(B m)^(p m)) ∧ (∀ m, c.J m = 1+2*B m) ∧ + (∀ m, c.D m = 0) ∧ + (∀ x ∈ c.e.source, d.cutoff (c.e x) = + (w i j.1 j.2)⁻¹ * A.exactCellCutoff i (pow_pos hz 6) (hcover i) j.1.val x) ∧ + d.form = (fun _ => (Q i j.1).Q j.2) ∧ + ∀ m, let b := linearMeanGeometryBudget p' C' B (fun l => + 1+phaseCutoffBudget l (L l/z^(6*l)) (B l) 1) m; + d.budgets.inv m ≤ b ∧ d.budgets.chi m ≤ b ∧ d.budgets.forms m ≤ b ∧ + d.budgets.pull m ≤ b ∧ d.budgets.psi m ≤ b ∧ d.budgets.normal m ≤ b ∧ d.budgets.mode m ≤ b := by + let ξ := w i j.1 j.2 • (Q i j.1).ξ j.2 + have hξ : ξ ≠ 0 := smul_ne_zero (ne_of_gt (zero_lt_one.trans_le (hw i j.1 j.2))) + ((Q i j.1).nonzero j.2) + obtain ⟨W,hW,hKW,hWmargin⟩ := hmargin ((Q i j.1).Q j.2) (hQ i j.1 j.2) + (A.tensorPlaneRead i g.inner) (A.tensorPlaneRead_metric_smooth g i).continuous + (hup i j.1 j.2) (modeSupport (K i j)) (hlow i j.1 j.2) + let f : SupportedField (F := ℝ) (modeSupport (K i j)) := + (w i j.1 j.2)⁻¹ • A.exactCellCutoff i (pow_pos hz 6) (hcover i) j.1.val + have hP (m : ℕ) : 1 ≤ L m/z^(6*m) := + (one_le_div (pow_pos hz _)).mpr ((pow_le_one₀ hz.le hz1).trans (hL m)) + obtain ⟨V,hV,c,d,_,hcC,hcJ,hcD,hψ,hform,hbudget⟩ := hmean + (A.jetChartMap_smooth i hF) (K i j) hξ hW hKW (hU₀ i) (K₀ i) (hUK i) + ((A.cellChartCompact_subset i (a i) (z^6) j.1.val).trans (hKU i)) hD + (by simpa only [A.jetChartMap_plane] using fun x hx => (hgeom i j.1 j.2 x hx).1) + (by simpa only [A.jetChartMap_plane] using fun x hx => (hgeom i j.1 j.2 x hx).2.1) + (by simpa only [A.jetChartMap_plane] using fun x hx => (hgeom i j.1 j.2 x hx).2.2.1) + (by simpa only [A.jetChartMap_plane] using fun x hx => (hgeom i j.1 j.2 x hx).2.2.2) + ((Q i j.1).Q j.2) hWmargin τ s hs hs1 B (fun m => L m/z^(6*m)) hB hP + (fun m => ⟨(hBD m).1,(hphase i j.1 j.2 m).1,(hphase i j.1 j.2 m).2 hξ, + (hQ i j.1 j.2).trans (hBD m).2⟩) + (by simpa only [A.jetChartMap_plane] using hjets i) f + (hcut i hz hz1 (hcover i) j.1.val s hs hs1 (w i j.1 j.2) (hw i j.1 j.2)) + exact ⟨c,d,hcC,hcJ,hcD,hψ,hform,hbudget⟩ + choose c d hcC hcJ hcD hψ hform hbudget using local_data + refine ⟨c,d,fun i j m => ⟨hcC i j m,hcJ i j m,hcD i j m⟩,?_,hform,?_,hbudget⟩ + · intro i j x hx + rw [hψ i j x hx] + change (w i j.1 j.2)⁻¹ * + (A.planeWeight i x * normalizedCutoff (a i) (z^6) j.1.val x) = _ + simp only [supportedCellCutoff_apply,supportedPlaneWeight_apply,div_eq_mul_inv] + ring + · intro i j + exact (A.cellCutoff_tsupport i (pow_pos hz 6) (hcover i) j.1.val).trans (c i j).supportChart + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..b19e04aedcc3a2c7b363d8f90e6f8f4022a5540e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/GridMeanReconstruction.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.GridPhaseCutoffs +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedPartitionLeading + +namespace OAI + +/-! The leading tensor of all cell phases is exactly the original chart +weight squared times the input tensor. No cardinality-dependent loss occurs. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.PhaseGrid +open JetPolynomial + +lemma supportedCellCutoff_square_sum {K : Compacts Base} + (f : SupportedField (F := ℝ) K) {a : Finset Index} {h : ℝ} + (hh : 0 < h) (hK : (K : Set Base) ⊆ coverRegion a h) (x : Base) : + (∑ k : a, (supportedCellCutoff f hh hK k.val x)^2) = (f x)^2 := by + classical + by_cases hf : f x = 0 + · simp [supportedCellCutoff_apply,hf] + have hxK : x ∈ (K : Set Base) := by + by_contra hx + exact hf (by simpa only [Pi.zero_apply] using f.zero_on_compl hx) + have hsum := normalizedCutoff_squares + (zero_lt_one.trans_le (squareSum_ge_one hh (coverRegion_covers a h (hK hxK)))) + have hco : (∑ k : a, (normalizedCutoff a h k.val x)^2) = + ∑ k ∈ a, (normalizedCutoff a h k x)^2 := + Finset.sum_coe_sort a (fun k => (normalizedCutoff a h k x)^2) + simp only [supportedCellCutoff_apply,mul_pow] + rw [← Finset.mul_sum,hco,hsum,mul_one] + +end ClosedSurfaceR4.PhaseGrid + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean PhaseGeometry RealModes FiniteMean PhaseGrid + +theorem charted_grid_partition_leading {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {a : Finset Index} {h : ℝ} {K₀ : Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K₀) (hh : 0 < h) + (hK₀ : (K₀ : Set SmallModes.Base) ⊆ coverRegion a h) + {φ : a → Fin 3 → Base → ℝ} {K : a → Fin 3 → Compacts Base} {s : ℝ≥0} + {c : ∀ k j, PolynomialSolveData P ε G hG (φ k j) (K k j) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ k j, ChartedMeanData (c k j) r ρ R reference) (hρ : 0 < ρ) + (Q : a → PhaseBasis) (w : a → Fin 3 → ℝ) + (hw : ∀ k j, w k j ≠ 0) + (hphase : ∀ k j, coordinatePhase (φ k j) = phaseLinear (w k j • (Q k).ξ j)) + (hcutoff : ∀ k j x, x ∈ (c k j).e.source → + (d k j).cutoff ((c k j).e x) = supportedCellCutoff χ hh hK₀ k.val x / w k j) + (hform : ∀ k j x, x ∈ (c k j).e.source → (d k j).form ((c k j).e x) = (Q k).Q j) + (hsupport : ∀ k j, tsupport (supportedCellCutoff χ hh hK₀ k.val) ⊆ (c k j).e.source) + {A : SmallModes.Base → Tensor} (hA : ContDiff ℝ ∞ A) + (hball : InTrialBall univ reference r A) : + chartedFamilyLeading (fun t : a × Fin 3 => d t.1 t.2) hρ A = + fun x => (χ x)^2 • A x := by + classical + have hcell (k : a) := charted_partition_leading (d k) hρ + (supportedCellCutoff χ hh hK₀ k.val) (Q k) (w k) (hw k) (hphase k) + (hcutoff k) (hform k) (hsupport k) hA hball + funext x + change (∑ t : a × Fin 3, (d t.1 t.2).leading hρ A x) = _ + rw [Fintype.sum_prod_type] + simp_rw [show ∀ k : a, (∑ j : Fin 3, (d k j).leading hρ A x) = + (supportedCellCutoff χ hh hK₀ k.val x)^2 • A x from fun k => congrFun (hcell k) x] + rw [← Finset.sum_smul,supportedCellCutoff_square_sum] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/HigherJetPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/HigherJetPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..7bc335f2c0c1d118d5897c1a88a283593668b9e8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/HigherJetPolynomial.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.HigherJetMonomial + +namespace OAI + +/-! Finite sums of higher-jet monomials retain one scale-loss exponent +for every output derivative order, as required in the small-increment step. -/ +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] + +/-- The scale loss in a finite higher-jet polynomial is bounded by the +largest sum of its additional derivative orders. -/ +theorem compact_higher_jet_polynomial {ι τ : Type*} {U : Set A} {V K : Set J} + (hU : IsOpen U) (hV : IsOpen V) (hK : IsCompact K) (hKV : K ⊆ V) + (c : τ → J → E) (hc : ∀ j, ContDiffOn ℝ ∞ (c j) V) + (b : Finset τ) (a : τ → Finset ι) (vs : τ → ι → List A) (P m : ℕ) + (hP : ∀ j ∈ b, (∑ i ∈ a j, (vs j i).length) ≤ P) : + ∃ D : τ → ℝ, (∀ j, 1 ≤ D j) ∧ + ∀ (Q : A → J) (f : τ → ι → A → ℝ) (s B : ℝ) (C : τ → ι → ℝ), + 0 < s → s ≤ 1 → 1 ≤ B → (∀ j ∈ b, ∀ i ∈ a j, 0 ≤ C j i) → + (∀ j ∈ b, ∀ i ∈ a j, ∀ v ∈ vs j i, ‖v‖ ≤ 1) → + ContDiffOn ℝ ∞ Q U → Set.MapsTo Q U K → WeightedBound U s m B Q → + (∀ j ∈ b, ∀ i ∈ a j, ContDiffOn ℝ ∞ (f j i) U) → + (∀ j ∈ b, ∀ i ∈ a j, + WeightedBound U s (m + (vs j i).length) (C j i) (f j i)) → + WeightedBound U s m + ((∑ j ∈ b, 2 ^ m * ((2 ^ m) ^ (a j).card * ∏ i ∈ a j, C j i) * + ((m.factorial : ℝ) * D j * B ^ m)) / s ^ P) + (fun x => ∑ j ∈ b, (∏ i ∈ a j, iteratedDirectional (vs j i) (f j i) x) • c j (Q x)) := by + choose D hD hd using fun j => + compact_higher_jet_monomial hU hV hK hKV (hc j) (a j) (vs j) m + refine ⟨D, hD, ?_⟩ + intro Q f s B C hs hs1 hB hC hv hQ hQK hbQ hf hbf + apply WeightedBound.finset_sum_losses hU.uniqueDiffOn hs hs1 b + (fun j => 2 ^ m * ((2 ^ m) ^ (a j).card * ∏ i ∈ a j, C j i) * + ((m.factorial : ℝ) * D j * B ^ m)) + (fun j => ∑ i ∈ a j, (vs j i).length) + · intro j hj + have hprod : 0 ≤ ∏ i ∈ a j, C j i := Finset.prod_nonneg (hC j hj) + have hDj : 0 ≤ D j := zero_le_one.trans (hD j) + positivity + · exact hP + · intro j hj + exact (contDiffOn_prod (fun i hi => contDiffOn_iteratedDirectional hU (hf j hj i hi) + (vs j i))).smul (hc j |>.comp hQ (fun x hx => hKV (hQK hx))) + · intro j hj + exact hd j Q (f j) s B (C j) hs hB (hC j hj) (hv j hj) hQ hQK hbQ (hf j hj) (hbf j hj) + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d5ca738c0bc1b576fdfb36d9ea902fd42b2a36e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentAtlasMean.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanApproximation +import OAI.Geometry.SurfaceImmersion.Correction.CrossAtlasPolynomialTransfer +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasTensorBounds +import OAI.Geometry.SurfaceImmersion.Atlas.CrossAtlasShiftedBounds + +namespace OAI + +/-! The slow mean solver uses its good atlas while the primitive keeps its own. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PrimitiveRealization WeightedEstimates +local instance independentMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +theorem polynomial_mean_approximation_in_atlas (data : MetricGoodPhaseData g F) + (B : SmoothingAtlas M) {n : B.centers → ℕ} + (Pol : ∀ i : B.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (R N : ℕ) (σmax : ℝ) (hσmax : 0 < σmax) : + ∃ (b u η L C : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ b < σmax ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ + B.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, B.ShiftedBound 2 m (z^b) (P m) G) ∧ + B.TensorWeightedBound 1 R (C*z^N) (B.atlasPolynomialMetric Pol z G-g.inner) := by + obtain ⟨Q,hQ,hrep⟩ := data.A.cross_atlas_polynomial_transfer B Pol hPol + obtain ⟨b,u,η,L,C,P,hb,hb16,hbσ,hu,hη,hη1,hL,hC,hP,hfamily⟩ := + data.polynomial_mean_approximation Q hQ hF hmetric R N σmax hσmax + obtain ⟨Dv,hDv,hv⟩ := data.A.weightedBound_change_atlas (V := Space) B 3 + obtain ⟨Dt,hDt,ht⟩ := data.A.tensorWeightedBound_change_atlas B R + choose Ds hDs hs using fun m : ℕ => data.A.shiftedBound_change_atlas (V := Space) B 2 m + refine ⟨b,u,η,Dv*L,Dt*C,(fun m => Ds m*P m),hb,hb16,hbσ,hu,hη,hη1, + mul_nonneg hDv hL,mul_nonneg hDt hC,fun m => mul_nonneg (hDs m) (hP m),?_⟩ + intro z hz hzη + obtain ⟨G,hG,hclose,hshift,herror⟩ := hfamily z hz hzη + have hz1 := hzη.le.trans hη1 + have hbz : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hbz1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have herr : data.A.TensorWeightedBound 1 R (C*z^N) + (B.atlasPolynomialMetric Pol z G-g.inner) := by + rw [← hrep G hG z] + exact herror + refine ⟨G,hG,?_,?_,?_⟩ + · have hh := hv (G-F) 1 (L*z^u) zero_lt_one le_rfl + (mul_nonneg hL (Real.rpow_nonneg hz.le _)) (hG.sub hF) hclose + simpa only [mul_assoc] using hh + · intro m + exact hs m G (z^b) (P m) hbz hbz1 (hP m) hG (hshift m) + · have hh := ht _ 1 (C*z^N) zero_lt_one le_rfl + (mul_nonneg hC (pow_nonneg hz.le _)) + ((B.atlasPolynomialMetric_smooth hPol hG z).sub_section g.contMDiff) herr + simpa only [mul_assoc] using hh + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentPhaseMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentPhaseMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..0208db5a839e456ff5c12f46f4f11d7db43cad40 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/IndependentPhaseMean.lean @@ -0,0 +1,166 @@ +import OAI.Geometry.SurfaceImmersion.Correction.IndependentAtlasMean +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 independentPhaseRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance independentPhaseRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance independentPhaseRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance independentPhaseRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance independentPhaseRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance independentPhaseRealizationSectionSpace (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_phase_primitive_mean_realization (data : MetricGoodPhaseData g F) (A₀ : SmoothingAtlas M) + (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) + {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) + (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 ∧ + 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₀.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 ∉ tsupport (A₀.weight i), V =ᶠ[𝓝 p] G := 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 ⟨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 + have hcap : 0 < 1/(1+(lm : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hblm,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+(lm : ℝ))) hcap + obtain ⟨η₀,hη₀,_,hsmall⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + 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 _) + refine ⟨b,u,min η η₀,L,C+D,P 0+P R+Dmap,P,hb,hb16,hu,lt_min hη hη₀, + (min_le_left _ _).trans hη1,hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,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 (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 _ _))).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) + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hvmap',?_,?_⟩ + · 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 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/Correction/InitialCorrectionStage.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialCorrectionStage.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc4de7bf92225243ef74bf7cd8fa4f7d33e7450a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialCorrectionStage.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.InitialInputBounds +import OAI.Geometry.SurfaceImmersion.Correction.AdaptiveExactControl + +namespace OAI + +/-! Build the first actual correction stage from finite metric accuracy. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance initialStageFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance initialStageFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance initialStageDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance initialStageDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance initialStageSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance initialStageSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +namespace PreparedCorrection + +/-- All conditions refer only to the original immersion through order 442 +and its metric error through order 440. The first corrected map is the +specified scalar contraction, with no existence hypothesis on a sequence. -/ +theorem initial_stage_of_scaled_bounds (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) + {t σ P Q C D e : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) (htε : t < c.ε 0) + (hσ : 0 < σ) (htσ : t ≤ σ) + (hP : 0 ≤ P) (hC : 0 ≤ C) (hD : 0 ≤ D) (he : 0 ≤ e) + (hmap0 : d.A.ShiftedBound 2 0 1 P F) (hmap : d.A.ShiftedBound 2 440 σ C F) + (hmetric0 : d.A.TensorWeightedBound 1 0 Q g.inner) + (hmetric : d.A.TensorWeightedBound 1 440 D g.inner) + (herror : d.A.TensorWeightedBound t 440 ((t^(10 : ℝ))^2*e) (inducedTensor F-g.inner)) + (hMB : P+(t/σ)*C ≤ c.budget) (hHB : Q+t*D+e ≤ c.budget) + (hnear : (t^(10 : ℝ))^2*P ≤ c.ρ/8) (hemetric : e ≤ c.a/8) : + ∃ seed : c.Stage t 0, seed.map = Real.sqrt (1-(t^(10 : ℝ))^2) • F := by + let δ := t^(10 : ℝ) + let G := Real.sqrt (1-δ^2) • F + have ht1 : t ≤ 1 := by linarith + have hδ : 0 < δ := Real.rpow_pos_of_pos ht _ + have hδle : δ ≤ 1 := Real.rpow_le_one ht.le ht1 (by norm_num) + have hδsq : δ^2 ≤ 1 := pow_le_one₀ hδ.le hδle + have hG : ContMDiff planeModel spaceModel ∞ G := space_smul_contMDiff hF _ + have hmap0σ : d.A.ShiftedBound 2 0 σ P F := by + intro i j hj x + have hj2 : j - 2 = 0 := by omega + simpa only [hj2,pow_zero,one_mul] using hmap0 i j hj x + have hin := d.A.contracted_initial_input_scaled hF (ne_of_gt hδ) hδsq ht.le ht1 + hσ htσ hP hC hD he hmap0σ hmap hmetric0 hmetric herror hMB hHB + have hdisp : d.A.WeightedBound 1 2 (c.ρ/8) (G-F) := by + have hbase := d.A.shifted_zero_to_weighted hmap0 + have hh := d.A.weightedBound_const_smul hF hbase (Real.sqrt (1-δ^2)-1) + have hid : G-F = (Real.sqrt (1-δ^2)-1) • F := by + dsimp [G] + rw [sub_smul,one_smul] + rw [hid] + intro i + apply (hh i).mono_const + exact (mul_le_mul_of_nonneg_right (initial_contraction_displacement hδsq) hP).trans hnear + have hdef := d.A.normalized_initial_error_bound hF g.contMDiff + (ne_of_gt hδ) hδsq he herror + have hencoded := d.A.tensorEncode_bound + ((d.A.normalizedTensorDefect_smooth g.contMDiff δ hG).sub_section g.contMDiff) + ht he (fun i => (hdef i).mono_order (show 0 ≤ 440 from Nat.zero_le _)) + have hm : ∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner δ G) x- + d.A.tensorEncode g.inner x‖ ≤ c.a/8 := by + intro x + have hh := (hencoded.norm_le (mem_univ x)).trans hemetric + simpa only [d.A.tensorEncode_sub,Pi.sub_apply] using hh + refine ⟨⟨0,G,hG,?_,?_,?_,?_⟩,rfl⟩ + · exact htε + · simpa only [ExactCorrection.correctionScale,correctionInputOrder,correctionOrder, + Nat.zero_add,Nat.cast_ofNat,show 40*(10+1) = 440 from rfl] using hin + · simpa only [stageRadius,Finset.range_zero,Finset.sum_empty,mul_zero,add_zero] using hdisp + · simpa only [ExactCorrection.correctionScale,correctionOrder,Nat.zero_add,Nat.cast_ofNat] using hm + + +/-- All conditions refer only to the original immersion through order 442 +and its metric error through order 440. The first corrected map is the +specified scalar contraction, with no existence hypothesis on a sequence. -/ +theorem initial_stage_of_bounds (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) + {t P Q C D e : ℝ} (ht : 0 < t) (htsmall : t ≤ 1/32) (htε : t < c.ε 0) + (hP : 0 ≤ P) (hC : 0 ≤ C) (hD : 0 ≤ D) (he : 0 ≤ e) + (hmap0 : d.A.ShiftedBound 2 0 1 P F) (hmap : d.A.ShiftedBound 2 440 1 C F) + (hmetric0 : d.A.TensorWeightedBound 1 0 Q g.inner) + (hmetric : d.A.TensorWeightedBound 1 440 D g.inner) + (herror : d.A.TensorWeightedBound t 440 ((t^(10 : ℝ))^2*e) (inducedTensor F-g.inner)) + (hMB : P+t*C ≤ c.budget) (hHB : Q+t*D+e ≤ c.budget) + (hnear : (t^(10 : ℝ))^2*P ≤ c.ρ/8) (hemetric : e ≤ c.a/8) : + ∃ seed : c.Stage t 0, seed.map = Real.sqrt (1-(t^(10 : ℝ))^2) • F := by + exact c.initial_stage_of_scaled_bounds hF ht htsmall htε zero_lt_one + (by linarith) hP hC hD he hmap0 hmap hmetric0 hmetric herror + (by simpa only [div_one] using hMB) hHB hnear hemetric + + +/-- The actual exact correction tends to the original map in C² as the +initial smoothing scale tends to zero. This retains the size of the initial +contraction instead of replacing it by the fixed geometric radius. -/ +theorem exact_correction_initial_displacement (c : PreparedCorrection d) + (hF : ContMDiff planeModel spaceModel ∞ F) {t P : ℝ} + (ht : 0 < t) (htsmall : t ≤ 1/32) (hP : 0 ≤ P) + (hmap : d.A.ShiftedBound 2 0 1 P F) + (seed : c.Stage t 0) + (hseed : seed.map = Real.sqrt (1-(t^(10 : ℝ))^2) • F) : + ∃ G : M → Space, IsSmoothIsometricImmersion M g G ∧ + d.A.WeightedBound 1 2 ((t^(10 : ℝ))^2*P+2*c.ρ*t) (G-F) := by + have ht1 : t ≤ 1 := by linarith + have hδle : t^(10 : ℝ) ≤ 1 := Real.rpow_le_one ht.le ht1 (by norm_num) + have hδsq : (t^(10 : ℝ))^2 ≤ 1 := + pow_le_one₀ (Real.rpow_nonneg ht.le _) hδle + have hbase := d.A.shifted_zero_to_weighted hmap + have hh := d.A.weightedBound_const_smul hF hbase (Real.sqrt (1-(t^(10 : ℝ))^2)-1) + have hsf : d.A.WeightedBound 1 2 ((t^(10 : ℝ))^2*P) (seed.map-F) := by + have hid : seed.map-F = (Real.sqrt (1-(t^(10 : ℝ))^2)-1) • F := by + rw [hseed,sub_smul,one_smul] + rw [hid] + intro i + exact (hh i).mono_const + (mul_le_mul_of_nonneg_right (initial_contraction_displacement hδsq) hP) + obtain ⟨G,hG,hGs,_⟩ := c.exact_correction_with_control hF ht htsmall seed + refine ⟨G,hG,?_⟩ + have hb := d.A.weightedBound_add (seed.smooth.sub hF) (hG.1.sub seed.smooth) + zero_le_one hsf hGs + have hid : G-F = (seed.map-F)+(G-seed.map) := by abel + rw [hid] + exact hb + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialLocalCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialLocalCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..26d123d729210cfaf2906d889aaab8cde92d2f8e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialLocalCorrection.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InitialCorrectionStage + +namespace OAI + +/-! Local finite-accuracy criterion for an actual exact correction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance initialLocalFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance initialLocalFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance initialLocalDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance initialLocalDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance initialLocalSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance initialLocalSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : MetricGoodPhaseData g F} +namespace MetricGoodPhaseData +open ExactCorrection + +/-- A finite order metric-accuracy criterion, with all constants chosen before +the smoothing scale. The resulting isometric map stays in the prescribed +geometric neighborhood of the reference immersion. -/ +theorem local_exact_correction (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ c : PreparedCorrection d.toCorrectionGeometry, ∃ e ε : ℝ, 0 < e ∧ 0 < ε ∧ ε ≤ 1/32 ∧ + ∀ t : ℝ, 0 < t → t < ε → + d.A.TensorWeightedBound t 440 ((t^(10 : ℝ))^2*e) (inducedTensor F-g.inner) → + ∃ G : M → Space, IsSmoothIsometricImmersion M g G ∧ + d.A.WeightedBound 1 2 (c.ρ/4) (G-F) := by + classical + obtain ⟨P,hP,hPbound⟩ := d.A.exists_shifted_bound 2 0 hF + obtain ⟨Q,hQ,hQbound⟩ := d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain 0 g.contMDiff + obtain ⟨C,hC,hCbound⟩ := d.A.exists_shifted_bound 2 440 hF + obtain ⟨D,hD,hDbound⟩ := d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain 440 g.contMDiff + obtain ⟨c,hlarge⟩ := d.preparedCorrection_large hF (P+Q+1) + have hPB : P < c.budget/4 := by linarith + have hQB : Q < c.budget/4 := by linarith + let e := min (c.a/8) (c.budget/4) + have he : 0 < e := lt_min (by linarith [c.a_pos]) (by linarith [c.budget_pos]) + obtain ⟨εC,hεC,_,hCs⟩ := positive_power_threshold C 1 (c.budget/4) + (by norm_num) (by linarith [c.budget_pos]) + obtain ⟨εD,hεD,_,hDs⟩ := positive_power_threshold D 1 (c.budget/4) + (by norm_num) (by linarith [c.budget_pos]) + obtain ⟨εP,hεP,_,hPs⟩ := positive_power_threshold P 20 (c.ρ/8) + (by norm_num) (by linarith [c.ρ_pos]) + let ε := min (c.ε 0) (min (1/32) (min εC (min εD εP))) + have hε : 0 < ε := lt_min (c.ε_pos 0) + (lt_min (by norm_num) (lt_min hεC (lt_min hεD hεP))) + refine ⟨c,e,ε,he,hε,(min_le_right _ _).trans (min_le_left _ _),?_⟩ + intro t ht htε herr + have hε0 : t < c.ε 0 := htε.trans_le (min_le_left _ _) + have hε1 := htε.trans_le (min_le_right _ _) + have ht32 : t ≤ 1/32 := hε1.le.trans (min_le_left _ _) + have hε2 := hε1.trans_le (min_le_right _ _) + have htc : t < εC := hε2.trans_le (min_le_left _ _) + have hε3 := hε2.trans_le (min_le_right _ _) + have htd : t < εD := hε3.trans_le (min_le_left _ _) + have htp : t < εP := hε3.trans_le (min_le_right _ _) + have hCt : t*C < c.budget/4 := by + simpa only [Real.rpow_one,mul_comm] using hCs t ht htc + have hDt : t*D < c.budget/4 := by + simpa only [Real.rpow_one,mul_comm] using hDs t ht htd + have hdelta : (t^(10 : ℝ))^2 = t^(20 : ℝ) := by + rw [show (20 : ℝ) = 10*2 by norm_num,Real.rpow_mul ht.le] + norm_num + have hnear : (t^(10 : ℝ))^2*P ≤ c.ρ/8 := by + rw [hdelta,mul_comm] + exact (hPs t ht htp).le + obtain ⟨seed,_⟩ := c.initial_stage_of_bounds hF ht ht32 hε0 hP hC hD he.le + hPbound hCbound hQbound hDbound herr + (by linarith [c.budget_pos]) (by have hh := min_le_right (c.a/8) (c.budget/4); dsimp [e] at *; linarith [c.budget_pos]) + hnear (min_le_left _ _) + obtain ⟨G,hG,_,hGF⟩ := c.exact_correction_with_control hF ht ht32 seed + exact ⟨G,hG,hGF⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialSmoothTail.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialSmoothTail.lean new file mode 100644 index 0000000000000000000000000000000000000000..070c5f14f55b93694d9d2a100d79e7073e13c16f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InitialSmoothTail.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.EndpointRegularArcs +import OAI.Geometry.SurfaceImmersion.Geometry.OriginalRegularSegment +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothArcTail + +namespace OAI + +/-! Start the finite smooth assembly at the original source endpoint, +retaining its actual regular germ and an exact unchanged initial 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} + +theorem initial_smooth_tail (hγ : FiniteRegularPath planeModel γ) (hi : Function.Injective γ) + {η : ℝ} (hη : 0 < η) (hη1 : η ≤ 1) : + ∃ (r : ℝ) (P : SmoothArcTail γ.extend r), 0 < r ∧ r < η ∧ + P.arc.curve P.arc.start = p ∧ + P.arc.curve '' Icc P.arc.start P.arc.finish = γ.extend '' Icc 0 r := by + obtain ⟨A,r,hr,hrη,hAs,hAf,hmatch,hsource,hgerm⟩ := first_regular_arc hγ hi hη hη1 + have hf : 0 < deriv (id : ℝ → ℝ) A.finish := by simp + let P : SmoothArcTail γ.extend r := ⟨A,id,contDiff_id,hf,hAf,hgerm⟩ + refine ⟨r,P,hr,hrη,hsource,?_⟩ + change A.curve '' Icc A.start A.finish = _ + rw [hAs,hAf] + exact Set.EqOn.image_eq (fun u hu => hmatch u hu) + +theorem initial_smooth_tail_until (hγ : FiniteRegularPath planeModel γ) + (hi : Function.Injective γ) {d D : ℝ} (hd : 0 < d) (hdD : d < D) (hD : D ≤ 1) + (hreg : ∀ t ∈ Ioo (0:ℝ) D, ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t)) : + ∃ P : SmoothArcTail γ.extend d, P.arc.curve P.arc.start = p ∧ + P.arc.curve '' Icc P.arc.start P.arc.finish = γ.extend '' Icc 0 d := by + obtain ⟨r,P,hr,hrd,hPsource,hPimage⟩ := initial_smooth_tail hγ hi hd (hdD.le.trans hD) + obtain ⟨Q,hQs,hQf,hQc⟩ := original_regular_segment hi isOpen_Ioo + (fun _ ht => ⟨ht.1,ht.2.trans_le hD⟩) hreg hrd + (fun u hu => ⟨hr.trans_le hu.1,hu.2.trans_lt hdD⟩) + 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 he + obtain ⟨u,hu,huP⟩ := hPimage.subset (mem_image_of_mem P.arc.curve hs) + rw [hQs,hQf] at ht + rw [hQc] at he + have hue : u = t := embeddedPath_extend_injOn γ hi + ⟨hu.1,hu.2.trans (hrd.le.trans (hdD.le.trans hD))⟩ + ⟨hr.le.trans ht.1.le,ht.2.trans (hdD.le.trans hD)⟩ (huP.trans he) + exact (not_le_of_gt ht.1) (hue ▸ hu.2) + have hleft : Q.curve =ᶠ[𝓝 Q.start] γ.extend ∘ id := by rw [hQc]; rfl + have hright : Q.curve =ᶠ[𝓝 Q.finish] γ.extend ∘ id := by rw [hQc]; rfl + obtain ⟨R,hRimage,hRsource,_⟩ := P.append Q id id contDiff_id contDiff_id + (by simp) (by simp) hQs hQf hleft hright hcross + refine ⟨R,hRsource.trans hPsource,?_⟩ + rw [hRimage,hPimage,hQc,hQs,hQf,← image_union,Icc_union_Icc_eq_Icc hr.le hrd.le] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InputAtlasFreeQuadraticCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputAtlasFreeQuadraticCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4afeff614f0fcbbd647eccb50331abd6b8809af --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputAtlasFreeQuadraticCorrection.lean @@ -0,0 +1,152 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.InputQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasAmplitudeReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasAmplitudeSupport + +namespace OAI + +/-! Construct a forced correction uniformly for nearby maps from their input norms. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputFreeQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputFreeQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputFreeQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputFreeQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputFreeQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputFreeQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem input_atlas_free_quadratic_correction_fixed_phase + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : A.centers × Fin 3 → M → ℝ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (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 + φ k l)) x)) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ {n : A.centers → ℕ} + {P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ), + ∀ (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (D : ℕ → ℝ) (_hD : ∀ m, 0 ≤ D m) + (C : ℕ → ℝ) (_hC : ∀ m, 0 ≤ C 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} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ a : A.centers × Fin 3, A.freeGlobalPhase d a.1 a.2 = φ a) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + ∃ 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.atlasFreeQuadraticOscillation d hρ δ q u)) := by + classical + obtain ⟨ρ₀,hρ₀,hall⟩ := A.input_global_quadratic_cancellation_all_profiles F hF φ hφ + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) hImm hgood + refine ⟨ρ₀,hρ₀,?_⟩ + intro n P p ρ R hρ r reference D hD C hC q + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := P i) q (m+1)) + choose a ha hamp using fun m => + A.uniform_atlas_amplitude_reads p hρ r reference q (m+1) (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := hall D a hD + (fun m => zero_le_one.trans (ha m)) q + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ s d hfit hphase hτ hs hτs hs1 hd hK δ hδ u hu hball hbu + let Z := fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2 + have hZ (a) : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a) := + A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2 + have hsp (a) : tsupport (Z a) ⊆ tsupport (A.weight a.1) := + A.freeGlobalAmplitude_tsupport d hρ δ q u hK a.1 a.2 + have hreads (k a₀ m) : WeightedEstimates.WeightedBound univ s (m+1) + (a m*(δ*τ)) (A.vectorPlaneRead k (Z a₀)) := + hamp m d hfit hτ hs hτs hs1 δ hδ u hu hball (hbu (N m)) k a₀.1 a₀.2 + obtain ⟨W,hW,hsize,hres⟩ := hcorr G hG B hB hBρ hb τ δ s hτ hs hτs hs1 hδ hd Z hZ hsp hreads + have hph (a : A.centers × Fin 3) : A.freeGlobalPhase d a.1 a.2 = φ a := hphase a + refine ⟨W,hW,hsize,?_⟩ + intro m + rw [A.atlas_quadratic_oscillation_eq_global d hρ δ q u hK] + simpa only [atlasGlobalNonzero,hph] using hres m + +theorem input_atlas_free_quadratic_correction + {n : A.centers → ℕ} {P : (k : A.centers) → Fin 3 → Fin (n k) → JetPolynomial.Expression} + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (r r₀ : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (d₀ : ∀ i, ChartedMeanFamilyData (P i) 0 1 1 (r₀ i) ρ R (reference i)) + (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) + (C : ℕ → ℝ) (hC : ∀ m, 0 ≤ C 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} + (d : ∀ i, ChartedMeanFamilyData (P i) 0 τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ i, (d i).phase = (d₀ i).phase) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + ∃ 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.atlasFreeQuadraticOscillation d hρ δ q u)) := by + obtain ⟨ρ₀,hρ₀,hall⟩ := A.input_atlas_free_quadratic_correction_fixed_phase F hF + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d₀ a.1 a.2) hImm hgood + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := hall p hρ r reference D hD C hC q + refine ⟨ρ₀,Cv,Ct,hρ₀,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ s d hfit hphase hτ hs hτs hs1 hd hK δ hδ u hu hball hbu + apply hcorr G hG B hB hBρ hb d hfit ?_ hτ hs hτs hs1 hd hK δ hδ u hu hball hbu + intro a + unfold freeGlobalPhase + rw [hphase a.1] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialFreeCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialFreeCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..6903f2fdb5d7d4d8c4401de2474aca4c4ed37895 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialFreeCorrection.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InputPolynomialQuadraticCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialAmplitudeBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasGlobalPolynomialMean +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasAmplitudeSupport + +namespace OAI + +/-! Construct a forced correction uniformly for nearby maps from their input norms. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance inputPolynomialFreeQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputPolynomialFreeQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputPolynomialFreeQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputPolynomialFreeQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputPolynomialFreeQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputPolynomialFreeQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem input_polynomial_free_correction_fixed_phase + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (Q : A.centers → Fin 3 → Fin nq → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hquad : A.PolynomialQuadraticRepresentation Pol Q) + (hlin : A.PolynomialLinearRepresentation Pol Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : A.centers × Fin 3 → M → ℝ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (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 + φ k l)) x)) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hUK : ∀ i, U i ⊆ KU i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U i) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ (p : ∀ i, Fin 3 → ChartedMeanProfile (Q i)) {ρ R : ℝ} (hρ : 0 < ρ), + ∀ (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (D : ℕ → ℝ) (_hD : ∀ m, 0 ≤ D m) + (C : ℕ → ℝ) (_hC : ∀ m, 0 ≤ C 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} + (d : ∀ i, ChartedMeanFamilyData (Q i) ε τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ a : A.centers × Fin 3, A.freeGlobalPhase d a.1 a.2 = φ a) → + (∀ i, (d i).G = A.jetChartMap i G) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → ∀ η : ℝ, 0 ≤ η → η ≤ 1 → + (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ η) → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 < δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m (δ^2 * Cv m) W) ∧ + (∀ m, A.TensorWeightedBound τ m (δ^2 * η^(q+1) * Ct m) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.atlasPolynomialVariation Pol ε G (spaceCoordinates.symm ∘ W) + + (inducedTensor (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u) + + A.atlasPolynomialQuadratic Pol ε G (spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u) - + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u))))) := by + classical + obtain ⟨ρ₀,hρ₀,hall⟩ := A.input_global_polynomial_quadratic_cancellation_all_profiles Pol Q hQ hquad hlin F hF φ hφ + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) hImm hgood U hU KU hUK hweight + refine ⟨ρ₀,hρ₀,?_⟩ + intro p ρ R hρ r reference D hD C hC q + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := Q i) q (m+1)) + choose a ha hamp using fun m => + A.uniform_polynomial_atlas_amplitude_reads p hρ r reference q (m+1) (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := hall D a hD + (fun m => zero_le_one.trans (ha m)) q + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb ε τ s d hfit hphase hdG hτ hs hτs hs1 hε hε1 η hη hη1 hsmall hd hK δ hδ u hu hball hbu + let Z := fun a : A.centers × Fin 3 => A.freeGlobalAmplitude d hρ δ q u a.1 a.2 + have hZ (a) : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ (Z a) := + A.freeGlobalAmplitude_smooth d hρ δ q u a.1 a.2 + have hsp (a) : tsupport (Z a) ⊆ tsupport (A.weight a.1) := + A.freeGlobalAmplitude_tsupport d hρ δ q u hK a.1 a.2 + have hreads (k a₀ m) : WeightedEstimates.WeightedBound univ s (m+1) + (a m*(δ*τ)) (A.vectorPlaneRead k (Z a₀)) := + hamp m d hfit hτ hs hτs hs1 hε (fun i => (hsmall i).trans hη1) δ hδ.le u hu hball (hbu (N m)) k a₀.1 a₀.2 + obtain ⟨W,hW,hsize,hres⟩ := hcorr G hG B hB hBρ hb τ δ ε η s hτ hs hτs hs1 hδ hε hε1 hη hη1 hsmall hd Z hZ hsp hreads + have hph (i : A.centers) (j : Fin 3) : A.freeGlobalPhase d i j = φ (i,j) := hphase (i,j) + have hmode : (∑ a : A.centers × Fin 3, surfaceMode τ (φ a) (Z a)) = + A.atlasFreeOscillation d hρ δ q u := by + rw [Fintype.sum_prod_type] + simpa only [Z,hph] using (A.atlas_free_global_modes d hρ δ q u hK).symm + have hmean : A.globalPolynomialQuadraticMean Q G ε τ φ Z = + A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) := by + have hh := A.atlas_global_polynomial_mean Pol Q hquad G hG d hdG hρ δ q u hK + simpa only [hphase,Z] using hh + refine ⟨W,hW,hsize,?_⟩ + intro m + simpa only [hmode,hmean] using hres m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..8457a05506becded5649ec768f3c38222d486517 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialQuadraticCancellation.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialInputCancellation +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialTargetProfiles +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialOverlap + +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 inputPolynomialQuadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputPolynomialQuadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance inputPolynomialQuadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputPolynomialQuadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputPolynomialQuadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputPolynomialQuadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) {ι : Type*} [Fintype ι] [DecidableEq ι] + +theorem input_global_polynomial_quadratic_cancellation_all_profiles + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (Q : A.centers → Fin 3 → Fin nq → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hquad : A.PolynomialQuadraticRepresentation Pol Q) + (hlin : A.PolynomialLinearRepresentation Pol Q) + (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)) + (U : A.centers → Set JetPolynomial.Base) (hU : ∀ i, IsOpen (U i)) + (KU : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hUK : ∀ i, U i ⊆ KU i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U i) + : ∃ ρ : ℝ, 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 < δ → + 0 ≤ ε → ε ≤ 1 → 0 ≤ η → η ≤ 1 → (∀ i, τ/s+ε/τ^tensorLoss (Q i) ≤ η) → + (∀ 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*η^(q+1)*Ct m) + (linearMetricTensor G (spaceCoordinates.symm ∘ W) + + A.atlasPolynomialVariation Pol ε G (spaceCoordinates.symm ∘ W) + + (inducedTensor (spaceCoordinates.symm ∘ ∑ b, surfaceMode τ (φ b) (Z b))+ + A.atlasPolynomialQuadratic Pol ε G + (spaceCoordinates.symm ∘ ∑ b, surfaceMode τ (φ b) (Z b)) - + A.globalPolynomialQuadraticMean Q G ε τ φ Z))) := by + classical + obtain ⟨ρ,hρ,hall⟩ := A.atlas_polynomial_input_cancellation_all_profiles Pol Q hQ hlin 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 U hU KU hUK + (fun k l => (A.quadraticOverlapCompact_subset S hS k l).trans (hweight k)) + refine ⟨ρ,hρ,?_⟩ + intro P a hP ha q + obtain ⟨T,hT,ht⟩ := A.atlas_polynomial_target_profiles Q hQ φ hφ U hU KU hUK hweight P a hP ha + obtain ⟨C,D,hC,hD,hcancel⟩ := hall P hP q + let N := fun k => PolynomialSolveData.inputOrder (P := Q k) q + let Cv := fun m => ∑ k : A.centers, ∑ l, C k l m*T k (N k m) + let Ct := fun m => ∑ k : A.centers, ∑ l, D k l m*T k (N k 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 k 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 k m)) + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ δ ε η s hτ hs hτs hs1 hδ hε hε1 hη hη1 hsmall hp Z hZ hSZ hz + let target := A.globalPolynomialQuadraticTargetRestricted Q hQ G hG ε τ φ 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 G hG Z hZ s δ τ ε hδ hτ hs hτs hs1 hε hε1 + (fun i => (hsmall i).trans hη1) hp (fun i b m => (hz i b m).mono_order (Nat.le_succ m)) k m l + obtain ⟨W,hW,hsize,hres⟩ := hcancel G hG B hB hBρ hb τ ε η s hτ hs hτs hs1 hε hε1 hη hη1 hsmall 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 (N k m) (target k l)) ≤ + δ^2*∑ k : A.centers, ∑ l, E k l*T k (N k m) := by + calc + _ ≤ ∑ k : A.centers, ∑ l, E k l*(T k (N k m)*δ^2) := + Finset.sum_le_sum fun k _ => Finset.sum_le_sum fun l _ => + mul_le_mul_of_nonneg_left (htarget k l (N k 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) 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) m) + (pow_nonneg hη _)) + have he : η^(q+1)*(δ^2*Ct m) = δ^2*η^(q+1)*Ct m := by ring + rw [he] at hh + have hsplit : inducedTensor (spaceCoordinates.symm ∘ ∑ b, surfaceMode τ (φ b) (Z b))+ + A.atlasPolynomialQuadratic Pol ε G (spaceCoordinates.symm ∘ ∑ b, surfaceMode τ (φ b) (Z b)) - + A.globalPolynomialQuadraticMean Q G ε τ φ Z = + A.tensorPlaneRestore (fun k x => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ (coordinatePhase (A.globalQuadraticPhase φ k l)) + (target k l) x) := by + rw [A.global_modes_full_quadratic Pol Q hQ hquad G hG ε τ φ Z hφ hZ] + exact add_sub_cancel_left _ _ + rw [hsplit] + exact hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..c995d61c28a90fdee41ababcc8349d272f35d086 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/InputPolynomialSmallIncrement.lean @@ -0,0 +1,209 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InputPolynomialFreeCorrection +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialFreeResidual +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialIncrementBound +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialNonlinearProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedIncrementEstimate +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds + +namespace OAI + +/-! Assemble a uniform nearby-map increment from fixed profiles and an adjusted mean. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates +local instance polynomialSmallAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialSmallAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialSmallAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialSmallAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialSmallAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialSmallAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem input_polynomial_small_increment_fixed_phase + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (Q : A.centers → Fin 3 → Fin nq → Expression) + (hQ : ∀ i k l, (Q i k l).SmoothCoeffs univ) + (hquad : A.PolynomialQuadraticRepresentation Pol Q) + (hlin : A.PolynomialLinearRepresentation Pol Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (φ : A.centers × Fin 3 → M → ℝ) + (hφ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (φ a)) + (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 + φ k l)) x)) + (Ω : A.centers → Set JetPolynomial.Base) (hΩ : ∀ i, IsOpen (Ω i)) + (KΩ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hΩK : ∀ i, Ω i ⊆ KΩ i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ Ω i) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ Ω i) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ + ∀ (p : ∀ i, Fin 3 → ChartedMeanProfile (Q i)) {ρ R : ℝ} (hρ : 0 < ρ), + ∀ (r : A.centers → ℝ) (reference : A.centers → SmallModes.Base → Tensor) + (D : ℕ → ℝ) (_hD : ∀ m, 0 ≤ D m) + (C E : ℕ → ℝ) (_hC : ∀ m, 0 ≤ C m) (_hE : ∀ m, 0 ≤ E m) (q : ℕ), + ∃ B T : ℕ → ℝ, + (∀ 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} + (d : ∀ i, ChartedMeanFamilyData (Q i) ε τ s (r i) ρ R (reference i)), + (∀ i, (d i).Fits (p i)) → (∀ a : A.centers × Fin 3, A.freeGlobalPhase d a.1 a.2 = φ a) → + (∀ i, (d i).G = A.jetChartMap i G) → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → ∀ η : ℝ, 0 ≤ η → η ≤ 1 → + τ/s+ε/τ^(max (Finset.univ.sup (fun i : A.centers => tensorLoss (Q i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i)))) ≤ η → + (∀ m, A.ShiftedBound 2 m s (D m) G) → + (∀ i j, (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ δ : ℝ, 0 < δ → δ ≤ τ → ∀ u H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ m, A.TensorWeightedBound s m (C m) u) → + (∀ m, A.TensorWeightedBound τ m (E m*δ^2*η^(q+1)) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H)) → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, A.TensorWeightedBound τ m (T m*(δ*η^(q+1)+δ^3/τ)) + (A.atlasPolynomialMetric Pol ε (G+X)-A.atlasPolynomialMetric Pol ε G-δ^2 • H)) := by + classical + obtain ⟨ρ₀,hρ₀,hall⟩ := A.input_polynomial_free_correction_fixed_phase Pol Q hQ hquad hlin + F hF φ hφ hImm hgood Ω hΩ KΩ hΩK hweight + refine ⟨ρ₀,hρ₀,?_⟩ + intro p ρ R hρ r reference D hD C E hC hE q + let N := fun m => Finset.univ.sup + (fun i : A.centers => PolynomialSolveData.inputOrder (P := Q i) q m) + choose Af hAf hfree using fun m => A.uniform_atlas_free_size p hρ r reference q m (C (N m)) (hC (N m)) + choose Ef hEf hfreeRes using fun m => A.uniform_atlas_polynomial_free_residual Pol Q hQ hlin + p hρ r reference q m (C (N m)) (hC (N m)) + obtain ⟨Cv,Ct,hCv,hCt,hcorr⟩ := hall p hρ r reference D hD C hC q + let L : ℝ := ‖spaceCoordinates.symm.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + let A₀ := fun m => L*Af m + let B₀ := fun m => L*Cv m + have hA₀ (m) : 0 ≤ A₀ m := mul_nonneg hL (zero_le_one.trans (hAf m)) + have hB₀ (m) : 0 ≤ B₀ m := mul_nonneg hL (hCv m) + obtain ⟨E₁,E₂,hE₁,hE₂,hnonlinear⟩ := A.atlas_polynomial_nonlinear_profiles Pol hPol + Ω hΩ KΩ hΩK houter D A₀ B₀ hD hA₀ hB₀ + choose Dm hDm hincrement using fun m => A.atlas_polynomial_increment_bound m + (A₀ (m+1)) (B₀ (m+1)) (hA₀ (m+1)) (hB₀ (m+1)) + let B := fun m => A₀ m+B₀ m + let T := fun m => Ef m+Ct m+E m+Dm m+E₁ m+E₂ m + have hB (m) : 0 ≤ B m := add_nonneg (hA₀ m) (hB₀ m) + have hT (m) : 0 ≤ T m := by + dsimp [T] + exact add_nonneg (add_nonneg (add_nonneg (add_nonneg + (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m)) (hDm m)) (hE₁ m)) (hE₂ m) + refine ⟨B,T,hB,hT,?_⟩ + intro G hG b hb hbρ hclose ε τ s d hfit hphase hdG hτ hs hτs hs1 hε hε1 + η hη hη1 hsmall hd hK δ hδ hδτ u H hu hH hball hbu hmean + have hτ1 : τ ≤ 1 := hτs.trans hs1 + let loss := max (Finset.univ.sup (fun i : A.centers => tensorLoss (Q i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i))) + have hle (k : ℕ) (hk : k ≤ loss) : τ/s+ε/τ^k ≤ η := by + apply le_trans _ hsmall + apply add_le_add le_rfl + apply div_le_div_of_nonneg_left hε (pow_pos hτ _) + exact pow_le_pow_of_le_one hτ.le hτ1 hk + have hQsmall (i) : τ/s+ε/τ^tensorLoss (Q i) ≤ η := hle _ + ((Finset.le_sup (f := fun i : A.centers => tensorLoss (Q i)) (Finset.mem_univ i)).trans (le_max_left _ _)) + have hPsmall (i) : ε/τ^tensorLoss (Pol i) ≤ 1 := by + have hh := hle _ ((Finset.le_sup (f := fun i : A.centers => tensorLoss (Pol i)) + (Finset.mem_univ i)).trans (le_max_right _ _)) + linarith [div_nonneg hτ.le hs.le] + have hfreeSmall : τ/s+ε/τ^(Finset.univ.sup (fun i : A.centers => tensorLoss (Q i))) ≤ 1 := + (hle _ (le_max_left _ _)).trans hη1 + obtain ⟨W,hW,hwsize,hwres⟩ := hcorr G hG b hb hbρ hclose d hfit hphase hdG hτ hs hτs hs1 + hε hε1 η hη hη1 hQsmall hd hK δ hδ u hu hball hbu + let U := spaceCoordinates.symm ∘ A.atlasFreeOscillation d hρ δ q u + let V := spaceCoordinates.symm ∘ W + have hUr := A.atlasFreeOscillation_smooth d hρ δ q u + have hU : ContMDiff planeModel spaceModel ∞ U := spaceCoordinates.symm.contDiff.contMDiff.comp hUr + have hV : ContMDiff planeModel spaceModel ∞ V := spaceCoordinates.symm.contDiff.contMDiff.comp hW + have hbU (m) : A.WeightedBound τ m (A₀ m*(δ*τ)) U := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hUr hτ.le + (hfree m d hfit hτ hs hτs hs1 hε hfreeSmall δ hδ.le u hu hball (hbu (N m))) + convert hh using 1 <;> dsimp [U,A₀,L] + all_goals ring + have hbV (m) : A.WeightedBound τ m (B₀ m*δ^2) V := by + have hh := A.weightedBound_clm spaceCoordinates.symm.toContinuousLinearMap hW hτ.le (hwsize m) + convert hh using 1 <;> dsimp [V,B₀,L] + all_goals ring + have hfreeResidual (m) : A.TensorWeightedBound τ m (Ef m*(δ*τ)*η^(q+1)) + (linearMetricTensor G U+A.atlasPolynomialVariation Pol ε G U) := + hfreeRes m G hG d hdG hfit hτ hs hτs hs1 hε hη hη1 hQsmall hK δ hδ.le u hu hball (hbu (N m)) + obtain ⟨hinter,hremainder⟩ := hnonlinear G U V hG hU hV s τ ε δ hτ hs hτs hs1 + hε hε1 hδ hδτ hPsmall hd hbU hbV + let H₀ := A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) + have hH₀ : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H₀ x)) := by + apply A.tensorPlaneRestore_smooth + intro i + exact combinedQuadraticMean_smooth_global (hQ i) (d i).smoothG + (fun j => ((d i).solver j).smoothPhase) + (fun j => ((d i).data j |>.freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff) ε τ + refine ⟨U+V,hU.add hV,?_,?_⟩ + · intro m k + apply ((A.weightedBound_add hU hV hτ.le (hbU m) (hbV m)) k).mono_const + have hδ2 : δ^2 ≤ δ*τ := by nlinarith + dsimp [B] + nlinarith [mul_le_mul_of_nonneg_left hδ2 (hB₀ m)] + · intro m k + have hforced : A.TensorWeightedBound τ m (Ct m*δ^2*η^(q+1)) + (linearMetricTensor G V+A.atlasPolynomialVariation Pol ε G V+ + (inducedTensor U+A.atlasPolynomialQuadratic Pol ε G U)-H₀) := by + have hh := hwres m + have heq : linearMetricTensor G V+A.atlasPolynomialVariation Pol ε G V+ + (inducedTensor U+A.atlasPolynomialQuadratic Pol ε G U-H₀) = + linearMetricTensor G V+A.atlasPolynomialVariation Pol ε G V+ + (inducedTensor U+A.atlasPolynomialQuadratic Pol ε G U)-H₀ := by abel + change A.TensorWeightedBound τ m _ (linearMetricTensor G V+ + A.atlasPolynomialVariation Pol ε G V+(inducedTensor U+A.atlasPolynomialQuadratic Pol ε G U-H₀)) at hh + rw [heq] at hh + convert hh using 1 + ring + have hh := hincrement m Pol hPol G U V hG hU hV (δ^2 • H) H₀ + (hH.const_smul_section (a := δ^2)) hH₀ τ ε δ + (Ef m*(δ*τ)*η^(q+1)) (Ct m*δ^2*η^(q+1)) (E m*δ^2*η^(q+1)) (E₁ m) (E₂ m) + hτ hτ1 hδ.le hδτ (hbU (m+1)) (hbV (m+1)) (hfreeResidual m) hforced (hmean m) + (hinter m) (hremainder m) + apply (hh k).mono_const + have hδ1 : δ ≤ 1 := hδτ.trans hτ1 + have hδt : δ*τ ≤ δ := mul_le_of_le_one_right hδ.le hτ1 + have hδ2 : δ^2 ≤ δ := by nlinarith + have hp : 0 ≤ η^(q+1) := pow_nonneg hη _ + have hx : 0 ≤ δ^3/τ := by positivity + have h1 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hδt (zero_le_one.trans (hEf m))) hp + have h2 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hδ2 (hCt m)) hp + have h3 := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hδ2 (hE m)) hp + have h4 : 0 ≤ Ef m+Ct m+E m := add_nonneg (add_nonneg (zero_le_one.trans (hEf m)) (hCt m)) (hE m) + have h5 : 0 ≤ Dm m+E₁ m+E₂ m := add_nonneg (add_nonneg (hDm m) (hE₁ m)) (hE₂ m) + dsimp [T] + nlinarith [mul_nonneg h4 hx,mul_nonneg h5 (mul_nonneg hδ.le hp)] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..e611eb759842d726b13fe1f568c123615bae7ffc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialAlgebra.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicCalculus + +namespace OAI + +/-! Finite polynomials in actual coordinate jets, with coefficients smooth in +position, the second jet, and the periodic variable. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +/-- A sum of monomials. Jet factors are independent of the angular variable. -/ +inductive Expression where + | coeff (c : LowJet × ℝ → ℝ) + | atom (word : List (Fin 2)) (component : Fin 4) (tail : Expression) + | add (left right : Expression) + +namespace Expression + +def eval : Expression → (Base → Space) → Base × ℝ → ℝ + | .coeff c, G, z => c (lowJet G z.1, z.2) + | .atom w a e, G, z => jet G w a z.1 * eval e G z + | .add e f, G, z => eval e G z + eval f G z + +def mapCoeff (f : (LowJet × ℝ → ℝ) → (LowJet × ℝ → ℝ)) : Expression → Expression + | .coeff c => .coeff (f c) + | .atom w a e => .atom w a (mapCoeff f e) + | .add e g => .add (mapCoeff f e) (mapCoeff f g) + +def mul : Expression → Expression → Expression + | .coeff c, f => mapCoeff (fun d z => c z * d z) f + | .atom w a e, f => .atom w a (mul e f) + | .add e g, f => .add (mul e f) (mul g f) + +/-- Largest order of a jet factor. Coefficients themselves use jets through order two. -/ +def order : Expression → ℕ + | .coeff _ => 2 + | .atom w _ e => max w.length e.order + | .add e f => max e.order f.order + +/-- Scale loss when the second jet is controlled. -/ +def loss : Expression → ℕ + | .coeff _ => 0 + | .atom w _ e => (w.length - 2) + e.loss + | .add e f => max e.loss f.loss + +def SmoothCoeffs (O : Set LowJet) : Expression → Prop + | .coeff c => ContDiffOn ℝ ∞ c (O ×ˢ Set.univ) + | .atom _ _ e => e.SmoothCoeffs O + | .add e f => e.SmoothCoeffs O ∧ f.SmoothCoeffs O + +lemma eval_mapCoeff_mul (e : Expression) (G : Base → Space) (c : LowJet × ℝ → ℝ) + (z : Base × ℝ) : + (e.mapCoeff (fun d x => c x * d x)).eval G z = c (lowJet G z.1, z.2) * e.eval G z := by + induction e with + | coeff d => rfl + | atom w a e ih => simp only [mapCoeff, eval, ih]; ring + | add e f ihe ihf => simp only [mapCoeff, eval, ihe, ihf]; ring + +lemma eval_mul (e f : Expression) (G : Base → Space) (z : Base × ℝ) : + (e.mul f).eval G z = e.eval G z * f.eval G z := by + induction e with + | coeff c => exact eval_mapCoeff_mul f G c z + | atom w a e ih => simp only [mul, eval, ih]; ring + | add e g ihe ihg => simp only [mul, eval, ihe, ihg]; ring + +@[simp] lemma order_mapCoeff (e : Expression) (f) : (e.mapCoeff f).order = e.order := by + induction e with + | coeff c => rfl + | atom w a e ih => simp only [mapCoeff, order, ih] + | add e g ihe ihg => simp only [mapCoeff, order, ihe, ihg] + +@[simp] lemma loss_mapCoeff (e : Expression) (f) : (e.mapCoeff f).loss = e.loss := by + induction e with + | coeff c => rfl + | atom w a e ih => simp only [mapCoeff, loss, ih] + | add e g ihe ihg => simp only [mapCoeff, loss, ihe, ihg] + +lemma order_mul_le (e f : Expression) : (e.mul f).order ≤ max e.order f.order := by + induction e with + | coeff c => simp only [mul, order_mapCoeff, order]; exact le_max_right _ _ + | atom w a e ih => simp only [mul, order] at *; omega + | add e g ihe ihg => simp only [mul, order] at *; omega + +lemma loss_mul_le (e f : Expression) : (e.mul f).loss ≤ e.loss + f.loss := by + induction e with + | coeff c => simp only [mul, loss_mapCoeff, loss, zero_add, le_refl] + | atom w a e ih => simp only [mul, loss] at *; omega + | add e g ihe ihg => simp only [mul, loss] at *; omega + +lemma smoothCoeffs_map {O : Set LowJet} (e : Expression) (f) + (hf : ∀ c, ContDiffOn ℝ ∞ c (O ×ˢ Set.univ) → ContDiffOn ℝ ∞ (f c) (O ×ˢ Set.univ)) + (he : e.SmoothCoeffs O) : (e.mapCoeff f).SmoothCoeffs O := by + induction e with + | coeff c => exact hf c he + | atom w a e ih => exact ih he + | add e g ihe ihg => exact ⟨ihe he.1, ihg he.2⟩ + +lemma smoothCoeffs_mul {O : Set LowJet} {e f : Expression} + (he : e.SmoothCoeffs O) (hf : f.SmoothCoeffs O) : (e.mul f).SmoothCoeffs O := by + induction e with + | coeff c => exact smoothCoeffs_map f _ (fun d hd => he.mul hd) hf + | atom w a e ih => exact ih he + | add e g ihe ihg => exact ⟨ihe he.1, ihg he.2⟩ + +lemma eval_smooth {O : Set LowJet} {S : Set Base} {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {e : Expression} (he : e.SmoothCoeffs O) : + ContDiffOn ℝ ∞ (e.eval G) (S ×ˢ Set.univ) := by + induction e with + | coeff c => + exact he.comp (((lowJet_smooth hG).comp contDiff_fst).prodMk contDiff_snd).contDiffOn + (fun z hz => ⟨hQ hz.1, Set.mem_univ _⟩) + | atom w a e ih => + exact (((jet_smooth hG w a).comp contDiff_fst).contDiffOn).mul (ih he) + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialCovariance.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialCovariance.lean new file mode 100644 index 0000000000000000000000000000000000000000..2c4208c6b7e85c961f08208290a6265f4cd570d7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialCovariance.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialLinear +import OAI.Geometry.SurfaceImmersion.Geometry.CovarianceRealOperator + +namespace OAI + +/-! The actual covariance inversion preserves finite polynomial dependence on +higher jets. Its inverse matrix depends only on the low-jet geometric data. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open CovarianceCorrector + +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +def covariance (V : LowJet → C(Period, E)) (q : LowJet → ℝ) (L : E →L[ℝ] ℝ) + (e : Expression) : Expression := + e.liftOperator (fun Q f t => L (realCorrector (V Q) (q Q) f t)) + +lemma smoothCoeffs_covariance {O : Set LowJet} (hO : IsOpen O) + {V : LowJet → C(Period, E)} {q : LowJet → ℝ} + (hV : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ Q ∈ O, 0 < q Q) + (hcircle : ∀ Q ∈ O, ∀ t, inner ℝ (V Q t) (V Q t) = q Q) + (L : E →L[ℝ] ℝ) {e : Expression} (he : e.SmoothCoeffs O) : + (e.covariance V q L).SmoothCoeffs O := by + apply smoothCoeffs_liftOperator _ he + intro c hc + exact L.contDiff.comp_contDiffOn (contDiffOn_realCorrector hO hV hq hqpos hcircle hc) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma order_covariance (V : LowJet → C(Period, E)) (q : LowJet → ℝ) + (L : E →L[ℝ] ℝ) (e : Expression) : (e.covariance V q L).order = e.order := + order_liftOperator _ _ + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma loss_covariance (V : LowJet → C(Period, E)) (q : LowJet → ℝ) + (L : E →L[ℝ] ℝ) (e : Expression) : (e.covariance V q L).loss = e.loss := + loss_liftOperator _ _ + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma eval_covariance {O : Set LowJet} (hO : IsOpen O) + (V : LowJet → C(Period, E)) (q : LowJet → ℝ) (L : E →L[ℝ] ℝ) + {e : Expression} (he : e.SmoothCoeffs O) (G : Base → Space) + {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + (e.covariance V q L).eval G (p, t) = + L (realCorrector (V (lowJet G p)) (q (lowJet G p)) (fun s => e.eval G (p, s)) t) := by + apply eval_liftOperator hO _ _ _ he G hp t + · intro Q _ f g hf hg s + rw [realCorrector_add _ _ hf hg, map_add] + · intro Q _ a f s + rw [realCorrector_smul, map_smul, smul_eq_mul] + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +/-- Each component of the covariance corrector used in the finite periodic +recursion has an actual polynomial representation with the same order and loss. -/ +theorem eval_covariance_periodic {O : Set LowJet} (hO : IsOpen O) + (V : LowJet → C(Period, E)) (q : LowJet → ℝ) (L : E →L[ℝ] ℝ) + {e : Expression} (he : e.SmoothCoeffs O) (G : Base → Space) + (r : Base → C(Period, ℝ)) {p : Base} (hp : lowJet G p ∈ O) + (hr : ∀ s : ℝ, e.eval G (p, s) = r p (s : Period)) (t : ℝ) : + (e.covariance V q L).eval G (p, t) = + L (parameterCorrector (fun x => V (lowJet G x)) r (fun x => q (lowJet G x)) + p (t : Period)) := by + rw [eval_covariance hO V q L he G hp] + have heq : (fun s => e.eval G (p, s)) = (fun s : ℝ => r p (s : Period)) := funext hr + rw [heq] + exact congrArg L (realCorrector_eq_parameterCorrector (fun x => V (lowJet G x)) + (fun x => q (lowJet G x)) r p t) + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..962fbdf7c88beaa61be9dba95d558ae452a7042f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialDerivative.lean @@ -0,0 +1,169 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialAlgebra + +namespace OAI + +/-! Differentiation preserves finite polynomial dependence on higher jets. +The proof is for actual derivatives, including the low-jet chain rule. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open SmoothPeriodicCalculus + +namespace Expression + +def sumList {ι : Type*} : List ι → (ι → Expression) → Expression + | [], _ => .coeff (fun _ => 0) + | i :: l, f => .add (f i) (sumList l f) + +lemma eval_sumList {ι : Type*} (l : List ι) (f : ι → Expression) (G : 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 order_sumList_le {ι : Type*} (l : List ι) (f : ι → Expression) (N : ℕ) + (hN : 2 ≤ N) (hf : ∀ 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 (hf i (List.mem_cons_self ..)) + (ih (fun j hj => hf j (List.mem_cons_of_mem _ hj))) + +lemma loss_sumList_le {ι : Type*} (l : List ι) (f : ι → Expression) (N : ℕ) + (hf : ∀ i ∈ l, (f i).loss ≤ N) : (sumList l f).loss ≤ N := by + induction l with + | nil => exact Nat.zero_le _ + | cons i l ih => + exact max_le (hf i (List.mem_cons_self ..)) + (ih (fun j hj => hf j (List.mem_cons_of_mem _ hj))) + +lemma smoothCoeffs_sumList {ι : Type*} {O : Set LowJet} (l : List ι) (f : ι → Expression) + (hf : ∀ i ∈ l, (f i).SmoothCoeffs O) : (sumList l f).SmoothCoeffs O := by + induction l with + | nil => exact contDiffOn_const + | cons i l ih => exact ⟨hf i (List.mem_cons_self ..), + ih (fun j hj => hf j (List.mem_cons_of_mem _ hj))⟩ + +def lowFactor (v : Fin 2) : LowIndex → Expression + | .inl i => .coeff (fun _ => coordinateVector v i) + | .inr (w, a) => .atom (v :: lowWord w) a (.coeff (fun _ => 1)) + +lemma eval_lowFactor (v : Fin 2) (i : LowIndex) (G : Base → Space) (z : Base × ℝ) : + (lowFactor v i).eval G z = lowDerivative G v z.1 i := by + cases i with + | inl i => rfl + | inr i => simp [lowFactor, eval, lowDerivative] + +lemma order_lowFactor (v : Fin 2) (i : LowIndex) : (lowFactor v i).order ≤ 3 := by + cases i with + | inl i => simp [lowFactor, order] + | inr i => + obtain ⟨w, a⟩ := i + have h : (lowWord w).length ≤ 2 := by fin_cases w <;> simp [lowWord] + simp only [lowFactor, order, List.length_cons] + omega + +lemma loss_lowFactor (v : Fin 2) (i : LowIndex) : (lowFactor v i).loss ≤ 1 := by + cases i with + | inl i => simp [lowFactor, loss] + | inr i => + obtain ⟨w, a⟩ := i + have h : (lowWord w).length ≤ 2 := by fin_cases w <;> simp [lowWord] + simp only [lowFactor, loss, List.length_cons] + omega + +lemma smoothCoeffs_lowFactor (O : Set LowJet) (v : Fin 2) (i : LowIndex) : + (lowFactor v i).SmoothCoeffs O := by + cases i with + | inl i => exact contDiffOn_const + | inr i => exact contDiffOn_const + +/-- The chain rule differentiates smooth low-jet coefficients and introduces +one additional actual jet factor. -/ +def slow (v : Fin 2) : Expression → Expression + | .coeff c => sumList Finset.univ.toList (fun i : LowIndex => + (lowFactor v i).mul (.coeff (slowDerivative c (lowBasis i)))) + | .atom w a e => .add (.atom (v :: w) a e) (.atom w a (slow v e)) + | .add e f => .add (slow v e) (slow v f) + +lemma smoothCoeffs_slow {O : Set LowJet} (hO : IsOpen O) (v : Fin 2) + {e : Expression} (he : e.SmoothCoeffs O) : (e.slow v).SmoothCoeffs O := by + induction e with + | coeff c => + apply smoothCoeffs_sumList + intro i _ + exact smoothCoeffs_mul (smoothCoeffs_lowFactor O v i) + (LocalPeriodicCalculus.slow_smooth hO he (lowBasis i)) + | atom w a e ih => exact ⟨he, ih he⟩ + | add e f ihe ihf => exact ⟨ihe he.1, ihf he.2⟩ + +lemma order_slow_le (v : Fin 2) (e : Expression) : + (e.slow v).order ≤ max 3 (e.order + 1) := by + induction e with + | coeff c => + apply order_sumList_le _ _ _ (by simp [order]) + intro i _ + exact (order_mul_le _ _).trans (max_le (order_lowFactor v i) (by simp [order])) + | atom w a e ih => simp only [slow, order, List.length_cons] at *; omega + | add e f ihe ihf => simp only [slow, order] at *; omega + +lemma loss_slow_le (v : Fin 2) (e : Expression) : (e.slow v).loss ≤ e.loss + 1 := by + induction e with + | coeff c => + apply loss_sumList_le + intro i _ + exact (loss_mul_le _ _).trans (by simpa only [loss, add_zero] using loss_lowFactor v i) + | atom w a e ih => simp only [slow, loss, List.length_cons] at *; omega + | add e f ihe ihf => simp only [slow, loss] at *; omega + +lemma coefficient_chain_rule_joint {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) {c : LowJet × ℝ → ℝ} + (hc : ContDiffOn ℝ ∞ c (O ×ˢ Set.univ)) (v : Fin 2) (p : Base) + (hp : lowJet G p ∈ O) (t : ℝ) : + fderiv ℝ (fun q => c (lowJet G q, t)) p (coordinateVector v) = + ∑ i : LowIndex, lowDerivative G v p i * slowDerivative c (lowBasis i) (lowJet G p, t) := by + have hs : DifferentiableAt ℝ (fun Q : LowJet => c (Q, t)) (lowJet G p) := + ((hc.contDiffAt ((hO.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp _ + (contDiff_id.prodMk contDiff_const).contDiffAt).differentiableAt (by simp) + simpa only [smul_eq_mul, LocalPeriodicCalculus.fderiv_slice hO hc hp] using + coefficient_chain_rule hG v p hs + +/-- The syntactic derivative evaluates to the genuine derivative on every +open region where the low-jet coefficients are smooth. -/ +theorem eval_slow {O : Set LowJet} {S : Set Base} (hO : IsOpen O) (hS : IsOpen S) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (v : Fin 2) {e : Expression} (he : e.SmoothCoeffs O) {p : Base} (hp : p ∈ S) (t : ℝ) : + (e.slow v).eval G (p, t) = fderiv ℝ (fun q => e.eval G (q, t)) p (coordinateVector v) := by + induction e with + | coeff c => + rw [slow, eval_sumList, ← List.sum_toFinset _ Finset.univ.nodup_toList, + Finset.toList_toFinset] + simp only [eval_mul, eval_lowFactor, eval] + exact (coefficient_chain_rule_joint hO hG he v p (hQ hp) t).symm + | atom w a e ih => + have hj := (jet_smooth hG w a).differentiable (by simp) p + have he' : DifferentiableAt ℝ (fun q => e.eval G (q, t)) p := + (((eval_smooth hG hQ (e := e) he).contDiffAt + ((hS.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp p + (contDiff_id.prodMk contDiff_const).contDiffAt).differentiableAt (by simp) + simp only [slow, eval, ih he] + rw [fderiv_fun_mul hj he'] + simp only [add_apply, smul_apply, smul_eq_mul, + jet_cons] + ring + | add e f ihe ihf => + have hd (g : Expression) (hg : g.SmoothCoeffs O) : + DifferentiableAt ℝ (fun q => g.eval G (q, t)) p := + (((eval_smooth hG hQ hg).contDiffAt + ((hS.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp p + (contDiff_id.prodMk contDiff_const).contDiffAt).differentiableAt (by simp) + simpa only [slow, eval, fderiv_fun_add (hd e he.1) (hd f he.2), + add_apply] using congrArg₂ (· + ·) (ihe he.1) (ihf he.2) + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialEvaluation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..d0119e0a2e5013248ce65c47ba8b63a95bb72044 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialEvaluation.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialFullCorrector + +namespace OAI + +/-! Evaluation identities connecting the finite jet expressions to the +explicit span and covariance formulas of the periodic corrector. -/ +noncomputable section +open MeasureTheory Filter +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.JetPolynomial +open PeriodicCorrector CovarianceCorrector + +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +lemma spanSolve_decompose (Y C : E) (a b : ℝ) : + spanSolve Y C (a, b) = a • spanSolve Y C (1, 0) + b • spanSolve Y C (0, 1) := by + have hp : (a, b) = a • ((1, 0) : ℝ × ℝ) + b • ((0, 1) : ℝ × ℝ) := by + ext <;> simp + conv_lhs => rw [hp, map_add, map_smul, map_smul] + +namespace Expression + +lemma eval_spanTerm (Y C : LowJet → E) (L : E →L[ℝ] ℝ) (H K : Expression) + (G : Base → Space) (p : Base) (t : ℝ) : + (spanTerm Y C L H K).eval G (p, t) = + L (spanSolve (Y (lowJet G p)) (C (lowJet G p)) (H.eval G (p, t), K.eval G (p, t))) := by + conv_rhs => rw [spanSolve_decompose] + simp only [spanTerm, eval, eval_mul, spanCoefficient, + map_add, map_smul, smul_eq_mul] + ring + +lemma eval_metricTerm (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (h K : Expression) (G : Base → Space) (p : Base) (t : ℝ) : + (Expression.add ((Expression.coeff (metricCoefficient Y C X₀ V (1, 0))).mul h) + ((Expression.coeff (metricCoefficient Y C X₀ V (0, 1))).mul K)).eval G (p, t) = + inner ℝ (X₀ (lowJet G p) + V (lowJet G p) (t : Period)) + (spanSolve (Y (lowJet G p)) (C (lowJet G p)) (h.eval G (p, t), K.eval G (p, t))) := by + conv_rhs => rw [spanSolve_decompose] + simp only [eval, eval_mul, metricCoefficient, + inner_add_right, inner_smul_right] + ring + +lemma eval_angularSource {O : Set LowJet} (hO : IsOpen O) + (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + {h K e : Expression} (hh : h.SmoothCoeffs O) (hK : K.SmoothCoeffs O) + (hb : ∀ b : ℝ × ℝ, ContDiffOn ℝ ∞ (metricCoefficient Y C X₀ V b) (O ×ˢ Set.univ)) + (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + (angularSource Y C X₀ V h K e).eval G (p, t) = + let a := fun s : ℝ => inner ℝ (X₀ (lowJet G p) + V (lowJet G p) (s : Period)) + (spanSolve (Y (lowJet G p)) (C (lowJet G p)) + (h.eval G (p, s), deriv (fun u => K.eval G (p, u)) s)) + e.eval G (p, t) - (a t - ∫ s in 0..1, a s) := by + let f : Expression := Expression.add ((Expression.coeff (metricCoefficient Y C X₀ V (1, 0))).mul h) + ((Expression.coeff (metricCoefficient Y C X₀ V (0, 1))).mul K.angle) + have hf : f.SmoothCoeffs O := + ⟨smoothCoeffs_mul (hb (1, 0)) hh, smoothCoeffs_mul (hb (0, 1)) (smoothCoeffs_angle hO hK)⟩ + have ha (s : ℝ) : f.eval G (p, s) = + inner ℝ (X₀ (lowJet G p) + V (lowJet G p) (s : Period)) + (spanSolve (Y (lowJet G p)) (C (lowJet G p)) + (h.eval G (p, s), deriv (fun u => K.eval G (p, u)) s)) := by + rw [show f = Expression.add ((Expression.coeff (metricCoefficient Y C X₀ V (1, 0))).mul h) + ((Expression.coeff (metricCoefficient Y C X₀ V (0, 1))).mul K.angle) from rfl, + eval_metricTerm, eval_angle hO hK G hp] + change (e.sub f.fluct).eval G (p, t) = _ + rw [eval_sub] + rw [eval_fluct hO hf G hp, ha] + simp only [ha] + +lemma eval_transverseDatum {O : Set LowJet} {S : Set Base} (hO : IsOpen O) (hS : IsOpen S) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (v : Fin 2) {h j : Expression} (hh : h.SmoothCoeffs O) {p : Base} (hp : p ∈ S) (t : ℝ) : + ((h.primitive.slow v).sub j).eval G (p, t) = + fderiv ℝ (fun x => PeriodicPrimitive.primitive (fun s => h.eval G (x, s)) t) + p (coordinateVector v) - j.eval G (p, t) := by + rw [eval_sub, eval_slow hO hS hG hQ v (smoothCoeffs_primitive hO hh) hp] + have heq : (fun x => h.primitive.eval G (x, t)) =ᶠ[nhds p] + (fun x => PeriodicPrimitive.primitive (fun s => h.eval G (x, s)) t) := by + filter_upwards [hS.mem_nhds hp] with x hx + exact eval_primitive hO hh G (hQ hx) t + rw [heq.fderiv_eq] + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..38fb5dfdb9b705f370af7e496967dcb491fcec3a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullCorrector.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialOperations +import OAI.Geometry.SurfaceImmersion.Correction.LocalPeriodicCorrector + +namespace OAI + +/-! Polynomial construction for every component of the complete periodic +corrector. Only the transverse derivative increases the highest jet order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open PeriodicCorrector CovarianceCorrector + +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +def spanCoefficient (Y C : LowJet → E) (L : E →L[ℝ] ℝ) (b : ℝ × ℝ) : LowJet × ℝ → ℝ := + fun z => L (spanSolve (Y z.1) (C z.1) b) + +def metricCoefficient (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (b : ℝ × ℝ) : LowJet × ℝ → ℝ := + fun z => inner ℝ (X₀ z.1 + V z.1 (z.2 : Period)) (spanSolve (Y z.1) (C z.1) b) + +namespace Expression + +def spanTerm (Y C : LowJet → E) (L : E →L[ℝ] ℝ) (H K : Expression) : Expression := + Expression.add ((Expression.coeff (spanCoefficient Y C L (1, 0))).mul H) + ((Expression.coeff (spanCoefficient Y C L (0, 1))).mul K) + +def angularSource (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (h K e : Expression) : Expression := + e.sub (Expression.add ((Expression.coeff (metricCoefficient Y C X₀ V (1, 0))).mul h) + ((Expression.coeff (metricCoefficient Y C X₀ V (0, 1))).mul K.angle)).fluct + +def fullComponent (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (q : LowJet → ℝ) (L : E →L[ℝ] ℝ) (v : Fin 2) (h j e : Expression) : Expression := + let H := h.primitive + let K := (H.slow v).sub j + Expression.add (spanTerm Y C L H K) ((angularSource Y C X₀ V h K e).covariance V q L).primitive + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma smoothCoeffs_spanTerm {O : Set LowJet} {Y C : LowJet → E} + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) + (hd : ∀ Q ∈ O, gramDet (Y Q) (C Q) ≠ 0) (L : E →L[ℝ] ℝ) + {H K : Expression} (hH : H.SmoothCoeffs O) (hK : K.SmoothCoeffs O) : + (spanTerm Y C L H K).SmoothCoeffs O := by + have hb (b : ℝ × ℝ) : ContDiffOn ℝ ∞ (spanCoefficient Y C L b) (O ×ˢ Set.univ) := + (L.contDiff.comp_contDiffOn (contDiffOn_spanSolve hY hC contDiffOn_const hd)).comp + contDiffOn_fst (fun _ hz => hz.1) + exact ⟨smoothCoeffs_mul (hb (1, 0)) hH, smoothCoeffs_mul (hb (0, 1)) hK⟩ + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma smoothCoeffs_angularSource {O : Set LowJet} (hO : IsOpen O) + {Y C X₀ : LowJet → E} {V : LowJet → C(Period, E)} + (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) + {h K e : Expression} (hh : h.SmoothCoeffs O) (hK : K.SmoothCoeffs O) + (he : e.SmoothCoeffs O) : (angularSource Y C X₀ V h K e).SmoothCoeffs O := by + 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)) + exact smoothCoeffs_sub he (smoothCoeffs_fluct hO + ⟨smoothCoeffs_mul (hb (1, 0)) hh, smoothCoeffs_mul (hb (0, 1)) (smoothCoeffs_angle hO hK)⟩) + +lemma smoothCoeffs_fullComponent {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[ℝ] ℝ) (v : Fin 2) {h j e : Expression} + (hh : h.SmoothCoeffs O) (hj : j.SmoothCoeffs O) (he : e.SmoothCoeffs O) : + (fullComponent Y C X₀ V q L v h j e).SmoothCoeffs O := by + have hH := smoothCoeffs_primitive hO hh + have hK := smoothCoeffs_sub (smoothCoeffs_slow hO v hH) hj + exact ⟨smoothCoeffs_spanTerm hY hC hd L hH hK, + smoothCoeffs_primitive hO (smoothCoeffs_covariance hO hV hq hqp hcircle L + (smoothCoeffs_angularSource hO hY hC hX hV hd hh hK he))⟩ + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma order_spanTerm_le (Y C : LowJet → E) (L : E →L[ℝ] ℝ) (H K : Expression) : + (spanTerm Y C L H K).order ≤ max 2 (max H.order K.order) := by + exact max_le ((order_mul_le _ _).trans (by simp only [order]; omega)) + ((order_mul_le _ _).trans (by simp only [order]; omega)) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma loss_spanTerm_le (Y C : LowJet → E) (L : E →L[ℝ] ℝ) (H K : Expression) : + (spanTerm Y C L H K).loss ≤ max H.loss K.loss := by + exact max_le ((loss_mul_le _ _).trans (by simp only [loss, zero_add]; omega)) + ((loss_mul_le _ _).trans (by simp only [loss, zero_add]; omega)) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma order_angularSource_le (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (h K e : Expression) : + (angularSource Y C X₀ V h K e).order ≤ max 2 (max h.order (max K.order e.order)) := by + unfold angularSource + rw [order_sub, order_fluct] + exact max_le (by omega) (max_le + ((order_mul_le _ _).trans (by simp only [order]; omega)) + ((order_mul_le _ _).trans (by simp only [order, order_angle]; omega))) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma loss_angularSource_le (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (h K e : Expression) : + (angularSource Y C X₀ V h K e).loss ≤ max h.loss (max K.loss e.loss) := by + unfold angularSource + rw [loss_sub, loss_fluct] + exact max_le (by omega) (max_le + ((loss_mul_le _ _).trans (by simp only [loss, zero_add]; omega)) + ((loss_mul_le _ _).trans (by simp only [loss, zero_add, loss_angle]; omega))) + +omit [CompleteSpace E] [FiniteDimensional ℝ E] in +/-- One full periodic solve raises the jet order and scale loss by at most one. -/ +theorem fullComponent_bounds (Y C X₀ : LowJet → E) (V : LowJet → C(Period, E)) + (q : LowJet → ℝ) (L : E →L[ℝ] ℝ) (v : Fin 2) (h j e : Expression) + (N R : ℕ) (hN : 2 ≤ N) (hh : h.order ≤ N) (hj : j.order ≤ N) (he : e.order ≤ N) + (lh : h.loss ≤ R) (lj : j.loss ≤ R) (le : e.loss ≤ R) : + (fullComponent Y C X₀ V q L v h j e).order ≤ N + 1 ∧ + (fullComponent Y C X₀ V q L v h j e).loss ≤ R + 1 := by + have ho := order_slow_le v h.primitive + have hl := loss_slow_le v h.primitive + have hos := order_spanTerm_le Y C L h.primitive ((h.primitive.slow v).sub j) + have hls := loss_spanTerm_le Y C L h.primitive ((h.primitive.slow v).sub j) + have hor := order_angularSource_le Y C X₀ V h ((h.primitive.slow v).sub j) e + have hlr := loss_angularSource_le Y C X₀ V h ((h.primitive.slow v).sub j) e + simp only [order_primitive, order_sub, loss_primitive, loss_sub] at ho hl hos hls hor hlr + constructor + · change max (spanTerm Y C L h.primitive ((h.primitive.slow v).sub j)).order _ ≤ _ + rw [order_primitive, order_covariance] + omega + · change max (spanTerm Y C L h.primitive ((h.primitive.slow v).sub j)).loss _ ≤ _ + rw [loss_primitive, loss_covariance] + omega + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullEvaluation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullEvaluation.lean new file mode 100644 index 0000000000000000000000000000000000000000..48c4a27cafb1c4a3e1fe6fd6bf009877db4161b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialFullEvaluation.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ExplicitPeriodicFormula +import OAI.Geometry.SurfaceImmersion.Correction.LocalFullPeriodicCorrector + +namespace OAI + +/-! Identification of the complete polynomial expression with the same +explicit solution supplied by the full periodic system theorem. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open CovarianceCorrector PeriodicCorrector + +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +/-- Polynomial forcing produces the explicit full corrector. The derivative +in the transverse datum is the actual derivative of the forcing primitive. -/ +theorem eval_fullComponent {O : Set LowJet} {S : Set Base} (hO : IsOpen O) (hS : IsOpen S) + {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[ℝ] ℝ) (v : Fin 2) {h j e : Expression} + (hh : h.SmoothCoeffs O) (hj : j.SmoothCoeffs O) (he : e.SmoothCoeffs O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (hf jf ef : Base → C(Period, ℝ)) + (hhr : ∀ p ∈ S, ∀ t : ℝ, h.eval G (p, t) = hf p (t : Period)) + (hjr : ∀ p ∈ S, ∀ t : ℝ, j.eval G (p, t) = jf p (t : Period)) + (her : ∀ p ∈ S, ∀ t : ℝ, e.eval G (p, t) = ef p (t : Period)) + {p : Base} (hp : p ∈ S) (t : ℝ) : + (fullComponent Y C X₀ V q L v h j e).eval G (p, t) = + L (fullSolutionFormula (coordinateVector v) (fun x => Y (lowJet G x)) + (fun x => C (lowJet G x)) (fun x => X₀ (lowJet G x)) + (fun x => V (lowJet G x)) (fun x => q (lowJet G x)) hf jf ef (p, t)) := by + let K := (h.primitive.slow v).sub j + have hK : K.SmoothCoeffs O := + smoothCoeffs_sub (smoothCoeffs_slow hO v (smoothCoeffs_primitive hO hh)) hj + have hk : (fun s => K.eval G (p, s)) = fun s : ℝ => + fderiv ℝ (fun x => PeriodicPrimitive.primitive (fun u : ℝ => hf x (u : Period)) s) + p (coordinateVector v) - jf p (s : Period) := by + funext s + rw [show K = (h.primitive.slow v).sub j from rfl, + eval_transverseDatum hO hS hG hQ v hh hp, hjr p hp s] + have heq : (fun x => PeriodicPrimitive.primitive (fun u => h.eval G (x, u)) s) =ᶠ[𝓝 p] + (fun x => PeriodicPrimitive.primitive (fun u : ℝ => hf x (u : Period)) s) := by + filter_upwards [hS.mem_nhds hp] with x hx + rw [show (fun u => h.eval G (x, u)) = (fun u : ℝ => hf x (u : Period)) from + funext (hhr x hx)] + rw [heq.fderiv_eq] + have hhp : (fun s => h.eval G (p, s)) = (fun s : ℝ => hf p (s : Period)) := + funext (hhr p hp) + have hep : (fun s => e.eval G (p, s)) = (fun s : ℝ => ef p (s : Period)) := + funext (her p hp) + change (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) = _ + rw [eval_angularCorrection hO hY hC hX hV hd hq hqp hcircle L hh hK he G (hQ hp), + hhp, hep, hk] + rfl + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialIntegral.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..998d3c07916d36939a32039e76ae844f89e5e4dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialIntegral.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialDerivative + +namespace OAI + +/-! Angular derivatives, averaging, and normalized primitives act only on +smooth low-jet coefficients, preserving polynomial jet order and scale loss. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open SmoothPeriodicCalculus + +namespace Expression + +lemma eval_slice_smooth {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) : + ContDiff ℝ ∞ (fun t => e.eval G (p, t)) := by + induction e with + | coeff c => exact LocalPeriodicCalculus.smooth_slice hO he hp + | atom w a e ih => + change ContDiff ℝ ∞ (fun t => jet G w a p * e.eval G (p, t)) + exact contDiff_const.mul (ih he) + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +def angle (e : Expression) : Expression := e.mapCoeff angleDerivative + +def mean (e : Expression) : Expression := + e.mapCoeff (fun c z => ∫ t in 0..1, c (z.1, t)) + +def primitive (e : Expression) : Expression := + e.mapCoeff (fun c z => PeriodicPrimitive.primitive (fun t => c (z.1, t)) z.2) + +lemma smoothCoeffs_angle {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) : e.angle.SmoothCoeffs O := + smoothCoeffs_map e _ (fun _ hc => LocalPeriodicCalculus.angle_smooth hO hc) he + +lemma smoothCoeffs_mean {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) : e.mean.SmoothCoeffs O := by + apply smoothCoeffs_map e _ _ he + intro c hc + exact (SmoothParameterIntegral.contDiffOn_integral hO hc 0 1).comp contDiffOn_fst + (fun _ hz => hz.1) + +lemma smoothCoeffs_primitive {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) : e.primitive.SmoothCoeffs O := + smoothCoeffs_map e _ (fun _ hc => PeriodicPrimitive.contDiffOn_primitive_joint hO hc) he + +@[simp] lemma order_angle (e : Expression) : e.angle.order = e.order := order_mapCoeff _ _ +@[simp] lemma loss_angle (e : Expression) : e.angle.loss = e.loss := loss_mapCoeff _ _ +@[simp] lemma order_mean (e : Expression) : e.mean.order = e.order := order_mapCoeff _ _ +@[simp] lemma loss_mean (e : Expression) : e.mean.loss = e.loss := loss_mapCoeff _ _ +@[simp] lemma order_primitive (e : Expression) : e.primitive.order = e.order := order_mapCoeff _ _ +@[simp] lemma loss_primitive (e : Expression) : e.primitive.loss = e.loss := loss_mapCoeff _ _ + +lemma eval_angle {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + e.angle.eval G (p, t) = deriv (fun s => e.eval G (p, s)) t := by + induction e with + | coeff c => exact (LocalPeriodicCalculus.angle_hasDerivAt hO he hp t).deriv.symm + | atom w a e ih => + change jet G w a p * e.angle.eval G (p, t) = + deriv (fun s => jet G w a p * e.eval G (p, s)) t + rw [deriv_const_mul _ ((eval_slice_smooth hO (e := e) he G hp).differentiable (by simp) t), + ih he] + | add e f ihe ihf => + change e.angle.eval G (p, t) + f.angle.eval G (p, t) = + deriv (fun s => e.eval G (p, s) + f.eval G (p, s)) t + rw [deriv_fun_add ((eval_slice_smooth hO he.1 G hp).differentiable (by simp) t) + ((eval_slice_smooth hO he.2 G hp).differentiable (by simp) t), ihe he.1, ihf he.2] + +lemma eval_mean {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + e.mean.eval G (p, t) = ∫ s in 0..1, e.eval G (p, s) := by + induction e with + | coeff c => rfl + | atom w a e ih => + change jet G w a p * e.mean.eval G (p, t) = ∫ s in 0..1, jet G w a p * e.eval G (p, s) + rw [intervalIntegral.integral_const_mul, ih he] + | add e f ihe ihf => + change e.mean.eval G (p, t) + f.mean.eval G (p, t) = + ∫ s in 0..1, (e.eval G (p, s) + f.eval G (p, s)) + rw [intervalIntegral.integral_add + ((eval_slice_smooth hO he.1 G hp).continuous.intervalIntegrable 0 1) + ((eval_slice_smooth hO he.2 G hp).continuous.intervalIntegrable 0 1), ihe he.1, ihf he.2] + +lemma normalizedPrimitive_const_mul (c : ℝ) (f : ℝ → ℝ) (t : ℝ) : + PeriodicPrimitive.primitive (fun s => c * f s) t = c * PeriodicPrimitive.primitive f t := by + simp only [PeriodicPrimitive.primitive, PeriodicPrimitive.rawPrimitive, + intervalIntegral.integral_const_mul, mul_sub] + +lemma normalizedPrimitive_add {f g : ℝ → ℝ} (hf : Continuous f) (hg : Continuous g) (t : ℝ) : + PeriodicPrimitive.primitive (fun s => f s + g s) t = + PeriodicPrimitive.primitive f t + PeriodicPrimitive.primitive g t := by + have hi (s : ℝ) : PeriodicPrimitive.rawPrimitive (fun x => f x + g x) s = + PeriodicPrimitive.rawPrimitive f s + PeriodicPrimitive.rawPrimitive g s := + intervalIntegral.integral_add (hf.intervalIntegrable 0 s) (hg.intervalIntegrable 0 s) + simp only [PeriodicPrimitive.primitive, hi] + rw [intervalIntegral.integral_add + ((PeriodicPrimitive.rawPrimitive_continuous hf).intervalIntegrable 0 1) + ((PeriodicPrimitive.rawPrimitive_continuous hg).intervalIntegrable 0 1)] + ring + +lemma eval_primitive {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + e.primitive.eval G (p, t) = PeriodicPrimitive.primitive (fun s => e.eval G (p, s)) t := by + induction e with + | coeff c => rfl + | atom w a e ih => + change jet G w a p * e.primitive.eval G (p, t) = + PeriodicPrimitive.primitive (fun s => jet G w a p * e.eval G (p, s)) t + rw [normalizedPrimitive_const_mul, ih he] + | add e f ihe ihf => + change e.primitive.eval G (p, t) + f.primitive.eval G (p, t) = + PeriodicPrimitive.primitive (fun s => e.eval G (p, s) + f.eval G (p, s)) t + rw [normalizedPrimitive_add (eval_slice_smooth hO he.1 G hp).continuous + (eval_slice_smooth hO he.2 G hp).continuous, ihe he.1, ihf he.2] + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLinear.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLinear.lean new file mode 100644 index 0000000000000000000000000000000000000000..00db477eeeaac7ec6a64f7ec74462afff3ff558f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLinear.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialIntegral + +namespace OAI + +/-! Linear operators in the angular variable preserve higher-jet polynomials. +This includes operators whose coefficients depend smoothly on the second jet. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression + +def liftOperator (T : LowJet → (ℝ → ℝ) → ℝ → ℝ) (e : Expression) : Expression := + e.mapCoeff (fun c z => T z.1 (fun t => c (z.1, t)) z.2) + +lemma smoothCoeffs_liftOperator {O : Set LowJet} {T : LowJet → (ℝ → ℝ) → ℝ → ℝ} + (hT : ∀ c : LowJet × ℝ → ℝ, ContDiffOn ℝ ∞ c (O ×ˢ Set.univ) → + ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => T z.1 (fun t => c (z.1, t)) z.2) + (O ×ˢ Set.univ)) {e : Expression} (he : e.SmoothCoeffs O) : + (e.liftOperator T).SmoothCoeffs O := smoothCoeffs_map e _ hT he + +@[simp] lemma order_liftOperator (T : LowJet → (ℝ → ℝ) → ℝ → ℝ) (e : Expression) : + (e.liftOperator T).order = e.order := order_mapCoeff _ _ + +@[simp] lemma loss_liftOperator (T : LowJet → (ℝ → ℝ) → ℝ → ℝ) (e : Expression) : + (e.liftOperator T).loss = e.loss := loss_mapCoeff _ _ + +/-- This uses actual operator linearity, not an assumed polynomial representation. -/ +lemma eval_liftOperator {O : Set LowJet} (hO : IsOpen O) + (T : LowJet → (ℝ → ℝ) → ℝ → ℝ) + (hadd : ∀ Q ∈ O, ∀ f g : ℝ → ℝ, Continuous f → Continuous g → ∀ t, + T Q (fun s => f s + g s) t = T Q f t + T Q g t) + (hsmul : ∀ Q ∈ O, ∀ a : ℝ, ∀ f : ℝ → ℝ, ∀ t, + T Q (fun s => a * f s) t = a * T Q f t) + {e : Expression} (he : e.SmoothCoeffs O) (G : Base → Space) + {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + (e.liftOperator T).eval G (p, t) = T (lowJet G p) (fun s => e.eval G (p, s)) t := by + induction e with + | coeff c => rfl + | atom w a e ih => + change jet G w a p * (e.liftOperator T).eval G (p, t) = + T (lowJet G p) (fun s => jet G w a p * e.eval G (p, s)) t + rw [hsmul _ hp, ih he] + | add e f ihe ihf => + change (e.liftOperator T).eval G (p, t) + (f.liftOperator T).eval G (p, t) = + T (lowJet G p) (fun s => e.eval G (p, s) + f.eval G (p, s)) t + rw [hadd _ hp _ _ (eval_slice_smooth hO he.1 G hp).continuous + (eval_slice_smooth hO he.2 G hp).continuous, ihe he.1, ihf he.2] + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLocality.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLocality.lean new file mode 100644 index 0000000000000000000000000000000000000000..7aed85f16e4d508897ca3dc6c0f04d9a1ef9207a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialLocality.lean @@ -0,0 +1,41 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LowJetCoordinateChange +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialAlgebra + +namespace OAI + +/-! A finite jet expression depends only on the germ of its input map. -/ +noncomputable section +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial + +lemma jet_eventuallyEq {G H : Base → Space} {x : Base} + (h : G =ᶠ[𝓝 x] H) (w : List (Fin 2)) (a : Fin 4) : + jet G w a =ᶠ[𝓝 x] jet H w a := by + induction w with + | nil => exact h.mono (fun _ he => congrFun he a) + | cons i w ih => + filter_upwards [ih.fderiv (𝕜 := ℝ)] with y hy + exact congrArg (fun L : Base →L[ℝ] ℝ => L (coordinateVector i)) hy + +namespace Expression + +lemma eval_eq_of_eventuallyEq {G H : Base → Space} {x : Base} + (h : G =ᶠ[𝓝 x] H) (e : Expression) (t : ℝ) : + e.eval G (x,t) = e.eval H (x,t) := by + induction e with + | coeff c => + change c (lowJet G x,t) = c (lowJet H x,t) + rw [lowJet_eventuallyEq h] + | atom w a e ih => + change jet G w a x * e.eval G (x,t) = jet H w a x * e.eval H (x,t) + rw [(jet_eventuallyEq h w a).self_of_nhds,ih] + | add e f ihe ihf => + change e.eval G (x,t)+f.eval G (x,t) = e.eval H (x,t)+f.eval H (x,t) + rw [ihe,ihf] + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialOperations.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialOperations.lean new file mode 100644 index 0000000000000000000000000000000000000000..0615fdb4443ca45dd159be8c504bbc4957dba31e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialOperations.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialCovariance + +namespace OAI + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression + +def neg (e : Expression) : Expression := e.mapCoeff (fun c z => -c z) +def sub (e f : Expression) : Expression := .add e f.neg +def fluct (e : Expression) : Expression := e.sub e.mean + +@[simp] lemma eval_neg (e : Expression) (G : Base → Space) (z : Base × ℝ) : + e.neg.eval G z = -e.eval G z := by + induction e with + | coeff c => rfl + | atom w a e ih => simp only [neg, mapCoeff, eval] at *; rw [ih]; ring + | add e f ihe ihf => simp only [neg, mapCoeff, eval] at *; rw [ihe, ihf]; ring + +@[simp] lemma eval_sub (e f : Expression) (G : Base → Space) (z : Base × ℝ) : + (e.sub f).eval G z = e.eval G z - f.eval G z := by + simp only [sub, eval, eval_neg, sub_eq_add_neg] + +@[simp] lemma order_neg (e : Expression) : e.neg.order = e.order := order_mapCoeff _ _ +@[simp] lemma loss_neg (e : Expression) : e.neg.loss = e.loss := loss_mapCoeff _ _ +@[simp] lemma order_sub (e f : Expression) : (e.sub f).order = max e.order f.order := by + simp only [sub, order, order_neg] +@[simp] lemma loss_sub (e f : Expression) : (e.sub f).loss = max e.loss f.loss := by + simp only [sub, loss, loss_neg] +@[simp] lemma order_fluct (e : Expression) : e.fluct.order = e.order := by + simp only [fluct, order_sub, order_mean, max_self] +@[simp] lemma loss_fluct (e : Expression) : e.fluct.loss = e.loss := by + simp only [fluct, loss_sub, loss_mean, max_self] + +lemma smoothCoeffs_neg {O : Set LowJet} {e : Expression} (he : e.SmoothCoeffs O) : + e.neg.SmoothCoeffs O := smoothCoeffs_map e _ (fun _ hc => hc.neg) he + +lemma smoothCoeffs_sub {O : Set LowJet} {e f : Expression} + (he : e.SmoothCoeffs O) (hf : f.SmoothCoeffs O) : (e.sub f).SmoothCoeffs O := + ⟨he, smoothCoeffs_neg hf⟩ + +lemma smoothCoeffs_fluct {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) : e.fluct.SmoothCoeffs O := + smoothCoeffs_sub he (smoothCoeffs_mean hO he) + +lemma eval_fluct {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) (G : Base → Space) {p : Base} (hp : lowJet G p ∈ O) (t : ℝ) : + e.fluct.eval G (p, t) = e.eval G (p, t) - ∫ s in (0 : ℝ)..1, e.eval G (p, s) := by + rw [fluct, eval_sub, eval_mean hO he G hp] + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialScalar.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialScalar.lean new file mode 100644 index 0000000000000000000000000000000000000000..d2be50178a76cd251a613a0276c9d2150ba1eb91 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialScalar.lean @@ -0,0 +1,91 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCorrectorRepresentation + +namespace OAI + +/-! Scalar polynomial representations of the finite metric coefficients. -/ +noncomputable section +open scoped BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open LocalPeriodicExpansion CovarianceCorrector + +def Represents {S : TopologicalSpace.Opens Base} (G : Base → Space) + (e : Expression) (f : Family S ℝ) : Prop := + ∀ p ∈ S, ∀ t : ℝ, e.eval G (p, t) = f.val p (t : Period) + +def scale (a : ℝ) (e : Expression) : Expression := + e.mapCoeff (fun c z => a * c z) + +def sumFinset {ι : Type*} (s : Finset ι) (f : ι → Expression) : Expression := + sumList s.toList f + +@[simp] lemma eval_scale (a : ℝ) (e : Expression) (G : Base → Space) (z : Base × ℝ) : + (e.scale a).eval G z = a * e.eval G z := eval_mapCoeff_mul e G (fun _ => a) z + +@[simp] lemma order_scale (a : ℝ) (e : Expression) : (e.scale a).order = e.order := order_mapCoeff _ _ +@[simp] lemma loss_scale (a : ℝ) (e : Expression) : (e.scale a).loss = e.loss := loss_mapCoeff _ _ + +lemma smoothCoeffs_scale {O : Set LowJet} (a : ℝ) {e : Expression} (he : e.SmoothCoeffs O) : + (e.scale a).SmoothCoeffs O := smoothCoeffs_map e _ (fun _ hc => contDiffOn_const.mul hc) he + +lemma represents_add {S : TopologicalSpace.Opens Base} {G : Base → Space} + {e f : Expression} {U W : Family S ℝ} (he : Represents G e U) (hf : Represents G f W) : + Represents G (.add e f) (U + W) := by + intro p hp t + simp only [eval, he p hp t, hf p hp t, Family.add_apply] + +lemma represents_scale {S : TopologicalSpace.Opens Base} {G : Base → Space} + {e : Expression} {U : Family S ℝ} (he : Represents G e U) (a : ℝ) : + Represents G (e.scale a) (a • U) := by + intro p hp t + simp only [eval_scale, he p hp t, Family.smul_apply, smul_eq_mul] + +lemma represents_fluct {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) + {e : Expression} {U : Family S ℝ} (hs : e.SmoothCoeffs O) (he : Represents G e U) : + Represents G e.fluct U.fluct := by + intro p hp t + rw [eval_fluct hO hs G (hQ hp)] + simp only [he p hp, Family.fluct_apply, fluctuation] + rw [PeriodicPrimitive.integral_lift_eq_haar] + rfl + +lemma represents_sumFinset {ι : Type*} {S : TopologicalSpace.Opens Base} {G : Base → Space} + (a : Finset ι) {e : ι → Expression} {U : ι → Family S ℝ} + (he : ∀ i ∈ a, Represents G (e i) (U i)) : + Represents G (sumFinset a e) (∑ i ∈ a, U i) := by + classical + intro p hp t + rw [sumFinset, eval_sumList, ← List.sum_toFinset _ a.nodup_toList, Finset.toList_toFinset, + Family.sum_apply] + exact Finset.sum_congr rfl (fun i hi => he i hi p hp t) + +lemma smoothCoeffs_sumFinset {ι : Type*} {O : Set LowJet} (a : Finset ι) (e : ι → Expression) + (he : ∀ i ∈ a, (e i).SmoothCoeffs O) : (sumFinset a e).SmoothCoeffs O := by + apply smoothCoeffs_sumList + intro i hi + exact he i (Finset.mem_toList.mp hi) + +lemma order_sumFinset_le {ι : Type*} (a : Finset ι) (e : ι → Expression) (N : ℕ) + (hN : 2 ≤ N) (he : ∀ i ∈ a, (e i).order ≤ N) : (sumFinset a e).order ≤ N := by + apply order_sumList_le _ _ _ hN + intro i hi + exact he i (Finset.mem_toList.mp hi) + +lemma loss_sumFinset_le {ι : Type*} (a : Finset ι) (e : ι → Expression) (N : ℕ) + (he : ∀ i ∈ a, (e i).loss ≤ N) : (sumFinset a e).loss ≤ N := by + apply loss_sumList_le + intro i hi + exact he i (Finset.mem_toList.mp hi) + +lemma represents_dot {S : TopologicalSpace.Opens Base} {G : Base → Space} + {R T : VectorExpression} {U W : Family S R4} (hR : VectorExpression.Represents G R U) + (hT : VectorExpression.Represents G T W) : Represents G (R.dot T) (U.inner W) := by + intro p hp t + rw [VectorExpression.eval_dot hR hT hp, Family.inner_apply] + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..92881faeacb50fa01ab6c0fce81eedd710020c10 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVariation.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariations +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialAlgebra + +namespace OAI + +/-! The first variation of an actual higher-jet polynomial, including the +variation of its smooth second-jet coefficients. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open WeightedEstimates + +def variation : Expression → (Base → Space) → (Base → Space) → Base × ℝ → ℝ + | .coeff c, G, H, z => + fderiv ℝ c (lowJet G z.1, z.2) (variationLowJet H z.1, 0) + | .atom w a e, G, H, z => + jet H w a z.1 * e.eval G z + jet G w a z.1 * e.variation G H z + | .add e f, G, H, z => e.variation G H z + f.variation G H z + +theorem variation_hasDerivAt {O : Set LowJet} (hO : IsOpen O) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {e : Expression} (he : e.SmoothCoeffs O) (z : Base × ℝ) + (hQ : lowJet G z.1 ∈ O) : + HasDerivAt (fun s : ℝ => e.eval (fun p => G p + s • H p) z) (e.variation G H z) 0 := by + induction e with + | coeff c => + have hmem : (lowJet G z.1, z.2) ∈ O ×ˢ Set.univ := ⟨hQ, Set.mem_univ z.2⟩ + have hc : DifferentiableAt ℝ c (lowJet G z.1, z.2) := + (he.contDiffAt ((hO.prod isOpen_univ).mem_nhds hmem)).differentiableAt (by simp) + have hj := (lowJet_affine_hasDerivAt hG hH z.1 0).prodMk (hasDerivAt_const 0 z.2) + have hd := hc.hasFDerivAt.comp_hasDerivAt_of_eq 0 hj (by simp) + simpa only [Function.comp_def, zero_smul, add_zero, eval, variation] using hd + | atom w a e ih => + have hj : HasDerivAt (fun s : ℝ => jet (fun p => G p + s • H p) w a z.1) + (jet H w a z.1) 0 := by + have hpath : (fun s : ℝ => jet (fun p => G p + s • H p) w a z.1) = + (fun s : ℝ => jet G w a z.1 + s * jet H w a z.1) := by + funext s + rw [jet_add (H := fun p => s • H p) hG (ContDiff.const_smul s hH), jet_smul hH] + rw [hpath] + simpa only [one_mul, id_eq] using + ((hasDerivAt_id (0 : ℝ)).mul_const (jet H w a z.1)).const_add (jet G w a z.1) + have hzero : (fun p => G p + (0 : ℝ) • H p) = G := by funext p; simp + simpa only [eval, variation, hzero, Pi.mul_apply] using hj.fun_mul (ih he) + | add e f ihe ihf => + exact (ihe he.1).add (ihf he.2) + +theorem variation_smooth {O : Set LowJet} (hO : IsOpen O) {U : Set Base} + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hQ : Set.MapsTo (lowJet G) U O) {e : Expression} (he : e.SmoothCoeffs O) : + ContDiffOn ℝ ∞ (e.variation G H) (U ×ˢ Set.univ) := by + induction e with + | coeff c => + have hc : ContDiffOn ℝ ∞ (fderiv ℝ c) (O ×ˢ Set.univ) := + he.fderiv_of_isOpen (hO.prod isOpen_univ) (m := ∞) (by simp) + exact (hc.comp (((lowJet_smooth hG).comp contDiff_fst).prodMk contDiff_snd).contDiffOn + (fun z hz => ⟨hQ hz.1, hz.2⟩)).clm_apply + (((variationLowJet_smooth hH).comp contDiff_fst).prodMk contDiff_const).contDiffOn + | atom w a e ih => + exact (((jet_smooth hH w a).comp contDiff_fst).contDiffOn.mul (eval_smooth (e := e) hG hQ he)).add + (((jet_smooth hG w a).comp contDiff_fst).contDiffOn.mul (ih he)) + | add e f ihe ihf => exact (ihe he.1).add (ihf he.2) + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVector.lean new file mode 100644 index 0000000000000000000000000000000000000000..a98eccb709a37c2f38a2a2e5b2d353df762e3a62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/JetPolynomialVector.lean @@ -0,0 +1,154 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialFullEvaluation +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicFamilyAlgebra + +namespace OAI + +/-! Four coordinate polynomials represent the actual vector families used by +the metric recursion. Dot products and both derivatives preserve representation. -/ +noncomputable section +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open LocalPeriodicExpansion SmoothPeriodicCalculus + +abbrev R4 := EuclideanSpace ℝ (Fin 4) +abbrev VectorExpression := Fin 4 → Expression + +namespace VectorExpression + +def SmoothCoeffs (O : Set LowJet) (R : VectorExpression) : Prop := + ∀ i, (R i).SmoothCoeffs O + +def Represents {S : TopologicalSpace.Opens Base} (G : Base → Space) + (R : VectorExpression) (U : Family S R4) : Prop := + ∀ i p, p ∈ S → ∀ t : ℝ, (R i).eval G (p, t) = U.val p (t : CovarianceCorrector.Period) i + +def add (R T : VectorExpression) : VectorExpression := fun i => .add (R i) (T i) +def slow (R : VectorExpression) (v : Fin 2) : VectorExpression := fun i => (R i).slow v +def angle (R : VectorExpression) : VectorExpression := fun i => (R i).angle +def mean (R : VectorExpression) : VectorExpression := fun i => (R i).mean +def primitive (R : VectorExpression) : VectorExpression := fun i => (R i).primitive + +def dot (R T : VectorExpression) : Expression := + Expression.sumList Finset.univ.toList (fun i : Fin 4 => (R i).mul (T i)) + +lemma smoothCoeffs_dot {O : Set LowJet} {R T : VectorExpression} + (hR : R.SmoothCoeffs O) (hT : T.SmoothCoeffs O) : (R.dot T).SmoothCoeffs O := by + apply Expression.smoothCoeffs_sumList + intro i _ + exact Expression.smoothCoeffs_mul (hR i) (hT i) + +lemma order_dot_le {R T : VectorExpression} {N : ℕ} (hN : 2 ≤ N) + (hR : ∀ i, (R i).order ≤ N) (hT : ∀ i, (T i).order ≤ N) : (R.dot T).order ≤ N := by + apply Expression.order_sumList_le _ _ _ hN + intro i _ + exact (Expression.order_mul_le _ _).trans (max_le (hR i) (hT i)) + +lemma loss_dot_le {R T : VectorExpression} {a b : ℕ} + (hR : ∀ i, (R i).loss ≤ a) (hT : ∀ i, (T i).loss ≤ b) : (R.dot T).loss ≤ a + b := by + apply Expression.loss_sumList_le + intro i _ + exact (Expression.loss_mul_le _ _).trans (Nat.add_le_add (hR i) (hT i)) + +lemma order_slow_le {R : VectorExpression} {N : ℕ} (hN : 2 ≤ N) + (hR : ∀ i, (R i).order ≤ N) (v : Fin 2) : ∀ i, (R.slow v i).order ≤ N + 1 := by + intro i + have hi := hR i + exact (Expression.order_slow_le v (R i)).trans (by omega) + +lemma loss_slow_le {R : VectorExpression} {N : ℕ} + (hR : ∀ i, (R i).loss ≤ N) (v : Fin 2) : ∀ i, (R.slow v i).loss ≤ N + 1 := by + intro i + exact (Expression.loss_slow_le v (R i)).trans (Nat.add_le_add_right (hR i) 1) + +lemma represents_add {S : TopologicalSpace.Opens Base} {G : Base → Space} + {R T : VectorExpression} {U W : Family S R4} (hR : Represents G R U) + (hT : Represents G T W) : Represents G (R.add T) (U + W) := by + intro i p hp t + simp only [add, Expression.eval, hR i p hp t, hT i p hp t, Family.add_apply] + rfl + +lemma eval_dot {S : TopologicalSpace.Opens Base} {G : Base → Space} + {R T : VectorExpression} {U W : Family S R4} (hR : Represents G R U) + (hT : Represents G T W) {p : Base} (hp : p ∈ S) (t : ℝ) : + (R.dot T).eval G (p, t) = inner ℝ (U.val p (t : CovarianceCorrector.Period)) + (W.val p (t : CovarianceCorrector.Period)) := by + rw [dot, Expression.eval_sumList, ← List.sum_toFinset _ Finset.univ.nodup_toList, + Finset.toList_toFinset] + simp only [Expression.eval_mul, hR _ p hp t, hT _ p hp t] + rw [EuclideanSpace.inner_eq_star_dotProduct] + change (∑ i : Fin 4, U.val p (t : CovarianceCorrector.Period) i * + W.val p (t : CovarianceCorrector.Period) i) = + ∑ i : Fin 4, W.val p (t : CovarianceCorrector.Period) i * U.val p (t : CovarianceCorrector.Period) i + exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + +lemma represents_slow {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) + (hR : Represents G R U) (v : Fin 2) : Represents G (R.slow v) (U.slow (coordinateVector v)) := by + intro i p hp t + rw [slow, Expression.eval_slow hO S.isOpen hG hQ v (hRs i) hp] + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj i + have heq : (fun x => (R i).eval G (x, t)) =ᶠ[𝓝 p] + (fun x => L (U.val x (t : CovarianceCorrector.Period))) := by + filter_upwards [S.isOpen.mem_nhds hp] with x hx + exact hR i x hx t + rw [heq.fderiv_eq] + have hU : DifferentiableAt ℝ (fun x => U.val x (t : CovarianceCorrector.Period)) p := + ((U.smooth.contDiffAt ((S.isOpen.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp p + (contDiff_id.prodMk contDiff_const).contDiffAt).differentiableAt (by simp) + change fderiv ℝ (L ∘ fun x => U.val x (t : CovarianceCorrector.Period)) p + (coordinateVector v) = _ + rw [(L.hasFDerivAt.comp p hU.hasFDerivAt).fderiv] + rw [Family.slow_apply U (coordinateVector v) hp t, + ← LocalPeriodicCalculus.fderiv_slice S.isOpen U.smooth hp] + rfl + +lemma represents_angle {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) + (hR : Represents G R U) : Represents G R.angle U.angle := by + intro i p hp t + rw [angle, Expression.eval_angle hO (hRs i) G (hQ hp)] + have heq : (fun s => (R i).eval G (p, s)) = + (fun s : ℝ => U.val p (s : CovarianceCorrector.Period) i) := funext (hR i p hp) + rw [heq] + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj i + exact (L.hasFDerivAt.comp_hasDerivAt t (U.angle_hasDerivAt hp t)).deriv + +lemma represents_mean {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) + (hR : Represents G R U) : Represents G R.mean U.vectorMean := by + intro i p hp t + rw [mean, Expression.eval_mean hO (hRs i) G (hQ hp)] + simp only [hR i p hp, Family.vectorMean_apply] + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj i + change (∫ s in (0 : ℝ)..1, L (U.val p (s : CovarianceCorrector.Period))) = + L (CovarianceCorrector.average (U.val p)) + have hInt : IntervalIntegrable (fun s : ℝ => U.val p (s : CovarianceCorrector.Period)) + MeasureTheory.volume 0 1 := + ((U.val p).continuous.comp (AddCircle.continuous_mk' 1)).intervalIntegrable 0 1 + rw [L.intervalIntegral_comp_comm hInt, PeriodicPrimitive.integral_lift_eq_haar] + rfl + +lemma represents_primitive {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) + {R : VectorExpression} {U : Family S R4} (hRs : R.SmoothCoeffs O) + (hR : Represents G R U) (hm : ∀ p ∈ S, CovarianceCorrector.average (U.val p) = 0) : + Represents G R.primitive (U.primitive hm) := by + intro i p hp t + rw [primitive, Expression.eval_primitive hO (hRs i) G (hQ hp)] + have heq : (fun s => (R i).eval G (p, s)) = + (fun s : ℝ => U.val p (s : CovarianceCorrector.Period) i) := funext (hR i p hp) + rw [heq, Family.primitive, Family.ofLocal_apply _ _ hp, + LocalPeriodicCalculus.primitiveOn_apply _ _ _ _ _ hp] + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj i + exact (primitive_map L ((U.val p).continuous.comp (AddCircle.continuous_mk' 1)) t).symm + +end VectorExpression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearChartedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearChartedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..b1dce6e16ebe91dd0eff3c5e532b65e5f9ed8096 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearChartedMeanData.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseBudgets +import OAI.Geometry.SurfaceImmersion.Correction.CompactChartedMeanData + +namespace OAI + +/-! Assemble the actual charted mean data for a linear good phase from +its immersion, compact coordinate domains and positive coefficient margin. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates PhaseGeometry + +theorem linear_charted_mean_data {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {s : ℝ≥0} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {K : Compacts Base} (c : PolynomialSolveData P ε G hG φ K τ s) + {U Ω K₁ : Set SmallModes.Base} (hU : IsOpen U) (hΩ : IsOpen Ω) + (hK₁ : IsCompact K₁) (hUK₁ : U ⊆ K₁) (hK₁Ω : K₁ ⊆ Ω) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + (hchart : c.e = linearPhaseChart ξ hξ U hU) + (hImm : ∀ x ∈ Ω, Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) ξ) + (ψ : SupportedField (F := ℝ) c.chartCompact) (Q : Tensor →L[ℝ] ℝ) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (hmargin : ∀ x ∈ U, ρ + ‖Q‖*r ≤ Q (reference x) ∧ Q (reference x) ≤ R - ‖Q‖*r) + {K₀ : Set Base} (hK₀ : IsCompact K₀) (hUK₀ : c.U ⊆ K₀) (hs1 : s ≤ 1) + {J : Set LowJet} (hJ : IsCompact J) (hJO : J ⊆ c.O) (hGJ : MapsTo (lowJet G) c.U J) : + ∃ d : ChartedMeanData c r ρ R reference, d.cutoff = ψ ∧ d.form = (fun _ => Q) := by + have hF := hG.comp planeCoordinateIsometry.symm.contDiff + have hlocal : LocalBounds c.e.source c.e.target s r ρ R reference c.realMap ψ + (fun _ => Q) c.e c.e.symm := by + simpa only [PolynomialSolveData.realMap,hchart,linearPhaseChart_source] using + linear_phase_local_bounds hF hU hξ (fun x hx => hImm x (hK₁Ω (hUK₁ hx))) + (fun x hx => hgood x (hK₁Ω (hUK₁ hx))) ψ.contDiff Q hmargin + obtain ⟨b₀⟩ := linear_phase_budgets hF hΩ hU hK₁ hUK₁ hK₁Ω hξ hImm hgood ψ.contDiff Q + have b : Budgets c.e.source c.e.target 1 c.realMap ψ (fun _ => Q) c.e c.e.symm := by + simpa only [PolynomialSolveData.realMap,hchart,linearPhaseChart_source] using b₀ + exact compact_charted_mean_data c ψ (fun _ => Q) hlocal (b.atScale s s.coe_nonneg hs1) + hK₀ hUK₀ hs1 hJ hJO hGJ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanBudgetsFromBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanBudgetsFromBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..4a89f3787f20e2337929e440a9acad9d794488ae --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanBudgetsFromBounds.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseDerivativeBounds +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPullbackNorm +import OAI.Geometry.SurfaceImmersion.Correction.LinearPhaseMeanGeometry +import OAI.Geometry.Immersion.ClosedSurface.LocalMean +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialBounds + +namespace OAI + +/-! Actual mean budgets in a linear phase chart, with all geometric +constants specified by operator norms and supplied field bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes PhaseGeometry WeightedEstimates + +noncomputable def linearMeanBudgetsOfBounds + {U : Set Base} (hU : IsOpen U) {ξ : Base} (hξ : ξ ≠ 0) + (s : ℝ) (F : RField 4) (ψ : Base → ℝ) (Q : Tensor →L[ℝ] ℝ) + (C N P : ℕ → ℝ) (hC : ∀ m, 1 ≤ C m) (hN : ∀ m, 1 ≤ N m) (hP : ∀ m, 1 ≤ P m) + (hc : ∀ m, ReconstructionCoefficientBound (fun x => complexify (F x)) + (linearPhaseChart ξ hξ U hU).target s m (C m)) + (hn : ∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (N m) (freeNormal F)) + (hψ : ∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (P m) ψ) : + Budgets U (linearPhaseChart ξ hξ U hU).target s F ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm where + inv := fun _ => max 1 ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ + chi := fun _ => max 1 (2*‖ξ‖) + forms := fun _ => max 1 ‖Q‖ + pull := fun _ => max 1 (16*‖ξ‖^2) + psi := P + normal := N + mode := C + inv_pos := fun _ => le_max_left _ _ + chi_pos := fun _ => le_max_left _ _ + forms_pos := fun _ => le_max_left _ _ + pull_pos := fun _ => le_max_left _ _ + psi_pos := hP + normal_pos := hN + mode_pos := hC + inv_bound := by + intro m j hj _ x hx + exact (positive_order_linear_derivative_le (phaseEquiv ξ hξ).symm.toContinuousLinearMap + (linearPhaseChart ξ hξ U hU).open_target hj hx).trans (le_max_right _ _) + chi_bound := by + intro m j hj _ x hx + exact (linearPhaseChart_derivative_bound hξ hU hj hx).trans (le_max_right _ _) + psi_bound := hψ + normal_bound := hn + mode_bound := hc + forms_bound := fun m => (weightedBound_const _ s m Q).mono_const (le_max_right _ _) + pull_bound := by + intro m + have hL := phaseEquiv_norm_le ξ hξ + have hP : ‖pullback (phaseEquiv ξ hξ).toContinuousLinearMap‖ ≤ 16*‖ξ‖^2 := by + have hsq := pow_le_pow_left₀ (norm_nonneg (phaseEquiv ξ hξ).toContinuousLinearMap) hL 2 + exact (norm_pullback_le _).trans (by nlinarith [hsq]) + have he : pullbackField (linearPhaseChart ξ hξ U hU) = + fun _ => pullback (phaseEquiv ξ hξ).toContinuousLinearMap := + funext (pullbackField_linearPhaseChart hξ hU) + rw [he] + exact (weightedBound_const U s m _).mono_const (hP.trans (le_max_right _ _)) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..1fd4fa31a28ecf5abd9de8d815563729d1370af4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearMeanReconstruction.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.ChartedPartitionLeading +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData + +namespace OAI + +/-! The actual leading mean reconstructs the input tensor on an inner +domain where the common cutoff is one. Outside this domain its exact +formula retains the cutoff square. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes PhaseGeometry FiniteMean + +/-- The supported phase-chart cutoff with its inverse frequency factor. -/ +def supportedPhaseCutoff {K : Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e.symm e.target) (hK : (K : Set SmallModes.Base) ⊆ e.source) + (w : ℝ) : SupportedField (F := ℝ) (chartSupport e K hK) := + w⁻¹ • chartPush e he K hK χ + +lemma supportedPhaseCutoff_eval_source {K : Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K) + (e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base) + (he : ContDiffOn ℝ ∞ e.symm e.target) (hK : (K : Set SmallModes.Base) ⊆ e.source) + (w : ℝ) {x : SmallModes.Base} (hx : x ∈ e.source) : + supportedPhaseCutoff χ e he hK w (e x) = χ x / w := by + change w⁻¹ * chartPush e he K hK χ (e x) = _ + rw [chartPush_eval_source e he K hK χ hx] + exact (div_eq_inv_mul _ _).symm + +theorem linear_mean_reconstruction_on {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {s : ℝ≥0} {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanFamilyData P ε τ s r ρ R reference) (hρ : 0 < ρ) + (Q : PhaseBasis) (w : Fin 3 → ℝ) (hw : ∀ j, w j ≠ 0) + (χ : SmallModes.Base → ℝ) (ψ : Fin 3 → SmallModes.Base → ℝ) + (hphase : ∀ j, coordinatePhase (d.phase j) = phaseLinear (w j • Q.ξ j)) + (hcutoff : ∀ j x, (d.data j).cutoff x = ψ j x) + (htransport : ∀ j x, x ∈ (d.solver j).e.source → + ψ j ((d.solver j).e x) = χ x / w j) + (hform : ∀ j, (d.data j).form = fun _ => Q.Q j) + (hsupport : ∀ j, tsupport χ ⊆ (d.solver j).e.source) + (D : Set SmallModes.Base) (hχ : ∀ x ∈ D, χ x = 1) : + ∀ A : SmallModes.Base → Tensor, ContDiff ℝ ∞ A → + InTrialBall Set.univ reference r A → + ∀ x ∈ D, chartedFamilyLeading d.data hρ A x = A x := by + intro A hA hball x hx + have he := charted_partition_leading d.data hρ χ Q w hw hphase + (fun j y hy => (hcutoff j _).trans (htransport j y hy)) + (fun j y _ => congrFun (hform j) ((d.solver j).e y)) hsupport hA hball + simpa only [hχ x hx,one_pow,one_smul] using congrFun he x + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearPhaseMeanGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearPhaseMeanGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..57c82a18c910b373f1eb2117092019aaa0c3103d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LinearPhaseMeanGeometry.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseChart +import OAI.Geometry.Immersion.ClosedSurface.LocalMean + +namespace OAI + +/-! The mean geometry for an actual linear good phase: the coefficient +margin is transported exactly, and the pullback operator is constant. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes PhaseMean + +lemma pullbackField_linearPhaseChart {ξ : Base} (hξ : ξ ≠ 0) {U : Set Base} (hU : IsOpen U) + (x : Base) : pullbackField (linearPhaseChart ξ hξ U hU) x = + pullback (phaseEquiv ξ hξ).toContinuousLinearMap := by + change pullback (fderiv ℝ (phaseEquiv ξ hξ) x) = _ + rw [ContinuousLinearEquiv.fderiv] + +theorem linear_phase_local_bounds {F : RField 4} (hF : ContDiff ℝ ∞ F) + {U : Set Base} (hU : IsOpen U) {ξ : Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ U, Function.Injective (fderiv ℝ F x)) + (hgood : ∀ x ∈ U, Good (realSecondTensor F x) ξ) + {ψ : Base → ℝ} (hψ : ContDiff ℝ ∞ ψ) (Q : PhaseMean.Tensor →L[ℝ] ℝ) + {s r ρ R : ℝ} {reference : Base → PhaseMean.Tensor} + (hmargin : ∀ x ∈ U, ρ + ‖Q‖*r ≤ Q (reference x) ∧ Q (reference x) ≤ R - ‖Q‖*r) : + LocalBounds U (linearPhaseChart ξ hξ U hU).target s r ρ R reference + (F ∘ (linearPhaseChart ξ hξ U hU).symm) ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm := by + have hsm := linearPhaseChart_smooth ξ hξ U hU + refine { + openU := hU + smoothF := hF.comp hsm.2 + domain := linearPhaseChart_modeDomain hF hU hξ hImm hgood + smoothPsi := hψ.contDiffOn + smoothQ := contDiffOn_const + smoothChi := hsm.1.contDiffOn + smoothInv := hsm.2.contDiffOn + chiInto := fun x hx => (linearPhaseChart ξ hξ U hU).map_source hx + invInto := fun x hx => (linearPhaseChart ξ hξ U hU).map_target hx + smoothPullback := ?_ + margin := ?_ + } + · have he : pullbackField (linearPhaseChart ξ hξ U hU) = + fun _ => pullback (phaseEquiv ξ hξ).toContinuousLinearMap := + funext (pullbackField_linearPhaseChart hξ hU) + rw [he] + exact contDiffOn_const + · intro x hx + exact hmargin _ ((linearPhaseChart ξ hξ U hU).map_target hx) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..229398f35a0625b51f443480f708f2d92c08c4d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMean.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedTrialAmplitude +import OAI.Geometry.SurfaceImmersion.Atlas.CombinedTensorBounds + +namespace OAI + +/-! The actual combined mean operator in a phase chart. Its amplitudes are +constructed from the trial tensor and the fixed positive coefficient forms. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes +open PhaseMean (firstDirection secondDirection) +variable {n : ℕ} {F : RField 4} {V : Set SmallModes.Base} + +lemma combinedMeanTensor_smooth {P : Fin 3 → Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (hP : ∀ i l, (P i l).SmoothCoeffs O) (δ τ ε : ℝ) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (lowJet G) U O) + (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) : + ContDiff ℝ ∞ (combinedMeanTensor P δ τ ε G hF h K hKV R q b) := + contDiff_pi.mpr fun i => combinedSeedMean_smooth hU hO (hP i) δ τ ε hG hGQ + hF h K hKU hKV R q b (firstDirection i) (secondDirection i) + +lemma combinedMeanTensor_tsupport (P : Fin 3 → Fin n → Expression) (δ τ ε : ℝ) + (G : Base → Space) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F V) + (K : Compacts Base) (hKV : (modeSupport K : Set SmallModes.Base) ⊆ V) + (R : SupportedField (F := SmallModes.Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) + (q : ℕ) (b : SupportedField (F := ℝ) (modeSupport K)) : + tsupport (combinedMeanTensor P δ τ ε G hF h K hKV R q b) ⊆ K := by + apply closure_minimal _ K.isCompact.isClosed + intro x hx + by_contra hn + apply hx + funext i + change combinedSeedMean (P i) δ τ ε G hF h K hKV R q b (firstDirection i) (secondDirection i) x = 0 + exact image_eq_zero_of_notMem_tsupport (fun hz => hn + (combinedSeedMean_tsupport (P i) δ τ ε G hF h K hKV R q b (firstDirection i) (secondDirection i) hz)) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates +open JetPolynomial (SupportedField) +open JetPolynomial.Perturbation (modeSupport combinedMeanTensor) +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +def localCombinedMean (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : Base → Tensor := + fun x => pullbackField χ x + (combinedMeanTensor P δ τ ε G h.smoothF h.domain K hKV R q + (supportedTrialAmplitude h hρ hKV A) (JetPolynomial.planeCoordinateIsometry.symm (χ x))) + +lemma localCombinedMean_smooth (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) + {P : Fin 3 → Fin n → JetPolynomial.Expression} {J : Set JetPolynomial.Base} + {O : Set JetPolynomial.LowJet} (hJ : IsOpen J) (hO : IsOpen O) + (hP : ∀ i l, (P i l).SmoothCoeffs O) {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (JetPolynomial.lowJet G) J O) + (hKJ : (K : Set JetPolynomial.Base) ⊆ J) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : + ContDiffOn ℝ ∞ (localCombinedMean h hρ hKV P G δ τ ε R q A) U := by + have ht := JetPolynomial.Perturbation.combinedMeanTensor_smooth hJ hO hP δ τ ε hG hGQ + h.smoothF h.domain K hKJ hKV R q (supportedTrialAmplitude h hρ hKV A) + exact h.smoothPullback.clm_apply + ((ht.comp JetPolynomial.planeCoordinateIsometry.symm.contDiff).comp_contDiffOn h.smoothChi) + +lemma localCombinedMean_vanishes (h : LocalBounds U V s r ρ R₀ reference F ψ Q χ e) + (hρ : 0 < ρ) (hKV : (modeSupport K : Set Base) ⊆ V) {S : Set Base} + (hsp : ∀ x ∈ U, χ x ∈ (modeSupport K : Set Base) → x ∈ S) + (P : Fin 3 → Fin n → JetPolynomial.Expression) (G : JetPolynomial.Base → JetPolynomial.Space) + (δ τ ε : ℝ) (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ) (A : Base → Tensor) : + ∀ x ∈ U, x ∉ S → localCombinedMean h hρ hKV P G δ τ ε R q A x = 0 := by + intro x hx hn + have hk : JetPolynomial.planeCoordinateIsometry.symm (χ x) ∉ (K : Set JetPolynomial.Base) := by + intro hk + apply hn (hsp x hx _) + exact ⟨_, hk, JetPolynomial.planeCoordinateIsometry.apply_symm_apply (χ x)⟩ + have hz := image_eq_zero_of_notMem_tsupport (fun ht => hk + (JetPolynomial.Perturbation.combinedMeanTensor_tsupport P δ τ ε G h.smoothF h.domain K hKV R q + (supportedTrialAmplitude h hρ hKV A) ht)) + change pullbackField χ x (combinedMeanTensor P δ τ ε G h.smoothF h.domain K hKV R q + (supportedTrialAmplitude h hρ hKV A) _) = 0 + rw [hz, map_zero] + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMeanBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMeanBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d355939b22c6cd7e4287adfeaf7e6351b7f4e1ef --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalCombinedMeanBounds.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalCombinedMean + +namespace OAI + +/-! Uniform finite-loss value and difference bounds for the actual local +combined mean operator on the positive trial ball. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes WeightedEstimates FiniteMean +open JetPolynomial (SupportedField supportedWeightedSeminorm weightedBound_comp_isometry) +open JetPolynomial.Perturbation (modeSupport) + +variable {n : ℕ} {U V : Set Base} {s r ρ R₀ : ℝ} {reference : Base → Tensor} + {F : RField 4} {K : Compacts JetPolynomial.Base} + {ψ : SupportedField (F := ℝ) (modeSupport K)} + {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +theorem localCombinedMean_estimates (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 : (modeSupport K : Set Base) ⊆ V) + {P : Fin 3 → Fin n → JetPolynomial.Expression} {J : Set JetPolynomial.Base} + {O Q₀ : Set JetPolynomial.LowJet} (hJ : IsOpen J) (hO : IsOpen O) + (hQ₀ : IsCompact Q₀) (hQO : Q₀ ⊆ O) (hP : ∀ i l, (P i l).SmoothCoeffs O) + (hKJ : (K : Set JetPolynomial.Base) ⊆ J) + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (JetPolynomial.lowJet G) J Q₀) + {L : ℕ} (D : ℕ → ℝ) (hD : ∀ m, 0 ≤ D m) (q m : ℕ) (C B₀ : ℝ) + (hB₀ : 1 ≤ B₀) + (hGb : WeightedBound J s (m + JetPolynomial.Perturbation.tensorOrder P) B₀ (JetPolynomial.lowJet G)) : + ∃ β κ : ℝ, 1 ≤ β ∧ 1 ≤ κ ∧ ∀ (δ τ ε : ℝ) (p : ℕ), + 0 < δ → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + JetPolynomial.Perturbation.tensorLoss P ≤ p → τ / s + ε / τ ^ p ≤ 1 → + ∀ (R : SupportedField (F := Ambient 4) (modeSupport K) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (modeSupport K)), + (∀ m Z, supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm (modeSupport K) ⟨s, hs.le⟩ (m + L) Z) → + ∀ (A B : Base → Tensor) (a : ℝ), 0 ≤ C → 0 ≤ a → + ContDiffOn ℝ ∞ A U → ContDiffOn ℝ ∞ B U → + InTrialBall U reference r A → InTrialBall U reference r B → + WeightedBound U s (m + (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1))) C A → + WeightedBound U s (m + (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1))) C B → + WeightedBound U s (m + (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1))) a (A - B) → + WeightedBound U s m ((τ / s + ε / τ ^ p) * β) + (localCombinedMean h hρ hKV P G δ τ ε R q A) ∧ + WeightedBound U s m (κ * (τ / s + ε / τ ^ p) * a) + (localCombinedMean h hρ hKV P G δ τ ε R q A - + localCombinedMean h hρ hKV P G δ τ ε R q B) := by + let N := m + JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1) + obtain ⟨A₀, hA₀, ha⟩ := supportedTrialAmplitude_bounds h d hs hs1 hρ hKV N C + obtain ⟨E, hE, he⟩ := JetPolynomial.Perturbation.combinedSeedTensor_bounds + (L := L) hJ hO hQ₀ hQO P hP m B₀ hB₀ h.smoothF h.domain K hKJ hKV + (fun j => d.mode (j + 1)) D (fun j => zero_le_one.trans (d.mode_pos _)) hD + q A₀ (d.normal N) (zero_le_one.trans hA₀) (zero_le_one.trans (d.normal_pos N)) + let β := max 1 (outputFactor d m * E) + let κ := max 1 (outputFactor d m * (2 * E * inputFactor d N)) + refine ⟨β, κ, le_max_left _ _, le_max_left _ _, ?_⟩ + intro δ τ ε p hδ hτ hτs hε hε1 hp hsmall R hR A B a hC ha0 hA hB hballA hballB hbA hbB hab + have hN : m + (JetPolynomial.Perturbation.tensorOrder P + 1 + (q + 1) * (L + 1)) = N := by + dsimp only [N] + omega + rw [hN] at hbA hbB hab + obtain ⟨habA, habB, habD⟩ := ha A B a hC ha0 hA hB hballA hballB hbA hbB hab + have hh := he G hG ⟨s, hs.le⟩ δ τ ε p hδ hτ hs hτs hs1 hε hε1 hp hsmall hGQ hGb + (fun j => d.mode_bound (j + 1)) R hR (d.normal_bound N) + (supportedTrialAmplitude h hρ hKV A) (supportedTrialAmplitude h hρ hKV B) + (inputFactor d N * a) (mul_nonneg (inputFactor_nonneg d N) ha0) habA habB + (by simpa only [mul_assoc] using habD) + have hsA := JetPolynomial.Perturbation.combinedMeanTensor_smooth hJ hO hP δ τ ε hG + (fun _ hx => hQO (hGQ hx)) h.smoothF h.domain K hKJ hKV R q (supportedTrialAmplitude h hρ hKV A) + have hsB := JetPolynomial.Perturbation.combinedMeanTensor_smooth hJ hO hP δ τ ε hG + (fun _ hx => hQO (hGQ hx)) h.smoothF h.domain K hKJ hKV R q (supportedTrialAmplitude h hρ hKV B) + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hva := weightedBound_comp_isometry JetPolynomial.planeCoordinateIsometry.symm hsA hh.1 + have hda := weightedBound_comp_isometry JetPolynomial.planeCoordinateIsometry.symm (hsA.sub hsB) hh.2 + have htv := h.transport_bound d hs hs1 (mul_nonneg hη hE) + (hsA.comp JetPolynomial.planeCoordinateIsometry.symm.contDiff).contDiffOn + (hva.restrict_open h.domain.isOpen) + have hi := inputFactor_nonneg d N + have htd := h.transport_bound d hs hs1 (by positivity) + ((hsA.sub hsB).comp JetPolynomial.planeCoordinateIsometry.symm.contDiff).contDiffOn + (hda.restrict_open h.domain.isOpen) + constructor + · apply htv.mono_const + calc + outputFactor d m * ((τ / s + ε / τ ^ p) * E) = (τ / s + ε / τ ^ p) * (outputFactor d m * E) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left (le_max_right _ _) hη + · have hc : outputFactor d m * ((τ / s + ε / τ ^ p) * (2 * E) * (inputFactor d N * a)) ≤ + κ * (τ / s + ε / τ ^ p) * a := by + calc + _ = (outputFactor d m * (2 * E * inputFactor d N)) * ((τ / s + ε / τ ^ p) * a) := by ring + _ ≤ κ * ((τ / s + ε / τ ^ p) * a) := + mul_le_mul_of_nonneg_right (le_max_right _ _) (mul_nonneg hη ha0) + _ = _ := by ring + apply (htd.mono_const hc).congr + intro x hx + exact (map_sub (pullbackField χ x) _ _).symm + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalFullPeriodicCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalFullPeriodicCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..9462e4db99eae71b600aafd6b79528b7d2625b54 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalFullPeriodicCorrector.lean @@ -0,0 +1,179 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LocalPeriodicCorrector +import OAI.Geometry.SurfaceImmersion.Correction.FullPeriodicCorrector + +namespace OAI + +/-! The complete periodic corrector with all hypotheses restricted to an open chart domain. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.PeriodicCorrector +open CovarianceCorrector LocalPeriodicCalculus +open SmoothPeriodicCalculus (slowDerivative) + +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 directional_pairing_constraint_on {O : Set A} (hO : IsOpen O) {Y U : A → E} + {H : A → ℝ} {p v : A} (hp : p ∈ O) {C : E} {j : ℝ} + (hY : DifferentiableAt ℝ Y p) (hU : DifferentiableAt ℝ U p) + (hH : DifferentiableAt ℝ H p) (he : ∀ q ∈ O, 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)) =ᶠ[𝓝 p] H := by + filter_upwards [hO.mem_nhds hp] with q hq + exact he q hq + have hv := congrArg (fun L : A →L[ℝ] ℝ => L v) + ((hd.congr_of_eventuallyEq hid.symm).unique hH.hasFDerivAt) + simp only [ContinuousLinearMap.comp_apply, ContinuousLinearMap.prod_apply, + fderivInnerCLM_apply] at hv + rw [hC] at hv + linarith + +/-- The concrete full correction uses the genuine slow derivative of the +normalized primitive in its transverse datum. -/ +def fullSolutionFormula (v : A) (Y C X₀ : A → E) (V : A → C(Period, E)) + (q : A → ℝ) (h j e : A → C(Period, ℝ)) (z : A × ℝ) : E := + JetPolynomial.angularCorrectionFunction (Y z.1) (C z.1) (X₀ z.1) (V z.1) (q z.1) + (fun t => h z.1 (t : Period)) + (fun t => fderiv ℝ (fun p => PeriodicPrimitive.primitive + (fun s : ℝ => h p (s : Period)) t) z.1 v - j z.1 (t : Period)) + (fun t => e z.1 (t : Period)) z.2 + +/-- A mean-zero, jointly smooth solution of the complete periodic system. +The transverse equation follows from differentiating the pairing with `Y`. -/ +theorem solve_full_smooth_family_on_formula (O : Set A) (hO : IsOpen O) (v : A) (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) (hX₀ : ContDiffOn ℝ ∞ X₀ O) + (hYC : ∀ p ∈ O, fderiv ℝ Y p v = C p) + (hdet : ∀ p ∈ O, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p ∈ O, ∀ t, V p t ∈ S p) + (hV : ContDiffOn ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (q : A → ℝ) (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (h j e : A → C(Period, ℝ)) + (hhs : ContDiffOn ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hjs : ContDiffOn ℝ ∞ (fun z : A × ℝ => j z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hes : ContDiffOn ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hmh : ∀ p ∈ O, average (h p) = 0) (hmj : ∀ p ∈ O, average (j p) = 0) + (hme : ∀ p ∈ O, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiffOn ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + ContDiffOn ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + (∀ p ∈ O, average (U p) = 0) ∧ + (∀ p ∈ O, ∀ (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) + (D p (t : Period)) t) ∧ + (∀ p ∈ O, ∀ t, inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p ∈ O, ∀ (t : ℝ), inner ℝ (Y p) + (slowDerivative (fun z : A × ℝ => U z.1 (z.2 : Period)) v (p, t)) = j p (t : Period)) ∧ + (∀ p ∈ O, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, h p = 0) → + (∀ p ∈ Z, j p = 0) → (∀ p ∈ Z, e p = 0) → ∀ p ∈ Z, U p = 0) ∧ + (∀ p ∈ O, ∀ t : ℝ, U p (t : Period) = fullSolutionFormula v Y C X₀ V q h j e (p, t)) := by + let H := primitiveOn h O hO hhs hmh + have hHs : ContDiffOn ℝ ∞ (fun z : A × ℝ => H z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + primitiveOn_smooth h O hO hhs hmh + have hH0 : ∀ p ∈ O, average (H p) = 0 := fun p hp => primitiveOn_mean_zero h O hO hhs hmh hp + let Hᵥ := slowOn H O hO hHs v + have hHᵥs : ContDiffOn ℝ ∞ (fun z : A × ℝ => Hᵥ z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + slowOn_smooth H O hO hHs v + let K : A → C(Period, ℝ) := fun p => Hᵥ p - j p + have hKs : ContDiffOn ℝ ∞ (fun z : A × ℝ => K z.1 (z.2 : Period)) (O ×ˢ Set.univ) := hHᵥs.sub hjs + have hK0 (p : A) (hp : p ∈ O) : average (K p) = 0 := by + have hv0 : average (Hᵥ p) = 0 := slowOn_mean_zero H O hO hHs hH0 v hp + change average (fun t => Hᵥ p t - j p t) = 0 + rw [average_sub (f := Hᵥ p) (g := j p) (Hᵥ p).continuous (j p).continuous, + hv0, hmj p hp, sub_self] + obtain ⟨U, D, hUs, hDs, hU0, hUd, hpair, hfluc, hUH, hzero, hformula⟩ := + solve_smooth_family_on_formula O hO S Y C X₀ hY hC hX₀ hdet hPY hPC hPX V hVmem hV + q hq hqpos hcircle h K e hhs hKs hes hmh hK0 hme + refine ⟨U, D, hUs, hDs, hU0, hUd, fun p hp t => (hpair p hp t).2, ?_, hfluc, ?_, ?_⟩ + · intro p hp t + have hUt : ContDiffAt ℝ ∞ (fun q => U q (t : Period)) p := + (hUs.contDiffAt ((hO.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp p + (contDiff_id.prodMk contDiff_const).contDiffAt + have hHt : ContDiffAt ℝ ∞ (fun q => H q (t : Period)) p := + (hHs.contDiffAt ((hO.prod isOpen_univ).mem_nhds ⟨hp, Set.mem_univ t⟩)).comp p + (contDiff_id.prodMk contDiff_const).contDiffAt + have he : ∀ q ∈ O, inner ℝ (Y q) (U q (t : Period)) = H q (t : Period) := by + intro q hq + exact (hUH q hq t).trans (primitiveOn_apply h O hO hhs hmh hq t).symm + have hK : inner ℝ (C p) (U p (t : Period)) = + fderiv ℝ (fun q => H q (t : Period)) p v - j p (t : Period) := by + rw [LocalPeriodicCalculus.fderiv_slice hO hHs hp] + have hk := (hpair p hp (t : Period)).1 + change inner ℝ (C p) (U p (t : Period)) = Hᵥ p (t : Period) - j p (t : Period) at hk + rw [slowOn_apply H O hO hHs v hp] at hk + exact hk + have hd := directional_pairing_constraint_on hO hp + ((hY.contDiffAt (hO.mem_nhds hp)).differentiableAt (by simp)) + (hUt.differentiableAt (by simp)) (hHt.differentiableAt (by simp)) he (hYC p hp) hK + rwa [LocalPeriodicCalculus.fderiv_slice hO hUs hp] at hd + · intro Z hZ hZO hhZ hjZ heZ p hp + have hHZ : ∀ q ∈ Z, H q = 0 := + fun q hq => primitiveOn_zero_at h O hO hhs hmh (hZO hq) (hhZ q hq) + have hHvp : Hᵥ p = 0 := slowOn_zero_on H O hO hHs hZ hHZ v (hZO hp) hp + have hKp : K p = 0 := by + change Hᵥ p - j p = 0 + rw [hHvp, hjZ p hp, sub_self] + exact hzero p (hZO hp) (hhZ p hp) hKp (heZ p hp) + + · intro p hp t + have hK : (fun s : ℝ => K p (s : Period)) = fun s : ℝ => + fderiv ℝ (fun q => PeriodicPrimitive.primitive (fun u : ℝ => h q (u : Period)) s) + p v - j p (s : Period) := by + funext s + change Hᵥ p (s : Period) - j p (s : Period) = _ + rw [slowOn_apply H O hO hHs v hp, ← fderiv_slice hO hHs hp] + have heq : (fun q => H q (s : Period)) =ᶠ[𝓝 p] + (fun q => PeriodicPrimitive.primitive (fun u : ℝ => h q (u : Period)) s) := by + filter_upwards [hO.mem_nhds hp] with q hq + exact primitiveOn_apply h O hO hhs hmh hq s + rw [heq.fderiv_eq] + rw [hformula p hp t, hK] + rfl + +theorem solve_full_smooth_family_on (O : Set A) (hO : IsOpen O) (v : A) (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) (hX₀ : ContDiffOn ℝ ∞ X₀ O) + (hYC : ∀ p ∈ O, fderiv ℝ Y p v = C p) + (hdet : ∀ p ∈ O, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p ∈ O, ∀ t, V p t ∈ S p) + (hV : ContDiffOn ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (q : A → ℝ) (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (h j e : A → C(Period, ℝ)) + (hhs : ContDiffOn ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hjs : ContDiffOn ℝ ∞ (fun z : A × ℝ => j z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hes : ContDiffOn ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hmh : ∀ p ∈ O, average (h p) = 0) (hmj : ∀ p ∈ O, average (j p) = 0) + (hme : ∀ p ∈ O, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiffOn ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + ContDiffOn ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + (∀ p ∈ O, average (U p) = 0) ∧ + (∀ p ∈ O, ∀ (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) + (D p (t : Period)) t) ∧ + (∀ p ∈ O, ∀ t, inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p ∈ O, ∀ (t : ℝ), inner ℝ (Y p) + (slowDerivative (fun z : A × ℝ => U z.1 (z.2 : Period)) v (p, t)) = j p (t : Period)) ∧ + (∀ p ∈ O, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ Z : Set A, IsOpen Z → Z ⊆ O → (∀ p ∈ Z, h p = 0) → + (∀ p ∈ Z, j p = 0) → (∀ p ∈ Z, e p = 0) → ∀ p ∈ Z, U p = 0) := by + obtain ⟨U, D, hUs, hDs, hU0, hUd, hYd, hYs, hX, hz, _⟩ := + solve_full_smooth_family_on_formula O hO v S Y C X₀ hY hC hX₀ hYC hdet hPY hPC hPX V hVmem hV q hq hqpos hcircle h j e hhs hjs hes hmh hmj hme + exact ⟨U, D, hUs, hDs, hU0, hUd, hYd, hYs, hX, hz⟩ + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..71e80c0362b84529ccb36757886ae232a6149fd3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicCorrector.lean @@ -0,0 +1,255 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIntegratedCovariance +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCorrector +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrectorFormula + +namespace OAI + +/-! The explicit angular corrector over its open domain of admissibility. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCorrector +open CovarianceCorrector LocalPeriodicCalculus + +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 contDiffOn_spanSolve {O : Set A} {Y C : A → E} {a : A → ℝ × ℝ} + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) + (ha : ContDiffOn ℝ ∞ a O) (hD : ∀ p ∈ O, gramDet (Y p) (C p) ≠ 0) : + ContDiffOn ℝ ∞ (fun p => spanSolve (Y p) (C p) (a p)) O := by + have hd : ContDiffOn ℝ ∞ (fun p => gramDet (Y p) (C p)) O := + ((hY.inner ℝ hY).mul (hC.inner ℝ hC)).sub ((hY.inner ℝ hC).pow 2) + change ContDiffOn ℝ ∞ (fun p => + ((inner ℝ (C p) (C p) * (a p).1 - inner ℝ (Y p) (C p) * (a p).2) / + gramDet (Y p) (C p)) • Y p + + ((inner ℝ (Y p) (Y p) * (a p).2 - inner ℝ (Y p) (C p) * (a p).1) / + gramDet (Y p) (C p)) • C p) O + exact ((((hC.inner ℝ hC).mul ha.fst).sub ((hY.inner ℝ hC).mul ha.snd)).div hd hD).smul hY |>.add + (((((hY.inner ℝ hY).mul ha.snd).sub ((hY.inner ℝ hC).mul ha.fst)).div hd hD).smul hC) + +/-- A smooth family of solutions of the angular equations, with zero mean. +The varying subspace is used only for orthogonality and membership; the +actual covariance solve takes place in the fixed ambient Euclidean space. -/ +theorem solve_smooth_family_on_formula (O : Set A) (hO : IsOpen O) (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) (hX₀ : ContDiffOn ℝ ∞ X₀ O) + (hdet : ∀ p ∈ O, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p ∈ O, ∀ t, V p t ∈ S p) + (hV : ContDiffOn ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (q : A → ℝ) (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (h K e : A → C(Period, ℝ)) + (hhs : ContDiffOn ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hKs : ContDiffOn ℝ ∞ (fun z : A × ℝ => K z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hes : ContDiffOn ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hmh : ∀ p ∈ O, average (h p) = 0) (hmK : ∀ p ∈ O, average (K p) = 0) + (hme : ∀ p ∈ O, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiffOn ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + ContDiffOn ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + (∀ p ∈ O, average (U p) = 0) ∧ + (∀ p ∈ O, ∀ (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) (D p (t : Period)) t) ∧ + (∀ p ∈ O, ∀ t, inner ℝ (C p) (U p t) = K p t ∧ inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p ∈ O, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ p ∈ O, ∀ (t : ℝ), inner ℝ (Y p) (U p (t : Period)) = + PeriodicPrimitive.primitive (fun s : ℝ => h p (s : Period)) t) ∧ + (∀ p ∈ O, h p = 0 → K p = 0 → e p = 0 → U p = 0) ∧ + (∀ p ∈ O, ∀ t : ℝ, U p (t : Period) = + JetPolynomial.angularCorrectionFunction (Y p) (C p) (X₀ p) (V p) (q p) + (fun s => h p (s : Period)) (fun s => K p (s : Period)) + (fun s => e p (s : Period)) t) := by + let H : A → C(Period, ℝ) := primitiveOn h O hO hhs hmh + let K' : A → C(Period, ℝ) := angleOn K O hO hKs + have hHs : ContDiffOn ℝ ∞ (fun z : A × ℝ => H z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + primitiveOn_smooth h O hO hhs hmh + have hK's : ContDiffOn ℝ ∞ (fun z : A × ℝ => K' z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + angleOn_smooth K O hO hKs + let T : A → C(Period, E) := fun p => + ⟨fun t => spanSolve (Y p) (C p) (H p t, K p t), + (spanSolve (Y p) (C p)).continuous.comp ((H p).continuous.prodMk (K p).continuous)⟩ + let T' : A → C(Period, E) := fun p => + ⟨fun t => spanSolve (Y p) (C p) (h p t, K' p t), + (spanSolve (Y p) (C p)).continuous.comp ((h p).continuous.prodMk (K' p).continuous)⟩ + have hTs : ContDiffOn ℝ ∞ (fun z : A × ℝ => T z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + contDiffOn_spanSolve (hY.comp contDiffOn_fst (fun _ hz => hz.1)) + (hC.comp contDiffOn_fst (fun _ hz => hz.1)) + (hHs.prodMk hKs) (fun z hz => hdet z.1 hz.1) + have hT's : ContDiffOn ℝ ∞ (fun z : A × ℝ => T' z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + contDiffOn_spanSolve (hY.comp contDiffOn_fst (fun _ hz => hz.1)) + (hC.comp contDiffOn_fst (fun _ hz => hz.1)) + (hhs.prodMk hK's) (fun z hz => hdet z.1 hz.1) + have hTd (p : A) (hp : p ∈ O) (t : ℝ) : HasDerivAt (fun s : ℝ => T p (s : Period)) (T' p (t : Period)) t := + (spanSolve (Y p) (C p)).hasFDerivAt.comp_hasDerivAt t + ((primitiveOn_hasDerivAt h O hO hhs hmh hp t).prodMk (angleOn_hasDerivAt K O hO hKs hp t)) + let X : A → C(Period, E) := fun p => ContinuousMap.const Period (X₀ p) + V p + have hXs : ContDiffOn ℝ ∞ (fun z : A × ℝ => X z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + (hX₀.comp contDiffOn_fst (fun _ hz => hz.1)).add hV + let a : A → C(Period, ℝ) := fun p => + ⟨fun t => inner ℝ (X p t) (T' p t), (X p).continuous.inner (T' p).continuous⟩ + have has : ContDiffOn ℝ ∞ (fun z : A × ℝ => a z.1 (z.2 : Period)) (O ×ˢ Set.univ) := hXs.inner ℝ hT's + let r : A → C(Period, ℝ) := fun p => e p - (a p - ContinuousMap.const Period (average (a p))) + have hrs : ContDiffOn ℝ ∞ (fun z : A × ℝ => r z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + hes.sub (has.sub ((contDiffOn_average_joint hO has).comp contDiffOn_fst (fun _ hz => hz.1))) + have hr0 (p : A) (hp : p ∈ O) : average (r p) = 0 := by + change average (fun t => e p t - fluctuation (a p) t) = 0 + rw [average_sub (f := e p) (g := fluctuation (a p)) (e p).continuous + ((a p).continuous.sub continuous_const), hme p hp, average_fluctuation (a p).continuous, sub_self] + let W : A → C(Period, E) := correctorFamily V r q + have hWs : ContDiffOn ℝ ∞ (fun z : A × ℝ => W z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + contDiffOn_parameterCorrector_joint hO hV hrs hq hqpos hcircle + have hW0 (p : A) (hp : p ∈ O) : average (W p) = 0 := parameterCorrector_average_at p (hqpos p hp) (hcircle p hp) + let Z : A → C(Period, E) := primitiveOn W O hO hWs hW0 + have hZs : ContDiffOn ℝ ∞ (fun z : A × ℝ => Z z.1 (z.2 : Period)) (O ×ˢ Set.univ) := + primitiveOn_smooth W O hO hWs hW0 + have hWmem (p : A) (hp : p ∈ O) (t : Period) : W p t ∈ S p := + parameterCorrector_mem_submodule_at (S p) V r q p (hVmem p hp) (hqpos p hp) (hcircle p hp) t + have hZmem (p : A) (hp : p ∈ O) (t : Period) : Z p t ∈ S p := by + refine Quotient.inductionOn' t ?_ + intro x + rw [primitiveOn_apply W O hO hWs hW0 hp] + exact PeriodicPrimitive.primitive_mem_submodule (S p) + ((W p).continuous.comp (AddCircle.continuous_mk' 1)) (fun s => hWmem p hp (s : Period)) x + let U : A → C(Period, E) := fun p => T p + Z p + let D : A → C(Period, E) := fun p => T' p + W p + have hU0 (p : A) (hp : p ∈ O) : average (U p) = 0 := by + change average (fun t => T p t + Z p t) = 0 + rw [average_add (f := T p) (g := Z p) (T p).continuous (Z p).continuous] + have ht0 := average_spanSolve (Y p) (C p) (H p).continuous (K p).continuous + (primitiveOn_mean_zero h O hO hhs hmh hp) (hmK p hp) + change average (T p) = 0 at ht0 + rw [ht0, zero_add] + exact primitiveOn_mean_zero W O hO hWs hW0 hp + refine ⟨U, D, hTs.add hZs, hT's.add hWs, hU0, ?_, ?_, ?_, ?_, ?_, ?_⟩ + · intro p hp t + exact (hTd p hp t).add (primitiveOn_hasDerivAt W O hO hWs hW0 hp t) + · intro p hp t + have hy := hPY p hp (W p t) (hWmem p hp t) + have hc := hPC p hp (Z p t) (hZmem p hp t) + change inner ℝ (C p) (T p t + Z p t) = _ ∧ inner ℝ (Y p) (T' p t + W p t) = _ + rw [inner_add_right, hc, add_zero, inner_add_right, hy, add_zero] + exact ⟨(spanSolve_pairings (Y p) (C p) (hdet p hp) _).2, + (spanSolve_pairings (Y p) (C p) (hdet p hp) _).1⟩ + · intro p hp + have hs := parameterCorrector_projection_at p (hr0 p hp) (hqpos p hp) (hcircle p hp) + have heq : (fun t => inner ℝ (X₀ p + V p t) (D p t)) = + (fun t => a p t + inner ℝ (V p t) (W p t)) := by + funext t + change inner ℝ (X₀ p + V p t) (T' p t + W p t) = + inner ℝ (X₀ p + V p t) (T' p t) + inner ℝ (V p t) (W p t) + simp only [inner_add_right, inner_add_left, hPX p hp _ (hWmem p hp t), zero_add] + rw [heq] + change (fun t => a p t + inner ℝ (V p t) (W p t) - + average (fun s => a p s + inner ℝ (V p s) (W p s))) = e p + rw [average_add (a p).continuous ((V p).continuous.inner (W p).continuous)] + funext t + have ht := congrFun hs t + change inner ℝ (V p t) (W p t) - average (fun s => inner ℝ (V p s) (W p s)) = + e p t - (a p t - average (a p)) at ht + linarith + · intro p hp t + change inner ℝ (Y p) (T p (t : Period) + Z p (t : Period)) = _ + rw [inner_add_right, hPY p hp _ (hZmem p hp (t : Period)), add_zero] + exact (spanSolve_pairings (Y p) (C p) (hdet p hp) (H p (t : Period), K p (t : Period))).1.trans + (primitiveOn_apply h O hO hhs hmh hp t) + · intro p hp hh hK he + have hHp : H p = 0 := primitiveOn_zero_at h O hO hhs hmh hp hh + have hK'p : K' p = 0 := angleOn_zero_at K O hO hKs hp hK + have hTp : T p = 0 := by + ext t + change spanSolve (Y p) (C p) (H p t, K p t) = 0 + rw [hHp, hK] + exact (spanSolve (Y p) (C p)).map_zero + have hT'p : T' p = 0 := by + ext t + change spanSolve (Y p) (C p) (h p t, K' p t) = 0 + rw [hh, hK'p] + exact (spanSolve (Y p) (C p)).map_zero + have hap : a p = 0 := by + ext t + change inner ℝ (X p t) (T' p t) = 0 + rw [hT'p] + exact inner_zero_right _ + have hrp : r p = 0 := by + ext t + change e p t - (a p t - average (a p)) = 0 + rw [he, hap] + change (0 : ℝ) - (0 - average (fun _ => (0 : ℝ))) = 0 + rw [average_const, sub_self, sub_self] + have hWp : W p = 0 := by + ext t + exact parameterCorrector_zero (fun s => congrArg (fun f : C(Period, ℝ) => f s) hrp) t + have hZp : Z p = 0 := primitiveOn_zero_at W O hO hWs hW0 hp hWp + change T p + Z p = 0 + rw [hTp, hZp, add_zero] + + · intro p hp t + have hk (s : ℝ) : K' p (s : Period) = deriv (fun u : ℝ => K p (u : Period)) s := + (angleOn_hasDerivAt K O hO hKs hp s).deriv.symm + have hr (s : ℝ) : r p (s : Period) = + JetPolynomial.angularSourceFunction (Y p) (C p) (X₀ p) (V p) + (fun u => h p (u : Period)) (fun u => K p (u : Period)) + (fun u => e p (u : Period)) s := by + have havg : average (a p) = ∫ u in 0..1, a p (u : Period) := + (PeriodicPrimitive.integral_lift_eq_haar (a p)).symm + change e p (s : Period) - (a p (s : Period) - average (a p)) = _ + rw [havg] + change e p (s : Period) - + (inner ℝ (X₀ p + V p (s : Period)) + (spanSolve (Y p) (C p) (h p (s : Period), K' p (s : Period))) - + ∫ u in 0..1, inner ℝ (X₀ p + V p (u : Period)) + (spanSolve (Y p) (C p) (h p (u : Period), K' p (u : Period)))) = _ + simp only [JetPolynomial.angularSourceFunction, hk] + change T p (t : Period) + Z p (t : Period) = _ + rw [primitiveOn_apply W O hO hWs hW0 hp] + change spanSolve (Y p) (C p) (H p (t : Period), K p (t : Period)) + _ = _ + rw [primitiveOn_apply h O hO hhs hmh hp] + unfold JetPolynomial.angularCorrectionFunction + congr 1 + congr 1 + funext s + change parameterCorrector V r q p (s : Period) = _ + rw [← realCorrector_eq_parameterCorrector V q r p s] + congr 1 + exact funext hr + +theorem solve_smooth_family_on (O : Set A) (hO : IsOpen O) (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiffOn ℝ ∞ Y O) (hC : ContDiffOn ℝ ∞ C O) (hX₀ : ContDiffOn ℝ ∞ X₀ O) + (hdet : ∀ p ∈ O, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p ∈ O, ∀ w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p ∈ O, ∀ t, V p t ∈ S p) + (hV : ContDiffOn ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (q : A → ℝ) (hq : ContDiffOn ℝ ∞ q O) (hqpos : ∀ p ∈ O, 0 < q p) + (hcircle : ∀ p ∈ O, ∀ t, inner ℝ (V p t) (V p t) = q p) + (h K e : A → C(Period, ℝ)) + (hhs : ContDiffOn ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hKs : ContDiffOn ℝ ∞ (fun z : A × ℝ => K z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hes : ContDiffOn ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hmh : ∀ p ∈ O, average (h p) = 0) (hmK : ∀ p ∈ O, average (K p) = 0) + (hme : ∀ p ∈ O, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiffOn ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + ContDiffOn ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) (O ×ˢ Set.univ) ∧ + (∀ p ∈ O, average (U p) = 0) ∧ + (∀ p ∈ O, ∀ (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) (D p (t : Period)) t) ∧ + (∀ p ∈ O, ∀ t, inner ℝ (C p) (U p t) = K p t ∧ inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p ∈ O, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ p ∈ O, ∀ (t : ℝ), inner ℝ (Y p) (U p (t : Period)) = + PeriodicPrimitive.primitive (fun s : ℝ => h p (s : Period)) t) ∧ + (∀ p ∈ O, h p = 0 → K p = 0 → e p = 0 → U p = 0) := by + obtain ⟨U, D, hUs, hDs, hU0, hUd, hp, hf, hH, hz, _⟩ := + solve_smooth_family_on_formula O hO S Y C X₀ hY hC hX₀ hdet hPY hPC hPX V hVmem hV q hq hqpos hcircle h K e hhs hKs hes hmh hmK hme + exact ⟨U, D, hUs, hDs, hU0, hUd, hp, hf, hH, hz⟩ + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicPolynomialExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicPolynomialExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..9dbb2cedb30d1b127861847bad1a683c5d9d50c7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPeriodicPolynomialExpansion.lean @@ -0,0 +1,130 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicTriangularRecursion +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMetricPolynomial +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteSeriesAlgebra + +namespace OAI + +/-! Metric polynomial coefficients of the finite periodic derivative ansatz. -/ + +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} + +namespace Geometry + +variable {dy : A} (g : Geometry (E := E) O dy) + +def xTangent (dx : A) (U : ℕ → Family O E) (L i : ℕ) : Family O E := + if i = 0 then g.longitudinal else + if i = L then (U (i - 1)).slow dx else xCoefficient dx U i + +def yTangent (U : ℕ → Family O E) (i : ℕ) : Family O E := + if i = 0 then g.transverse else yCoefficient dy U i + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma xTangent_zero (dx : A) (U : ℕ → Family O E) (L : ℕ) : + g.xTangent dx U L 0 = g.longitudinal := by simp [xTangent] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma yTangent_zero (U : ℕ → Family O E) : g.yTangent U 0 = g.transverse := by + simp [yTangent] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xTangent_interior (dx : A) (U : ℕ → Family O E) {L i : ℕ} + (hi : 0 < i) (hL : i < L) : g.xTangent dx U L i = xCoefficient dx U i := by + simp only [xTangent, ne_of_gt hi, ne_of_lt hL, ite_false] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yTangent_pos (U : ℕ → Family O E) {i : ℕ} (hi : 0 < i) : + g.yTangent U i = yCoefficient dy U i := by + simp only [yTangent, ne_of_gt hi, ite_false] + +def xxPolynomial (dx : A) (U : ℕ → Family O E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.xTangent dx U L i).val p t) + (fun i => (g.xTangent dx U L i).val p t) + +def xyPolynomial (dx : A) (U : ℕ → Family O E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.xTangent dx U L i).val p t) + (fun i => (g.yTangent U i).val p t) + +def yyPolynomial (U : ℕ → Family O E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.yTangent U i).val p t) + (fun i => (g.yTangent U i).val p t) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxPolynomial_coeff (dx : A) (U : ℕ → Family O E) {L r : ℕ} + (hr : 0 < r) (hL : r < L) (p : A) (t : Period) : + (g.xxPolynomial dx U L p t).coeff r = (g.xxCoefficient dx U r).val p t := by + unfold xxPolynomial + rw [metricPolynomial_coeff_pos (Nat.le_of_lt hL) hr, + g.xTangent_zero, g.xTangent_interior dx U hr hL] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.xTangent dx U L i).val p t) ((g.xTangent dx U L (r - i)).val p t)) = + (xxQuadratic dx U r).val p t := by + simp only [xxQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) (by omega), + g.xTangent_interior dx U (by omega) (by omega)] + rw [hs] + simp only [xxCoefficient, Family.add_apply, Family.smul_apply, Family.inner_apply, smul_eq_mul] + rw [real_inner_comm ((xCoefficient dx U r).val p t) (g.longitudinal.val p t)] + ring + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyPolynomial_coeff (dx : A) (U : ℕ → Family O E) {L r : ℕ} + (hr : 0 < r) (hL : r < L) (p : A) (t : Period) : + (g.xyPolynomial dx U L p t).coeff r = (g.xyCoefficient dx U r).val p t := by + unfold xyPolynomial + rw [metricPolynomial_coeff_pos (Nat.le_of_lt hL) hr, + g.xTangent_zero, g.xTangent_interior dx U hr hL, g.yTangent_zero, g.yTangent_pos U hr] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.xTangent dx U L i).val p t) ((g.yTangent U (r - i)).val p t)) = + (xyQuadratic dx dy U r).val p t := by + simp only [xyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) (by omega), g.yTangent_pos U (by omega)] + rw [hs] + simp only [xyCoefficient, Family.add_apply, Family.inner_apply] + rw [real_inner_comm ((xCoefficient dx U r).val p t) (g.transverse.val p t)] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyPolynomial_coeff (U : ℕ → Family O E) {L r : ℕ} + (hr : 0 < r) (hL : r ≤ L) (p : A) (t : Period) : + (g.yyPolynomial U L p t).coeff r = (g.yyCoefficient U r).val p t := by + unfold yyPolynomial + rw [metricPolynomial_coeff_pos hL hr, g.yTangent_zero, g.yTangent_pos U hr] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.yTangent U i).val p t) ((g.yTangent U (r - i)).val p t)) = + (yyQuadratic dy U r).val p t := by + simp only [yyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.yTangent_pos U (by omega), g.yTangent_pos U (by omega)] + rw [hs] + simp only [yyCoefficient, Family.add_apply, Family.smul_apply, Family.inner_apply, smul_eq_mul] + rw [real_inner_comm ((yCoefficient dy U r).val p t) (g.transverse.val p t)] + ring + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPerturbedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPerturbedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..a05dfc23dfb98f04d4d67dfe5c2f6100ed51967c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/LocalPerturbedMean.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPerturbedMean + +namespace OAI + +/-! The actual mean only needs to reconstruct on the local correction +domain. Outside that domain the compactly supported cutoff can vanish. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +lemma charted_quadratic_mean_residual_on {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference) + {V : Set SmallModes.Base} (hV : IsOpen V) (hρ : 0 < ρ) {δ : ℝ} + (hδ : δ ≠ 0) (hτ : τ ≠ 0) (q : ℕ) {A H : SmallModes.Base → Tensor} + (hA : ContDiff ℝ ∞ A) (hH : ContDiff ℝ ∞ H) + (hdecomp : ∀ x ∈ V, chartedFamilyLeading d hρ A x = A x) {m : ℕ} {C : ℝ} + (hb : WeightedBound Set.univ s m C (A+chartedFamilyMean d hρ δ q A-H)) : + WeightedBound V s m (δ^2*C) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0-δ^2 • H) := by + have hh := (hb.restrict_open hV).const_smul hV.uniqueDiffOn + ((hA.add (chartedFamilyMean_smooth d hρ δ q A)).sub hH).contDiffOn (δ^2) + rw [abs_of_nonneg (sq_nonneg δ)] at hh + apply hh.congr + intro x hx + rw [charted_family_zero_phase_identity d hρ hδ hτ q A] + simp only [Pi.sub_apply,Pi.smul_apply,Pi.add_apply,hdecomp x hx,smul_sub] + +theorem uniform_perturbed_mean_on {V : Set SmallModes.Base} (hV : IsOpen V) {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} (p : ι → ChartedMeanProfile P) + {ρ R r r₀ : ℝ} (hρ : 0 < ρ) (hgap : r₀ < r) (q steps : ℕ) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (reference H : SmallModes.Base → Tensor), ContDiff ℝ ∞ H → + (∀ x, ‖H x - reference x‖ ≤ r₀) → + (∀ m, WeightedBound Set.univ s m (C m) H) → + ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {ε τ : ℝ} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + (∀ A, ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + ∀ x ∈ V, chartedFamilyLeading d hρ A x = A x) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ A : SmallModes.Base → Tensor, + ContDiff ℝ ∞ A ∧ InTrialBall Set.univ reference r A ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound L C β j m) A) ∧ + (∀ m, WeightedBound V s m + (δ ^ 2 * (differenceBound L C β κ j m * + (τ / s + ε / τ ^ tensorLoss P) ^ (j + 1))) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 - + δ ^ 2 • H)) := by + obtain ⟨β,κ,hm⟩ := uniform_charted_family_majorants (R := R) p hρ q + obtain ⟨η₀,hη₀,hη₁,ht⟩ := finite_substitution_uniform_inputs + (E := SmallModes.Base) (F := Tensor) (B := β) (K := κ) hgap hC steps + refine ⟨β,κ,η₀,hη₀,hη₁,?_⟩ + intro s hs hs1 reference H hH hH0 hbH G hG φ K ε τ c d hd + hτ hτs hε hε1 hsmall hdecomp δ hδ j hj + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨ha,hb,hc,he⟩ := ht Set.univ isOpen_univ.uniqueDiffOn s s.coe_nonneg + reference H hH.contDiffOn (fun x _ => hH0 x) hbH _ + (hm d hd hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) _ hη hsmall j hj + have ha' : ContDiff ℝ ∞ (fixedTrial H (chartedFamilyMean d hρ δ q) j) := + contDiffOn_univ.mp (by simpa only [trial_rescaledMean hη.ne'] using ha) + have hb' : InTrialBall Set.univ reference r (fixedTrial H (chartedFamilyMean d hρ δ q) j) := by + simpa only [trial_rescaledMean hη.ne'] using hb + refine ⟨fixedTrial H (chartedFamilyMean d hρ δ q) j,ha',hb',?_,?_⟩ + · simpa only [trial_rescaledMean hη.ne'] using hc + · intro m + apply charted_quadratic_mean_residual_on d hV hρ hδ.ne' hτ.ne' q ha' hH (hdecomp _ ha' hb') + simpa only [trial_rescaledMean hη.ne',rescaledMean_self hη.ne'] using he m + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldCorrectionLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldCorrectionLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..76b73195102becd87a29145dfdb97d06f8b8dd40 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldCorrectionLimit.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricModel +import OAI.Geometry.SurfaceImmersion.Correction.ExactCorrectionLimit + +namespace OAI + +/-! +# The correction-series limit on the surface + +The bounds are imposed on smooth coordinate representatives on a fixed +neighborhood of each point. They may depend on the chart, and are only +eventual in the correction index for each derivative order. +-/ + +noncomputable section + +namespace ClosedSurfaceR4.ExactCorrection + +open Filter Manifold +open scoped Topology ContDiff + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def manifoldPartialMap (F : M → Space) (U : ℕ → M → Space) (N : ℕ) (x : M) : Space := + F x + ∑ n ∈ Finset.range N, U n x + +def manifoldLimitMap (F : M → Space) (U : ℕ → M → Space) (x : M) : Space := + F x + ∑' n, U n x + +/-- A smooth local representative gives both smoothness and the manifold +derivative at the center of its chart. -/ +lemma local_representative_derivative {F : M → Space} {K : Plane → Space} (p : M) + (hK : ContDiff ℝ ∞ K) + (heq : F =ᶠ[𝓝 p] K ∘ extChartAt planeModel p) : + ContMDiffAt planeModel spaceModel ∞ F p ∧ + mfderiv planeModel spaceModel F p = + fderiv ℝ K (extChartAt planeModel p p) := by + have hs : ContMDiffAt planeModel spaceModel ∞ + (K ∘ extChartAt planeModel p) p := + hK.contMDiff.contMDiffAt.comp p contMDiffAt_extChartAt + refine ⟨hs.congr_of_eventuallyEq heq, ?_⟩ + have hd := heq.mfderiv_eq (I := planeModel) (I' := spaceModel) + rw [mfderiv_comp p (hK.contMDiff.mdifferentiable (by simp)).mdifferentiableAt + ((contMDiffAt_extChartAt (I := planeModel) (x := p) (n := ∞)).mdifferentiableAt + (by simp)), mfderiv_eq_fderiv, mfderiv_extChartAt_self] at hd + change (mfderiv planeModel spaceModel F p : Plane →L[ℝ] Space) = + (ContinuousLinearMap.id ℝ Space).comp + ((fderiv ℝ K (extChartAt planeModel p p)).comp + (ContinuousLinearMap.id ℝ Plane)) at hd + simpa only [ContinuousLinearMap.id_comp, ContinuousLinearMap.comp_id] using hd + +/-- Chartwise summable correction bounds give a smooth limit and convergence +of the actual manifold derivatives of its finite stages. -/ +theorem manifold_correction_limit + {F : M → Space} {U : ℕ → M → Space} + (K : M → Plane → Space) (A : M → ℕ → Plane → Space) + (ρ : M → ℕ → ℝ) + (hK : ∀ p, ContDiff ℝ ∞ (K p)) + (hA : ∀ p n, ContDiff ℝ ∞ (A p n)) + (hρ : ∀ p, Summable (ρ p)) + (hbound : ∀ p m, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (A p n) x‖ ≤ ρ p n) + (heq : ∀ p, ∀ᶠ x in 𝓝 p, + F x = K p (extChartAt planeModel p x) ∧ + ∀ n, U n x = A p n (extChartAt planeModel p x)) : + ContMDiff planeModel spaceModel ∞ (manifoldLimitMap F U) ∧ + ∀ p, Tendsto (fun N => mfderiv planeModel spaceModel + (manifoldPartialMap F U N) p) atTop + (𝓝 (mfderiv planeModel spaceModel (manifoldLimitMap F U) p)) := by + have hl (p : M) : manifoldLimitMap F U =ᶠ[𝓝 p] + limitMap (K p) (A p) ∘ extChartAt planeModel p := by + filter_upwards [heq p] with x hx + simp only [manifoldLimitMap, limitMap, Function.comp_apply, hx.1, hx.2] + have hs (p : M) := local_representative_derivative p + (smooth_limitMap (hK p) (hA p) (hρ p) (hbound p)) (hl p) + refine ⟨fun p => (hs p).1, ?_⟩ + intro p + have hf (N : ℕ) : mfderiv planeModel spaceModel + (manifoldPartialMap F U N) p = + fderiv ℝ (partialMap (K p) (A p) N) (extChartAt planeModel p p) := by + apply (local_representative_derivative p + ((hK p).add (ContDiff.sum (fun n _ => hA p n))) ?_).2 + filter_upwards [heq p] with x hx + simp only [manifoldPartialMap, Function.comp_apply, hx.1, hx.2] + simp_rw [hf, (hs p).2] + exact tendsto_fderiv_partialMap (hK p) (hA p) (hρ p) (hbound p) _ + +variable [T2Space M] [SecondCountableTopology M] [CompactSpace M] + +omit [T2Space M] [SecondCountableTopology M] [CompactSpace M] in +/-- Once the constructed finite stages have vanishing metric defect, the +chartwise correction estimates produce an isometric immersion of the surface. +The existence of such corrections is a separate construction. -/ +theorem manifold_limit_isometric + {F : M → Space} {U : ℕ → M → Space} + (K : M → Plane → Space) (A : M → ℕ → Plane → Space) + (ρ : M → ℕ → ℝ) + (hK : ∀ p, ContDiff ℝ ∞ (K p)) + (hA : ∀ p n, ContDiff ℝ ∞ (A p n)) + (hρ : ∀ p, Summable (ρ p)) + (hbound : ∀ p m, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (A p n) x‖ ≤ ρ p n) + (heq : ∀ p, ∀ᶠ x in 𝓝 p, + F x = K p (extChartAt planeModel p x) ∧ + ∀ n, U n x = A p n (extChartAt planeModel p x)) + (g : SmoothMetric M) + (hmetric : ∀ p (v w : TangentSpace planeModel p), Tendsto + (fun N => @inner ℝ Space _ + (mfderiv planeModel spaceModel (manifoldPartialMap F U N) p v : Space) + (mfderiv planeModel spaceModel (manifoldPartialMap F U N) p w : Space)) + atTop (𝓝 (g.inner p v w))) : + IsSmoothIsometricImmersion M g (manifoldLimitMap F U) := by + obtain ⟨hs, hd⟩ := manifold_correction_limit K A ρ hK hA hρ hbound heq + refine ⟨hs, ?_⟩ + intro p v w + have hd' : Tendsto (fun N => (mfderiv planeModel spaceModel + (manifoldPartialMap F U N) p : Plane →L[ℝ] Space)) atTop + (𝓝 (mfderiv planeModel spaceModel (manifoldLimitMap F U) p : Plane →L[ℝ] Space)) := hd p + have hv := ((ContinuousLinearMap.apply ℝ Space (show Plane from v)).continuous.tendsto _).comp hd' + have hw := ((ContinuousLinearMap.apply ℝ Space (show Plane from w)).continuous.tendsto _).comp hd' + exact tendsto_nhds_unique (hv.inner hw) (hmetric p v w) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldFreeIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldFreeIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e89aba3a82b524c75dd60bd36ec2dd373e7ebcc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldFreeIncrement.lean @@ -0,0 +1,145 @@ +import OAI.Geometry.Immersion.ClosedSurface.FreeCharts +import OAI.Geometry.Immersion.ClosedSurface.ChartModel + +namespace OAI + +/-! +# Local free oscillations as maps on the surface + +The finite-mode construction takes place in coordinates. These lemmas +extend its supported output by zero on the surface, preserving smoothness +and support. This is the first globalization step for the small increments. +-/ + +noncomputable section + +namespace ClosedSurfaceR4 + +open Set Manifold +open scoped ContDiff Topology +open SmallModes RealModes RootMean + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +/-- Extension by zero across a closed support lying inside the smooth chart. -/ +theorem contMDiff_indicator_of_support {V : Type*} [NormedAddCommGroup V] + [NormedSpace ℝ V] {O S : Set M} {Z : M → V} + (hO : IsOpen O) (hS : IsClosed S) (hSO : S ⊆ O) + (hZ : ContMDiffOn planeModel 𝓘(ℝ, V) ∞ Z O) + (hz : ∀ x ∈ O, x ∉ S → Z x = 0) : + ContMDiff planeModel 𝓘(ℝ, V) ∞ (O.indicator Z) ∧ + tsupport (O.indicator Z) ⊆ S := by + classical + have hs : tsupport (O.indicator Z) ⊆ S := by + apply closure_minimal _ hS + intro x hx + by_contra hxS + by_cases hxO : x ∈ O + · exact hx (by rw [indicator_of_mem hxO, hz x hxO hxS]) + · exact hx (indicator_of_notMem hxO Z) + refine ⟨contMDiff_of_tsupport (fun x hx => ?_), hs⟩ + have hxO : x ∈ O := hSO (hs hx) + apply ((hZ x hxO).contMDiffAt (hO.mem_nhds hxO)).congr_of_eventuallyEq + filter_upwards [hO.mem_nhds hxO] with y hy + exact indicator_of_mem hy Z + +/-- Coordinate data for one supported free mode. The representative `model` +is a genuine smooth extension of the immersed map in these coordinates. -/ +structure ManifoldFreeChart (F : M → Space) (S : Set M) where + source : Set M + target : Set SmallModes.Base + coord : M → SmallModes.Base + model : RField 4 + open_source : IsOpen source + closed_support : IsClosed S + support_source : S ⊆ source + smooth_coord : ContMDiffOn planeModel 𝓘(ℝ, SmallModes.Base) ∞ coord source + coord_target : MapsTo coord source target + smooth_model : ContDiff ℝ ∞ model + model_domain : RealModeDomain model target + represents : EqOn (model ∘ coord) (spaceCoordinates ∘ F) source + +namespace ManifoldFreeChart + +variable {F : M → Space} {S : Set M} + +/-- The oscillatory increment, written directly as an ambient four-space map. -/ +def increment (c : ManifoldFreeChart F S) (ψ u : SmallModes.Base → ℝ) + (δ τ : ℝ) (q : ℕ) : M → Space := + c.source.indicator (fun x => spaceCoordinates.symm + (realOsc τ (modeApprox τ (fun y => complexify (c.model y)) + (freeSeed δ τ (phaseAmplitude ψ u) c.model) (fun _ => 0) q) (c.coord x))) + +/-- The local finite free mode extends smoothly by zero on the manifold. +No regularity of its values outside the coordinate source is required. -/ +theorem increment_smooth_support (c : ManifoldFreeChart F S) + {ψ u : SmallModes.Base → ℝ} + (hb : ContDiffOn ℝ ∞ (phaseAmplitude ψ u) c.target) + (hsp : ∀ x ∈ c.source, c.coord x ∈ tsupport ψ → x ∈ S) + (δ τ : ℝ) (q : ℕ) : + ContMDiff planeModel spaceModel ∞ (c.increment ψ u δ τ q) ∧ + tsupport (c.increment ψ u δ τ q) ⊆ S := by + have hv := freeSeed_isFree c.smooth_model c.model_domain δ τ hb + have hz := contDiffOn_modeApprox τ (c.model_domain.complexDomain c.smooth_model) + hv.smooth (f := fun _ => 0) contDiffOn_const q + have hr := contDiffOn_realOsc hz τ + have hloc := spaceCoordinates.symm.contDiff.contMDiff.comp_contMDiffOn + (hr.contMDiffOn.comp c.smooth_coord c.coord_target) + apply contMDiff_indicator_of_support c.open_source c.closed_support c.support_source hloc + intro x hx hxS + have hxψ : c.coord x ∉ tsupport ψ := fun hp => hxS (hsp x hx hp) + have hm : modeApprox τ (fun y => complexify (c.model y)) + (freeSeed δ τ (phaseAmplitude ψ u) c.model) (fun _ => 0) q (c.coord x) = 0 := by + simpa only [chartFreeAmplitude, Function.comp_apply, id_eq] using + chartFree_vanishes (U := Set.univ) (S := tsupport ψ) (χ := id) + (fun _ _ hp => hp) δ τ c.model u q (c.coord x) (Set.mem_univ _) hxψ + change spaceCoordinates.symm (realOsc τ (modeApprox τ + (fun y => complexify (c.model y)) + (freeSeed δ τ (phaseAmplitude ψ u) c.model) (fun _ => 0) q) (c.coord x)) = 0 + simp only [realOsc, oscillate, hm, smul_zero] + have hzreal : QuadraticMean.realPart (0 : Fin 4 → ℂ) = 0 := by ext i; rfl + rw [hzreal, map_zero] + +/-- On the source chart the global increment is the original finite mode. -/ +theorem increment_eq_on_source (c : ManifoldFreeChart F S) + (ψ u : SmallModes.Base → ℝ) (δ τ : ℝ) (q : ℕ) + {x : M} (hx : x ∈ c.source) : + spaceCoordinates (c.increment ψ u δ τ q x) = + realOsc τ (modeApprox τ (fun y => complexify (c.model y)) + (freeSeed δ τ (phaseAmplitude ψ u) c.model) (fun _ => 0) q) (c.coord x) := by + rw [increment, indicator_of_mem hx, spaceCoordinates.apply_symm_apply] + +theorem increment_hasCompactSupport (c : ManifoldFreeChart F S) + (hS : IsCompact S) {ψ u : SmallModes.Base → ℝ} + (hb : ContDiffOn ℝ ∞ (phaseAmplitude ψ u) c.target) + (hsp : ∀ x ∈ c.source, c.coord x ∈ tsupport ψ → x ∈ S) + (δ τ : ℝ) (q : ℕ) : HasCompactSupport (c.increment ψ u δ τ q) := + hS.of_isClosed_subset isClosed_closure (c.increment_smooth_support hb hsp δ τ q).2 + +end ManifoldFreeChart + +/-- Finitely many coordinate free modes give one smooth ambient correction, +supported in the union of their prescribed supports. -/ +theorem finite_free_increment_smooth_support {ι : Type*} [Fintype ι] + {F : M → Space} {S : ι → Set M} (c : ∀ i, ManifoldFreeChart F (S i)) + (ψ u : ι → SmallModes.Base → ℝ) + (hb : ∀ i, ContDiffOn ℝ ∞ (phaseAmplitude (ψ i) (u i)) (c i).target) + (hsp : ∀ i x, x ∈ (c i).source → (c i).coord x ∈ tsupport (ψ i) → x ∈ S i) + (δ τ : ℝ) (q : ℕ) : + ContMDiff planeModel spaceModel ∞ (fun x => ∑ i, (c i).increment (ψ i) (u i) δ τ q x) ∧ + tsupport (fun x => ∑ i, (c i).increment (ψ i) (u i) δ τ q x) ⊆ ⋃ i, S i := by + classical + have hloc (i) := (c i).increment_smooth_support (hb i) (hsp i) δ τ q + refine ⟨ContMDiff.sum (fun i _ => (hloc i).1), ?_⟩ + apply closure_minimal _ (isClosed_iUnion_of_finite (fun i => (c i).closed_support)) + intro x hx + by_contra hnot + have hz (i : ι) : (c i).increment (ψ i) (u i) δ τ q x = 0 := + image_eq_zero_of_notMem_tsupport (fun h => hnot (mem_iUnion.mpr ⟨i, (hloc i).2 h⟩)) + exact hx (by simp only [hz, Finset.sum_const_zero]) + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..d082e9eed99d51b5cb2c8d334ebfcb38f16a538c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothing.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingLocalization +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldFreeIncrement + +namespace OAI + +/-! Actual smoothing maps on a closed surface, assembled from a fixed atlas. -/ +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] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def restore (p : M) (χ : M → ℝ) (h : Base → V) : M → V := + (chart p).source.indicator (fun x => χ x • h (chart p x)) + +lemma restore_smooth (p : M) {χ : M → ℝ} + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + (hs : tsupport χ ⊆ (chart p).source) {h : Base → V} (hh : ContDiff ℝ ∞ h) : + ContMDiff planeModel 𝓘(ℝ, V) ∞ (restore p χ h) := by + apply (contMDiff_indicator_of_support (chart p).open_source + (isClosed_tsupport χ) hs + (hχ.contMDiffOn.smul (hh.contMDiff.comp_contMDiffOn (chart_smooth p))) ?_).1 + intro x _ hx + change χ x • h (chart p x) = 0 + rw [image_eq_zero_of_notMem_tsupport hx, zero_smul] + +omit [IsManifold planeModel ∞ M] in +lemma restore_sub (p : M) (χ : M → ℝ) (h k : Base → V) : + restore p χ (h - k) = restore p χ h - restore p χ k := by + funext x + by_cases hx : x ∈ (chart p).source <;> + simp [restore, hx, smul_sub] + +namespace SmoothingAtlas + +variable (A : SmoothingAtlas M) + +/-- The actual global operator; no choice in its definition depends on `f`. -/ +def smooth (r : ℕ) (s : ℝ) (f : M → V) : M → V := + ∑ i : A.centers, restore (i : M) (A.outer i) (finiteSmooth r s (localize (i : M) (A.weight i) f)) + +/-- The corresponding global error, written entirely in coordinate residuals. -/ +def error (r : ℕ) (s : ℝ) (f : M → V) : M → V := + ∑ i : A.centers, restore (i : M) (A.outer i) (residual s r (localize (i : M) (A.weight i) f)) + +variable [CompactSpace M] + +lemma smooth_smooth (r : ℕ) {s : ℝ} (hs : 0 < s) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) ∞ f) : + ContMDiff planeModel 𝓘(ℝ, V) ∞ (A.smooth r s f) := by + have heq : A.smooth r s f = fun x => ∑ i : A.centers, + restore (i : M) (A.outer i) (finiteSmooth r s (localize (i : M) (A.weight i) f)) x := by + funext x + simp only [smooth, Finset.sum_apply] + rw [heq] + apply ContMDiff.sum + intro i _ + exact restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (finiteSmooth_smooth r hs (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf)) + +omit [CompactSpace M] in +lemma restore_localize (i : A.centers) (f : M → V) (x : M) : + restore (i : M) (A.outer i) (localize (i : M) (A.weight i) f) x = + (A.weight i x) ^ 2 • f x := by + by_cases hx : x ∈ (chart (i : M)).source + · rw [restore, indicator_of_mem hx, localize_chart _ _ _ hx] + by_cases hzero : A.weight i x = 0 + · simp only [hzero, zero_pow (by decide : 2 ≠ 0), zero_smul, smul_zero] + · rw [A.outer_one i x (subset_tsupport _ hzero), one_smul] + · have hz : A.weight i x = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hx (A.weight_support i h)) + simp only [restore, indicator_of_notMem hx, hz, zero_pow (by decide : 2 ≠ 0), zero_smul] + +omit [CompactSpace M] in +lemma sum_restore_localize (f : M → V) : + (∑ i : A.centers, restore (i : M) (A.outer i) (localize (i : M) (A.weight i) f)) = f := by + funext x + simp only [Finset.sum_apply, A.restore_localize] + rw [← Finset.sum_smul, A.partition, one_smul] + +omit [CompactSpace M] in +/-- Global smoothing error is exactly the sum of the localized residuals. +This identity is the link for transporting the coordinate tail estimates. -/ +lemma sub_smooth_eq_error (r : ℕ) (s : ℝ) (f : M → V) : + f - A.smooth r s f = A.error r s f := by + conv_lhs => lhs; rw [← A.sum_restore_localize f] + unfold smooth error + rw [← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro i _ + rw [← restore_sub, error_finiteSmooth] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothingLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothingLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..11c04c42a5b0272f11f36985dce2f96a5f386523 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ManifoldSmoothingLinearity.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothing + +namespace OAI + +/-! The global smoothing construction is linear on smooth maps. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma localize_add (p : M) (ψ : M → ℝ) (f g : M → V) : + localize p ψ (f + g) = localize p ψ f + localize p ψ g := by + funext x + by_cases hx : x ∈ (chart p).target <;> simp [localize, hx, smul_add] + +lemma localize_smul (p : M) (ψ : M → ℝ) (a : ℝ) (f : M → V) : + localize p ψ (a • f) = a • localize p ψ f := by + funext x + by_cases hx : x ∈ (chart p).target <;> simp [localize, hx, smul_smul, mul_comm] + +lemma restore_add (p : M) (χ : M → ℝ) (f g : Base → V) : + restore p χ (f + g) = restore p χ f + restore p χ g := by + funext x + by_cases hx : x ∈ (chart p).source <;> simp [restore, hx, smul_add] + +lemma restore_smul (p : M) (χ : M → ℝ) (a : ℝ) (f : Base → V) : + restore p χ (a • f) = a • restore p χ f := by + funext x + by_cases hx : x ∈ (chart p).source <;> simp [restore, hx, smul_smul, mul_comm] + +variable [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma smooth_smul (r : ℕ) (s a : ℝ) (f : M → V) : + A.smooth r s (a • f) = a • A.smooth r s f := by + unfold smooth + simp_rw [localize_smul, finiteSmooth_smul, restore_smul] + rw [Finset.smul_sum] + +variable [CompactSpace M] + +lemma smooth_add (r : ℕ) {s : ℝ} (hs : 0 < s) {f g : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) ∞ f) (hg : ContMDiff planeModel 𝓘(ℝ, V) ∞ g) : + A.smooth r s (f + g) = A.smooth r s f + A.smooth r s g := by + unfold smooth + simp_rw [localize_add] + have heq (i : A.centers) := finiteSmooth_add r hs + (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) hg) + simp_rw [heq, restore_add] + rw [Finset.sum_add_distrib] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricGoodSmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricGoodSmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..dac2bf485c3b2542d86be87ed6b20226e38886e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricGoodSmoothingAtlas.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GoodSmoothingAtlas +import OAI.Geometry.SurfaceImmersion.Atlas.MetricAtlasReference + +namespace OAI + +/-! A smooth metric supplies the positive reference coefficients of an +actual subordinate good-phase smoothing atlas. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open SmallModes RealModes PhaseGeometry +open JetPolynomial.Perturbation (modeSupport) + +local instance metricGoodFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricGoodFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +local instance metricGoodDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricGoodDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricGoodSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricGoodSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +/-- The actual metric, local immersion and nonzero second fundamental +form determine an atlas with positive coefficients and good pure and +same-chart mixed directions on every compact weight support. -/ +theorem exists_metric_good_smoothingAtlas (g : SmoothMetric M) {F : M → Space} + (hF : ContMDiff planeModel spaceModel ∞ F) + (hImm : ∀ p, Function.Injective (mfderiv planeModel spaceModel F p)) + (hB : ∀ p, ∃ v w : SmallModes.Base, + realSecondForm (coordinateMap F p) v w (coordinateCenter p) ≠ 0) : + ∃ (A : SmoothingAtlas M) + (P : ∀ p, PhasePatch F (coordinateMetric g p) p), + (∀ i : A.centers, tsupport (A.weight i) ⊆ (P (i : M)).V) ∧ + (∀ i x, x ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 x] (fun _ => 1)) ∧ + ∀ (i : A.centers) (x : SmallModes.Base), + x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ∧ + (∀ j, 0 < (P (i : M)).phaseBasis.Q j (A.tensorPlaneRead i g.inner x)) ∧ + (∀ j, Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).phaseBasis.ξ j)) ∧ + (∀ j k, j ≠ k → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).phaseBasis.ξ j + (P (i : M)).phaseBasis.ξ k) ∧ + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) + ((P (i : M)).phaseBasis.ξ j - (P (i : M)).phaseBasis.ξ k)) := by + obtain ⟨A,P,hsub,houter,hgood⟩ := exists_good_smoothingAtlas hF hImm hB + (coordinateMetric g) (coordinateMetric_continuousAt_center g) + (fun p => (coordinateMetric_positive_center g p).1) + (fun p => (coordinateMetric_positive_center g p).2) + refine ⟨A,P,hsub,houter,?_⟩ + intro i x hx + obtain ⟨hi,hpos,hpure,hmixed⟩ := hgood i x hx + refine ⟨hi,?_,hpure,hmixed⟩ + intro j + rw [A.tensorPlaneRead_metric g i hx] + exact hpos j + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricPolynomialIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricPolynomialIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..62c8603bc2412690b897d58c29e7975d91802d76 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricPolynomialIncrement.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactGeometryPolynomialIncrement +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 metricPolynomialSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance metricPolynomialSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance metricPolynomialSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance metricPolynomialSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance metricPolynomialSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance metricPolynomialSmallSectionSpace (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 polynomial_small_increment (d : MetricGoodPhaseData g F) + {n : d.A.centers → ℕ} + (Pol : ∀ i : d.A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ loss : ℕ, ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → + (∀ 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 → 0 ≤ ε → ε ≤ 1 → τ/s+ε/τ^loss ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s+ε/τ^loss)^(q+1)+δ^3/τ)) + (d.A.atlasPolynomialMetric Pol ε (G+X)-d.A.atlasPolynomialMetric Pol ε G-δ^2 • H)) := by + exact d.A.compact_geometry_polynomial_increment Pol hPol 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/Correction/MetricPolynomialSlowStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricPolynomialSlowStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a1a56dc2bd6387f87ba3c6751bacf8ae91542ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MetricPolynomialSlowStep.lean @@ -0,0 +1,193 @@ +import OAI.Geometry.SurfaceImmersion.Correction.MetricPolynomialIncrement +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveUpdate +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveSlowErrorProfiles +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! One uniform step of the finite slow-map construction. The derivative +profiles and the small parameter threshold precede the nearby map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates PrimitiveRealization +local instance slowPolynomialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance slowPolynomialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance slowPolynomialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance slowPolynomialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance slowPolynomialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance slowPolynomialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- An actual primitive update improves the amplitude exponent and retains +uniform all-order profiles. The fixed loss is chosen before every scale. -/ +theorem polynomial_slow_step (data : MetricGoodPhaseData g F) + {n : data.A.centers → ℕ} + (Pol : ∀ i : data.A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ loss : ℕ, ∀ (b b' d d' a u : ℝ), 0 ≤ b → b < b' → b'*(loss : ℝ) < 1 → + 2*b' < d → d < d' → 2*d' < 3*d-b' → 0 < a → 0 < u → + ∀ (P D : ℕ → ℝ) (L : ℝ), (∀ m, 0 ≤ P m) → (∀ m, 0 ≤ D m) → 0 ≤ L → + (∀ m, data.A.ShiftedBound 2 m 1 (P m) F) → + ∃ (a' η L' : ℝ) (P' D' : ℕ → ℝ), 0 < a' ∧ 0 < η ∧ η ≤ 1 ∧ 0 ≤ L' ∧ + (∀ m, 0 ≤ P' m) ∧ (∀ m, 0 ≤ D' m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∀ G : M → Space, + ContMDiff planeModel spaceModel ∞ G → + data.A.WeightedBound 1 3 (L*z^u) (G-F) → + (∀ m, data.A.ShiftedBound 2 m (z^b) (P m) G) → + (∀ m, data.A.TensorWeightedBound (z^b) m (D m*z^a) + (data.A.normalizedPolynomialDefect Pol z (z^d) g.inner G)) → + ∃ G' : M → Space, ContMDiff planeModel spaceModel ∞ G' ∧ + data.A.WeightedBound 1 3 (L'*z^(min u (d-2*b'))) (G'-F) ∧ + (∀ m, data.A.ShiftedBound 2 m (z^b') (P' m) G') ∧ + (∀ m, data.A.TensorWeightedBound (z^b') m (D' m*z^a') + (data.A.normalizedPolynomialDefect Pol z (z^d') g.inner G')) := by + classical + obtain ⟨loss,hstep⟩ := data.polynomial_small_increment Pol hPol hF + refine ⟨loss,?_⟩ + intro b b' d d' a u hb hbb hloss hbd2 hdd hcubic ha hu P D L hP hD hL hPF + have hbd : b' < d := by linarith + let κ : ℝ := min (b'-b) (1-b'*(loss : ℝ)) + have hκ : 0 < κ := lt_min (sub_pos.mpr hbb) (sub_pos.mpr hloss) + obtain ⟨q,hq⟩ := exists_nat_gt ((2*d'-d)/κ) + have hlinear : 0 < d+κ*(q+1)-2*d' := by + have hh := (div_lt_iff₀ hκ).mp hq + nlinarith + let a' := min (d+κ*(q+1)-2*d') (3*d-b'-2*d') + have ha' : 0 < a' := lt_min hlinear (by linarith) + choose K hK hKg using fun m => data.A.exists_bundle_bound data.A.tensorTriv + data.A.tensorTriv_domain m g.contMDiff + let C : ℕ → ℝ := fun m => 1+2*K m+D m + have hC (m : ℕ) : 1 ≤ C m := by + dsimp [C] + linarith [hK m,hD m] + obtain ⟨r,hr,hprof⟩ := hstep P hP hPF q + obtain ⟨ρ,η₀,B,T,hρ,hη₀,hη₀1,hB,hT,hsolve⟩ := hprof C hC + obtain ⟨η₁,hη₁,_,h₁⟩ := ExactCorrection.positive_power_threshold L u ρ hu hρ + obtain ⟨η₂,hη₂,_,h₂⟩ := ExactCorrection.positive_power_threshold (D 0) a (r/4) ha (by positivity) + obtain ⟨η₃,hη₃,_,h₃⟩ := ExactCorrection.positive_power_threshold (K 0) (2*d'-2*d) + (r/4) (by linarith) (by positivity) + obtain ⟨η₄,hη₄,_,h₄⟩ := ExactCorrection.positive_power_threshold 2 κ η₀ hκ hη₀ + let η := min 1 (min η₁ (min η₂ (min η₃ η₄))) + have hη : 0 < η := lt_min zero_lt_one (lt_min hη₁ (lt_min hη₂ (lt_min hη₃ hη₄))) + let P' : ℕ → ℝ := fun m => P 0+P m+B (2+m) + let D' : ℕ → ℝ := fun m => T m*(2^(q+1)+1) + refine ⟨a',η,L+B 3,P',D',ha',hη,min_le_left _ _,add_nonneg hL (hB 3), + fun m => add_nonneg (add_nonneg (hP 0) (hP m)) (hB (2+m)), + fun m => mul_nonneg (hT m) (by positivity),?_⟩ + intro z hz hzη G hG hclose hmap hdefect + have hclose2 : data.A.WeightedBound 1 2 (L*z^u) (G-F) := + fun i => (hclose i).mono_order (by omega) + have hz1 : z ≤ 1 := hzη.le.trans (min_le_left _ _) + have hzη₁ : z < η₁ := hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzη₂ : z < η₂ := hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans (min_le_left _ _))) + have hzη₃ : z < η₃ := hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)))) + have hzη₄ : z < η₄ := hzη.trans_le ((min_le_right _ _).trans + ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)))) + have hs : 0 < z^b := Real.rpow_pos_of_pos hz _ + have hτ : 0 < z^b' := Real.rpow_pos_of_pos hz _ + have hδ : 0 < z^d := Real.rpow_pos_of_pos hz _ + have hδ' : 0 < z^d' := Real.rpow_pos_of_pos hz _ + have hs1 : z^b ≤ 1 := Real.rpow_le_one hz.le hz1 hb + have hτs : z^b' ≤ z^b := Real.rpow_le_rpow_of_exponent_ge hz hz1 hbb.le + have hτ1 : z^b' ≤ 1 := hτs.trans hs1 + have hδτ : z^d ≤ z^b' := Real.rpow_le_rpow_of_exponent_ge hz hz1 hbd.le + have hδδ : z^d' ≤ z^d := Real.rpow_le_rpow_of_exponent_ge hz hz1 hdd.le + have hza : z^a ≤ 1 := Real.rpow_le_one hz.le hz1 ha.le + let H := data.A.polynomialMeanTarget Pol z (z^d) (z^d') g.inner G + have hH := data.A.polynomialMeanTarget_smooth (ε := z) (δ := z^d) (δ' := z^d') hPol g.contMDiff hG + have hHs : ∀ x v w, H x v w = H x w v := by + intro x v w + change ((z^d)^2)⁻¹*(g.inner x v w-data.A.atlasPolynomialMetric Pol z G x v w- + (z^d')^2*g.inner x v w) = + ((z^d)^2)⁻¹*(g.inner x w v-data.A.atlasPolynomialMetric Pol z G x w v- + (z^d')^2*g.inner x w v) + rw [g.symm x v w,data.A.atlasPolynomialMetric_symmetric Pol z G x v w] + have hHbound (m : ℕ) : data.A.TensorWeightedBound (z^b) m (C m) H := by + have hbase : data.A.TensorWeightedBound (z^b) m (K m) g.inner := + fun i => (hKg m i).shrink_scale hs.le hs1 + have hd := data.A.polynomialMeanTarget_bound hPol hδ hδ'.le hδδ hs.le (hK m) + g.contMDiff hG hbase (hdefect m) + intro i + apply (hd i).mono_const + dsimp [C] + have hh := mul_le_of_le_one_right (hD m) hza + linarith + have hratio : (z^d')^2/(z^d)^2 = z^(2*d'-2*d) := by + rw [← Real.rpow_mul_natCast hz.le,← Real.rpow_mul_natCast hz.le,← Real.rpow_sub hz] + congr 1 + ring + have hHnear (x : JetPolynomial.Base) : + ‖data.A.tensorEncode H x-data.A.tensorEncode g.inner x‖ ≤ r/2 := by + have hnorm := (data.A.tensorEncode_bound + (data.A.normalizedPolynomialDefect_smooth (ε := z) (δ := z^d) hPol g.contMDiff hG) + hs (mul_nonneg (hD 0) (Real.rpow_nonneg hz.le _)) (hdefect 0)).norm_le (mem_univ x) + have hnormg := (data.A.tensorEncode_bound g.contMDiff zero_lt_one (hK 0) (hKg 0)).norm_le (mem_univ x) + have hh := data.A.polynomialMeanTarget_distance Pol z (z^d) (z^d') g.inner G x hnorm hnormg + rw [hratio] at hh + dsimp [H] + exact hh.trans (by + have hd := h₂ z hz hzη₂ + have hg := h₃ z hz hzη₃ + nlinarith) + let ratio := z^b'/z^b+z/(z^b')^loss + have hratio0 : 0 ≤ ratio := add_nonneg (div_nonneg hτ.le hs.le) + (div_nonneg hz.le (pow_nonneg hτ.le _)) + have hratioB : ratio ≤ 2*z^κ := slow_parameter_bound_of_exponents hz hz1 + have hratioη : ratio ≤ η₀ := hratioB.trans (h₄ z hz hzη₄).le + obtain ⟨X,hX,hXb,hXe⟩ := hsolve G hG (L*z^u) + (mul_nonneg hL (Real.rpow_nonneg hz.le _)) (h₁ z hz hzη₁) hclose2 + ⟨z^b,hs.le⟩ hs hs1 hmap H hH hHs hHnear hHbound + (z^b') (z^d) z hτ hτs hz.le hz1 hratioη hδ hδτ + have hprop := data.A.polynomial_increment_propagation hPol g.contMDiff hF hG hX + hs hτ hτs hτ1 hδ hδ' P B + (fun m => T m*(z^d*ratio^(q+1)+(z^d)^3/z^b')) hP hB hclose2 hmap hXb hXe + have hX3 := data.A.weighted_increment_unscaled hτ hτ1 + (mul_nonneg (hB 3) (mul_nonneg hδ.le hτ.le)) (hXb 3) + have hX3' : data.A.WeightedBound 1 3 (B 3*z^(d-2*b')) X := by + have heq : B 3*(z^d*z^b')/(z^b')^3 = B 3*z^(d-2*b') := by + rw [← Real.rpow_mul_natCast hz.le,← Real.rpow_add hz, mul_div_assoc,← Real.rpow_sub hz] + congr 2 + ring + simpa only [heq] using hX3 + have hclose3 := data.A.weightedBound_add (hG.sub hF) hX zero_le_one hclose hX3' + change data.A.WeightedBound 1 3 (L*z^u+B 3*z^(d-2*b')) ((G-F)+X) at hclose3 + have hadd : (G-F)+X = G+X-F := by abel + rw [hadd] at hclose3 + refine ⟨G+X,hG.add hX,?_,?_,?_⟩ + · intro i + apply (hclose3 i).mono_const + have hu' := Real.rpow_le_rpow_of_exponent_ge hz hz1 (min_le_left u (d-2*b')) + have hd' := Real.rpow_le_rpow_of_exponent_ge hz hz1 (min_le_right u (d-2*b')) + exact (add_le_add (mul_le_mul_of_nonneg_left hu' hL) + (mul_le_mul_of_nonneg_left hd' (hB 3))).trans_eq (by ring) + · intro m i j hj x + apply (hprop.2.1 m i j hj x).trans + change P 0+P m+B (2+m)*z^d/z^b' ≤ P 0+P m+B (2+m) + rw [mul_div_assoc,← Real.rpow_sub hz] + have hh := Real.rpow_le_one hz.le hz1 (sub_nonneg.mpr hbd.le) + linarith [mul_le_of_le_one_right (hB (2+m)) hh] + · intro m i + apply (hprop.2.2 m i).mono_const + exact normalized_slow_error_profile hz hz1 (hT m) hratio0 hratioB + (by simpa only [Nat.cast_add,Nat.cast_one] using + (min_le_left (d+κ*(q+1)-2*d') (3*d-b'-2*d'))) + (min_le_right _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedJetPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedJetPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..27e819bb83c95d40d784abc8b1f483a0afdfe4cc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedJetPolynomial.lean @@ -0,0 +1,111 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVariation + +namespace OAI + +/-! Polynomials in the base-map jet and three independent variation jets. +Differentiating the base map increases the scale loss by at most two. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial + +inductive MixedExpression where + | coeff (c : LowJet × ℝ → ℝ) + | atom (tag : Fin 4) (word : List (Fin 2)) (component : Fin 4) (tail : MixedExpression) + | add (left right : MixedExpression) + +namespace MixedExpression + +def eval : MixedExpression → (Fin 4 → Base → Space) → Base × ℝ → ℝ + | .coeff c, G, z => c (lowJet (G 0) z.1, z.2) + | .atom i w a e, G, z => jet (G i) w a z.1 * e.eval G z + | .add e f, G, z => e.eval G z + f.eval G z + +def loss : MixedExpression → ℕ + | .coeff _ => 0 + | .atom i w _ e => (if i = 0 then w.length - 2 else w.length) + e.loss + | .add e f => max e.loss f.loss + +def SmoothCoeffs (O : Set LowJet) : MixedExpression → Prop + | .coeff c => ContDiffOn ℝ ∞ c (O ×ˢ Set.univ) + | .atom _ _ _ e => e.SmoothCoeffs O + | .add e f => e.SmoothCoeffs O ∧ f.SmoothCoeffs O + +def ofExpression : Expression → MixedExpression + | .coeff c => .coeff c + | .atom w a e => .atom 0 w a (ofExpression e) + | .add e f => .add (ofExpression e) (ofExpression f) + +lemma ofExpression_eval (e : Expression) (G : Fin 4 → Base → Space) (z : Base × ℝ) : + (ofExpression e).eval G z = e.eval (G 0) z := by + induction e with + | coeff => rfl + | atom _ _ _ ih => simp only [ofExpression, eval, Expression.eval, ih] + | add _ _ ihe ihf => simp only [ofExpression, eval, Expression.eval, ihe, ihf] + +lemma ofExpression_loss (e : Expression) : (ofExpression e).loss = e.loss := by + induction e with + | coeff => rfl + | atom _ _ _ ih => simp only [ofExpression, loss, ↓reduceIte, Expression.loss, ih] + | add _ _ ihe ihf => simp only [ofExpression, loss, Expression.loss, ihe, ihf] + +def sumList {ι : Type*} : List ι → (ι → MixedExpression) → MixedExpression + | [], _ => .coeff (fun _ => 0) + | i :: l, f => .add (f i) (sumList l f) + +lemma loss_sumList_le {ι : Type*} (l : List ι) (f : ι → MixedExpression) (N : ℕ) + (h : ∀ i ∈ l, (f i).loss ≤ N) : (sumList l f).loss ≤ N := by + induction l with + | nil => exact Nat.zero_le _ + | 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))) + +def coefficientDerivative (c : LowJet × ℝ → ℝ) (i : Fin 7 × Fin 4) : LowJet × ℝ → ℝ := + fun z => fderiv ℝ c z (lowBasis (.inr i), 0) + +/-- Only the base-map slot is differentiated. The new direction is one of +the three variation slots, so a third variation uses no extra map slots. -/ +def differentiate (j : Fin 3) : MixedExpression → MixedExpression + | .coeff c => sumList Finset.univ.toList (fun i : Fin 7 × Fin 4 => + .atom j.succ (lowWord i.1) i.2 (.coeff (coefficientDerivative c i))) + | .atom i w a e => if i = 0 then + .add (.atom j.succ w a e) (.atom i w a (differentiate j e)) + else .atom i w a (differentiate j e) + | .add e f => .add (differentiate j e) (differentiate j f) + +theorem loss_differentiate (j : Fin 3) (e : MixedExpression) : + (e.differentiate j).loss ≤ e.loss + 2 := by + induction e with + | coeff c => + apply loss_sumList_le + intro i _ + have hl : (lowWord i.1).length ≤ 2 := by + obtain ⟨i, a⟩ := i + fin_cases i <;> simp [lowWord] + simpa only [loss, Fin.succ_ne_zero, ↓reduceIte, Nat.add_zero] using hl + | atom i w a e ih => + by_cases hi : i = 0 + · subst i + simp only [differentiate, loss, Fin.succ_ne_zero, ↓reduceIte] + omega + · simp only [differentiate, hi, ↓reduceIte, loss] + omega + | add e f ihe ihf => + simp only [differentiate, loss] + omega + +theorem loss_third_variation (e : Expression) : + ((((ofExpression e).differentiate 0).differentiate 1).differentiate 2).loss ≤ e.loss + 6 := by + have h₁ := loss_differentiate 0 (ofExpression e) + have h₂ := loss_differentiate 1 ((ofExpression e).differentiate 0) + have h₃ := loss_differentiate 2 (((ofExpression e).differentiate 0).differentiate 1) + rw [ofExpression_loss] at h₁ + omega + +end MixedExpression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPeriodicMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPeriodicMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..77c18e8e71fb73aefc7aaecb47a366f4bddd030b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPeriodicMean.lean @@ -0,0 +1,121 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.MixedPeriodicBounds + +namespace OAI + +/-! Mean and fluctuation preserve mixed weighted periodic estimates. -/ +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u +namespace ClosedSurfaceR4.SmoothPeriodicCalculus +open SmoothParameterIntegral + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma angleDerivative_sub {F G : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) : + angleDerivative (F - G) = angleDerivative F - angleDerivative G := by + funext z + unfold angleDerivative + rw [((hF.differentiable (by simp) z).hasFDerivAt.sub + (hG.differentiable (by simp) z).hasFDerivAt).fderiv] + rfl + +lemma angularIterated_sub {F G : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (n : ℕ) : angularIterated n (F - G) = angularIterated n F - angularIterated n G := by + induction n with + | zero => rfl + | succ n ih => + change angleDerivative (angularIterated n (F - G)) = _ + rw [ih, angleDerivative_sub (contDiff_angularIterated hF n) (contDiff_angularIterated hG n)] + rfl + +variable [FiniteDimensional ℝ P] [CompleteSpace E] + +def meanLift (F : P × ℝ → E) (z : P × ℝ) : E := ∫ t in (0 : ℝ)..1, F (z.1, t) + +lemma contDiff_meanLift {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (meanLift F) := (contDiff_integral hF 0 1).comp contDiff_fst + +lemma angleDerivative_meanLift {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + angleDerivative (meanLift F) = 0 := by + funext z + exact (angle_hasDerivAt (contDiff_meanLift hF) z.1 z.2).unique + (hasDerivAt_const z.2 (∫ t in (0 : ℝ)..1, F (z.1, t))) + +lemma angularIterated_meanLift_succ {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (n : ℕ) : + angularIterated (n + 1) (meanLift F) = 0 := by + induction n with + | zero => exact angleDerivative_meanLift hF + | succ n ih => + change angleDerivative (angularIterated (n + 1) (meanLift F)) = 0 + rw [ih] + funext z + simp [angleDerivative] + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +lemma partialIterated_sub {F G : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) + (n : ℕ) (z : P × ℝ) : + partialIterated n (F - G) z = partialIterated n F z - partialIterated n G z := by + exact iteratedFDeriv_sub_apply + (((hF.comp (contDiff_id.prodMk contDiff_const)).of_le + (by simp : (n : ℕ∞ω) ≤ ∞)).contDiffAt) + (((hG.comp (contDiff_id.prodMk contDiff_const)).of_le + (by simp : (n : ℕ∞ω) ≤ ∞)).contDiffAt) + +end ClosedSurfaceR4.SmoothPeriodicCalculus + +namespace ClosedSurfaceR4.WeightedEstimates +open SmoothParameterIntegral SmoothPeriodicCalculus + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Averaging does not increase the mixed weighted bound. -/ +theorem mixed_weighted_mean {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 (meanLift F)) (p, t)‖ ≤ C := by + have hm := weighted_parameter_integral hF hU hs m 0 1 + (fun j hj p hp t ht => hb j 0 (by simpa using hj) p hp t (by simpa using ht)) + simp only [sub_zero, abs_one, mul_one] at hm + intro j k hjk p hp t _ + cases k with + | zero => + have hh := hm j (by omega) p hp + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn + (((contDiff_integral hF 0 1).of_le (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) hp] at hh + exact hh + | succ k => + rw [angularIterated_meanLift_succ hF k] + simpa [partialIterated] using hC + +/-- Subtracting the mean costs at most a factor of two and no scale loss. -/ +theorem mixed_weighted_fluctuation {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 (F - meanLift F)) (p, t)‖ ≤ 2 * C := by + have hm := mixed_weighted_mean hF hU hs hC m hb + intro j k hjk p hp t ht + rw [angularIterated_sub hF (contDiff_meanLift hF), + partialIterated_sub (contDiff_angularIterated hF k) + (contDiff_angularIterated (contDiff_meanLift hF) k)] + calc + _ ≤ s ^ j * (‖partialIterated j (angularIterated k F) (p, t)‖ + + ‖partialIterated j (angularIterated k (meanLift F)) (p, t)‖) := + mul_le_mul_of_nonneg_left (norm_sub_le _ _) (pow_nonneg hs.le j) + _ ≤ C + C := by + rw [mul_add] + exact add_le_add (hb j k hjk p hp t ht) (hm j k hjk p hp t ht) + _ = 2 * C := by ring + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPolynomialLocality.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPolynomialLocality.lean new file mode 100644 index 0000000000000000000000000000000000000000..80979899bc02693c3610ae42e3260e4ade8d7a36 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/MixedPolynomialLocality.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialLocality +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion + +namespace OAI + +/-! Mixed variations only use the germs of their four input fields. -/ +noncomputable section +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.JetPolynomial + +lemma MixedExpression.eval_eq_of_eventuallyEq {F G : Fin 4 → Base → Space} {x : Base} + (h : ∀ i, F i =ᶠ[𝓝 x] G i) (e : MixedExpression) (t : ℝ) : + e.eval F (x,t) = e.eval G (x,t) := by + induction e with + | coeff c => + change c (lowJet (F 0) x,t) = c (lowJet (G 0) x,t) + rw [lowJet_eventuallyEq (h 0)] + | atom i w a e ih => + change jet (F i) w a x * e.eval F (x,t) = jet (G i) w a x * e.eval G (x,t) + rw [(jet_eventuallyEq (h i) w a).self_of_nhds,ih] + | add e f ihe ihf => + change e.eval F (x,t)+f.eval F (x,t) = e.eval G (x,t)+f.eval G (x,t) + rw [ihe,ihf] + +namespace Perturbation + +lemma coordinateQuadraticPolynomial_eq_of_eventuallyEq {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + {X Y : RealModes.RField 4} {x : Base} + (h : X ∘ planeCoordinateIsometry =ᶠ[𝓝 x] Y ∘ planeCoordinateIsometry) (t : ℝ) : + coordinateQuadraticPolynomial P ε G X t (planeCoordinateIsometry x) = + coordinateQuadraticPolynomial P ε G Y t (planeCoordinateIsometry x) := by + have hf : ∀ i : Fin 4, (![G,X ∘ planeCoordinateIsometry,X ∘ planeCoordinateIsometry,0] i) =ᶠ[𝓝 x] + (![G,Y ∘ planeCoordinateIsometry,Y ∘ planeCoordinateIsometry,0] i) := by + intro i + fin_cases i + · exact Filter.EventuallyEq.rfl + · exact h + · exact h + · exact Filter.EventuallyEq.rfl + funext k + simp only [coordinateQuadraticPolynomial,planeCoordinateIsometry.symm_apply_apply] + apply Finset.sum_congr rfl + intro l _ + rw [MixedExpression.eval_eq_of_eventuallyEq hf ((P k l).variations 1) t] + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ModulatedPolynomialJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ModulatedPolynomialJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..574fad941a8114cc7fc983946dc4fbebfe385d15 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ModulatedPolynomialJets.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedComplexMixedJets +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedModulatedJets + +namespace OAI + +/-! Actual oscillatory direction jets factor into one phase per direction +and a slow amplitude jet. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression + +namespace MixedExpression + +lemma scaleJets_base (J : JetData) (c : Fin 3 → Base → ℂ) (w : List (Fin 2)) (a : Fin 4) (p : Base) : + scaleJets J c 0 w a p = J 0 w a p := by + simp [scaleJets, scaleJetSlot] + +lemma scaleJets_succ (J : JetData) (c : Fin 3 → Base → ℂ) (j : Fin 3) + (w : List (Fin 2)) (a : Fin 4) (p : Base) : + scaleJets J c j.succ w a p = c j p * J j.succ w a p := by + fin_cases j <;> simp [scaleJets, scaleJetSlot] + +end MixedExpression +namespace ModulatedJets + +abbrev DirectionFields := Fin 3 → Base → Fin 4 → ℂ + +def amplitudeData (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (τ : ℝ) : JetData := + Fin.cases (fun w a p => (jet G w a p : ℂ)) + (fun j w a => amplitudeJet τ (φ j) (w.map coordinateVector) (fun p => H j p a)) + +def oscillatoryData (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (τ : ℝ) : JetData := + Fin.cases (fun w a p => (jet G w a p : ℂ)) + (fun j w a => iteratedDirectional (w.map coordinateVector) + (fun p => phase τ (φ j) p * H j p a)) + +lemma amplitudeData_base (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (τ : ℝ) (w : List (Fin 2)) (a : Fin 4) : + amplitudeData G φ H τ 0 w a = fun p => (jet G w a p : ℂ) := rfl + +lemma amplitudeData_succ (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (τ : ℝ) (j : Fin 3) (w : List (Fin 2)) (a : Fin 4) : + amplitudeData G φ H τ j.succ w a = + amplitudeJet τ (φ j) (w.map coordinateVector) (fun p => H j p a) := rfl + +lemma oscillatoryData_factor (G : Base → Space) {φ : Fin 3 → Base → ℝ} + {H : DirectionFields} (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (τ : ℝ) : + oscillatoryData G φ H τ = scaleJets (amplitudeData G φ H τ) (fun j => phase τ (φ j)) := by + funext i w a p + refine Fin.cases ?_ (fun j => ?_) i + · exact (scaleJets_base (amplitudeData G φ H τ) (fun j => phase τ (φ j)) w a p).symm + · rw [scaleJets_succ] + exact congrFun (iterated_phase_product (hφ j) (contDiff_pi.mp (hH j) a) + τ (w.map coordinateVector)) p + +lemma amplitudeData_smooth {G : Base → Space} {φ : Fin 3 → Base → ℝ} + {H : DirectionFields} (hG : ContDiff ℝ ∞ G) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (τ : ℝ) : + ∀ i w a, ContDiff ℝ ∞ (amplitudeData G φ H τ i w a) := by + intro i w a + refine Fin.cases ?_ (fun j => ?_) i + · exact Complex.ofRealCLM.contDiff.comp (jet_smooth hG w a) + · exact amplitudeJet_smooth (hφ j) (contDiff_pi.mp (hH j) a) τ (w.map coordinateVector) + +/-- Exact phase cancellation for each of the first three complexified +variations. The remaining factors are the modulated amplitude jets. -/ +theorem variation_phase_factor (e : Expression) (G : Base → Space) {φ : Fin 3 → Base → ℝ} + {H : DirectionFields} (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (τ : ℝ) (z : Base × ℝ) (i : Fin 3) : + (e.variations i).evalComplex G (oscillatoryData G φ H τ) z = + (phase τ (φ 0) z.1 * (if 1 ≤ i then phase τ (φ 1) z.1 else 1) * + (if 2 ≤ i then phase τ (φ 2) z.1 else 1)) * + (e.variations i).evalComplex G (amplitudeData G φ H τ) z := by + rw [oscillatoryData_factor G hφ hH τ] + have h := evalComplex_scaleJets (fun j => e.variations_degree i j) G + (amplitudeData G φ H τ) (fun j => phase τ (φ j)) z + fin_cases i <;> simpa using h + +end ModulatedJets +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedJetCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedJetCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..2598f3ca2ecda236ee2d0886ef8e97633a4ad835 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedJetCorrection.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SphericalJets +import OAI.Geometry.Immersion.ClosedSurface.MetricModel + +namespace OAI + +/-! Second jets of radial normalization, for the finite-point flattening +of the starting spherical immersion. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SphericalJets + +/-- Radial normalization is kept as an actual map of Euclidean four-space. -/ +def radialNormalize (x : Space) : Space := ‖x‖⁻¹ • x + +lemma radialNormalize_smoothAt {x : Space} (hx : x ≠ 0) : + ContDiffAt ℝ ∞ radialNormalize x := + ((contDiffAt_norm ℝ hx).inv (norm_ne_zero_iff.mpr hx)).smul contDiffAt_id + +lemma radialNormalize_fderiv_unit {x : Space} (hx : ‖x‖ = 1) (v : Space) : + fderiv ℝ radialNormalize x v = v - inner ℝ x v • x := by + have hs := (hasFDerivAt_id x).norm_sq.sqrt (by simp [hx] : ‖x‖^2 ≠ 0) + have hi := (hasDerivAt_inv (by simp [hx] : Real.sqrt (‖x‖^2) ≠ 0)).comp_hasFDerivAt x hs + have hd := hi.smul (hasFDerivAt_id x) + have he : (fun y : Space => (Real.sqrt (‖y‖^2))⁻¹ • y) = radialNormalize := by + funext y + simp [radialNormalize] + change HasFDerivAt (fun y : Space => (Real.sqrt (‖y‖^2))⁻¹ • y) _ x at hd + rw [he] at hd + rw [hd.fderiv] + simp [hx,ContinuousLinearMap.smulRight_apply,sub_eq_add_neg,neg_smul] + +lemma secondDerivative_apply {E H : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup H] [NormedSpace ℝ H] {f : E → H} {p : E} + (hf : ContDiffAt ℝ ∞ f p) (v w : E) : + fderiv ℝ (fun q => fderiv ℝ f q w) p v = fderiv ℝ (fderiv ℝ f) p v w := by + rw [fderiv_clm_apply ((hf.fderiv_right (m := ∞) (by simp)).differentiableAt (by simp)) + (differentiableAt_const w)] + simp + +lemma secondDerivative_comp {E H Z : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup H] [NormedSpace ℝ H] [NormedAddCommGroup Z] [NormedSpace ℝ Z] + {f : E → H} {g : H → Z} {U : Set H} (hf : ContDiff ℝ ∞ f) + (hU : IsOpen U) (hg : ContDiffOn ℝ ∞ g U) {p : E} (hp : f p ∈ U) (v w : E) : + fderiv ℝ (fderiv ℝ (g ∘ f)) p v w = + fderiv ℝ (fderiv ℝ g) (f p) (fderiv ℝ f p v) (fderiv ℝ f p w) + + fderiv ℝ g (f p) (fderiv ℝ (fderiv ℝ f) p v w) := by + have hgp := hg.contDiffAt (hU.mem_nhds hp) + have hDg := hgp.fderiv_right (m := ∞) (by simp) + have hD1 := (hDg.differentiableAt (by simp)).hasFDerivAt.comp p + (hf.differentiable (by simp) p).hasFDerivAt + have hD2 := (((hf.fderiv_right (m := ∞) (by simp)).clm_apply + (show ContDiff ℝ ∞ (fun _ : E => w) from contDiff_const)).differentiable (by simp) p).hasFDerivAt + have hd := hD1.clm_apply hD2 + have he : (fun q => fderiv ℝ g (f q) (fderiv ℝ f q w)) =ᶠ[𝓝 p] + (fun q => fderiv ℝ (g ∘ f) q w) := by + filter_upwards [hf.continuous.continuousAt.preimage_mem_nhds (hU.mem_nhds hp)] with q hq + rw [fderiv_comp q ((hg.contDiffAt (hU.mem_nhds hq)).differentiableAt (by simp)) + (hf.differentiable (by simp) q)] + rfl + have hev := congrArg (fun L : E →L[ℝ] Z => L v) (he.fderiv_eq.symm.trans hd.fderiv) + rw [secondDerivative_apply (hgp.comp p hf.contDiffAt)] at hev + simp only [add_apply,ContinuousLinearMap.comp_apply,ContinuousLinearMap.flip_apply, + Function.comp_apply] at hev + rw [secondDerivative_apply hf.contDiffAt] at hev + simpa only [add_comm] using hev + +/-- Maps with identical value and first derivative differ after radial +normalization by the differential of normalization applied to their +second-jet difference. -/ +theorem radialNormalize_second_jet_difference {F G : Plane → Space} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (p v w : Plane) + (hFp : ‖F p‖ = 1) (hvalue : G p = F p) + (hfirst : fderiv ℝ G p = fderiv ℝ F p) : + fderiv ℝ (fderiv ℝ (radialNormalize ∘ G)) p v w - + fderiv ℝ (fderiv ℝ (radialNormalize ∘ F)) p v w = + (fderiv ℝ (fderiv ℝ G) p v w - fderiv ℝ (fderiv ℝ F) p v w) - + inner ℝ (F p) (fderiv ℝ (fderiv ℝ G) p v w - fderiv ℝ (fderiv ℝ F) p v w) • F p := by + have hne : F p ≠ 0 := by intro hz; simp [hz] at hFp + have hU : IsOpen ({x : Space | x ≠ 0}) := isOpen_ne_fun continuous_id continuous_const + have hn : ContDiffOn ℝ ∞ radialNormalize {x : Space | x ≠ 0} := + fun x hx => (radialNormalize_smoothAt hx).contDiffWithinAt + rw [secondDerivative_comp hG hU hn (by change G p ≠ 0; rw [hvalue]; exact hne), + secondDerivative_comp hF hU hn hne,hvalue,hfirst] + have he : ∀ a b c : Space, (a+b)-(a+c) = b-c := fun a b c => by abel + rw [he,← map_sub,radialNormalize_fderiv_unit hFp] + +end ClosedSurfaceR4.SphericalJets + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedLinearModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedLinearModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..b34ba602facc83967c21a742b8ebb5e23c2266ce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedLinearModel.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisDefectJet + +namespace OAI + +/-! The actual first-order transverse model in normalized coordinates. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def normalizedAxisPolynomial (p q : ℝ) (x : Base) : Base := + ![(x 1-p)*(x 1-q),0] +def normalTransverse (G : Base → Base) (t : ℝ) : Base := + fderiv ℝ G (crosscapAxis t) (![1,0] : Base) +def normalizedLinearModel (G : Base → Base) (p q : ℝ) (x : Base) : Base := + normalizedAxisPolynomial p q x+x 0 • normalTransverse G (x 1) + +lemma normalizedAxisPolynomial_smooth (p q : ℝ) : + ContDiff ℝ ∞ (normalizedAxisPolynomial p q) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [normalizedAxisPolynomial] <;> fun_prop + +lemma normalTransverse_smooth {G : Base → Base} (hG : ContDiff ℝ ∞ G) : + ContDiff ℝ ∞ (normalTransverse G) := + ((hG.fderiv_right (m := ∞) (by simp)).comp crosscapAxis.contDiff).clm_apply contDiff_const + +lemma normalizedLinearModel_smooth {G : Base → Base} (hG : ContDiff ℝ ∞ G) (p q : ℝ) : + ContDiff ℝ ∞ (normalizedLinearModel G p q) := + (normalizedAxisPolynomial_smooth p q).add ((contDiff_apply ℝ ℝ 0).smul + ((normalTransverse_smooth hG).comp (contDiff_apply ℝ ℝ 1))) + +lemma normalizedLinearModel_axis (G : Base → Base) (p q t : ℝ) : + normalizedLinearModel G p q (crosscapAxis t) = ![(t-p)*(t-q),0] := by + simp [normalizedLinearModel,normalizedAxisPolynomial,crosscapAxis_apply] + +lemma normalizedAxisPolynomial_hasFDerivAt (p q : ℝ) (x : Base) : + HasFDerivAt (normalizedAxisPolynomial p q) + ((ContinuousLinearMap.proj 1 : Base →L[ℝ] ℝ).smulRight (![(x 1-p)+(x 1-q),0] : Base)) x := by + have h := (((hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) x).sub_const p).mul + ((hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) x).sub_const q)).smul_const + (![1,0] : Base) + convert h using 1 + · funext y + ext i + fin_cases i <;> simp [normalizedAxisPolynomial] + · ext v i + fin_cases i <;> simp + ring + +lemma normalizedLinearModel_fderiv_axis {G : Base → Base} (hG : ContDiff ℝ ∞ G) + (p q t : ℝ) : + fderiv ℝ (normalizedLinearModel G p q) (crosscapAxis t) = + (ContinuousLinearMap.proj 1).smulRight (![(t-p)+(t-q),0] : Base)+ + (ContinuousLinearMap.proj 0).smulRight (normalTransverse G t) := by + have hA := normalizedAxisPolynomial_hasFDerivAt p q (crosscapAxis t) + have ha := ((normalTransverse_smooth hG).differentiable (by simp) t).hasFDerivAt.comp + (crosscapAxis t) (hasFDerivAt_apply (𝕜 := ℝ) (1 : Fin 2) (crosscapAxis t)) + have hh := hA.add ((hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) (crosscapAxis t)).smul ha) + have he := hh.fderiv + change fderiv ℝ (normalizedLinearModel G p q) (crosscapAxis t) = _ at he + simpa [crosscapAxis_apply] using he + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPerturbedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPerturbedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..d932c5f694fdfa3a4694380588425b217a260d19 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPerturbedMean.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedNormalSeed + +namespace OAI + +/-! Normalization of the actual corrected metric mean by the seed amplitude. -/ +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 normalizedPerturbedMean (δ τ : ℝ) (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) (v w p : Base) : ℝ := + let V := supportedFreeSeed δ τ hF h K hKU b + let T := perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q + δ⁻¹ ^ 2 * seedMeanError τ T V V v w p + +lemma perturbed_seed_mean_identity (δ τ : ℝ) (hδ : δ ≠ 0) (hτ : τ ≠ 0) + (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) (v w p : Base) (hp : p ∈ U) : + let V := supportedFreeSeed δ τ hF h K hKU b + let T := perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q + QuadraticMean.zeroPair (gradientAmplitude τ (T V) v p) (gradientAmplitude τ (T V) w p) = + δ ^ 2 * (b p ^ 2 * v.1 * w.1 + normalizedPerturbedMean δ τ hF h K hKU R q b v w p) := by + dsimp only + rw [corrected_seed_mean δ hτ hF h K hKU b _ v w p hp, normalizedPerturbedMean] + field_simp [hδ] + +/-- The normalized metric mean retains one small factor for every fixed +output order, with a finite explicitly identified input order. -/ +theorem normalizedPerturbedMean_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 + 1 + (q + 1) * (L + 1)) N (freeNormal F)) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ b : SupportedField (F := ℝ) K, + supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) b ≤ A → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * C) + (normalizedPerturbedMean δ τ hF h K hKU R q b v w) := by + obtain ⟨C, hC, hm⟩ := perturbedFreeLM_mean_bound τ (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 * A * N + have hS : 0 ≤ S := by dsimp [S]; positivity + refine ⟨C * S ^ 2, mul_nonneg hC (sq_nonneg S), ?_⟩ + intro b hb v w hv hw + let V := supportedFreeSeed δ τ hF h K hKU b + have hV := supportedFreeSeed_isFree δ τ hF h K hKU b + have hn := supportedFreeSeed_bound hF h K hKU b hδ.le hτ.le hs hA hN r hb hbN + have hh := hm V V hV hV v w hv hw + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hh' := hh.mono_const (show C * supportedWeightedSeminorm K s r V * + supportedWeightedSeminorm K s r V * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * (S * (δ * τ)) * (S * (δ * τ)) * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have hsm := seedMeanError_smooth τ + (perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q) V V v w + have hscaled := hh'.const_smul isOpen_univ.uniqueDiffOn hsm.contDiffOn (δ⁻¹ ^ 2) + change WeightedBound Set.univ s m _ (normalizedPerturbedMean δ τ hF h K hKU R q b v w) at hscaled + convert hscaled 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/Correction/NormalizedPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..94f80bd341818202be78b466b26e9f66cc7e39fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPolynomialMean.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedPolynomialMeanDifference + +namespace OAI + +/-! The polynomial part of the normalized quadratic mean is O(η), with +finite-loss value and difference bounds and constants chosen before scales. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +def normalizedPolynomialMean {n : ℕ} (P : Fin n → Expression) (δ ε : ℝ) + (G : Base → Space) (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) (τ t : ℝ) : Base → ℝ := + fun p => δ⁻¹ ^ 2 * quadraticMeanCoefficient P ε G φ H τ t p + +lemma normalized_product_scale {δ τ s ε E A D : ℝ} {r p : ℕ} + (hδ : 0 < δ) (hτ : 0 < τ) (hs : 0 < s) (hτ1 : τ ≤ 1) + (hε : 0 ≤ ε) (hE : 0 ≤ E) (hA : 0 ≤ A) (hD : 0 ≤ D) (hp : r ≤ p) : + δ⁻¹ ^ 2 * (E * ε * (A * (δ * τ)) * (D * (δ * τ)) / τ ^ r) ≤ + (τ / s + ε / τ ^ p) * E * A * D := by + have hfrac : ε / τ ^ r ≤ ε / τ ^ p := + div_le_div_of_nonneg_left hε (pow_pos hτ p) (pow_le_pow_of_le_one hτ.le hτ1 hp) + have hsmall : ε * τ ^ 2 / τ ^ r ≤ τ / s + ε / τ ^ p := by + calc + _ = (ε / τ ^ r) * τ ^ 2 := by ring + _ ≤ ε / τ ^ r := mul_le_of_le_one_right (div_nonneg hε (pow_nonneg hτ.le _)) + (pow_le_one₀ hτ.le hτ1) + _ ≤ ε / τ ^ p := hfrac + _ ≤ _ := le_add_of_nonneg_left (div_nonneg hτ.le hs.le) + calc + _ = (ε * τ ^ 2 / τ ^ r) * (E * A * D) := by + field_simp [hδ.ne'] + _ ≤ (τ / s + ε / τ ^ p) * (E * A * D) := + mul_le_mul_of_nonneg_right hsmall (mul_nonneg (mul_nonneg hE hA) hD) + _ = _ := by ring + +theorem normalizedPolynomialMean_bounds {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (_hG : ContDiff ℝ ∞ G) (_hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) + (H J : SupportedField (F := Fin 4 → ℂ) K) (s : ℝ≥0) (δ τ ε A D : ℝ) (p : ℕ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → 0 ≤ A → 0 ≤ D → loss P ≤ p → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + supportedWeightedSeminorm K s (m + order P) H ≤ A * (δ * τ) → + supportedWeightedSeminorm K s (m + order P) J ≤ A * (δ * τ) → + supportedWeightedSeminorm K s (m + order P) (H - J) ≤ D * (δ * τ) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m ((τ / s + ε / τ ^ p) * E * A ^ 2) + (normalizedPolynomialMean P δ ε G φ H τ t) ∧ + WeightedBound U s m ((τ / s + ε / τ ^ p) * (2 * E) * A * D) + (fun x => normalizedPolynomialMean P δ ε G φ H τ t x - + normalizedPolynomialMean P δ ε G φ J τ t x) := by + obtain ⟨Ev, hEv, hv⟩ := supported_quadraticMeanPair_bound hU hO hQ hQO P hP m B F hB hF + obtain ⟨Ed, hEd, hd⟩ := supported_quadraticMean_difference hU hO hQ hQO P hP m B F hB hF + let E := max Ev Ed + have hE : 0 ≤ E := hEv.trans (le_max_left _ _) + refine ⟨E, hE, ?_⟩ + intro G φ hG hφ K H J s δ τ ε A D p hδ hτ hs hτs hs1 hε hε1 hA hD hp hGQ hGb hφb hH hJ hHJ t ht + have hτ1 : τ ≤ 1 := hτs.trans hs1 + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hsH := quadraticMeanCoefficient_smooth hO hP hG hφ H.contDiff + (fun _ hx => hQO (hGQ hx)) ε τ t + have hsJ := quadraticMeanCoefficient_smooth hO hP hG hφ J.contDiff + (fun _ hx => hQO (hGQ hx)) ε τ t + constructor + · have hh := hv G φ hG hφ K H H s τ ε hτ hs hτs hs1 hε hε1 hGQ hGb hφb t ht + have hb := hh.mono_const (show Ev * ε * supportedWeightedSeminorm K s _ H * + supportedWeightedSeminorm K s _ H / τ ^ loss P ≤ + Ev * ε * (A * (δ * τ)) * (A * (δ * τ)) / τ ^ loss P by gcongr) + have heq : quadraticMeanPair P ε G φ H H τ t = quadraticMeanCoefficient P ε G φ H τ t := by + funext x + exact quadraticMeanPair_self P ε G hφ H.contDiff τ t x + rw [heq] at hb + have hscaled := hb.const_smul hU.uniqueDiffOn hsH (δ⁻¹ ^ 2) + change WeightedBound U s m _ (normalizedPolynomialMean P δ ε G φ H τ t) at hscaled + rw [abs_of_nonneg (sq_nonneg δ⁻¹)] at hscaled + apply hscaled.mono_const + calc + _ ≤ (τ / s + ε / τ ^ p) * Ev * A * A := + normalized_product_scale hδ hτ hs hτ1 hε hEv hA hA hp + _ ≤ (τ / s + ε / τ ^ p) * E * A * A := by gcongr; exact le_max_left _ _ + _ = _ := by ring + · have hh := hd G φ hG hφ K H J s τ ε (A * (δ * τ)) (D * (δ * τ)) + hτ hs hτs hs1 hε hε1 (by positivity) (by positivity) hGQ hGb hφb hH hJ hHJ t ht + have hscaled := hh.const_smul hU.uniqueDiffOn (hsH.sub hsJ) (δ⁻¹ ^ 2) + have heq : (fun x => δ⁻¹ ^ 2 • (quadraticMeanCoefficient P ε G φ H τ t x - + quadraticMeanCoefficient P ε G φ J τ t x)) = + fun x => normalizedPolynomialMean P δ ε G φ H τ t x - + normalizedPolynomialMean P δ ε G φ J τ t x := by + funext x + simp only [normalizedPolynomialMean, smul_eq_mul, mul_sub] + rw [heq, abs_of_nonneg (sq_nonneg δ⁻¹)] at hscaled + apply hscaled.mono_const + calc + _ ≤ (τ / s + ε / τ ^ p) * (2 * Ed) * A * D := + normalized_product_scale hδ hτ hs hτ1 hε (by positivity) hA hD hp + _ ≤ _ := by gcongr; exact le_max_right _ _ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPolynomialSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPolynomialSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a7515f50d38e1467929b48de0fa1b0e3ef1a592 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/NormalizedPolynomialSupport.lean @@ -0,0 +1,57 @@ +import OAI.Geometry.SurfaceImmersion.Correction.NormalizedPolynomialMean +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanSupport + +namespace OAI + +/-! Support and global smoothness of the normalized polynomial mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma normalizedPolynomialMean_tsupport {n : ℕ} (P : Fin n → Expression) (δ ε : ℝ) + (G : Base → Space) {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (τ t : ℝ) : + tsupport (normalizedPolynomialMean P δ ε G φ H τ t) ⊆ tsupport H := + tsupport_mul_subset_right.trans (quadraticMeanCoefficient_tsupport P ε G hφ hH τ t) + +lemma normalizedPolynomialMean_smooth {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (hP : ∀ l, (P l).SmoothCoeffs O) {G : Base → Space} {φ : Base → ℝ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hQ : Set.MapsTo (lowJet G) U O) (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (H : SupportedField (F := Fin 4 → ℂ) K) (δ ε τ t : ℝ) : + ContDiff ℝ ∞ (normalizedPolynomialMean P δ ε G φ H τ t) := by + exact ((polynomialMeanField hU hO hP hG hφ hQ K hKU H ε τ t).contDiff).const_smul (δ⁻¹ ^ 2) + +lemma normalizedPolynomialMean_extend {n : ℕ} {P : Fin n → Expression} + {U : Set Base} (hU : IsOpen U) {G : Base → Space} {φ : Base → ℝ} + (hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (H : SupportedField (F := Fin 4 → ℂ) K) (δ ε τ t : ℝ) + {s C : ℝ} {m : ℕ} (hC : 0 ≤ C) + (hb : WeightedBound U s m C (normalizedPolynomialMean P δ ε G φ H τ t)) : + WeightedBound Set.univ s m C (normalizedPolynomialMean P δ ε G φ H τ t) := + hb.extend_support hU + (((normalizedPolynomialMean_tsupport P δ ε G hφ H.contDiff τ t).trans H.tsupport_subset).trans hKU) hC + +lemma normalizedPolynomialMean_difference_extend {n : ℕ} {P : Fin n → Expression} + {U : Set Base} (hU : IsOpen U) {G : Base → Space} {φ : Base → ℝ} + (hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (H J : SupportedField (F := Fin 4 → ℂ) K) (δ ε τ t : ℝ) + {s C : ℝ} {m : ℕ} (hC : 0 ≤ C) + (hb : WeightedBound U s m C (fun x => normalizedPolynomialMean P δ ε G φ H τ t x - + normalizedPolynomialMean P δ ε G φ J τ t x)) : + WeightedBound Set.univ s m C (fun x => normalizedPolynomialMean P δ ε G φ H τ t x - + normalizedPolynomialMean P δ ε G φ J τ t x) := by + apply hb.extend_support hU _ hC + apply (tsupport_sub _ _).trans + apply Set.union_subset + · exact ((normalizedPolynomialMean_tsupport P δ ε G hφ H.contDiff τ t).trans H.tsupport_subset).trans hKU + · exact ((normalizedPolynomialMean_tsupport P δ ε G hφ J.contDiff τ t).trans J.tsupport_subset).trans hKU + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/OrderwiseCorrectionLimit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/OrderwiseCorrectionLimit.lean new file mode 100644 index 0000000000000000000000000000000000000000..b01ac6c397b7cbf89d6d04508b8e7cf949f31a65 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/OrderwiseCorrectionLimit.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldCorrectionLimit + +namespace OAI + +/-! Smooth correction limits with a separate summable bound at each derivative order. -/ +noncomputable section +open Filter Manifold +open scoped Topology ContDiff + +namespace ClosedSurfaceR4.ExactCorrection + +variable {E V : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup V] [InnerProductSpace ℝ V] [CompleteSpace V] + +theorem smooth_limitMap_orderwise {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) + (hρ : ∀ m, Summable (ρ m)) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ m n) : + ContDiff ℝ ∞ (limitMap F U) := by + apply hF.add + apply contDiff_tsum_of_eventually (N := ⊤) hU (fun m _ => hρ m) + intro m _ + simpa only [Nat.cofinite_eq_atTop] using hbound m + +theorem hasFDerivAt_limitMap_orderwise + {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) + (hρ : ∀ m, Summable (ρ m)) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ m n) (x : E) : + HasFDerivAt (limitMap F U) + (fderiv ℝ F x + ∑' n, fderiv ℝ (U n) x) x := by + have hb0 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), ‖U n y‖ ≤ ρ 0 n := by + filter_upwards [hbound 0] with n hn y _ + simpa only [norm_iteratedFDeriv_zero] using hn y + have hb1 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), + ‖fderiv ℝ (U n) y‖ ≤ ρ 1 n := by + filter_upwards [hbound 1] with n hn y _ + simpa only [norm_iteratedFDeriv_one] using hn y + have hval := tendstoUniformlyOn_tsum_nat_eventually (hρ 0) hb0 + have hder := tendstoUniformlyOn_tsum_nat_eventually (hρ 1) hb1 + have hs : HasFDerivAt (fun y => ∑' n, U n y) + (∑' n, fderiv ℝ (U n) x) x := by + apply hasFDerivAt_of_tendstoUniformlyOn isOpen_univ hder + · intro N y _ + exact HasFDerivAt.fun_sum fun n _ => + ((hU n).differentiable (by simp) y).hasFDerivAt + · intro y hy + exact hval.tendsto_at hy + · exact Set.mem_univ x + exact ((hF.differentiable (by simp) x).hasFDerivAt.add hs) + +theorem tendsto_fderiv_partialMap_orderwise + {F : E → V} {U : ℕ → E → V} {ρ : ℕ → ℕ → ℝ} + (hF : ContDiff ℝ ∞ F) (hU : ∀ n, ContDiff ℝ ∞ (U n)) + (hρ : ∀ m, Summable (ρ m)) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (U n) x‖ ≤ ρ m n) (x : E) : + Tendsto (fun N => fderiv ℝ (partialMap F U N) x) atTop + (𝓝 (fderiv ℝ (limitMap F U) x)) := by + have hb1 : ∀ᶠ n in atTop, ∀ y ∈ (Set.univ : Set E), + ‖fderiv ℝ (U n) y‖ ≤ ρ 1 n := by + filter_upwards [hbound 1] with n hn y _ + simpa only [norm_iteratedFDeriv_one] using hn y + have hder := (tendstoUniformlyOn_tsum_nat_eventually (hρ 1) hb1).tendsto_at (Set.mem_univ x) + have hfinite (N : ℕ) : fderiv ℝ (partialMap F U N) x = + fderiv ℝ F x + ∑ n ∈ Finset.range N, fderiv ℝ (U n) x := by + exact ((hF.differentiable (by simp) x).hasFDerivAt.add + (HasFDerivAt.fun_sum fun n _ => + ((hU n).differentiable (by simp) x).hasFDerivAt)).fderiv + simp_rw [hfinite] + rw [(hasFDerivAt_limitMap_orderwise hF hU hρ hbound x).fderiv] + exact tendsto_const_nhds.add hder + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +omit [IsManifold planeModel ∞ M] in +/-- A representative in any smooth local coordinate map determines the actual +manifold derivative, with the fixed coordinate derivative as the right factor. -/ +lemma local_coordinate_representative_derivative + {c : M → E} {G : M → Space} {K : E → Space} (p : M) + (hc : ContMDiffAt planeModel 𝓘(ℝ,E) ∞ c p) (hK : ContDiff ℝ ∞ K) + (heq : G =ᶠ[𝓝 p] K ∘ c) : + ContMDiffAt planeModel spaceModel ∞ G p ∧ + mfderiv planeModel spaceModel G p = + (fderiv ℝ K (c p)).comp (mfderiv planeModel 𝓘(ℝ,E) c p) := by + have hs : ContMDiffAt planeModel spaceModel ∞ (K ∘ c) p := + hK.contMDiff.contMDiffAt.comp p hc + refine ⟨hs.congr_of_eventuallyEq heq,?_⟩ + have hd := heq.mfderiv_eq (I := planeModel) (I' := spaceModel) + rw [mfderiv_comp p (hK.contMDiff.mdifferentiable (by simp)).mdifferentiableAt + (hc.mdifferentiableAt (by simp)),mfderiv_eq_fderiv] at hd + change (mfderiv planeModel spaceModel G p : Plane →L[ℝ] Space) = + (ContinuousLinearMap.id ℝ Space).comp + ((fderiv ℝ K (c p)).comp (mfderiv planeModel 𝓘(ℝ,E) c p)) at hd + simpa only [ContinuousLinearMap.id_comp] using hd + +omit [IsManifold planeModel ∞ M] in +/-- Local coordinate representatives with order-dependent summable tails give +smoothness of the series and convergence of the true manifold derivatives. -/ +theorem local_coordinate_correction_limit + {F : M → Space} {U : ℕ → M → Space} {c : M → E} + {K : E → Space} {A : ℕ → E → Space} {ρ : ℕ → ℕ → ℝ} (p : M) + (hc : ContMDiffAt planeModel 𝓘(ℝ,E) ∞ c p) + (hK : ContDiff ℝ ∞ K) (hA : ∀ n, ContDiff ℝ ∞ (A n)) + (hρ : ∀ m, Summable (ρ m)) + (hbound : ∀ m : ℕ, ∀ᶠ n in atTop, + ∀ x, ‖iteratedFDeriv ℝ m (A n) x‖ ≤ ρ m n) + (heq : ∀ᶠ x in 𝓝 p, F x = K (c x) ∧ ∀ n, U n x = A n (c x)) : + ContMDiffAt planeModel spaceModel ∞ (manifoldLimitMap F U) p ∧ + Tendsto (fun N => mfderiv planeModel spaceModel (manifoldPartialMap F U N) p) atTop + (𝓝 (mfderiv planeModel spaceModel (manifoldLimitMap F U) p)) := by + have hl : manifoldLimitMap F U =ᶠ[𝓝 p] limitMap K A ∘ c := by + filter_upwards [heq] with x hx + simp only [manifoldLimitMap,limitMap,Function.comp_apply,hx.1,hx.2] + have hs := local_coordinate_representative_derivative p hc + (smooth_limitMap_orderwise hK hA hρ hbound) hl + refine ⟨hs.1,?_⟩ + have hf (N : ℕ) : mfderiv planeModel spaceModel (manifoldPartialMap F U N) p = + (fderiv ℝ (partialMap K A N) (c p)).comp (mfderiv planeModel 𝓘(ℝ,E) c p) := by + apply (local_coordinate_representative_derivative p hc + (hK.add (ContDiff.sum (fun n _ => hA n))) ?_).2 + filter_upwards [heq] with x hx + simp only [manifoldPartialMap,Function.comp_apply,hx.1,hx.2] + simp_rw [hf,hs.2] + let compose : (E →L[ℝ] Space) →L[ℝ] (Plane →L[ℝ] Space) := + (ContinuousLinearMap.compL ℝ Plane E Space).flip + (mfderiv planeModel 𝓘(ℝ,E) c p) + exact (compose.continuous.tendsto _).comp + (tendsto_fderiv_partialMap_orderwise hK hA hρ hbound (c p)) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PairCurveSmoothParameter.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PairCurveSmoothParameter.lean new file mode 100644 index 0000000000000000000000000000000000000000..86e22ff84430d94a7cb951430aaac19b09b8e2d2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PairCurveSmoothParameter.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PairCurveParameter + +namespace OAI + +/-! The chart parameter for a smooth pair curve is smooth on an actual +open neighborhood, as required by the global parameter-germ extension. -/ +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 smooth_pair_curve_parameter (c : SmoothDoubleChart f) {C : ℝ → M × M} + {W : Set ℝ} (hW : IsOpen W) (hC : ContMDiffOn 𝓘(ℝ) (planeModel.prod planeModel) ∞ C W) + {x : ℝ} (hx : x ∈ W) (p : surfaceDoublePairs f) (hp : p.val = C x) (hpc : p ∈ c.coord.source) + (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) : + ∃ (U : Set ℝ) (h : ℝ → ℝ), IsOpen U ∧ x ∈ U ∧ U ⊆ W ∧ + ContDiffOn ℝ ∞ h U ∧ deriv h x ≠ 0 ∧ h x = c.coord p ∧ + C =ᶠ[𝓝 x] (fun t => (c.coord.symm (h t)).val) := by + have hA : ContMDiffOn 𝓘(ℝ) planeModel ∞ (fun t => (C t).1) W := + contMDiff_fst.comp_contMDiffOn hC + have hB : ContMDiffOn 𝓘(ℝ) planeModel ∞ (fun t => (C t).2) W := + contMDiff_snd.comp_contMDiffOn hC + obtain ⟨g,hg,hgn,hgv,hginv⟩ := c.pair_curve_parameter p hp hpc + (hA.contMDiffAt (hW.mem_nhds hx)) (hB.contMDiffAt (hW.mem_nhds hx)) hpair hgood + let U := W ∩ C ⁻¹' ((chart c.left).source ×ˢ (chart c.right).source) + have hU : IsOpen U := hC.continuousOn.isOpen_inter_preimage hW + ((chart c.left).open_source.prod (chart c.right).open_source) + have hxU : x ∈ U := by + refine ⟨hx,?_⟩ + change C x ∈ (chart c.left).source ×ˢ (chart c.right).source + rw [← hp] + exact ⟨(c.source_formula p hpc).1,(c.source_formula p hpc).2.1⟩ + let h : ℝ → ℝ := fun t => c.expression (chart c.left (C t).1,chart c.right (C t).2) + have hleft := (chart_smooth c.left).comp (hA.mono (show U ⊆ W from inter_subset_left)) (fun t (ht : t ∈ U) => ht.2.1) + have hright := (chart_smooth c.right).comp (hB.mono (show U ⊆ W from inter_subset_left)) (fun t (ht : t ∈ U) => ht.2.2) + have hs : ContDiffOn ℝ ∞ h U := c.expression_smooth.comp_contDiffOn + (hleft.contDiffOn.prodMk hright.contDiffOn) + have hgtarget : ∀ᶠ t in 𝓝 x, g t ∈ c.coord.target := + hg.continuousAt.eventually (c.coord.open_target.mem_nhds (hgv ▸ c.coord.map_source hpc)) + have he : h =ᶠ[𝓝 x] g := by + filter_upwards [hginv,hgtarget] with t ht ht' + change c.expression (chart c.left (C t).1,chart c.right (C t).2) = g t + rw [ht] + exact (c.source_formula (c.coord.symm (g t)) (c.coord.map_target ht')).2.2.symm.trans + (c.coord.right_inv ht') + refine ⟨U,h,hU,hxU,inter_subset_left,hs,?_,he.eq_of_nhds.trans hgv,?_⟩ + · rw [he.deriv_eq] + exact hgn + · filter_upwards [hginv,he] with t ht ht' + rw [ht'] + exact ht + +end SmoothDoubleChart +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PairModelCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PairModelCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0cb77ec1db17bf81de32c65492fc23e17bb85b6e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PairModelCoordinates.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RelativeDefectFilling +import OAI.Geometry.SurfaceImmersion.Whitney.OppositeIndexFrameFilling + +namespace OAI + +/-! Affine coordinates and invertible normal rescalings for the model pair. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def pairCoordinateMap (c h k : ℝ) (x : Base) : Base := ![(x 1-c)/h,k*x 0] +def pairCoordinateInverse (c h k : ℝ) (y : Base) : Base := ![y 1/k,c+h*y 0] + +lemma pairCoordinateMap_smooth (c h k : ℝ) : ContDiff ℝ ∞ (pairCoordinateMap c h k) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [pairCoordinateMap] <;> fun_prop +lemma pairCoordinateInverse_smooth (c h k : ℝ) : ContDiff ℝ ∞ (pairCoordinateInverse c h k) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [pairCoordinateInverse] <;> fun_prop + +def pairCoordinates (c h k : ℝ) (hh : h ≠ 0) (hk : k ≠ 0) : Base ≃ₜ Base where + toFun := pairCoordinateMap c h k + invFun := pairCoordinateInverse c h k + left_inv := by + intro x + ext i + fin_cases i + · change (k*x 0)/k = x 0 + field_simp + · change c+h*((x 1-c)/h) = x 1 + field_simp + ring + right_inv := by + intro x + ext i + fin_cases i + · change (c+h*x 0-c)/h = x 0 + field_simp + ring + · change k*(x 1/k) = x 1 + field_simp + continuous_toFun := (pairCoordinateMap_smooth c h k).continuous + continuous_invFun := (pairCoordinateInverse_smooth c h k).continuous + +def normalPairScale (a b : ℝ) : FrameTarget →L[ℝ] FrameTarget := + (ContinuousLinearMap.proj 0).smulRight (![1,0,0] : FrameTarget)+ + (ContinuousLinearMap.proj 1).smulRight (![0,a,0] : FrameTarget)+ + (ContinuousLinearMap.proj 2).smulRight (![0,0,b] : FrameTarget) + +lemma normalPairScale_apply (a b : ℝ) (v : FrameTarget) : + normalPairScale a b v = ![v 0,a*v 1,b*v 2] := by + ext i + fin_cases i <;> simp [normalPairScale,mul_comm] + +lemma normalPairScale_injective {a b : ℝ} (ha : a ≠ 0) (hb : b ≠ 0) : + Function.Injective (normalPairScale a b) := by + intro u v he + rw [normalPairScale_apply,normalPairScale_apply] at he + ext i + fin_cases i + · exact congrFun he 0 + · exact mul_left_cancel₀ ha (congrFun he 1) + · exact mul_left_cancel₀ hb (congrFun he 2) + +lemma normalPairScale_axis (a b r y z : ℝ) : + (normalPairScale a b).comp (axisNormalFrame r y z) = axisNormalFrame r (a*y) (b*z) := by + ext v i + fin_cases i <;> simp [normalPairScale,axisNormalFrame] <;> ring + +/-- Pull a compact model filling back by an affine chart and rescale its two +normal coordinates. The support is the actual inverse image of the model support. -/ +theorem pullback_model_filling {Q : Base → Base →L[ℝ] FrameTarget} + {B : Base → Base →L[ℝ] FrameTarget} (hB : ContDiff ℝ ∞ B) + (hBI : ∀ x, Function.Injective (B x)) {K : Set Base} (hK : IsCompact K) + (hBe : ∀ x ∉ K, B =ᶠ[𝓝 x] Q) + (c h k a b : ℝ) (hh : h ≠ 0) (hk : k ≠ 0) (ha : a ≠ 0) (hb : b ≠ 0) : + ∃ A : Base → Base →L[ℝ] FrameTarget, + ContDiff ℝ ∞ A ∧ (∀ x, Function.Injective (A x)) ∧ + IsCompact ((pairCoordinates c h k hh hk) ⁻¹' K) ∧ + ∀ x ∉ (pairCoordinates c h k hh hk) ⁻¹' K, + A x = (normalPairScale a b).comp (Q (pairCoordinateMap c h k x)) := by + let e := pairCoordinates c h k hh hk + let A := fun x => (normalPairScale a b).comp (B (e x)) + refine ⟨A,contDiff_const.clm_comp (hB.comp (pairCoordinateMap_smooth c h k)),?_,?_,?_⟩ + · intro x + exact (normalPairScale_injective ha hb).comp (hBI (e x)) + · exact e.isCompact_preimage.mpr hK + · intro x hx + have he : B (e x) = Q (e x) := (hBe (e x) hx).eq_of_nhds + dsimp [A] + rw [he] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..4669e928bc89ea7d1bbc38236ecbf5bec817f5bb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrector.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCalculus + +namespace OAI + +/-! +The two components of the finite periodic corrector: the explicit solve in +span(Y,C), and integration of the covariance correction in its orthogonal +complement. +-/ + +noncomputable section + +open MeasureTheory +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCorrector + +open CovarianceCorrector PeriodicCalculus + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] + +def gramDet (Y C : E) : ℝ := + inner ℝ Y Y * inner ℝ C C - (inner ℝ Y C) ^ 2 + +/-- The vector in span(Y,C) with prescribed pairings with Y and C. -/ +def spanSolve (Y C : E) : (ℝ × ℝ) →L[ℝ] E := + LinearMap.toContinuousLinearMap { + toFun := fun a => + ((inner ℝ C C * a.1 - inner ℝ Y C * a.2) / gramDet Y C) • Y + + ((inner ℝ Y Y * a.2 - inner ℝ Y C * a.1) / gramDet Y C) • C + map_add' := by intros; dsimp; module + map_smul' := by intros; dsimp; module } + +omit [CompleteSpace E] in +lemma spanSolve_pairings (Y C : E) (hD : gramDet Y C ≠ 0) (a : ℝ × ℝ) : + inner ℝ Y (spanSolve Y C a) = a.1 ∧ + inner ℝ C (spanSolve Y C a) = a.2 := by + change inner ℝ Y (_ • Y + _ • C) = a.1 ∧ + inner ℝ C (_ • Y + _ • C) = a.2 + have hc : inner ℝ C Y = inner ℝ Y C := (real_inner_comm C Y).symm + simp only [inner_add_right, real_inner_smul_right, hc] + constructor + · calc + _ = a.1 * gramDet Y C / gramDet Y C := by unfold gramDet; ring + _ = a.1 := mul_div_cancel_right₀ _ hD + · calc + _ = a.2 * gramDet Y C / gramDet Y C := by unfold gramDet; ring + _ = a.2 := mul_div_cancel_right₀ _ hD + +lemma average_spanSolve (Y C : E) {H K : Period → ℝ} + (hH : Continuous H) (hK : Continuous K) + (hmH : average H = 0) (hmK : average K = 0) : + average (fun t => spanSolve Y C (H t, K t)) = 0 := by + have hi := integrable_of_continuous (hH.prodMk hK) + have he := (spanSolve Y C).integral_comp_comm hi + have hm : (∫ t, (H t, K t) ∂AddCircle.haarAddCircle) = (0, 0) := by + apply Prod.ext + · have hx := (ContinuousLinearMap.fst ℝ ℝ ℝ).integral_comp_comm hi + change (∫ t, H t ∂AddCircle.haarAddCircle) = + (∫ t, (H t, K t) ∂AddCircle.haarAddCircle).1 at hx + exact hx.symm.trans hmH + · have hx := (ContinuousLinearMap.snd ℝ ℝ ℝ).integral_comp_comm hi + change (∫ t, K t ∂AddCircle.haarAddCircle) = + (∫ t, (H t, K t) ∂AddCircle.haarAddCircle).2 at hx + exact hx.symm.trans hmK + change (∫ t, spanSolve Y C (H t, K t) ∂AddCircle.haarAddCircle) = 0 + rw [he, hm] + exact (spanSolve Y C).map_zero + +lemma average_fluctuation {r : Period → ℝ} (hr : Continuous r) : + average (fluctuation r) = 0 := by + change CovarianceCorrector.average (fun t => r t - CovarianceCorrector.average r) = 0 + rw [average_sub hr continuous_const, CovarianceCorrector.average_const, sub_self] + +/-- A mean-zero prescribed fluctuation is realized by the angular derivative +of an actual smooth mean-zero periodic function. -/ +theorem exists_integrated_covariance [FiniteDimensional ℝ E] + {V : Period → E} (hV : Continuous V) {v : E} (hv : average V = v) + {r : Period → ℝ} (hr : Continuous r) (hr0 : average r = 0) + (hVs : ContDiff ℝ ∞ (fun t : ℝ => V (t : Period))) + (hrs : ContDiff ℝ ∞ (fun t : ℝ => r (t : Period))) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) : + ∃ Z W : Period → E, Continuous Z ∧ Continuous W ∧ + ContDiff ℝ ∞ (fun t : ℝ => Z (t : Period)) ∧ + ContDiff ℝ ∞ (fun t : ℝ => W (t : Period)) ∧ + average Z = 0 ∧ average W = 0 ∧ + (∀ t : ℝ, HasDerivAt (fun s : ℝ => Z (s : Period)) (W (t : Period)) t) ∧ + fluctuation (fun t => inner ℝ (V t) (W t)) = r := by + obtain ⟨W, hW, hWs, hW0, hsolve⟩ := + exists_smooth_covariance_corrector hV hv hr hr0 hVs hrs hq hcircle + obtain ⟨Z, hZ, hZs, hZ0, hZd⟩ := exists_circle_primitive hWs hW0 + exact ⟨Z, W, hZ, hW, hZs, hWs, hZ0, hW0, hZd, hsolve⟩ + +omit [CompleteSpace E] in +/-- Differentiating the first pairing gives the second slow constraint used +in the triangular system, because Y_y=C. -/ +theorem slow_pairing_constraint {Y U : ℝ → E} {H : ℝ → ℝ} + {y : ℝ} {C U' : E} {H' j : ℝ} + (hY : HasDerivAt Y C y) (hU : HasDerivAt U U' y) + (hH : HasDerivAt H H' y) + (he : ∀ t, inner ℝ (Y t) (U t) = H t) + (hC : inner ℝ C (U y) = H' - j) : + inner ℝ (Y y) U' = j := by + have hd := hY.inner ℝ hU + have heq : (fun t => inner ℝ (Y t) (U t)) = H := funext he + rw [heq] at hd + have hu := hd.unique hH + linarith + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorFormula.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorFormula.lean new file mode 100644 index 0000000000000000000000000000000000000000..d1aa2ddefc05fbbb4dab5b53ee859ad19f78478b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorFormula.lean @@ -0,0 +1,29 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CovarianceRealOperator +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCorrector + +namespace OAI + +/-! Explicit formulas for the canonical angular correction. -/ +noncomputable section +open MeasureTheory + +namespace ClosedSurfaceR4.JetPolynomial +open PeriodicCorrector CovarianceCorrector +variable {E : Type} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The right-hand side of the normal covariance equation. -/ +def angularSourceFunction (Y C X₀ : E) (V : C(Period, E)) + (h K e : ℝ → ℝ) (t : ℝ) : ℝ := + let a := fun s : ℝ => inner ℝ (X₀ + V (s : Period)) (spanSolve Y C (h s, deriv K s)) + e t - (a t - ∫ s in 0..1, a s) + +def angularCorrectionFunction (Y C X₀ : E) (V : C(Period, E)) (q : ℝ) + (h K e : ℝ → ℝ) (t : ℝ) : E := + spanSolve Y C (PeriodicPrimitive.primitive h t, K t) + + PeriodicPrimitive.primitive (realCorrector V q (angularSourceFunction Y C X₀ V h K e)) t + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorSystem.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..2335686bf7c61209045d47f75530c8d0785844d9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicCorrectorSystem.lean @@ -0,0 +1,144 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrector + +namespace OAI + +/-! The angular and algebraic equations in the triangular periodic solve. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCorrector + +open CovarianceCorrector PeriodicCalculus + +variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [FiniteDimensional ℝ E] + +/-- Solve the two angular equations and the prescribed C pairing. The slow +Y equation follows by `slow_pairing_constraint` when K=H_y-j. -/ +theorem solve_system (P : Submodule ℝ E) (Y C X₀ : E) + (hD : gramDet Y C ≠ 0) + (hPY : ∀ w : P, inner ℝ Y (w : E) = 0) + (hPC : ∀ w : P, inner ℝ C (w : E) = 0) + (hPX : ∀ w : P, inner ℝ X₀ (w : E) = 0) + {V : Period → P} (hV : Continuous V) {v : P} (hv : average V = v) + (hVs : ContDiff ℝ ∞ (fun t : ℝ => V (t : Period))) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) + {H K h k' e : Period → ℝ} + (hH : Continuous H) (hK : Continuous K) (hh : Continuous h) + (hk' : Continuous k') (he : Continuous e) + (hHs : ContDiff ℝ ∞ (fun t : ℝ => H (t : Period))) + (hKs : ContDiff ℝ ∞ (fun t : ℝ => K (t : Period))) + (hhs : ContDiff ℝ ∞ (fun t : ℝ => h (t : Period))) + (hk's : ContDiff ℝ ∞ (fun t : ℝ => k' (t : Period))) + (hes : ContDiff ℝ ∞ (fun t : ℝ => e (t : Period))) + (hmH : average H = 0) (hmK : average K = 0) (hme : average e = 0) + (hHd : ∀ t : ℝ, HasDerivAt (fun s : ℝ => H (s : Period)) (h (t : Period)) t) + (hKd : ∀ t : ℝ, HasDerivAt (fun s : ℝ => K (s : Period)) (k' (t : Period)) t) : + ∃ U D : Period → E, Continuous U ∧ Continuous D ∧ + ContDiff ℝ ∞ (fun t : ℝ => U (t : Period)) ∧ average U = 0 ∧ + (∀ t : ℝ, HasDerivAt (fun s : ℝ => U (s : Period)) (D (t : Period)) t) ∧ + (∀ t, inner ℝ Y (U t) = H t ∧ inner ℝ C (U t) = K t ∧ + inner ℝ Y (D t) = h t) ∧ + fluctuation (fun t => inner ℝ (X₀ + (V t : E)) (D t)) = e := by + let T : Period → E := fun t => spanSolve Y C (H t, K t) + let T' : Period → E := fun t => spanSolve Y C (h t, k' t) + let X : Period → E := fun t => X₀ + (V t : E) + have hT : Continuous T := (spanSolve Y C).continuous.comp (hH.prodMk hK) + have hT' : Continuous T' := (spanSolve Y C).continuous.comp (hh.prodMk hk') + have hX : Continuous X := continuous_const.add (P.subtypeL.continuous.comp hV) + have hTs : ContDiff ℝ ∞ (fun t : ℝ => T (t : Period)) := + (spanSolve Y C).contDiff.comp (hHs.prodMk hKs) + have hT's : ContDiff ℝ ∞ (fun t : ℝ => T' (t : Period)) := + (spanSolve Y C).contDiff.comp (hhs.prodMk hk's) + have hXs : ContDiff ℝ ∞ (fun t : ℝ => X (t : Period)) := + contDiff_const.add (P.subtypeL.contDiff.comp hVs) + have hTd (t : ℝ) : HasDerivAt (fun s : ℝ => T (s : Period)) (T' (t : Period)) t := + (spanSolve Y C).hasFDerivAt.comp_hasDerivAt t ((hHd t).prodMk (hKd t)) + let a : Period → ℝ := fun t => inner ℝ (X t) (T' t) + let r : Period → ℝ := fun t => e t - fluctuation a t + have ha : Continuous a := hX.inner hT' + have hr : Continuous r := he.sub (ha.sub continuous_const) + have hrs : ContDiff ℝ ∞ (fun t : ℝ => r (t : Period)) := + hes.sub ((hXs.inner ℝ hT's).sub contDiff_const) + have hr0 : average r = 0 := by + rw [show r = fun t => e t - fluctuation a t from rfl, + average_sub (f := e) (g := fluctuation a) he (ha.sub continuous_const), hme, average_fluctuation ha, sub_self] + obtain ⟨Z, W, hZ, hW, hZs, hWs, hZ0, _, hZd, hsolve⟩ := + exists_integrated_covariance hV hv hr hr0 hVs hrs hq hcircle + let U : Period → E := fun t => T t + (Z t : E) + let D : Period → E := fun t => T' t + (W t : E) + have hUc : Continuous U := hT.add (P.subtypeL.continuous.comp hZ) + have hDc : Continuous D := hT'.add (P.subtypeL.continuous.comp hW) + have hUs : ContDiff ℝ ∞ (fun t : ℝ => U (t : Period)) := + hTs.add (P.subtypeL.contDiff.comp hZs) + have hZmean : average (fun t => (Z t : E)) = 0 := by + have hz := P.subtypeL.integral_comp_comm (integrable_of_continuous hZ) + change (∫ t, P.subtypeL (Z t) ∂AddCircle.haarAddCircle) = 0 + rw [hz] + change P.subtypeL (average Z) = 0 + rw [hZ0, map_zero] + have hU0 : average U = 0 := by + change average (fun t => T t + (Z t : E)) = 0 + rw [average_add (f := T) (g := fun t => (Z t : E)) hT + (P.subtypeL.continuous.comp hZ), average_spanSolve Y C hH hK hmH hmK, + hZmean, add_zero] + refine ⟨U, D, hUc, hDc, hUs, hU0, ?_, ?_, ?_⟩ + · intro t + exact (hTd t).add (P.subtypeL.hasFDerivAt.comp_hasDerivAt t (hZd t)) + · intro t + dsimp only [U, D, T, T'] + simp only [inner_add_right, hPY, hPC, add_zero] + exact ⟨(spanSolve_pairings Y C hD _).1, (spanSolve_pairings Y C hD _).2, + (spanSolve_pairings Y C hD _).1⟩ + · have hp : (fun t => inner ℝ (X₀ + (V t : E)) (D t)) = + (fun t => a t + inner ℝ (V t) (W t)) := by + funext t + dsimp only [D, a, X] + simp only [inner_add_right, inner_add_left, hPX, zero_add] + rfl + rw [hp] + have hb : Continuous (fun t => inner ℝ (V t) (W t)) := hV.inner hW + change (fun t => a t + inner ℝ (V t) (W t) - + average (fun s => a s + inner ℝ (V s) (W s))) = e + rw [average_add ha hb] + funext t + have hs := congrFun hsolve t + change inner ℝ (V t) (W t) - average (fun s => inner ℝ (V s) (W s)) = + e t - (a t - average a) at hs + linarith + +/-- The angular correction exists for arbitrary smooth mean-zero data. The +primitive and derivative data used internally are constructed on the circle. -/ +theorem solve_angular_corrector (P : Submodule ℝ E) (Y C X₀ : E) + (hdet : gramDet Y C ≠ 0) + (hPY : ∀ w : P, inner ℝ Y (w : E) = 0) + (hPC : ∀ w : P, inner ℝ C (w : E) = 0) + (hPX : ∀ w : P, inner ℝ X₀ (w : E) = 0) + {V : Period → P} (hV : Continuous V) {v : P} (hv : average V = v) + (hVs : ContDiff ℝ ∞ (fun t : ℝ => V (t : Period))) + {q : ℝ} (hq : 0 < q) (hcircle : ∀ t, inner ℝ (V t) (V t) = q) + {h K e : Period → ℝ} (hh : Continuous h) (hK : Continuous K) + (he : Continuous e) + (hhs : ContDiff ℝ ∞ (fun t : ℝ => h (t : Period))) + (hKs : ContDiff ℝ ∞ (fun t : ℝ => K (t : Period))) + (hes : ContDiff ℝ ∞ (fun t : ℝ => e (t : Period))) + (hmh : average h = 0) (hmK : average K = 0) (hme : average e = 0) : + ∃ U D : Period → E, Continuous U ∧ Continuous D ∧ + ContDiff ℝ ∞ (fun t : ℝ => U (t : Period)) ∧ average U = 0 ∧ + (∀ t : ℝ, HasDerivAt (fun s : ℝ => U (s : Period)) (D (t : Period)) t) ∧ + (∀ t, inner ℝ Y (D t) = h t ∧ inner ℝ C (U t) = K t) ∧ + fluctuation (fun t => inner ℝ (X₀ + (V t : E)) (D t)) = e := by + obtain ⟨H, hH, hHs, hmH, hHd⟩ := exists_circle_primitive hhs hmh + obtain ⟨k', hk', hk's, _, hKd⟩ := exists_circle_derivative hKs + obtain ⟨U, D, hU, hD, hUs, hmU, hUd, hp, hf⟩ := + solve_system P Y C X₀ hdet hPY hPC hPX hV hv hVs hq hcircle + hH hK hh hk' he hHs hKs hhs hk's hes hmH hmK hme hHd hKd + exact ⟨U, D, hU, hD, hUs, hmU, hUd, + fun t => ⟨(hp t).2.2, (hp t).2.1⟩, hf⟩ + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicPolynomialExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicPolynomialExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..896751cb04ea3e09675b82ce3c970fd2ce05bb80 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PeriodicPolynomialExpansion.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicTriangularRecursion +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMetricPolynomial + +namespace OAI + +/-! Metric polynomial coefficients of the finite periodic derivative ansatz. -/ + +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) + +def xTangent (dx : A) (U : ℕ → Family A E) (L i : ℕ) : Family A E := + if i = 0 then g.longitudinal else + if i = L then (U (i - 1)).slow dx else xCoefficient dx U i + +def yTangent (U : ℕ → Family A E) (i : ℕ) : Family A E := + if i = 0 then g.transverse else yCoefficient dy U i + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma xTangent_zero (dx : A) (U : ℕ → Family A E) (L : ℕ) : + g.xTangent dx U L 0 = g.longitudinal := by simp [xTangent] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +@[simp] lemma yTangent_zero (U : ℕ → Family A E) : g.yTangent U 0 = g.transverse := by + simp [yTangent] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xTangent_interior (dx : A) (U : ℕ → Family A E) {L i : ℕ} + (hi : 0 < i) (hL : i < L) : g.xTangent dx U L i = xCoefficient dx U i := by + simp only [xTangent, ne_of_gt hi, ne_of_lt hL, ite_false] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yTangent_pos (U : ℕ → Family A E) {i : ℕ} (hi : 0 < i) : + g.yTangent U i = yCoefficient dy U i := by + simp only [yTangent, ne_of_gt hi, ite_false] + +def xxPolynomial (dx : A) (U : ℕ → Family A E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.xTangent dx U L i).val p t) + (fun i => (g.xTangent dx U L i).val p t) + +def xyPolynomial (dx : A) (U : ℕ → Family A E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.xTangent dx U L i).val p t) + (fun i => (g.yTangent U i).val p t) + +def yyPolynomial (U : ℕ → Family A E) (L : ℕ) (p : A) (t : Period) : Polynomial ℝ := + metricPolynomial L (fun i => (g.yTangent U i).val p t) + (fun i => (g.yTangent U i).val p t) + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xxPolynomial_coeff (dx : A) (U : ℕ → Family A E) {L r : ℕ} + (hr : 0 < r) (hL : r < L) (p : A) (t : Period) : + (g.xxPolynomial dx U L p t).coeff r = (g.xxCoefficient dx U r).val p t := by + unfold xxPolynomial + rw [metricPolynomial_coeff_pos (Nat.le_of_lt hL) hr, + g.xTangent_zero, g.xTangent_interior dx U hr hL] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.xTangent dx U L i).val p t) ((g.xTangent dx U L (r - i)).val p t)) = + (xxQuadratic dx U r).val p t := by + simp only [xxQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) (by omega), + g.xTangent_interior dx U (by omega) (by omega)] + rw [hs] + simp only [xxCoefficient, Family.add_apply, Family.smul_apply, Family.inner_apply, smul_eq_mul] + rw [real_inner_comm ((xCoefficient dx U r).val p t) (g.longitudinal.val p t)] + ring + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma xyPolynomial_coeff (dx : A) (U : ℕ → Family A E) {L r : ℕ} + (hr : 0 < r) (hL : r < L) (p : A) (t : Period) : + (g.xyPolynomial dx U L p t).coeff r = (g.xyCoefficient dx U r).val p t := by + unfold xyPolynomial + rw [metricPolynomial_coeff_pos (Nat.le_of_lt hL) hr, + g.xTangent_zero, g.xTangent_interior dx U hr hL, g.yTangent_zero, g.yTangent_pos U hr] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.xTangent dx U L i).val p t) ((g.yTangent U (r - i)).val p t)) = + (xyQuadratic dx dy U r).val p t := by + simp only [xyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.xTangent_interior dx U (by omega) (by omega), g.yTangent_pos U (by omega)] + rw [hs] + simp only [xyCoefficient, Family.add_apply, Family.inner_apply] + rw [real_inner_comm ((xCoefficient dx U r).val p t) (g.transverse.val p t)] + +omit [FiniteDimensional ℝ A] [CompleteSpace E] [FiniteDimensional ℝ E] in +lemma yyPolynomial_coeff (U : ℕ → Family A E) {L r : ℕ} + (hr : 0 < r) (hL : r ≤ L) (p : A) (t : Period) : + (g.yyPolynomial U L p t).coeff r = (g.yyCoefficient U r).val p t := by + unfold yyPolynomial + rw [metricPolynomial_coeff_pos hL hr, g.yTangent_zero, g.yTangent_pos U hr] + have hs : (∑ i ∈ Finset.Ico 1 r, + inner ℝ ((g.yTangent U i).val p t) ((g.yTangent U (r - i)).val p t)) = + (yyQuadratic dy U r).val p t := by + simp only [yyQuadratic, Family.sum_apply, Family.inner_apply] + apply Finset.sum_congr rfl + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + rw [g.yTangent_pos U (by omega), g.yTangent_pos U (by omega)] + rw [hs] + simp only [yyCoefficient, Family.add_apply, Family.smul_apply, Family.inner_apply, smul_eq_mul] + rw [real_inner_comm ((yCoefficient dy U r).val p t) (g.transverse.val p t)] + ring + +end Geometry +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbationTaylorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbationTaylorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..62f167e9946156e1d676c010e3569225ae9c56c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbationTaylorBounds.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTaylorBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationCalculus + +namespace OAI + +/-! The finite polynomial perturbation has a cubic nonlinear remainder with +one fixed scale loss. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open MixedExpression ParameterTaylor WeightedEstimates + +variable {n : ℕ} + +def taylorRemainder (P : Fin n → Expression) (ε : ℝ) (G H : Base → Space) (θ : ℝ) : Base → ℝ := + fun p => ∑ l, ε ^ (l.val + 1) * (P l).taylorRemainder G H θ p + +lemma taylorRemainder_identity (P : Fin n → Expression) (ε : ℝ) (G H : Base → Space) + (θ : ℝ) (p : Base) : + taylorRemainder P ε G H θ p = + eval P ε (fun q => G q + H q) (p, θ) - eval P ε G (p, θ) - variation P ε G H (p, θ) - + (1 / 2 : ℝ) * ∑ l, ε ^ (l.val + 1) * ((P l).variations 1).eval (diagonalFamily G H) (p, θ) := by + simp only [taylorRemainder, Expression.taylorRemainder, eval, variation, mul_sub, + Finset.sum_sub_distrib, Finset.mul_sum] + congr 1 + apply Finset.sum_congr rfl + intro l _ + ring + +lemma expression_taylorRemainder_smooth {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + ContDiff ℝ ∞ (e.taylorRemainder G H θ) := by + rw [← Expression.cubicRemainder_affine he hG hH θ] + exact cubicRemainder_smooth (Expression.affinePolynomial_smooth he hG hH θ) + +theorem compact_taylorRemainder_bound {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) (P : Fin n → Expression) + (hP : ∀ l, (P l).SmoothCoeffs Set.univ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G H : Base → Space) (s C ε : ℝ), + 0 < s → s ≤ 1 → 0 < C → 0 ≤ ε → ε ≤ 1 → 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 + order P) B + (lowJet (fun p => G p + t • H p))) → + WeightedBound U s (m + order P) C H → + ∀ θ ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D * ε * C ^ 3 / s ^ loss P) (taylorRemainder P ε G H θ) := by + classical + have hex := fun l => (P l).compact_taylorRemainder_bound hU hQ (hP l) m B hB + choose D hD hd using hex + refine ⟨∑ l, D l / 2, Finset.sum_nonneg (fun l _ => div_nonneg (hD l) (by norm_num)), ?_⟩ + intro G H s C ε hs hs1 hC hε hε1 hG hH hGQ hGb hHb θ hθ + have hval (l : Fin n) : WeightedBound U s m (D l / 2 * ε * C ^ 3 / s ^ loss P) + (fun p => ε ^ (l.val + 1) * (P l).taylorRemainder G H θ p) := by + have hDl := hD l + have hl : (P l).order ≤ order P := Finset.le_sup (f := fun k => (P k).order) (Finset.mem_univ l) + have hp := hd l G H s C hs hs1 hC hG hH hGQ + (fun t ht => (hGb t ht).mono_order (Nat.add_le_add_left hl m)) + (hHb.mono_order (Nat.add_le_add_left hl m)) θ hθ + have hp' : WeightedBound U s m (D l / 2 * C ^ 3 / s ^ loss P) + ((P l).taylorRemainder G H θ) := by + apply hp.mono_const + have hpow := pow_le_pow_of_le_one hs.le hs1 + (Finset.le_sup (f := fun k => (P k).loss + 6) (Finset.mem_univ l)) + calc + _ = (D l / 2 * C ^ 3) / s ^ ((P l).loss + 6) := by ring + _ ≤ _ := div_le_div_of_nonneg_left (by positivity) (pow_pos hs _) hpow + have hsm := expression_taylorRemainder_smooth (hP l) hG hH θ + have hscaled := hp'.const_smul hU.uniqueDiffOn hsm.contDiffOn (ε ^ (l.val + 1)) + apply hscaled.mono_const + rw [abs_of_nonneg (pow_nonneg hε _)] + have hpow : ε ^ (l.val + 1) ≤ ε := by + simpa only [pow_one] using pow_le_pow_of_le_one hε hε1 (show 1 ≤ l.val + 1 by omega) + calc + _ ≤ ε * (D l / 2 * C ^ 3 / s ^ loss P) := mul_le_mul_of_nonneg_right hpow (by positivity) + _ = _ := by ring + have hsum := WeightedBound.finset_sum hU.uniqueDiffOn hs.le Finset.univ + (fun l => D l / 2 * ε * C ^ 3 / s ^ loss P) + (fun l p => ε ^ (l.val + 1) * (P l).taylorRemainder G H θ p) + (fun l _ => (contDiffOn_const.mul + (expression_taylorRemainder_smooth (hP l) hG hH θ).contDiffOn)) (fun l _ => hval l) + change WeightedBound U s m ((∑ l, D l / 2) * ε * C ^ 3 / s ^ loss P) + (fun p => ∑ l, ε ^ (l.val + 1) * (P l).taylorRemainder G H θ p) + simpa only [← Finset.sum_div, ← Finset.sum_mul] using hsum + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeMode.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeMode.lean new file mode 100644 index 0000000000000000000000000000000000000000..824e9cc3ac26b2c1c87eb129ef58979dc98e708d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeMode.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedInitialMode +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricPerturbedParametrix +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrixPowers + +namespace OAI + +/-! Finite correction of an actual supported free normal seed in the +presence of the polynomial differential perturbation. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +def perturbedFreeMode (τ : ℝ) (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) + (V : SupportedField (F := Ambient n) K) (q : ℕ) : SupportedField (F := Ambient n) K := + FiniteParametrix.improve ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) 0 (initialMode τ h K hKU V 0) q + +lemma perturbed_initial_free_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) + (V : SupportedField (F := Ambient n) K) + (hX : ∀ x ∈ U, coordDeriv dx G x ⬝ᵥ V x = 0) + (hY : ∀ x ∈ U, coordDeriv dy G x ⬝ᵥ V x = 0) + (hV : ∀ x ∈ U, goodSecond G x ⬝ᵥ V x = 0) (m : ℕ) : + supportedWeightedSeminorm K s m + (((conjugatedDLM τ hG K).restrictScalars ℝ + R) (initialMode τ h K hKU V 0)) ≤ + (τ / s + ε / τ ^ p) * + max (fullErrorConstant n m (B m)) (D m * initialConstant n (m + L) (B (m + L))) * + supportedWeightedSeminorm K s (m + (L + 1)) V := by + have h0 := initialMode_free_residual τ hG h K hKU hτ hs hs1 (hB m) m + (hc m).toFullModeCoefficientBound V hX hY hV + have h1 := hR m (initialMode τ h K hKU V 0) + have hS := initialMode_free_bound τ h K hKU hτ hs hτs hs1 (hB (m + L)) + (m + L) (hc (m + L)) V + have hnon : 0 ≤ ε / τ ^ p * D m := mul_nonneg (div_nonneg hε (pow_nonneg hτ.le _)) (hD m) + have h1' := h1.trans (mul_le_mul_of_nonneg_left hS hnon) + have h0' := h0.trans (mul_le_mul_of_nonneg_left + (supportedWeightedSeminorm_mono s (show m + 1 ≤ m + (L + 1) by omega) V) + (mul_nonneg (fullErrorConstant_nonneg _ _ (hB m)) (div_nonneg hτ.le hs.le))) + change supportedWeightedSeminorm K s m + (conjugatedDLM τ hG K (initialMode τ h K hKU V 0) + R (initialMode τ h K hKU V 0)) ≤ _ + calc + _ ≤ supportedWeightedSeminorm K s m (conjugatedDLM τ hG K (initialMode τ h K hKU V 0)) + + supportedWeightedSeminorm K s m (R (initialMode τ h K hKU V 0)) := map_add_le_add _ _ _ + _ ≤ fullErrorConstant n m (B m) * (τ / s) * supportedWeightedSeminorm K s (m + (L + 1)) V + + (ε / τ ^ p * D m) * (initialConstant n (m + L) (B (m + L)) * + supportedWeightedSeminorm K s (m + L + 1) V) := add_le_add h0' h1' + _ ≤ (τ / s) * max (fullErrorConstant n m (B m)) (D m * initialConstant n (m + L) (B (m + L))) * + supportedWeightedSeminorm K s (m + (L + 1)) V + + (ε / τ ^ p) * max (fullErrorConstant n m (B m)) (D m * initialConstant n (m + L) (B (m + L))) * + supportedWeightedSeminorm K s (m + (L + 1)) V := by + rw [Nat.add_assoc] + apply add_le_add + · rw [mul_comm (fullErrorConstant n m (B m)) (τ / s)] + exact mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left (le_max_left _ _) (div_nonneg hτ.le hs.le)) (apply_nonneg (supportedWeightedSeminorm K s (m + (L + 1))) V) + · rw [mul_assoc, ← mul_assoc (D m), mul_assoc (ε / τ ^ p)] + exact mul_le_mul_of_nonneg_left + (mul_le_mul_of_nonneg_right (le_max_right _ _) (apply_nonneg (supportedWeightedSeminorm K s (m + (L + 1))) V)) + (div_nonneg hε (pow_nonneg hτ.le _)) + _ = _ := by ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fa52a1342f2c2b55873524b3396719c5d7817ab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeBounds.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeMode + +namespace OAI + +/-! Residuals of the actual finite free-mode correction gain an arbitrary +fixed power while retaining the same perturbation exponent. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem perturbedFreeMode_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) + (V : SupportedField (F := Ambient n) K) + (hX : ∀ x ∈ U, coordDeriv dx G x ⬝ᵥ V x = 0) + (hY : ∀ x ∈ U, coordDeriv dy G x ⬝ᵥ V x = 0) + (hV : ∀ x ∈ U, goodSecond G x ⬝ᵥ V x = 0) (q m : ℕ) : + let η := τ / s + ε / τ ^ p + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let C := fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) * + supportedWeightedSeminorm K s (r + (L + 1)) V + supportedWeightedSeminorm K s m + (((conjugatedDLM τ hG K).restrictScalars ℝ + R) (perturbedFreeMode τ hG h K hKU R V q)) ≤ + η ^ (q + 1) * FiniteParametrix.boundProfile (L + 1) κ C q m := by + dsimp only + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hdef := perturbed_geometric_defect_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR + have hinit := perturbed_initial_free_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR V hX hY hV + have hh := FiniteParametrix.residual_bound_succ + ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) 0 + (initialMode τ h K hKU V 0) (fun r => supportedWeightedSeminorm K s r) (L + 1) + (fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + (fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) * + supportedWeightedSeminorm K s (r + (L + 1)) V) + hη (fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _)) hdef + (fun r => by simpa only [sub_zero, mul_assoc] using hinit r) q m + simpa only [FiniteParametrix.residual, sub_zero, perturbedFreeMode] using hh + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeSize.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeSize.lean new file mode 100644 index 0000000000000000000000000000000000000000..0543dbb5db3c3d57be9b5b76fb35a9a2d7a5aa70 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeModeSize.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeModeBounds + +namespace OAI + +/-! The finite perturbed free mode stays close to its original normal seed. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem perturbedFreeMode_near_seed (τ : ℝ) (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) + (V : SupportedField (F := Ambient n) K) + (hX : ∀ x ∈ U, coordDeriv dx G x ⬝ᵥ V x = 0) + (hY : ∀ x ∈ U, coordDeriv dy G x ⬝ᵥ V x = 0) + (hV : ∀ x ∈ U, goodSecond G x ⬝ᵥ V x = 0) (q m : ℕ) : + let η := τ / s + ε / τ ^ p + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let C := fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) * + supportedWeightedSeminorm K s (r + (L + 1)) V + supportedWeightedSeminorm K s m (perturbedFreeMode τ hG h K hKU R V q - V) ≤ + η * ((∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) κ C i (m + (L + 1))) + + amplitudeConstant n m (B m) * supportedWeightedSeminorm K s (m + (L + 1)) V) := by + let η := τ / s + ε / τ ^ p + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let C := fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) * + supportedWeightedSeminorm K s (r + (L + 1)) V + have hη : 0 ≤ η := 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 hC : ∀ r, 0 ≤ C r := fun r => mul_nonneg + ((fullErrorConstant_nonneg _ _ (hB r)).trans (le_max_left _ _)) (apply_nonneg _ _) + have hdef := perturbed_geometric_defect_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR + have hinit := perturbed_initial_free_bound τ hG h K hKU hτ hs hτs hs1 hε B D hB hD hc R hR V hX hY hV + have hS : ∀ r f, supportedWeightedSeminorm K s r (forcedModeLM τ hG h K hKU 0 f) ≤ + initialConstant n r (B r) * supportedWeightedSeminorm K s (r + (L + 1)) f := by + intro r f + apply (forcedModeLM_zero_bound τ hG h K hKU hτ hs hτs hs1 (hB r) r (hc r) f).trans + exact mul_le_mul_of_nonneg_left (supportedWeightedSeminorm_mono s (by omega) f) + (initialConstant_nonneg _ _ (hB r)) + have hfinite := FiniteParametrix.improve_sub_initial_small + ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) 0 (initialMode τ h K hKU V 0) + (fun r => supportedWeightedSeminorm K s r) (fun r => supportedWeightedSeminorm K s r) + (L + 1) κ C (fun r => initialConstant n r (B r)) hη hsmall hκ hC + (fun r => initialConstant_nonneg _ _ (hB r)) hdef hS + (fun r => by simpa only [sub_zero, C, η, mul_assoc] using hinit r) q m + have hseed := initialMode_free_difference τ h K hKU hτ hs hs1 (hB m) m (hc m) V + have hseed' : supportedWeightedSeminorm K s m (initialMode τ h K hKU V 0 - V) ≤ + η * (amplitudeConstant n m (B m) * supportedWeightedSeminorm K s (m + (L + 1)) V) := by + apply hseed.trans + have hle : τ / s ≤ η := le_add_of_nonneg_right (div_nonneg hε (pow_nonneg hτ.le _)) + calc + _ ≤ amplitudeConstant n m (B m) * η * supportedWeightedSeminorm K s (m + 1) V := + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hle + (amplitudeConstant_nonneg _ _ (hB m))) (apply_nonneg _ _) + _ ≤ amplitudeConstant n m (B m) * η * supportedWeightedSeminorm K s (m + (L + 1)) V := + mul_le_mul_of_nonneg_left (supportedWeightedSeminorm_mono s (by omega) V) + (mul_nonneg (amplitudeConstant_nonneg _ _ (hB m)) hη) + _ = _ := by ring + change supportedWeightedSeminorm K s m (perturbedFreeMode τ hG h K hKU R V q - V) ≤ _ + have heq : perturbedFreeMode τ hG h K hKU R V q - V = + (perturbedFreeMode τ hG h K hKU R V q - initialMode τ h K hKU V 0) + + (initialMode τ h K hKU V 0 - V) := by abel + rw [heq] + calc + _ ≤ supportedWeightedSeminorm K s m (perturbedFreeMode τ hG h K hKU R V q - initialMode τ h K hKU V 0) + + supportedWeightedSeminorm K s m (initialMode τ h K hKU V 0 - V) := map_add_le_add _ _ _ + _ ≤ _ := (add_le_add hfinite hseed').trans_eq (by ring) + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeOrderBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeOrderBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..50d11acae371bdc65f288ecffd9b546506a86ca1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeOrderBounds.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeModeSize +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteProfileBounds + +namespace OAI + +/-! Finite derivative orders and seed-independent constants for the free correction. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +lemma finite_deviation_budget {n : ℕ} (K : Compacts Base) (s : ℝ≥0) (L q m : ℕ) + (B κ γ : ℕ → ℝ) (hB : ∀ r, 0 ≤ B r) (hκ : ∀ r, 0 ≤ κ r) (hγ : ∀ r, 0 ≤ γ r) + (V : SupportedField (F := Ambient n) K) : + (∑ i ∈ Finset.range q, B m * FiniteParametrix.boundProfile L κ + (fun r => γ r * supportedWeightedSeminorm K s (r + L) V) i (m + L)) ≤ + (∑ i ∈ Finset.range q, B m * FiniteParametrix.boundProfile L κ γ i (m + L)) * + supportedWeightedSeminorm K s (m + (q + 1) * L) V := by + rw [Finset.sum_mul] + apply Finset.sum_le_sum + intro i hi + rw [FiniteParametrix.boundProfile_terminal L κ γ + (fun r => supportedWeightedSeminorm K s r V), ← mul_assoc] + apply mul_le_mul_of_nonneg_left + · apply supportedWeightedSeminorm_mono s _ V + have hi' := Finset.mem_range.mp hi + have hmul := Nat.mul_le_mul_right L (show i + 2 ≤ q + 1 by omega) + convert Nat.add_le_add_left hmul m using 1 + ring + · exact mul_nonneg (hB m) (FiniteParametrix.boundProfile_nonneg hκ hγ i (m + L)) + +theorem perturbedFreeMode_near_seed_order (τ : ℝ) {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) + (V : SupportedField (F := Ambient n) K) + (hX : ∀ x ∈ U, coordDeriv dx G x ⬝ᵥ V x = 0) + (hY : ∀ x ∈ U, coordDeriv dy G x ⬝ᵥ V x = 0) + (hV : ∀ x ∈ U, goodSecond G x ⬝ᵥ V x = 0) (q m : ℕ) : + let η := τ / s + ε / τ ^ p + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let γ := fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + supportedWeightedSeminorm K s m (perturbedFreeMode τ hG h K hKU R V q - V) ≤ + η * ((∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) κ γ i (m + (L + 1))) + amplitudeConstant n m (B m)) * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + dsimp only + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + apply (perturbedFreeMode_near_seed τ hG h K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR V hX hY hV q m).trans + have hsum := finite_deviation_budget K s (L + 1) q m + (fun r => initialConstant n r (B r)) + (fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + (fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + (fun r => initialConstant_nonneg _ _ (hB r)) + (fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _)) + (fun r => (fullErrorConstant_nonneg _ _ (hB r)).trans (le_max_left _ _)) V + have hseed := mul_le_mul_of_nonneg_left + (supportedWeightedSeminorm_mono s (show m + (L + 1) ≤ m + (q + 1) * (L + 1) by + have hh := Nat.mul_le_mul_right (L + 1) (show 1 ≤ q + 1 by omega) + omega) V) (amplitudeConstant_nonneg n m (hB m)) + calc + _ ≤ (τ / s + ε / τ ^ p) * (_ * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V + + amplitudeConstant n m (B m) * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V) := + mul_le_mul_of_nonneg_left (add_le_add hsum hseed) hη + _ = _ := by ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeUniformBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeUniformBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..de5491ec938573e59d976316ba68346734872cfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedFreeUniformBounds.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeOrderBounds +import OAI.Geometry.SurfaceImmersion.Correction.SupportedFreeLinearity + +namespace OAI + +/-! Seed-independent finite-order estimates for the actual free-mode map. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem perturbedFreeLM_uniform_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 ≤ ε) + (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) (q m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (V : SupportedField (F := Ambient n) K), + FreeCoefficient G U V → + supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) ≤ + (τ / s + ε / τ ^ p) * C * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V ∧ + supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V) ≤ + (1 + C) * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + let κ := fun r => max (errorConstant r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let γ := fun r => max (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L))) + let C := (∑ i ∈ Finset.range q, initialConstant n m (B m) * + FiniteParametrix.boundProfile (L + 1) κ γ i (m + (L + 1))) + amplitudeConstant n m (B m) + have hκ : ∀ r, 0 ≤ κ r := fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _) + have hγ : ∀ r, 0 ≤ γ r := fun r => (fullErrorConstant_nonneg _ _ (hB r)).trans (le_max_left _ _) + have hC : 0 ≤ C := add_nonneg (Finset.sum_nonneg fun i _ => + mul_nonneg (initialConstant_nonneg n m (hB m)) + (FiniteParametrix.boundProfile_nonneg hκ hγ i (m + (L + 1)))) + (amplitudeConstant_nonneg n m (hB m)) + refine ⟨C, hC, ?_⟩ + intro V hV + have he := perturbedFreeMode_near_seed_order τ hG h K hKU hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR V hV.perpX hV.perpY hV.perpSecond q m + change supportedWeightedSeminorm K s m (perturbedFreeMode τ hG h K hKU R V q - V) ≤ + (τ / s + ε / τ ^ p) * C * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V at he + rw [← perturbedFreeLM_apply] at he + refine ⟨he, ?_⟩ + have hn : 0 ≤ C * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := + mul_nonneg hC (apply_nonneg _ _) + have hmono := supportedWeightedSeminorm_mono s + (show m ≤ m + (q + 1) * (L + 1) by omega) V + have he' : supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) ≤ + C * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + apply he.trans + simpa only [mul_assoc, one_mul] using mul_le_mul_of_nonneg_right hsmall hn + calc + _ = supportedWeightedSeminorm K s m ((perturbedFreeLM τ hG h K hKU R q V - V) + V) := by + rw [sub_add_cancel] + _ ≤ supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) + + supportedWeightedSeminorm K s m V := map_add_le_add _ _ _ + _ ≤ C * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V + + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := add_le_add he' hmono + _ = _ := by ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..e79609e6bcc57c43864ad221ade46369eb8f39b4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanBounds.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeUniformBounds +import OAI.Geometry.SurfaceImmersion.Correction.SupportedMeanError +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledGradientEstimates + +namespace OAI + +/-! Quantitative quadratic-mean error for the actual finite perturbed free modes. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem perturbedFreeLM_mean_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 ≤ ε) + (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) (q m : ℕ) : + let N := m + 1 + (q + 1) * (L + 1) + let η := τ / s + ε / τ ^ p + let T := perturbedFreeLM τ hG h K hKU R q + ∃ C : ℝ, 0 ≤ C ∧ ∀ (V W : SupportedField (F := Ambient n) K), + FreeCoefficient G U V → FreeCoefficient G U W → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m + (C * supportedWeightedSeminorm K s N V * supportedWeightedSeminorm K s N W * η / τ ^ 2) + (seedMeanError τ T V W v w) := by + dsimp only + obtain ⟨A, hA, ha⟩ := perturbedFreeLM_uniform_bound τ hG h K hKU hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q (m + 1) + let η := τ / s + ε / τ ^ p + let N := m + 1 + (q + 1) * (L + 1) + let T := perturbedFreeLM τ hG h K hKU R q + have hη : 0 ≤ η := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hratio : τ / s ≤ η := le_add_of_nonneg_right (div_nonneg hε (pow_nonneg hτ.le _)) + have hw (V : SupportedField (F := Ambient n) K) (hV : FreeCoefficient G U V) : + WeightedBound Set.univ s (m + 1) ((1 + A) * supportedWeightedSeminorm K s N V) (T V) ∧ + WeightedBound Set.univ s m (η * (A * supportedWeightedSeminorm K s N V)) (fun x => T V x - V x) ∧ + WeightedBound Set.univ s m (supportedWeightedSeminorm K s N V) V := by + obtain ⟨he, hz⟩ := ha V hV + refine ⟨(weightedBound_of_supportedSeminorm s (m + 1) (T V)).mono_const hz, ?_, ?_⟩ + · have he' := ((weightedBound_of_supportedSeminorm s (m + 1) (T V - V)).mono_const he).mono_order + (show m ≤ m + 1 by omega) + convert he' using 1 + ring + · exact (weightedBound_of_supportedSeminorm s N V).mono_order (by dsimp [N]; omega) + let C := (n : ℝ) * 2 ^ m * ((1 + 2 * A) * (2 + 2 * A) + (1 + 2 * A)) + have hC : 0 ≤ C := by dsimp [C]; positivity + refine ⟨C, hC, ?_⟩ + intro V W hV hW v w hv hw' + obtain ⟨hZ, hE, hVb⟩ := hw V hV + obtain ⟨hZ', hE', hWb⟩ := hw W hW + have hVN : 0 ≤ supportedWeightedSeminorm K s N V := apply_nonneg _ _ + have hWN : 0 ≤ supportedWeightedSeminorm K s N W := apply_nonneg _ _ + have hm := weighted_mean_small_error isOpen_univ hτ hs hη hsmall hratio + (mul_nonneg (by linarith : 0 ≤ 1 + A) hVN) (mul_nonneg hA hVN) hVN + (mul_nonneg (by linarith : 0 ≤ 1 + A) hWN) (mul_nonneg hA hWN) hWN + (T V).contDiff.contDiffOn V.contDiff.contDiffOn (T W).contDiff.contDiffOn W.contDiff.contDiffOn + hZ hE hVb hZ' hE' hWb v w hv hw' + change WeightedBound Set.univ s m _ (seedMeanError τ T V W v w) at hm + convert hm using 1 + dsimp [C] + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..f41ffccb1aeb3fd0c7a0adf525ad320900681c98 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanDifference.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedMeanBounds + +namespace OAI + +/-! The actual metric mean correction has a small finite-loss difference bound. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem perturbedFreeLM_mean_difference (τ : ℝ) (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) (q m : ℕ) : + let N := m + 1 + (q + 1) * (L + 1) + let η := τ / s + ε / τ ^ p + let T := perturbedFreeLM τ hG h K hKU R q + ∃ C : ℝ, 0 ≤ C ∧ ∀ (V W : SupportedField (F := Ambient n) K), + FreeCoefficient G U V → FreeCoefficient G U W → + ∀ a d : ℝ, 0 ≤ a → 0 ≤ d → + supportedWeightedSeminorm K s N V ≤ a → supportedWeightedSeminorm K s N W ≤ a → + supportedWeightedSeminorm K s N (V - W) ≤ d → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m (C * a * d * η / τ ^ 2) + (fun x => seedMeanError τ T V V v w x - seedMeanError τ T W W v w x) := by + dsimp only + obtain ⟨C, hC, hcmean⟩ := perturbedFreeLM_mean_bound τ hG h K hKU hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m + refine ⟨2 * C, mul_nonneg (by norm_num) hC, ?_⟩ + intro V W hV hW a d ha hd hVa hWa hDiff v w hv hw + have hsub : FreeCoefficient G U (V - W : SupportedField (F := Ambient n) K) := hV.sub hW + have h1 := hcmean (V - W) V hsub hV v w hv hw + have h2 := hcmean W (V - W) hW hsub v w hv hw + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have h1' := h1.mono_const (show C * supportedWeightedSeminorm K s _ (V - W) * + supportedWeightedSeminorm K s _ V * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * d * a * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have h2' := h2.mono_const (show C * supportedWeightedSeminorm K s _ W * + supportedWeightedSeminorm K s _ (V - W) * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * a * d * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have hadd := h1'.add isOpen_univ.uniqueDiffOn hs.le + (seedMeanError_smooth τ _ (V - W) V v w).contDiffOn + (seedMeanError_smooth τ _ W (V - W) v w).contDiffOn h2' + have he := hadd.congr (fun x _ => seedMeanError_difference τ _ V W v w x) + convert he using 1 + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..4d72e2bb67c800b2e9fe0c475095de86b5dc95a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedMeanTransfer.lean @@ -0,0 +1,187 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedSolverTransfer +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanProfile + +namespace OAI + +/-! Transfer actual geometric mean data to a fixed polynomial perturbation. +The cutoff, form, local geometry and reconstruction budgets stay the same. +Only the polynomial profile and the required input-jet orders change. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +private lemma empty_tensorOrder : tensorOrder emptyMetricPolynomial = 0 := by + simp [tensorOrder,order,emptyMetricPolynomial] + +def ChartedMeanProfile.withPolynomial {n : ℕ} + (p₀ : ChartedMeanProfile emptyMetricPolynomial) + (P : Fin 3 → Fin n → Expression) {O : Set LowJet} (hO : IsOpen O) + (hP : ∀ k j, (P k j).SmoothCoeffs O) (hQO : p₀.Q ⊆ O) (D : ℕ → ℝ) : + ChartedMeanProfile P where + U := p₀.U + O := O + Q := p₀.Q + V := p₀.V + openU := p₀.openU + openO := hO + openV := p₀.openV + compact := p₀.compact + subsetDomain := hQO + smoothP := hP + C := p₀.C + D := D + J := p₀.J + inv := p₀.inv + forms := p₀.forms + psi := p₀.psi + normal := p₀.normal + B := fun m => p₀.B (m + tensorOrder P) + F := fun m => p₀.F (m + tensorOrder P) + nonnegC := p₀.nonnegC + oneLEJ := p₀.oneLEJ + oneLEInv := p₀.oneLEInv + oneLEForms := p₀.oneLEForms + oneLEPsi := p₀.oneLEPsi + oneLENormal := p₀.oneLENormal + oneLEB := fun m => p₀.oneLEB (m + tensorOrder P) + nonnegF := fun m => p₀.nonnegF (m + tensorOrder P) + +namespace ChartedMeanData +variable {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + {c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +def withPolynomial {n : ℕ} (d₀ : ChartedMeanData c₀ r ρ R reference) + (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) + (hQO : d₀.compactJets ⊆ O) : + ChartedMeanData (c₀.withPolynomial P ε hO hP hGO D hD hpoly) r ρ R reference where + cutoff := d₀.cutoff + form := d₀.form + localBounds := d₀.localBounds + budgets := d₀.budgets + compactJets := d₀.compactJets + compact := d₀.compact + subsetDomain := hQO + mapsJets := d₀.mapsJets + B := fun m => d₀.B (m + tensorOrder P) + F := fun m => d₀.F (m + tensorOrder P) + oneLEB := fun m => d₀.oneLEB (m + tensorOrder P) + nonnegF := fun m => d₀.nonnegF (m + tensorOrder P) + jetsBound := by + intro m + change WeightedBound c₀.U s (m + tensorOrder P) + (d₀.B (m + tensorOrder P)) (lowJet G) + simpa only [empty_tensorOrder,Nat.add_zero] using d₀.jetsBound (m + tensorOrder P) + phaseBound := by + intro m v + change WeightedBound c₀.U s (m + tensorOrder P) + (d₀.F (m + tensorOrder P)) (fun x => fderiv ℝ φ x (coordinateVector v)) + simpa only [empty_tensorOrder,Nat.add_zero] using d₀.phaseBound (m + tensorOrder P) v + +end ChartedMeanData + +theorem ChartedMeanProfile.Fits.withPolynomial {n : ℕ} + {p₀ : ChartedMeanProfile emptyMetricPolynomial} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + {c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + {d₀ : ChartedMeanData c₀ r ρ R reference} (hf : p₀.Fits d₀) + (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) + (hQO : p₀.Q ⊆ O) : + (p₀.withPolynomial P hO hP hQO D).Fits + (d₀.withPolynomial P ε hO hP hGO D hD hpoly + (fun _ hx => hQO (by simpa only [hf.range] using hx))) := by + refine ⟨hf.domain,hf.coefficients,rfl,hf.coordinates,hf.target, + hf.inverse,hf.forms,hf.cutoff,hf.normal,?_,?_,hf.range⟩ + · funext m + exact congrFun hf.jets (m + tensorOrder P) + · funext m + exact congrFun hf.phase (m + tensorOrder P) + +/-- The perturbed mean profile is fixed before the map and scales. The +existing mean datum supplies the same cutoff, form and geometric budgets. -/ +theorem uniform_perturbed_mean_transfer {n : ℕ} + (p₀ : ChartedMeanProfile emptyMetricPolynomial) + (P : Fin 3 → Fin n → Expression) {O : Set LowJet} (hO : IsOpen O) + (hP : ∀ k j, (P k j).SmoothCoeffs O) (hQO : p₀.Q ⊆ O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ p₀.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) + (hebound : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ p₀.J m) + (hibound : ∀ m j, 1 ≤ j → j ≤ m + 1 → ∀ x ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ p₀.inv (m + 1)) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) (φ : Base → ℝ) + (τ ε : ℝ) (s : ℝ≥0), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + ∀ (c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s), + c₀.e = e → ∀ {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d₀ : ChartedMeanData c₀ r ρ R reference), p₀.Fits d₀ → + ∃ c : PolynomialSolveData P ε G hG φ K τ s, + ∃ d : ChartedMeanData c r ρ R reference, + (p₀.withPolynomial P hO hP hQO D).Fits d ∧ c.e = e ∧ + (∀ x, d.cutoff x = d₀.cutoff x) ∧ d.form = d₀.form := by + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds + p₀.openU hO p₀.compact hQO P hP K hKU e he hi hKe + (fun m => p₀.B (m + tensorOrder P)) (fun m => p₀.F (m + tensorOrder P)) + p₀.J (fun m => p₀.inv (m + 1)) + (fun m => p₀.oneLEB (m + tensorOrder P)) + (fun m => p₀.nonnegF (m + tensorOrder P)) p₀.oneLEJ + (fun m => p₀.oneLEInv (m + 1)) hebound hibound + refine ⟨D,hD,?_⟩ + intro G hG φ τ ε s hτ hs hτs hs1 hε hε1 c₀ he₀ r ρ R reference d₀ hf + subst e + have hGQ : Set.MapsTo (lowJet G) p₀.U p₀.Q := by + simpa only [hf.domain,hf.range] using d₀.mapsJets + have hGb (m : ℕ) : WeightedBound p₀.U s (m + tensorOrder P) + (p₀.B (m + tensorOrder P)) (lowJet G) := by + simpa only [empty_tensorOrder,Nat.add_zero,hf.domain,hf.jets] using + d₀.jetsBound (m + tensorOrder P) + have hφb (m : ℕ) (v : Fin 2) : WeightedBound p₀.U s (m + tensorOrder P) + (p₀.F (m + tensorOrder P)) (fun x => fderiv ℝ φ x (coordinateVector v)) := by + simpa only [empty_tensorOrder,Nat.add_zero,hf.domain,hf.phase] using + d₀.phaseBound (m + tensorOrder P) v + have hGO : Set.MapsTo (lowJet G) c₀.U O := by + intro x hx + exact hQO (hGQ (by simpa only [hf.domain] using hx)) + have 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 := by + simpa only [← hf.domain] using + hd G φ hG c₀.smoothPhase hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb + let c := c₀.withPolynomial P ε hO hP hGO D hD hpoly + let d := d₀.withPolynomial P ε hO hP hGO D hD hpoly + (fun _ hx => hQO (by simpa only [hf.range] using hx)) + exact ⟨c,d,hf.withPolynomial P ε hO hP hGO D hD hpoly hQO,rfl, + (fun _ => rfl),rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedRootMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedRootMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ff424e63f0fb41ea415ed2c9abea82c31a280354 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PerturbedRootMean.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedRootAmplitude + +namespace OAI + +/-! The actual square-root trial amplitudes satisfy the small mean-map +value and difference estimates for the perturbed free-mode construction. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates RootMean +open JetPolynomial (SupportedField supportedWeightedSeminorm) + +variable {F : RField 4} {U : Set Base} + +theorem perturbed_root_mean_bounds (δ τ : ℝ) (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 : ℕ) {r R₀ C P N : ℝ} (hr : 0 < r) (hC : 1 ≤ C) (hP : 0 ≤ P) (hN : 0 ≤ N) + (hbN : WeightedBound U s (m + 1 + (q + 1) * (L + 1)) N (freeNormal F)) : + ∃ E : ℝ, 1 ≤ E ∧ ∀ (ψ : 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 ≤ d → supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) ψ ≤ P → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) C u → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) C v → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) d (fun x => u x - v x) → + let bu := supportedRootAmplitude h.isOpen K hKU ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let bv := supportedRootAmplitude h.isOpen K hKU ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + ∀ a b : Base, ‖a‖ ≤ 1 → ‖b‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (normalizedPerturbedMean δ τ hF h K hKU R q bu a b) ∧ + WeightedBound Set.univ s m (E * (τ / s + ε / τ ^ p) * d) + (fun x => normalizedPerturbedMean δ τ hF h K hKU R q bu a b x - + normalizedPerturbedMean δ τ hF h K hKU R q bv a b x) := by + obtain ⟨A, hA, ha⟩ := supportedRootAmplitude_bounds h.isOpen K hKU (R := R₀) hr hC hP + (m + 1 + (q + 1) * (L + 1)) + have hA0 := zero_le_one.trans hA + obtain ⟨Cv, hCv, hval⟩ := normalizedPerturbedMean_bound δ τ hF h K hKU hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA0 hN hbN + obtain ⟨Cd, hCd, hdiff⟩ := normalizedPerturbedMean_difference δ τ hF h K hKU hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA0 hN hbN + let E := max 1 (max Cv (Cd * A)) + have hvE : Cv ≤ E := (le_max_left _ _).trans (le_max_right _ _) + have hdE : Cd * A ≤ E := (le_max_right _ _).trans (le_max_right _ _) + refine ⟨E, le_max_left _ _, ?_⟩ + intro ψ u v hu hv hru hrv d hd hψ hbu hbv hdu + obtain ⟨hbu', hbv', hdu'⟩ := ha s ψ u v hu hv hru hrv d hs hd hψ hbu hbv hdu + dsimp only + intro a b ha hb + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + constructor + · exact (hval _ hbu' a b ha hb).mono_const (mul_le_mul_of_nonneg_left hvE hη) + · have hh := hdiff _ _ (A * d) (mul_nonneg hA0 hd) hbu' hbv' hdu' a b ha hb + apply hh.mono_const + calc + Cd * (τ / s + ε / τ ^ p) * (A * d) = (Cd * A) * ((τ / s + ε / τ ^ p) * d) := by ring + _ ≤ E * ((τ / s + ε / τ ^ p) * d) := mul_le_mul_of_nonneg_right hdE (mul_nonneg hη hd) + _ = _ := by ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PhaseMeanDomains.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PhaseMeanDomains.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae0a22db35eeb010f4d3cfc1184299c3a1af7ee8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PhaseMeanDomains.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCoefficientMargins +import OAI.Geometry.Immersion.ClosedSurface.ImmersionJets +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseSupportCoordinates + +namespace OAI + +/-! Compact good geometry supplies the open domains and strict coefficient +margins needed by the actual local mean construction. -/ +noncomputable section +open Set Filter TopologicalSpace +open scoped ContDiff Topology BigOperators + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes PhaseMean + +theorem compact_good_phase_neighborhood {F : RField 4} (hF : ContDiff ℝ ∞ F) + (K : Compacts Base) (hImm : ∀ x ∈ (K : Set Base), Function.Injective (fderiv ℝ F x)) + (ξ : Base) (hgood : ∀ x ∈ (K : Set Base), Good (realSecondTensor F x) ξ) : + ∃ Ω : Set Base, IsOpen Ω ∧ (K : Set Base) ⊆ Ω ∧ + ∀ x ∈ Ω, Function.Injective (fderiv ℝ F x) ∧ Good (realSecondTensor F x) ξ := by + let Ω : Set Base := {x | NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x) ≠ 0 ∧ + Good (realSecondTensor F x) ξ} + have hΩ : IsOpen Ω := by + apply isOpen_iff_mem_nhds.mpr + intro x hx + have hd := (continuous_gramDet_field hF).continuousAt.eventually_ne hx.1 + have hg := good_eventually (contDiffAt_realSecondTensor hF x hx.1).continuousAt + continuousAt_const hx.2 + exact hd.and hg + refine ⟨Ω,hΩ,?_,?_⟩ + · intro x hx + exact ⟨gramDet_ne_zero_of_injective _ (hImm x hx),hgood x hx⟩ + · intro x hx + exact ⟨injective_of_gramDet_ne_zero _ hx.1,hx.2⟩ + +/-- The three phases share positive trial and coefficient radii. All domains +and radii are chosen from the fixed compact reference geometry. -/ +theorem compact_phase_mean_domains {F : RField 4} (hF : ContDiff ℝ ∞ F) + (K : Compacts Base) (hImm : ∀ x ∈ (K : Set Base), Function.Injective (fderiv ℝ F x)) + (ξ : Fin 3 → Base) + (hgood : ∀ j x, x ∈ (K : Set Base) → Good (realSecondTensor F x) (ξ j)) + (Q : Fin 3 → PhaseMean.Tensor →L[ℝ] ℝ) (H : Base → PhaseMean.Tensor) (hH : Continuous H) + (hpos : ∀ j x, x ∈ (K : Set Base) → 0 < Q j (H x)) : + ∃ r ρ R : ℝ, 0 < r ∧ 0 < ρ ∧ 0 < R ∧ + ∃ U K₁ Ω : Fin 3 → Set Base, + (∀ j, IsOpen (U j)) ∧ (∀ j, IsCompact (K₁ j)) ∧ (∀ j, IsOpen (Ω j)) ∧ + (∀ j, (K : Set Base) ⊆ U j) ∧ (∀ j, U j ⊆ K₁ j) ∧ (∀ j, K₁ j ⊆ Ω j) ∧ + (∀ j x, x ∈ Ω j → Function.Injective (fderiv ℝ F x) ∧ + Good (realSecondTensor F x) (ξ j)) ∧ + (∀ j x, x ∈ K₁ j → ρ + ‖Q j‖*r ≤ Q j (H x) ∧ + Q j (H x) ≤ R - ‖Q j‖*r) := by + classical + choose Ω hΩ hKΩ hgeom using fun j => + compact_good_phase_neighborhood hF K hImm (ξ j) (hgood j) + choose U hU hKU hUc hUΩ a b c ha hb hc hmargin using fun j => + compact_coefficient_margins K.isCompact (hΩ j) (hKΩ j) hH.continuousOn (Q j) (hpos j) + let r := min (a 0) (min (a 1) (a 2)) + let ρ := min (b 0) (min (b 1) (b 2)) + let R := ∑ j : Fin 3, c j + have hr : 0 < r := lt_min (ha 0) (lt_min (ha 1) (ha 2)) + have hρ : 0 < ρ := lt_min (hb 0) (lt_min (hb 1) (hb 2)) + have hra (j : Fin 3) : r ≤ a 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 _ _) + have hρb (j : Fin 3) : ρ ≤ b 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 _ _) + have hcR (j : Fin 3) : c j ≤ R := + Finset.single_le_sum (fun k _ => (hc k).le) (Finset.mem_univ j) + have hR : 0 < R := (hc 0).trans_le (hcR 0) + refine ⟨r,ρ,R,hr,hρ,hR,U,(fun j => closure (U j)),Ω, + hU,hUc,hΩ,hKU,(fun _ => subset_closure),hUΩ,hgeom,?_⟩ + intro j x hx + have hm := hmargin j x hx + have hn : ‖Q j‖*r ≤ ‖Q j‖*a j := + mul_le_mul_of_nonneg_left (hra j) (norm_nonneg _) + have hl := hρb j + have hu := hcR j + constructor <;> linarith + +/-- The original-coordinate coefficient domain can always be chosen open +and bounded while containing the compact phase support. -/ +theorem compact_phase_original_domain (K : Compacts Base) : + ∃ (U₀ : Set JetPolynomial.Base) (K₀ : Compacts JetPolynomial.Base), + IsOpen U₀ ∧ U₀ ⊆ K₀ ∧ + (JetPolynomial.Perturbation.jetSupport K : Set JetPolynomial.Base) ⊆ U₀ := by + obtain ⟨U,hU,hKU,hUc,_⟩ := CollarVelocity.compact_open_thickening + (JetPolynomial.Perturbation.jetSupport K).isCompact isOpen_univ (subset_univ _) + exact ⟨U,⟨closure U,hUc⟩,hU,subset_closure,hKU⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PhasePrimitiveMeanRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PhasePrimitiveMeanRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..c58d8ed7be6c71a41544989ea220a751ffbb78ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PhasePrimitiveMeanRealization.lean @@ -0,0 +1,165 @@ +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 phasePrimitiveRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance phasePrimitiveRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance phasePrimitiveRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance phasePrimitiveRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance phasePrimitiveRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance phasePrimitiveRealizationSectionSpace (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_mean_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 : ℝ) (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.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 ∉ 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 + have hcap : 0 < 1/(1+(lm : ℝ)) := by positivity + have hPol' := cutoffTensorPolynomial_smooth hχ (tensorPolynomialCoordinatePullback_smooth hPol he hi) + obtain ⟨b,u,η,L,C,P,hb,hb16,hblm,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+(lm : ℝ))) hcap + 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 _) + refine ⟨b,u,min η η₀,L,C+D,P 0+P R+Dmap,P,hb,hb16,hu,lt_min hη hη₀, + (min_le_left _ _).trans hη1,hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,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 _ _))).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) + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hvmap',?_,?_⟩ + · 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/Correction/PolynomialAdvance.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAdvance.lean new file mode 100644 index 0000000000000000000000000000000000000000..6c128ebc295737d5ffea7830b3beba77387c1088 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAdvance.lean @@ -0,0 +1,140 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialForcingRepresentation +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicTriangularRecursion + +namespace OAI + +/-! The actual triangular correction step, retaining its polynomial representation. -/ +noncomputable section +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open CovarianceCorrector LocalPeriodicExpansion + +theorem polynomial_advance {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) (v : Fin 2) (g : Geometry (E := R4) S (coordinateVector v)) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (hYg : ∀ p ∈ S, g.Y p = Y (lowJet G p)) + (hCg : ∀ p ∈ S, g.C p = C (lowJet G p)) + (hXg : ∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) + (hVg : ∀ p ∈ S, g.V.val p = V (lowJet G p)) + (hqg : ∀ p ∈ S, g.q p = q (lowJet G p)) + (dxIndex : Fin 2) (U : ℕ → Family S R4) (R : ℕ → VectorExpression) (r : ℕ) (hr : 0 < r) + (hU : ∀ i p, p ∈ S → average ((U i).val p) = 0) + (hRs : ∀ i, (R i).SmoothCoeffs O) + (hR : ∀ i, VectorExpression.Represents G (R i) (U i)) : + ∃ W : ℕ → Family S R4, + (∀ i < r, W i = U i) ∧ (∀ i p, p ∈ S → average ((W i).val p) = 0) ∧ + (g.xxCoefficient (coordinateVector dxIndex) W r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector dxIndex) W r).fluct = 0 ∧ + (g.yyCoefficient W (r + 1)).fluct = 0 ∧ + (∀ Z : Set Base, IsOpen Z → Z ⊆ S → (∀ i p, p ∈ Z → (U i).val p = 0) → + ∀ i p, p ∈ Z → (W i).val p = 0) ∧ + (∀ i, VectorExpression.Represents G + (Function.update R r (MetricPolynomial.step Y C X₀ V q dxIndex v R r) i) (W i)) := by + let dx : Base := coordinateVector dxIndex + let dy : Base := coordinateVector v + 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) + let pb := MetricPolynomial.mixedForcing (MetricPolynomial.longitudinal X₀ V) + (MetricPolynomial.transverse Y) dxIndex v R r + let pc := MetricPolynomial.longitudinalForcing (MetricPolynomial.longitudinal X₀ V) dxIndex R r + let pd := MetricPolynomial.transverseForcing v R r + have hlong := MetricPolynomial.represents_longitudinal g X₀ V hXg hVg + have htrans := MetricPolynomial.represents_transverse g Y hYg + have hpbr : Expression.Represents G pb b := + MetricPolynomial.represents_mixedForcing hO hG hQ hRs hR hlong htrans dxIndex v r + have hpcr : Expression.Represents G pc c := + MetricPolynomial.represents_longitudinalForcing hO hG hQ hRs hR hlong dxIndex r + have hpdr : Expression.Represents G pd d := + MetricPolynomial.represents_transverseForcing hO hG hQ hRs hR v r + have hpbs : pb.SmoothCoeffs O := MetricPolynomial.smooth_mixedForcing hO hRs + (MetricPolynomial.smooth_longitudinal hX hV) (MetricPolynomial.smooth_transverse hY) dxIndex v r + have hpcs : pc.SmoothCoeffs O := MetricPolynomial.smooth_longitudinalForcing hO hRs + (MetricPolynomial.smooth_longitudinal hX hV) dxIndex r + have hpds : pd.SmoothCoeffs O := MetricPolynomial.smooth_yyQuadratic hO hRs v (r + 1) + obtain ⟨u, hu0, hb, hc, hd', hzero, hurep⟩ := exists_polynomial_cancellation hO v g + hY hC hX hV hd hq hqp hcircle hG hQ hYg hCg hXg hVg hqg + hpbs hpcs hpds b c d hpbr hpcr hpdr + 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 Geometry.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 Geometry.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 + + · intro i + by_cases hi : i = r + · subst i + rw [Function.update_self, hcur] + exact hurep + · rw [Function.update_of_ne hi, show W i = U i from Function.update_of_ne hi u U] + exact hR i + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineDerivative.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineDerivative.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5c650242c73b571b64191d4c63b409ca078a1dc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineDerivative.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAffineFamily + +namespace OAI + +/-! Actual polynomial variations at every point of an affine path, rather +than only at the parameter origin. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MixedExpression + +lemma varyBase_smooth {G : Fin 4 → Base → Space} {H : Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (hH : ContDiff ℝ ∞ H) (t : ℝ) : + ∀ i, ContDiff ℝ ∞ (varyBase G H t i) := by + intro i + by_cases hi : i = 0 + · subst i + rw [varyBase_base] + exact (hG 0).add (hH.const_smul t) + · rw [varyBase_other G H t hi] + exact hG i + +lemma varyBase_add (G : Fin 4 → Base → Space) (H : Base → Space) (t s : ℝ) : + varyBase (varyBase G H t) H s = varyBase G H (t + s) := by + funext i p + by_cases hi : i = 0 + · simp only [varyBase, hi, ↓reduceIte, add_smul] + abel + · simp only [varyBase, hi, ↓reduceIte] + +theorem differentiate_hasDerivAt_at {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) (t : ℝ) (z : Base × ℝ) + (hQ : lowJet (varyBase G (G j.succ) t 0) z.1 ∈ O) : + HasDerivAt (fun s : ℝ => e.eval (varyBase G (G j.succ) s) z) + ((e.differentiate j).eval (varyBase G (G j.succ) t) z) t := by + have hd := differentiate_hasDerivAt hO (varyBase_smooth hG (hG j.succ) t) he j z hQ + rw [varyBase_other G (G j.succ) t (Fin.succ_ne_zero j)] at hd + have hd' : HasDerivAt + (fun s : ℝ => e.eval (varyBase (varyBase G (G j.succ) t) (G j.succ) s) z) + ((e.differentiate j).eval (varyBase G (G j.succ) t) z) (t - t) := by + simpa only [sub_self] using hd + have hs := hd'.comp_sub_const t t + convert hs using 1 + funext s + rw [varyBase_add] + congr 2 + ring + +end ClosedSurfaceR4.JetPolynomial.MixedExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..dde7403a18184d7e231e2dc894f3e07e4f6d90c3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAffineFamily.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetRegularity +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetDerivatives + +namespace OAI + +/-! Joint smoothness in position and a variation parameter for actual +higher-jet polynomial expressions. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +lemma jet_affine_joint_smooth {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (w : List (Fin 2)) (a : Fin 4) : + ContDiff ℝ ∞ (fun z : Base × ℝ => jet (fun p => G p + z.2 • H p) w a z.1) := by + have he : (fun z : Base × ℝ => jet (fun p => G p + z.2 • H p) w a z.1) = + fun z => jet G w a z.1 + z.2 * jet H w a z.1 := by + funext z + rw [jet_add hG (hH.const_smul z.2), jet_smul hH] + rw [he] + exact ((jet_smooth hG w a).comp contDiff_fst).add + (contDiff_snd.mul ((jet_smooth hH w a).comp contDiff_fst)) + +lemma lowJet_affine_joint_smooth {G H : Base → Space} + (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (fun z : Base × ℝ => lowJet (fun p => G p + z.2 • H p) z.1) := by + have he : (fun z : Base × ℝ => lowJet (fun p => G p + z.2 • H p) z.1) = + fun z => lowJet G z.1 + z.2 • variationLowJet H z.1 := by + funext z + exact lowJet_affine hG hH z.2 z.1 + rw [he] + exact ((lowJet_smooth hG).comp contDiff_fst).add + (contDiff_snd.smul ((variationLowJet_smooth hH).comp contDiff_fst)) + +namespace MixedExpression + +lemma jet_varyBase_joint_smooth {G : Fin 4 → Base → Space} {H : Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (hH : ContDiff ℝ ∞ H) + (i : Fin 4) (w : List (Fin 2)) (a : Fin 4) : + ContDiff ℝ ∞ (fun z : Base × ℝ => jet (varyBase G H z.2 i) w a z.1) := by + by_cases hi : i = 0 + · subst i + simpa only [varyBase_base] using jet_affine_joint_smooth (hG 0) hH w a + · simpa only [varyBase_other G H _ hi, Function.comp_def] using (jet_smooth (hG i) w a).comp contDiff_fst + +/-- Global coefficient smoothness is obtained on the application compact set +by `Expression.exists_global_extension`. -/ +theorem eval_varyBase_joint_smooth {G : Fin 4 → Base → Space} {H : Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (hH : ContDiff ℝ ∞ H) + {e : MixedExpression} (he : e.SmoothCoeffs Set.univ) (θ : ℝ) : + ContDiff ℝ ∞ (fun z : Base × ℝ => e.eval (varyBase G H z.2) (z.1, θ)) := by + induction e with + | coeff c => + have hc : ContDiff ℝ ∞ c := contDiffOn_univ.mp (by simpa only [SmoothCoeffs, Set.univ_prod_univ] using he) + have hh := hc.comp ((lowJet_affine_joint_smooth (hG 0) hH).prodMk (contDiff_const (c := θ))) + simpa only [eval, varyBase_base, Function.comp_def] using hh + | atom i w a e ih => + exact (jet_varyBase_joint_smooth hG hH i w a).mul (ih he) + | 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/Correction/PolynomialAmplitudeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAmplitudeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..0e71695674c37539120428dd4afbaa889d2accd7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAmplitudeBounds.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialRootBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! Polynomial bounds for the supported square-root amplitudes of the +metric decomposition, including their difference estimate. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RootMean +open WeightedEstimates RealModes +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def phaseAmplitudeBudget (m : ℕ) (D B : ℝ) : ℝ := + 1+2^m*B*sqrtBudget m D B+2^m*B*rootDifferenceBudget m D B + +theorem polynomial_phaseAmplitude_bounds (m : ℕ) : + ∃ d : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ {U : Set E}, UniqueDiffOn ℝ U → ∀ {s B A : ℝ} {ψ f g : E → ℝ}, + 0 < s → 1 ≤ B → 0 ≤ A → + ContDiffOn ℝ ∞ ψ U → ContDiffOn ℝ ∞ f U → ContDiffOn ℝ ∞ g U → + (∀ x ∈ U, 0 < f x) → (∀ x ∈ U, 0 < g x) → + (∀ x ∈ U, (f x)⁻¹ ≤ B) → (∀ x ∈ U, (g x)⁻¹ ≤ B) → + WeightedBound U s m B ψ → WeightedBound U s m B f → WeightedBound U s m B g → + WeightedBound U s m A (f-g) → + WeightedBound U s m (C*B^d) (phaseAmplitude ψ f) ∧ + WeightedBound U s m (C*B^d) (phaseAmplitude ψ g) ∧ + WeightedBound U s m (C*B^d*A) (fun x => phaseAmplitude ψ f x-phaseAmplitude ψ g x) := by + obtain ⟨D,hD,hr⟩ := polynomial_root_bounds (E := E) m + have hpoly : HasPolynomialBound (phaseAmplitudeBudget m D) := by + unfold phaseAmplitudeBudget rootDifferenceBudget sqrtBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + obtain ⟨d,C,hC,hpoly⟩ := hpoly + refine ⟨d,C,hC,?_⟩ + intro U hU s B A ψ f g hs hB hA hψ hf hg hfp hgp hfi hgi hbψ hbf hbg hdiff + obtain ⟨bF,bG,bDiff⟩ := hr hU hs hB hA hf hg hfp hgp hfi hgi hbf hbg hdiff + have hB0 := zero_le_one.trans hB + have hS := sqrtBudget_nonneg m (zero_le_one.trans hD) hB0 + have hR : 0 ≤ rootDifferenceBudget m D B := by unfold rootDifferenceBudget; positivity + have hleft : 2^m*B*sqrtBudget m D B ≤ phaseAmplitudeBudget m D B := by + unfold phaseAmplitudeBudget + have hn : 0 ≤ 2^m*B*rootDifferenceBudget m D B := by positivity + linarith + have hright : 2^m*B*rootDifferenceBudget m D B ≤ phaseAmplitudeBudget m D B := by + unfold phaseAmplitudeBudget + have hn : 0 ≤ 2^m*B*sqrtBudget m D B := by positivity + linarith + have hfroot := hf.sqrt (fun x hx => (hfp x hx).ne') + have hgroot := hg.sqrt (fun x hx => (hgp x hx).ne') + have hfa := hbψ.mul_real hU hs.le hB0 hS hψ hfroot bF + have hga := hbψ.mul_real hU hs.le hB0 hS hψ hgroot bG + refine ⟨hfa.mono_const (hleft.trans (hpoly B hB).2), + hga.mono_const (hleft.trans (hpoly B hB).2),?_⟩ + have hda := hbψ.mul_real hU hs.le hB0 (mul_nonneg hR hA) hψ (hfroot.sub hgroot) bDiff + have hsize : 2^m*B*(rootDifferenceBudget m D B*A) ≤ C*B^d*A := by + calc + _ = (2^m*B*rootDifferenceBudget m D B)*A := by ring + _ ≤ C*B^d*A := mul_le_mul_of_nonneg_right (hright.trans (hpoly B hB).2) hA + apply (hda.mono_const hsize).congr + intro x hx + dsimp only [phaseAmplitude] + ring + +end ClosedSurfaceR4.RootMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFree.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFree.lean new file mode 100644 index 0000000000000000000000000000000000000000..42f4c56a6b2c8502f83c6aae2ef9d272b33b66af --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFree.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeRestore +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialChartedFreeFamily +import OAI.Geometry.SurfaceImmersion.Correction.AtlasFreeResidual + +namespace OAI + +/-! Fixed-atlas polynomial free bounds for variable finite phase families. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance polynomialAtlasFreeFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialAtlasFreeFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialAtlasFreeDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasFreeDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasFreeSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialAtlasFreeSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_finite_atlas_free (q m : ℕ) : + ∃ (p : ℕ) (E Dv Dt : ℝ), 1 ≤ E ∧ 0 ≤ Dv ∧ 0 ≤ Dt ∧ + ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)], ∀ n : ℕ, + (∀ i, Fintype.card (ι i) ≤ n) → + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)), + ∀ C J : ℕ → ℝ, + (∀ i j, (c i j).C = C ∧ (c i j).J = J ∧ ∀ k, (c i j).D k = 0) → + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + (∀ i j, (d i j).budgets.inv (m+q+1) ≤ B ∧ (d i j).budgets.forms (m+q+1) ≤ B ∧ + (d i j).budgets.psi (m+q+1) ≤ B) → + ∀ N : ℕ → ℝ, (∀ k, 0 ≤ N k) → + (∀ i j, (d i j).budgets.normal (m+q+1) ≤ N (m+q+1)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ i, WeightedEstimates.WeightedBound univ s (m+q+1) B (A.tensorPlaneRead i u)) → + A.WeightedBound τ m + (Dv*(n : ℝ)*max 1 (metricFreeSizeBudget C J N q m)*(E*B^p)*(δ*τ)) + (A.finiteAtlasFreeOscillation d hρ δ q u) ∧ + A.TensorWeightedBound τ m + (Dt*(n : ℝ)*(τ/s)^(q+1)*max 1 (metricFreeResidualBudget C J N q m)*(E*B^p)*(δ*τ)) + (linearMetricTensor F (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u)) := by + classical + obtain ⟨p,E,hE,hfree⟩ := polynomial_charted_free_family q m + obtain ⟨Dv,hDv,hv⟩ := A.vectorPlaneRestore_bound (V := RealModes.RVec 4) m + obtain ⟨Dt,hDt,ht⟩ := A.tensorPlaneRestore_bound m + refine ⟨p,E,Dv,Dt,hE,hDv,hDt,?_⟩ + intro ι _ n hn F hF φ K τ s c r ρ R reference d C J hc hρ hτ hs hτs hs1 hK B hB hρB hb N hN hnormal δ hδ u hu hball hbu + let f := fun i => chartedFreeSum (d i) hρ δ q (A.tensorPlaneRead i u) + have hf (i) : ContDiff ℝ ∞ (f i) := (chartedFreeSum_smooth_support (d i) hρ δ q _).1 + have hsp (i) : tsupport (f i) ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + intro x hx + obtain ⟨j,hj⟩ := mem_iUnion.mp ((chartedFreeSum_smooth_support (d i) hρ δ q _).2 hx) + exact hK i j hj + have hi (i) := hfree (d i) C J (hc i) hρ hτ hs hτs hs1 B hB hρB (hb i) N hN (hnormal i) + δ hδ (A.tensorPlaneRead i u) (A.tensorPlaneRead_smooth i hu) (hball i) (hbu i) + have hn' (i) : (Fintype.card (ι i) : ℝ) ≤ n := Nat.cast_le.mpr (hn i) + have hEB : 0 ≤ E*B^p := mul_nonneg (zero_le_one.trans hE) (pow_nonneg (zero_le_one.trans hB) _) + have hdt : 0 ≤ δ*τ := mul_nonneg hδ hτ.le + have hη : 0 ≤ (τ/s)^(q+1) := pow_nonneg (div_nonneg hτ.le hs.le) _ + have hsize (i) : WeightedEstimates.WeightedBound univ τ m + ((n : ℝ)*max 1 (metricFreeSizeBudget C J N q m)*(E*B^p)*(δ*τ)) (f i) := by + apply (hi i).1.mono_const + apply mul_le_mul_of_nonneg_right _ hdt + apply mul_le_mul_of_nonneg_right _ hEB + calc + _ ≤ (Fintype.card (ι i) : ℝ)*max 1 (metricFreeSizeBudget C J N q m) := + mul_le_mul_of_nonneg_left (le_max_right _ _) (Nat.cast_nonneg _) + _ ≤ _ := mul_le_mul_of_nonneg_right (hn' i) (zero_le_one.trans (le_max_left _ _)) + have hres (i) : WeightedEstimates.WeightedBound univ τ m + ((n : ℝ)*(τ/s)^(q+1)*max 1 (metricFreeResidualBudget C J N q m)*(E*B^p)*(δ*τ)) + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) (f i)) := by + have hh := (hi i).2 + simp only [coordinateFullLinearized_unperturbed,A.jetChartMap_plane] at hh + apply hh.mono_const + apply mul_le_mul_of_nonneg_right _ hdt + apply mul_le_mul_of_nonneg_right _ hEB + calc + _ ≤ (Fintype.card (ι i) : ℝ)*(τ/s)^(q+1)*max 1 (metricFreeResidualBudget C J N q m) := + mul_le_mul_of_nonneg_left (le_max_right _ _) (mul_nonneg (Nat.cast_nonneg _) hη) + _ ≤ _ := mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right (hn' i) hη) + (zero_le_one.trans (le_max_left _ _)) + rw [A.finiteAtlasFreeOscillation_eq_restore d hρ δ q u hK] + constructor + · have hh := hv f τ ((n : ℝ)*max 1 (metricFreeSizeBudget C J N q m)*(E*B^p)*(δ*τ)) + hτ (hτs.trans hs1) (by positivity) hf hsize + convert hh using 1 + ring + · rw [A.euclidean_vectorPlaneRestore_linearized hF f hf hsp] + have hh := ht _ τ ((n : ℝ)*(τ/s)^(q+1)*max 1 (metricFreeResidualBudget C J N q m)*(E*B^p)*(δ*τ)) + hτ (hτs.trans hs1) (by positivity) + (fun i => contDiffOn_univ.mp (RealModes.contDiffOn_realLinearizedTensor isOpen_univ + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hF)).contDiffOn (hf i).contDiffOn)) hres + convert hh using 1 + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFreeProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFreeProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..952287377c183bf1f6ce424ce46ad42726ab6065 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasFreeProfile.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAtlasFree + +namespace OAI + + +/-! One polynomial profile for all actual grid amplitudes, before the variable family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean RealModes +local instance polynomialFreeProfileFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialFreeProfileFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialFreeProfileDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialFreeProfileDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialFreeProfileSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialFreeProfileSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem polynomial_atlas_free_profile (q : ℕ) (C J N B : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) (hB : ∀ m, HasPolynomialBound (B m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) : + ∃ α β : ℕ → ℝ → ℝ, (∀ m, HasPolynomialBound (α m)) ∧ + (∀ m, HasPolynomialBound (β m)) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (n : ℕ), (∀ i, Fintype.card (ι i) ≤ n) → + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ 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, (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 → + (∀ i j, (modeSupport (K i j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) → + (∀ 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) → + ∀ δ : ℝ, 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)) → + ∀ m, A.WeightedBound τ m (α m x*(n : ℝ)*(δ*τ)) + (A.finiteAtlasFreeOscillation d hρ δ q u) ∧ + A.TensorWeightedBound τ m ((τ/s)^(q+1)*(β m x*(n : ℝ)*(δ*τ))) + (linearMetricTensor F (spaceCoordinates.symm ∘ A.finiteAtlasFreeOscillation d hρ δ q u)) := by + classical + choose p E Dv Dt hE hDv hDt hfree using fun m => A.polynomial_finite_atlas_free q m + let α := fun m x => Dv m*max 1 (metricFreeSizeBudget (fun j => C j x) (fun j => J j x) + (fun j => N j x) q m)*(E m*(B (m+q+1) x)^(p m)) + let β := fun m x => Dt m*max 1 (metricFreeResidualBudget (fun j => C j x) (fun j => J j x) + (fun j => N j x) q m)*(E m*(B (m+q+1) x)^(p m)) + have hα (m : ℕ) : HasPolynomialBound (α m) := + ((polynomialBound_const (hDv m)).mul + ((polynomialBound_const zero_le_one).max + (metricFreeSizeBudget_polynomial C J N hC hJ hN hC1 q m))).mul + ((polynomialBound_const (zero_le_one.trans (hE m))).mul ((hB (m+q+1)).pow (p m))) + have hβ (m : ℕ) : HasPolynomialBound (β m) := + ((polynomialBound_const (hDt m)).mul + ((polynomialBound_const zero_le_one).max + (metricFreeResidualBudget_polynomial C J N hC hJ hN hC1 q m))).mul + ((polynomialBound_const (zero_le_one.trans (hE m))).mul ((hB (m+q+1)).pow (p m))) + refine ⟨α,β,hα,hβ,?_⟩ + intro x hx ι _ n hn F hF φ K τ s c r ρ R reference d hc hρ hτ hs hτs hs1 hK hρB hb + δ hδ u hu hball hbu m + have hN0 (l : ℕ) : 0 ≤ N l x := by + obtain ⟨_,_,_,hh⟩ := hN l + exact (hh x hx).1 + have hh := hfree m n hn F hF d (fun l => C l x) (fun l => J l x) hc hρ hτ hs hτs hs1 + hK (B (m+q+1) x) (hB1 _ x hx) (hρB _) + (fun i j => ⟨(hb i j _).1,(hb i j _).2.1,(hb i j _).2.2.1⟩) + (fun l => N l x) hN0 (fun i j => (hb i j _).2.2.2) + δ hδ u hu hball (fun i => hbu i _) + constructor + · convert hh.1 using 1 + dsimp [α] + ring + · convert hh.2 using 1 + dsimp [β] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..6a375510eeb91fcf5f4707e136d16f21479dc6ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasMean.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMeanExplicit +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanTransport + +namespace OAI + +/-! The atlas mean estimate with its read and restore constants exposed. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance polynomialAtlasMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialAtlasMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialAtlasMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialAtlasMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlasMean_polynomial_majorants + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (L : ℕ) (p : ℕ → ℕ) (c G : ℕ → ℝ) + (hc : ∀ m, 1 ≤ c m) (hG : ∀ m, 1 ≤ G m) + (D E : ℕ → ℝ) (hD : ∀ m, 1 ≤ D m) (hE : ∀ m, 0 ≤ E m) + (hd : ∀ m (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 m*C) (A.tensorPlaneRead i (A.tensorDecode f))) + (he : ∀ m (f : A.centers → SmallModes.Base → Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (f i)) → + (∀ i, WeightedBound univ s m C (f i)) → + A.TensorWeightedBound s m (E m*C) (A.tensorPlaneRestore f)) : + ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorEncode reference) r f → ∀ i : A.centers, + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) + (A.tensorPlaneRead i (A.tensorDecode f))) ∧ + ∀ {s : ℝ}, 0 < s → s ≤ 1 → ∀ η : ℝ, 0 < η → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m C f, 1 ≤ C → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + WeightedBound univ s (m+L) C f → WeightedBound univ s m (η * polynomialMeanProfile p c G m C) (μ i f)) → + (∀ i m C D f g, 1 ≤ C → 0 ≤ D → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) g → + WeightedBound univ s (m+L) C f → WeightedBound univ s (m+L) C g → + WeightedBound univ s (m+L) D (f-g) → + WeightedBound univ s m (polynomialMeanProfile p c G m C * η * D) (μ i f - μ i g)) → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator (A.atlasMean μ))) + (polynomialMeanProfile (fun m => 2*p m+2) (fun m => 1+c m) + (transportedMeanGeometry L G D E)) + (polynomialMeanProfile (fun m => 2*p m+2) (fun m => 1+c m) + (transportedMeanGeometry L G D E)) := by + have hB (m : ℕ) (C : ℝ) (_hC : 1 ≤ C) : 1 ≤ polynomialMeanProfile p c G m C := by + apply one_le_mul_of_one_le_of_one_le (hc m) + apply one_le_pow₀ + exact (hG m).trans (le_add_of_nonneg_right (zero_le_one.trans (le_max_left 1 C))) + intro r hr + obtain ⟨hball,β,κ,hβ,hκ,hm⟩ := A.atlasMean_majorants_explicit reference href L + (polynomialMeanProfile p c G) (polynomialMeanProfile p c G) hB hB D E hD hE hd he r hr + subst β κ + refine ⟨hball,?_⟩ + intro s hs hs1 η hη μ hsm hv hdiff + apply (hm hs hs1 η hη μ hsm hv hdiff).mono_majorants + · intro m C hC + simpa only [polynomialMeanProfile, transportedMeanGeometry] using + polynomialMeanProfile_value_transport_bound (p m) (zero_le_one.trans (hc m)) + (hG m) (hD (m+L)) (hE m) hC + · intro m C hC + simpa only [polynomialMeanProfile, transportedMeanGeometry] using + polynomialMeanProfile_transport_bound (p m) (zero_le_one.trans (hc m)) + (hG m) (hD (m+L)) (hE m) hC + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..67ac6de152d7e1bc04590225a9ac8dc5022d89ad --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeed.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteAtlasFreeMetric +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialChartedSeed +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadBounds +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasFiniteCancellation + +namespace OAI + +/-! Actual complex amplitude bounds for arbitrary finite phase families. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean RealModes +local instance polynomialAtlasSeedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialAtlasSeedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialAtlasSeedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasSeedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialAtlasSeedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialAtlasSeedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_finite_atlas_seed (q m : ℕ) : + ∃ (p : ℕ) (E D : ℝ), 1 ≤ E ∧ 0 ≤ D ∧ + ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)], + ∀ (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ s} + {r : A.centers → ℝ} {ρ R : ℝ} {reference : A.centers → SmallModes.Base → Tensor} + (d : ∀ i j, ChartedMeanData (c i j) (r i) ρ R (reference i)), + ∀ C J : ℕ → ℝ, + (∀ i j, (c i j).C = C ∧ (c i j).J = J ∧ ∀ k, (c i j).D k = 0) → + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + (∀ i j, (d i j).budgets.inv (m+q+1) ≤ B ∧ (d i j).budgets.forms (m+q+1) ≤ B ∧ + (d i j).budgets.psi (m+q+1) ≤ B) → + ∀ N : ℕ → ℝ, (∀ k, 0 ≤ N k) → + (∀ i j, (d i j).budgets.normal (m+q+1) ≤ N (m+q+1)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) → + (∀ i, FiniteMean.InTrialBall univ (reference i) (r i) (A.tensorPlaneRead i u)) → + (∀ i, WeightedEstimates.WeightedBound univ s (m+q+1) B (A.tensorPlaneRead i u)) → + ∀ k i j, WeightedEstimates.WeightedBound univ s m + (D*metricFreeSizeBudget C J N q m*(E*B^p)*(δ*τ)) + (A.vectorPlaneRead k (A.finiteGlobalAmplitude d hρ δ q u i j)) := by + classical + obtain ⟨p,E,hE,hseed⟩ := polynomial_charted_seed_bounds q m + choose D hD hd using fun k i : A.centers => + A.localize_outer_restore_bound (V := Fin 4 → ℂ) k i m + let D₀ := ∑ k : A.centers, ∑ i : A.centers, D k i + have hD₀ : 0 ≤ D₀ := Finset.sum_nonneg fun k _ => Finset.sum_nonneg fun i _ => hD k i + refine ⟨p,E,D₀,hE,hD₀,?_⟩ + intro ι _ F hF φ K τ s c r ρ R reference d C J hc hρ hτ hs hτs hs1 B hB hρB hb N hN hnormal δ hδ u hu hball hbu k i j + have hh := hseed (d i j) (hc i j).2.2 hρ hτ hs hτs hs1 B hB hρB + (hb i j).1 (hb i j).2.1 (hb i j).2.2 N hN (hnormal i j) δ hδ + (A.tensorPlaneRead i u) (A.tensorPlaneRead_smooth i hu) (hball i) (hbu i) + have hC : (c i j).C = C := (hc i j).1 + have hJ : (c i j).J = J := (hc i j).2.1 + rw [hC,hJ] at hh + have hsize : 0 ≤ metricFreeSizeBudget C J N q m*(E*B^p)*(δ*τ) := by + have hbgt := correctedSeedBudget_nonneg 0 (c i j).C (fun _ => 0) + (c i j).nonnegC q m (hN (m+q+1)) + have hjgt := (c i j).oneLEJ m + rw [hC] at hbgt + rw [hJ] at hjgt + unfold metricFreeSizeBudget + positivity + have hout := hd k i ((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)) s + (metricFreeSizeBudget C J N q m*(E*B^p)*(δ*τ)) hs hs1 hsize + (((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff) hh + have hsm := restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + (((d i j).freeAmplitude hρ δ q (A.tensorPlaneRead i u)).contDiff) + have hplane := weightedBound_comp_isometry planeCoordinateIsometry.symm + (A.vectorChartRead_smooth k hsm) hout + change WeightedEstimates.WeightedBound univ s m + (D k i*(metricFreeSizeBudget C J N q m*(E*B^p)*(δ*τ))) + (A.vectorPlaneRead k (A.finiteGlobalAmplitude d hρ δ q u i j)) at hplane + apply hplane.mono_const + have hDi : D k i ≤ D₀ := (Finset.single_le_sum (fun j _ => hD k j) + (Finset.mem_univ i)).trans (Finset.single_le_sum + (fun k _ => Finset.sum_nonneg fun j _ => hD k j) (Finset.mem_univ k)) + calc + _ ≤ D₀*(metricFreeSizeBudget C J N q m*(E*B^p)*(δ*τ)) := + mul_le_mul_of_nonneg_right hDi hsize + _ = _ := by ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeedProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeedProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..613d39db0ec6f4d3e45434f03889dbedde9ca59d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialAtlasSeedProfile.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAtlasSeed + +namespace OAI + + +/-! One polynomial profile for all actual grid amplitudes, before the variable family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean RealModes +local instance polynomialSeedProfileFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialSeedProfileFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialSeedProfileDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialSeedProfileDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialSeedProfileSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialSeedProfileSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem polynomial_atlas_seed_profile (q : ℕ) (C J N B : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) (hB : ∀ m, HasPolynomialBound (B m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) : + ∃ α : ℕ → ℝ → ℝ, (∀ m, HasPolynomialBound (α m)) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData emptyMetricPolynomial 0 + (A.jetChartMap i F) (A.jetChartMap_smooth i hF) (φ i j) (K i j) τ 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, (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) → + ∀ δ : ℝ, 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)) → + ∀ k i j m, WeightedEstimates.WeightedBound univ s (m+1) (α m x*(δ*τ)) + (A.vectorPlaneRead k (A.finiteGlobalAmplitude d hρ δ q u i j)) := by + classical + choose p E D hE hD hseed using fun m => A.polynomial_finite_atlas_seed q (m+1) + let α := fun m x => D m*metricFreeSizeBudget (fun j => C j x) (fun j => J j x) + (fun j => N j x) q (m+1) * (E m*(B ((m+1)+q+1) x)^(p m)) + have hα (m : ℕ) : HasPolynomialBound (α m) := + ((polynomialBound_const (hD m)).mul + (metricFreeSizeBudget_polynomial C J N hC hJ hN hC1 q (m+1))).mul + ((polynomialBound_const (zero_le_one.trans (hE m))).mul + ((hB ((m+1)+q+1)).pow (p m))) + refine ⟨α,hα,?_⟩ + intro x hx ι _ F hF φ K τ s c r ρ R reference d hc hρ hτ hs hτs hs1 hρB hb + δ hδ u hu hball hbu k i j m + have hN0 (l : ℕ) : 0 ≤ N l x := by + obtain ⟨_,_,_,hh⟩ := hN l + exact (hh x hx).1 + exact hseed m F hF d (fun l => C l x) (fun l => J l x) hc hρ hτ hs hτs hs1 + (B ((m+1)+q+1) x) (hB1 _ x hx) (hρB _) + (fun i j => ⟨(hb i j _).1,(hb i j _).2.1,(hb i j _).2.2.1⟩) + (fun l => N l x) hN0 (fun i j => (hb i j _).2.2.2) + δ hδ u hu hball (fun i => hbu i _) k i j + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetAlgebra.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetAlgebra.lean new file mode 100644 index 0000000000000000000000000000000000000000..f34d57f4d177129b74c4d50af7fc7683151a9b97 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetAlgebra.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PositivePolynomialBounds + +namespace OAI + +/-! Finite composition and inverse-scale evaluation of the polynomial +budgets in the correction construction. -/ +noncomputable section +namespace ClosedSurfaceR4.RealModes + +lemma HasPolynomialBound.of_le {f g : ℝ → ℝ} (hg : HasPolynomialBound g) + (h0 : ∀ x, 1 ≤ x → 0 ≤ f x) (hle : ∀ x, 1 ≤ x → f x ≤ g x) : + HasPolynomialBound f := by + obtain ⟨d,C,hC,hg⟩ := hg + exact ⟨d,C,hC,fun x hx => ⟨h0 x hx,(hle x hx).trans (hg x hx).2⟩⟩ + +lemma HasPolynomialBound.max {f g : ℝ → ℝ} (hf : HasPolynomialBound f) + (hg : HasPolynomialBound g) : HasPolynomialBound (fun x => max (f x) (g x)) := by + have hfn : ∀ x, 1 ≤ x → 0 ≤ f x := by + obtain ⟨_,_,_,h⟩ := hf + exact fun x hx => (h x hx).1 + have hgn : ∀ x, 1 ≤ x → 0 ≤ g x := by + obtain ⟨_,_,_,h⟩ := hg + exact fun x hx => (h x hx).1 + exact (hf.add hg).of_le (fun x hx => (hfn x hx).trans (le_max_left _ _)) + (fun x hx => max_le (le_add_of_nonneg_right (hgn x hx)) (le_add_of_nonneg_left (hfn x hx))) + +lemma HasPolynomialBound.sum {ι : Type*} (s : Finset ι) (f : ι → ℝ → ℝ) + (hf : ∀ i ∈ s, HasPolynomialBound (f i)) : + HasPolynomialBound (fun x => ∑ i ∈ s, f i x) := by + classical + induction s using Finset.induction_on with + | empty => simpa using polynomialBound_const (show (0:ℝ) ≤ 0 by rfl) + | @insert i s hi ih => + have h := (hf i (Finset.mem_insert_self i s)).add + (ih (fun j hj => hf j (Finset.mem_insert_of_mem hj))) + simpa only [Finset.sum_insert hi] using h + +lemma HasPolynomialBound.comp {f g : ℝ → ℝ} (hf : HasPolynomialBound f) + (hg : HasPolynomialBound g) (hge : ∀ x, 1 ≤ x → 1 ≤ g x) : + HasPolynomialBound (fun x => f (g x)) := by + obtain ⟨d,C,hC,hf⟩ := hf + obtain ⟨e,D,hD,hg⟩ := hg + refine ⟨e*d,C*D^d,one_le_mul_of_one_le_of_one_le hC (one_le_pow₀ hD),?_⟩ + intro x hx + refine ⟨(hf (g x) (hge x hx)).1,?_⟩ + calc + f (g x) ≤ C*(g x)^d := (hf (g x) (hge x hx)).2 + _ ≤ C*(D*x^e)^d := mul_le_mul_of_nonneg_left + (pow_le_pow_left₀ (hg x hx).1 (hg x hx).2 _) (zero_le_one.trans hC) + _ = (C*D^d)*x^(e*d) := by rw [mul_pow,pow_mul]; ring + +/-- Polynomial degree is chosen before all multiplicative constants. -/ +theorem HasPolynomialBound.at_inverse_scale {f : ℝ → ℝ} (hf : HasPolynomialBound f) + (p : ℕ) : ∃ d : ℕ, ∀ D : ℝ, 1 ≤ D → ∃ C : ℝ, 1 ≤ C ∧ + ∀ z : ℝ, 0 < z → z ≤ 1 → 0 ≤ f (D/z^p) ∧ f (D/z^p) ≤ C/z^d := by + obtain ⟨d,A,hA,hf⟩ := hf + refine ⟨p*d,fun D hD => ⟨A*D^d,one_le_mul_of_one_le_of_one_le hA (one_le_pow₀ hD),?_⟩⟩ + intro z hz hz1 + have hzD : 1 ≤ D/z^p := by + apply (le_div_iff₀ (pow_pos hz p)).mpr + simpa only [one_mul] using (pow_le_one₀ hz.le hz1).trans hD + refine ⟨(hf _ hzD).1,?_⟩ + calc + f (D/z^p) ≤ A*(D/z^p)^d := (hf _ hzD).2 + _ = (A*D^d)/z^(p*d) := by rw [div_pow,pow_mul]; ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..ed2f170cdf5a938d1e7f461b64fa91b452614bd7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialBudgetMeanFamily.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialChartedMeanFamily +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! Assemble the actual finite metric mean from one common bound on its +seven local budgets. The envelope records the derivative shift explicitly. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +def meanGeometryEnvelope (q : ℕ) (H B : ℕ → ℝ) (m : ℕ) : ℝ := + 1+H m+B (m+q+2)+B m + +lemma meanGeometryEnvelope_growth (q : ℕ) (H B : ℕ → ℝ → ℝ) + (hH : ∀ m, HasPolynomialBound (H m)) (hB : ∀ m, HasPolynomialBound (B m)) + (m : ℕ) : HasPolynomialBound (fun x => + meanGeometryEnvelope q (fun k => H k x) (fun k => B k x) m) := + (((polynomialBound_const zero_le_one).add (hH m)).add (hB (m+q+2))).add (hB m) + +theorem polynomial_mean_family_from_budgets (q : ℕ) : + ∃ (p : ℕ → ℕ) (C : ℕ → ℝ), (∀ m, 1 ≤ C m) ∧ + ∀ {ι : Type*} [Fintype ι] {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + (c : ∀ i, PolynomialSolveData P 0 G hG (φ i) (K i) τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ H B : ℕ → ℝ, (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ B m) → + (∀ m, (Fintype.card ι : ℝ) ≤ H m ∧ ρ⁻¹ ≤ H m) → + (∀ i m, (d i).budgets.inv m ≤ B m ∧ (d i).budgets.chi m ≤ B m ∧ + (d i).budgets.forms m ≤ B m ∧ (d i).budgets.pull m ≤ B m ∧ + (d i).budgets.psi m ≤ B m ∧ (d i).budgets.normal m ≤ B m ∧ + (d i).budgets.mode m ≤ B m) → + ∀ δ : ℝ, 0 < δ → MeanBounds univ s reference r (q+2) + (rescaledMean (τ/s) (chartedFamilyMean d hρ δ q)) + (polynomialMeanProfile p C (meanGeometryEnvelope q H B)) + (polynomialMeanProfile p C (meanGeometryEnvelope q H B)) := by + obtain ⟨p,C,hC,hmean⟩ := polynomial_charted_metric_mean_family q + refine ⟨p,C,hC,?_⟩ + intro ι _ n P τ G hG φ K s c r ρ R reference d hρ hτ hs hτs hs1 H B hH hB hHB hb δ hδ + have henv (m : ℕ) : 1 ≤ meanGeometryEnvelope q H B m ∧ + H m ≤ meanGeometryEnvelope q H B m ∧ + B (m+q+2) ≤ meanGeometryEnvelope q H B m ∧ + B m ≤ meanGeometryEnvelope q H B m := by + dsimp [meanGeometryEnvelope] + have h₀ := hB m + have h₁ := hB (m+q+2) + have h₂ := hH m + constructor + · linarith + constructor + · linarith + constructor <;> linarith + apply hmean c d hρ hτ hs hτs hs1 (meanGeometryEnvelope q H B) + (fun m => (henv m).1) (fun m => (hHB m).1.trans (henv m).2.1) _ δ hδ + intro i m + obtain ⟨hi,hχ,hQ,hpull,hψ,hn,hm⟩ := hb i (m+q+2) + obtain ⟨_,hχ₀,_,hpull₀,_,_,_⟩ := hb i m + exact ⟨(hHB m).2.trans (henv m).2.1, + hi.trans (henv m).2.2.1,hQ.trans (henv m).2.2.1, + hψ.trans (henv m).2.2.1,hm.trans (henv m).2.2.1, + hn.trans (henv m).2.2.1,hχ₀.trans (henv m).2.2.2,hpull₀.trans (henv m).2.2.2⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..876fa6880a1167b1789e10dcd11b671262ba0574 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCancellation.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialScalar + +namespace OAI + +/-! Polynomial forcing gives a polynomial correction cancelling the actual +three metric fluctuations, with the support guarantee retained. -/ +noncomputable section +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open CovarianceCorrector LocalPeriodicExpansion + +theorem exists_polynomial_cancellation {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) (v : Fin 2) (g : Geometry (E := R4) S (coordinateVector v)) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (hYg : ∀ p ∈ S, g.Y p = Y (lowJet G p)) + (hCg : ∀ p ∈ S, g.C p = C (lowJet G p)) + (hXg : ∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) + (hVg : ∀ p ∈ S, g.V.val p = V (lowJet G p)) + (hqg : ∀ p ∈ S, g.q p = q (lowJet G p)) + {b c d : Expression} (hb : b.SmoothCoeffs O) (hc : c.SmoothCoeffs O) (hdp : d.SmoothCoeffs O) + (bf cf df : Family S ℝ) + (hbr : Expression.Represents G b bf) (hcr : Expression.Represents G c cf) + (hdr : Expression.Represents G d df) : + ∃ U : Family S R4, + (∀ p ∈ S, average (U.val p) = 0) ∧ + (g.transverse.inner U.angle + bf).fluct = 0 ∧ + (g.longitudinal.inner U.angle + cf).fluct = 0 ∧ + ((2 : ℝ) • g.transverse.inner (U.slow (coordinateVector v)) + df).fluct = 0 ∧ + (∀ Z : Set Base, IsOpen Z → Z ⊆ S → (∀ p ∈ Z, bf.val p = 0) → + (∀ p ∈ Z, cf.val p = 0) → (∀ p ∈ Z, df.val p = 0) → ∀ p ∈ Z, U.val p = 0) ∧ + VectorExpression.Represents G + (fun i => Expression.fullComponent Y C X₀ V q (EuclideanSpace.proj i) v + (b.fluct.scale (-1)) (d.fluct.scale (-1 / 2)) (c.fluct.scale (-1))) U := by + have hmean (a : ℝ) (f : Family S ℝ) (p : Base) (_ : p ∈ S) : + 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] + have hbs := Expression.smoothCoeffs_scale (-1) (Expression.smoothCoeffs_fluct hO hb) + have hcs := Expression.smoothCoeffs_scale (-1) (Expression.smoothCoeffs_fluct hO hc) + have hds := Expression.smoothCoeffs_scale (-1 / 2) (Expression.smoothCoeffs_fluct hO hdp) + have hbr' := Expression.represents_scale (Expression.represents_fluct hO hQ hb hbr) (-1) + have hcr' := Expression.represents_scale (Expression.represents_fluct hO hQ hc hcr) (-1) + have hdr' := Expression.represents_scale (Expression.represents_fluct hO hQ hdp hdr) (-1 / 2) + obtain ⟨U, hU0, hYf, hYs, hXf, hzero, hrep⟩ := exists_polynomial_system hO v g + hY hC hX hV hd hq hqp hcircle hG hQ hYg hCg hXg hVg hqg hbs hds hcs + ((-1 : ℝ) • bf.fluct) ((-1 / 2 : ℝ) • df.fluct) ((-1 : ℝ) • cf.fluct) + hbr' hdr' hcr' (hmean _ _) (hmean _ _) (hmean _ _) + refine ⟨U, hU0, ?_, ?_, ?_, ?_, hrep⟩ + · rw [Family.fluct_add, hYf, Family.fluct_smul, Family.fluct_fluct] + module + · rw [Family.fluct_add, hXf] + module + · rw [Family.fluct_add, Family.fluct_smul, hYs, Family.fluct_smul, Family.fluct_fluct] + module + · intro Z hZ hZS hbZ hcZ hdZ + have hz (a : ℝ) (f : Family S ℝ) (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 hZS (hz _ _ hbZ) (hz _ _ hdZ) (hz _ _ hcZ) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFree.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFree.lean new file mode 100644 index 0000000000000000000000000000000000000000..74ee242b462fdee8d8f2197ea9b488b73f2216fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFree.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTrialAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricFreeBudgets +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFree + +namespace OAI + +/-! Actual free displacements with polynomial geometric and input budgets. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem polynomial_charted_free_bounds (q m : ℕ) : + ∃ p : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + {c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), + (∀ j, c.D j = 0) → ∀ hρ : 0 < ρ, + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + d.budgets.inv (m+q+1) ≤ B → d.budgets.forms (m+q+1) ≤ B → + d.budgets.psi (m+q+1) ≤ B → + ∀ N : ℕ → ℝ, (∀ j, 0 ≤ N j) → d.budgets.normal (m+q+1) ≤ N (m+q+1) → + ∀ δ : ℝ, 0 ≤ δ → ∀ f : SmallModes.Base → Tensor, + ContDiff ℝ ∞ f → InTrialBall univ reference r f → + WeightedBound univ s (m+q+1) B f → + WeightedBound univ τ m + (metricFreeSizeBudget c.C c.J N q m*(A*B^p)*(δ*τ)) + (d.displacement hρ δ q f) ∧ + WeightedBound univ τ m + ((τ/s)^(q+1)*metricFreeResidualBudget c.C c.J N q m*(A*B^p)*(δ*τ)) + (coordinateFullLinearized emptyMetricPolynomial 0 G (d.displacement hρ δ q f)) := by + obtain ⟨p,A,hA,hamp⟩ := polynomial_trial_amplitude_bounds (m+q+1) + refine ⟨p,A,hA,?_⟩ + intro τ G hG φ K s c r ρ R reference d hD hρ hτ hs hτs hs1 B hB hρB hi hf hp N hN hn δ hδ f hfs hfb hbf + have hz : WeightedBound c.e.source s (m+q+1) 0 (f-f) := by + apply (weightedBound_zero c.e.source s (m+q+1) (F := Tensor)).congr + intro x _ + exact sub_self (f x) + have hball : InTrialBall c.e.source reference r f := fun x _ => hfb x (mem_univ x) + have ha := (hamp d hρ hs hs1 B hB hρB hi hf hp f f 0 le_rfl hfs.contDiffOn hfs.contDiffOn + hball hball (hbf.restrict_open c.e.open_source) (hbf.restrict_open c.e.open_source) hz).1 + have hj : PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m = m+q+1 := by + simp only [PolynomialSolveData.inputOrder,tensorOrder_emptyMetricPolynomial,Nat.zero_add,Nat.mul_one] + omega + have ha' : supportedWeightedSeminorm c.chartCompact s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (d.amplitude hρ f) ≤ A*B^p := by + simpa only [hj] using ha + have hn' : WeightedBound c.e.target s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (N (m+q+1)) (freeNormal c.realMap) := by + rw [hj] + exact (d.budgets.normal_bound (m+q+1)).mono_const hn + have hAp : 0 ≤ A*B^p := mul_nonneg (zero_le_one.trans hA) (pow_nonneg (zero_le_one.trans hB) _) + have hsmall : τ/s + (0 : ℝ)/τ^tensorLoss emptyMetricPolynomial ≤ 1 := by + simp only [zero_div,add_zero] + exact (div_le_one₀ hs).mpr hτs + have hsize := c.freeDisplacement_bound hδ hτ hs hτs hs1 le_rfl hsmall q m + hAp (hN _) hn' (d.amplitude hρ f) ha' + have hres := c.freeDisplacement_residual_bound hδ hτ hs hτs hs1 le_rfl q m + hAp (hN _) hn' (d.amplitude hρ f) ha' + rw [c.metric_freeSizeFactor_eq hD N q m] at hsize + rw [c.metric_freeResidualFactor_eq hD N q m] at hres + exact ⟨hsize,by simpa only [zero_div,add_zero,ChartedMeanData.displacement] using hres⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFreeFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFreeFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..95b1bad65101a8ae2b146dc9fc31bfe1b090abfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedFreeFamily.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialChartedFree +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeFamily + +namespace OAI + +/-! Polynomial free estimates uniform over the number of phase cells. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem polynomial_charted_free_family (q m : ℕ) : + ∃ p : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {ι : Type*} [Fintype ι] {τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : ι → Base → ℝ} {K : ι → Compacts Base} {s : ℝ≥0} + {c : ∀ i, PolynomialSolveData emptyMetricPolynomial 0 G hG (φ i) (K i) τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), + ∀ C J : ℕ → ℝ, (∀ i, (c i).C = C ∧ (c i).J = J ∧ ∀ j, (c i).D j = 0) → + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + (∀ i, (d i).budgets.inv (m+q+1) ≤ B ∧ (d i).budgets.forms (m+q+1) ≤ B ∧ + (d i).budgets.psi (m+q+1) ≤ B) → + ∀ N : ℕ → ℝ, (∀ j, 0 ≤ N j) → + (∀ i, (d i).budgets.normal (m+q+1) ≤ N (m+q+1)) → + ∀ δ : ℝ, 0 ≤ δ → ∀ f : SmallModes.Base → Tensor, + ContDiff ℝ ∞ f → InTrialBall univ reference r f → + WeightedBound univ s (m+q+1) B f → + WeightedBound univ τ m + ((Fintype.card ι : ℝ)*metricFreeSizeBudget C J N q m*(A*B^p)*(δ*τ)) + (chartedFreeSum d hρ δ q f) ∧ + WeightedBound univ τ m + ((Fintype.card ι : ℝ)*(τ/s)^(q+1)*metricFreeResidualBudget C J N q m*(A*B^p)*(δ*τ)) + (coordinateFullLinearized emptyMetricPolynomial 0 G (chartedFreeSum d hρ δ q f)) := by + classical + obtain ⟨p,A,hA,hfree⟩ := polynomial_charted_free_bounds q m + refine ⟨p,A,hA,?_⟩ + intro ι _ τ G hG φ K s c r ρ R reference d C J hc hρ hτ hs hτs hs1 B hB hρB hb N hN hn δ hδ f hfs hfb hbf + have hi (i : ι) := hfree (d i) (hc i).2.2 hρ hτ hs hτs hs1 B hB hρB + (hb i).1 (hb i).2.1 (hb i).2.2 N hN (hn i) δ hδ f hfs hfb hbf + have hsize (i : ι) : WeightedBound univ τ m + (metricFreeSizeBudget C J N q m*(A*B^p)*(δ*τ)) ((d i).displacement hρ δ q f) := by + simpa only [(hc i).1,(hc i).2.1] using (hi i).1 + have hres (i : ι) : WeightedBound univ τ m + ((τ/s)^(q+1)*metricFreeResidualBudget C J N q m*(A*B^p)*(δ*τ)) + (coordinateFullLinearized emptyMetricPolynomial 0 G ((d i).displacement hρ δ q f)) := by + simpa only [(hc i).1,(hc i).2.1] using (hi i).2 + rw [chartedFreeSum_eq] + constructor + · have hh := WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ + (fun _ : ι => metricFreeSizeBudget C J N q m*(A*B^p)*(δ*τ)) + (fun i => (d i).displacement hρ δ q f) + (fun i _ => ((d i).displacement_smooth_support hρ δ q f).1.contDiffOn) + (fun i _ => hsize i) + convert hh using 1 + simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + ring + · rw [coordinateFullLinearized_sum emptyMetricPolynomial 0 G Finset.univ _ + (fun i => ((d i).displacement_smooth_support hρ δ q f).1)] + have hh := WeightedBound.finset_sum uniqueDiffOn_univ hτ.le Finset.univ + (fun _ : ι => (τ/s)^(q+1)*metricFreeResidualBudget C J N q m*(A*B^p)*(δ*τ)) + (fun i => coordinateFullLinearized emptyMetricPolynomial 0 G ((d i).displacement hρ δ q f)) + (fun i _ => (coordinateFullLinearized_smooth (c i).openO (c i).openU emptyMetricPolynomial + (c i).smoothP hG (c i).mapsG (K i) (c i).supportU + ((d i).displacement_smooth_support hρ δ q f).1 + ((d i).displacement_smooth_support hρ δ q f).2 0).contDiffOn) + (fun i _ => hres i) + convert hh using 1 + simp only [Finset.sum_const,Finset.card_univ,nsmul_eq_mul] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..6832d4974b039969eec4e0426c2675f2d39f9975 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMeanFamily.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialChartedMetricMean +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteMeanFamily +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamily + +namespace OAI + +/-! Polynomial estimates for arbitrary finite families of the actual +charted metric means. The cardinality enters the geometric profile. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean + +theorem polynomial_charted_metric_mean_family (q : ℕ) : + ∃ (p : ℕ → ℕ) (C : ℕ → ℝ), (∀ m, 1 ≤ C m) ∧ + ∀ {ι : Type*} [Fintype ι] {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {s : ℝ≥0} + (c : ∀ i, PolynomialSolveData P 0 G hG (φ i) (K i) τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ J : ℕ → ℝ, (∀ m, 1 ≤ J m) → (∀ m, (Fintype.card ι : ℝ) ≤ J m) → + (∀ i m, ρ⁻¹ ≤ J m ∧ (d i).budgets.inv (m+q+2) ≤ J m ∧ + (d i).budgets.forms (m+q+2) ≤ J m ∧ (d i).budgets.psi (m+q+2) ≤ J m ∧ + (d i).budgets.mode (m+q+2) ≤ J m ∧ (d i).budgets.normal (m+q+2) ≤ J m ∧ + (d i).budgets.chi m ≤ J m ∧ (d i).budgets.pull m ≤ J m) → + ∀ δ : ℝ, 0 < δ → + MeanBounds univ s reference r (q+2) + (rescaledMean (τ/s) (chartedFamilyMean d hρ δ q)) + (polynomialMeanProfile p C J) (polynomialMeanProfile p C J) := by + classical + obtain ⟨p,C,hC,hm⟩ := polynomial_charted_metric_mean q + refine ⟨fun m => p m+1,fun m => 1+C m,fun m => by linarith [hC m],?_⟩ + intro ι _ n P τ G hG φ K s c r ρ R reference d hρ hτ hs hτs hs1 J hJ hcard hb δ hδ + have hlocal (i : ι) := hm (c i) (d i) hρ hτ hs hτs hs1 J hJ (hb i) δ hδ + have hfamily := polynomial_finite_mean_family uniqueDiffOn_univ hs.le + (reference := reference) (r := r) (L := q+2) (Finset.univ : Finset ι) + (fun i => rescaledMean (τ/s) ((d i).mean hρ δ q)) p C J + (fun m => zero_le_one.trans (hC m)) hJ (by simpa using hcard) + (fun i _ => hlocal i) + have he : rescaledMean (τ/s) (chartedFamilyMean d hρ δ q) = + (fun θ f x => ∑ i ∈ (Finset.univ : Finset ι), + rescaledMean (τ/s) ((d i).mean hρ δ q) θ f x) := by + funext θ f x k + simp [rescaledMean, chartedFamilyMean, Finset.mul_sum] + rw [he] + exact hfamily + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMetricMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMetricMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..9deab155992b15b5bdcf7827a2b85380496729b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedMetricMean.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedFreeModeIdentity +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLocalMeanProfile +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData + +namespace OAI + +/-! Polynomial bounds for the actual charted metric mean, with no +polynomial differential perturbation. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean + +namespace ChartedMeanData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + {c : PolynomialSolveData P 0 G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + +lemma mean_unperturbed (d : ChartedMeanData c r ρ R reference) (hρ : 0 < ρ) + (hs : 0 < (s : ℝ)) (δ : ℝ) (q : ℕ) {f : SmallModes.Base → Tensor} + (hf : ContDiffOn ℝ ∞ f c.e.source) (hball : InTrialBall c.e.source reference r f) : + d.mean hρ δ q f = c.e.source.indicator + (meanTerm δ s c.realMap d.cutoff d.form c.e c.e.symm q (τ/s) f) := by + have hamp : (d.amplitude hρ f : SmallModes.Base → ℝ) = + phaseAmplitude d.cutoff (coefficient d.form c.e.symm f) := + funext (c.trialAmplitude_apply d.cutoff d.form d.localBounds hρ hf hball) + funext x + rw [mean, c.combinedMeanField_unperturbed] + simp only [hamp] + apply congrArg (fun a : SmallModes.Base → Tensor => c.e.source.indicator a x) + funext y + simp only [meanTerm, div_mul_cancel₀ τ hs.ne'] + +end ChartedMeanData + +/-- The exponent and coefficient are uniform over the actual solver data; +only its explicitly supplied geometric profile varies. -/ +theorem polynomial_charted_metric_mean (q : ℕ) : + ∃ (p : ℕ → ℕ) (C : ℕ → ℝ), (∀ m, 1 ≤ C m) ∧ + ∀ {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P 0 G hG φ K τ s) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ J : ℕ → ℝ, (∀ m, 1 ≤ J m) → + (∀ m, ρ⁻¹ ≤ J m ∧ d.budgets.inv (m+q+2) ≤ J m ∧ + d.budgets.forms (m+q+2) ≤ J m ∧ d.budgets.psi (m+q+2) ≤ J m ∧ + d.budgets.mode (m+q+2) ≤ J m ∧ d.budgets.normal (m+q+2) ≤ J m ∧ + d.budgets.chi m ≤ J m ∧ d.budgets.pull m ≤ J m) → + ∀ δ : ℝ, 0 < δ → + MeanBounds univ s reference r (q+2) (rescaledMean (τ/s) (d.mean hρ δ q)) + (polynomialMeanProfile p C J) (polynomialMeanProfile p C J) := by + obtain ⟨p,C,hC,hm⟩ := polynomial_local_mean_majorants q + refine ⟨p,C,hC,?_⟩ + intro n P τ G hG φ K s c r ρ R reference d hρ hτ hs hτs hs1 J hJ hbounds δ hδ + have hη : 0 < τ/(s : ℝ) := div_pos hτ hs + have hη1 : τ/(s : ℝ) ≤ 1 := (div_le_one₀ hs).mpr hτs + have hl := hm d.localBounds d.budgets hs hs1 hρ J hJ hbounds δ hδ + apply rescaledMean_bounds uniqueDiffOn_univ hη _ _ _ hl.B_pos hl.K_pos + · intro f _ _ + exact (c.combinedMeanField δ q (d.amplitude hρ f)).contDiff.contDiffOn + · intro m A f hA hf hball hbf + have hfs := hf.mono (subset_univ c.e.source) + have hb := fun x (_hx : x ∈ c.e.source) => hball x (mem_univ x) + have hv := hl.value _ hη hη1 m A f hA hfs hb (hbf.restrict_open c.e.open_source) + have heq := d.mean_unperturbed hρ hs δ q hfs hb + have hv' : WeightedBound c.e.source s m ((τ/s)*polynomialMeanProfile p C J m A) + (d.mean hρ δ q f) := by + rw [heq] + exact hv.congr (fun x hx => indicator_of_mem hx _) + apply hv'.extend_support c.e.open_source + ((c.combinedMeanField δ q (d.amplitude hρ f)).tsupport_subset.trans c.supportChart) + exact mul_nonneg hη.le (zero_le_one.trans (hl.B_pos m A hA)) + · intro m A D f g hA hD hf hg hballf hballg hbf hbg hbd + have hfs := hf.mono (subset_univ c.e.source) + have hgs := hg.mono (subset_univ c.e.source) + have hballf' := fun x (_hx : x ∈ c.e.source) => hballf x (mem_univ x) + have hballg' := fun x (_hx : x ∈ c.e.source) => hballg x (mem_univ x) + have hv := hl.difference _ hη hη1 m A D f g hA hD hfs hgs hballf' hballg' + (hbf.restrict_open c.e.open_source) (hbg.restrict_open c.e.open_source) + (hbd.restrict_open c.e.open_source) + have heqf := d.mean_unperturbed hρ hs δ q hfs hballf' + have heqg := d.mean_unperturbed hρ hs δ q hgs hballg' + have hv' : WeightedBound c.e.source s m (polynomialMeanProfile p C J m A*(τ/s)*D) + (d.mean hρ δ q f-d.mean hρ δ q g) := by + rw [heqf, heqg] + exact hv.congr (fun x hx => by simp only [Pi.sub_apply, indicator_of_mem hx]) + have hsupport : tsupport (d.mean hρ δ q f-d.mean hρ δ q g) ⊆ c.e.source := + (tsupport_sub _ _).trans (union_subset + ((c.combinedMeanField δ q (d.amplitude hρ f)).tsupport_subset.trans c.supportChart) + ((c.combinedMeanField δ q (d.amplitude hρ g)).tsupport_subset.trans c.supportChart)) + exact hv'.extend_support c.e.open_source hsupport + (mul_nonneg (mul_nonneg (zero_le_one.trans (hl.K_pos m A hA)) hη.le) hD) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedSeed.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedSeed.lean new file mode 100644 index 0000000000000000000000000000000000000000..3adcd5d84ac6939ed574861f6f6e4d78ff82534e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialChartedSeed.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTrialAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricFreeBudgets +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFree + +namespace OAI + +/-! Actual slow-scale complex amplitudes with polynomial geometric and input budgets. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem polynomial_charted_seed_bounds (q m : ℕ) : + ∃ p : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {τ : ℝ} {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + {c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), + (∀ j, c.D j = 0) → ∀ hρ : 0 < ρ, + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + d.budgets.inv (m+q+1) ≤ B → d.budgets.forms (m+q+1) ≤ B → + d.budgets.psi (m+q+1) ≤ B → + ∀ N : ℕ → ℝ, (∀ j, 0 ≤ N j) → d.budgets.normal (m+q+1) ≤ N (m+q+1) → + ∀ δ : ℝ, 0 ≤ δ → ∀ f : SmallModes.Base → Tensor, + ContDiff ℝ ∞ f → InTrialBall univ reference r f → + WeightedBound univ s (m+q+1) B f → + WeightedBound univ s m + (metricFreeSizeBudget c.C c.J N q m*(A*B^p)*(δ*τ)) + (d.freeAmplitude hρ δ q f) := by + obtain ⟨p,A,hA,hamp⟩ := polynomial_trial_amplitude_bounds (m+q+1) + refine ⟨p,A,hA,?_⟩ + intro τ G hG φ K s c r ρ R reference d hD hρ hτ hs hτs hs1 B hB hρB hi hf hp N hN hn δ hδ f hfs hfb hbf + have hz : WeightedBound c.e.source s (m+q+1) 0 (f-f) := by + apply (weightedBound_zero c.e.source s (m+q+1) (F := Tensor)).congr + intro x _ + exact sub_self (f x) + have hball : InTrialBall c.e.source reference r f := fun x _ => hfb x (mem_univ x) + have ha := (hamp d hρ hs hs1 B hB hρB hi hf hp f f 0 le_rfl hfs.contDiffOn hfs.contDiffOn + hball hball (hbf.restrict_open c.e.open_source) (hbf.restrict_open c.e.open_source) hz).1 + have hj : PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m = m+q+1 := by + simp only [PolynomialSolveData.inputOrder,tensorOrder_emptyMetricPolynomial,Nat.zero_add,Nat.mul_one] + omega + have ha' : supportedWeightedSeminorm c.chartCompact s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (d.amplitude hρ f) ≤ A*B^p := by + simpa only [hj] using ha + have hn' : WeightedBound c.e.target s + (PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m) (N (m+q+1)) (freeNormal c.realMap) := by + rw [hj] + exact (d.budgets.normal_bound (m+q+1)).mono_const hn + have hAp : 0 ≤ A*B^p := mul_nonneg (zero_le_one.trans hA) (pow_nonneg (zero_le_one.trans hB) _) + have hsmall : τ/s + (0 : ℝ)/τ^tensorLoss emptyMetricPolynomial ≤ 1 := by + simp only [zero_div,add_zero] + exact (div_le_one₀ hs).mpr hτs + have hb := c.originalFreeSeed_bound hδ hτ hs hτs hs1 le_rfl hsmall q m + hAp (hN _) hn' (d.amplitude hρ f) ha' + have hbudget := correctedSeedBudget_nonneg (tensorOrder emptyMetricPolynomial) + c.C c.D c.nonnegC q m (hN (m+q+1)) + have htwo : (1 : ℝ) ≤ 2^m := one_le_pow₀ (by norm_num) + have hJ : 0 ≤ c.J m^m := pow_nonneg (zero_le_one.trans (c.oneLEJ m)) _ + have hcoeff : (m.factorial : ℝ) * c.J m^m * + correctedSeedBudget (tensorOrder emptyMetricPolynomial) c.C c.D q m (N (m+q+1)) ≤ + c.freeSizeFactor q m (N (m+q+1)) := by + calc + _ = (m.factorial : ℝ) * 1 * + correctedSeedBudget (tensorOrder emptyMetricPolynomial) c.C c.D q m (N (m+q+1)) * + c.J m^m := by ring + _ ≤ _ := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_left htwo (Nat.cast_nonneg _)) hbudget) hJ + rw [c.metric_freeSizeFactor_eq hD N q m] at hcoeff + apply (weightedBound_of_supportedSeminorm s m (d.freeAmplitude hρ δ q f)).mono_const + exact hb.trans (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right hcoeff hAp) (mul_nonneg hδ hτ.le)) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientExtension.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientExtension.lean new file mode 100644 index 0000000000000000000000000000000000000000..6b711b081ad3fc753b914cbe95fd83cffe27c599 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientExtension.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialAlgebra +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.SurfaceImmersion.Geometry.LocalParameterIntegral + +namespace OAI + +/-! Coefficients can be extended smoothly off the permitted compact low-jet +set without changing the operator there or changing its jet order/loss. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression + +def cutoffCoeffs (e : Expression) (χ : LowJet → ℝ) : Expression := + e.mapCoeff (fun c z => χ z.1 * c z) + +lemma cutoffCoeffs_smooth {e : Expression} {O : Set LowJet} (hO : IsOpen O) + (he : e.SmoothCoeffs O) {χ : LowJet → ℝ} (hχ : ContDiff ℝ ∞ χ) + (hs : tsupport χ ⊆ O) : (e.cutoffCoeffs χ).SmoothCoeffs Set.univ := by + induction e with + | coeff c => + have hc := SmoothParameterIntegral.contDiff_supported_smul hO he hχ hs + change ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => χ z.1 * c z) (Set.univ ×ˢ Set.univ) + exact hc.contDiffOn + | atom w a e ih => exact ih he + | add e f ihe ihf => exact ⟨ihe he.1, ihf he.2⟩ + +lemma cutoffCoeffs_eval (e : Expression) (χ : LowJet → ℝ) (G : Base → Space) (z : Base × ℝ) : + (e.cutoffCoeffs χ).eval G z = χ (lowJet G z.1) * e.eval G z := + e.eval_mapCoeff_mul G (fun x => χ x.1) z + +/-- Only the compact set of low jets used by the application is retained. -/ +theorem exists_global_extension {e : Expression} {O Q : Set LowJet} + (hO : IsOpen O) (he : e.SmoothCoeffs O) (hQ : IsCompact Q) (hQO : Q ⊆ O) : + ∃ e' : Expression, e'.SmoothCoeffs Set.univ ∧ e'.order = e.order ∧ e'.loss = e.loss ∧ + ∀ (G : Base → Space) (z : Base × ℝ), lowJet G z.1 ∈ Q → e'.eval G z = e.eval G z := by + obtain ⟨χ, hχ, _, _, hs, hχone⟩ := CollarVelocity.compact_cutoff hQ hO hQO + refine ⟨e.cutoffCoeffs χ, cutoffCoeffs_smooth hO he hχ hs, ?_, ?_, ?_⟩ + · exact e.order_mapCoeff _ + · exact e.loss_mapCoeff _ + · intro G z hz + rw [cutoffCoeffs_eval, hχone _ hz, one_mul] + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientRecursion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientRecursion.lean new file mode 100644 index 0000000000000000000000000000000000000000..c02fa55fb3ef1ecf31cf473baf25f94034b4aa4c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCoefficientRecursion.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAdvance + +namespace OAI + +/-! Finite smooth metric-cancelling coefficients with actual coordinate-jet +polynomial representations and the original support guarantee. -/ +noncomputable section +open scoped ContDiff Topology +namespace ClosedSurfaceR4.JetPolynomial +open CovarianceCorrector LocalPeriodicExpansion + +theorem exists_polynomial_coefficients {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) (v : Fin 2) (g : Geometry (E := R4) S (coordinateVector v)) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (hYg : ∀ p ∈ S, g.Y p = Y (lowJet G p)) + (hCg : ∀ p ∈ S, g.C p = C (lowJet G p)) + (hXg : ∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) + (hVg : ∀ p ∈ S, g.V.val p = V (lowJet G p)) + (hqg : ∀ p ∈ S, g.q p = q (lowJet G p)) + (dxIndex : Fin 2) (n : ℕ) : + ∃ U : ℕ → Family S R4, + U 0 = g.initial ∧ (∀ i p, p ∈ S → average ((U i).val p) = 0) ∧ + (g.yyCoefficient U 1).fluct = 0 ∧ + (∀ Z : Set Base, IsOpen Z → Z ⊆ S → (∀ p ∈ Z, g.initial.val p = 0) → + ∀ i p, p ∈ Z → (U i).val p = 0) ∧ + (∀ r, 1 ≤ r → r ≤ n → + (g.xxCoefficient (coordinateVector dxIndex) U r).fluct = 0 ∧ + (g.xyCoefficient (coordinateVector dxIndex) U r).fluct = 0 ∧ + (g.yyCoefficient U (r + 1)).fluct = 0) ∧ + (∀ i, VectorExpression.Represents G + (MetricPolynomial.coefficients Y C X₀ V q dxIndex v n i) (U i)) := 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 [Geometry.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 hZ hZS hz i p hp + exact hz p hp + · intro r hr hn + omega + · intro i + exact MetricPolynomial.represents_initial hO hQ g hV hVg + | succ n ih => + obtain ⟨U, hinit, hU, hy₁, hsupport, hcoeff, hrep⟩ := ih + have hRs := MetricPolynomial.coefficients_smooth hO hY hC hX hV hd hq hqp hcircle dxIndex v n + obtain ⟨W, hlow, hW, hxx, hxy, hyy, hzero, hWrep⟩ := polynomial_advance hO v g + hY hC hX hV hd hq hqp hcircle hG hQ hYg hCg hXg hVg hqg + dxIndex U (MetricPolynomial.coefficients Y C X₀ V q dxIndex v n) (n + 1) (by omega) hU hRs hrep + 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 hZ hZS hz + exact hzero Z hZ hZS (hsupport Z hZ hZS hz) + · intro r hr hn + by_cases heq : 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⟩ + · exact hWrep + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialConnectionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialConnectionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..d632f7f19202fab61163ea574c453f5313e53f27 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialConnectionBounds.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialNormalBounds + +namespace OAI + +/-! Polynomial bounds for the tangential reconstruction coefficients. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def realConnectionX (X Y W : RVec 4) : ℝ := + ((Y ⬝ᵥ Y)*(X ⬝ᵥ W)-(X ⬝ᵥ Y)*(Y ⬝ᵥ W))/NormalFrame.gramDet X Y + +def realConnectionY (X Y W : RVec 4) : ℝ := + ((X ⬝ᵥ X)*(Y ⬝ᵥ W)-(X ⬝ᵥ Y)*(X ⬝ᵥ W))/NormalFrame.gramDet X Y + +lemma weighted_inverse_gramDet {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + {X Y : E → RVec 4} (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (hne : ∀ x ∈ U, NormalFrame.gramDet (X x) (Y x) ≠ 0) + (hInv : ∀ x ∈ U, ‖(NormalFrame.gramDet (X x) (Y x))⁻¹‖ ≤ K) : + WeightedBound U s m (inverseGramBudget m C K) + (fun x => (NormalFrame.gramDet (X x) (Y x))⁻¹) := by + have hG : ContDiffOn ℝ ∞ (fun x => NormalFrame.gramDet (X x) (Y x)) U := + ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hY)).sub + ((contDiffOn_dot_real hX hY).pow 2) + have bG : WeightedBound U s m (quadraticBudget m C) + (fun x => NormalFrame.gramDet (X x) (Y x)) := by + convert weighted_quadratic_pair hU hs.le (zero_le_one.trans hC) hX hX hY hY bX bX bY bY using 1 + funext x + unfold NormalFrame.gramDet + ring + exact bG.inv_real hU hs (quadraticBudget_ge_one m (zero_le_one.trans hC)) hK hG hne hInv + +theorem weighted_realConnections {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + {X Y W : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hW : ContDiffOn ℝ ∞ W U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (bW : WeightedBound U s m C W) + (hne : ∀ x ∈ U, NormalFrame.gramDet (X x) (Y x) ≠ 0) + (hInv : ∀ x ∈ U, ‖(NormalFrame.gramDet (X x) (Y x))⁻¹‖ ≤ K) : + WeightedBound U s m (liftBudget m C K) (fun x => realConnectionX (X x) (Y x) (W x)) ∧ + WeightedBound U s m (liftBudget m C K) (fun x => realConnectionY (X x) (Y x) (W x)) := by + have hC0 := zero_le_one.trans hC + have hK0 := zero_le_one.trans hK + have hq := zero_le_one.trans (quadraticBudget_ge_one m hC0) + have hi := inverseGramBudget_nonneg m hC0 hK0 + have hG : ContDiffOn ℝ ∞ (fun x => NormalFrame.gramDet (X x) (Y x)) U := + ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hY)).sub + ((contDiffOn_dot_real hX hY).pow 2) + have hGI := hG.inv hne + have bInv := weighted_inverse_gramDet hU hs hC hK hX hY bX bY hne hInv + have hnX := ((contDiffOn_dot_real hY hY).mul (contDiffOn_dot_real hX hW)).sub + ((contDiffOn_dot_real hY hX).mul (contDiffOn_dot_real hY hW)) + have hnY := ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hW)).sub + ((contDiffOn_dot_real hX hY).mul (contDiffOn_dot_real hX hW)) + have bnx := weighted_quadratic_pair hU hs.le hC0 hY hY hX hW bY bY bX bW + have bny := weighted_quadratic_pair hU hs.le hC0 hX hX hY hW bX bX bY bW + constructor + · apply (bnx.mul_real hU hs.le hq hi hnX hGI bInv).congr + intro x hx + change realConnectionX (X x) (Y x) (W x) = _ + simp only [realConnectionX,div_eq_mul_inv,dotProduct_comm] + rfl + · apply (bny.mul_real hU hs.le hq hi hnY hGI bInv).congr + intro x hx + change realConnectionY (X x) (Y x) (W x) = _ + rfl + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectionBudget.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectionBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..99debd7aebbf53d0f4f2e2e348f6c0d50fddb31c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectionBudget.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Correction.ExplicitCorrectionBudgetThreshold + +namespace OAI + +/-! Polynomial reciprocal control for preservation of the iteration budgets. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection +open RealModes + +lemma polynomial_inverse_min {f g : ℝ → ℝ} + (hf : HasPolynomialBound (fun x => (f x)⁻¹)) + (hg : HasPolynomialBound (fun x => (g x)⁻¹)) + (hfp : ∀ x, 1 ≤ x → 0 < f x) (hgp : ∀ x, 1 ≤ x → 0 < g x) : + HasPolynomialBound (fun x => (min (f x) (g x))⁻¹) := by + apply HasPolynomialBound.of_le (hf.add hg) + · intro x hx + exact inv_nonneg.mpr (lt_min (hfp x hx) (hgp x hx)).le + · intro x hx + exact min_inverse_le_add (hfp x hx) (hgp x hx) + +theorem correctionBudgetThreshold_inverse_polynomial + (A B N L : ℝ → ℝ) (a : ℝ) (ha : 0 < a) + (hB : HasPolynomialBound B) (hN : HasPolynomialBound N) (hL : HasPolynomialBound L) + (hgap : ∀ x, 1 ≤ x → 1 ≤ B x-A x) : + HasPolynomialBound (fun x => (correctionBudgetThreshold (A x) (B x) a (N x) (L x))⁻¹) := by + let C₁ := fun x => N x*(1+B x) + let C₂ := fun x => L x*(1+2*B x) + have hC₁ : HasPolynomialBound C₁ := hN.mul ((polynomialBound_const zero_le_one).add hB) + have hC₂ : HasPolynomialBound C₂ := hL.mul ((polynomialBound_const zero_le_one).add + ((polynomialBound_const (by norm_num : (0:ℝ) ≤ 2)).mul hB)) + have h₁ : HasPolynomialBound (fun x => (powerThreshold 5 |N x*(1+B x)| (B x-A x))⁻¹) := by + apply powerThreshold_inverse_polynomial 5 _ _ C₁ (fun _ => 1) hC₁ + (polynomialBound_const zero_le_one) (fun _ _ => abs_nonneg _) (fun x hx => zero_lt_one.trans_le (hgap x hx)) + · intro x hx + exact le_of_eq (abs_of_nonneg (hC₁.nonneg hx)) + · intro x hx + simpa only [one_div,inv_one] using one_div_le_one_div_of_le zero_lt_one (hgap x hx) + have h₂ : HasPolynomialBound (fun x => (powerThreshold 5 |L x*(1+2*B x)| (a/8))⁻¹) := by + apply powerThreshold_inverse_polynomial 5 _ _ C₂ (fun _ => (a/8)⁻¹) hC₂ + (polynomialBound_const (by positivity)) (fun _ _ => abs_nonneg _) + (fun _ _ => by positivity) + · intro x hx + exact le_of_eq (abs_of_nonneg (hC₂.nonneg hx)) + · intro _ _ + exact le_rfl + apply polynomial_inverse_min h₁ h₂ + · intro x hx + unfold powerThreshold + exact pow_pos (lt_min zero_lt_one (div_pos (zero_lt_one.trans_le (hgap x hx)) (by positivity))) _ + · intro x _ + unfold powerThreshold + exact pow_pos (lt_min zero_lt_one (div_pos (by positivity) (by positivity))) _ + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3b67816cee095f97e1804926bdec1f28d7473ffb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorRepresentation.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCorrectorSystem + +namespace OAI + +/-! The actual periodic system admits the polynomial solution whose order +bounds were established in JetPolynomialFullCorrector. -/ +noncomputable section +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.JetPolynomial +open CovarianceCorrector LocalPeriodicExpansion + +/-- The family solving the complete periodic system has the represented +four-coordinate correction. All equations and the zero-support property +are retained from the actual periodic solver. -/ +theorem exists_polynomial_system {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) (v : Fin 2) (g : Geometry (E := R4) S (coordinateVector v)) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + (hYg : ∀ p ∈ S, g.Y p = Y (lowJet G p)) + (hCg : ∀ p ∈ S, g.C p = C (lowJet G p)) + (hXg : ∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) + (hVg : ∀ p ∈ S, g.V.val p = V (lowJet G p)) + (hqg : ∀ p ∈ S, g.q p = q (lowJet G p)) + {h j e : Expression} (hh : h.SmoothCoeffs O) (hj : j.SmoothCoeffs O) (he : e.SmoothCoeffs O) + (hf jf ef : Family S ℝ) + (hhr : ∀ p ∈ S, ∀ t : ℝ, h.eval G (p, t) = hf.val p (t : Period)) + (hjr : ∀ p ∈ S, ∀ t : ℝ, j.eval G (p, t) = jf.val p (t : Period)) + (her : ∀ p ∈ S, ∀ t : ℝ, e.eval G (p, t) = ef.val p (t : Period)) + (hh0 : ∀ p ∈ S, average (hf.val p) = 0) + (hj0 : ∀ p ∈ S, average (jf.val p) = 0) + (he0 : ∀ p ∈ S, average (ef.val p) = 0) : + ∃ U : Family S R4, + (∀ p ∈ S, average (U.val p) = 0) ∧ + g.transverse.inner U.angle = hf ∧ + g.transverse.inner (U.slow (coordinateVector v)) = jf ∧ + (g.longitudinal.inner U.angle).fluct = ef ∧ + (∀ Z : Set Base, IsOpen Z → Z ⊆ S → (∀ p ∈ Z, hf.val p = 0) → + (∀ p ∈ Z, jf.val p = 0) → (∀ p ∈ Z, ef.val p = 0) → ∀ p ∈ Z, U.val p = 0) ∧ + VectorExpression.Represents G + (fun i => Expression.fullComponent Y C X₀ V q (EuclideanSpace.proj i) v h j e) U := by + obtain ⟨U, hU0, hUa, hUs, hUfl, hUz, hform⟩ := g.exists_system_formula hf jf ef hh0 hj0 he0 + refine ⟨U, hU0, hUa, hUs, hUfl, hUz, ?_⟩ + intro i p hp t + rw [Expression.eval_fullComponent hO S.isOpen hY hC hX hV hd hq hqp hcircle + (EuclideanSpace.proj i) v hh hj he hG hQ hf.val jf.val ef.val hhr hjr her hp] + change (EuclideanSpace.proj i) (PeriodicCorrector.fullSolutionFormula (coordinateVector v) + (fun x => Y (lowJet G x)) (fun x => C (lowJet G x)) (fun x => X₀ (lowJet G x)) + (fun x => V (lowJet G x)) (fun x => q (lowJet G x)) hf.val jf.val ef.val (p, t)) = + (EuclideanSpace.proj i) (U.val p (t : Period)) + rw [hform p hp t] + unfold PeriodicCorrector.fullSolutionFormula + rw [hYg p hp, hCg p hp, hXg p hp, hVg p hp, hqg p hp] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorSystem.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorSystem.lean new file mode 100644 index 0000000000000000000000000000000000000000..e60cb914dd04ff167aca7b25ebf4c8b4ca4a272a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCorrectorSystem.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionStep +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialVector + +namespace OAI + +/-! The complete periodic system with its explicit solution retained in the +family interface, for propagation of polynomial coefficient representations. -/ +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} +namespace Geometry +variable {v : A} (g : Geometry (E := E) O v) + +theorem exists_system_formula (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) ∧ + (∀ p ∈ O, ∀ t : ℝ, U.val p (t : Period) = + PeriodicCorrector.fullSolutionFormula v g.Y g.C g.X₀ g.V.val g.q h.val j.val e.val (p, t)) := by + obtain ⟨U, D, hUs, _, hU0, hUd, hYd, hYs, hX, hzero, hformula⟩ := + PeriodicCorrector.solve_full_smooth_family_on_formula 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 + + · intro p hp t + rw [hval p hp] + exact hformula p hp t + +end Geometry +end ClosedSurfaceR4.LocalPeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCubicRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCubicRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..4586c2f30de022eeae23697930c4a171bb2f2cd6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialCubicRemainder.lean @@ -0,0 +1,122 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.GlobalCubicRemainder +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! A fixed atlas constant gives polynomial dependence of the actual cubic +metric remainder on the free and forced displacement budgets. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +local instance polynomialCubicFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialCubicFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialCubicDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialCubicDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialCubicSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialCubicSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem global_cubic_remainder_uniform_budget (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ A₀ B₀ : ℝ, 0 ≤ A₀ → 0 ≤ B₀ → ∀ (τ δ : ℝ), 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*(2*A₀*B₀+B₀^2)*(δ^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*(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 + 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 A₀ B₀ hA hB τ δ hτ hτ1 hδ hδτ U V hU hV hbU hbV + let S : ℝ := 2*A₀*B₀+B₀^2 + have hS : 0 ≤ S := add_nonneg (mul_nonneg (mul_nonneg (by norm_num) hA) hB) (sq_nonneg _) + 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*S*(δ^3/τ)) (T i) := by + convert 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) using 1 + dsimp [B,S] + ring + have hprod (i) : WeightedEstimates.WeightedBound univ τ m + ((∑ j, K j)*S*(δ^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 (mul_nonneg (hB' i) hS) (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*S*(δ^3/τ)) = K i*S*(δ^3/τ) := by dsimp [K]; ring + _ ≤ (∑ j, K j)*S*(δ^3/τ) := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun j _ => hK j) (Finset.mem_univ i)) hS) (by positivity) + have hout := hd (fun i x => (A.planeWeight i x)^2 • T i x) τ + ((∑ i, K i)*S*(δ^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 + dsimp [S] + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDiagonalVariations.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDiagonalVariations.lean new file mode 100644 index 0000000000000000000000000000000000000000..0f6ba41d7359d6e06663fcc071d8bfc93a707a62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDiagonalVariations.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAffineDerivative +import OAI.Geometry.SurfaceImmersion.Geometry.ParameterTaylorRemainder +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationBounds + +namespace OAI + +/-! The first three actual parameter derivatives of a polynomial along a +map variation are its mixed variations with all directions equal. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ParameterTaylor SmoothPeriodicCalculus + +def diagonalFamily (G H : Base → Space) : Fin 4 → Base → Space := + Fin.cases G (fun _ => H) + +lemma diagonalFamily_smooth {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) : + ∀ i, ContDiff ℝ ∞ (diagonalFamily G H i) := by + intro i + refine Fin.cases hG (fun _ => hH) i + +lemma diagonalFamily_succ (G H : Base → Space) (j : Fin 3) : diagonalFamily G H j.succ = H := rfl + +lemma diagonal_angleDerivative {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + {e : MixedExpression} (he : e.SmoothCoeffs Set.univ) (j : Fin 3) (θ : ℝ) (z : Base × ℝ) : + angleDerivative (fun x : Base × ℝ => e.eval (varyBase (diagonalFamily G H) H x.2) (x.1, θ)) z = + (e.differentiate j).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ) := by + have hs := eval_varyBase_joint_smooth (diagonalFamily_smooth hG hH) hH he θ + have hd := differentiate_hasDerivAt_at isOpen_univ (diagonalFamily_smooth hG hH) he j z.2 + (z.1, θ) (Set.mem_univ _) + simp only [diagonalFamily_succ] at hd + exact (angle_hasDerivAt hs z.1 z.2).unique hd + +namespace Expression + +def affinePolynomial (e : Expression) (G H : Base → Space) (θ : ℝ) : Base × ℝ → ℝ := + fun z => (ofExpression e).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ) + +lemma affinePolynomial_smooth {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + ContDiff ℝ ∞ (e.affinePolynomial G H θ) := + eval_varyBase_joint_smooth (diagonalFamily_smooth hG hH) hH (smoothCoeffs_ofExpression he) θ + +lemma affinePolynomial_first {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + parameterJet 1 (e.affinePolynomial G H θ) = + fun z => (e.variations 0).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ) := by + funext z + exact diagonal_angleDerivative hG hH (smoothCoeffs_ofExpression he) 0 θ z + +lemma affinePolynomial_second {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + parameterJet 2 (e.affinePolynomial G H θ) = + fun z => (e.variations 1).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ) := by + change angleDerivative (parameterJet 1 (e.affinePolynomial G H θ)) = _ + rw [affinePolynomial_first he hG hH] + funext z + exact diagonal_angleDerivative hG hH (e.variations_smoothCoeffs isOpen_univ he 0) 1 θ z + +lemma affinePolynomial_third {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + parameterJet 3 (e.affinePolynomial G H θ) = + fun z => (e.variations 2).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ) := by + change angleDerivative (parameterJet 2 (e.affinePolynomial G H θ)) = _ + rw [affinePolynomial_second he hG hH] + funext z + exact diagonal_angleDerivative hG hH (e.variations_smoothCoeffs isOpen_univ he 1) 2 θ z + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDualBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDualBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..06a91968a2497907c163e20b5f2ff97a69c70389 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialDualBounds.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealJetCoefficients + +namespace OAI + +/-! Polynomial estimates for the three vector columns of reconstruction. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def tangentDualBudget (m : ℕ) (C K : ℝ) := + 2*(2^m*(2^m*dotBudget m C*inverseGramBudget m C K)*C) + +def normalDualBudget (m : ℕ) (C K : ℝ) := + 2^m*((m.factorial : ℝ)^2*K^(m+1)*(1+dotBudget m C)^m)*C + +lemma weighted_realTangentDuals {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + {X Y : E → RVec 4} (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (hne : ∀ x ∈ U, NormalFrame.gramDet (X x) (Y x) ≠ 0) + (hInv : ∀ x ∈ U, ‖(NormalFrame.gramDet (X x) (Y x))⁻¹‖ ≤ K) : + WeightedBound U s m (tangentDualBudget m C K) (fun x => realTangentDualX (X x) (Y x)) ∧ + WeightedBound U s m (tangentDualBudget m C K) (fun x => realTangentDualY (X x) (Y x)) := by + have hC0 := zero_le_one.trans hC + have hK0 := zero_le_one.trans hK + have hdb := dotBudget_nonneg m hC0 + have hib := inverseGramBudget_nonneg m hC0 hK0 + have hG : ContDiffOn ℝ ∞ (fun x => NormalFrame.gramDet (X x) (Y x)) U := + ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hY)).sub + ((contDiffOn_dot_real hX hY).pow 2) + have hGI := hG.inv hne + have bi := weighted_inverse_gramDet hU hs hC hK hX hY bX bY hne hInv + have bxx : WeightedBound U s m (dotBudget m C) (fun x => X x ⬝ᵥ X x) := + bX.dot_real hU hs.le hC0 hC0 hX hX bX + have bxy : WeightedBound U s m (dotBudget m C) (fun x => X x ⬝ᵥ Y x) := + bX.dot_real hU hs.le hC0 hC0 hX hY bY + have byy : WeightedBound U s m (dotBudget m C) (fun x => Y x ⬝ᵥ Y x) := + bY.dot_real hU hs.le hC0 hC0 hY hY bY + have hxx := (contDiffOn_dot_real hX hX).mul hGI + have hxy := (contDiffOn_dot_real hX hY).mul hGI + have hyy := (contDiffOn_dot_real hY hY).mul hGI + have cxx := bxx.mul_real hU hs.le hdb hib (contDiffOn_dot_real hX hX) hGI bi + have cxy := bxy.mul_real hU hs.le hdb hib (contDiffOn_dot_real hX hY) hGI bi + have cyy := byy.mul_real hU hs.le hdb hib (contDiffOn_dot_real hY hY) hGI bi + have hc : 0 ≤ 2^m*dotBudget m C*inverseGramBudget m C K := by positivity + have vxx := cxx.smul_real_pi hU hs hc hC0 hxx hY bY + have vyx := cyy.smul_real_pi hU hs hc hC0 hyy hX bX + have vxy := cxy.smul_real_pi hU hs hc hC0 hxy hX bX + have vyy := cxy.smul_real_pi hU hs hc hC0 hxy hY bY + constructor + · have hh := vyx.sub hU hs.le (hyy.smul hX) (hxy.smul hY) vyy + have hh' : WeightedBound U s m (tangentDualBudget m C K) + (fun x => ((Y x ⬝ᵥ Y x)*(NormalFrame.gramDet (X x) (Y x))⁻¹) • X x- + ((X x ⬝ᵥ Y x)*(NormalFrame.gramDet (X x) (Y x))⁻¹) • Y x) := by + convert hh using 1 + unfold tangentDualBudget + ring + apply hh'.congr + intro x hx + simp [realTangentDualX,div_eq_mul_inv,sub_eq_add_neg] + · have hh := vxx.sub hU hs.le (hxx.smul hY) (hxy.smul hX) vxy + have hh' : WeightedBound U s m (tangentDualBudget m C K) + (fun x => ((X x ⬝ᵥ X x)*(NormalFrame.gramDet (X x) (Y x))⁻¹) • Y x- + ((X x ⬝ᵥ Y x)*(NormalFrame.gramDet (X x) (Y x))⁻¹) • X x) := by + convert hh using 1 + unfold tangentDualBudget + ring + apply hh'.congr + intro x hx + simp [realTangentDualY,div_eq_mul_inv,sub_eq_add_neg,add_comm] + +lemma weighted_vector_over_norm_sq {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 0 ≤ C) (hK : 1 ≤ K) + {V : E → RVec 4} (hV : ContDiffOn ℝ ∞ V U) (bV : WeightedBound U s m C V) + (hpos : ∀ x ∈ U, 0 < V x ⬝ᵥ V x) (hi : ∀ x ∈ U, (V x ⬝ᵥ V x)⁻¹ ≤ K) : + WeightedBound U s m (normalDualBudget m C K) (fun x => (V x ⬝ᵥ V x)⁻¹ • V x) := by + have hdot := contDiffOn_dot_real hV hV + have hd := dotBudget_nonneg m hC + have bdot : WeightedBound U s m (1+dotBudget m C) (fun x => V x ⬝ᵥ V x) := + (bV.dot_real hU hs.le hC hC hV hV bV).mono_const (by change dotBudget m C ≤ _; linarith) + have hinv : ∀ x ∈ U, ‖(V x ⬝ᵥ V x)⁻¹‖ ≤ K := by + intro x hx + simpa only [Real.norm_eq_abs,abs_of_nonneg (inv_nonneg.mpr (hpos x hx).le)] using hi x hx + have bi := bdot.inv_real hU hs (by linarith : 1 ≤ 1+dotBudget m C) hK hdot + (fun x hx => (hpos x hx).ne') hinv + exact bi.smul_real_pi hU hs (by positivity) hC (hdot.inv (fun x hx => (hpos x hx).ne')) hV bV + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAssembly.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAssembly.lean new file mode 100644 index 0000000000000000000000000000000000000000..4e56fe0ab6a7960ea4f083fef302004b31c9e26e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAssembly.lean @@ -0,0 +1,130 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialScalar + +namespace OAI + +/-! Finite polynomial families can be padded to a common degree and added +without changing their values or their smooth-coefficient property. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial + +namespace Expression + +lemma eval_sumFinset {ι : Type*} (s : Finset ι) (e : ι → Expression) + (G : Base → Space) (z : Base × ℝ) : + (sumFinset s e).eval G z = ∑ i ∈ s, (e i).eval G z := by + classical + rw [sumFinset,eval_sumList,← List.sum_toFinset _ s.nodup_toList, + Finset.toList_toFinset] + +end Expression + +namespace Perturbation + +private lemma sum_fin_zero_extension {α : Type*} [AddCommMonoid α] + {n N : ℕ} (hnN : n ≤ N) (f : Fin n → α) : + (∑ r : Fin N, if h : r.val < n then f ⟨r.val,h⟩ else 0) = ∑ r : Fin n, f r := by + classical + let g : ℕ → α := fun r => if h : r < n then f ⟨r,h⟩ else 0 + calc + (∑ r : Fin N, if h : r.val < n then f ⟨r.val,h⟩ else 0) = + ∑ r ∈ Finset.range N, g r := Fin.sum_univ_eq_sum_range g N + _ = ∑ r ∈ Finset.range n, g r := by + symm + apply Finset.sum_subset (Finset.range_mono hnN) + intro r _ hr + have hn : ¬ r < n := fun h => hr (Finset.mem_range.mpr h) + simp only [g,dite_eq_right hn] + _ = ∑ r : Fin n, f r := by + rw [← Fin.sum_univ_eq_sum_range] + apply Finset.sum_congr rfl + intro r _ + change (if h : r.val < n then f ⟨r.val,h⟩ else 0) = f r + rw [dite_eq_left r.isLt] + +/-- Higher unused powers have the actual zero expression as coefficient. -/ +def padTensorPolynomial {n N : ℕ} (P : Fin 3 → Fin n → Expression) : + Fin 3 → Fin N → Expression := + fun k r => if h : r.val < n then P k ⟨r.val,h⟩ else .coeff (fun _ => 0) + +lemma padTensorPolynomial_smooth {n N : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k r, (P k r).SmoothCoeffs univ) (k : Fin 3) (r : Fin N) : + (padTensorPolynomial P k r).SmoothCoeffs univ := by + unfold padTensorPolynomial + split + · exact hP _ _ + · exact contDiffOn_const + +lemma padTensorPolynomial_value {n N : ℕ} (P : Fin 3 → Fin n → Expression) + (hnN : n ≤ N) (ε : ℝ) (G : Base → Space) (t : ℝ) : + coordinatePolynomialValue (padTensorPolynomial (N := N) P) ε G t = + coordinatePolynomialValue P ε G t := by + classical + funext p k + change (∑ r : Fin N, ε ^ (r.val+1) * (padTensorPolynomial P k r).eval G + (planeCoordinateIsometry.symm p,t)) = + ∑ r : Fin n, ε ^ (r.val+1) * (P k r).eval G (planeCoordinateIsometry.symm p,t) + calc + _ = ∑ r : Fin N, if h : r.val < n then + ε ^ (r.val+1) * (P k ⟨r.val,h⟩).eval G (planeCoordinateIsometry.symm p,t) + else 0 := by + apply Finset.sum_congr rfl + intro r _ + by_cases hr : r.val < n + · simp only [padTensorPolynomial,dite_eq_left hr] + · simp only [padTensorPolynomial,dite_eq_right hr,Expression.eval,mul_zero] + _ = _ := sum_fin_zero_extension hnN + (fun r => ε ^ (r.val+1) * (P k r).eval G (planeCoordinateIsometry.symm p,t)) + +/-- The largest number of powers in a finite dependent family. -/ +def polynomialFamilyDegree {ι : Type*} [Fintype ι] (n : ι → ℕ) : ℕ := + Finset.univ.sup n + +lemma le_polynomialFamilyDegree {ι : Type*} [Fintype ι] (n : ι → ℕ) (i : ι) : + n i ≤ polynomialFamilyDegree n := + Finset.le_sup (f := n) (Finset.mem_univ i) + +/-- Add the coefficient expressions after padding every member to the +same degree. No map or perturbation parameter enters this construction. -/ +def sumTensorPolynomials {ι : Type*} [Fintype ι] {n : ι → ℕ} + (P : (i : ι) → Fin 3 → Fin (n i) → Expression) : + Fin 3 → Fin (polynomialFamilyDegree n) → Expression := + fun k r => Expression.sumFinset Finset.univ (fun i => padTensorPolynomial (P i) k r) + +lemma sumTensorPolynomials_smooth {ι : Type*} [Fintype ι] {n : ι → ℕ} + {P : (i : ι) → Fin 3 → Fin (n i) → Expression} + (hP : ∀ i k r, (P i k r).SmoothCoeffs univ) (k : Fin 3) + (r : Fin (polynomialFamilyDegree n)) : + (sumTensorPolynomials P k r).SmoothCoeffs univ := by + apply Expression.smoothCoeffs_sumFinset + intro i _ + exact padTensorPolynomial_smooth (hP i) k r + +lemma sumTensorPolynomials_value {ι : Type*} [Fintype ι] {n : ι → ℕ} + (P : (i : ι) → Fin 3 → Fin (n i) → Expression) + (ε : ℝ) (G : Base → Space) (t : ℝ) : + coordinatePolynomialValue (sumTensorPolynomials P) ε G t = + ∑ i, coordinatePolynomialValue (P i) ε G t := by + classical + funext p k + simp only [Finset.sum_apply] + change (∑ r : Fin (polynomialFamilyDegree n), ε ^ (r.val+1) * + (Expression.sumFinset Finset.univ (fun i => padTensorPolynomial (P i) k r)).eval G + (planeCoordinateIsometry.symm p,t)) = + ∑ i, coordinatePolynomialValue (P i) ε G t p k + simp_rw [Expression.eval_sumFinset,Finset.mul_sum] + rw [Finset.sum_comm] + apply Finset.sum_congr rfl + intro i _ + exact congrFun (congrFun (padTensorPolynomial_value (P i) + (le_polynomialFamilyDegree n i) ε G t) p) k + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ab24a225d1e8c5ea80d6dd1231a3ac92f66afd4a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasMean.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetMeanFamily + +namespace OAI + +/-! Actual atlas mean bounds with polynomial dependence on all local budgets +and on the number of cells in each chart. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates FiniteMean +local instance polynomialFiniteMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialFiniteMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialFiniteMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialFiniteMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialFiniteMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialFiniteMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_finite_atlas_mean (q : ℕ) : + ∃ (p : ℕ → ℕ) (C D E : ℕ → ℝ), + (∀ m, 1 ≤ C m) ∧ (∀ m, 1 ≤ D m) ∧ (∀ m, 0 ≤ E m) ∧ + ∀ (reference : ∀ x : M, CovariantTwoTensor x), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x)) → + ∀ r : ℝ, 0 ≤ r → ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {ρ R : ℝ} + (d : ∀ i j, ChartedMeanData (c i j) (A.tensorReadBallConstant*r) ρ R (A.tensorPlaneRead i reference)), + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + ∀ H B : ℕ → ℝ, (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ B m) → + (∀ i m, (Fintype.card (ι i) : ℝ) ≤ H m ∧ ρ⁻¹ ≤ H m) → + (∀ i j m, (d i j).budgets.inv m ≤ B m ∧ (d i j).budgets.chi m ≤ B m ∧ + (d i j).budgets.forms m ≤ B m ∧ (d i j).budgets.pull m ≤ B m ∧ + (d i j).budgets.psi m ≤ B m ∧ (d i j).budgets.normal m ≤ B m ∧ + (d i j).budgets.mode m ≤ B m) → + ∀ δ : ℝ, 0 < δ → MeanBounds univ s (A.tensorEncode reference) r (q+2) + (rescaledMean (τ/s) (A.tensorMeanOperator + (A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q)))) + (polynomialMeanProfile (fun m => 2*p m+2) (fun m => 1+C m) + (transportedMeanGeometry (q+2) (meanGeometryEnvelope q H B) D E)) + (polynomialMeanProfile (fun m => 2*p m+2) (fun m => 1+C m) + (transportedMeanGeometry (q+2) (meanGeometryEnvelope q H B) D E)) := by + classical + obtain ⟨p,C,hC,hmean⟩ := polynomial_mean_family_from_budgets q + choose D hD hd using A.tensorPlaneRead_decode_bound + choose E hE he using A.tensorPlaneRestore_bound + refine ⟨p,C,D,E,hC,hD,hE,?_⟩ + intro reference href r hr ι _ n P G hG φ K τ s c ρ R d hρ hτ hs hτs hs1 H B hH hB hHB hb δ hδ + have henv (m : ℕ) : 1 ≤ meanGeometryEnvelope q H B m := by + dsimp [meanGeometryEnvelope] + linarith [hH m,hB m,hB (m+q+2)] + have hlocal (i : A.centers) := hmean (c i) (d i) hρ hτ hs hτs hs1 H B hH hB (hHB i) (hb i) δ hδ + have hg := (A.atlasMean_polynomial_majorants reference href (q+2) p C + (meanGeometryEnvelope q H B) hC henv D E hD hE hd he r hr).2 (s := (s : ℝ)) + have hη : 0 < τ/(s : ℝ) := div_pos hτ hs + have hη1 : τ/(s : ℝ) ≤ 1 := (div_le_one₀ hs).mpr hτs + apply hg hs hs1 (τ/s) hη (fun i => chartedFamilyMean (d i) hρ δ q) + · intro i f hf hball + have hh := (hlocal i).smooth (τ/s) hη hη1 f hf.contDiffOn hball + rw [rescaledMean_self hη.ne'] at hh + exact contDiffOn_univ.mp hh + · intro i m C₀ f hC₀ hf hball hbf + have hh := (hlocal i).value (τ/s) hη hη1 m C₀ f hC₀ hf.contDiffOn hball hbf + rwa [rescaledMean_self hη.ne'] at hh + · intro i m C₀ D₀ f g hC₀ hD₀ hf hg hballf hballg hbf hbg hdiff + have hh := (hlocal i).difference (τ/s) hη hη1 m C₀ D₀ f g hC₀ hD₀ + hf.contDiffOn hg.contDiffOn hballf hballg hbf hbg hdiff + rwa [rescaledMean_self hη.ne'] at hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasTrial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasTrial.lean new file mode 100644 index 0000000000000000000000000000000000000000..6f9ebceb855dbfc5ed2dbda5fed777442644f65a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteAtlasTrial.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTensorMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean + +namespace OAI + + +/-! One polynomial profile for all actual grid amplitudes, before the variable family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean RealModes +local instance polynomialFiniteTrialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialFiniteTrialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialFiniteTrialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialFiniteTrialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialFiniteTrialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialFiniteTrialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem polynomial_finite_atlas_trial (q : ℕ) (B H Y : ℕ → ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hH : ∀ m, HasPolynomialBound (H m)) + (hY : ∀ m, HasPolynomialBound (Y m)) : + ∃ e : ℕ, ∃ E : ℝ, ∃ S T : ℕ → ℝ → ℝ, 1 ≤ E ∧ + (∀ m, HasPolynomialBound (S m)) ∧ (∀ m, HasPolynomialBound (T m)) ∧ + ∀ x : ℝ, 1 ≤ x → + ∀ (reference : ∀ y : M, CovariantTwoTensor y), + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (reference y)) → + ∀ r : ℝ, 0 < r → ∀ {ι : A.centers → Type*} [∀ i, Fintype (ι i)] + {n : A.centers → ℕ} {P : ∀ i, Fin 3 → Fin (n i) → Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : ∀ i, ι i → Base → ℝ} {K : ∀ i, ι i → TopologicalSpace.Compacts Base} + {τ : ℝ} {s : ℝ≥0} + {c : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) τ s} + {ρ R : ℝ} + (d : ∀ i j, ChartedMeanData (c i j) (A.tensorReadBallConstant*r) ρ R + (A.tensorPlaneRead i reference)), + ∀ hρ : 0 < ρ, 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + (∀ m, 1 ≤ H m x) → (∀ m, 1 ≤ Y m x) → + (∀ i m, (Fintype.card (ι i) : ℝ) ≤ H m x ∧ ρ⁻¹ ≤ H m x) → + (∀ i j m, (d i j).budgets.inv m ≤ B m x ∧ (d i j).budgets.chi m ≤ B m x ∧ + (d i j).budgets.forms m ≤ B m x ∧ (d i j).budgets.pull m ≤ B m x ∧ + (d i j).budgets.psi m ≤ B m x ∧ (d i j).budgets.normal m ≤ B m x ∧ + (d i j).budgets.mode m ≤ B m x) → + (τ/s) ≤ min 1 ((r-r/2)/(2*(E*x^e))) → + ∀ f : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (f y)) → + (∀ y v w, f y v w = f y w v) → + (∀ y, ‖A.tensorEncode f y-A.tensorEncode reference y‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (Y m x) f) → + ∀ δ : ℝ, 0 < δ → ∃ u : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (u y)) ∧ + (∀ y v w, u y v w = u y w v) ∧ + FiniteMean.InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, FiniteMean.InTrialBall univ (A.tensorPlaneRead i reference) + (A.tensorReadBallConstant*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (S m x) u) ∧ + (∀ m, A.TensorWeightedBound s m (T m x*(τ/s)^(q+1)) + (u+A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) u-f)) := by + classical + obtain ⟨p,C,D,E,hC,hD,hE,hmean⟩ := A.polynomial_finite_atlas_mean q + let p' := fun m => 2*p m+2 + let C' := fun m => 1+C m + let Z := fun m x => transportedMeanGeometry (q+2) + (meanGeometryEnvelope q (fun j => H j x) (fun j => B j x)) D E m + have hC' (m : ℕ) : 0 ≤ C' m := by dsimp [C']; linarith [hC m] + have hZ (m : ℕ) : HasPolynomialBound (Z m) := + transportedMeanGeometry_growth (q+2) + (fun m x => meanGeometryEnvelope q (fun j => H j x) (fun j => B j x) m) + (fun m _ => D m) (fun m _ => E m) + (meanGeometryEnvelope_growth q H B hH hB) + (fun m => polynomialBound_const (zero_le_one.trans (hD m))) + (fun m => polynomialBound_const (hE m)) m + obtain ⟨e,A₀,hA₀,htrial⟩ := A.polynomial_tensor_mean_threshold (q+2) p' C' Z Y hC' hZ hY q + let S := polynomialMeanSize (q+2) p' C' Z Y q + let T := polynomialMeanDifference (q+2) p' C' Z Y q + have hS (m : ℕ) : HasPolynomialBound (S m) := + polynomialMeanSize_growth (q+2) p' C' Z Y hC' hZ hY q m + have hT (m : ℕ) : HasPolynomialBound (T m) := + polynomialMeanDifference_growth (q+2) p' C' Z Y hC' hZ hY q m + refine ⟨e,A₀,S,T,hA₀,hS,hT,?_⟩ + intro x hx reference href r hr ι _ n P G hG φ K τ s c ρ R d hρ hτ hs hτs hs1 + hHx hYx hcard hbud hsmall f hf hsym hnear hsize δ hδ + have hBx (m : ℕ) : 0 ≤ B m x := by + obtain ⟨_,_,_,hh⟩ := hB m + exact (hh x hx).1 + let μ := A.atlasMean (fun i => chartedFamilyMean (d i) hρ δ q) + have hm := hmean reference href r hr.le d hρ hτ hs hτs hs1 + (fun m => H m x) (fun m => B m x) hHx hBx hcard hbud δ hδ + have ht := htrial x hx hs reference f hf (r/2) r (by linarith) + hnear hYx hsize (τ/s) (div_pos hτ hs) hsmall μ hm q le_rfl + let u := A.tensorMeanTrial f μ q + have hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (u y)) := ht.1 + have hb := ht.2.1 + have hlocal (i : A.centers) := A.tensorReadBallConstant_ball reference href + (A.tensorEncode u) r hr.le (A.tensorEncode_smooth hu) hb i + simp only [A.tensorDecode_encode] at hlocal + exact ⟨u,hu,A.tensorMeanTrial_symmetric f μ hsym + (fun v _ => A.atlasMean_symmetric _ v) q,hb,hlocal,ht.2.2.1,ht.2.2.2⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfef5da6b02b04b0886dcc9d683edc8cccdfaa16 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFiniteMeanFamily.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanThreshold +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport + +namespace OAI + +/-! Finite local mean families retain polynomial majorants even when the +number of summands grows. The degree depends on the local estimate, not +on the number of charts. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.FiniteMean +open WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma MeanBounds.mono_majorants {U : Set E} {s r : ℝ} {reference : E → F} + {L : ℕ} {T : ℝ → (E → F) → E → F} {B K B' K' : ℕ → ℝ → ℝ} + (h : MeanBounds U s reference r L T B K) + (hB : ∀ m C, 1 ≤ C → B m C ≤ B' m C) + (hK : ∀ m C, 1 ≤ C → K m C ≤ K' m C) : + MeanBounds U s reference r L T B' K' := by + refine ⟨fun m C hC => (h.B_pos m C hC).trans (hB m C hC), + fun m C hC => (h.K_pos m C hC).trans (hK m C hC), h.smooth, ?_, ?_⟩ + · intro η hη hη1 m C f hC hf hb hnorm + exact (h.value η hη hη1 m C f hC hf hb hnorm).mono_const + (mul_le_mul_of_nonneg_left (hB m C hC) hη.le) + · intro η hη hη1 m C D f g hC hD hf hg hbf hbg hnf hng hnd + exact (h.difference η hη hη1 m C D f g hC hD hf hg hbf hbg hnf hng hnd).mono_const + (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (hK m C hC) hη.le) hD) + +end ClosedSurfaceR4.FiniteMean + +namespace ClosedSurfaceR4.PhaseMean +open WeightedEstimates FiniteMean +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma polynomialMeanProfile_sum_bound {ι : Type*} (a : Finset ι) + (p : ℕ → ℕ) (C G : ℕ → ℝ) (m : ℕ) (A : ℝ) + (hC : 0 ≤ C m) (hG : 1 ≤ G m) (ha : (a.card : ℝ) ≤ G m) : + 1 + ∑ _i ∈ a, polynomialMeanProfile p C G m A ≤ + polynomialMeanProfile (fun m => p m+1) (fun m => 1+C m) G m A := by + classical + let u := G m+max 1 A + have hu : 1 ≤ u := hG.trans + (le_add_of_nonneg_right (zero_le_one.trans (le_max_left 1 A))) + have hau : (a.card : ℝ) ≤ u := ha.trans + (le_add_of_nonneg_right (zero_le_one.trans (le_max_left 1 A))) + have hp : 0 ≤ C m*u^(p m) := mul_nonneg hC (pow_nonneg (zero_le_one.trans hu) _) + have hone : 1 ≤ u^(p m+1) := one_le_pow₀ hu + simp only [polynomialMeanProfile, Finset.sum_const, nsmul_eq_mul] + change 1+(a.card : ℝ)*(C m*u^(p m)) ≤ (1+C m)*u^(p m+1) + calc + _ ≤ 1+u*(C m*u^(p m)) := by linarith [mul_le_mul_of_nonneg_right hau hp] + _ = 1+C m*u^(p m+1) := by rw [pow_succ]; ring + _ ≤ u^(p m+1)+C m*u^(p m+1) := by linarith + _ = _ := by ring + +/-- A growing finite number of local terms costs one additional polynomial +power when its cardinality is included in the geometric profile. -/ +theorem polynomial_finite_mean_family {ι : Type*} {U : Set E} + (hU : UniqueDiffOn ℝ U) {s : ℝ} (hs : 0 ≤ s) + {reference : E → F} {r : ℝ} {L : ℕ} (a : Finset ι) + (T : ι → ℝ → (E → F) → E → F) (p : ℕ → ℕ) (C G : ℕ → ℝ) + (hC : ∀ m, 0 ≤ C m) (hG : ∀ m, 1 ≤ G m) + (ha : ∀ m, (a.card : ℝ) ≤ G m) + (hT : ∀ i ∈ a, MeanBounds U s reference r L (T i) + (polynomialMeanProfile p C G) (polynomialMeanProfile p C G)) : + MeanBounds U s reference r L (fun η f x => ∑ i ∈ a, T i η f x) + (polynomialMeanProfile (fun m => p m+1) (fun m => 1+C m) G) + (polynomialMeanProfile (fun m => p m+1) (fun m => 1+C m) G) := by + apply (MeanBounds.finset_sum hU hs a T (fun _ => polynomialMeanProfile p C G) + (fun _ => polynomialMeanProfile p C G) hT).mono_majorants + · intro m A _ + exact polynomialMeanProfile_sum_bound a p C G m A (hC m) (hG m) (ha m) + · intro m A _ + exact polynomialMeanProfile_sum_bound a p C G m A (hC m) (hG m) (ha m) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ff72e3074a06a49b39bfb6883525eef60286359 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedCancellation.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.RelativePhaseCancellation + +namespace OAI + +/-! Polynomial closure for the complete fixed-cover cancellation constants. -/ +noncomputable section +namespace ClosedSurfaceR4.PhaseGeometry +open RealModes JetPolynomial JetPolynomial.Perturbation + +lemma fixed_cancellation_budgets_polynomial (N q m : ℕ) + (J S A : ℕ → ℝ) (p : ℕ → ℕ) (B : ℕ → ℝ → ℝ) {D : ℝ} + (hJ : ∀ r, 1 ≤ J r) (hS : ∀ r, 1 ≤ S r) (hA : ∀ r, 1 ≤ A r) (hD : 1 ≤ D) + (hB : ∀ r, HasPolynomialBound (B r)) (hB1 : ∀ r x, 1 ≤ x → 1 ≤ B r x) : + HasPolynomialBound (fun 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) ∧ + HasPolynomialBound (fun 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) := by + let E : ℕ → ℝ → ℝ := fun r x => fixedChartSolverBudget J (fun j => B j x) D r + have hE (r : ℕ) : HasPolynomialBound (E r) := + fixedChartSolverBudget_polynomial J B (fun r => zero_le_one.trans (hJ r)) + (zero_le_one.trans hD) hB r + have hE1 (r : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ E r x := by + have hb0 := zero_le_one.trans (hB1 r x hx) + have hj0 := zero_le_one.trans (hJ (r+3)) + have hd0 := zero_le_one.trans hD + have hs0 := sq_nonneg (J 1) + dsimp [E,fixedChartSolverBudget] + linarith + have hC (r : ℕ) : HasPolynomialBound (fun x => A r*(E r x)^(p r)) := + (polynomialBound_const (zero_le_one.trans (hA r))).mul ((hE r).pow (p r)) + have hC1 (r : ℕ) (x : ℝ) (hx : 1 ≤ x) : 1 ≤ A r*(E r x)^(p r) := + one_le_mul_of_one_le_of_one_le (hA r) (one_le_pow₀ (hE1 r x hx)) + have hJp (r : ℕ) : HasPolynomialBound (fun _ : ℝ => J r) := + polynomialBound_const (zero_le_one.trans (hJ r)) + have hSp (r : ℕ) : HasPolynomialBound (fun _ : ℝ => S r) := + polynomialBound_const (zero_le_one.trans (hS r)) + exact ⟨(polynomialBound_const (Nat.cast_nonneg N)).mul + (splitSizeBudget_polynomial q m (fun r x => A r*(E r x)^(p r)) E + (fun r _ => J r) (fun r _ => S r) hC hE hJp hSp hC1), + (polynomialBound_const (Nat.cast_nonneg N)).mul + (splitResidualBudget_polynomial q m (fun r x => A r*(E r x)^(p r)) E + (fun r _ => J r) (fun r _ => S r) hC hE hJp hSp hC1)⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedOrderThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedOrderThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..62503ce7321cfbd924d57a49593478cec581b295 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFixedOrderThreshold.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitFixedOrderThreshold +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! At each fixed order, the reciprocal of the scale threshold is +polynomial in the numerical data and reciprocal geometric margins. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.ExactCorrection +open RealModes + +theorem fixedOrderNumericalBudget_polynomial (k : ℕ) (D B K : ℝ → ℝ) (C : ℕ → ℝ → ℝ) + (hD : HasPolynomialBound D) (hB : HasPolynomialBound B) (hK : HasPolynomialBound K) + (hC : ∀ m, HasPolynomialBound (C m)) : + HasPolynomialBound (fun x => fixedOrderNumericalBudget k (D x) (B x) (K x) (fun m => C m x)) := by + have hp := (((polynomialBound_const (show (0 : ℝ) ≤ 2 by norm_num)).add (hD.mul hB)).add hK).add + (HasPolynomialBound.sum (Finset.range (k/2+1)) C (fun m _ => hC m)) + apply HasPolynomialBound.of_le hp + · intro x hx + have hd := hD.nonneg hx + have hb := hB.nonneg hx + have hk := hK.nonneg hx + unfold fixedOrderNumericalBudget + positivity + · intro x hx + have habs : ∀ m, |C m x| = C m x := fun m => abs_of_nonneg ((hC m).nonneg hx) + simp only [fixedOrderNumericalBudget, habs] + exact le_rfl + +lemma min_inverse_le_add {x y : ℝ} (hx : 0 < x) (hy : 0 < y) : + (min x y)⁻¹ ≤ x⁻¹+y⁻¹ := by + rcases le_total x y with h | h + · rw [min_eq_left h] + linarith [inv_nonneg.mpr hy.le] + · rw [min_eq_right h] + linarith [inv_nonneg.mpr hx.le] + +theorem fixedOrderThreshold_inverse_polynomial (k : ℕ) + (ρ a η D B K : ℝ → ℝ) (C : ℕ → ℝ → ℝ) (R A H : ℝ → ℝ) + (hD : HasPolynomialBound D) (hB : HasPolynomialBound B) (hK : HasPolynomialBound K) + (hC : ∀ m, HasPolynomialBound (C m)) + (hR : HasPolynomialBound R) (hA : HasPolynomialBound A) (hH : HasPolynomialBound H) + (hρ : ∀ x, 1 ≤ x → 0 < ρ x) (ha : ∀ x, 1 ≤ x → 0 < a x) + (hη : ∀ x, 1 ≤ x → 0 < η x) + (hρR : ∀ x, 1 ≤ x → (ρ x)⁻¹ ≤ R x) + (haA : ∀ x, 1 ≤ x → (a x)⁻¹ ≤ A x) + (hηH : ∀ x, 1 ≤ x → (η x)⁻¹ ≤ H x) : + HasPolynomialBound (fun x => (fixedOrderThreshold k (ρ x) (a x) (η x) + (D x) (B x) (K x) (fun m => C m x))⁻¹) := by + let S := fun x => fixedOrderNumericalBudget k (D x) (B x) (K x) (fun m => C m x) + have hS : HasPolynomialBound S := fixedOrderNumericalBudget_polynomial k D B K C hD hB hK hC + let b := fun x => min (η x) (min (ρ x/4) (a x/8)) + let P := fun x => H x+4*R x+8*A x + have hP : HasPolynomialBound P := (hH.add + ((polynomialBound_const (show (0 : ℝ) ≤ 4 by norm_num)).mul hR)).add + ((polynomialBound_const (show (0 : ℝ) ≤ 8 by norm_num)).mul hA) + apply powerThreshold_inverse_polynomial 10 S b S P hS hP + (fun x hx => hS.nonneg hx) (fun x hx => lt_min (hη x hx) + (lt_min (div_pos (hρ x hx) (by norm_num)) (div_pos (ha x hx) (by norm_num)))) + (fun _ _ => le_rfl) + intro x hx + have hρp : 0 < ρ x/4 := div_pos (hρ x hx) (by norm_num) + have hap : 0 < a x/8 := div_pos (ha x hx) (by norm_num) + have hρi : (ρ x/4)⁻¹ ≤ 4*R x := by + rw [inv_div, div_eq_mul_inv] + exact mul_le_mul_of_nonneg_left (hρR x hx) (by norm_num) + have hai : (a x/8)⁻¹ ≤ 8*A x := by + rw [inv_div, div_eq_mul_inv] + exact mul_le_mul_of_nonneg_left (haA x hx) (by norm_num) + have hi := min_inverse_le_add (hη x hx) (lt_min hρp hap) + have hj := min_inverse_le_add hρp hap + change (min (η x) (min (ρ x/4) (a x/8)))⁻¹ ≤ H x+4*R x+8*A x + linarith [hηH x hx] + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7aa7f09c2ba3802389e14ac5f4cc60bf8c22a2bd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedBounds.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialForcedCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedForcedSize + +namespace OAI + +/-! A single actual forced displacement satisfies both its size bound and +its high-order cancellation estimate. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} {G : Base → Space} + +theorem polynomial_forced_real_bounds + (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) + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (lowJet G) U Q) + (hM : SmallModes.ModeDomain (coordinateComplexField G) (planeCoordinateIsometry '' U)) + {s : ℝ≥0} {τ ε : ℝ} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) + (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (B C : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hC : ∀ m, 0 ≤ C m) + (hGb : ∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound (coordinateComplexField G) + (planeCoordinateIsometry '' U) s (m + 1) (C m)) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + let κ := fun m => max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + ∀ (f : SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ), + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ + tsupport X ⊆ (modeSupport K : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m + (2 ^ m * SmallModes.forcedModeBudget 4 (tensorOrder P) C D q m * + supportedWeightedSeminorm (modeSupport K) s + (m + (q + 1) * (tensorOrder P + 1)) f) X) ∧ + (∀ m, WeightedBound Set.univ τ m + (2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm (modeSupport K) s + (r + (tensorOrder P + 1)) f) q m)) + (coordinateFullLinearized P ε G X + RealModes.realOsc τ f)) := by + obtain ⟨D, hD, hd⟩ := coordinatePolynomialOperator_bounds hU hO hQcompact hQO P hP K hKU B hB + dsimp only + refine ⟨D, hD, ?_⟩ + intro f q + let R := coordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU τ ε + have hR := hd G hG hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb + let Z := SmallModes.perturbedMode τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) R (-f) q + let A := (SmallModes.conjugatedDLM τ (coordinateComplexField_smooth hG) (modeSupport K)).restrictScalars ℝ + R + let W := A Z + f + refine ⟨RealModes.realOsc τ Z, + (contDiffOn_univ.mp (RealModes.contDiffOn_realOsc Z.contDiff.contDiffOn τ)), + (RealModes.realOsc_tsupport τ Z).trans Z.tsupport_subset, ?_, ?_⟩ + · intro m + have hb := SmallModes.perturbedMode_size τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) hτ hs hτs hs1 hε hsmall C D hC hD hc R hR (-f) q m + simp only [map_neg_eq_map] at hb + have hwb := (weightedBound_of_supportedSeminorm s m Z).mono_const hb + have hsize := RealModes.weighted_realOsc isOpen_univ hτ hτs + (mul_nonneg (SmallModes.forcedModeBudget_nonneg 4 (tensorOrder P) C D hC q m) + (apply_nonneg _ _)) Z.contDiff.contDiffOn hwb + simpa only [mul_assoc] using hsize + · intro m + let κ := fun r => max (SmallModes.errorConstant r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + let η := τ / s + ε / τ ^ tensorLoss P + let E := η ^ (q + 1) * FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm (modeSupport K) s + (r + (tensorOrder P + 1)) f) q m + have hres := SmallModes.perturbedMode_residual_bound τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) hτ hs hτs hs1 hε C D hC hD hc R hR (-f) q m + have hb : supportedWeightedSeminorm (modeSupport K) s m W ≤ E := by + dsimp only at hres + simp only [map_neg_eq_map, sub_neg_eq_add, mul_assoc] at hres + rw [FiniteParametrix.boundProfile_const_mul] at hres + simpa only [W, Z, A, R, E, η, κ, pow_succ, mul_assoc] using hres + have hE : 0 ≤ E := (apply_nonneg (supportedWeightedSeminorm (modeSupport K) s m) W).trans hb + have hr := RealModes.weighted_realOsc isOpen_univ hτ hτs hE W.contDiff.contDiffOn + ((weightedBound_of_supportedSeminorm s m W).mono_const hb) + have hi := coordinateFullLinearized_residual hO hU P hP hG (fun _ hp => hQO (hGQ hp)) + K hKU τ ε Z (-f) + have hn : RealModes.realOsc τ (-f) = -RealModes.realOsc τ f := RealModes.realOsc_neg τ f + have he : coordinateFullLinearized P ε G (RealModes.realOsc τ Z) + RealModes.realOsc τ f = + RealModes.realOsc τ W := by simpa only [hn, sub_neg_eq_add] using hi + rw [he] + exact hr + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..64c4070ef78e4d9535d58a5269faf18a141152c0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcedCancellation.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoordinateLinearizedResidual + +namespace OAI + +/-! Actual real forced cancellation for the polynomially perturbed metric. +The exponent is fixed before the requested finite correction accuracy. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} {G : Base → Space} + +theorem polynomial_forced_real_cancellation + (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) + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (lowJet G) U Q) + (hM : SmallModes.ModeDomain (coordinateComplexField G) (planeCoordinateIsometry '' U)) + {s : ℝ≥0} {τ ε : ℝ} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) + (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (B C : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hC : ∀ m, 0 ≤ C m) + (hGb : ∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound (coordinateComplexField G) + (planeCoordinateIsometry '' U) s (m + 1) (C m)) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + let κ := fun m => max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + ∀ (f : SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q : ℕ), + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ + tsupport X ⊆ (modeSupport K : Set SmallModes.Base) ∧ + ∀ m, WeightedBound Set.univ τ m + (2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm (modeSupport K) s + (r + (tensorOrder P + 1)) f) q m)) + (coordinateFullLinearized P ε G X + RealModes.realOsc τ f) := by + obtain ⟨D, hD, hd⟩ := polynomial_forced_mode_residual hU hO hQcompact hQO P hP K hKU + hG hGQ hM hτ hs hτs hs1 hε hε1 B C hB hC hGb hc + dsimp only at hd ⊢ + refine ⟨D, hD, ?_⟩ + intro f q + let R := coordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU τ ε + let A := (SmallModes.conjugatedDLM τ (coordinateComplexField_smooth hG) (modeSupport K)).restrictScalars ℝ + R + let S := (SmallModes.forcedModeLM τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) 0).restrictScalars ℝ + let Z := FiniteParametrix.improve A S (-f) (S (-f)) q + let W := A Z + f + refine ⟨RealModes.realOsc τ Z, + (contDiffOn_univ.mp (RealModes.contDiffOn_realOsc Z.contDiff.contDiffOn τ)), + (RealModes.realOsc_tsupport τ Z).trans Z.tsupport_subset, ?_⟩ + intro m + let κ := fun r => max (SmallModes.errorConstant r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + let E := (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm (modeSupport K) s + (r + (tensorOrder P + 1)) f) q m + have hb : supportedWeightedSeminorm (modeSupport K) s m W ≤ E := by + simpa only [W, sub_neg_eq_add, map_neg_eq_map] using hd (-f) q m + have hE : 0 ≤ E := (apply_nonneg (supportedWeightedSeminorm (modeSupport K) s m) W).trans hb + have hwb := (weightedBound_of_supportedSeminorm s m W).mono_const hb + have hr := RealModes.weighted_realOsc isOpen_univ hτ hτs hE W.contDiff.contDiffOn hwb + have hi := coordinateFullLinearized_residual hO hU P hP hG (fun _ hp => hQO (hGQ hp)) + K hKU τ ε Z (-f) + have hn : RealModes.realOsc τ (-f) = -RealModes.realOsc τ f := RealModes.realOsc_neg τ f + have he : coordinateFullLinearized P ε G (RealModes.realOsc τ Z) + RealModes.realOsc τ f = + RealModes.realOsc τ W := by + simpa only [hn, sub_neg_eq_add] using hi + rw [he] + exact hr + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcingRepresentation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcingRepresentation.lean new file mode 100644 index 0000000000000000000000000000000000000000..5517472b06f1b77626d7f4aa1a5806e34a6ee55a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialForcingRepresentation.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialGeometry +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCancellation + +namespace OAI + +/-! The polynomial right-hand sides coincide with those in the actual +triangular metric-cancellation recursion. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open LocalPeriodicExpansion + +lemma represents_mixedForcing {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {R : ℕ → VectorExpression} {U : ℕ → Family S R4} + (hRs : ∀ i, (R i).SmoothCoeffs O) (hR : ∀ i, VectorExpression.Represents G (R i) (U i)) + {X Y : VectorExpression} {Xf Yf : Family S R4} + (hX : VectorExpression.Represents G X Xf) (hY : VectorExpression.Represents G Y Yf) + (dx dy : Fin 2) (r : ℕ) : + Expression.Represents G (mixedForcing X Y dx dy R r) + (Xf.inner (LocalPeriodicExpansion.yCoefficient (coordinateVector dy) U r) + + Yf.inner ((U (r - 1)).slow (coordinateVector dx)) + + LocalPeriodicExpansion.xyQuadratic (coordinateVector dx) (coordinateVector dy) U r) := + Expression.represents_add (Expression.represents_add + (Expression.represents_dot hX (represents_yCoefficient hO hG hQ hRs hR dy r)) + (Expression.represents_dot hY (VectorExpression.represents_slow hO hG hQ (hRs _) (hR _) dx))) + (represents_xyQuadratic hO hG hQ hRs hR dx dy r) + +lemma represents_longitudinalForcing {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {R : ℕ → VectorExpression} {U : ℕ → Family S R4} + (hRs : ∀ i, (R i).SmoothCoeffs O) (hR : ∀ i, VectorExpression.Represents G (R i) (U i)) + {X : VectorExpression} {Xf : Family S R4} + (hX : VectorExpression.Represents G X Xf) (dx : Fin 2) (r : ℕ) : + Expression.Represents G (longitudinalForcing X dx R r) + (Xf.inner ((U (r - 1)).slow (coordinateVector dx)) + + (1 / 2 : ℝ) • LocalPeriodicExpansion.xxQuadratic (coordinateVector dx) U r) := + Expression.represents_add + (Expression.represents_dot hX (VectorExpression.represents_slow hO hG hQ (hRs _) (hR _) dx)) + (Expression.represents_scale (represents_xxQuadratic hO hG hQ hRs hR dx r) (1 / 2)) + +lemma represents_transverseForcing {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {R : ℕ → VectorExpression} {U : ℕ → Family S R4} + (hRs : ∀ i, (R i).SmoothCoeffs O) (hR : ∀ i, VectorExpression.Represents G (R i) (U i)) + (dy : Fin 2) (r : ℕ) : + Expression.Represents G (transverseForcing dy R r) + (LocalPeriodicExpansion.yyQuadratic (coordinateVector dy) U (r + 1)) := + represents_yyQuadratic hO hG hQ hRs hR dy (r + 1) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFrameEnvelope.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFrameEnvelope.lean new file mode 100644 index 0000000000000000000000000000000000000000..e594fde1012056083a1f5d1559fc540236c96fbb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFrameEnvelope.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialReconstruction +import OAI.Geometry.SurfaceImmersion.Correction.PositivePolynomialBounds + +namespace OAI + +/-! A single polynomial envelope for the actual reconstruction coefficients +and free normal. Its degree is chosen before any geometric bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4 +open WeightedEstimates + +namespace SmallModes + +lemma ReconstructionCoefficientBound.mono_const {n : ℕ} {F : Field n} + {U : Set Base} {s C D : ℝ} {m : ℕ} + (h : ReconstructionCoefficientBound F U s m C) (hCD : C ≤ D) : + ReconstructionCoefficientBound F U s m D := + ⟨⟨⟨h.xxX.mono_const hCD,h.xxY.mono_const hCD,h.xyX.mono_const hCD, + h.xyY.mono_const hCD,h.yyX.mono_const hCD,h.yyY.mono_const hCD, + h.ratioxx.mono_const hCD,h.ratioxy.mono_const hCD⟩, + h.secondxx.mono_const hCD,h.secondxy.mono_const hCD⟩, + h.dualx.mono_const hCD,h.dualy.mono_const hCD,h.dualn.mono_const hCD⟩ + +end SmallModes + +namespace RealModes +open SmallModes + +theorem polynomial_frame_envelope (m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {U : Set Base} {F : RField 4}, ContDiff ℝ ∞ F → RealModeDomain F U → + ∀ {s B : ℝ}, 0 < s → 1 ≤ B → + WeightedBound U s m B (realTwoJet F) → + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) → + (∀ x ∈ U, ‖(realSecond F x ⬝ᵥ realSecond F x)⁻¹‖ ≤ B) → + ReconstructionCoefficientBound (fun x => complexify (F x)) U s m (A*B^d) ∧ + WeightedBound U s m (A*B^d) (freeNormal F) := by + obtain ⟨D,hD,hfree⟩ := polynomial_freeNormal_bound m + obtain ⟨d,A,hA,hpoly⟩ := + (reconstructionBudget_polynomial m).add (freeNormalBudget_polynomial m (zero_le_one.trans hD)) + refine ⟨d,A,hA,?_⟩ + intro U F hF hU s B hs hB hb hG hN + have hp := hpoly B hB + have hfb : 0 ≤ freeNormalBudget m D B B := by + unfold freeNormalBudget freeNormalInputBudget + have hnormal := normalBudget_nonneg m (zero_le_one.trans hB) (zero_le_one.trans hB) + unfold perpBudget minorTermBudget crossBudget dotBudget + positivity + have hrb := (reconstructionBudget_bounds m (zero_le_one.trans hB) (zero_le_one.trans hB)).1 + constructor + · exact (polynomial_reconstruction_bound hF hU hs hB hB hb hG hN).mono_const + ((le_add_of_nonneg_right hfb).trans hp.2) + · exact (hfree hF hU hs hB hB hb hG + (fun x hx => (le_abs_self _).trans (hN x hx))).mono_const + ((le_add_of_nonneg_left (zero_le_one.trans hrb)).trans hp.2) + +end RealModes +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb25a98b4942353c1f98adb9f1173073747453c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeModes.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeResidual +import OAI.Geometry.SurfaceImmersion.Correction.SupportedFreeLinearity + +namespace OAI + +/-! Free normal amplitudes for the actual polynomially perturbed metric operator. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} {G : Base → Space} + +theorem polynomial_free_mode_bounds + (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) + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (lowJet G) U Q) + (hM : SmallModes.ModeDomain (coordinateComplexField G) (planeCoordinateIsometry '' U)) + {s : ℝ≥0} {τ ε : ℝ} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) + (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (B C : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hC : ∀ m, 0 ≤ C m) + (hGb : ∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound (coordinateComplexField G) + (planeCoordinateIsometry '' U) s (m + 1) (C m)) : + let R := coordinatePolynomialOperator hO hU P hP hG + (fun _ hp => hQO (hGQ hp)) K hKU τ ε + let A := (SmallModes.conjugatedDLM τ (coordinateComplexField_smooth hG) (modeSupport K)).restrictScalars ℝ + R + let η := τ / s + ε / τ ^ tensorLoss P + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + let κ := fun r => max (SmallModes.errorConstant r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + let γ := fun r => max (SmallModes.fullErrorConstant 4 r (C r)) + (D r * SmallModes.initialConstant 4 (r + tensorOrder P) (C (r + tensorOrder P))) + ∀ (V : SupportedField (F := Fin 4 → ℂ) (modeSupport K)), + SmallModes.FreeCoefficient (coordinateComplexField G) (planeCoordinateIsometry '' U) V → + ∀ q m, + let Z := SmallModes.perturbedFreeLM τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) R q V + let N := fun r => γ r * supportedWeightedSeminorm (modeSupport K) s (r + (tensorOrder P + 1)) V + supportedWeightedSeminorm (modeSupport K) s m (A Z) ≤ + η ^ (q + 1) * FiniteParametrix.boundProfile (tensorOrder P + 1) κ N q m ∧ + supportedWeightedSeminorm (modeSupport K) s m (Z - V) ≤ + η * ((∑ i ∈ Finset.range q, SmallModes.initialConstant 4 m (C m) * + FiniteParametrix.boundProfile (tensorOrder P + 1) κ N i (m + (tensorOrder P + 1))) + + SmallModes.amplitudeConstant 4 m (C m) * + supportedWeightedSeminorm (modeSupport K) s (m + (tensorOrder P + 1)) V) := by + obtain ⟨D, hD, hd⟩ := coordinatePolynomialOperator_bounds hU hO hQcompact hQO P hP K hKU B hB + dsimp only + refine ⟨D, hD, ?_⟩ + intro V hV q m + have hR := hd G hG hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb + rw [SmallModes.perturbedFreeLM_apply] + constructor + · exact SmallModes.perturbedFreeMode_residual_bound τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) hτ hs hτs hs1 hε C D hC hD hc _ hR V + hV.perpX hV.perpY hV.perpSecond q m + · exact SmallModes.perturbedFreeMode_near_seed τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) hτ hs hτs hs1 hε hsmall C D hC hD hc _ hR V + hV.perpX hV.perpY hV.perpSecond q m + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..55f68269835edd1f0312d0924373e1fbce624030 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialFreeNormal.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialUnitPerpBounds + +namespace OAI + +/-! Apply the rational and square-root estimates to the actual free normal +of an immersed surface, with explicit inverse geometric margins. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +def freeNormalInputBudget (m : ℕ) (C K : ℝ) : ℝ := 1+C+normalBudget m C K + +def freeNormalBudget (m : ℕ) (D C K : ℝ) : ℝ := + let A := freeNormalInputBudget m C K + 2^m*((m.factorial : ℝ)*D*(K^2)^(m+1)*(1+dotBudget m (perpBudget m A))^m)*perpBudget m A + +lemma normalBudget_nonneg (m : ℕ) {C K : ℝ} (hC : 0 ≤ C) (hK : 0 ≤ K) : + 0 ≤ normalBudget m C K := by + have hh := liftBudget_nonneg m hC hK + unfold normalBudget + positivity + +/-- The coefficient depends polynomially on the two-jet bound and the +inverse Gram and normal-length bounds. -/ +theorem polynomial_freeNormal_bound (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ {U : Set Base} {F : RField 4}, ContDiff ℝ ∞ F → + RealModeDomain F U → ∀ {s C K : ℝ}, 0 < s → 1 ≤ C → 1 ≤ K → + WeightedBound U s m C (realTwoJet F) → + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ K) → + (∀ x ∈ U, (realSecond F x ⬝ᵥ realSecond F x)⁻¹ ≤ K) → + WeightedBound U s m (freeNormalBudget m D C K) (freeNormal F) := by + obtain ⟨D,hD,hunit⟩ := weighted_unitPerp (E := Base) m + refine ⟨D,hD,?_⟩ + intro U F hF hU s C K hs hC hK hb hG hN + have hC0 := zero_le_one.trans hC + have hK0 := zero_le_one.trans hK + have hj : ContDiffOn ℝ ∞ (realTwoJet F) U := (contDiff_realTwoJet hF).contDiffOn + have hX : ContDiffOn ℝ ∞ (coordDeriv dx F) U := (contDiff_real_coordDeriv hF dx).contDiffOn + have hY : ContDiffOn ℝ ∞ (coordDeriv dy F) U := (contDiff_real_coordDeriv hF dy).contDiffOn + have hW : ContDiffOn ℝ ∞ (coordDeriv dy (coordDeriv dy F)) U := + (contDiff_real_coordDeriv (contDiff_real_coordDeriv hF dy) dy).contDiffOn + have bX : WeightedBound U s m C (coordDeriv dx F) := hb.component hU.isOpen.uniqueDiffOn hs.le hC0 hj 0 + have bY : WeightedBound U s m C (coordDeriv dy F) := hb.component hU.isOpen.uniqueDiffOn hs.le hC0 hj 1 + have bW : WeightedBound U s m C (coordDeriv dy (coordDeriv dy F)) := + hb.component hU.isOpen.uniqueDiffOn hs.le hC0 hj 4 + have bN : WeightedBound U s m (normalBudget m C K) (realSecond F) := + weighted_realNormalPart hU.isOpen.uniqueDiffOn hs hC hK hX hY hW bX bY bW hU.determinant hG + have hNs := contDiffOn_realSecond hF hU + let A := freeNormalInputBudget m C K + have hnn := normalBudget_nonneg m hC0 hK0 + have hA : 0 ≤ A := by dsimp [A,freeNormalInputBudget]; linarith + have hCA : C ≤ A := by dsimp [A,freeNormalInputBudget]; linarith + have hNA : normalBudget m C K ≤ A := by dsimp [A,freeNormalInputBudget]; linarith + have hK2 : 1 ≤ K^2 := by nlinarith + apply hunit hU.isOpen.uniqueDiffOn hs hA hK2 hX hY hNs + (bX.mono_const hCA) (bY.mono_const hCA) (bN.mono_const hNA) + · intro x hx + exact NormalFrame.perp_sq_pos (hU.determinant x hx) (hU.good x hx) + (realNormalPart_perp _ _ _ (hU.determinant x hx)).1 + (realNormalPart_perp _ _ _ (hU.determinant x hx)).2 + · intro x hx + have hn := realNormalPart_perp (coordDeriv dx F x) (coordDeriv dy F x) + (coordDeriv dy (coordDeriv dy F) x) (hU.determinant x hx) + change coordDeriv dx F x ⬝ᵥ realSecond F x = 0 ∧ + coordDeriv dy F x ⬝ᵥ realSecond F x = 0 at hn + have hgpos := NormalFrame.gramDet_pos (hU.determinant x hx) + have he : NormalFrame.perpProduct (coordDeriv dx F x) (coordDeriv dy F x) (realSecond F x) ⬝ᵥ + NormalFrame.perpProduct (coordDeriv dx F x) (coordDeriv dy F x) (realSecond F x) = + NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x)* + (realSecond F x ⬝ᵥ realSecond F x) := by + rw [NormalFrame.perp_sq,hn.1,hn.2] + ring + rw [he,mul_inv_rev] + have hgb : (NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹ ≤ K := + (le_abs_self _).trans (hG x hx) + simpa only [pow_two] using mul_le_mul (hN x hx) hgb + (inv_nonneg.mpr hgpos.le) hK0 + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..07ca31fcc857a250a08162ba28cd1442db3cf158 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialGeometry.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialJetSmoothness +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicExpansionInit + +namespace OAI + +/-! Low-jet geometry and the initial primitive in the actual periodic family +are represented by the corresponding coordinate polynomial expressions. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open LocalPeriodicExpansion CovarianceCorrector + +namespace VectorExpression + +def sub (R T : VectorExpression) : VectorExpression := fun i => (R i).sub (T i) + +lemma represents_sub {S : TopologicalSpace.Opens Base} {G : Base → Space} + {R T : VectorExpression} {U W : Family S R4} (hR : Represents G R U) + (hT : Represents G T W) : Represents G (R.sub T) (U - W) := by + intro i p hp t + simp only [sub, Expression.eval_sub, hR i p hp t, hT i p hp t, Family.sub_apply] + rfl + +end VectorExpression + +namespace MetricPolynomial + +def velocity (V : LowJet → C(Period, R4)) : VectorExpression := + fun a => .coeff (fun z => V z.1 (z.2 : Period) a) + +lemma represents_longitudinal {S : TopologicalSpace.Opens Base} {G : Base → Space} + {v : Base} (g : Geometry (E := R4) S v) (X₀ : LowJet → R4) (V : LowJet → C(Period, R4)) + (hX : ∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) (hV : ∀ p ∈ S, g.V.val p = V (lowJet G p)) : + VectorExpression.Represents G (longitudinal X₀ V) g.longitudinal := by + intro i p hp t + change (X₀ (lowJet G p) + V (lowJet G p) (t : Period)) i = _ + rw [Geometry.longitudinal, Family.add_apply, Family.constant_apply _ _ hp, + hX p hp, hV p hp] + +lemma represents_transverse {S : TopologicalSpace.Opens Base} {G : Base → Space} + {v : Base} (g : Geometry (E := R4) S v) (Y : LowJet → R4) + (hY : ∀ p ∈ S, g.Y p = Y (lowJet G p)) : + VectorExpression.Represents G (transverse Y) g.transverse := by + intro i p hp t + change Y (lowJet G p) i = _ + rw [Geometry.transverse, Family.constant_apply _ _ hp, hY p hp] + +lemma represents_velocity {S : TopologicalSpace.Opens Base} {G : Base → Space} + {v : Base} (g : Geometry (E := R4) S v) (V : LowJet → C(Period, R4)) + (hV : ∀ p ∈ S, g.V.val p = V (lowJet G p)) : + VectorExpression.Represents G (velocity V) g.V := by + intro i p hp t + change V (lowJet G p) (t : Period) i = _ + rw [hV p hp] + +lemma smooth_velocity {O : Set LowJet} {V : LowJet → C(Period, R4)} + (hV : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) : + (velocity V).SmoothCoeffs O := by + intro a + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj a + exact L.contDiff.comp_contDiffOn hV + +lemma represents_initial {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hQ : Set.MapsTo (lowJet G) S O) {v : Base} + (g : Geometry (E := R4) S v) {V : LowJet → C(Period, R4)} + (hVs : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) + (hV : ∀ p ∈ S, g.V.val p = V (lowJet G p)) : + VectorExpression.Represents G (initial V) g.initial := by + have hs := smooth_velocity hVs + have hv := represents_velocity g V hV + have hm := VectorExpression.represents_mean hO hQ hs hv + have hc := VectorExpression.represents_sub hv hm + have hcs : ((velocity V).sub (velocity V).mean).SmoothCoeffs O := by + intro a + exact Expression.smoothCoeffs_fluct hO (hs a) + exact VectorExpression.represents_primitive hO hQ hcs hc (fun p _ => g.V.centered_mean_zero p) + +end MetricPolynomial +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInitialCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInitialCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..f814586811f7f72ac68d9f9fbd84106421e931b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInitialCorrection.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InitialCorrectionStage +import OAI.Geometry.SurfaceImmersion.Geometry.InitializationPowers + +namespace OAI + +/-! Initial exact correction from the finite power bounds in the manuscript. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance polynomialInitialFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialInitialFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialInitialDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialInitialDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialInitialSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialInitialSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +variable {g : SmoothMetric M} {F : M → Space} {d : CorrectionGeometry g F} +namespace PreparedCorrection +open ExactCorrection + +/-- The first correction block for a power-controlled input family. The +geometric threshold and radii remain explicit; all finite jet and metric +smallness conditions are discharged here by the prescribed powers of `z`. -/ +theorem exact_correction_from_polynomial_initial_data + {μ 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 < η → + ∀ (F : M → Space) (_hF : ContMDiff planeModel spaceModel ∞ F) + (d : CorrectionGeometry g F) (c : PreparedCorrection d), + z^μ < c.ε 0 → 1/z^4 ≤ c.budget → z^4 ≤ c.ρ → 8*e ≤ c.a → + d.A.ShiftedBound 2 440 z (C/z^2) F → + d.A.TensorWeightedBound 1 440 D g.inner → + d.A.TensorWeightedBound 1 440 (C*z^N) (inducedTensor F-g.inner) → + ∃ G : M → Space, IsSmoothIsometricImmersion M g G ∧ + d.A.WeightedBound 1 2 (z^4/8+2*c.ρ*z^μ) (G-F) := by + obtain ⟨η,hη,hη32,hsmall⟩ := initialization_budget_threshold hμ hN hC hD he + refine ⟨η,hη,hη32,?_⟩ + intro z hz hzη F hF d c htε hbudget hρ ha hmap hmetric herr + obtain ⟨htz,ht32,hMB,hHB,hnear,herrB⟩ := hsmall z hz hzη + have ht : 0 < z^μ := Real.rpow_pos_of_pos hz _ + have ht1 : z^μ ≤ 1 := by linarith + have hP : 0 ≤ C/z^2 := div_nonneg hC (sq_nonneg z) + have hmap0 : d.A.ShiftedBound 2 0 1 (C/z^2) F := by + intro i j hj x + have hj2 : j-2 = 0 := by omega + have hh := hmap i j (by omega) x + simpa only [hj2,pow_zero,one_mul] using hh + have hmetric0 : d.A.TensorWeightedBound 1 0 D g.inner := + fun i => (hmetric i).mono_order (Nat.zero_le _) + have hδ : ((z^μ)^(10 : ℝ))^2 = z^(20*μ) := by + rw [← Real.rpow_natCast,← Real.rpow_mul (Real.rpow_nonneg hz.le _), + ← Real.rpow_mul hz.le] + congr 1 + norm_num + ring + have herr' : d.A.TensorWeightedBound (z^μ) 440 + (((z^μ)^(10 : ℝ))^2*e) (inducedTensor F-g.inner) := by + intro i + rw [hδ] + exact ((herr i).shrink_scale ht.le ht1).mono_const herrB + have hnear' : ((z^μ)^(10 : ℝ))^2*(C/z^2) ≤ c.ρ/8 := by + rw [hδ] + exact hnear.trans (div_le_div_of_nonneg_right hρ (by norm_num)) + obtain ⟨seed,hseed⟩ := c.initial_stage_of_scaled_bounds hF ht ht32 htε hz htz + hP hP hD he.le hmap0 hmap hmetric0 hmetric herr' + (hMB.trans hbudget) (hHB.trans hbudget) hnear' (by linarith) + obtain ⟨G,hG,hclose⟩ := c.exact_correction_initial_displacement hF ht ht32 hP hmap0 seed hseed + refine ⟨G,hG,fun i => (hclose i).mono_const ?_⟩ + rw [hδ] + linarith + +end PreparedCorrection +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInputNorm.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInputNorm.lean new file mode 100644 index 0000000000000000000000000000000000000000..251590014524afffb59dab3d1153ed257634a257 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInputNorm.lean @@ -0,0 +1,35 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors + +namespace OAI + +/-! Bounds on the actual tensor input norm of the phase solver. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean WeightedEstimates +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} (c : PolynomialSolveData P ε G hG φ K τ s) + +theorem norm_le_of_weightedBound (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (I : ℕ → ℝ) (hI : ∀ m, 1 ≤ I m) + (hcoords : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I m) + (m : ℕ) {C : ℝ} (hC : 0 ≤ C) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) + (hb : WeightedBound Set.univ s m C f) : + c.norm f m ≤ tensorChartBudget m (I m) (I (m + 1)) * C := by + have hn := supportedSeminorm_le_of_weightedBound hs hC f hb + have hfield := RealModes.weighted_coordDeriv_of_jets c.e.open_target c.smoothInverse s.coe_nonneg hs1 + (zero_le_one.trans (hI (m + 1))) (hcoords (m + 1)) + have hh := tensorChartPush_bound c.e (modeSupport K) c.supportChart c.smoothInverse hs hs1 + (hI m) (zero_le_one.trans (hI (m + 1))) (hcoords m) hfield f + exact hh.trans (mul_le_mul_of_nonneg_left hn + (tensorChartBudget_nonneg m (zero_le_one.trans (hI m)) (zero_le_one.trans (hI (m + 1))))) + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInteractionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInteractionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2dfbbf2e072ad279b10e71b96802f2ca0019c3d2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInteractionBounds.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledNonlinearBounds + +namespace OAI + +/-! Only the polynomial part of the mixed free/forced quadratic error. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +def coordinatePolynomialInteraction {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (X Y : RealModes.RField 4) : SmallModes.Base → PhaseMean.Tensor := + (tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) + (Y ∘ planeCoordinateIsometry) 0 ∘ planeCoordinateIsometry.symm)+ + coordinateQuadraticPolynomial P ε G Y 0 + +lemma coordinatePolynomialInteraction_smooth {n : ℕ} + {P : Fin 3 → Fin n → Expression} (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + {G : Base → Space} {X Y : RealModes.RField 4} + (hG : ContDiff ℝ ∞ G) (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) (ε : ℝ) : + ContDiff ℝ ∞ (coordinatePolynomialInteraction P ε G X Y) := + ((tensorQuadraticCross_smooth hP hG (hX.comp planeCoordinateIsometry.contDiff) + (hY.comp planeCoordinateIsometry.contDiff) ε 0).comp planeCoordinateIsometry.symm.contDiff).add + (coordinateQuadraticPolynomial_smooth hP hG hY ε 0) + +lemma coordinate_quadratic_add {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + {X Y : RealModes.RField 4} (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) : + coordinateQuadraticPolynomial P ε G (X+Y) 0 = + coordinateQuadraticPolynomial P ε G X 0+coordinatePolynomialInteraction P ε G X Y := by + have hh := coordinateFullQuadratic_add P ε G hX hY + funext x k + have he := congrArg (fun f => f x k) hh + have hm := congrFun (RealModes.realMetricTensor_add + (hX.differentiable (by simp) x) (hY.differentiable (by simp) x)) k + have hc := congrArg (fun f => f x k) (coordinateQuadraticInteraction_eq_cross P ε G X Y) + change RealModes.realMetricTensor (X+Y) x k+_ = + (RealModes.realMetricTensor X x k+_)+coordinateQuadraticInteraction P ε G X Y x k at he + change coordinateQuadraticPolynomial P ε G (X+Y) 0 x k = + coordinateQuadraticPolynomial P ε G X 0 x k+ + (tensorQuadraticCross P ε G (X ∘ planeCoordinateIsometry) (Y ∘ planeCoordinateIsometry) 0 + (planeCoordinateIsometry.symm x) k+coordinateQuadraticPolynomial P ε G Y 0 x k) + simp only [Pi.add_apply] at hm hc + change RealModes.realMetricTensor (X+Y) x k = + RealModes.realMetricTensor X x k+RealModes.realLinearizedTensor X Y x k+ + RealModes.realMetricTensor Y x k at hm + linarith only [he,hm,hc] + +theorem scaled_polynomial_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 + (E*(A*B+B^2)*(δ^3/τ)) (coordinatePolynomialInteraction 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 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 hadd := hcc.add hV.uniqueDiffOn hτ.le hscross + (coordinateQuadraticPolynomial_smooth hP hG hY ε 0).contDiffOn hys + convert hadd using 1 <;> first | rfl | ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInverseChartJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInverseChartJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..d67f85bc084de22c6b42dd751fa29409ae640f08 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialInverseChartJets.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartGeometry +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra +import Mathlib.Analysis.Calculus.ContDiff.Bounds + +namespace OAI + +/-! Quantitative derivatives of an inverse chart from its actual inverse +Jacobian field. The finite-order budget is polynomial in the field's jets. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes + +def inverseChartJetBudget : ℕ → ℝ → ℝ + | 0, _ => 1 + | n+1, B => inverseChartJetBudget n B + + (n.factorial : ℝ)*B*(inverseChartJetBudget n B)^n + +lemma inverseChartJetBudget_one_le (n : ℕ) {B : ℝ} (hB : 0 ≤ B) : + 1 ≤ inverseChartJetBudget n B := by + induction n with + | zero => rfl + | succ n ih => + have hpos : 0 ≤ (n.factorial : ℝ)*B*(inverseChartJetBudget n B)^n := by + have hb := zero_le_one.trans ih + positivity + exact ih.trans (le_add_of_nonneg_right hpos) + +lemma inverseChartJetBudget_le_succ (n : ℕ) {B : ℝ} (hB : 0 ≤ B) : + inverseChartJetBudget n B ≤ inverseChartJetBudget (n+1) B := by + have hb := zero_le_one.trans (inverseChartJetBudget_one_le n hB) + change _ ≤ _ + _ + exact le_add_of_nonneg_right (by positivity) + +lemma inverseChartJetBudget_polynomial (n : ℕ) : + HasPolynomialBound (inverseChartJetBudget n) := by + induction n with + | zero => exact polynomialBound_const zero_le_one + | succ n ih => + exact ih.add (((polynomialBound_const (Nat.cast_nonneg n.factorial)).mul + polynomialBound_id).mul (ih.pow n)) + +/-- The derivative equation is the ordinary inverse-function identity. No +bound on the position of the inverse chart is needed for positive jets. -/ +theorem inverse_chart_positive_jets + (e : OpenPartialHomeomorph Base Base) + (hi : ContDiff ℝ ∞ e.symm) (J : Base → Base →L[ℝ] Base) + (hJ : ContDiffOn ℝ ∞ J e.source) + (heq : ∀ y ∈ e.target, fderiv ℝ e.symm y = J (e.symm y)) + {m : ℕ} {B : ℝ} (hB : 0 ≤ B) + (hjets : ∀ k ≤ m, ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ k J e.source x‖ ≤ B) : + ∀ j, 1 ≤ j → j ≤ m+1 → ∀ y ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ inverseChartJetBudget (m+1) B := by + have hstep : ∀ n ≤ m+1, ∀ j, 1 ≤ j → j ≤ n → ∀ y ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ inverseChartJetBudget n B := by + intro n + induction n with + | zero => intro hn j hj hjn; omega + | succ n ih => + intro hn j hj hjn y hy + by_cases hjold : j ≤ n + · exact (ih (by omega) j hj hjold y hy).trans (inverseChartJetBudget_le_succ n hB) + have hjnew : j = n+1 := by omega + subst j + have hcomp := norm_iteratedFDerivWithin_comp_le hJ hi.contDiffOn + (show (n : ℕ∞ω) ≤ ∞ by simp) e.open_source.uniqueDiffOn + e.open_target.uniqueDiffOn (fun x hx => e.map_target hx) hy + (fun k hk => hjets k (by omega) _ (e.map_target hy)) + (fun k hk hkn => (ih (by omega) k hk hkn y hy).trans + (by + simpa only [pow_one] using + pow_le_pow_right₀ (inverseChartJetBudget_one_le n hB) hk)) + have heq' : EqOn (fderivWithin ℝ e.symm e.target) (J ∘ e.symm) e.target := by + intro x hx + rw [fderivWithin_of_isOpen e.open_target hx] + exact heq x hx + rw [← norm_iteratedFDerivWithin_fderivWithin e.open_target.uniqueDiffOn hy, + iteratedFDerivWithin_congr heq' hy] + exact hcomp.trans (le_add_of_nonneg_left + (zero_le_one.trans (inverseChartJetBudget_one_le n hB))) + exact hstep (m+1) le_rfl + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetRecursion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetRecursion.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e594724631a8862e3bd2b258d7003fcce584c88 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetRecursion.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricForcing + +namespace OAI + +/-! Finite jet-order induction for the explicit periodic correction recursion. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open Expression + +/-- Low-jet longitudinal vector, including the velocity loop. -/ +def longitudinal (X₀ : LowJet → R4) (V : LowJet → C(CovarianceCorrector.Period, R4)) : + VectorExpression := fun a => .coeff (fun z => (X₀ z.1 + V z.1 (z.2 : CovarianceCorrector.Period)) a) + +def transverse (Y : LowJet → R4) : VectorExpression := fun a => .coeff (fun z => Y z.1 a) + +def initial (V : LowJet → C(CovarianceCorrector.Period, R4)) : VectorExpression := fun a => + (Expression.coeff (fun z => V z.1 (z.2 : CovarianceCorrector.Period) a)).fluct.primitive + +/-- All forcing expressions are formed before the full correction is applied. -/ +def step (Y C X₀ : LowJet → R4) (V : LowJet → C(CovarianceCorrector.Period, R4)) + (q : LowJet → ℝ) (dx dy : Fin 2) (U : ℕ → VectorExpression) (r : ℕ) : VectorExpression := + fun a => fullComponent Y C X₀ V q (EuclideanSpace.proj a) dy + ((mixedForcing (longitudinal X₀ V) (transverse Y) dx dy U r).fluct.scale (-1)) + ((transverseForcing dy U r).fluct.scale (-1 / 2)) + ((longitudinalForcing (longitudinal X₀ V) dx U r).fluct.scale (-1)) + +def coefficients (Y C X₀ : LowJet → R4) (V : LowJet → C(CovarianceCorrector.Period, R4)) + (q : LowJet → ℝ) (dx dy : Fin 2) : ℕ → ℕ → VectorExpression + | 0 => fun _ => initial V + | n + 1 => Function.update (coefficients Y C X₀ V q dx dy n) (n + 1) + (step Y C X₀ V q dx dy (coefficients Y C X₀ V q dx dy n) (n + 1)) + +lemma order_step {Y C X₀ : LowJet → R4} {V : LowJet → C(CovarianceCorrector.Period, R4)} + {q : LowJet → ℝ} {dx dy : Fin 2} {U : ℕ → VectorExpression} {r : ℕ} (hr : 1 ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (a : Fin 4) : + (step Y C X₀ V q dx dy U r a).order ≤ 2 * r + 2 := by + have hs := forcing_orders hr hU + (X := longitudinal X₀ V) (Y := transverse Y) (fun _ => le_refl 2) (fun _ => le_refl 2) dx dy + let h := (mixedForcing (longitudinal X₀ V) (transverse Y) dx dy U r).fluct.scale (-1) + let j := (transverseForcing dy U r).fluct.scale (-1 / 2) + let e := (longitudinalForcing (longitudinal X₀ V) dx U r).fluct.scale (-1) + have hh : h.order ≤ 2 * r + 1 := by simpa only [h, order_scale, order_fluct] using hs.1 + have hj : j.order ≤ 2 * r + 1 := by simpa only [j, order_scale, order_fluct] using hs.2.2 + have he : e.order ≤ 2 * r + 1 := by simpa only [e, order_scale, order_fluct] using hs.2.1 + have hb := fullComponent_bounds Y C X₀ V q (EuclideanSpace.proj a) dy h j e + (2 * r + 1) (max h.loss (max j.loss e.loss)) (by omega) hh hj he + (le_max_left _ _) ((le_max_left _ _).trans (le_max_right _ _)) + ((le_max_right _ _).trans (le_max_right _ _)) + exact hb.1 + +/-- The expression for U_(i+1) uses jets of the base map through order 2i+2, +independently of how much further the finite recursion is continued. -/ +theorem coefficients_order (Y C X₀ : LowJet → R4) + (V : LowJet → C(CovarianceCorrector.Period, R4)) (q : LowJet → ℝ) + (dx dy : Fin 2) (n i : ℕ) (a : Fin 4) : + (coefficients Y C X₀ V q dx dy n i a).order ≤ 2 * i + 2 := by + induction n generalizing i a with + | zero => + change ((Expression.coeff _).fluct.primitive).order ≤ _ + simp only [order_primitive, order_fluct, order] + omega + | succ n ih => + by_cases hi : i = n + 1 + · subst i + rw [coefficients, Function.update_self] + exact order_step (by omega) (fun j _ a => ih j a) a + · rw [coefficients, Function.update_of_ne hi] + exact ih i a + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetSmoothness.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetSmoothness.lean new file mode 100644 index 0000000000000000000000000000000000000000..3e8fb31ef11be31cc61440db2529598ab8fbc8bd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialJetSmoothness.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialJetRecursion + +namespace OAI + +/-! The finite correction expressions have coefficients smooth throughout +the admissible low-jet domain. No higher jets occur in coefficient inverses. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open CovarianceCorrector + +lemma smooth_longitudinal {O : Set LowJet} {X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} + (hX : ContDiffOn ℝ ∞ X₀ O) + (hV : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) : + (longitudinal X₀ V).SmoothCoeffs O := by + intro a + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj a + exact L.contDiff.comp_contDiffOn + ((hX.comp contDiffOn_fst (fun _ hz => hz.1)).add hV) + +lemma smooth_transverse {O : Set LowJet} {Y : LowJet → R4} (hY : ContDiffOn ℝ ∞ Y O) : + (transverse Y).SmoothCoeffs O := by + intro a + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj a + have hi : ContDiffOn ℝ ∞ (fun Q => Y Q a) O := + L.contDiff.comp_contDiffOn hY + exact hi.comp contDiffOn_fst (fun _ hz => hz.1) + +lemma smooth_initial {O : Set LowJet} (hO : IsOpen O) {V : LowJet → C(Period, R4)} + (hV : ContDiffOn ℝ ∞ (fun z : LowJet × ℝ => V z.1 (z.2 : Period)) (O ×ˢ Set.univ)) : + (initial V).SmoothCoeffs O := by + intro a + let L : R4 →L[ℝ] ℝ := EuclideanSpace.proj a + have hc : (Expression.coeff (fun z => V z.1 (z.2 : Period) a)).SmoothCoeffs O := + L.contDiff.comp_contDiffOn hV + exact Expression.smoothCoeffs_primitive hO (Expression.smoothCoeffs_fluct hO hc) + +lemma smooth_step {O : Set LowJet} (hO : IsOpen O) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + {U : ℕ → VectorExpression} (hU : ∀ j, (U j).SmoothCoeffs O) (dx dy : Fin 2) (r : ℕ) : + (step Y C X₀ V q dx dy U r).SmoothCoeffs O := by + intro a + apply Expression.smoothCoeffs_fullComponent hO hY hC hX hV hd hq hqp hcircle (EuclideanSpace.proj a) dy + · exact Expression.smoothCoeffs_scale _ (Expression.smoothCoeffs_fluct hO + (smooth_mixedForcing hO hU (smooth_longitudinal hX hV) (smooth_transverse hY) dx dy r)) + · exact Expression.smoothCoeffs_scale _ (Expression.smoothCoeffs_fluct hO (smooth_yyQuadratic hO hU dy (r + 1))) + · exact Expression.smoothCoeffs_scale _ (Expression.smoothCoeffs_fluct hO + (smooth_longitudinalForcing hO hU (smooth_longitudinal hX hV) dx r)) + +theorem coefficients_smooth {O : Set LowJet} (hO : IsOpen O) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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, PeriodicCorrector.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) + (dx dy : Fin 2) (n i : ℕ) : + (coefficients Y C X₀ V q dx dy n i).SmoothCoeffs O := by + induction n generalizing i with + | zero => exact smooth_initial hO hV + | succ n ih => + by_cases hi : i = n + 1 + · subst i + rw [coefficients, Function.update_self] + exact smooth_step hO hY hC hX hV hd hq hqp hcircle ih dx dy (n + 1) + · rw [coefficients, Function.update_of_ne hi] + exact ih i + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..1bc2aff3386ef10349574671724fbe10d32710a7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanBudgets.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Correction.LinearMeanBudgetsFromBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! Construct every numerical mean budget in a selected linear phase +chart with explicit polynomial dependence on the geometry. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes PhaseGeometry WeightedEstimates + +def linearMeanGeometryBudget (p : ℕ → ℕ) (A B P : ℕ → ℝ) (m : ℕ) : ℝ := + 1+3*B m+16*(B m)^2+P m+A m*(B m)^(p m) + +lemma linearMeanGeometryBudget_growth (p : ℕ → ℕ) (A : ℕ → ℝ) + (B P : ℕ → ℝ → ℝ) (hA : ∀ m, 0 ≤ A m) + (hB : ∀ m, HasPolynomialBound (B m)) (hP : ∀ m, HasPolynomialBound (P m)) (m : ℕ) : + HasPolynomialBound (fun x => linearMeanGeometryBudget p A + (fun r => B r x) (fun r => P r x) m) := + ((((polynomialBound_const zero_le_one).add + ((polynomialBound_const (show (0 : ℝ) ≤ 3 by norm_num)).mul (hB m))).add + ((polynomialBound_const (show (0 : ℝ) ≤ 16 by norm_num)).mul ((hB m).pow 2))).add (hP m)).add + ((polynomialBound_const (hA m)).mul ((hB m).pow (p m))) + +theorem polynomial_linear_mean_budgets : + ∃ (p : ℕ → ℕ) (A : ℕ → ℝ), (∀ m, 1 ≤ A m) ∧ + ∀ {F : RField 4} {U : Set Base}, ContDiff ℝ ∞ F → ∀ hU : IsOpen U, + ∀ {ξ : Base} (hξ : ξ ≠ 0) {s : ℝ}, 0 < s → s ≤ 1 → + ∀ (ψ : Base → ℝ) (Q : Tensor →L[ℝ] ℝ) (B P : ℕ → ℝ), + (∀ m, 1 ≤ B m) → (∀ m, 1 ≤ P m) → + (∀ m, ‖ξ‖ ≤ B m ∧ ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ B m ∧ + ‖Q‖ ≤ B m ∧ + (∀ j ≤ m+2, WeightedBound U 1 j (B m/s^(j-2)) F) ∧ + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B m) ∧ + (∀ x ∈ U, ‖secondQuadratic (realSecondTensor F x) (-ξ.2,ξ.1)‖⁻¹ ≤ B m)) → + (∀ x ∈ U, Function.Injective (fderiv ℝ F x)) → + (∀ x ∈ U, Good (realSecondTensor F x) ξ) → + (∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (P m) ψ) → + ∃ d : Budgets U (linearPhaseChart ξ hξ U hU).target s + (F ∘ (linearPhaseChart ξ hξ U hU).symm) ψ (fun _ => Q) + (linearPhaseChart ξ hξ U hU) (linearPhaseChart ξ hξ U hU).symm, + ∀ m, d.inv m ≤ linearMeanGeometryBudget p A B P m ∧ + d.chi m ≤ linearMeanGeometryBudget p A B P m ∧ + d.forms m ≤ linearMeanGeometryBudget p A B P m ∧ + d.pull m ≤ linearMeanGeometryBudget p A B P m ∧ + d.psi m ≤ linearMeanGeometryBudget p A B P m ∧ + d.normal m ≤ linearMeanGeometryBudget p A B P m ∧ + d.mode m ≤ linearMeanGeometryBudget p A B P m := by + classical + choose p A hA hframe using fun m => polynomial_phase_frame_bound m + refine ⟨p,A,hA,?_⟩ + intro F U hF hU ξ hξ s hs hs1 ψ Q B P hB hP hb hImm hgood hψ + have hset : (phaseEquiv ξ hξ) '' U = (phaseEquiv ξ hξ).symm ⁻¹' U := by + ext x + constructor + · rintro ⟨y,hy,rfl⟩ + simpa only [mem_preimage, ContinuousLinearEquiv.symm_apply_apply] using hy + · intro hx + exact ⟨(phaseEquiv ξ hξ).symm x,hx,(phaseEquiv ξ hξ).apply_symm_apply x⟩ + let C := fun m => A m*(B m)^(p m) + have hC (m : ℕ) : 1 ≤ C m := + one_le_mul_of_one_le_of_one_le (hA m) (one_le_pow₀ (hB m)) + have hf (m : ℕ) := hframe m hF hU hξ hs hs1 (hB m) + (hb m).1 (hb m).2.1 (hb m).2.2.2.1 hImm hgood (hb m).2.2.2.2.1 (hb m).2.2.2.2.2 + have hc : ∀ m, ReconstructionCoefficientBound + (fun x => complexify ((F ∘ (linearPhaseChart ξ hξ U hU).symm) x)) + (linearPhaseChart ξ hξ U hU).target s m (C m) := by + intro m + simpa only [linearPhaseChart_target, linearPhaseChart_symm_apply, hset, Function.comp_def] using (hf m).1 + have hn : ∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (C m) + (freeNormal (F ∘ (linearPhaseChart ξ hξ U hU).symm)) := by + intro m + simpa only [linearPhaseChart_target, linearPhaseChart_symm_apply, hset, Function.comp_def] using (hf m).2 + let d := linearMeanBudgetsOfBounds hU hξ s (F ∘ (linearPhaseChart ξ hξ U hU).symm) + ψ Q C C P hC hC hP hc hn hψ + refine ⟨d,?_⟩ + intro m + have hB0 : 0 ≤ B m := zero_le_one.trans (hB m) + have hP0 : 0 ≤ P m := zero_le_one.trans (hP m) + have hC0 : 0 ≤ C m := zero_le_one.trans (hC m) + have hξB := (hb m).1 + have hiB := (hb m).2.1 + have hQB := (hb m).2.2.1 + have hsq : ‖ξ‖^2 ≤ (B m)^2 := pow_le_pow_left₀ (norm_nonneg ξ) hξB 2 + change max 1 ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ _ ∧ + max 1 (2*‖ξ‖) ≤ _ ∧ max 1 ‖Q‖ ≤ _ ∧ max 1 (16*‖ξ‖^2) ≤ _ ∧ + P m ≤ _ ∧ C m ≤ _ ∧ C m ≤ _ + unfold linearMeanGeometryBudget + change _ ≤ 1+3*B m+16*(B m)^2+P m+C m ∧ _ + refine ⟨max_le (by nlinarith [sq_nonneg (B m)]) (by nlinarith), + max_le (by nlinarith [sq_nonneg (B m)]) (by nlinarith), + max_le (by nlinarith [sq_nonneg (B m)]) (by nlinarith), + max_le (by nlinarith [sq_nonneg (B m)]) (by nlinarith),by nlinarith [sq_nonneg (B m)],by nlinarith [sq_nonneg (B m)],by nlinarith [sq_nonneg (B m)]⟩ + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..83fe53842c372ff5e71c2624d40273638103b2bc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearMeanData.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLinearMeanBudgets +import OAI.Geometry.SurfaceImmersion.Correction.UnperturbedMeanDataFromBounds + +namespace OAI + +/-! Actual supported mean data with polynomial geometric budgets, for +the linear phases used in the exact metric correction. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes PhaseGeometry + +theorem polynomial_linear_charted_mean_data : + ∃ (p : ℕ → ℕ) (A : ℕ → ℝ), (∀ m, 1 ≤ A m) ∧ + ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + {U : Set SmallModes.Base} (hU : IsOpen U) {ξ : SmallModes.Base} (hξ : ξ ≠ 0), + c.e = linearPhaseChart ξ hξ U hU → + ∀ {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base), + U₀ ⊆ K₀ → ∀ hKU₀ : (K : Set Base) ⊆ U₀, 0 < (s : ℝ) → s ≤ 1 → + ∀ (ψ : SupportedField (F := ℝ) c.chartCompact) (Q : Tensor →L[ℝ] ℝ) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor}, + (∀ x ∈ U, ρ+‖Q‖*r ≤ Q (reference x) ∧ Q (reference x) ≤ R-‖Q‖*r) → + (∀ x ∈ U, Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ U, Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) ξ) → + ∀ B P Pjet : ℕ → ℝ, (∀ m, 1 ≤ B m) → (∀ m, 1 ≤ P m) → + (∀ m, 0 ≤ Pjet m) → + (∀ m, ‖ξ‖ ≤ B m ∧ ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ B m ∧ + ‖Q‖ ≤ B m ∧ + (∀ j ≤ m+2, WeightedBound U 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) ∧ + (∀ x ∈ U, ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ B m) ∧ + (∀ x ∈ U, ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-ξ.2,ξ.1)‖⁻¹ ≤ B m)) → + (∀ m, WeightedBound c.e.target s m (P m) ψ) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j (Pjet m/(s : ℝ)^(j-2)) G) → + ∃ d : ChartedMeanData (c.onSourceDomain U₀ hU₀ hKU₀) + r ρ R reference, + d.cutoff = ψ ∧ d.form = (fun _ => Q) ∧ + ∀ m, d.budgets.inv m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.chi m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.forms m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.pull m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.psi m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.normal m ≤ linearMeanGeometryBudget p A B P m ∧ + d.budgets.mode m ≤ linearMeanGeometryBudget p A B P m := by + obtain ⟨p,A,hA,hbudgets⟩ := polynomial_linear_mean_budgets + refine ⟨p,A,hA,?_⟩ + intro G hG φ K τ s c U hU ξ hξ hce U₀ hU₀ K₀ hU₀K hKU₀ hs hs1 + ψ Q r ρ R reference hmargin hImm hgood B P Pjet hB hP hPjet hb hψ hpref + have hGc : ContDiff ℝ ∞ (G ∘ planeCoordinateIsometry.symm) := + hG.comp planeCoordinateIsometry.symm.contDiff + have hψ' : ∀ m, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (P m) ψ := by + simpa only [hce] using hψ + obtain ⟨b,hb⟩ := hbudgets hGc hU hξ hs hs1 ψ Q B P hB hP hb hImm hgood hψ' + have loc : LocalBounds c.e.source c.e.target s r ρ R reference + c.realMap ψ (fun _ => Q) c.e c.e.symm := by + simpa only [hce,linearPhaseChart_source,PolynomialSolveData.realMap] using + linear_phase_local_bounds hGc hU hξ hImm hgood ψ.contDiff Q hmargin + let b' : Budgets c.e.source c.e.target s c.realMap ψ (fun _ => Q) c.e c.e.symm := { + inv := b.inv + chi := b.chi + psi := b.psi + forms := b.forms + pull := b.pull + normal := b.normal + mode := b.mode + inv_pos := b.inv_pos + chi_pos := b.chi_pos + psi_pos := b.psi_pos + forms_pos := b.forms_pos + pull_pos := b.pull_pos + normal_pos := b.normal_pos + mode_pos := b.mode_pos + inv_bound := by simpa only [hce] using b.inv_bound + chi_bound := by simpa only [hce,linearPhaseChart_source] using b.chi_bound + psi_bound := by simpa only [hce] using b.psi_bound + normal_bound := by simpa only [hce,PolynomialSolveData.realMap] using b.normal_bound + mode_bound := by simpa only [hce,PolynomialSolveData.realMap] using b.mode_bound + forms_bound := by simpa only [hce] using b.forms_bound + pull_bound := by simpa only [hce,linearPhaseChart_source] using b.pull_bound + } + obtain ⟨d,hcut,hform,hi,hχ,hQ,hpull,hpsi,hn,hm⟩ := + unperturbed_mean_data_from_bounds c hU₀ K₀ hU₀K hKU₀ hs hs1 ψ (fun _ => Q) + loc b' Pjet hPjet hpref + refine ⟨d,hcut,hform,?_⟩ + intro m + rw [hi,hχ,hQ,hpull,hpsi,hn,hm] + exact hb m + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearModes.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearModes.lean new file mode 100644 index 0000000000000000000000000000000000000000..21ddd775d356a225ec7ee5b746e1c5dd96fef6af --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearModes.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPerturbationOperator + +namespace OAI + +/-! Recover the real polynomial linearization from the complex conjugated +operator. This is the realization identity needed by forced cancellation. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets + +lemma first_variation_phase_factor (e : Expression) (G : Base → Space) + (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) (τ : ℝ) (z : Base × ℝ) : + phase τ φ z.1 * conjugatedVariation e G (singlePhase φ) (singleDirection H) τ 0 z = + ((ofExpression e).differentiate 0).evalComplex G + (complexDirectionData G (fun p => phase τ φ p • H p)) z := by + have hp : phaseProduct (singlePhase φ) τ 0 z.1 = phase τ φ z.1 := by + simp [phaseProduct, singlePhase] + rw [conjugatedVariation, hp, ← mul_assoc, + mul_inv_cancel₀ (show phase τ φ z.1 ≠ 0 from Complex.exp_ne_zero _), one_mul, + single_oscillatoryData] + rfl + +namespace Perturbation + +def linearized {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G H : Base → Space) + (t : ℝ) (p : Base) : ℝ := ∑ l, ε ^ (l.val + 1) * (P l).variation G H (p,t) + +lemma linearized_real_mode {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) {φ : Base → ℝ} {H : Base → Fin 4 → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hH : ContDiff ℝ ∞ H) (τ t : ℝ) (p : Base) : + linearized P ε G (realField (fun x => phase τ φ x • H x)) t p = + (phase τ φ p * conjugated P ε G (singlePhase φ) (singleDirection H) τ 0 (p,t)).re := by + have hs : ContDiff ℝ ∞ (fun x => phase τ φ x • H x) := (phase_smooth hφ τ).smul hH + unfold linearized conjugated + simp only [Finset.mul_sum, Complex.re_sum] + apply Finset.sum_congr rfl + intro l hl + rw [show phase τ φ p * (ε ^ (l.val + 1) • + conjugatedVariation (P l) G (singlePhase φ) (singleDirection H) τ 0 (p,t)) = + ε ^ (l.val + 1) • (phase τ φ p * + conjugatedVariation (P l) G (singlePhase φ) (singleDirection H) τ 0 (p,t)) by + simp only [Complex.real_smul]; ring] + rw [first_variation_phase_factor (P l) G φ H τ (p,t), complex_first_variation (P l) G hs] + simp [-Complex.ofReal_pow] + +lemma conjugatedLM_realization {n : ℕ} {O : Set LowJet} {U : Set Base} + {G : Base → Space} (hO : IsOpen O) (hU : IsOpen U) (P : Fin n → Expression) + (hP : ∀ l, (P 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 : ℝ) + (H : SupportedField (F := Fin 4 → ℂ) K) (p : Base) : + linearized P ε G (realField (fun x => phase τ φ x • H x)) t p = + (phase τ φ p * conjugatedLM hO hU P hP hG hQ K hKU hφ τ ε t H p).re := by + rw [conjugatedLM_apply] + exact linearized_real_mode P ε G hφ H.contDiff τ t p + +lemma linearized_add {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {H K : Base → Space} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (t : ℝ) (p : Base) : + linearized P ε G (fun x => H x + K x) t p = + linearized P ε G H t p + linearized P ε G K t p := by + simp only [linearized, Expression.variation_add _ G hH hK, mul_add, Finset.sum_add_distrib] + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..1cf312bc48edba08cbaa1142f8194cca6b2b81b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLinearSolver.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFromBounds +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseDerivativeBounds + +namespace OAI + +/-! A linear-phase metric solver whose actual coefficient budgets are +polynomial in the supplied jet and denominator bounds. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes PhaseGeometry + +theorem polynomial_linear_unperturbed_solver : + ∃ (p : ℕ → ℕ) (A : ℕ → ℝ), (∀ m, 1 ≤ A m) ∧ + ∀ {G : Base → Space} (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + {U : Set SmallModes.Base} (hU : IsOpen U) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + {φ : Base → ℝ} (_hφ : ContDiff ℝ ∞ φ) + (_hphase : coordinatePhase φ = phaseLinear ξ), + (modeSupport K : Set SmallModes.Base) ⊆ U → + (∀ x ∈ U, Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ U, Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) ξ) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ B : ℕ → ℝ, (∀ m, 1 ≤ B m) → + (∀ m, ‖ξ‖ ≤ B m ∧ ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ B m ∧ + (∀ j ≤ m+3, WeightedBound U 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) ∧ + (∀ x ∈ U, ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ B m) ∧ + (∀ x ∈ U, ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-ξ.2,ξ.1)‖⁻¹ ≤ B m)) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = linearPhaseChart ξ hξ U hU ∧ + (∀ m, c.C m = A m*(B m)^(p m)) ∧ + (∀ m, c.D m = 0) ∧ (∀ m, c.J m = 1+2*B m) := by + classical + choose p A hA hframe using fun m => polynomial_phase_frame_bound (m+1) + refine ⟨p,A,hA,?_⟩ + intro G hG K U hU ξ hξ φ hφ hphase hKU hImm hgood τ s hs hs1 B hB hb + let e := linearPhaseChart ξ hξ U hU + have hsmooth := linearPhaseChart_smooth ξ hξ U hU + have hF : ContDiff ℝ ∞ (G ∘ planeCoordinateIsometry.symm) := + hG.comp planeCoordinateIsometry.symm.contDiff + have hdom := linearPhaseChart_modeDomain hF hU hξ hImm hgood + have hset : (phaseEquiv ξ hξ) '' U = (phaseEquiv ξ hξ).symm ⁻¹' U := by + ext x + constructor + · rintro ⟨y,hy,rfl⟩ + simpa only [mem_preimage, ContinuousLinearEquiv.symm_apply_apply] using hy + · intro hx + exact ⟨(phaseEquiv ξ hξ).symm x,hx,(phaseEquiv ξ hξ).apply_symm_apply x⟩ + have hc (m : ℕ) : SmallModes.ReconstructionCoefficientBound + (fun x => complexify (G (planeCoordinateIsometry.symm (e.symm x)))) + e.target s (m+1) (A m*(B m)^(p m)) := by + obtain ⟨hξB,hiB,hpref,hgram,hnormal⟩ := hb m + have hpref' : ∀ j ≤ (m+1)+2, WeightedBound U 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm) := by + intro j hj + exact hpref j (by omega) + have hh := (hframe m hF hU hξ hs hs1 (hB m) hξB hiB hpref' hImm hgood hgram hnormal).1 + simpa only [e, linearPhaseChart_target, linearPhaseChart_symm_apply, hset, Function.comp_def] using hh + have hC (m : ℕ) : 0 ≤ A m*(B m)^(p m) := + mul_nonneg (zero_le_one.trans (hA m)) (pow_nonneg (zero_le_one.trans (hB m)) _) + have hJ (m : ℕ) : 1 ≤ 1+2*B m := by linarith [hB m] + have hj (m j : ℕ) (hj : 1 ≤ j) (_hjm : j ≤ m) (x : SmallModes.Base) + (hx : x ∈ e.source) : ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ 1+2*B m := by + exact (linearPhaseChart_derivative_bound hξ hU hj hx).trans (by linarith [(hb m).1]) + let c := unperturbedSolverOfBounds hG K hφ e hsmooth.1 hsmooth.2 hKU + (fun x _ => by rw [hphase]; rfl) hdom τ s (fun m => A m*(B m)^(p m)) + (fun m => 1+2*B m) hC hJ hc hj + exact ⟨c,rfl,fun _ => rfl,fun _ => rfl,fun _ => rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..6137099e68269bbd68baafc12187da2edcb8e33a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalAmplitude.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialAmplitudeBounds +import OAI.Geometry.Immersion.ClosedSurface.LocalMean + +namespace OAI + +/-! Polynomial square-root amplitudes for the actual local metric data. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean + +def coefficientBudget (m : ℕ) (B : ℝ) : ℝ := 2^m*B*(m.factorial : ℝ)*B^m + +lemma coefficientBudget_polynomial (m : ℕ) : HasPolynomialBound (coefficientBudget m) := by + unfold coefficientBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +variable {U V : Set Base} {s r ρ R : ℝ} {reference : Base → Tensor} + {F : RField 4} {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +lemma inputFactor_le_coefficientBudget (d : Budgets U V s F ψ Q χ e) + (m : ℕ) {B : ℝ} (hB : 1 ≤ B) (hi : d.inv m ≤ B) (hf : d.forms m ≤ B) : + inputFactor d m ≤ coefficientBudget m B := by + have hI := d.inv_pos m + have hF := d.forms_pos m + unfold inputFactor coefficientBudget + gcongr + +theorem polynomial_local_amplitude_bounds (m : ℕ) : + ∃ p : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ {U V : Set Base} {s r ρ R : ℝ} {reference : Base → Tensor} + {F : RField 4} {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base}, + ∀ (_h : LocalBounds U V s r ρ R reference F ψ Q χ e) + (d : Budgets U V s F ψ Q χ e), + 0 < s → s ≤ 1 → 0 < ρ → ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + d.inv m ≤ B → d.forms m ≤ B → d.psi m ≤ B → + ∀ (A A' : Base → Tensor) (D : ℝ), 0 ≤ D → + ContDiffOn ℝ ∞ A U → ContDiffOn ℝ ∞ A' U → + InTrialBall U reference r A → InTrialBall U reference r A' → + WeightedBound U s m B A → WeightedBound U s m B A' → + WeightedBound U s m D (A-A') → + WeightedBound V s m (C*B^p) (phaseAmplitude ψ (coefficient Q e A)) ∧ + WeightedBound V s m (C*B^p) (phaseAmplitude ψ (coefficient Q e A')) ∧ + WeightedBound V s m (C*B^p*D) + (fun x => phaseAmplitude ψ (coefficient Q e A) x-phaseAmplitude ψ (coefficient Q e A') x) := by + obtain ⟨k,C₀,hC₀,hamp⟩ := polynomial_phaseAmplitude_bounds (E := Base) m + let S := fun B : ℝ => 1+B+coefficientBudget m B*B + have hSp : HasPolynomialBound S := + ((polynomialBound_const zero_le_one).add polynomialBound_id).add + ((coefficientBudget_polynomial m).mul polynomialBound_id) + have hpoly : HasPolynomialBound (fun B => C₀*(S B)^k*(1+coefficientBudget m B)) := + ((polynomialBound_const (zero_le_one.trans hC₀)).mul (hSp.pow k)).mul + ((polynomialBound_const zero_le_one).add (coefficientBudget_polynomial m)) + obtain ⟨p,C,hC,hpoly⟩ := hpoly + refine ⟨p,C,hC,?_⟩ + intro U V s r ρ R reference F ψ Q χ e h d hs hs1 hρ B hB hρB hi hf hψ A A' D hD hA hA' hball hball' hbA hbA' hbD + have hB0 := zero_le_one.trans hB + have hJ : 0 ≤ coefficientBudget m B := by unfold coefficientBudget; positivity + have hS : 1 ≤ S B ∧ B ≤ S B ∧ coefficientBudget m B*B ≤ S B := by + dsimp [S] + have hh : 0 ≤ coefficientBudget m B*B := mul_nonneg hJ hB0 + constructor + · linarith + constructor <;> linarith + have hfactor := inputFactor_le_coefficientBudget d m hB hi hf + have hcoeff (T : Base → Tensor) (hT : ContDiffOn ℝ ∞ T U) + (hbT : WeightedBound U s m B T) : WeightedBound V s m (S B) (coefficient Q e T) := by + have hh := weighted_coefficient h.openU.uniqueDiffOn h.domain.isOpen.uniqueDiffOn hs hs1 + (d.inv_pos m) (zero_le_one.trans (d.forms_pos m)) hB0 h.smoothQ h.smoothInv + h.invInto hT (d.inv_bound m) (d.forms_bound m) hbT + exact hh.mono_const ((mul_le_mul_of_nonneg_right hfactor hB0).trans hS.2.2) + have hdiff := weighted_coefficient_difference h.openU.uniqueDiffOn h.domain.isOpen.uniqueDiffOn hs hs1 + (d.inv_pos m) (zero_le_one.trans (d.forms_pos m)) hD h.smoothQ h.smoothInv + h.invInto hA hA' (d.inv_bound m) (d.forms_bound m) hbD + have hdiff' : WeightedBound V s m (coefficientBudget m B*D) + ((coefficient Q e A)-(coefficient Q e A')) := + hdiff.mono_const (mul_le_mul_of_nonneg_right hfactor hD) + have hpos (T : Base → Tensor) (ht : InTrialBall U reference r T) : + ∀ x ∈ V, 0 < coefficient Q e T x := + fun x hx => hρ.trans_le (coefficient_trial_range h.invInto h.margin ht hx).1 + have hinv (T : Base → Tensor) (ht : InTrialBall U reference r T) : + ∀ x ∈ V, (coefficient Q e T x)⁻¹ ≤ S B := by + intro x hx + exact ((inv_le_inv₀ (hpos T ht x hx) hρ).mpr + (coefficient_trial_range h.invInto h.margin ht hx).1).trans (hρB.trans hS.2.1) + obtain ⟨ha,ha',hd⟩ := hamp h.domain.isOpen.uniqueDiffOn hs hS.1 (mul_nonneg hJ hD) + h.smoothPsi (contDiffOn_coefficient h.smoothQ h.smoothInv h.invInto hA) + (contDiffOn_coefficient h.smoothQ h.smoothInv h.invInto hA') + (hpos A hball) (hpos A' hball') (hinv A hball) (hinv A' hball') + ((d.psi_bound m).mono_const (hψ.trans hS.2.1)) (hcoeff A hA hbA) (hcoeff A' hA' hbA') hdiff' + have hsize := (hpoly B hB).2 + have hbase : C₀*(S B)^k ≤ C*B^p := by + calc + _ ≤ C₀*(S B)^k*(1+coefficientBudget m B) := + le_mul_of_one_le_right (by positivity) (by linarith) + _ ≤ _ := hsize + have hdiffsize : C₀*(S B)^k*(coefficientBudget m B*D) ≤ C*B^p*D := by + calc + _ ≤ (C₀*(S B)^k*(1+coefficientBudget m B))*D := by + have hz : 0 ≤ C₀*(S B)^k := by positivity + nlinarith [mul_nonneg hz hD] + _ ≤ _ := mul_le_mul_of_nonneg_right hsize hD + exact ⟨ha.mono_const hbase,ha'.mono_const hbase,hd.mono_const hdiffsize⟩ + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..3bad71a3cca5cfbf50a90a1b2f2a195c235bb431 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMean.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLocalAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeBudgets +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFrameEnvelope + +namespace OAI + +/-! Quantitative mean estimates for the actual local construction. The +power depends on the fixed derivative and accuracy orders only. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean + +variable {U V : Set Base} {s r ρ R : ℝ} {reference : Base → Tensor} + {F : RField 4} {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base} + +lemma outputFactor_le_coefficientBudget (d : Budgets U V s F ψ Q χ e) + (m : ℕ) {B : ℝ} (hB : 1 ≤ B) (hc : d.chi m ≤ B) (hp : d.pull m ≤ B) : + outputFactor d m ≤ coefficientBudget m B := by + have hχ := d.chi_pos m + have hP := d.pull_pos m + unfold outputFactor coefficientBudget + gcongr + +theorem polynomial_local_mean_estimates (q m : ℕ) : + ∃ p : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ {U V : Set Base} {s r ρ R : ℝ} {reference : Base → Tensor} + {F : RField 4} {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base}, + ∀ (_h : LocalBounds U V s r ρ R reference F ψ Q χ e) + (d : Budgets U V s F ψ Q χ e), + 0 < s → s ≤ 1 → 0 < ρ → ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + d.inv (m+q+2) ≤ B → d.forms (m+q+2) ≤ B → d.psi (m+q+2) ≤ B → + d.mode (m+q+2) ≤ B → d.normal (m+q+2) ≤ B → d.chi m ≤ B → d.pull m ≤ B → + ∀ δ η : ℝ, 0 < δ → 0 < η → η ≤ 1 → + ∀ (A A' : Base → Tensor) (D : ℝ), 0 ≤ D → + ContDiffOn ℝ ∞ A U → ContDiffOn ℝ ∞ A' U → + InTrialBall U reference r A → InTrialBall U reference r A' → + WeightedBound U s (m+q+2) B A → WeightedBound U s (m+q+2) B A' → + WeightedBound U s (m+q+2) D (A-A') → + WeightedBound U s m (η*(C*B^p)) (meanTerm δ s F ψ Q χ e q η A) ∧ + WeightedBound U s m ((C*B^p)*η*D) + (meanTerm δ s F ψ Q χ e q η A-meanTerm δ s F ψ Q χ e q η A') := by + obtain ⟨a,C₀,hC₀,hamp⟩ := polynomial_local_amplitude_bounds (m+q+2) + let Z := fun B : ℝ => meanErrorConstant 4 m B q * + (Real.sqrt 2 * 2^(m+q+2)*B)^2*(C₀*B^a)^2 + have hZ : HasPolynomialBound Z := + ((meanErrorConstant_polynomial 4 m q).mul + ((((polynomialBound_const (by positivity)).mul (polynomialBound_const (by positivity))).mul + polynomialBound_id).pow 2)).mul + (((polynomialBound_const (zero_le_one.trans hC₀)).mul (polynomialBound_id.pow a)).pow 2) + obtain ⟨p,C,hC,hpoly⟩ := (polynomialBound_const zero_le_one).add + (((polynomialBound_const (show (0:ℝ) ≤ 2 by norm_num)).mul (coefficientBudget_polynomial m)).mul hZ) + refine ⟨p,C,hC,?_⟩ + intro U V s r ρ R reference F ψ Q χ e h d hs hs1 hρ B hB hρB hi hf hψ hm hn hχ hp δ η hδ hη hη1 A A' D hD hA hA' hball hball' hbA hbA' hbD + obtain ⟨ha,ha',had⟩ := hamp h d hs hs1 hρ B hB hρB hi hf hψ A A' D hD hA hA' hball hball' hbA hbA' hbD + have hB0 := zero_le_one.trans hB + have hAB : 0 ≤ C₀*B^a := by positivity + have hsa := h.amplitude_smooth hρ hA hball + have hsb := h.amplitude_smooth hρ hA' hball' + have hτs : η*s ≤ s := mul_le_of_le_one_left hs.le hη1 + have hcancel : η*s/s = η := mul_div_cancel_right₀ _ hs.ne' + have hcoeff := (d.mode_bound (m+q+2)).mono_const hm + have hnormal := (d.normal_bound (m+q+2)).mono_const hn + have hval := weighted_meanTensor h.smoothF h.domain hsa hδ (mul_pos hη hs) hs hτs hs1 + hB0 hAB hB0 q m hcoeff ha hnormal + have hval' : WeightedBound V s m (Z B*η) + (meanTensor δ (η*s) F (phaseAmplitude ψ (coefficient Q e A)) q) := by + convert hval using 1 + rw [hcancel] + dsimp [Z] + ring + have hz : 0 ≤ Z B := by + have hh := meanErrorConstant_nonneg 4 m q hB0 + dsimp [Z] + positivity + have hv := h.transport_bound d hs hs1 (mul_nonneg hz hη.le) + (contDiffOn_meanTensor h.smoothF h.domain hsa δ (η*s) q) hval' + have hdiff := weighted_meanTensor_difference h.smoothF h.domain hsa hsb hδ + (mul_pos hη hs) hs hτs hs1 hB0 hAB (mul_nonneg hAB hD) hB0 q m hcoeff ha ha' had hnormal + have hdiff' : WeightedBound V s m (2*Z B*D*η) + (fun x => meanTensor δ (η*s) F (phaseAmplitude ψ (coefficient Q e A)) q x- + meanTensor δ (η*s) F (phaseAmplitude ψ (coefficient Q e A')) q x) := by + convert hdiff using 1 + rw [hcancel] + dsimp [Z] + ring + have hd := h.transport_bound d hs hs1 (by positivity) + ((contDiffOn_meanTensor h.smoothF h.domain hsa δ (η*s) q).sub + (contDiffOn_meanTensor h.smoothF h.domain hsb δ (η*s) q)) hdiff' + have hout := outputFactor_le_coefficientBudget d m hB hχ hp + have hbudget : 1+2*coefficientBudget m B*Z B ≤ C*B^p := (hpoly B hB).2 + have hb0 : 0 ≤ coefficientBudget m B := by unfold coefficientBudget; positivity + have hvalue : outputFactor d m*Z B ≤ C*B^p := + (mul_le_mul_of_nonneg_right hout hz).trans (by nlinarith [mul_nonneg hb0 hz]) + have hdifference : 2*outputFactor d m*Z B ≤ C*B^p := by + have hh := mul_le_mul_of_nonneg_right hout (mul_nonneg (by norm_num : (0:ℝ) ≤ 2) hz) + nlinarith + constructor + · apply hv.mono_const + calc + _ = η*(outputFactor d m*Z B) := by ring + _ ≤ _ := mul_le_mul_of_nonneg_left hvalue hη.le + · apply (hd.mono_const (show outputFactor d m*(2*Z B*D*η) ≤ C*B^p*η*D from by + calc + _ = (2*outputFactor d m*Z B)*(η*D) := by ring + _ ≤ _ := by simpa only [mul_assoc] using + mul_le_mul_of_nonneg_right hdifference (mul_nonneg hη.le hD))).congr + intro x hx + exact (map_sub (pullbackField χ x) _ _).symm + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMeanProfile.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMeanProfile.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc70bb99735074f947cfe23833a435e90a623cda --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialLocalMeanProfile.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLocalMean + +namespace OAI + +/-! The local mean operator has explicit polynomial majorants in the +geometric profile and the current tensor norm. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open SmallModes RealModes RootMean WeightedEstimates FiniteMean + +def polynomialMeanProfile (p : ℕ → ℕ) (C G : ℕ → ℝ) (m : ℕ) (A : ℝ) : ℝ := + C m*(G m+max 1 A)^(p m) + +theorem polynomial_local_mean_majorants (q : ℕ) : + ∃ (p : ℕ → ℕ) (C : ℕ → ℝ), (∀ m, 1 ≤ C m) ∧ + ∀ {U V : Set Base} {s r ρ R : ℝ} {reference : Base → Tensor} + {F : RField 4} {ψ : Base → ℝ} {Q : Base → Tensor →L[ℝ] ℝ} {χ e : Base → Base}, + ∀ (_h : LocalBounds U V s r ρ R reference F ψ Q χ e) + (d : Budgets U V s F ψ Q χ e), + 0 < s → s ≤ 1 → 0 < ρ → ∀ G : ℕ → ℝ, (∀ m, 1 ≤ G m) → + (∀ m, ρ⁻¹ ≤ G m ∧ d.inv (m+q+2) ≤ G m ∧ d.forms (m+q+2) ≤ G m ∧ + d.psi (m+q+2) ≤ G m ∧ d.mode (m+q+2) ≤ G m ∧ d.normal (m+q+2) ≤ G m ∧ + d.chi m ≤ G m ∧ d.pull m ≤ G m) → + ∀ δ : ℝ, 0 < δ → MeanBounds U s reference r (q+2) + (meanTerm δ s F ψ Q χ e q) (polynomialMeanProfile p C G) (polynomialMeanProfile p C G) := by + classical + choose p C hC hmean using fun m => polynomial_local_mean_estimates q m + refine ⟨p,C,hC,?_⟩ + intro U V s r ρ R reference F ψ Q χ e h d hs hs1 hρ G hG hbounds δ hδ + have hmajor (m : ℕ) (A : ℝ) (_hA : 1 ≤ A) : 1 ≤ polynomialMeanProfile p C G m A := by + apply one_le_mul_of_one_le_of_one_le (hC m) + apply one_le_pow₀ + exact (hG m).trans (le_add_of_nonneg_right ((zero_le_one.trans (le_max_left 1 A)))) + have happly (m : ℕ) (A : ℝ) (hA : 1 ≤ A) (η : ℝ) (hη : 0 < η) (hη1 : η ≤ 1) + (f g : Base → Tensor) (D : ℝ) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (hfball : InTrialBall U reference r f) (hgball : InTrialBall U reference r g) + (hfb : WeightedBound U s (m+(q+2)) A f) (hgb : WeightedBound U s (m+(q+2)) A g) + (hdb : WeightedBound U s (m+(q+2)) D (f-g)) := by + let B := G m+max 1 A + have hBG : G m ≤ B := le_add_of_nonneg_right (zero_le_one.trans (le_max_left 1 A)) + have hBA : A ≤ B := (le_max_right 1 A).trans + (le_add_of_nonneg_left (zero_le_one.trans (hG m))) + have hB : 1 ≤ B := (hG m).trans hBG + obtain ⟨hρG,hi,hforms,hψ,hmode,hnormal,hχ,hpull⟩ := hbounds m + have horders : m+(q+2) = m+q+2 := by omega + rw [horders] at hfb hgb hdb + exact hmean m h d hs hs1 hρ B hB (hρG.trans hBG) (hi.trans hBG) (hforms.trans hBG) + (hψ.trans hBG) (hmode.trans hBG) (hnormal.trans hBG) (hχ.trans hBG) (hpull.trans hBG) + δ η hδ hη hη1 f g D hD hf hg hfball hgball (hfb.mono_const hBA) (hgb.mono_const hBA) hdb + refine ⟨hmajor,hmajor,?_,?_,?_⟩ + · intro η hη hη1 f hf hfball + exact h.mean_smooth hρ hf hfball δ q η + · intro η hη hη1 m A f hA hf hfball hb + have hz : WeightedBound U s (m+(q+2)) 0 (f-f) := by + apply (weightedBound_zero U s (m+(q+2)) (F := Tensor)).congr + intro x hx + simp + exact (happly m A hA η hη hη1 f f 0 le_rfl hf hf hfball hfball hb hb hz).1 + · intro η hη hη1 m A D f g hA hD hf hg hfball hgball hfb hgb hdb + exact (happly m A hA η hη hη1 f g D hD hf hg hfball hgball hfb hgb hdb).2 + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..415fe31f356da8799492e0e32443278d49d83615 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanApproximation.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSlowFamily + +namespace OAI + +/-! The finite slow iteration solves the actual restored polynomial mean +metric to any prescribed finite unweighted order. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PrimitiveRealization WeightedEstimates +local instance meanApproxFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance meanApproxFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance meanApproxDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance meanApproxDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance meanApproxSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance meanApproxSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma tensorWeightedBound_unscaled {H : ∀ x : M, CovariantTwoTensor x} + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + (hH : A.TensorWeightedBound s m C H) : A.TensorWeightedBound 1 m (C/s^m) H := by + intro i j hj x hx + simp only [one_pow,one_mul] + exact ((hH i).deriv_le hs hj hx).trans (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 hj)) + +lemma polynomial_metric_error_of_defect {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))) + {G : M → Space} (hG : ContMDiff planeModel spaceModel ∞ G) + {ε δ s C D : ℝ} {m : ℕ} (hs : 0 ≤ s) (hδ : δ ≠ 0) + (hbase : A.TensorWeightedBound s m C γ) + (hdefect : A.TensorWeightedBound s m D (A.normalizedPolynomialDefect Pol ε δ γ G)) : + A.TensorWeightedBound s m (δ^2*(C+D)) (A.atlasPolynomialMetric Pol ε G-γ) := by + have hd := A.normalizedPolynomialDefect_smooth (ε := ε) (δ := δ) hPol hγ hG + have hh := A.tensorWeightedBound_const_smul (hγ.add_section hd) + (A.tensorWeightedBound_add hγ hd hs hbase hdefect) (-(δ^2)) + have heq : A.atlasPolynomialMetric Pol ε G-γ = + (-(δ^2)) • (γ+A.normalizedPolynomialDefect Pol ε δ γ G) := by + funext x + ext v w + change A.atlasPolynomialMetric Pol ε G x v w-γ x v w = + -(δ^2)*(γ x v w+((δ^2)⁻¹*(γ x v w-A.atlasPolynomialMetric Pol ε G x v w)-γ x v w)) + field_simp + ring + rw [heq] + simpa only [abs_neg,abs_of_nonneg (sq_nonneg δ)] using hh + +end SmoothingAtlas +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- Finite-order approximation of the actual polynomial mean, with all +slow-map derivative profiles and a vanishing C3 displacement. -/ +theorem polynomial_mean_approximation (data : MetricGoodPhaseData g F) + {n : data.A.centers → ℕ} + (Pol : ∀ i : data.A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (R N : ℕ) (σmax : ℝ) (hσmax : 0 < σmax) : + ∃ (b u η L C : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ b < σmax ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ (∀ m, 0 ≤ P m) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ + data.A.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, data.A.ShiftedBound 2 m (z^b) (P m) G) ∧ + data.A.TensorWeightedBound 1 R (C*z^N) (data.A.atlasPolynomialMetric Pol z G-g.inner) := by + obtain ⟨steps,hsteps,horder⟩ := exists_amplitude_steps R N + obtain ⟨σ,hσ,hσ16,hσσmax,hfamily⟩ := + data.polynomial_finite_slow_family Pol hPol hF hmetric steps hsteps σmax hσmax + obtain ⟨a,u,η,L,P,D,ha,hu,hη,hη1,hL,hP,hD,_,hfamily⟩ := hfamily steps le_rfl + obtain ⟨K,hK,hbase⟩ := data.A.exists_bundle_bound data.A.tensorTriv data.A.tensorTriv_domain R g.contMDiff + let b := scaleExponent σ steps steps + have hb := (scaleExponent_bounds hσ hsteps (le_refl steps)).1 + have hbσ := (scaleExponent_bounds hσ hsteps (le_refl steps)).2 + have hpow : (N : ℝ) ≤ 2*amplitudeExponent steps-b*(R : ℝ) := by + have hR : 0 ≤ (R : ℝ) := Nat.cast_nonneg R + have hb1 : b ≤ 1 := by dsimp [b]; linarith + have hh : b*(R : ℝ) ≤ R := by nlinarith + linarith + refine ⟨b,u,η,L,K+D R,P,hb,hbσ.trans_lt hσ16,hbσ.trans_lt hσσmax,hu,hη,hη1,hL,add_nonneg hK (hD R),hP,?_⟩ + intro z hz hzη + have hz1 := 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 + obtain ⟨G,hG,hclose,hmap,hdefect⟩ := hfamily z hz hzη + have hδ : 0 < z^amplitudeExponent steps := Real.rpow_pos_of_pos hz _ + have hDb : data.A.TensorWeightedBound (z^b) R (D R) + (data.A.normalizedPolynomialDefect Pol z (z^amplitudeExponent steps) g.inner G) := by + intro i + apply (hdefect R i).mono_const + exact mul_le_of_le_one_right (hD R) (Real.rpow_le_one hz.le hz1 ha.le) + have herror := data.A.polynomial_metric_error_of_defect hPol g.contMDiff hG hs.le hδ.ne' + (fun i => (hbase i).shrink_scale hs.le hs1) hDb + have he := data.A.tensorWeightedBound_unscaled hs hs1 + (mul_nonneg (sq_nonneg _) (add_nonneg hK (hD R))) herror + refine ⟨G,hG,hclose,hmap,fun i => (he i).mono_const ?_⟩ + have heq : (z^amplitudeExponent steps)^2*(K+D R)/(z^b)^R = + (K+D R)*z^(2*amplitudeExponent steps-b*R) := by + rw [← Real.rpow_mul_natCast hz.le,← Real.rpow_mul_natCast hz.le] + rw [mul_comm (z^_) _,mul_div_assoc,← Real.rpow_sub hz] + congr 2 + ring + rw [heq] + simpa only [Real.rpow_natCast] using mul_le_mul_of_nonneg_left + (Real.rpow_le_rpow_of_exponent_ge hz hz1 hpow) (add_nonneg hK (hD R)) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanCoefficient.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanCoefficient.lean new file mode 100644 index 0000000000000000000000000000000000000000..46ce26f06cf24b655201f1905a6fae2e4cdc5fd4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanCoefficient.lean @@ -0,0 +1,124 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticPhases +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationBounds + +namespace OAI + +/-! The polynomial contribution to the quadratic zero-phase coefficient. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +lemma pairPhases_smooth {φ ψ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (hψ : ContDiff ℝ ∞ ψ) : + ∀ j, ContDiff ℝ ∞ (pairPhases φ ψ j) := by + intro j + fin_cases j + · exact hφ + · exact hψ + · exact contDiff_const + +lemma pairDirections_smooth {H K : Base → Fin 4 → ℂ} + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) : + ∀ j, ContDiff ℝ ∞ (pairDirections H K j) := by + intro j + fin_cases j + · exact hH + · exact hK + · exact contDiff_const + +lemma weighted_starField {U : Set Base} (hU : UniqueDiffOn ℝ U) {s C : ℝ} {m : ℕ} + {H : Base → Fin 4 → ℂ} (hs : 0 < s) (hC : 0 ≤ C) (hH : ContDiff ℝ ∞ H) + (hb : WeightedBound U s m C H) : WeightedBound U s m C (starField H) := by + apply WeightedBound.pi hU hs hC + · intro a + exact (Complex.conjCLE.contDiff.comp (contDiff_pi.mp hH a)).contDiffOn + · intro a + have hh := (hb.component hU hs.le hC hH.contDiffOn a).linear hU hs.le + (contDiff_pi.mp hH a).contDiffOn Complex.conjCLE.toContinuousLinearMap + apply hh.mono_const + apply mul_le_of_le_one_left hC + apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one + intro z + simp + +namespace Perturbation + +def quadraticMeanCoefficient {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : ℝ := + (conjugated P ε G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField H)) τ 1 (p, t)).re / 4 + +lemma quadraticMeanCoefficient_smooth {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hO : IsOpen O) (hP : ∀ l, (P l).SmoothCoeffs O) + {G : Base → Space} {φ : Base → ℝ} {H : Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) (hH : ContDiff ℝ ∞ H) + (hQ : Set.MapsTo (lowJet G) U O) (ε τ t : ℝ) : + ContDiffOn ℝ ∞ (quadraticMeanCoefficient P ε G φ H τ t) U := by + have hs := fun l => conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hφ.neg) + (pairDirections_smooth hH (starField_smooth hH)) hO hQ τ 1 t + exact (Complex.reCLM.contDiff.comp_contDiffOn + (ContDiffOn.sum fun l _ => (hs l).const_smul (ε ^ (l.val + 1)))).div_const 4 + +/-- This is the actual zero-phase Hessian term, with the fixed polynomial +loss, and with the square of the oscillatory amplitude retained. -/ +theorem quadraticMeanCoefficient_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (H : Base → Fin 4 → ℂ) (s τ ε C : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ φ → ContDiff ℝ ∞ H → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + WeightedBound U s (m + order P) C H → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D * ε * C ^ 2 / τ ^ loss P) (quadraticMeanCoefficient P ε G φ H τ t) := by + obtain ⟨D, hD, hd⟩ := compact_conjugated_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨D / 4, div_nonneg hD (by norm_num), ?_⟩ + intro G φ H s τ ε C hτ hs hτs hs1 hε hε1 hC hG hφ hH hGQ hGb hHb hφb t ht + have hpb : ∀ j v, WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (pairPhases φ (fun p => -φ p) j) p (coordinateVector v)) := by + intro j v + fin_cases j + · exact hφb v + · have hh := (hφb v).neg hU.uniqueDiffOn + ((hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).contDiffOn + change WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (fun q => -φ q) p (coordinateVector v)) + simpa only [fderiv_fun_neg, neg_apply] using hh + · change WeightedBound U s (m + order P) F (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 + order P)).mono_const hF + have hhb : ∀ j, WeightedBound U s (m + order P) (![C, C, 1] j) (pairDirections H (starField H) j) := by + intro j + fin_cases j + · exact hHb + · exact weighted_starField hU.uniqueDiffOn hs hC.le hH hHb + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + have hh := hd G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField H)) s τ ε ![C, C, 1] + hτ hs hτs hs1 hε hε1 (fun j => by fin_cases j; exact hC; exact hC; norm_num) + hG (pairPhases_smooth hφ hφ.neg) (pairDirections_smooth hH (starField_smooth hH)) + hGQ hGb hhb hpb t ht 1 + have hsm : ContDiffOn ℝ ∞ (fun p => conjugated P ε G + (pairPhases φ (fun p => -φ p)) (pairDirections H (starField H)) τ 1 (p, t)) U := + ContDiffOn.sum fun l _ => + (conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hφ.neg) + (pairDirections_smooth hH (starField_smooth hH)) hO (fun _ hp => hQO (hGQ hp)) τ 1 t).const_smul _ + have hr := hh.linear hU.uniqueDiffOn hs.le hsm Complex.reCLM + have hn : 0 ≤ D * ε * (C * C * 1) / τ ^ loss P := by positivity + have hr' := hr.mono_const (mul_le_of_le_one_left hn (by simp : ‖Complex.reCLM‖ ≤ 1)) + have hf := hr'.const_smul hU.uniqueDiffOn (Complex.reCLM.contDiff.comp_contDiffOn hsm) (1 / 4 : ℝ) + convert hf using 1 + · simp only [Matrix.cons_val_zero, Matrix.cons_val_one, show (1 : Fin 3) ≤ 1 by decide, + show ¬ (2 : Fin 3) ≤ 1 by decide, ↓reduceIte, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 4)] + ring + · funext p + simp only [quadraticMeanCoefficient, Function.comp_def, Complex.reCLM_apply, smul_eq_mul] + ring + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..3809a3dd13f4d739d249f4083311fe5ead066f32 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanDifference.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanPair + +namespace OAI + +/-! Difference identity for the actual polynomial zero-phase mean. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma quadraticMeanPair_sub_left {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H K : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (L : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ (fun x => H x - K x) L τ t p = + quadraticMeanPair P ε G φ H L τ t p - quadraticMeanPair P ε G φ K L τ t p := by + have hh := quadraticMeanPair_add_left P ε G hφ (hH.sub hK) hK L τ t p + have he : (fun x => (H x - K x) + K x) = H := by funext x; exact sub_add_cancel _ _ + rw [he] at hh + exact eq_sub_of_add_eq hh.symm + +lemma quadraticMeanPair_sub_right {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H K : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (L : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ L (fun x => H x - K x) τ t p = + quadraticMeanPair P ε G φ L H τ t p - quadraticMeanPair P ε G φ L K τ t p := by + have hh := quadraticMeanPair_add_right P ε G hφ (hH.sub hK) hK L τ t p + have he : (fun x => (H x - K x) + K x) = H := by funext x; exact sub_add_cancel _ _ + rw [he] at hh + exact eq_sub_of_add_eq hh.symm + +lemma quadraticMeanCoefficient_difference {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H K : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (τ t : ℝ) (p : Base) : + quadraticMeanCoefficient P ε G φ H τ t p - quadraticMeanCoefficient P ε G φ K τ t p = + quadraticMeanPair P ε G φ (fun x => H x - K x) H τ t p + + quadraticMeanPair P ε G φ K (fun x => H x - K x) τ t p := by + rw [quadraticMeanPair_sub_left P ε G hφ hH hK, + quadraticMeanPair_sub_right P ε G hφ hH hK, + quadraticMeanPair_self P ε G hφ hH, quadraticMeanPair_self P ε G hφ hK] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanError.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanError.lean new file mode 100644 index 0000000000000000000000000000000000000000..e1da684f8a305a26bf096e0e48a4abdbd6fb97da --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanError.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFrameEnvelope +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeBudgets +import OAI.Geometry.Immersion.ClosedSurface.RealBounds + +namespace OAI + +/-! Polynomial bounds for the actual normalized mean error and its +amplitude difference, with explicit finite derivative loss. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +theorem polynomial_normalizedMeanError (q m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {F : RField 4} {U : Set Base}, ContDiff ℝ ∞ F → RealModeDomain F U → + ∀ {δ τ s B : ℝ}, 0 < δ → 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 1 ≤ B → + WeightedBound U s (m+q+2) B (realTwoJet F) → + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) → + (∀ x ∈ U, ‖(realSecond F x ⬝ᵥ realSecond F x)⁻¹‖ ≤ B) → + ∀ {b : Base → ℝ}, ContDiffOn ℝ ∞ b U → WeightedBound U s (m+q+2) B b → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound U s m (A*B^d*(τ/s)) (normalizedMeanError δ τ F b q v w) := by + obtain ⟨p,C,hC,hframe⟩ := polynomial_frame_envelope (m+q+2) + let K := fun x : ℝ => C*x^p + have hK : HasPolynomialBound K := + (polynomialBound_const (zero_le_one.trans hC)).mul (polynomialBound_id.pow p) + have hK1 (x : ℝ) (hx : 1 ≤ x) : 1 ≤ K x := + one_le_mul_of_one_le_of_one_le hC (one_le_pow₀ hx) + have hpoly : HasPolynomialBound (fun x => meanErrorConstant 4 m (K x) q * + (Real.sqrt 2 * 2^(m+q+2)*x*K x)^2) := + ((meanErrorConstant_polynomial 4 m q).comp hK hK1).mul + (((((polynomialBound_const (by positivity)).mul (polynomialBound_const (by positivity))).mul + polynomialBound_id).mul hK).pow 2) + obtain ⟨d,A,hA,hpoly⟩ := hpoly + refine ⟨d,A,hA,?_⟩ + intro F U hF hU δ τ s B hδ hτ hs hτs hs1 hB hjet hG hN b hb hbb v w hv hw + obtain ⟨hcoeff,hfree⟩ := hframe hF hU hs hB hjet hG hN + have hBK : 0 ≤ K B := zero_le_one.trans (hK1 B hB) + have hh := weighted_normalizedMeanError hF hU hδ hτ hs hτs hs1 hBK + (zero_le_one.trans hB) hBK hb q m hcoeff hbb hfree v w hv hw + exact hh.mono_const (mul_le_mul_of_nonneg_right (hpoly B hB).2 (div_nonneg hτ.le hs.le)) + +theorem polynomial_normalizedMeanError_difference (q m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {F : RField 4} {U : Set Base}, ContDiff ℝ ∞ F → RealModeDomain F U → + ∀ {δ τ s B D : ℝ}, 0 < δ → 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 1 ≤ B → 0 ≤ D → + WeightedBound U s (m+q+2) B (realTwoJet F) → + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) → + (∀ x ∈ U, ‖(realSecond F x ⬝ᵥ realSecond F x)⁻¹‖ ≤ B) → + ∀ {b c : Base → ℝ}, ContDiffOn ℝ ∞ b U → ContDiffOn ℝ ∞ c U → + WeightedBound U s (m+q+2) B b → WeightedBound U s (m+q+2) B c → + WeightedBound U s (m+q+2) D (b-c) → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound U s m (A*B^d*D*(τ/s)) + (fun x => normalizedMeanError δ τ F b q v w x - normalizedMeanError δ τ F c q v w x) := by + obtain ⟨p,C,hC,hframe⟩ := polynomial_frame_envelope (m+q+2) + let K := fun x : ℝ => C*x^p + have hK : HasPolynomialBound K := + (polynomialBound_const (zero_le_one.trans hC)).mul (polynomialBound_id.pow p) + have hK1 (x : ℝ) (hx : 1 ≤ x) : 1 ≤ K x := + one_le_mul_of_one_le_of_one_le hC (one_le_pow₀ hx) + have hpoly : HasPolynomialBound (fun x => 2*meanErrorConstant 4 m (K x) q * + (Real.sqrt 2 * 2^(m+q+2)*K x)^2*x) := + (((polynomialBound_const (by positivity)).mul + ((meanErrorConstant_polynomial 4 m q).comp hK hK1)).mul + ((((polynomialBound_const (by positivity)).mul (polynomialBound_const (by positivity))).mul + hK).pow 2)).mul polynomialBound_id + obtain ⟨d,A,hA,hpoly⟩ := hpoly + refine ⟨d,A,hA,?_⟩ + intro F U hF hU δ τ s B D hδ hτ hs hτs hs1 hB hD hjet hG hN b c hb hc hbb hbc hdiff v w hv hw + obtain ⟨hcoeff,hfree⟩ := hframe hF hU hs hB hjet hG hN + have hBK : 0 ≤ K B := zero_le_one.trans (hK1 B hB) + have hh := weighted_normalizedMeanError_difference hF hU hδ hτ hs hτs hs1 hBK + (zero_le_one.trans hB) hD hBK hb hc q m hcoeff hbb hbc hdiff hfree v w hv hw + exact hh.mono_const (mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (hpoly B hB).2 hD) (div_nonneg hτ.le hs.le)) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanIteration.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..0dfb50bb6dd25434f66e4f985c12d177fc2c9d6b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanIteration.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLocalMeanProfile +import OAI.Geometry.SurfaceImmersion.Correction.FiniteMeanThreshold + +namespace OAI + +/-! Polynomial growth of the actual finite mean iteration and of the +finite value budget appearing in its explicit smallness threshold. -/ +noncomputable section +namespace ClosedSurfaceR4.RealModes + +lemma HasPolynomialBound.nonneg {f : ℝ → ℝ} (hf : HasPolynomialBound f) + {x : ℝ} (hx : 1 ≤ x) : 0 ≤ f x := by + obtain ⟨_,_,_,h⟩ := hf + exact (h x hx).1 + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.PhaseMean +open RealModes FiniteMean + +theorem polynomialMeanProfile_growth (p : ℕ → ℕ) (C : ℕ → ℝ) + (G : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) (hG : ∀ m, HasPolynomialBound (G m)) + (m : ℕ) {H : ℝ → ℝ} (hH : HasPolynomialBound H) : + HasPolynomialBound (fun x => polynomialMeanProfile p C (fun r => G r x) m (H x)) := + (polynomialBound_const (hC m)).mul + (((hG m).add ((polynomialBound_const zero_le_one).max hH)).pow (p m)) + +def polynomialMeanSize (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (j m : ℕ) (x : ℝ) : ℝ := + sizeBound L (fun r => H r x) (polynomialMeanProfile p C (fun r => G r x)) j m + +def polynomialMeanDifference (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (j m : ℕ) (x : ℝ) : ℝ := + differenceBound L (fun r => H r x) + (polynomialMeanProfile p C (fun r => G r x)) (polynomialMeanProfile p C (fun r => G r x)) j m + +theorem polynomialMeanSize_growth (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) + (hG : ∀ m, HasPolynomialBound (G m)) (hH : ∀ m, HasPolynomialBound (H m)) + (j m : ℕ) : HasPolynomialBound (polynomialMeanSize L p C G H j m) := by + induction j generalizing m with + | zero => exact hH m + | succ j ih => + exact (hH m).add (polynomialMeanProfile_growth p C G hC hG m (ih (m+L))) + +theorem polynomialMeanDifference_growth (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) + (hG : ∀ m, HasPolynomialBound (G m)) (hH : ∀ m, HasPolynomialBound (H m)) + (j m : ℕ) : HasPolynomialBound (polynomialMeanDifference L p C G H j m) := by + induction j generalizing m with + | zero => exact polynomialMeanProfile_growth p C G hC hG m (hH (m+L)) + | succ j ih => + exact (polynomialMeanProfile_growth p C G hC hG m + ((polynomialMeanSize_growth L p C G H hC hG hH (j+1) (m+L)).max + (polynomialMeanSize_growth L p C G H hC hG hH j (m+L)))).mul (ih (m+L)) + +/-- A polynomial upper bound for the finite quantity controlling the +radius of the mean iteration; it is uniform in the iteration index. -/ +theorem polynomialMean_threshold_budget (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) + (hG : ∀ m, HasPolynomialBound (G m)) (hH : ∀ m, HasPolynomialBound (H m)) (n : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ ∀ x : ℝ, 1 ≤ x → ∀ j ≤ n, + polynomialMeanProfile p C (fun r => G r x) 0 (polynomialMeanSize L p C G H j L x) ≤ A*x^d := by + let f := fun j x => polynomialMeanProfile p C (fun r => G r x) 0 + (polynomialMeanSize L p C G H j L x) + have hf (j : ℕ) : HasPolynomialBound (f j) := + polynomialMeanProfile_growth p C G hC hG 0 (polynomialMeanSize_growth L p C G H hC hG hH j L) + obtain ⟨d,A,hA,hsum⟩ := HasPolynomialBound.sum (Finset.range (n+1)) f (fun j _ => hf j) + refine ⟨d,A,hA,?_⟩ + intro x hx j hj + exact (Finset.single_le_sum (fun i _ => (hf i).nonneg hx) + (Finset.mem_range.mpr (by omega : j < n+1))).trans (hsum x hx).2 + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPair.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPair.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e59b0d1ce907c716f6e042a8d4ee90aebdef0fb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPair.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanCoefficient +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteQuadraticVariation + +namespace OAI + +/-! Bilinear form underlying the polynomial zero-phase correction. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets + +lemma starDirectionJets_add (J K : DirectionJets) : + starDirectionJets (J + K) = starDirectionJets J + starDirectionJets K := by + funext w a p + exact star_add _ _ + +lemma quadraticComplex_opposite_phases (e : Expression) (G : Base → Space) + {φ : Base → ℝ} {H K : Base → Fin 4 → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hK : ContDiff ℝ ∞ K) (τ : ℝ) (z : Base × ℝ) : + quadraticComplex e G (complexJet (fun p => phase τ φ p • H p)) + (starDirectionJets (complexJet (fun p => phase τ φ p • K p))) z = + conjugatedVariation e G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField K)) τ 1 z := by + have hsm : ContDiff ℝ ∞ (fun p => phase τ φ p • K p) := (phase_smooth hφ τ).smul hK + rw [← complexJet_starField hsm, starField_phase, quadraticComplex_phase_factor, + phase_neg_inv, mul_inv_cancel₀ (show phase τ φ z.1 ≠ 0 from Complex.exp_ne_zero _), one_mul] + +namespace Perturbation + +def quadraticMeanPair {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : Base → ℝ) (H K : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : ℝ := + ∑ l, ε ^ (l.val + 1) * + (quadraticComplex (P l) G (complexJet (fun p => phase τ φ p • H p)) + (starDirectionJets (complexJet (fun p => phase τ φ p • K p))) (p, t)).re / 4 + +lemma quadraticMeanPair_add_left {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H K : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (L : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ (fun x => H x + K x) L τ t p = + quadraticMeanPair P ε G φ H L τ t p + quadraticMeanPair P ε G φ K L τ t p := by + have he : (fun x => phase τ φ x • (H x + K x)) = + fun x => phase τ φ x • H x + phase τ φ x • K x := by funext x; exact smul_add _ _ _ + simp only [quadraticMeanPair, he, complexJet_add (H := fun p => phase τ φ p • H p) (K := fun p => phase τ φ p • K p) + ((phase_smooth hφ τ).smul hH) + ((phase_smooth hφ τ).smul hK), quadraticComplex_add_left, Complex.add_re, mul_add, add_div, + Finset.sum_add_distrib] + +lemma quadraticMeanPair_add_right {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H K : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (L : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ L (fun x => H x + K x) τ t p = + quadraticMeanPair P ε G φ L H τ t p + quadraticMeanPair P ε G φ L K τ t p := by + have he : (fun x => phase τ φ x • (H x + K x)) = + fun x => phase τ φ x • H x + phase τ φ x • K x := by funext x; exact smul_add _ _ _ + simp only [quadraticMeanPair, he, complexJet_add (H := fun p => phase τ φ p • H p) (K := fun p => phase τ φ p • K p) + ((phase_smooth hφ τ).smul hH) + ((phase_smooth hφ τ).smul hK), starDirectionJets_add, quadraticComplex_add_right, + Complex.add_re, mul_add, add_div, Finset.sum_add_distrib] + +lemma quadraticMeanPair_self {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) {H : Base → Fin 4 → ℂ} + (hH : ContDiff ℝ ∞ H) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ H H τ t p = quadraticMeanCoefficient P ε G φ H τ t p := by + simp only [quadraticMeanPair, quadraticComplex_opposite_phases _ G hφ hH, + quadraticMeanCoefficient, conjugated, Complex.re_sum, Complex.real_smul, + Finset.sum_div, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPairBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPairBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..733e0c11f3e574ba678e3bff65bce4f7e8581f26 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanPairBounds.lean @@ -0,0 +1,86 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanDifference + +namespace OAI + +/-! Product estimates for the two independent amplitudes of the polynomial mean. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates MixedExpression ModulatedJets + +lemma quadraticMeanPair_eq {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (H : Base → Fin 4 → ℂ) + {K : Base → Fin 4 → ℂ} (hK : ContDiff ℝ ∞ K) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ H K τ t p = + (conjugated P ε G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField K)) τ 1 (p, t)).re / 4 := by + simp only [quadraticMeanPair, quadraticComplex_opposite_phases _ G hφ hK, + conjugated, Complex.re_sum, Complex.real_smul, Finset.sum_div, + Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero] + +theorem quadraticMeanPair_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (H K : Base → Fin 4 → ℂ) (s τ ε C D : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → 0 < D → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ φ → ContDiff ℝ ∞ H → ContDiff ℝ ∞ K → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + WeightedBound U s (m + order P) C H → WeightedBound U s (m + order P) D K → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C * D / τ ^ loss P) (quadraticMeanPair P ε G φ H K τ t) := by + obtain ⟨E, hE, he⟩ := compact_conjugated_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨E / 4, div_nonneg hE (by norm_num), ?_⟩ + intro G φ H K s τ ε C D hτ hs hτs hs1 hε hε1 hC hD hG hφ hH hK hGQ hGb hHb hKb hφb t ht + have hpb : ∀ j v, WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (pairPhases φ (fun p => -φ p) j) p (coordinateVector v)) := by + intro j v + fin_cases j + · exact hφb v + · have hh := (hφb v).neg hU.uniqueDiffOn + ((hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).contDiffOn + change WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (fun q => -φ q) p (coordinateVector v)) + simpa only [fderiv_fun_neg, neg_apply] using hh + · change WeightedBound U s (m + order P) F (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 + order P)).mono_const hF + have hhb : ∀ j, WeightedBound U s (m + order P) (![C, D, 1] j) (pairDirections H (starField K) j) := by + intro j + fin_cases j + · exact hHb + · exact weighted_starField hU.uniqueDiffOn hs hD.le hK hKb + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + have hh := he G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField K)) s τ ε ![C, D, 1] + hτ hs hτs hs1 hε hε1 (fun j => by fin_cases j; exact hC; exact hD; norm_num) + hG (pairPhases_smooth hφ hφ.neg) (pairDirections_smooth hH (starField_smooth hK)) + hGQ hGb hhb hpb t ht 1 + have hsm : ContDiffOn ℝ ∞ (fun p => conjugated P ε G + (pairPhases φ (fun p => -φ p)) (pairDirections H (starField K)) τ 1 (p, t)) U := + ContDiffOn.sum fun l _ => + (conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hφ.neg) + (pairDirections_smooth hH (starField_smooth hK)) hO (fun _ hp => hQO (hGQ hp)) τ 1 t).const_smul _ + have hr := hh.linear hU.uniqueDiffOn hs.le hsm Complex.reCLM + have hn : 0 ≤ E * ε * (C * D * 1) / τ ^ loss P := by positivity + have hr' := hr.mono_const (mul_le_of_le_one_left hn (by simp : ‖Complex.reCLM‖ ≤ 1)) + have hf := hr'.const_smul hU.uniqueDiffOn (Complex.reCLM.contDiff.comp_contDiffOn hsm) (1 / 4 : ℝ) + have hfun : (fun p => (1 / 4 : ℝ) • Complex.reCLM + (conjugated P ε G (pairPhases φ (fun p => -φ p)) (pairDirections H (starField K)) τ 1 (p, t))) = + quadraticMeanPair P ε G φ H K τ t := by + funext p + rw [quadraticMeanPair_eq P ε G hφ H hK] + simp only [Complex.reCLM_apply, smul_eq_mul] + ring + change WeightedBound U s m _ _ at hf + rw [Function.comp_def, hfun] at hf + convert hf using 1 + simp only [Matrix.cons_val_zero, Matrix.cons_val_one, show (1 : Fin 3) ≤ 1 by decide, + show ¬ (2 : Fin 3) ≤ 1 by decide, ↓reduceIte, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 4)] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..a41c8f17500771dbf62f463c15dcb6256346e501 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanSupport.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedPolynomialMeanDifference +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariationSupport + +namespace OAI + +/-! The actual polynomial quadratic mean preserves amplitude support, so +local smoothness near the support suffices for a global smooth coefficient. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +lemma MixedExpression.evalComplex_congr (e : MixedExpression) (G : Base → Space) + (J K : JetData) (z : Base × ℝ) + (h : ∀ i w a, J i w a z.1 = K i w a z.1) : + e.evalComplex G J z = e.evalComplex G K z := by + induction e with + | coeff c => rfl + | atom i w a e ih => simp only [evalComplex, h, ih] + | add e f ihe ihf => simp only [evalComplex, ihe, ihf] + +lemma quadraticComplex_zero_at (e : Expression) (G : Base → Space) + (J K : DirectionJets) (z : Base × ℝ) (hJ : ∀ w a, J w a z.1 = 0) : + quadraticComplex e G J K z = 0 := by + have he : quadraticComplex e G J K z = quadraticComplex e G 0 K z := by + apply MixedExpression.evalComplex_congr + intro i w a + fin_cases i + · rfl + · exact hJ w a + · rfl + · rfl + rw [he] + change quadraticComplexBilinear e G z 0 K = 0 + rw [map_zero, LinearMap.zero_apply] + +lemma complexJet_zero_of_notMem {H : Base → Fin 4 → ℂ} {p : Base} + (hp : p ∉ tsupport H) (w : List (Fin 2)) (a : Fin 4) : complexJet H w a p = 0 := by + apply image_eq_zero_of_notMem_tsupport + exact fun hx => hp (((tsupport_iteratedDirectional (w.map coordinateVector) (fun p => H p a)).trans + (tsupport_comp_subset (g := fun v : Fin 4 → ℂ => v a) rfl H)) hx) + +namespace Perturbation + +lemma quadraticMeanPair_zero_of_notMem {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) (φ : Base → ℝ) (H J : Base → Fin 4 → ℂ) + (τ t : ℝ) {p : Base} (hp : p ∉ tsupport H) : + quadraticMeanPair P ε G φ H J τ t p = 0 := by + have hp' : p ∉ tsupport (fun x => phase τ φ x • H x) := + fun hx => hp (tsupport_smul_subset_right (phase τ φ) H hx) + apply Finset.sum_eq_zero + intro l _ + rw [quadraticComplex_zero_at (P l) G _ _ (p, t) + (fun w a => complexJet_zero_of_notMem hp' w a)] + simp only [Complex.zero_re, mul_zero, zero_div] + +lemma quadraticMeanPair_tsupport {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) (φ : Base → ℝ) (H J : Base → Fin 4 → ℂ) (τ t : ℝ) : + tsupport (quadraticMeanPair P ε G φ H J τ t) ⊆ tsupport H := by + apply closure_minimal _ (isClosed_tsupport H) + intro p hp + by_contra hn + exact hp (quadraticMeanPair_zero_of_notMem P ε G φ H J τ t hn) + +lemma quadraticMeanCoefficient_tsupport {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) (τ t : ℝ) : + tsupport (quadraticMeanCoefficient P ε G φ H τ t) ⊆ tsupport H := by + have he : quadraticMeanCoefficient P ε G φ H τ t = quadraticMeanPair P ε G φ H H τ t := by + funext p + exact (quadraticMeanPair_self P ε G hφ hH τ t p).symm + rw [he] + exact quadraticMeanPair_tsupport P ε G φ H H τ t + +def polynomialMeanField {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (hP : ∀ l, (P l).SmoothCoeffs O) {G : Base → Space} {φ : Base → ℝ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hQ : Set.MapsTo (lowJet G) U O) (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (H : SupportedField (F := Fin 4 → ℂ) K) (ε τ t : ℝ) : SupportedField (F := ℝ) K := + let hs := (quadraticMeanCoefficient_tsupport P ε G hφ H.contDiff τ t).trans H.tsupport_subset + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset hU (hs.trans hKU) + (quadraticMeanCoefficient_smooth hO hP hG hφ H.contDiff hQ ε τ t)) + (subset_closure.trans hs) + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..b0ee077c303882be93a297edf52afb38fdf80167 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanThreshold.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! An explicit polynomial threshold for the actual finite mean trial. +Only finitely many input orders affect the power in the threshold. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseMean +open RealModes FiniteMean WeightedEstimates + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem finite_mean_polynomial_threshold (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) + (hG : ∀ m, HasPolynomialBound (G m)) (hH : ∀ m, HasPolynomialBound (H m)) (n : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ ∀ x : ℝ, 1 ≤ x → + ∀ {U : Set E}, UniqueDiffOn ℝ U → ∀ {s : ℝ}, 0 ≤ s → + ∀ {reference f : E → F} {r0 r1 : ℝ}, r0 < r1 → + ∀ {T : ℝ → (E → F) → E → F}, + MeanBounds U s reference r1 L T + (polynomialMeanProfile p C (fun m => G m x)) + (polynomialMeanProfile p C (fun m => G m x)) → + (∀ m, 1 ≤ H m x) → ContDiffOn ℝ ∞ f U → + (∀ y ∈ U, ‖f y-reference y‖ ≤ r0) → + (∀ m, WeightedBound U s m (H m x) f) → + 0 < min 1 ((r1-r0)/(2*(A*x^d))) ∧ + ∀ η : ℝ, 0 < η → η ≤ min 1 ((r1-r0)/(2*(A*x^d))) → + ∀ j ≤ n, ContDiffOn ℝ ∞ (trial f T η j) U ∧ + InTrialBall U reference r1 (trial f T η j) ∧ + (∀ m, WeightedBound U s m (polynomialMeanSize L p C G H j m x) (trial f T η j)) ∧ + (∀ m, WeightedBound U s m (polynomialMeanDifference L p C G H j m x*η^(j+1)) + (trial f T η j+T η (trial f T η j)-f)) := by + obtain ⟨d,A,hA,hvalue⟩ := polynomialMean_threshold_budget L p C G H hC hG hH n + refine ⟨d,A,hA,?_⟩ + intro x hx U hU s hs reference f r0 r1 hgap T hT hH1 hf hnear hnorm + exact finite_substitution_with_threshold hU hs hgap hT hH1 hf hnear hnorm n + (mul_pos (zero_lt_one.trans_le hA) (pow_pos (zero_lt_one.trans_le hx) d)) (hvalue x hx) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanTransport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanTransport.lean new file mode 100644 index 0000000000000000000000000000000000000000..006e2835a22adeb8a8b294945a80059b83509faa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMeanTransport.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFiniteMeanFamily + +namespace OAI + +/-! Explicit polynomial majorants survive the read/restore operations in +an atlas. All dependence on transport constants stays in the profile. -/ +noncomputable section +namespace ClosedSurfaceR4.PhaseMean +open RealModes + +def transportedMeanGeometry (L : ℕ) (G D E : ℕ → ℝ) (m : ℕ) : ℝ := + 1+G m+D (m+L)+E m + +lemma polynomialMeanProfile_transport_bound (p : ℕ) {C G D E A : ℝ} + (hC : 0 ≤ C) (hG : 1 ≤ G) (hD : 1 ≤ D) (hE : 0 ≤ E) (hA : 1 ≤ A) : + max 1 (E*(C*(G+max 1 (D*A))^p)*D) ≤ + (1+C)*(1+G+D+E+max 1 A)^(2*p+2) := by + let u := 1+G+D+E+max 1 A + have hG0 : 0 ≤ G := zero_le_one.trans hG + have hD0 : 0 ≤ D := zero_le_one.trans hD + have hA0 : 0 ≤ A := zero_le_one.trans hA + have hDA : 1 ≤ D*A := one_le_mul_of_one_le_of_one_le hD hA + have hu : 1 ≤ u := by dsimp [u]; rw [max_eq_right hA]; linarith + have hGD : G+D ≤ u := by dsimp [u]; rw [max_eq_right hA]; linarith + have hDu : D ≤ u := by dsimp [u]; rw [max_eq_right hA]; linarith + have hEu : E ≤ u := by dsimp [u]; rw [max_eq_right hA]; linarith + have hAu : A ≤ u := by dsimp [u]; rw [max_eq_right hA]; linarith + have hbase : G+max 1 (D*A) ≤ u^2 := by + rw [max_eq_right hDA] + calc + G+D*A ≤ (G+D)*A := by nlinarith + _ ≤ u*u := mul_le_mul hGD hAu hA0 (zero_le_one.trans hu) + _ = u^2 := by ring + have hp : (G+max 1 (D*A))^p ≤ (u^2)^p := + pow_le_pow_left₀ (by positivity) hbase p + have hED : E*D ≤ u^2 := by + simpa only [pow_two] using mul_le_mul hEu hDu hD0 (zero_le_one.trans hu) + have hb : E*(C*(G+max 1 (D*A))^p)*D ≤ C*u^(2*p+2) := by + calc + _ = C*(E*D)*(G+max 1 (D*A))^p := by ring + _ ≤ C*(u^2)*(u^2)^p := mul_le_mul + (mul_le_mul_of_nonneg_left hED hC) hp (by positivity) (by positivity) + _ = C*u^(2*p+2) := by rw [← pow_mul, mul_assoc, ← pow_add, Nat.add_comm 2 (2*p)] + have hone : 1 ≤ u^(2*p+2) := one_le_pow₀ hu + apply max_le + · nlinarith [pow_nonneg (zero_le_one.trans hu) (2*p+2)] + · exact hb.trans (by nlinarith [pow_nonneg (zero_le_one.trans hu) (2*p+2)]) + +lemma polynomialMeanProfile_value_transport_bound (p : ℕ) {C G D E A : ℝ} + (hC : 0 ≤ C) (hG : 1 ≤ G) (hD : 1 ≤ D) (hE : 0 ≤ E) (hA : 1 ≤ A) : + max 1 (E*(C*(G+max 1 (D*A))^p)) ≤ + (1+C)*(1+G+D+E+max 1 A)^(2*p+2) := by + have h : E*(C*(G+max 1 (D*A))^p) ≤ E*(C*(G+max 1 (D*A))^p)*D := by + exact le_mul_of_one_le_right (by positivity) hD + exact (max_le_max_left 1 h).trans + (polynomialMeanProfile_transport_bound p hC hG hD hE hA) + +lemma transportedMeanGeometry_growth (L : ℕ) (G D E : ℕ → ℝ → ℝ) + (hG : ∀ m, HasPolynomialBound (G m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hE : ∀ m, HasPolynomialBound (E m)) (m : ℕ) : + HasPolynomialBound (fun x => transportedMeanGeometry L + (fun r => G r x) (fun r => D r x) (fun r => E r x) m) := + (((polynomialBound_const zero_le_one).add (hG m)).add (hD (m+L))).add (hE m) + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..165988cd2a47a09be7e47fb85035c8671cc32bc3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricBounds.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricRemainder +import OAI.Geometry.SurfaceImmersion.Geometry.ScalarFastRemainderBounds + +namespace OAI + +/-! Quantitative bounds for the actual finite pullback-metric tail. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open LocalPeriodicExpansion WeightedEstimates + +/-- A single finite algebraic loss bounds the true metric remainder, at every +weighted derivative order. This applies to each of xx, xy, and yy by choosing +the two tangent coefficient sequences. -/ +theorem compact_finite_metric_tail {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (X Y : ℕ → VectorExpression) (hXs : ∀ i, (X i).SmoothCoeffs O) + (hYs : ∀ i, (Y i).SmoothCoeffs O) (L N : ℕ) (hN : 2 ≤ N) + (hX : ∀ i ≤ L, ∀ a, (X i a).order ≤ N) + (hY : ∀ i ≤ L, ∀ a, (Y i a).order ≤ N) (ℓ : Base →L[ℝ] ℝ) : + ∃ 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 + N) B (lowJet G) → + ∀ (A B : ℕ → Family S R4), + (∀ i, VectorExpression.Represents G (X i) (A i)) → + (∀ i, VectorExpression.Represents G (Y i) (B i)) → + WeightedBound S z m (D * z ^ L / s ^ d) + (fun p => ∑ r ∈ Finset.Ico L (2 * L + 1), + z ^ r * (metricCoefficientFamily L r A B).fastValue ℓ z p) := by + let R := fun r => finiteMetric L r X Y + let d := (Finset.Ico L (2 * L + 1)).sup (fun r => (R r).loss) + refine ⟨d, ?_⟩ + intro m B hB + obtain ⟨D, hD, hb⟩ := Expression.compact_tail_bound (S := S) hO hK hKO R + (fun r => smooth_finiteMetric hXs hYs L r) L (2 * L + 1) N d + (fun r _ => order_finiteMetric hN hX hY r) + (fun r hr => Finset.le_sup (f := fun r => (R r).loss) hr) ℓ m B hB + refine ⟨D, hD, ?_⟩ + intro G s z hz hzs hs1 hG hGK hGb A B hA hB + exact hb G s z hz hzs hs1 hG hGK hGb (fun r => metricCoefficientFamily L r A B) + (fun r _ => represents_finiteMetric hA hB L r) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..9dd6193f04b27577706fa09482b6e6483bbcb5a3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricCoefficients.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialScalar +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicMetricCoefficients + +namespace OAI + +/-! Actual coordinate polynomial expressions for the metric coefficients in +the finite oscillatory recursion. Index zero denotes the first correction. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +def xCoefficient (dx : Fin 2) (U : ℕ → VectorExpression) (i : ℕ) : VectorExpression := + ((U (i - 1)).slow dx).add (U i).angle + +def yCoefficient (dy : Fin 2) (U : ℕ → VectorExpression) (i : ℕ) : VectorExpression := + (U (i - 1)).slow dy + +def xxQuadratic (dx : Fin 2) (U : ℕ → VectorExpression) (r : ℕ) : Expression := + Expression.sumFinset (Finset.Ico 1 r) (fun i => + (xCoefficient dx U i).dot (xCoefficient dx U (r - i))) + +def xyQuadratic (dx dy : Fin 2) (U : ℕ → VectorExpression) (r : ℕ) : Expression := + Expression.sumFinset (Finset.Ico 1 r) (fun i => + (xCoefficient dx U i).dot (yCoefficient dy U (r - i))) + +def yyQuadratic (dy : Fin 2) (U : ℕ → VectorExpression) (r : ℕ) : Expression := + Expression.sumFinset (Finset.Ico 1 r) (fun i => + (yCoefficient dy U i).dot (yCoefficient dy U (r - i))) + +lemma order_xCoefficient {U : ℕ → VectorExpression} {r i : ℕ} + (hi : 1 ≤ i) (hir : i < r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (dx : Fin 2) (a : Fin 4) : + (xCoefficient dx U i a).order ≤ 2 * i + 2 := by + have hp := Expression.order_slow_le dx (U (i - 1) a) + have hprev := hU (i - 1) (by omega) a + have hcur := hU i hir a + change max ((U (i - 1) a).slow dx).order ((U i a).angle).order ≤ _ + rw [Expression.order_angle] + omega + +lemma order_yCoefficient {U : ℕ → VectorExpression} {r i : ℕ} + (hi : 1 ≤ i) (hir : i ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (dy : Fin 2) (a : Fin 4) : + (yCoefficient dy U i a).order ≤ 2 * i + 1 := by + have hp := Expression.order_slow_le dy (U (i - 1) a) + have hprev := hU (i - 1) (by omega) a + exact hp.trans (by omega) + +lemma order_xxQuadratic {U : ℕ → VectorExpression} {r : ℕ} (hr : 1 ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (dx : Fin 2) : + (xxQuadratic dx U r).order ≤ 2 * r := by + apply Expression.order_sumFinset_le _ _ _ (by omega) + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + apply VectorExpression.order_dot_le (by omega) + · intro a + exact (order_xCoefficient hi hir hU dx a).trans (by omega) + · intro a + exact (order_xCoefficient (by omega) (by omega) hU dx a).trans (by omega) + +lemma order_xyQuadratic {U : ℕ → VectorExpression} {r : ℕ} (hr : 1 ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (dx dy : Fin 2) : + (xyQuadratic dx dy U r).order ≤ 2 * r := by + apply Expression.order_sumFinset_le _ _ _ (by omega) + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + apply VectorExpression.order_dot_le (by omega) + · intro a + exact (order_xCoefficient hi hir hU dx a).trans (by omega) + · intro a + exact (order_yCoefficient (by omega) (by omega) hU dy a).trans (by omega) + +lemma order_yyQuadratic {U : ℕ → VectorExpression} {r : ℕ} (hr : 1 ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) (dy : Fin 2) : + (yyQuadratic dy U (r + 1)).order ≤ 2 * r + 1 := by + apply Expression.order_sumFinset_le _ _ _ (by omega) + intro i hi + obtain ⟨hi, hir⟩ := Finset.mem_Ico.mp hi + apply VectorExpression.order_dot_le (by omega) + · intro a + exact (order_yCoefficient hi (by omega) hU dy a).trans (by omega) + · intro a + exact (order_yCoefficient (by omega) (by omega) hU dy a).trans (by omega) + +lemma represents_xCoefficient {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {U : ℕ → VectorExpression} {W : ℕ → LocalPeriodicExpansion.Family S R4} + (hUs : ∀ j, (U j).SmoothCoeffs O) + (hU : ∀ j, VectorExpression.Represents G (U j) (W j)) (dx : Fin 2) (i : ℕ) : + VectorExpression.Represents G (xCoefficient dx U i) + (LocalPeriodicExpansion.xCoefficient (coordinateVector dx) W i) := + VectorExpression.represents_add + (VectorExpression.represents_slow hO hG hQ (hUs _) (hU _) dx) + (VectorExpression.represents_angle hO hQ (hUs _) (hU _)) + +lemma represents_yCoefficient {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {U : ℕ → VectorExpression} {W : ℕ → LocalPeriodicExpansion.Family S R4} + (hUs : ∀ j, (U j).SmoothCoeffs O) + (hU : ∀ j, VectorExpression.Represents G (U j) (W j)) (dy : Fin 2) (i : ℕ) : + VectorExpression.Represents G (yCoefficient dy U i) + (LocalPeriodicExpansion.yCoefficient (coordinateVector dy) W i) := + VectorExpression.represents_slow hO hG hQ (hUs _) (hU _) dy + +lemma represents_xxQuadratic {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {U : ℕ → VectorExpression} {W : ℕ → LocalPeriodicExpansion.Family S R4} + (hUs : ∀ j, (U j).SmoothCoeffs O) + (hU : ∀ j, VectorExpression.Represents G (U j) (W j)) (dx : Fin 2) (r : ℕ) : + Expression.Represents G (xxQuadratic dx U r) + (LocalPeriodicExpansion.xxQuadratic (coordinateVector dx) W r) := by + apply Expression.represents_sumFinset + intro i _ + exact Expression.represents_dot (represents_xCoefficient hO hG hQ hUs hU dx i) + (represents_xCoefficient hO hG hQ hUs hU dx (r - i)) + +lemma represents_xyQuadratic {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {U : ℕ → VectorExpression} {W : ℕ → LocalPeriodicExpansion.Family S R4} + (hUs : ∀ j, (U j).SmoothCoeffs O) + (hU : ∀ j, VectorExpression.Represents G (U j) (W j)) (dx dy : Fin 2) (r : ℕ) : + Expression.Represents G (xyQuadratic dx dy U r) + (LocalPeriodicExpansion.xyQuadratic (coordinateVector dx) (coordinateVector dy) W r) := by + apply Expression.represents_sumFinset + intro i _ + exact Expression.represents_dot (represents_xCoefficient hO hG hQ hUs hU dx i) + (represents_yCoefficient hO hG hQ hUs hU dy (r - i)) + +lemma represents_yyQuadratic {S : TopologicalSpace.Opens Base} {O : Set LowJet} (hO : IsOpen O) + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) S O) + {U : ℕ → VectorExpression} {W : ℕ → LocalPeriodicExpansion.Family S R4} + (hUs : ∀ j, (U j).SmoothCoeffs O) + (hU : ∀ j, VectorExpression.Represents G (U j) (W j)) (dy : Fin 2) (r : ℕ) : + Expression.Represents G (yyQuadratic dy U r) + (LocalPeriodicExpansion.yyQuadratic (coordinateVector dy) W r) := by + apply Expression.represents_sumFinset + intro i _ + exact Expression.represents_dot (represents_yCoefficient hO hG hQ hUs hU dy i) + (represents_yCoefficient hO hG hQ hUs hU dy (r - i)) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcedBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcedBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..030a37de9118bc7bfb45c2f48cda5155eafc22ea --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcedBudgets.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSupportedModeBudgets +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanData + +namespace OAI + +/-! Polynomial constants for the actual supported forced metric solver. +The scale factor in its residual is separated from its geometric budget. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open RealModes SmallModes + +def metricForcedSizeBudget (C J N : ℕ → ℝ) (q m : ℕ) : ℝ := + (m.factorial : ℝ)*(2^m*(forcedModeBudget 4 0 C (fun _ => 0) q m*N (m+q+1)))*J m^m + +def metricForcedResidualBudget (C J N : ℕ → ℝ) (q m : ℕ) : ℝ := + tensorChartBudget m (J m) (J (m+1)) * (2^m * + FiniteParametrix.boundProfile 1 (fun r => errorConstant r (C r)) + (fun r => errorConstant r (C r)*N (r+1)) q m) + +theorem metricForcedSizeBudget_polynomial (C J N : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (q m : ℕ) : + HasPolynomialBound (fun x => metricForcedSizeBudget + (fun r => C r x) (fun r => J r x) (fun r => N r x) q m) := by + have hz : ∀ m : ℕ, HasPolynomialBound (fun _ : ℝ => (0 : ℝ)) := + fun _ => polynomialBound_const le_rfl + exact ((polynomialBound_const (Nat.cast_nonneg m.factorial)).mul + ((polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity)).mul + ((forcedModeBudget_polynomial 4 0 C (fun _ _ => 0) hC hz hC1 q m).mul + (hN (m+q+1))))).mul ((hJ m).pow m) + +theorem metricForcedResidualBudget_polynomial (C J N : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (q m : ℕ) : + HasPolynomialBound (fun x => metricForcedResidualBudget + (fun r => C r x) (fun r => J r x) (fun r => N r x) q m) := by + have he (r : ℕ) := (errorConstant_polynomial r).comp (hC r) (hC1 r) + have hb := FiniteParametrix.boundProfile_polynomial 1 + (fun r x => errorConstant r (C r x)) + (fun r x => errorConstant r (C r x)*N (r+1) x) he + (fun r => (he r).mul (hN (r+1))) q m + have ht : HasPolynomialBound (fun x => tensorChartBudget m (J m x) (J (m+1) x)) := by + unfold tensorChartBudget + exact (polynomialBound_const (show (0 : ℝ) ≤ 4 by norm_num)).mul + (((polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity)).mul + (((polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity)).mul + ((polynomialBound_const (Nat.cast_nonneg m.factorial)).mul ((hJ m).pow m))).mul + (hJ (m+1)))).mul (hJ (m+1))) + exact ht.mul ((polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity)).mul hb) + +namespace PolynomialSolveData +variable {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + +lemma metric_size_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) + (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) : + c.size f q m = metricForcedSizeBudget c.C c.J (c.norm f) q m := by + have hD' : c.D = (fun _ => 0) := funext hD + simp only [size,metricForcedSizeBudget,tensorOrder_emptyMetricPolynomial,hD', + Nat.zero_add,mul_one] + congr 2 + +lemma metric_residual_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) + (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) : + c.residual f q m = (τ/s)^(q+1)*metricForcedResidualBudget c.C c.J (c.norm f) 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 [residual,metricForcedResidualBudget,hκ,tensorOrder_emptyMetricPolynomial, + Nat.zero_add,zero_div,add_zero] + ring + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcing.lean new file mode 100644 index 0000000000000000000000000000000000000000..7efe6953d43005bcf5b5cf3af7486f97c6bef3f9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricForcing.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricCoefficients + +namespace OAI + +/-! The right-hand sides of the finite triangular correction step are actual +higher-jet polynomials. Their maximal jet order is the preceding order plus one. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +def mixedForcing (X Y : VectorExpression) (dx dy : Fin 2) (U : ℕ → VectorExpression) + (r : ℕ) : Expression := + .add (.add (X.dot (yCoefficient dy U r)) (Y.dot ((U (r - 1)).slow dx))) + (xyQuadratic dx dy U r) + +def longitudinalForcing (X : VectorExpression) (dx : Fin 2) (U : ℕ → VectorExpression) + (r : ℕ) : Expression := + .add (X.dot ((U (r - 1)).slow dx)) ((xxQuadratic dx U r).scale (1 / 2)) + +def transverseForcing (dy : Fin 2) (U : ℕ → VectorExpression) (r : ℕ) : Expression := + yyQuadratic dy U (r + 1) + +lemma smooth_xCoefficient {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) (dx : Fin 2) (i : ℕ) : + (xCoefficient dx U i).SmoothCoeffs O := by + intro a + exact ⟨Expression.smoothCoeffs_slow hO dx (hU _ _), + Expression.smoothCoeffs_angle hO (hU _ _)⟩ + +lemma smooth_yCoefficient {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) (dy : Fin 2) (i : ℕ) : + (yCoefficient dy U i).SmoothCoeffs O := by + intro a + exact Expression.smoothCoeffs_slow hO dy (hU _ _) + +lemma smooth_xxQuadratic {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) (dx : Fin 2) (r : ℕ) : + (xxQuadratic dx U r).SmoothCoeffs O := by + apply Expression.smoothCoeffs_sumFinset + intro i _ + exact VectorExpression.smoothCoeffs_dot (smooth_xCoefficient hO hU dx i) + (smooth_xCoefficient hO hU dx (r - i)) + +lemma smooth_xyQuadratic {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) (dx dy : Fin 2) (r : ℕ) : + (xyQuadratic dx dy U r).SmoothCoeffs O := by + apply Expression.smoothCoeffs_sumFinset + intro i _ + exact VectorExpression.smoothCoeffs_dot (smooth_xCoefficient hO hU dx i) + (smooth_yCoefficient hO hU dy (r - i)) + +lemma smooth_yyQuadratic {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) (dy : Fin 2) (r : ℕ) : + (yyQuadratic dy U r).SmoothCoeffs O := by + apply Expression.smoothCoeffs_sumFinset + intro i _ + exact VectorExpression.smoothCoeffs_dot (smooth_yCoefficient hO hU dy i) + (smooth_yCoefficient hO hU dy (r - i)) + +lemma smooth_mixedForcing {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) {X Y : VectorExpression} + (hX : X.SmoothCoeffs O) (hY : Y.SmoothCoeffs O) (dx dy : Fin 2) (r : ℕ) : + (mixedForcing X Y dx dy U r).SmoothCoeffs O := + ⟨⟨VectorExpression.smoothCoeffs_dot hX (smooth_yCoefficient hO hU dy r), + VectorExpression.smoothCoeffs_dot hY (fun a => Expression.smoothCoeffs_slow hO dx (hU _ a))⟩, + smooth_xyQuadratic hO hU dx dy r⟩ + +lemma smooth_longitudinalForcing {O : Set LowJet} (hO : IsOpen O) {U : ℕ → VectorExpression} + (hU : ∀ j, (U j).SmoothCoeffs O) {X : VectorExpression} + (hX : X.SmoothCoeffs O) (dx : Fin 2) (r : ℕ) : + (longitudinalForcing X dx U r).SmoothCoeffs O := + ⟨VectorExpression.smoothCoeffs_dot hX (fun a => Expression.smoothCoeffs_slow hO dx (hU _ a)), + Expression.smoothCoeffs_scale _ (smooth_xxQuadratic hO hU dx r)⟩ + +lemma forcing_orders {U : ℕ → VectorExpression} {r : ℕ} (hr : 1 ≤ r) + (hU : ∀ j < r, ∀ a, (U j a).order ≤ 2 * j + 2) + {X Y : VectorExpression} (hX : ∀ a, (X a).order ≤ 2) (hY : ∀ a, (Y a).order ≤ 2) + (dx dy : Fin 2) : + (mixedForcing X Y dx dy U r).order ≤ 2 * r + 1 ∧ + (longitudinalForcing X dx U r).order ≤ 2 * r + 1 ∧ + (transverseForcing dy U r).order ≤ 2 * r + 1 := by + have hprev : ∀ a, ((U (r - 1)).slow dx a).order ≤ 2 * r + 1 := by + intro a + have hd := Expression.order_slow_le dx (U (r - 1) a) + have hp := hU (r - 1) (by omega) a + exact hd.trans (by omega) + have hXslow := VectorExpression.order_dot_le (by omega : 2 ≤ 2 * r + 1) + (fun a => (hX a).trans (by omega)) hprev + have hYslow := VectorExpression.order_dot_le (by omega : 2 ≤ 2 * r + 1) + (fun a => (hY a).trans (by omega)) hprev + have hXy := VectorExpression.order_dot_le (by omega : 2 ≤ 2 * r + 1) + (fun a => (hX a).trans (by omega)) (order_yCoefficient hr (le_refl r) hU dy) + have hxy := order_xyQuadratic hr hU dx dy + have hxx := order_xxQuadratic hr hU dx + have hyy := order_yyQuadratic hr hU dy + refine ⟨?_, ?_, hyy⟩ + · change max (max _ _) _ ≤ _ + exact max_le (max_le hXy hYslow) (hxy.trans (by omega)) + · change max _ ((xxQuadratic dx U r).scale (1 / 2)).order ≤ _ + rw [Expression.order_scale] + exact max_le hXslow (hxx.trans (by omega)) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricFreeBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricFreeBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..0a28629966e91337e83d70a78839c099d5bdcf8c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricFreeBudgets.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMetricForcedBudgets +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeResidual + +namespace OAI + +/-! Explicit polynomial budgets for the actual unperturbed free metric modes. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open RealModes SmallModes + +def metricFreeSizeBudget (C J N : ℕ → ℝ) (q m : ℕ) : ℝ := + (m.factorial : ℝ)*2^m*correctedSeedBudget 0 C (fun _ => 0) q m (N (m+q+1))*J m^m + +def metricFreeResidualBudget (C J N : ℕ → ℝ) (q m : ℕ) : ℝ := + tensorChartBudget m (J m) (J (m+1))*2^m* + (FiniteParametrix.boundProfile 1 (fun r => errorConstant r (C r)) + (fun r => fullErrorConstant 4 r (C r)) q m * (Real.sqrt 2*2^(m+q+1)*N (m+q+1))) + +theorem metricFreeSizeBudget_polynomial (C J N : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (q m : ℕ) : + HasPolynomialBound (fun x => metricFreeSizeBudget + (fun r => C r x) (fun r => J r x) (fun r => N r x) q m) := by + have hz : ∀ m : ℕ, HasPolynomialBound (fun _ : ℝ => (0 : ℝ)) := + fun _ => polynomialBound_const le_rfl + exact (((polynomialBound_const (Nat.cast_nonneg m.factorial)).mul + (polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity))).mul + (correctedSeedBudget_polynomial 0 C (fun _ _ => 0) (N (m+q+1)) hC hz + (hN (m+q+1)) hC1 q m)).mul ((hJ m).pow m) + +theorem metricFreeResidualBudget_polynomial (C J N : ℕ → ℝ → ℝ) + (hC : ∀ m, HasPolynomialBound (C m)) (hJ : ∀ m, HasPolynomialBound (J m)) + (hN : ∀ m, HasPolynomialBound (N m)) + (hC1 : ∀ m x, 1 ≤ x → 1 ≤ C m x) (q m : ℕ) : + HasPolynomialBound (fun x => metricFreeResidualBudget + (fun r => C r x) (fun r => J r x) (fun r => N r x) q m) := by + have he (r : ℕ) := (errorConstant_polynomial r).comp (hC r) (hC1 r) + have hf (r : ℕ) := (fullErrorConstant_polynomial 4 r).comp (hC r) (hC1 r) + have hb := FiniteParametrix.boundProfile_polynomial 1 + (fun r x => errorConstant r (C r x)) (fun r x => fullErrorConstant 4 r (C r x)) he hf q m + have ht : HasPolynomialBound (fun x => tensorChartBudget m (J m x) (J (m+1) x)) := by + unfold tensorChartBudget + repeat first + | exact hJ _ + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + exact (ht.mul (polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity))).mul + (hb.mul (((polynomialBound_const (Real.sqrt_nonneg 2)).mul + (polynomialBound_const (show (0 : ℝ) ≤ 2^(m+q+1) by positivity))).mul (hN (m+q+1)))) + +namespace PolynomialSolveData +variable {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + +lemma metric_freeSizeFactor_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) (N : ℕ → ℝ) (q m : ℕ) : + c.freeSizeFactor q m (N (m+q+1)) = metricFreeSizeBudget c.C c.J N q m := by + have hD' : c.D = fun _ => 0 := funext hD + simp only [freeSizeFactor,metricFreeSizeBudget,tensorOrder_emptyMetricPolynomial,hD'] + +lemma metric_freeResidualFactor_eq (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + (hD : ∀ m, c.D m = 0) (N : ℕ → ℝ) (q m : ℕ) : + c.freeResidualFactor q m (N (m+q+1)) = metricFreeResidualBudget c.C c.J N 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))] + have hγ : c.freeInitialFactor = fun r => fullErrorConstant 4 r (c.C r) := by + funext r + simp only [freeInitialFactor,hD r,zero_mul, + max_eq_left (fullErrorConstant_nonneg 4 r (c.nonnegC r))] + simp only [freeResidualFactor,freeChartResidualFactor,metricFreeResidualBudget,hκ,hγ, + tensorOrder_emptyMetricPolynomial,inputOrder,Nat.zero_add,Nat.mul_one] + congr 3 + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..6d0103fc6a6b8a727306ad5d81c124e43ddf15a6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialMetricRemainder.lean @@ -0,0 +1,135 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialGeometry +import OAI.Geometry.SurfaceImmersion.Primitive.LocalPeriodicMetricRemainder + +namespace OAI + +/-! Actual jet-polynomial representations of every coefficient of the finite +pullback-metric remainder. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.MetricPolynomial +open LocalPeriodicExpansion + +def finiteMetric (L r : ℕ) (X Y : ℕ → VectorExpression) : Expression := + Expression.sumFinset (Finset.range (L + 1)) (fun i => + Expression.sumFinset (Finset.range (L + 1)) (fun j => + if i + j = r then (X i).dot (Y j) else .coeff (fun _ => 0))) + +lemma smooth_finiteMetric {O : Set LowJet} {X Y : ℕ → VectorExpression} + (hX : ∀ i, (X i).SmoothCoeffs O) (hY : ∀ i, (Y i).SmoothCoeffs O) (L r : ℕ) : + (finiteMetric L r X Y).SmoothCoeffs O := by + apply Expression.smoothCoeffs_sumFinset + intro i _ + apply Expression.smoothCoeffs_sumFinset + intro j _ + split_ifs + · exact VectorExpression.smoothCoeffs_dot (hX i) (hY j) + · exact contDiffOn_const + +lemma order_finiteMetric {X Y : ℕ → VectorExpression} {L N : ℕ} (hN : 2 ≤ N) + (hX : ∀ i ≤ L, ∀ a, (X i a).order ≤ N) + (hY : ∀ i ≤ L, ∀ a, (Y i a).order ≤ N) (r : ℕ) : + (finiteMetric L r X Y).order ≤ N := by + apply Expression.order_sumFinset_le _ _ _ hN + intro i hi + apply Expression.order_sumFinset_le _ _ _ hN + intro j hj + split_ifs + · exact VectorExpression.order_dot_le hN + (hX i (by simpa using Finset.mem_range.mp hi)) + (hY j (by simpa using Finset.mem_range.mp hj)) + · exact hN + +lemma represents_finiteMetric {S : TopologicalSpace.Opens Base} {G : Base → Space} + {X Y : ℕ → VectorExpression} {A B : ℕ → Family S R4} + (hX : ∀ i, VectorExpression.Represents G (X i) (A i)) + (hY : ∀ i, VectorExpression.Represents G (Y i) (B i)) (L r : ℕ) : + Expression.Represents G (finiteMetric L r X Y) (metricCoefficientFamily L r A B) := by + apply Expression.represents_sumFinset + intro i _ + apply Expression.represents_sumFinset + intro j _ + split_ifs + · exact Expression.represents_dot (hX i) (hY j) + · intro p _ t + rfl + +def xTangent (X : VectorExpression) (dx : Fin 2) (U : ℕ → VectorExpression) (L i : ℕ) : + VectorExpression := + if i = 0 then X else if i = L then (U (i - 1)).slow dx else xCoefficient dx U i + +def yTangent (Y : VectorExpression) (dy : Fin 2) (U : ℕ → VectorExpression) (i : ℕ) : + VectorExpression := if i = 0 then Y else yCoefficient dy U i + +lemma smooth_xTangent {O : Set LowJet} (hO : IsOpen O) {X : VectorExpression} + {U : ℕ → VectorExpression} (hX : X.SmoothCoeffs O) (hU : ∀ i, (U i).SmoothCoeffs O) + (dx : Fin 2) (L i : ℕ) : (xTangent X dx U L i).SmoothCoeffs O := by + unfold xTangent + split_ifs + · exact hX + · intro a + exact Expression.smoothCoeffs_slow hO dx (hU _ a) + · exact smooth_xCoefficient hO hU dx i + +lemma smooth_yTangent {O : Set LowJet} (hO : IsOpen O) {Y : VectorExpression} + {U : ℕ → VectorExpression} (hY : Y.SmoothCoeffs O) (hU : ∀ i, (U i).SmoothCoeffs O) + (dy : Fin 2) (i : ℕ) : (yTangent Y dy U i).SmoothCoeffs O := by + unfold yTangent + split_ifs + · exact hY + · exact smooth_yCoefficient hO hU dy i + +lemma represents_xTangent {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (hQ : Set.MapsTo (lowJet G) S O) {dy : Base} (g : Geometry (E := R4) S dy) + {X : VectorExpression} {U : ℕ → VectorExpression} {W : ℕ → Family S R4} + (hX : VectorExpression.Represents G X g.longitudinal) + (hUs : ∀ i, (U i).SmoothCoeffs O) (hU : ∀ i, VectorExpression.Represents G (U i) (W i)) + (dx : Fin 2) (L i : ℕ) : + VectorExpression.Represents G (xTangent X dx U L i) (g.xTangent (coordinateVector dx) W L i) := by + unfold xTangent Geometry.xTangent + split_ifs + · exact hX + · exact VectorExpression.represents_slow hO hG hQ (hUs _) (hU _) dx + · exact represents_xCoefficient hO hG hQ hUs hU dx i + +lemma represents_yTangent {S : TopologicalSpace.Opens Base} {O : Set LowJet} + (hO : IsOpen O) {G : Base → Space} (hG : ContDiff ℝ ∞ G) + (hQ : Set.MapsTo (lowJet G) S O) (dy : Fin 2) (g : Geometry (E := R4) S (coordinateVector dy)) + {Y : VectorExpression} {U : ℕ → VectorExpression} {W : ℕ → Family S R4} + (hY : VectorExpression.Represents G Y g.transverse) + (hUs : ∀ i, (U i).SmoothCoeffs O) (hU : ∀ i, VectorExpression.Represents G (U i) (W i)) (i : ℕ) : + VectorExpression.Represents G (yTangent Y dy U i) (g.yTangent W i) := by + unfold yTangent Geometry.yTangent + split_ifs + · exact hY + · exact represents_yCoefficient hO hG hQ hUs hU dy i + +lemma order_xTangent {X : VectorExpression} {U : ℕ → VectorExpression} {L : ℕ} + (hL : 1 ≤ L) (hX : ∀ a, (X a).order ≤ 2) + (hU : ∀ j < L, ∀ a, (U j a).order ≤ 2 * j + 2) (dx : Fin 2) {i : ℕ} (hi : i ≤ L) (a : Fin 4) : + (xTangent X dx U L i a).order ≤ 2 * L + 1 := by + unfold xTangent + split_ifs with hi0 hiL + · exact (hX a).trans (by omega) + · have hprev := hU (i - 1) (by omega) a + have hh := Expression.order_slow_le dx (U (i - 1) a) + change ((U (i - 1) a).slow dx).order ≤ _ + omega + · exact (order_xCoefficient (by omega) (by omega) hU dx a).trans (by omega) + +lemma order_yTangent {Y : VectorExpression} {U : ℕ → VectorExpression} {L : ℕ} + (hL : 1 ≤ L) (hY : ∀ a, (Y a).order ≤ 2) + (hU : ∀ j < L, ∀ a, (U j a).order ≤ 2 * j + 2) (dy : Fin 2) {i : ℕ} (hi : i ≤ L) (a : Fin 4) : + (yTangent Y dy U i a).order ≤ 2 * L + 1 := by + unfold yTangent + split_ifs with hi0 + · exact (hY a).trans (by omega) + · exact (order_yCoefficient (by omega) hi hU dy a).trans (by omega) + +end ClosedSurfaceR4.JetPolynomial.MetricPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ceeb880a3b0cb857ecdefd3a660da47e38c70e9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeBudgets.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra +import OAI.Geometry.Immersion.ClosedSurface.MeanError +import OAI.Geometry.SurfaceImmersion.Geometry.PerturbedForcedSize + +namespace OAI + +/-! The finite free and forced parametrices have polynomial budgets. These +are the actual constants used by the existing mode estimates. -/ +noncomputable section +namespace ClosedSurfaceR4.SmallModes +open RealModes + +theorem errorConstant_polynomial (m : ℕ) : + HasPolynomialBound (errorConstant m) := by + unfold errorConstant reducedConstant + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +theorem fullErrorConstant_polynomial (n m : ℕ) : + HasPolynomialBound (fullErrorConstant n m) := by + unfold fullErrorConstant reducedConstant targetConstant + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +theorem amplitudeConstant_polynomial (n m : ℕ) : + HasPolynomialBound (amplitudeConstant n m) := by + unfold amplitudeConstant targetConstant + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +theorem initialConstant_polynomial (n m : ℕ) : + HasPolynomialBound (initialConstant n m) := by + unfold initialConstant + exact ((polynomialBound_const (by positivity)).add + ((polynomialBound_const (by positivity)).mul polynomialBound_id)).add + (amplitudeConstant_polynomial n m) + +theorem freeModeConstant_polynomial (n m q : ℕ) : + HasPolynomialBound (fun x => freeModeConstant n m x q) := by + induction q with + | zero => exact amplitudeConstant_polynomial n m + | succ q ih => + exact ih.add ((initialConstant_polynomial n m).mul + ((fullErrorConstant_polynomial n (m+1+q)).pow (q+1))) + +theorem gradientErrorConstant_polynomial (n m q : ℕ) : + HasPolynomialBound (fun x => gradientErrorConstant n m x q) := + ((polynomialBound_const zero_le_one).add (freeModeConstant_polynomial n (m+1) q)).add + (freeModeConstant_polynomial n m q) + +theorem meanErrorConstant_polynomial (n m q : ℕ) : + HasPolynomialBound (fun x => meanErrorConstant n m x q) := by + unfold meanErrorConstant + exact (((polynomialBound_const (Nat.cast_nonneg n)).mul + (polynomialBound_const (by positivity))).mul + (gradientErrorConstant_polynomial n m q)).mul + ((polynomialBound_const (by positivity)).add (gradientErrorConstant_polynomial n m q)) + +end ClosedSurfaceR4.SmallModes + +namespace ClosedSurfaceR4.FiniteParametrix +open RealModes + +theorem boundProfile_polynomial (L : ℕ) (K C : ℕ → ℝ → ℝ) + (hK : ∀ m, HasPolynomialBound (K m)) (hC : ∀ m, HasPolynomialBound (C m)) + (q m : ℕ) : HasPolynomialBound (fun x => boundProfile L (fun r => K r x) (fun r => C r x) q m) := by + induction q generalizing m with + | zero => exact hC m + | succ q ih => exact (hK m).mul (ih (m+L)) + +end ClosedSurfaceR4.FiniteParametrix + +namespace ClosedSurfaceR4.SmallModes +open RealModes + +theorem forcedModeBudget_polynomial (n L : ℕ) (B D : ℕ → ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q m : ℕ) : + HasPolynomialBound (fun x => forcedModeBudget n L (fun r => B r x) (fun r => D r x) q m) := by + let κ := fun r x => max (errorConstant r (B r x)) + (D r x * initialConstant n (r+L) (B (r+L) x)) + have hκ (r : ℕ) : HasPolynomialBound (κ r) := + ((errorConstant_polynomial r).comp (hB r) (hB1 r)).max + ((hD r).mul ((initialConstant_polynomial n (r+L)).comp (hB (r+L)) (hB1 (r+L)))) + have hi := (initialConstant_polynomial n m).comp (hB m) (hB1 m) + have hsum := HasPolynomialBound.sum (Finset.range q) + (fun i x => initialConstant n m (B m x)* + FiniteParametrix.boundProfile (L+1) (fun r => κ r x) (fun r => κ r x) i (m+(L+1))) + (fun i _ => hi.mul (FiniteParametrix.boundProfile_polynomial (L+1) κ κ hκ hκ i (m+(L+1)))) + exact hi.add hsum + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeConstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeConstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..ea390690415a483908e02415418eb25176cb2125 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeConstruction.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPerturbationOperator +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedOperatorTransport +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricPerturbedParametrix + +namespace OAI + +/-! Insert the actual tensor-valued polynomial perturbation into the +geometric finite correction, using the fixed first-coordinate phase. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +abbrev firstPhase : Base → ℝ := fun p => p 0 + +lemma firstPhase_smooth : ContDiff ℝ ∞ firstPhase := + (ContinuousLinearMap.proj (R := ℝ) (φ := fun _ : Fin 2 => ℝ) 0).contDiff + +lemma firstPhase_derivative_bound (U : Set Base) (s : ℝ) (m : ℕ) (v : Fin 2) : + WeightedBound U s m 1 (fun p => fderiv ℝ firstPhase p (coordinateVector v)) := by + have he : (fun p => fderiv ℝ firstPhase p (coordinateVector v)) = + fun _ : Base => coordinateVector v 0 := by + funext p + exact congrArg (fun L : Base →L[ℝ] ℝ => L (coordinateVector v)) + (ContinuousLinearMap.proj (R := ℝ) (φ := fun _ : Fin 2 => ℝ) 0).fderiv + rw [he] + apply (weightedBound_const U s m (coordinateVector v 0)).mono_const + exact (norm_le_pi_norm (coordinateVector v) 0).trans (norm_coordinateVector_le v) + +def coordinateComplexField (G : Base → Space) : SmallModes.Field 4 := + fun p => RealModes.complexify (G (planeCoordinateIsometry.symm p)) + +lemma coordinateComplexField_smooth {G : Base → Space} (hG : ContDiff ℝ ∞ G) : + ContDiff ℝ ∞ (coordinateComplexField G) := + (RealModes.complexifyCLM 4).contDiff.comp (hG.comp planeCoordinateIsometry.symm.contDiff) + +namespace Perturbation + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +def coordinatePolynomialOperator (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) + (τ ε : ℝ) : + SupportedField (F := Fin 4 → ℂ) (K.map planeCoordinateIsometry planeCoordinateIsometry.continuous) →ₗ[ℝ] + SupportedField (F := Fin 3 → ℂ) (K.map planeCoordinateIsometry planeCoordinateIsometry.continuous) := + transportSupportedLM planeCoordinateIsometry K + (tensorConjugatedLM hO hU P hP hG hQ K hKU firstPhase_smooth τ ε 0) + +/-- The constants may depend on the requested norm, whereas `tensorLoss P` +is fixed before the finite correction depth is chosen. -/ +theorem coordinatePolynomialOperator_bounds {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) + (B : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) : + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (lowJet G) U Q) (s : ℝ≥0) (τ ε : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + (∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) → + ∀ m H, supportedWeightedSeminorm + (K.map planeCoordinateIsometry planeCoordinateIsometry.continuous) s m + (coordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU τ ε H) ≤ + ε / τ ^ tensorLoss P * D m * supportedWeightedSeminorm + (K.map planeCoordinateIsometry planeCoordinateIsometry.continuous) s (m + tensorOrder P) H := by + have hex := fun m => tensorConjugatedLM_bound hU hO hQcompact hQO P hP K hKU m (B m) 1 (hB m) zero_le_one + choose D hD hd using hex + refine ⟨D, hD, ?_⟩ + intro G hG hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb m H + have hlocal := hd m G firstPhase hG firstPhase_smooth hGQ s τ ε hτ hs hτs hs1 hε hε1 + (hGb m) (firstPhase_derivative_bound U s (m + tensorOrder P)) 0 (by simp) + have htrans := transportSupportedLM_bound planeCoordinateIsometry K + (tensorConjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU firstPhase_smooth τ ε 0) + hs m (m + tensorOrder P) (D m * ε / τ ^ tensorLoss P) hlocal H + change supportedWeightedSeminorm _ s m + (transportSupportedLM planeCoordinateIsometry K _ H) ≤ _ + convert htrans using 1 + ring + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dd40ccdd918b8101bc55bebe76ef268943f138d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialModeResidual.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeConstruction +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrixPowers + +namespace OAI + +/-! The forced linear modes for the polynomially perturbed metric operator +are solved to every fixed finite power of the small parameter. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +variable {n : ℕ} {U : Set Base} {O Q : Set LowJet} {G : Base → Space} + +abbrev modeSupport (K : Compacts Base) : Compacts SmallModes.Base := + K.map planeCoordinateIsometry planeCoordinateIsometry.continuous + +lemma modeSupport_subset (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) : + (modeSupport K : Set SmallModes.Base) ⊆ planeCoordinateIsometry '' U := by + rintro p ⟨x, hx, rfl⟩ + exact ⟨x, hKU hx, rfl⟩ + +theorem polynomial_forced_mode_residual + (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) + (hG : ContDiff ℝ ∞ G) (hGQ : Set.MapsTo (lowJet G) U Q) + (hM : SmallModes.ModeDomain (coordinateComplexField G) (planeCoordinateIsometry '' U)) + {s : ℝ≥0} {τ ε : ℝ} (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) + (hs1 : s ≤ 1) (hε : 0 ≤ ε) (hε1 : ε ≤ 1) + (B C : ℕ → ℝ) (hB : ∀ m, 1 ≤ B m) (hC : ∀ m, 0 ≤ C m) + (hGb : ∀ m, WeightedBound U s (m + tensorOrder P) (B m) (lowJet G)) + (hc : ∀ m, SmallModes.ReconstructionCoefficientBound (coordinateComplexField G) + (planeCoordinateIsometry '' U) s (m + 1) (C m)) : + let R := coordinatePolynomialOperator hO hU P hP hG + (fun _ hp => hQO (hGQ hp)) K hKU τ ε + let A := (SmallModes.conjugatedDLM τ (coordinateComplexField_smooth hG) (modeSupport K)).restrictScalars ℝ + R + let S := (SmallModes.forcedModeLM τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) 0).restrictScalars ℝ + let η := τ / s + ε / τ ^ tensorLoss P + ∃ D : ℕ → ℝ, (∀ m, 0 ≤ D m) ∧ + let κ := fun m => max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + ∀ (f : SupportedField (F := Fin 3 → ℂ) (modeSupport K)) (q m : ℕ), + supportedWeightedSeminorm (modeSupport K) s m + (A (FiniteParametrix.improve A S f (S f) q) - f) ≤ + η ^ (q + 1) * FiniteParametrix.boundProfile (tensorOrder P + 1) κ + (fun r => κ r * supportedWeightedSeminorm (modeSupport K) s (r + (tensorOrder P + 1)) f) q m := by + obtain ⟨D, hD, hd⟩ := coordinatePolynomialOperator_bounds hU hO hQcompact hQO P hP K hKU B hB + dsimp only + refine ⟨D, hD, ?_⟩ + intro f q m + let R := coordinatePolynomialOperator hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU τ ε + have hR := hd G hG hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb + have hdef := SmallModes.perturbed_geometric_defect_bound τ (coordinateComplexField_smooth hG) hM + (modeSupport K) (modeSupport_subset K hKU) hτ hs hτs hs1 hε C D hC hD hc R hR + have hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + apply FiniteParametrix.residual_bound_succ _ _ f _ + (fun r => supportedWeightedSeminorm (modeSupport K) s r) _ _ _ hη + · intro r + exact (SmallModes.errorConstant_nonneg _ (hC r)).trans (le_max_left _ _) + · exact hdef + · intro r + simpa only [FiniteParametrix.defect, LinearMap.sub_apply, LinearMap.comp_apply, + LinearMap.id_apply, R, mul_assoc] using hdef r f + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearPhaseFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearPhaseFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..918f66df45fe087b623ef569709671f554a0cc0c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearPhaseFrame.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartJetTransfer +import OAI.Geometry.SurfaceImmersion.Atlas.NonlinearPhaseFrameMargins + +namespace OAI + +/-! Polynomial reconstruction bounds for nonlinear first-coordinate phase +charts, including the cross-chart quadratic phases. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry WeightedEstimates + +theorem polynomial_nonlinear_phase_frame_bound (m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ (F : RField 4) (φ : Base → ℝ) (e : OpenPartialHomeomorph Base Base), + ContDiff ℝ ∞ F → ContDiff ℝ ∞ φ → ContDiff ℝ ∞ e → ContDiff ℝ ∞ e.symm → + (∀ x, (e x).1 = φ x) → + ∀ s B : ℝ, 0 < s → s ≤ 1 → 1 ≤ B → + (∀ j ≤ m+2, WeightedBound e.source 1 j (B/s^(j-2)) F) → + (∀ j, 1 ≤ j → j ≤ m+2 → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ B) → + (∀ x ∈ e.source, ‖(coordDet (fderiv ℝ e x))⁻¹‖ ≤ B) → + (∀ x ∈ e.source, |coordDet (fderiv ℝ e x)| ≤ B) → + (∀ x ∈ e.source, Function.Injective (fderiv ℝ F x)) → + (∀ x ∈ e.source, Good (realSecondTensor F x) (phaseDerivative φ x)) → + (∀ x ∈ e.source, + ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) → + (∀ x ∈ e.source, ‖secondQuadratic (realSecondTensor F x) + (-(phaseDerivative φ x).2,(phaseDerivative φ x).1)‖⁻¹ ≤ B) → + ReconstructionCoefficientBound (fun x => complexify ((F ∘ e.symm) x)) + e.target s m (A*B^d) ∧ + WeightedBound e.target s m (A*B^d) (freeNormal (F ∘ e.symm)) := by + obtain ⟨d₀,A₀,hA₀,hjet⟩ := polynomial_inverse_chart_twoJet_bound m + obtain ⟨q,C,hC,hframe⟩ := polynomial_frame_envelope m + let S : ℝ → ℝ := fun B => 1+A₀*B^d₀+B^3+B^6 + have hp : HasPolynomialBound S := by + dsimp [S] + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + obtain ⟨d,A,hA,hpoly⟩ := (polynomialBound_const (zero_le_one.trans hC)).mul (hp.pow q) + refine ⟨d,A,hA,?_⟩ + intro F φ e hF hφ he hi hphase s B hs hs1 hB hFj hej heinv hedet hImm hgood hG hN + have hB0 := zero_le_one.trans hB + have hterms : 1 ≤ S B ∧ A₀*B^d₀ ≤ S B ∧ B^3 ≤ S B ∧ B^6 ≤ S B := by + have h0 : 0 ≤ A₀*B^d₀ := mul_nonneg (zero_le_one.trans hA₀) (pow_nonneg hB0 _) + have h3 : 0 ≤ B^3 := pow_nonneg hB0 _ + have h6 : 0 ≤ B^6 := pow_nonneg hB0 _ + dsimp [S] + constructor + · linarith + constructor + · linarith + constructor <;> linarith + have hj := (hjet F e hF he hi s B hs hs1 hB hFj hej heinv).mono_const hterms.2.1 + have hdomain := realModeDomain_smooth_phase_chart hF hφ e he hi hphase hImm hgood + obtain ⟨hc,hf⟩ := hframe (hF.comp hi) hdomain hs hterms.1 hj + (fun y hy => (inverse_gram_nonlinear_chart_bound hF e he hi hy hB0 hB0 + (hedet _ (e.map_target hy)) (hG _ (e.map_target hy))).trans (by + convert hterms.2.2.1 using 1 + ring)) + (fun y hy => (inverse_normal_nonlinear_chart_bound hF hφ e he hi hphase hy hB0 + (hedet _ (e.map_target hy)) (hImm _ (e.map_target hy)) + (hgood _ (e.map_target hy)) (hN _ (e.map_target hy))).trans (by + convert hterms.2.2.2 using 1 + ring)) + exact ⟨hc.mono_const (hpoly B hB).2,hf.mono_const (hpoly B hB).2⟩ + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearScales.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearScales.lean new file mode 100644 index 0000000000000000000000000000000000000000..55d7e4bd9fd1801424bb088c61d7e497b1c72c51 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearScales.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPerturbationOperator + +namespace OAI + +/-! The smallness hypotheses convert the polynomial mixed and cubic terms +to the common delta-cubed/wavelength error scale. -/ +noncomputable section +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +lemma polynomial_mixed_scale {E ε A B δ τ : ℝ} {p : ℕ} + (hE : 0 ≤ E) (_hε : 0 ≤ ε) (hA : 0 ≤ A) (hB : 0 ≤ B) + (hδ : 0 ≤ δ) (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hsmall : ε / τ ^ p ≤ 1) : + E * ε * (A * δ * τ) * (B * δ ^ 2) / τ ^ p ≤ E * A * B * (δ ^ 3 / τ) := by + have hτ2 : τ ^ 2 ≤ 1 := pow_le_one₀ hτ.le hτ1 + calc + _ = (E * A * B * (δ ^ 3 / τ)) * ((ε / τ ^ p) * τ ^ 2) := by field_simp + _ ≤ (E * A * B * (δ ^ 3 / τ)) * 1 := by gcongr; exact (mul_le_of_le_one_left (sq_nonneg τ) hsmall).trans hτ2 + _ = _ := mul_one _ + +lemma polynomial_self_scale {E ε B δ τ : ℝ} {p : ℕ} + (hE : 0 ≤ E) (_hε : 0 ≤ ε) (_hB : 0 ≤ B) (hδ : 0 ≤ δ) + (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hδτ : δ ≤ τ) (hsmall : ε / τ ^ p ≤ 1) : + E * ε * (B * δ ^ 2) * (B * δ ^ 2) / τ ^ p ≤ E * B ^ 2 * (δ ^ 3 / τ) := by + have hδ1 : δ ≤ 1 := hδτ.trans hτ1 + have hdt : δ * τ ≤ 1 := (mul_le_of_le_one_left hτ.le hδ1).trans hτ1 + calc + _ = (E * B ^ 2 * (δ ^ 3 / τ)) * ((ε / τ ^ p) * (δ * τ)) := by field_simp + _ ≤ (E * B ^ 2 * (δ ^ 3 / τ)) * 1 := by gcongr; exact (mul_le_of_le_one_left (mul_nonneg hδ hτ.le) hsmall).trans hdt + _ = _ := mul_one _ + +lemma polynomial_cubic_scale {E ε A δ τ : ℝ} {p : ℕ} + (hE : 0 ≤ E) (_hε : 0 ≤ ε) (hA : 0 ≤ A) (hδ : 0 ≤ δ) + (hτ : 0 < τ) (hτ1 : τ ≤ 1) (hsmall : ε / τ ^ p ≤ 1) : + E * ε * (A * δ * τ) ^ 3 / τ ^ p ≤ E * A ^ 3 * (δ ^ 3 / τ) := by + have hτ4 : τ ^ 4 ≤ 1 := pow_le_one₀ hτ.le hτ1 + calc + _ = (E * A ^ 3 * (δ ^ 3 / τ)) * ((ε / τ ^ p) * τ ^ 4) := by field_simp + _ ≤ (E * A ^ 3 * (δ ^ 3 / τ)) * 1 := by gcongr; exact (mul_le_of_le_one_left (pow_nonneg hτ.le _) hsmall).trans hτ4 + _ = _ := mul_one _ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f361057d0fb1ffa52c0c3cd86e70a380612bc94 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNonlinearSolver.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialNonlinearPhaseFrame +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverFromBounds + +namespace OAI + +/-! Actual finite metric-mode solvers in nonlinear phase charts, with all +coefficient and coordinate budgets specified polynomially. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes PhaseGeometry + +theorem polynomial_nonlinear_unperturbed_solver : + ∃ (p : ℕ → ℕ) (A : ℕ → ℝ), (∀ m, 1 ≤ A m) ∧ + ∀ {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), + (∀ x, (e x).1 = coordinatePhase φ x) → + (modeSupport K : Set SmallModes.Base) ⊆ e.source → + (∀ x ∈ e.source, Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ e.source, Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x)) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ B : ℕ → ℝ, (∀ m, 1 ≤ B m) → + (∀ m, + (∀ j ≤ m+3, WeightedBound e.source 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) ∧ + (∀ j, 1 ≤ j → j ≤ m+3 → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ B m) ∧ + (∀ x ∈ e.source, ‖(coordDet (fderiv ℝ e x))⁻¹‖ ≤ B m) ∧ + (∀ x ∈ e.source, |coordDet (fderiv ℝ e x)| ≤ B m) ∧ + (∀ x ∈ e.source, ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ B m) ∧ + (∀ x ∈ e.source, ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-(phaseDerivative (coordinatePhase φ) x).2, + (phaseDerivative (coordinatePhase φ) x).1)‖⁻¹ ≤ B m)) → + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s, + c.e = e ∧ (∀ m, c.C m = A m*(B m)^(p m)) ∧ + (∀ m, c.D m = 0) ∧ (∀ m, c.J m = B m) := by + classical + choose p A hA hframe using fun m => polynomial_nonlinear_phase_frame_bound (m+1) + refine ⟨p,A,hA,?_⟩ + intro G hG K φ hφ e he hi hphase hKe hImm hgood τ s hs hs1 B hB hb + have hF : ContDiff ℝ ∞ (G ∘ planeCoordinateIsometry.symm) := + hG.comp planeCoordinateIsometry.symm.contDiff + have hφ' : ContDiff ℝ ∞ (coordinatePhase φ) := hφ.comp planeCoordinateIsometry.symm.contDiff + have hdom := realModeDomain_smooth_phase_chart hF hφ' e he hi hphase hImm hgood + have hc (m : ℕ) : SmallModes.ReconstructionCoefficientBound + (fun x => complexify (G (planeCoordinateIsometry.symm (e.symm x)))) + e.target s (m+1) (A m*(B m)^(p m)) := by + obtain ⟨hFj,hej,hei,hed,hgram,hnormal⟩ := hb m + have hh := (hframe m _ _ e hF hφ' he hi hphase s (B m) hs hs1 (hB m) + (fun j hj => hFj j (by omega)) + (fun j hj hjm x hx => hej j hj (by omega) x hx) + hei hed hImm hgood hgram hnormal).1 + exact hh + have hC (m : ℕ) : 0 ≤ A m*(B m)^(p m) := + mul_nonneg (zero_le_one.trans (hA m)) (pow_nonneg (zero_le_one.trans (hB m)) _) + let c := unperturbedSolverOfBounds hG K hφ e he hi hKe (fun x _ => hphase x) + hdom τ s (fun m => A m*(B m)^(p m)) B hC hB hc + (fun m j hj hjm x hx => (hb m).2.1 j hj (by omega) x hx) + exact ⟨c,rfl,fun _ => rfl,fun _ => rfl,fun _ => rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNormalBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNormalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7d1b528c902d8786aba957899ddead8ceb46345a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialNormalBounds.lean @@ -0,0 +1,125 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedRealAlgebra +import OAI.Geometry.Immersion.ClosedSurface.NormalJets + +namespace OAI + +/-! Explicit polynomial bounds for the Gram determinant, tangential +coefficients and normal projection. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def dotBudget (m : ℕ) (C : ℝ) : ℝ := 4*(2^m*C*C) +def quadraticBudget (m : ℕ) (C : ℝ) : ℝ := 1+2*(2^m*dotBudget m C*dotBudget m C) +def inverseGramBudget (m : ℕ) (C K : ℝ) : ℝ := + (m.factorial : ℝ)^2*K^(m+1)*(quadraticBudget m C)^m +def liftBudget (m : ℕ) (C K : ℝ) : ℝ := 2^m*quadraticBudget m C*inverseGramBudget m C K +def normalBudget (m : ℕ) (C K : ℝ) : ℝ := C+2*(2^m*liftBudget m C K*C) + +lemma dotBudget_nonneg (m : ℕ) {C : ℝ} (hC : 0 ≤ C) : 0 ≤ dotBudget m C := by + unfold dotBudget + positivity +lemma quadraticBudget_ge_one (m : ℕ) {C : ℝ} (hC : 0 ≤ C) : 1 ≤ quadraticBudget m C := by + have hd := dotBudget_nonneg m hC + unfold quadraticBudget + have hh : 0 ≤ 2*(2^m*dotBudget m C*dotBudget m C) := by positivity + linarith +lemma inverseGramBudget_nonneg (m : ℕ) {C K : ℝ} (hC : 0 ≤ C) (hK : 0 ≤ K) : + 0 ≤ inverseGramBudget m C K := by + have hd := (quadraticBudget_ge_one m hC).trans' zero_le_one + unfold inverseGramBudget + positivity +lemma liftBudget_nonneg (m : ℕ) {C K : ℝ} (hC : 0 ≤ C) (hK : 0 ≤ K) : + 0 ≤ liftBudget m C K := by + have hq := (quadraticBudget_ge_one m hC).trans' zero_le_one + have hi := inverseGramBudget_nonneg m hC hK + unfold liftBudget + positivity + +lemma weighted_quadratic_pair {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C : ℝ} {m : ℕ} (hs : 0 ≤ s) (hC : 0 ≤ C) + {X Y Z W : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) + (hZ : ContDiffOn ℝ ∞ Z U) (hW : ContDiffOn ℝ ∞ W U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (bZ : WeightedBound U s m C Z) (bW : WeightedBound U s m C W) : + WeightedBound U s m (quadraticBudget m C) + (fun x => (X x ⬝ᵥ Y x)*(Z x ⬝ᵥ W x)-(X x ⬝ᵥ Z x)*(Y x ⬝ᵥ W x)) := by + have hd := dotBudget_nonneg m hC + have bd (A B : E → RVec 4) (hA : ContDiffOn ℝ ∞ A U) (hB : ContDiffOn ℝ ∞ B U) + (bA : WeightedBound U s m C A) (bB : WeightedBound U s m C B) : + WeightedBound U s m (dotBudget m C) (fun x => A x ⬝ᵥ B x) := + bA.dot_real hU hs hC hC hA hB bB + have hleft := (bd X Y hX hY bX bY).mul_real hU hs hd hd + (contDiffOn_dot_real hX hY) (contDiffOn_dot_real hZ hW) (bd Z W hZ hW bZ bW) + have hright := (bd X Z hX hZ bX bZ).mul_real hU hs hd hd + (contDiffOn_dot_real hX hZ) (contDiffOn_dot_real hY hW) (bd Y W hY hW bY bW) + exact (hleft.sub hU hs + ((contDiffOn_dot_real hX hY).mul (contDiffOn_dot_real hZ hW)) + ((contDiffOn_dot_real hX hZ).mul (contDiffOn_dot_real hY hW)) hright).mono_const (by + unfold quadraticBudget + linarith) + +/-- Rational normal projection with an explicit polynomial dependence on +the inverse Gram bound. -/ +theorem weighted_realNormalPart {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C K : ℝ} {m : ℕ} (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + {X Y W : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hW : ContDiffOn ℝ ∞ W U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (bW : WeightedBound U s m C W) + (hne : ∀ x ∈ U, NormalFrame.gramDet (X x) (Y x) ≠ 0) + (hInv : ∀ x ∈ U, ‖(NormalFrame.gramDet (X x) (Y x))⁻¹‖ ≤ K) : + WeightedBound U s m (normalBudget m C K) (fun x => realNormalPart (X x) (Y x) (W x)) := by + have hC0 : 0 ≤ C := zero_le_one.trans hC + have hK0 : 0 ≤ K := zero_le_one.trans hK + have hquad := quadraticBudget_ge_one m hC0 + have hq0 := zero_le_one.trans hquad + have hG : ContDiffOn ℝ ∞ (fun x => NormalFrame.gramDet (X x) (Y x)) U := + ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hY)).sub + ((contDiffOn_dot_real hX hY).pow 2) + have bG : WeightedBound U s m (quadraticBudget m C) + (fun x => NormalFrame.gramDet (X x) (Y x)) := by + convert weighted_quadratic_pair hU hs.le hC0 hX hX hY hY bX bX bY bY using 1 + funext x + unfold NormalFrame.gramDet + ring + have bInv : WeightedBound U s m (inverseGramBudget m C K) + (fun x => (NormalFrame.gramDet (X x) (Y x))⁻¹) := + bG.inv_real hU hs hquad hK hG hne hInv + have hGI := hG.inv hne + have bnX := weighted_quadratic_pair hU hs.le hC0 hY hY hX hW bY bY bX bW + have bnY := weighted_quadratic_pair hU hs.le hC0 hX hX hY hW bX bX bY bW + have hnX := ((contDiffOn_dot_real hY hY).mul (contDiffOn_dot_real hX hW)).sub + ((contDiffOn_dot_real hY hX).mul (contDiffOn_dot_real hY hW)) + have hnY := ((contDiffOn_dot_real hX hX).mul (contDiffOn_dot_real hY hW)).sub + ((contDiffOn_dot_real hX hY).mul (contDiffOn_dot_real hX hW)) + have bi := inverseGramBudget_nonneg m hC0 hK0 + have blX := bnX.mul_real hU hs.le hq0 bi hnX hGI bInv + have blY := bnY.mul_real hU hs.le hq0 bi hnY hGI bInv + have hlX := hnX.mul hGI + have hlY := hnY.mul hGI + have hbl := liftBudget_nonneg m hC0 hK0 + have btX := blX.smul_real_pi hU hs hbl hC0 hlX hX bX + have btY := blY.smul_real_pi hU hs hbl hC0 hlY hY bY + have hout := (bW.sub hU hs.le hW (hlX.smul hX) btX).sub hU hs.le + (hW.sub (hlX.smul hX)) (hlY.smul hY) btY + have hout' := hout.mono_const (show C+2^m*liftBudget m C K*C+2^m*liftBudget m C K*C ≤ + normalBudget m C K from by unfold normalBudget; ring_nf; rfl) + apply hout'.congr + intro x hx + change realNormalPart (X x) (Y x) (W x) = + W x-(((Y x ⬝ᵥ Y x)*(X x ⬝ᵥ W x)-(Y x ⬝ᵥ X x)*(Y x ⬝ᵥ W x))* + (NormalFrame.gramDet (X x) (Y x))⁻¹) • X x- + (((X x ⬝ᵥ X x)*(Y x ⬝ᵥ W x)-(X x ⬝ᵥ Y x)*(X x ⬝ᵥ W x))* + (NormalFrame.gramDet (X x) (Y x))⁻¹) • Y x + simp only [realNormalPart,div_eq_mul_inv,dotProduct_comm] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerpBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerpBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..5d4ebac9d060172c8a9779db24c91297806d4921 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerpBounds.lean @@ -0,0 +1,96 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialNormalBounds +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedInverseSqrt + +namespace OAI + +/-! Polynomial derivative bounds for the perpendicular product and its +unit normalization used by the free mode. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def crossBudget (m : ℕ) (C : ℝ) := 2*(2^m*C*C) +def minorTermBudget (m : ℕ) (C : ℝ) := 2^m*C*crossBudget m C +def perpBudget (m : ℕ) (C : ℝ) := 3*minorTermBudget m C + +lemma perpBudget_nonneg (m : ℕ) {C : ℝ} (hC : 0 ≤ C) : 0 ≤ perpBudget m C := by + unfold perpBudget minorTermBudget crossBudget + positivity + +lemma weighted_minor3 {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hC : 0 ≤ C) + {X Y B : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hB : ContDiffOn ℝ ∞ B U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (bB : WeightedBound U s m C B) (i j k : Fin 4) : + WeightedBound U s m (perpBudget m C) (fun x => NormalFrame.minor3 (X x) (Y x) (B x) i j k) := by + have hy (a : Fin 4) := contDiffOn_pi.mp hY a + have hb (a : Fin 4) := contDiffOn_pi.mp hB a + have hx (a : Fin 4) := contDiffOn_pi.mp hX a + have hcross (a b : Fin 4) := ((hy a).mul (hb b)).sub ((hy b).mul (hb a)) + have bcross (a b : Fin 4) : WeightedBound U s m (crossBudget m C) + (fun x => Y x a*B x b-Y x b*B x a) := by + have h₁ := (bY.component hU hs.le hC hY a).mul_real hU hs.le hC hC (hy a) (hb b) + (bB.component hU hs.le hC hB b) + have h₂ := (bY.component hU hs.le hC hY b).mul_real hU hs.le hC hC (hy b) (hb a) + (bB.component hU hs.le hC hB a) + convert h₁.sub hU hs.le ((hy a).mul (hb b)) ((hy b).mul (hb a)) h₂ using 1 + unfold crossBudget + ring + have hcb : 0 ≤ crossBudget m C := by unfold crossBudget; positivity + have hterm (a b c : Fin 4) := (hx a).mul (hcross b c) + have bterm (a b c : Fin 4) : WeightedBound U s m (minorTermBudget m C) + (fun x => X x a*(Y x b*B x c-Y x c*B x b)) := + (bX.component hU hs.le hC hX a).mul_real hU hs.le hC hcb (hx a) (hcross b c) (bcross b c) + have ht := ((bterm i j k).sub hU hs.le (hterm i j k) (hterm j i k) (bterm j i k)).add + hU hs.le ((hterm i j k).sub (hterm j i k)) (hterm k i j) (bterm k i j) + convert ht using 1 <;> first | rfl | (unfold perpBudget; ring) + +lemma contDiffOn_perpProduct {U : Set E} {X Y B : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hB : ContDiffOn ℝ ∞ B U) : + ContDiffOn ℝ ∞ (fun x => NormalFrame.perpProduct (X x) (Y x) (B x)) U := by + have hm (i j k : Fin 4) : ContDiffOn ℝ ∞ + (fun x => NormalFrame.minor3 (X x) (Y x) (B x) i j k) U := by + unfold NormalFrame.minor3 + fun_prop + apply contDiffOn_pi.mpr + intro i + fin_cases i + · exact (hm 1 2 3).neg + · exact hm 0 2 3 + · exact (hm 0 1 3).neg + · exact hm 0 1 2 + +lemma weighted_perpProduct {U : Set E} (hU : UniqueDiffOn ℝ U) + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hC : 0 ≤ C) + {X Y B : E → RVec 4} + (hX : ContDiffOn ℝ ∞ X U) (hY : ContDiffOn ℝ ∞ Y U) (hB : ContDiffOn ℝ ∞ B U) + (bX : WeightedBound U s m C X) (bY : WeightedBound U s m C Y) + (bB : WeightedBound U s m C B) : + WeightedBound U s m (perpBudget m C) (fun x => NormalFrame.perpProduct (X x) (Y x) (B x)) := by + have hminor (i j k : Fin 4) : ContDiffOn ℝ ∞ + (fun x => NormalFrame.minor3 (X x) (Y x) (B x) i j k) U := by + unfold NormalFrame.minor3 + fun_prop + apply WeightedBound.pi hU hs (perpBudget_nonneg m hC) + · intro i + fin_cases i + · exact (hminor 1 2 3).neg + · exact hminor 0 2 3 + · exact (hminor 0 1 3).neg + · exact hminor 0 1 2 + · intro i + fin_cases i + · exact (weighted_minor3 hU hs hC hX hY hB bX bY bB 1 2 3).neg hU (hminor 1 2 3) + · exact weighted_minor3 hU hs hC hX hY hB bX bY bB 0 2 3 + · exact (weighted_minor3 hU hs hC hX hY hB bX bY bB 0 1 3).neg hU (hminor 0 1 3) + · exact weighted_minor3 hU hs hC hX hY hB bX bY bB 0 1 2 + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bcc5540cfbb46e8fce01c8364e584e4a86f49bba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationBounds.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConjugatedMultilinearBounds + +namespace OAI + +/-! Finite polynomial perturbations have one fixed short-scale exponent. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates MixedExpression ModulatedJets + +variable {n : ℕ} + +def order (P : Fin n → Expression) : ℕ := Finset.univ.sup (fun l => (P l).order) +def loss (P : Fin n → Expression) : ℕ := Finset.univ.sup (fun l => (P l).loss + 6) + +def conjugated (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : Fin 3 → Base → ℝ) (H : DirectionFields) (τ : ℝ) (i : Fin 3) (z : Base × ℝ) : ℂ := + ∑ l, ε ^ (l.val + 1) • conjugatedVariation (P l) G φ H τ i z + +lemma conjugatedVariation_smooth {U : Set Base} {O : Set LowJet} {e : Expression} + (he : e.SmoothCoeffs O) {G : Base → Space} {φ : Fin 3 → Base → ℝ} {H : DirectionFields} + (hG : ContDiff ℝ ∞ G) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hH : ∀ j, ContDiff ℝ ∞ (H j)) (hO : IsOpen O) + (hQ : Set.MapsTo (lowJet G) U O) (τ : ℝ) (i : Fin 3) (t : ℝ) : + ContDiffOn ℝ ∞ (fun p => conjugatedVariation e G φ H τ i (p, t)) U := by + have h := evalComplex_parameter_smooth hG hQ + (fun j w a => (amplitudeData_smooth hG hφ hH τ 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φ hH τ i (p, t) + +/-- The perturbation parameter enters linearly in the bound, and the single +short-scale loss works at every requested output order. -/ +theorem compact_conjugated_bound {U : Set Base} {O K : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B Q : ℝ) (hB : 1 ≤ B) (hQ : 0 ≤ Q) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (φ : Fin 3 → Base → ℝ) + (H : DirectionFields) (s τ ε : ℝ) (C : Fin 3 → ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → (∀ j, 0 < C j) → + ContDiff ℝ ∞ G → (∀ j, ContDiff ℝ ∞ (φ j)) → (∀ j, ContDiff ℝ ∞ (H j)) → + Set.MapsTo (lowJet G) U K → WeightedBound U s (m + order P) B (lowJet G) → + (∀ j, WeightedBound U s (m + order P) (C j) (H j)) → + (∀ j v, WeightedBound U s (m + order P) Q + (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)) / + τ ^ loss P) (fun p => conjugated P ε G φ H τ i (p, t)) := by + classical + have hex := fun l => compact_conjugated_multilinear_bound hU hO hK hKO (P l) (hP l) m B Q hB hQ + choose D hD hb using hex + refine ⟨∑ l, D l, Finset.sum_nonneg (fun l _ => hD l), ?_⟩ + intro G φ H s τ ε C hτ hs hτs hs1 hε hε1 hC hG hφ hH hGK hGb hHb 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).le + have h₁ := (hC 1).le + have h₂ := (hC 2).le + dsimp only [W] + split_ifs <;> positivity + have hval (l : Fin n) : WeightedBound U s m (D l * ε * W / τ ^ loss P) + (fun p => ε ^ (l.val + 1) • conjugatedVariation (P l) G φ H τ i (p, t)) := by + have hl : (P l).order ≤ order P := Finset.le_sup (f := fun k => (P k).order) (Finset.mem_univ l) + have hh := hb l G φ H s τ C hτ hs hτs hs1 hC hG hφ hH hGK + (hGb.mono_order (Nat.add_le_add_left hl m)) + (fun j => (hHb j).mono_order (Nat.add_le_add_left hl m)) + (fun j v => (hφb j v).mono_order (Nat.add_le_add_left hl m)) t ht i + have hsmooth := conjugatedVariation_smooth (hP l) hG hφ hH hO + (fun p hp => hKO (hGK hp)) τ i t + have hh' : WeightedBound U s m (D l * W / τ ^ loss P) + (fun p => conjugatedVariation (P l) G φ H τ i (p, t)) := + hh.mono_const (div_le_div_of_nonneg_left (mul_nonneg (hD l) hW) (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le (hτs.trans hs1) + (Finset.le_sup (f := fun k => (P k).loss + 6) (Finset.mem_univ l)))) + have hscaled := hh'.const_smul hU.uniqueDiffOn hsmooth (ε ^ (l.val + 1)) + apply hscaled.mono_const + rw [abs_of_nonneg (pow_nonneg hε _)] + have heps : ε ^ (l.val + 1) ≤ ε := by + simpa only [pow_one] using pow_le_pow_of_le_one hε hε1 (show 1 ≤ l.val + 1 by omega) + calc + _ ≤ ε * (D l * W / τ ^ loss P) := + mul_le_mul_of_nonneg_right heps + (div_nonneg (mul_nonneg (hD l) hW) (pow_nonneg hτ.le _)) + _ = _ := by ring + have hsum := WeightedBound.finset_sum hU.uniqueDiffOn hs.le Finset.univ + (fun l => D l * ε * W / τ ^ loss P) + (fun l p => ε ^ (l.val + 1) • conjugatedVariation (P l) G φ H τ i (p, t)) + (fun l _ => (conjugatedVariation_smooth (hP l) hG hφ hH hO + (fun p hp => hKO (hGK hp)) τ i t).const_smul _) (fun l _ => hval l) + simpa only [conjugated, ← Finset.sum_div, ← Finset.sum_mul, W] using hsum + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..787ed3c38d2f1dcb9e5872c5a718d6cefabfb5a2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationCalculus.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationDerivatives +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariationLinearity + +namespace OAI + +/-! The perturbation operators and their actual first variations. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +variable {n : ℕ} + +def eval (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) (z : Base × ℝ) : ℝ := + ∑ l, ε ^ (l.val + 1) * (P l).eval G z + +def variation (P : Fin n → Expression) (ε : ℝ) (G H : Base → Space) (z : Base × ℝ) : ℝ := + ∑ l, ε ^ (l.val + 1) * (P l).variation G H z + +theorem variation_hasDerivAt {O : Set LowJet} (hO : IsOpen O) + {P : Fin n → Expression} (hP : ∀ l, (P l).SmoothCoeffs O) (ε : ℝ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (z : Base × ℝ) (hQ : lowJet G z.1 ∈ O) : + HasDerivAt (fun s : ℝ => eval P ε (fun p => G p + s • H p) z) + (variation P ε G H z) 0 := by + have h := HasDerivAt.fun_sum (u := Finset.univ) (fun l _ => + ((P l).variation_hasDerivAt hO hG hH (hP l) z hQ).const_mul (ε ^ (l.val + 1))) + simpa only [eval, variation] using h + +lemma variation_add (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {H K : Base → Space} (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) (z : Base × ℝ) : + variation P ε G (fun p => H p + K p) z = variation P ε G H z + variation P ε G K z := by + simp only [variation, Expression.variation_add _ _ hH hK, mul_add, Finset.sum_add_distrib] + +lemma variation_smul (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {H : Base → Space} (hH : ContDiff ℝ ∞ H) (c : ℝ) (z : Base × ℝ) : + variation P ε G (fun p => c • H p) z = c * variation P ε G H z := by + simp only [variation, Expression.variation_smul _ _ hH, Finset.mul_sum] + apply Finset.sum_congr rfl + intro l _ + ring + +lemma eval_smooth {O : Set LowJet} {U : Set Base} {P : Fin n → Expression} + (hP : ∀ l, (P l).SmoothCoeffs O) (ε : ℝ) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) : + ContDiffOn ℝ ∞ (eval P ε G) (U ×ˢ Set.univ) := by + exact ContDiffOn.sum (fun l _ => contDiffOn_const.mul ((P l).eval_smooth hG hQ (hP l))) + +lemma variation_smooth {O : Set LowJet} (hO : IsOpen O) {U : Set Base} + {P : Fin n → Expression} (hP : ∀ l, (P l).SmoothCoeffs O) (ε : ℝ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (hQ : Set.MapsTo (lowJet G) U O) : + ContDiffOn ℝ ∞ (variation P ε G H) (U ×ˢ Set.univ) := by + exact ContDiffOn.sum (fun l _ => contDiffOn_const.mul + ((P l).variation_smooth hO hG hH hQ (hP l))) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..92121070568a4112b15ba5fe571eedbfbb589f2d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPerturbationOperator.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConjugatedOperatorBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationBounds +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedTupleOperators + +namespace OAI + +/-! The conjugated derivative of the actual finite polynomial perturbation, +with its fixed scale loss and linear dependence on epsilon. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates ModulatedJets + +variable {n : ℕ} {U : Set Base} {O : Set LowJet} {G : Base → Space} + +def conjugatedLM (hO : IsOpen O) (hU : IsOpen U) (P : Fin n → Expression) + (hP : ∀ l, (P 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 := ℂ) K := + ∑ l, ε ^ (l.val + 1) • + (P l).conjugatedVariationLM hO hU (hP l) hG hQ K hKU hφ τ t + +lemma conjugatedLM_apply (hO : IsOpen O) (hU : IsOpen U) (P : Fin n → Expression) + (hP : ∀ l, (P 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 : ℝ) + (H : SupportedField (F := Fin 4 → ℂ) K) (p : Base) : + conjugatedLM hO hU P hP hG hQ K hKU hφ τ ε t H p = + conjugated P ε G (singlePhase φ) (singleDirection H) τ 0 (p, t) := by + simp only [conjugatedLM, LinearMap.sum_apply, LinearMap.smul_apply] + have hsum := congrArg (fun f : Base → ℂ => f p) + (map_sum (FunLike.coeAddMonoidHom (SupportedField (F := ℂ) K) Base ℂ) + (fun l : Fin n => ε ^ (l.val + 1) • + (P l).conjugatedVariationLM hO hU (hP l) hG hQ K hKU hφ τ t H) Finset.univ) + simp only [FunLike.coeAddMonoidHom_apply, Finset.sum_apply] at hsum + rw [hsum] + simp only [smul_apply, Expression.conjugatedVariationLM_apply, conjugated] + +theorem conjugatedLM_bound {Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQcompact : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P 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 + order P) B (lowJet G) → + (∀ v, WeightedBound U s (m + order P) R + (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ H : SupportedField (F := Fin 4 → ℂ) K, + supportedWeightedSeminorm K s m + (conjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H) ≤ + D * ε / τ ^ loss P * supportedWeightedSeminorm K s (m + order P) H := by + obtain ⟨D, hD, hd⟩ := compact_conjugated_bound hU hO hQcompact hQO P hP m B R hB hR + refine ⟨D, hD, ?_⟩ + intro G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb t ht H + let C := supportedWeightedSeminorm K s (m + order P) 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 + order P) 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 + order P) (![C, 1, 1] j) (singleDirection H j) := by + intro j + fin_cases j + · exact (weightedBound_of_supportedSeminorm s (m + order P) H).restrict_open hU + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + have hΦb : ∀ j v, WeightedBound U s (m + order P) R + (fun p => fderiv ℝ (singlePhase φ j) p (coordinateVector v)) := by + intro j v + fin_cases j + · exact hφb v + · change WeightedBound U s (m + order P) R + (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 + order P) (F := ℝ)).mono_const hR + · change WeightedBound U s (m + order P) R + (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 + order P) (F := ℝ)).mono_const hR + have hv := hd G (singlePhase φ) (singleDirection H) s τ ε ![C, 1, 1] + hτ hs hτs hs1 hε hε1 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 / τ ^ loss P) + (conjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H) := by + apply (show WeightedBound U s m (D * ε * C / τ ^ loss P) + (fun p => conjugated P ε G (singlePhase φ) (singleDirection H) τ 0 (p, t)) by + simpa using hv).congr + intro p _ + exact conjugatedLM_apply hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H p + have hg := hl.extend_support hU + ((conjugatedLM hO hU P hP 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 / τ ^ loss P by positivity) + (conjugatedLM hO hU P hP hG (fun _ hp => hQO (hGQ hp)) K hKU hφ τ ε t H) hg + convert hn using 1 + dsimp only [C] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..23efb0e8cab7ff7217fdc52af5d51b24632d137b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseBounds.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseSupport + +namespace OAI + +/-! Uniform product bounds for the actual nonzero-phase coefficients. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates MixedExpression ModulatedJets + +theorem quadraticPhaseCoefficient_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ ψ : Base → ℝ) + (H K : Base → Fin 4 → ℂ) (s τ ε C D : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → 0 < D → + ContDiff ℝ ∞ G → ContDiff ℝ ∞ φ → ContDiff ℝ ∞ ψ → + ContDiff ℝ ∞ H → ContDiff ℝ ∞ K → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + WeightedBound U s (m + order P) C H → WeightedBound U s (m + order P) D K → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ ψ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C * D / τ ^ loss P) + (quadraticPhaseCoefficient P ε G φ ψ H K τ t) := by + obtain ⟨E, hE, he⟩ := compact_conjugated_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨E / 4, div_nonneg hE (by norm_num), ?_⟩ + intro G φ ψ H K s τ ε C D hτ hs hτs hs1 hε hε1 hC hD hG hφ hψ hH hK hGQ hGb hHb hKb hφb hψb t ht + have hpb : ∀ j v, WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (pairPhases φ ψ j) p (coordinateVector v)) := by + intro j v + fin_cases j + · exact hφb v + · exact hψb v + · change WeightedBound U s (m + order P) F + (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 + order P)).mono_const hF + have hhb : ∀ j, WeightedBound U s (m + order P) (![C, D, 1] j) (pairDirections H K j) := by + intro j + fin_cases j + · exact hHb + · exact hKb + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + have hh := he G (pairPhases φ ψ) (pairDirections H K) s τ ε ![C, D, 1] + hτ hs hτs hs1 hε hε1 (fun j => by fin_cases j; exact hC; exact hD; norm_num) + hG (pairPhases_smooth hφ hψ) (pairDirections_smooth hH hK) hGQ hGb hhb hpb t ht 1 + have hsm : ContDiffOn ℝ ∞ (fun p => conjugated P ε G + (pairPhases φ ψ) (pairDirections H K) τ 1 (p,t)) U := + ContDiffOn.sum fun l _ => + (conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hψ) + (pairDirections_smooth hH hK) hO (fun _ hp => hQO (hGQ hp)) τ 1 t).const_smul _ + have hf := hh.const_smul hU.uniqueDiffOn hsm (1 / 4 : ℝ) + convert hf using 1 + · simp only [Matrix.cons_val_zero, Matrix.cons_val_one, show (1 : Fin 3) ≤ 1 by decide, + show ¬ (2 : Fin 3) ≤ 1 by decide, ↓reduceIte, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 4)] + ring + · funext p + simp only [quadraticPhaseCoefficient, Complex.real_smul, Complex.ofReal_div, + Complex.ofReal_one, Complex.ofReal_ofNat] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseChartInverse.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseChartInverse.lean new file mode 100644 index 0000000000000000000000000000000000000000..48981dd901514a5a9bfe4e93c39875c9f2251556 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseChartInverse.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInverseChartJets +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedInverseJacobian + +namespace OAI + +/-! Polynomial inverse-chart jets from forward jets and the actual Jacobian +lower bound. The exponent is fixed before the chart and numerical bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes WeightedEstimates + +lemma inverse_chart_derivative_eq_field + (e : OpenPartialHomeomorph Base Base) + (he : ContDiff ℝ ∞ e) (hi : ContDiff ℝ ∞ e.symm) {y : Base} (hy : y ∈ e.target) : + fderiv ℝ e.symm y = inverseJacobianField (fderiv ℝ e) (e.symm y) := by + have hdet := coordDet_fderiv_ne_zero_of_local_inverse e.open_source e.open_target + he.contDiffOn hi.contDiffOn (fun x hx => e.map_source hx) + (fun x hx => e.left_inv hx) (e.map_target hy) + have hleft := inverse_matrix_comp (fderiv ℝ e (e.symm y)) hdet + have hright := inverse_chart_derivative e he hi hy + change fderiv ℝ e.symm y = + (coordDet (fderiv ℝ e (e.symm y)))⁻¹ • planeAdjugate (fderiv ℝ e (e.symm y)) + rw [← ContinuousLinearMap.id_comp (fderiv ℝ e.symm y),← hleft, + ContinuousLinearMap.comp_assoc,hright,ContinuousLinearMap.comp_id] + +theorem polynomial_inverse_chart_bound (m : ℕ) : + ∃ d : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ (e : OpenPartialHomeomorph Base Base), + ContDiff ℝ ∞ e → ContDiff ℝ ∞ e.symm → + ∀ B : ℝ, 1 ≤ B → + (∀ j, 1 ≤ j → j ≤ m+1 → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ B) → + (∀ x ∈ e.source, ‖(coordDet (fderiv ℝ e x))⁻¹‖ ≤ B) → + ∀ j, 1 ≤ j → j ≤ m+1 → ∀ y ∈ e.target, + ‖iteratedFDerivWithin ℝ j e.symm e.target y‖ ≤ C*B^d := by + have hpoly := (inverseChartJetBudget_polynomial (m+1)).comp + ((polynomialBound_const zero_le_one).add + (inverseJacobianBudget_polynomial m (fun x => x) (fun x => x) + polynomialBound_id polynomialBound_id)) + (fun B hB => le_add_of_nonneg_right (by + dsimp [inverseJacobianBudget] + have hB0 := zero_le_one.trans hB + positivity)) + obtain ⟨d,C,hC,hpoly⟩ := hpoly + refine ⟨d,C,hC,?_⟩ + intro e he hi B hB hfwd hdet j hj hjm y hy + have hB0 := zero_le_one.trans hB + have hA : ContDiffOn ℝ ∞ (fderiv ℝ e) e.source := + (he.fderiv_right (m := ∞) (by simp)).contDiffOn + have hbA : WeightedBound e.source 1 m B (fderiv ℝ e) := by + intro k hk x hx + simp only [one_pow,one_mul] + have hsame := iteratedFDerivWithin_congr + (fun z hz => fderivWithin_of_isOpen e.open_source hz + (𝕜 := ℝ) (f := (e : Base → Base))) hx (𝕜 := ℝ) (n := k) + rw [← hsame,norm_iteratedFDerivWithin_fderivWithin e.open_source.uniqueDiffOn hx] + exact hfwd (k+1) (by omega) (by omega) x hx + have hne : ∀ x ∈ e.source, coordDet (fderiv ℝ e x) ≠ 0 := fun x hx => + coordDet_fderiv_ne_zero_of_local_inverse e.open_source e.open_target + he.contDiffOn hi.contDiffOn (fun z hz => e.map_source hz) (fun z hz => e.left_inv hz) hx + have hbJ := weighted_inverseJacobianField e.open_source.uniqueDiffOn hA + zero_lt_one hB hB hbA hne hdet + have hJ := contDiffOn_inverseJacobianField hA hne + have hbound : ∀ k ≤ m, ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ k (inverseJacobianField (fderiv ℝ e)) e.source x‖ ≤ + 1+inverseJacobianBudget m B B := by + intro k hk x hx + have hh := hbJ k hk x hx + simp only [one_pow,one_mul] at hh + exact hh.trans (le_add_of_nonneg_left zero_le_one) + have hJB : 0 ≤ 1+inverseJacobianBudget m B B := by + dsimp [inverseJacobianBudget] + positivity + exact (inverse_chart_positive_jets e hi (inverseJacobianField (fderiv ℝ e)) hJ + (fun z hz => inverse_chart_derivative_eq_field e he hi hz) hJB hbound j hj hjm y hy).trans + (hpoly B hB).2 + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..a6584f4fc9abaac2ee5b8f81da3dd4c3bf9dc7cc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseFrame.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LinearFrameJetBound + +namespace OAI + +/-! Polynomial reconstruction and free-normal bounds for the selected +linear phase charts. The exponent is fixed before the map and its bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes PhaseGeometry WeightedEstimates + +def phaseFrameInputBudget (m : ℕ) (B : ℝ) : ℝ := + 1+B*B^(m+2)+4*B^5+16*B^10 + +lemma phaseFrameInputBudget_polynomial (m : ℕ) : + HasPolynomialBound (phaseFrameInputBudget m) := by + unfold phaseFrameInputBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +theorem polynomial_phase_frame_bound (m : ℕ) : + ∃ d : ℕ, ∃ A : ℝ, 1 ≤ A ∧ + ∀ {F : RField 4} {U : Set Base}, ContDiff ℝ ∞ F → IsOpen U → + ∀ {ξ : Base} (hξ : ξ ≠ 0) {s B : ℝ}, 0 < s → s ≤ 1 → 1 ≤ B → + ‖ξ‖ ≤ B → ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ B → + (∀ j ≤ m+2, WeightedBound U 1 j (B/s^(j-2)) F) → + (∀ x ∈ U, Function.Injective (fderiv ℝ F x)) → + (∀ x ∈ U, Good (realSecondTensor F x) ξ) → + (∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ B) → + (∀ x ∈ U, ‖secondQuadratic (realSecondTensor F x) (-ξ.2,ξ.1)‖⁻¹ ≤ B) → + ReconstructionCoefficientBound + (fun x => complexify ((F ∘ (phaseEquiv ξ hξ).symm) x)) + ((phaseEquiv ξ hξ).symm ⁻¹' U) s m (A*B^d) ∧ + WeightedBound ((phaseEquiv ξ hξ).symm ⁻¹' U) s m (A*B^d) + (freeNormal (F ∘ (phaseEquiv ξ hξ).symm)) := by + obtain ⟨q,C,hC,hframe⟩ := polynomial_frame_envelope m + obtain ⟨d,A,hA,hpoly⟩ := (polynomialBound_const (zero_le_one.trans hC)).mul + ((phaseFrameInputBudget_polynomial m).pow q) + refine ⟨d,A,hA,?_⟩ + intro F U hF hU ξ hξ s B hs hs1 hB hξB heB hprefix hImm hgood hG hN + have hB0 := zero_le_one.trans hB + let S := phaseFrameInputBudget m B + have hterms : 1 ≤ S ∧ B*B^(m+2) ≤ S ∧ 4*B^5 ≤ S ∧ 16*B^10 ≤ S := by + have h1 : 0 ≤ B*B^(m+2) := by positivity + have h2 : 0 ≤ 4*B^5 := by positivity + have h3 : 0 ≤ 16*B^10 := by positivity + dsimp [S,phaseFrameInputBudget] + constructor + · linarith + constructor + · linarith + constructor <;> linarith + have hjet := (realTwoJet_linear_prefix_bound hU hF hs hs1 hB0 + (phaseEquiv ξ hξ).symm hB heB hprefix).mono_const hterms.2.1 + have hset : (phaseEquiv ξ hξ) '' U = (phaseEquiv ξ hξ).symm ⁻¹' U := by + ext x + constructor + · rintro ⟨y,hy,rfl⟩ + simpa only [mem_preimage,ContinuousLinearEquiv.symm_apply_apply] using hy + · intro hx + exact ⟨(phaseEquiv ξ hξ).symm x,hx,(phaseEquiv ξ hξ).apply_symm_apply x⟩ + have hdomain := realModeDomain_phase hF hU hξ hImm hgood + rw [hset] at hdomain + obtain ⟨hcoeff,hfree⟩ := hframe (hF.comp (phaseEquiv ξ hξ).symm.contDiff) + hdomain hs hterms.1 hjet + (fun x hx => (inverse_gram_phase_bound hF hξ hB0 hB0 hξB x (hG _ hx)).trans + (by convert hterms.2.2.1 using 1; ring)) + (fun x hx => (inverse_normal_phase_bound hF hξ hB0 hB0 hξB x (hImm _ hx) + (hgood _ hx).2 (hN _ hx)).trans + (by convert hterms.2.2.2 using 1; ring)) + have hout : C*S^q ≤ A*B^d := (hpoly B hB).2 + exact ⟨hcoeff.mono_const hout,hfree.mono_const hout⟩ + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseSupport.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseSupport.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a7a97cddb5c414daece0ec4dd3ae24ab81805f4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPhaseSupport.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialZeroPhaseExpansion +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanSupport + +namespace OAI + +/-! Every polynomial quadratic phase coefficient is smooth and supported +in the intersection of its two amplitude supports. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets WeightedEstimates + +lemma quadraticComplex_zero_right_at (e : Expression) (G : Base → Space) + (J K : DirectionJets) (z : Base × ℝ) (hK : ∀ w a, K w a z.1 = 0) : + quadraticComplex e G J K z = 0 := by + have he : quadraticComplex e G J K z = quadraticComplex e G J 0 z := by + apply MixedExpression.evalComplex_congr + intro i w a + fin_cases i + · rfl + · rfl + · exact hK w a + · rfl + rw [he] + change quadraticComplexBilinear e G z J 0 = 0 + exact map_zero _ + +namespace Perturbation + +lemma quadraticPhaseCoefficient_smooth {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hO : IsOpen O) (hP : ∀ l, (P l).SmoothCoeffs O) + {G : Base → Space} {φ ψ : Base → ℝ} {H K : Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) (hψ : ContDiff ℝ ∞ ψ) + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (hQ : Set.MapsTo (lowJet G) U O) (ε τ t : ℝ) : + ContDiffOn ℝ ∞ (quadraticPhaseCoefficient P ε G φ ψ H K τ t) U := by + exact (ContDiffOn.sum fun l _ => + (conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hψ) + (pairDirections_smooth hH hK) hO hQ τ 1 t).const_smul _).div_const 4 + +lemma quadraticPhaseCoefficient_zero_of_notMem {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) (φ ψ : Base → ℝ) (H K : Base → Fin 4 → ℂ) + (τ t : ℝ) {p : Base} (hp : p ∉ tsupport H ∩ tsupport K) : + quadraticPhaseCoefficient P ε G φ ψ H K τ t p = 0 := by + have hz (l : Fin n) : conjugatedVariation (P l) G (pairPhases φ ψ) + (pairDirections H K) τ 1 (p,t) = 0 := by + have hn : phase τ φ p * phase τ ψ p ≠ 0 := + mul_ne_zero (Complex.exp_ne_zero _) (Complex.exp_ne_zero _) + have he : quadraticComplex (P l) G (complexJet (fun x => phase τ φ x • H x)) + (complexJet (fun x => phase τ ψ x • K x)) (p,t) = 0 := by + by_cases hH : p ∈ tsupport H + · have hK : p ∉ tsupport K := fun hk => hp ⟨hH, hk⟩ + have hk : p ∉ tsupport (fun x => phase τ ψ x • K x) := + fun hx => hK (tsupport_smul_subset_right (phase τ ψ) K hx) + exact quadraticComplex_zero_right_at (P l) G _ _ _ + (fun w a => complexJet_zero_of_notMem hk w a) + · have hh : p ∉ tsupport (fun x => phase τ φ x • H x) := + fun hx => hH (tsupport_smul_subset_right (phase τ φ) H hx) + exact quadraticComplex_zero_at (P l) G _ _ _ + (fun w a => complexJet_zero_of_notMem hh w a) + rw [quadraticComplex_phase_factor] at he + exact (mul_eq_zero.mp he).resolve_left hn + simp only [quadraticPhaseCoefficient, conjugated, hz, smul_zero, Finset.sum_const_zero, + zero_div] + +lemma quadraticPhaseCoefficient_tsupport {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) (φ ψ : Base → ℝ) (H K : Base → Fin 4 → ℂ) (τ t : ℝ) : + tsupport (quadraticPhaseCoefficient P ε G φ ψ H K τ t) ⊆ tsupport H ∩ tsupport K := by + apply closure_minimal _ ((isClosed_tsupport H).inter (isClosed_tsupport K)) + intro p hp + by_contra hn + exact hp (quadraticPhaseCoefficient_zero_of_notMem P ε G φ ψ H K τ t hn) + +def polynomialPhaseField {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hU : IsOpen U) (hO : IsOpen O) + (hP : ∀ l, (P l).SmoothCoeffs O) {G : Base → Space} {φ ψ : Base → ℝ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) (hψ : ContDiff ℝ ∞ ψ) + (hQ : Set.MapsTo (lowJet G) U O) (C : Compacts Base) (hCU : (C : Set Base) ⊆ U) + (H K : Base → Fin 4 → ℂ) (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) + (hC : tsupport H ∩ tsupport K ⊆ C) (ε τ t : ℝ) : SupportedField (F := ℂ) C := + let hs := (quadraticPhaseCoefficient_tsupport P ε G φ ψ H K τ t).trans hC + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset hU (hs.trans hCU) + (quadraticPhaseCoefficient_smooth hO hP hG hφ hψ hH hK hQ ε τ t)) + (subset_closure.trans hs) + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPowerThreshold.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPowerThreshold.lean new file mode 100644 index 0000000000000000000000000000000000000000..96577e3a3ec443f55e8fda1bdb1f1321ff095b8c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPowerThreshold.lean @@ -0,0 +1,31 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitPowerThreshold + +namespace OAI + +/-! Polynomial reciprocal control for explicit positive-power thresholds. +No compactness choice enters the numerical threshold. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection +open RealModes + +theorem powerThreshold_inverse_polynomial (n : ℕ) (c b C B : ℝ → ℝ) + (hC : HasPolynomialBound C) (hB : HasPolynomialBound B) + (hc : ∀ x, 1 ≤ x → 0 ≤ c x) (hb : ∀ x, 1 ≤ x → 0 < b x) + (hcC : ∀ x, 1 ≤ x → c x ≤ C x) + (hbB : ∀ x, 1 ≤ x → (b x)⁻¹ ≤ B x) : + HasPolynomialBound (fun x => (powerThreshold n (c x) (b x))⁻¹) := by + apply HasPolynomialBound.of_le + (((polynomialBound_const zero_le_one).add + ((hC.add (polynomialBound_const zero_le_one)).mul hB)).pow n) + · intro x hx + apply inv_nonneg.mpr + unfold powerThreshold + exact pow_nonneg (le_min zero_le_one (div_nonneg (hb x hx).le (by linarith [hc x hx]))) _ + · intro x hx + exact powerThreshold_inverse_le (hc x hx) (hb x hx) (hcC x hx) (hbB x hx) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPreparedInitialization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPreparedInitialization.lean new file mode 100644 index 0000000000000000000000000000000000000000..05bd9b380f3e23e637bd390db43c98a1369f0974 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialPreparedInitialization.lean @@ -0,0 +1,97 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra +import OAI.Geometry.SurfaceImmersion.Geometry.InitializationPowers + +namespace OAI + +/-! Initialization at a power of the primitive scale, after all geometric +polynomial losses and before the primitive accuracy order are chosen. -/ +noncomputable section +namespace ClosedSurfaceR4.ExactCorrection +open RealModes + +theorem polynomial_prepared_initialization (E : ℝ → ℝ) (hE : HasPolynomialBound E) : + ∃ ν : ℝ, 1 < ν ∧ ∃ N : ℕ, ∀ B D e r K : ℝ, + 0 ≤ B → 0 ≤ D → 0 < e → 1 ≤ r → 0 < K → + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ z : ℝ, 0 < z → z < η → + z^ν ≤ z ∧ z^ν ≤ 1/32 ∧ + (∀ ε : ℝ, 0 < ε → ε⁻¹ ≤ E ((z^2)⁻¹) → z^ν < ε) ∧ + B/z^2+(z^ν/z)*(B/z^2) ≤ 1/z^4 ∧ + D+z^ν*D+e ≤ 1/z^4 ∧ + ((z^ν)^(10 : ℝ))^2*(B/z^2) ≤ (z^8/r)/8 ∧ + B*z^(N+1) ≤ ((z^ν)^(10 : ℝ))^2*e ∧ + ((z^ν)^(10 : ℝ))^2*(B/z^2)+2*(z^8/r)*z^ν ≤ z^8/K := by + obtain ⟨d,hd⟩ := hE.at_inverse_scale 2 + obtain ⟨C,hC,hbound⟩ := hd 1 le_rfl + let ν : ℝ := (d : ℝ)+2 + have hν : 1 < ν := by dsimp [ν]; linarith [show (0:ℝ) ≤ (d : ℝ) from Nat.cast_nonneg d] + obtain ⟨N,hN⟩ := exists_nat_gt (20*ν) + have hN' : 20*ν < (N : ℝ)+1 := by linarith + refine ⟨ν,hν,N,?_⟩ + intro B D e r K hB hD he hr hK + have hrp : 0 < r := zero_lt_one.trans_le hr + obtain ⟨ηb,hηb,hηb32,hbudget⟩ := initialization_budget_threshold hν hN' hB hD he + obtain ⟨ηe,hηe,_,heps⟩ := positive_power_threshold C (ν-d) 1 (by dsimp [ν]; linarith) zero_lt_one + let a := min (1/(8*r)) (1/(2*K)) + have ha : 0 < a := lt_min (by positivity) (by positivity) + obtain ⟨ηp,hηp,_,hnear⟩ := positive_power_threshold B (20*ν-10) a (by linarith) ha + obtain ⟨ηt,hηt,_,htail⟩ := positive_power_threshold (2/r) ν (1/(2*K)) (by linarith) (by positivity) + let η := min ηb (min ηe (min ηp ηt)) + refine ⟨η,lt_min hηb (lt_min hηe (lt_min hηp hηt)), + (min_le_left _ _).trans (hηb32.trans (by norm_num)),?_⟩ + intro z hz hzη + have hzb : z < ηb := hzη.trans_le (min_le_left _ _) + have hze : z < ηe := hzη.trans_le ((min_le_right _ _).trans (min_le_left _ _)) + have hzp : z < ηp := hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _))) + have hzt : z < ηt := hzη.trans_le ((min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _))) + have hz1 : z ≤ 1 := hzη.le.trans ((min_le_left _ _).trans (hηb32.trans (by norm_num))) + obtain ⟨htz,ht32,hMB,hHB,_,herr⟩ := hbudget z hz hzb + have hδ : ((z^ν)^(10 : ℝ))^2 = z^(20*ν) := by + rw [← Real.rpow_natCast,← Real.rpow_mul (Real.rpow_nonneg hz.le _),← Real.rpow_mul hz.le] + congr 1 + norm_num + ring + have hdisp : z^(20*ν)*(B/z^2) = (B*z^(20*ν-10))*z^8 := by + rw [Real.rpow_sub hz,Real.rpow_ofNat] + have hp : z^10 = z^2*z^8 := by ring + rw [hp] + field_simp + have hsmall := mul_le_mul_of_nonneg_right (hnear z hz hzp).le (pow_nonneg hz.le 8) + have hsmallr : z^(20*ν)*(B/z^2) ≤ (z^8/r)/8 := by + rw [hdisp] + calc + _ ≤ a*z^8 := hsmall + _ ≤ (1/(8*r))*z^8 := mul_le_mul_of_nonneg_right (min_le_left _ _) (pow_nonneg hz.le _) + _ = (z^8/r)/8 := by ring + have hsmallK : z^(20*ν)*(B/z^2) ≤ z^8/(2*K) := by + rw [hdisp] + exact hsmall.trans (by + calc + a*z^8 ≤ (1/(2*K))*z^8 := mul_le_mul_of_nonneg_right (min_le_right _ _) (pow_nonneg hz.le _) + _ = z^8/(2*K) := by ring) + have htailK : 2*(z^8/r)*z^ν ≤ z^8/(2*K) := by + have hh := mul_le_mul_of_nonneg_right (htail z hz hzt).le (pow_nonneg hz.le 8) + convert hh using 1 <;> ring + refine ⟨htz,ht32,?_,hMB,hHB,?_,?_,?_⟩ + · intro ε hε hεb + have hEbound : E ((z^2)⁻¹) ≤ C/z^d := by + simpa only [one_div] using (hbound z hz hz1).2 + have heq : z^ν*(C/z^d) = C*z^(ν-d) := by + rw [Real.rpow_sub hz,Real.rpow_natCast] + ring + have hh : z^ν*ε⁻¹ < 1 := (mul_le_mul_of_nonneg_left (hεb.trans hEbound) + (Real.rpow_nonneg hz.le _)).trans_lt (by rw [heq]; exact heps z hz hze) + exact (div_lt_one hε).mp (by simpa only [div_eq_mul_inv] using hh) + · rwa [hδ] + · rw [hδ] + have hexp : (N : ℝ)+1 = ((N+1 : ℕ) : ℝ) := by norm_num + simpa only [hexp,Real.rpow_natCast] using herr + · rw [hδ] + calc + _ ≤ z^8/(2*K)+z^8/(2*K) := add_le_add hsmallK htailK + _ = z^8/K := by ring + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfileTransfer.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfileTransfer.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fe0f16db6686ad80a0b909275ed780b69eef699 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfileTransfer.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveFactors + +namespace OAI + +/-! +The size and residual factors depend only on numeric coefficient profiles, +not on the map, phase, chart, target or scale in a solver record. The pure +profiles let a family use those factors without introducing a reference +solver at unit scale. +-/ + +noncomputable section + +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +variable {n : ℕ} + +def κProfile (P : Fin 3 → Fin n → Expression) (C D : ℕ → ℝ) (m : ℕ) : ℝ := + max (SmallModes.errorConstant m (C m)) + (D m * SmallModes.initialConstant 4 (m + tensorOrder P) (C (m + tensorOrder P))) + +def sizeProfile (P : Fin 3 → Fin n → Expression) (C D J : ℕ → ℝ) (q m : ℕ) : ℝ := + (m.factorial : ℝ) * 2 ^ m * + SmallModes.forcedModeBudget 4 (tensorOrder P) C D q m * J m ^ m + +def residualProfile (P : Fin 3 → Fin n → Expression) (C D J : ℕ → ℝ) (q m : ℕ) : ℝ := + tensorChartBudget m (J m) (J (m + 1)) * 2 ^ m * + FiniteParametrix.boundProfile (tensorOrder P + 1) + (κProfile P C D) (κProfile P C D) q m + +theorem κProfile_nonneg (P : Fin 3 → Fin n → Expression) (C D : ℕ → ℝ) + (hC : ∀ m, 0 ≤ C m) (m : ℕ) : 0 ≤ κProfile P C D m := + (SmallModes.errorConstant_nonneg m (hC m)).trans (le_max_left _ _) + +theorem sizeProfile_nonneg (P : Fin 3 → Fin n → Expression) (C D J : ℕ → ℝ) + (hC : ∀ m, 0 ≤ C m) (hJ : ∀ m, 0 ≤ J m) (q m : ℕ) : + 0 ≤ sizeProfile P C D J q m := + mul_nonneg (mul_nonneg (by positivity) + (SmallModes.forcedModeBudget_nonneg 4 (tensorOrder P) C D hC q m)) + (pow_nonneg (hJ m) _) + +theorem residualProfile_nonneg (P : Fin 3 → Fin n → Expression) (C D J : ℕ → ℝ) + (hC : ∀ m, 0 ≤ C m) (hJ : ∀ m, 0 ≤ J m) (q m : ℕ) : + 0 ≤ residualProfile P C D J q m := + mul_nonneg (mul_nonneg (tensorChartBudget_nonneg m (hJ m) (hJ (m + 1))) (by positivity)) + (FiniteParametrix.boundProfile_nonneg (κProfile_nonneg P C D hC) + (κProfile_nonneg P C D hC) q m) + +variable {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) + +theorem κ_eq_κProfile {C D : ℕ → ℝ} (hC : c.C = C) (hD : c.D = D) : + c.κ = κProfile P C D := by + funext m + simp only [κ, κProfile, hC, hD] + +theorem sizeFactor_eq_sizeProfile {C D J : ℕ → ℝ} + (hC : c.C = C) (hD : c.D = D) (hJ : c.J = J) (q m : ℕ) : + c.sizeFactor q m = sizeProfile P C D J q m := by + simp only [sizeFactor, sizeProfile, hC, hD, hJ] + +theorem residualFactor_eq_residualProfile {C D J : ℕ → ℝ} + (hC : c.C = C) (hD : c.D = D) (hJ : c.J = J) (q m : ℕ) : + c.residualFactor q m = residualProfile P C D J q m := by + simp only [residualFactor, residualProfile, hJ, c.κ_eq_κProfile hC hD] + +/-- Solver records at different maps or scales have the same factors when +their three numeric profiles agree. -/ +theorem factors_eq_of_profiles + {ε' τ' : ℝ} {H : Base → Space} {hH : ContDiff ℝ ∞ H} {ψ : Base → ℝ} + {L : TopologicalSpace.Compacts Base} {s' : ℝ≥0} + (d : PolynomialSolveData P ε' H hH ψ L τ' s') + (hC : c.C = d.C) (hD : c.D = d.D) (hJ : c.J = d.J) (q m : ℕ) : + c.sizeFactor q m = d.sizeFactor q m ∧ + c.residualFactor q m = d.residualFactor q m := by + constructor + · exact (c.sizeFactor_eq_sizeProfile hC hD hJ q m).trans + (d.sizeFactor_eq_sizeProfile rfl rfl rfl q m).symm + · exact (c.residualFactor_eq_residualProfile hC hD hJ q m).trans + (d.residualFactor_eq_residualProfile rfl rfl rfl q m).symm + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfiledSplitCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfiledSplitCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..2494eff16fc3c31c0fdea589f2d2e5815503412b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialProfiledSplitCancellation.lean @@ -0,0 +1,135 @@ +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 polynomial_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 D 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 → + 0 ≤ ε → τ/s+ε/τ^tensorLoss P ≤ 1 → + ∀ (c : (i : ι) → PolynomialSolveData P ε G hG φ (L i) τ s), + (∀ i, (c i).C = C i) → (∀ i, (c i).D = D i) → (∀ 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 + ε/τ^tensorLoss P) ^ (q + 1) * Ct m * supportedWeightedSeminorm K s + (PolynomialSolveData.inputOrder (P := P) q m) A) + (coordinateFullLinearized P ε G 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) (D i) (J i) q m + let R : ι → ℕ → ℝ := fun i m => + PolynomialSolveData.residualProfile P (C i) (D i) (J i) q m + have hV (i : ι) (m : ℕ) : 0 ≤ V i m := + PolynomialSolveData.sizeProfile_nonneg P (C i) (D i) (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) (D i) (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 hε hsmall c hc hd hj hi A + obtain ⟨X, hX, hsp, hb, hr⟩ := finite_polynomial_cancellation P ε hG + (fun _ : ι => φ) L c hτ hs hτs hs1 hε 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 + ε/τ^tensorLoss P) ^ (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)] + calc + _ ≤ ((τ / s + ε/τ^tensorLoss P) ^ (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 (add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.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 + ε/τ^tensorLoss P) ^ (q + 1) * Ct m * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A := by + calc + _ ≤ ∑ i, (τ / s + ε/τ^tensorLoss P) ^ (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 [hdisp, Pi.add_def] using + (hr m).mono_const hbound + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..3c29517fee7faea9d9ed9421e3368dba6c656c17 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticCancellation.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedQuadraticFamily +import OAI.Geometry.SurfaceImmersion.Correction.FreeForcedIncrementIdentity + +namespace OAI + +/-! Cancel the actual nonzero quadratic tensor of the free displacement, +including the polynomial Hessian, with the finite supported solver. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +theorem 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 : ℕ) : + 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 + ∃ V : RealModes.RField 4, ContDiff ℝ ∞ V ∧ + tsupport V ⊆ ⋃ i, (modeSupport (K i) : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m (∑ l, (c l).size (f l) q m) V) ∧ + (∀ m, WeightedBound Set.univ τ m (∑ l, (c l).residual (f l) q m) + (coordinateFullLinearized P ε G V + combinedNonzeroQuadratic P ε G φ (fun i => H i) τ)) := by + classical + dsimp only + 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 + obtain ⟨V,hV,hsp,hb,hr⟩ := finite_polynomial_cancellation P ε hG (quadraticFamilyPhase φ) + (quadraticCompacts K) c hτ hs hτs hs1 hε hsmall f q + refine ⟨V,hV,hsp.trans ?_,hb,?_⟩ + · intro x hx + obtain ⟨l,hl⟩ := Set.mem_iUnion.mp hx + rw [modeSupport_quadraticCompacts] at hl + rcases l with i | ⟨i,j,b⟩ + · exact Set.mem_iUnion.mpr ⟨i,hl⟩ + · exact Set.mem_iUnion.mpr ⟨i,hl.1⟩ + · have he : (fun x => ∑ l, QuadraticMean.displacement τ + (coordinatePhase (quadraticFamilyPhase φ l)) (f l) x) = + combinedNonzeroQuadratic P ε G φ (fun i => H i) τ := by + funext x + apply Finset.sum_congr rfl + intro l _ + have hp : coordinatePhase (quadraticFamilyPhase φ l) = + RealModes.quadraticPhase (fun i => coordinatePhase (φ i)) l := by + funext y + exact coordinate_quadratic_phase φ l y + rw [hp] + rfl + intro m + apply (hr m).congr + intro x _ + change coordinateFullLinearized P ε G V x + combinedNonzeroQuadratic P ε G φ (fun i => H i) τ x = _ + rw [← he] + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..695e3e7527b2f939a249789f6a45e766da3498e8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamily.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseSupport +import OAI.Geometry.Immersion.ClosedSurface.QuadraticSupport + +namespace OAI + +/-! Index the polynomial quadratic remainder by the same doubled and +mixed labels used for the metric quadratic remainder. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open ModulatedJets + +def quadraticFamilyPhase {ι : Type*} (φ : ι → Base → ℝ) : + RealModes.QuadraticLabel ι → Base → ℝ + | .inl i => fun p => 2 * φ i p + | .inr ⟨i, j, b⟩ => if b then (fun p => φ i p - φ j p) else (fun p => φ i p + φ j p) + +def quadraticFamilyCoefficient {n : ℕ} {ι : Type*} + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) : + RealModes.QuadraticLabel ι → Base → ℂ + | .inl i => quadraticPhaseCoefficient P ε G (φ i) (φ i) (H i) (H i) τ t + | .inr ⟨i, j, b⟩ => if b then + quadraticPhaseCoefficient P ε G (φ i) (fun p => -φ j p) (H i) (starField (H j)) τ t + else quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t + +def quadraticFamilySupport {ι : Type*} (S : ι → Set Base) : + RealModes.QuadraticLabel ι → Set Base + | .inl i => S i + | .inr ⟨i, j, _⟩ => S i ∩ S j + +lemma starField_tsupport (H : Base → Fin 4 → ℂ) : tsupport (starField H) ⊆ tsupport H := by + apply closure_minimal _ (isClosed_tsupport H) + intro p hp + by_contra hn + apply hp + funext a + simp only [starField, image_eq_zero_of_notMem_tsupport hn, Pi.zero_apply, star_zero] + +lemma quadraticFamilyCoefficient_tsupport {n : ℕ} {ι : Type*} + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) + {S : ι → Set Base} (hH : ∀ i, tsupport (H i) ⊆ S i) : + ∀ l, tsupport (quadraticFamilyCoefficient P ε G φ H τ t l) ⊆ quadraticFamilySupport S l := by + intro l + rcases l with i | ⟨i,j,b⟩ + · exact (quadraticPhaseCoefficient_tsupport P ε G (φ i) (φ i) (H i) (H i) τ t).trans + (fun _ hp => hH i hp.1) + · cases b + · exact (quadraticPhaseCoefficient_tsupport P ε G (φ i) (φ j) (H i) (H j) τ t).trans + (Set.inter_subset_inter (hH i) (hH j)) + · exact (quadraticPhaseCoefficient_tsupport P ε G (φ i) (fun p => -φ j p) + (H i) (starField (H j)) τ t).trans + (Set.inter_subset_inter (hH i) ((starField_tsupport (H j)).trans (hH j))) + +theorem quadraticOscillation_eq_family {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticOscillation P ε G φ H τ t p = + ∑ l : RealModes.QuadraticLabel ι, + (phase τ (quadraticFamilyPhase φ l) p * quadraticFamilyCoefficient P ε G φ H τ t l p).re := by + have hsplit (i : ι) : + (∑ j, (phase τ (fun x => φ i x + φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t p).re) = + (phase τ (fun x => 2 * φ i x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ i) (H i) (H i) τ t p).re + + ∑ j ∈ Finset.univ.erase i, (phase τ (fun x => φ i x + φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t p).re := by + rw [← Finset.sum_erase_add Finset.univ _ (Finset.mem_univ i)] + have hh : (fun x => φ i x + φ i x) = (fun x => 2 * φ i x) := by funext x; ring + rw [hh, add_comm] + rw [quadraticOscillation, Fintype.sum_sum_type] + simp only [hsplit, Finset.sum_add_distrib] + change _ = _ + ∑ l : Σ i : ι, {j : ι // j ≠ i} × Bool, _ + rw [Fintype.sum_sigma] + have hcross : + (∑ i, ∑ j ∈ Finset.univ.erase i, (phase τ (fun x => φ i x + φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t p).re) + + (∑ i, ∑ j ∈ Finset.univ.erase i, (phase τ (fun x => φ i x - φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) (H i) (starField (H j)) τ t p).re) = + ∑ i, ∑ l : {j : ι // j ≠ i} × Bool, + (phase τ (quadraticFamilyPhase φ (.inr ⟨i,l⟩)) p * + quadraticFamilyCoefficient P ε G φ H τ t (.inr ⟨i,l⟩) p).re := by + rw [← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i hi + rw [Fintype.sum_prod_type, ← Finset.sum_add_distrib] + trans ∑ j : {j : ι // j ≠ i}, + ((phase τ (fun x => φ i x + φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t p).re + + (phase τ (fun x => φ i x - φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ t p).re) + · exact Finset.sum_subtype (Finset.univ.erase i) (fun j => by simp) _ + apply Finset.sum_congr rfl + intro j hj + rw [Fintype.sum_bool] + simp only [quadraticFamilyPhase, quadraticFamilyCoefficient, Bool.false_eq_true, ↓reduceIte] + ring + change (_ + _) + _ = _ + _ + rw [add_assoc, hcross] + rfl + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamilyBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamilyBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7a9bd3f56af0aa1fd63c0d3477f4147c63d6957 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticFamilyBounds.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPhaseBounds + +namespace OAI + +/-! One constant controls every doubled and mixed polynomial phase. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +theorem quadraticFamilyCoefficient_bound {n : ℕ} {ι : Type*} + {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : ι → Base → ℝ) + (H : ι → Base → Fin 4 → ℂ) (s τ ε C : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → + ContDiff ℝ ∞ G → (∀ i, ContDiff ℝ ∞ (φ i)) → (∀ i, ContDiff ℝ ∞ (H i)) → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + (∀ i, WeightedBound U s (m + order P) C (H i)) → + (∀ i v, WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (φ i) p (coordinateVector v))) → + ∀ (l : RealModes.QuadraticLabel ι), ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C ^ 2 / τ ^ loss P) + (quadraticFamilyCoefficient P ε G φ H τ t l) := by + obtain ⟨E, hE, he⟩ := quadraticPhaseCoefficient_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨E, hE, ?_⟩ + intro G φ H s τ ε C hτ hs hτs hs1 hε hε1 hC hG hφ hH hGQ hGb hHb hφb l t ht + have hneg (i : ι) (v : Fin 2) : WeightedBound U s (m + order P) F + (fun p => fderiv ℝ (fun x => -φ i x) p (coordinateVector v)) := by + have hh := (hφb i v).neg hU.uniqueDiffOn + (((hφ i).fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const).contDiffOn + simpa only [fderiv_fun_neg, neg_apply] using hh + rcases l with i | ⟨i,j,b⟩ + · simpa only [quadraticFamilyCoefficient, pow_two, mul_assoc] using + he G (φ i) (φ i) (H i) (H i) s τ ε C C hτ hs hτs hs1 hε hε1 hC hC + hG (hφ i) (hφ i) (hH i) (hH i) hGQ hGb (hHb i) (hHb i) (hφb i) (hφb i) t ht + · cases b + · simpa only [quadraticFamilyCoefficient, Bool.false_eq_true, ↓reduceIte, pow_two, mul_assoc] using + he G (φ i) (φ j) (H i) (H j) s τ ε C C hτ hs hτs hs1 hε hε1 hC hC + hG (hφ i) (hφ j) (hH i) (hH j) hGQ hGb (hHb i) (hHb j) (hφb i) (hφb j) t ht + · simpa only [quadraticFamilyCoefficient, ↓reduceIte, pow_two, mul_assoc] using + he G (φ i) (fun x => -φ j x) (H i) (starField (H j)) s τ ε C C hτ hs hτs hs1 hε hε1 hC hC + hG (hφ i) (hφ j).neg (hH i) (starField_smooth (hH j)) hGQ hGb (hHb i) + (weighted_starField hU.uniqueDiffOn hs hC.le (hH j) (hHb j)) (hφb i) (hneg j) t ht + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticPhases.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticPhases.lean new file mode 100644 index 0000000000000000000000000000000000000000..d332a0d7fc8710a4325a2c0ebe679c00dceaa35a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticPhases.lean @@ -0,0 +1,88 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealQuadraticVariation + +namespace OAI + +/-! Exact zero- and double-phase terms of the polynomial Hessian. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression ModulatedJets + +def pairPhases (φ ψ : Base → ℝ) : Fin 3 → Base → ℝ := ![φ, ψ, 0] +def pairDirections (H K : Base → Fin 4 → ℂ) : DirectionFields := ![H, K, 0] +def starField (H : Base → Fin 4 → ℂ) : Base → Fin 4 → ℂ := fun p a => star (H p a) + +lemma starField_smooth {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) : + ContDiff ℝ ∞ (starField H) := by + apply contDiff_pi.mpr + intro a + exact Complex.conjCLE.contDiff.comp (contDiff_pi.mp hH a) + +lemma complexJet_starField {H : Base → Fin 4 → ℂ} (hH : ContDiff ℝ ∞ H) : + complexJet (starField H) = starDirectionJets (complexJet H) := by + funext w a p + exact congrFun (directional_clm Complex.conjCLE.toContinuousLinearMap + (contDiff_pi.mp hH a) (w.map coordinateVector)) p + +lemma phase_star (τ : ℝ) (φ : Base → ℝ) (p : Base) : + star (phase τ φ p) = phase τ (fun q => -φ q) p := by + simp only [phase, Complex.star_def, ← Complex.exp_conj, map_mul, map_div₀, + Complex.conj_I, Complex.conj_ofReal, Complex.ofReal_neg] + congr 1 + ring + +lemma starField_phase (τ : ℝ) (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) : + starField (fun p => phase τ φ p • H p) = + fun p => phase τ (fun q => -φ q) p • starField H p := by + funext p a + simp only [starField, Pi.smul_apply, smul_eq_mul, star_mul', phase_star] + +lemma pair_oscillatoryData (G : Base → Space) (φ ψ : Base → ℝ) + (H K : Base → Fin 4 → ℂ) (τ : ℝ) : + oscillatoryData G (pairPhases φ ψ) (pairDirections H K) τ = + pairJetData G (complexJet (fun p => phase τ φ p • H p)) + (complexJet (fun p => phase τ ψ p • K p)) := by + funext i w a p + fin_cases i + · rfl + · rfl + · rfl + · change iteratedDirectional (w.map coordinateVector) + (fun p => phase τ (fun _ => 0) p * (0 : ℂ)) p = 0 + simp only [mul_zero, iteratedDirectional_zero] + +lemma quadraticComplex_phase_factor (e : Expression) (G : Base → Space) (φ ψ : Base → ℝ) + (H K : Base → Fin 4 → ℂ) (τ : ℝ) (z : Base × ℝ) : + quadraticComplex e G (complexJet (fun p => phase τ φ p • H p)) + (complexJet (fun p => phase τ ψ p • K p)) z = + (phase τ φ z.1 * phase τ ψ z.1) * + conjugatedVariation e G (pairPhases φ ψ) (pairDirections H K) τ 1 z := by + have he : phaseProduct (pairPhases φ ψ) τ 1 z.1 = phase τ φ z.1 * phase τ ψ z.1 := by + simp [phaseProduct, pairPhases] + rw [quadraticComplex, ← pair_oscillatoryData, conjugatedVariation, ← he, ← mul_assoc, + mul_inv_cancel₀ (phaseProduct_ne_zero _ _ _ _), one_mul] + +/-- The coefficient of the zero phase is precisely the mixed phase Hessian; +all remaining self-interaction has phase twice the original phase. -/ +theorem half_second_variation_oscillation (e : Expression) (G : Base → Space) + {φ : Base → ℝ} {H : Base → Fin 4 → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hH : ContDiff ℝ ∞ H) (τ : ℝ) (z : Base × ℝ) : + (1 / 2 : ℝ) * (e.variations 1).eval + ![G, realField (fun p => phase τ φ p • H p), realField (fun p => phase τ φ p • H p), 0] z = + ((phase τ φ z.1 ^ 2) * + conjugatedVariation e G (pairPhases φ φ) (pairDirections H H) τ 1 z).re / 4 + + (conjugatedVariation e G (pairPhases φ (fun p => -φ p)) + (pairDirections H (starField H)) τ 1 z).re / 4 := by + have hosc : ContDiff ℝ ∞ (fun p => phase τ φ p • H p) := (phase_smooth hφ τ).smul hH + rw [half_second_variation_real e G hosc] + have he : starDirectionJets (complexJet (fun p => phase τ φ p • H p)) = + complexJet (fun p => phase τ (fun q => -φ q) p • starField H p) := by + rw [← complexJet_starField hosc, starField_phase] + rw [he, quadraticComplex_phase_factor, quadraticComplex_phase_factor, phase_neg_inv, + mul_inv_cancel₀ (show phase τ φ z.1 ≠ 0 from Complex.exp_ne_zero _), one_mul, ← pow_two, add_div] + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargetBudget.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargetBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..0eefd1ff209b3a0f22c3884a50d9d76cf90626a9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargetBudget.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CutoffQuadraticBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! The quadratic target constant is polynomial in the amplitude and phase +budgets, with the fixed cutoff constant kept explicit. -/ +noncomputable section +open Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +def quadraticTargetBudget (m : ℕ) (D A P : ℝ) : ℝ := + 2^m*D*(4*2^m*((1+2^m*P)*A)^2) + +theorem cutoff_quadratic_bound_explicit {ι : Type*} {K : TopologicalSpace.Compacts SmallModes.Base} + (χ : SupportedField (F := ℝ) K) (m : ℕ) {D : ℝ} (hD : 0 ≤ D) + (hd : ∀ s : ℝ, 0 < s → s ≤ 1 → + WeightedBound univ s m D (fun x => ((χ x * χ x : ℝ) : ℂ))) + (A P : ℝ) : + ∀ (τ s δ : ℝ) + (φ : ι → SmallModes.Base → ℝ) (Z : ι → SmallModes.Field 4), + (∀ a, ContDiff ℝ ∞ (φ a)) → (∀ a, ContDiff ℝ ∞ (Z a)) → + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ δ → 0 ≤ A → 0 ≤ P → + (∀ a, WeightedBound univ s (m+1) (A*(δ*τ)) (Z a)) → + (∀ a v, ‖v‖ ≤ 1 → WeightedBound univ s m P (SmallModes.coordDeriv v (φ a))) → + ∀ l : RealModes.QuadraticLabel ι, + WeightedBound univ s m (quadraticTargetBudget m D A P*δ^2) + (fun x => (χ x)^2 • RealModes.quadraticAmplitude τ φ Z l x) := by + let C := 4 * 2^m * ((1+2^m*P)*A)^2 + intro τ s δ φ Z hφ hZ hτ hs hτs hs1 hδ hA hP hb hp l + have hquad : WeightedBound univ s m (δ^2*C) (RealModes.quadraticAmplitude τ φ Z l) := + RealModes.scaled_quadraticAmplitude_bound isOpen_univ (fun a => (hφ a).contDiffOn) + (fun a => (hZ a).contDiffOn) hτ hs hτs hδ hA hP m hb hp l + have hcs : ContDiffOn ℝ ∞ (fun x => ((χ x * χ x : ℝ) : ℂ)) univ := + Complex.ofRealCLM.contDiff.comp_contDiffOn (χ.contDiff.contDiffOn.mul χ.contDiff.contDiffOn) + have hqs : ContDiffOn ℝ ∞ (RealModes.quadraticAmplitude τ φ Z l) univ := + (RealModes.quadraticAmplitude_smooth hφ hZ τ l).contDiffOn + have hout : WeightedBound univ s m (2^m*D*(δ^2*C)) + (fun x => ((χ x * χ x : ℝ) : ℂ) • RealModes.quadraticAmplitude τ φ Z l x) := + SmallModes.weighted_smul_field isOpen_univ.uniqueDiffOn hs hD + (by dsimp [C]; positivity) hcs hqs (hd s hs hs1) hquad + have he : (fun x => (χ x)^2 • RealModes.quadraticAmplitude τ φ Z l x) = + (fun x => ((χ x * χ x : ℝ) : ℂ) • RealModes.quadraticAmplitude τ φ Z l x) := by + funext x j + rw [Pi.smul_apply,Pi.smul_apply,pow_two] + rfl + rw [he] + convert hout using 1 + dsimp [quadraticTargetBudget,C] + ring + +lemma quadraticTargetBudget_polynomial (m : ℕ) (D A P : ℝ → ℝ) + (hD : RealModes.HasPolynomialBound D) (hA : RealModes.HasPolynomialBound A) + (hP : RealModes.HasPolynomialBound P) : + RealModes.HasPolynomialBound (fun x => quadraticTargetBudget m (D x) (A x) (P x)) := by + unfold quadraticTargetBudget + repeat first + | exact hD + | exact hA + | exact hP + | apply RealModes.HasPolynomialBound.add + | apply RealModes.HasPolynomialBound.mul + | apply RealModes.HasPolynomialBound.pow + | (apply RealModes.polynomialBound_const; positivity) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargets.lean new file mode 100644 index 0000000000000000000000000000000000000000..21a3378f15ddbc74c77594314c00d1bb1f4dfab8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTargets.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticFamily + +namespace OAI + +/-! Smooth supported tensor targets for every polynomial quadratic phase. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma quadraticFamilyPhase_smooth {ι : Type*} {φ : ι → Base → ℝ} + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (l : RealModes.QuadraticLabel ι) : + ContDiff ℝ ∞ (quadraticFamilyPhase φ l) := by + rcases l with i | ⟨i,j,b⟩ + · exact (contDiff_const (c := (2 : ℝ))).mul (hφ i) + · cases b + · exact (hφ i).add (hφ j) + · exact (hφ i).sub (hφ j) + +lemma quadraticFamilyCoefficient_smooth {n : ℕ} {ι : Type*} + {P : Fin n → Expression} {U : Set Base} {O : Set LowJet} + (hO : IsOpen O) (hP : ∀ j, (P j).SmoothCoeffs O) {G : Base → Space} + {φ : ι → Base → ℝ} {H : ι → Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) (hQ : Set.MapsTo (lowJet G) U O) + (ε τ t : ℝ) (l : RealModes.QuadraticLabel ι) : + ContDiffOn ℝ ∞ (quadraticFamilyCoefficient P ε G φ H τ t l) U := by + rcases l with i | ⟨i,j,b⟩ + · exact quadraticPhaseCoefficient_smooth hO hP hG (hφ i) (hφ i) (hH i) (hH i) hQ ε τ t + · cases b + · exact quadraticPhaseCoefficient_smooth hO hP hG (hφ i) (hφ j) (hH i) (hH j) hQ ε τ t + · exact quadraticPhaseCoefficient_smooth hO hP hG (hφ i) (hφ j).neg + (hH i) (starField_smooth (hH j)) hQ ε τ t + +def quadraticFamilyTensor {n : ℕ} {ι : Type*} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) + (l : RealModes.QuadraticLabel ι) : Base → Fin 3 → ℂ := + fun x k => quadraticFamilyCoefficient (P k) ε G φ H τ t l x + +lemma quadraticFamilyTensor_tsupport {n : ℕ} {ι : Type*} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) + {S : ι → Set Base} (hS : ∀ i, IsClosed (S i)) (hH : ∀ i, tsupport (H i) ⊆ S i) + (l : RealModes.QuadraticLabel ι) : + tsupport (quadraticFamilyTensor P ε G φ H τ t l) ⊆ quadraticFamilySupport S l := by + have hclosed : IsClosed (quadraticFamilySupport S l) := by + rcases l with i | ⟨i,j,b⟩ + · exact hS i + · exact (hS i).inter (hS j) + apply closure_minimal _ hclosed + intro x hx + by_contra hn + apply hx + funext k + change quadraticFamilyCoefficient (P k) ε G φ H τ t l x = 0 + exact image_eq_zero_of_notMem_tsupport (fun hp => hn + (quadraticFamilyCoefficient_tsupport (P k) ε G φ H τ t hH l hp)) + +def polynomialQuadraticTarget {n : ℕ} {ι : Type*} + {P : Fin 3 → Fin n → Expression} {U : Set Base} {O : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hP : ∀ k j, (P k j).SmoothCoeffs O) + {G : Base → Space} {φ : ι → Base → ℝ} {H : ι → Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) + (hH : ∀ i, ContDiff ℝ ∞ (H i)) (hQ : Set.MapsTo (lowJet G) U O) + {S : ι → Set Base} (hS : ∀ i, IsClosed (S i)) (hHS : ∀ i, tsupport (H i) ⊆ S i) + (l : RealModes.QuadraticLabel ι) (C : Compacts Base) (hCU : (C : Set Base) ⊆ U) + (hSC : quadraticFamilySupport S l ⊆ C) (ε τ t : ℝ) : + SupportedField (F := Fin 3 → ℂ) C := + let ht := (quadraticFamilyTensor_tsupport P ε G φ H τ t hS hHS l).trans hSC + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset hU (ht.trans hCU) + (contDiffOn_pi.mpr fun k => quadraticFamilyCoefficient_smooth hO (hP k) hG hφ hH hQ ε τ t l)) + (subset_closure.trans ht) + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTensorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTensorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ade489d96fc6fda7a15bd69eaeb99ae436a4752 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadraticTensorBounds.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialQuadraticFamilyBounds +import OAI.Geometry.SurfaceImmersion.Geometry.TensorPerturbationOperator + +namespace OAI + +/-! The three tensor components use a common derivative order and a common +short-scale exponent, independently of the number of correction steps. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +theorem 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 τ ε C : ℝ), + 0 < τ → 0 < s → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 < C → + 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) C (H i)) → + (∀ i v, WeightedBound U s (m + tensorOrder P) F + (fun p => fderiv ℝ (φ i) p (coordinateVector v))) → + ∀ (l : RealModes.QuadraticLabel ι), ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C ^ 2 / τ ^ tensorLoss P) + (quadraticFamilyTensor P ε G φ H τ t l) := by + have hex (k : Fin 3) := quadraticFamilyCoefficient_bound (ι := ι) + hU hO hQ hQO (P k) (hP k) m B F hB hF + choose E hE he using hex + let E₀ := ∑ k, E k + have hE₀ : 0 ≤ E₀ := Finset.sum_nonneg (fun k _ => hE k) + refine ⟨E₀, hE₀, ?_⟩ + intro G φ H s τ ε C hτ hs hτs hs1 hε hε1 hC hG hφ hH hGQ hGb hHb hφb l t ht + apply WeightedBound.pi hU.uniqueDiffOn hs (by positivity) + · intro k + exact quadraticFamilyCoefficient_smooth hO (hP k) hG hφ hH + (fun _ hp => hQO (hGQ hp)) ε τ t l + · intro k + have hord : order (P k) ≤ tensorOrder P := + Finset.le_sup (f := fun j => order (P j)) (Finset.mem_univ k) + have hloss : 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 hτ hs hτs hs1 hε hε1 hC hG hφ hH hGQ + (hGb.mono_order (Nat.add_le_add_left hord m)) + (fun i => (hHb i).mono_order (Nat.add_le_add_left hord m)) + (fun i v => (hφb i v).mono_order (Nat.add_le_add_left hord m)) l t ht + apply hb.mono_const + calc + _ ≤ E k * ε * C ^ 2 / τ ^ tensorLoss P := + div_le_div_of_nonneg_left (mul_nonneg (mul_nonneg (hE k) hε) (sq_nonneg C)) (pow_pos hτ _) + (pow_le_pow_of_le_one hτ.le (hτs.trans hs1) hloss) + _ ≤ _ := by + apply div_le_div_of_nonneg_right _ (pow_nonneg hτ.le _) + 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/Correction/PolynomialQuadrature.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadrature.lean new file mode 100644 index 0000000000000000000000000000000000000000..f4f3ec4b5bacd8a67433dd768a4d98377c719c9e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialQuadrature.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanPair +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion + +namespace OAI + +/-! The polynomial Hessian has the same two-quadrature zero-mode identity +as the metric Hessian. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets + +lemma complexJet_const_smul {H : Base → Fin 4 → ℂ} + (hH : ContDiff ℝ ∞ H) (c : ℂ) : + complexJet (fun p => c • H p) = c • complexJet H := by + funext w a p + exact congrFun (directional_clm (c • ContinuousLinearMap.id ℝ ℂ) + (contDiff_pi.mp hH a) (w.map coordinateVector)) p + +lemma starDirectionJets_const_smul (J : DirectionJets) (c : ℂ) : + starDirectionJets (c • J) = star c • starDirectionJets J := by + funext w a p + simp only [starDirectionJets,Pi.smul_apply,smul_eq_mul,star_mul'] + +lemma half_second_variation_quadrature (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 + + (1 / 2 : ℝ) * (e.variations 1).eval + ![G,realField (fun p => Complex.I • H p),realField (fun p => Complex.I • H p),0] z = + 2 * (quadraticComplex e G (complexJet H) + (starDirectionJets (complexJet H)) z).re / 4 := by + have hI : ContDiff ℝ ∞ (fun p => Complex.I • H p) := + (contDiff_const (c := Complex.I)).smul hH + rw [half_second_variation_real e G hH,half_second_variation_real e G hI, + complexJet_const_smul hH,starDirectionJets_const_smul, + quadraticComplex_smul_left,quadraticComplex_smul_right, + quadraticComplex_smul_left,quadraticComplex_smul_right] + simp only [Complex.star_def,Complex.conj_I] + simp only [← mul_assoc,Complex.I_mul_I,neg_mul,mul_neg,neg_neg,one_mul, + Complex.neg_re] + ring + +namespace Perturbation + +lemma polynomial_quadrature_sum {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) {φ : Base → ℝ} {H : Base → Fin 4 → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hH : ContDiff ℝ ∞ H) (τ t : ℝ) (x : Base) : + (∑ l, ε^(l.val+1) * ((1/2 : ℝ) * ((P l).variations 1).eval + ![G,realField (fun p => phase τ φ p • H p),realField (fun p => phase τ φ p • H p),0] (x,t))) + + (∑ l, ε^(l.val+1) * ((1/2 : ℝ) * ((P l).variations 1).eval + ![G,realField (fun p => phase τ φ p • (Complex.I • H p)), + realField (fun p => phase τ φ p • (Complex.I • H p)),0] (x,t))) = + 2 * quadraticMeanCoefficient P ε G φ H τ t x := by + rw [← quadraticMeanPair_self P ε G hφ hH] + unfold quadraticMeanPair + rw [← Finset.sum_add_distrib,Finset.mul_sum] + apply Finset.sum_congr rfl + intro l _ + have he : (fun p => phase τ φ p • (Complex.I • H p)) = + fun p => Complex.I • (phase τ φ p • H p) := by + funext p + exact smul_comm _ _ _ + rw [he,← mul_add] + rw [half_second_variation_quadrature (P l) G + (H := fun p => phase τ φ p • H p) ((phase_smooth hφ τ).smul hH)] + ring + +lemma real_mode_coordinates (τ : ℝ) (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) : + realField (fun p => phase τ φ p • H p) = + QuadraticMean.displacement τ (coordinatePhase φ) (coordinateAmplitude H) ∘ + planeCoordinateIsometry := by + funext x a + simp only [realField,QuadraticMean.displacement,QuadraticMean.realMode, + QuadraticMean.realPart,Function.comp_apply,coordinatePhase,coordinateAmplitude, + planeCoordinateIsometry.symm_apply_apply,Pi.smul_apply,smul_eq_mul,coordinate_phase_value] + +theorem coordinate_polynomial_quadrature {n : ℕ} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} {H : Base → Fin 4 → ℂ} + (hφ : ContDiff ℝ ∞ φ) (hH : ContDiff ℝ ∞ H) (τ t : ℝ) : + coordinateQuadraticPolynomial P ε G + (QuadraticMean.displacement τ (coordinatePhase φ) (coordinateAmplitude H)) t + + coordinateQuadraticPolynomial P ε G + (QuadraticMean.displacement τ (coordinatePhase φ) + (coordinateAmplitude (fun p => Complex.I • H p))) t = + (2 : ℝ) • (fun y k => quadraticMeanCoefficient (P k) ε G φ H τ t + (planeCoordinateIsometry.symm y)) := by + ext y k + have hh := polynomial_quadrature_sum (P k) ε G hφ hH τ t + (planeCoordinateIsometry.symm y) + simp only [real_mode_coordinates,coordinateQuadraticPolynomial,Pi.add_apply, + Pi.smul_apply,smul_eq_mul] at hh ⊢ + exact hh + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReadProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReadProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..20cd3d18aa2d379a35601c9880954d7c841376fc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReadProfiles.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadPrefixBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! Polynomial local jet profiles obtained from the fixed atlas norm. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open RealModes WeightedEstimates +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_plane_read_profiles (P : ℕ → ℝ → ℝ) + (hP : ∀ m, HasPolynomialBound (P m)) : + ∃ J : ℕ → ℝ → ℝ, (∀ m, HasPolynomialBound (J m)) ∧ + (∀ m x, 1 ≤ x → 1 ≤ J m x) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ s : ℝ, 0 < s → s ≤ 1 → (∀ m, A.ShiftedBound 2 m s (P m x) G) → + ∀ i m l, l ≤ m+3 → WeightedEstimates.WeightedBound univ 1 l + (J m x/s^(l-2)) (spaceCoordinates ∘ A.vectorPlaneRead i G) := by + classical + choose D hD hd using fun (i : A.centers) m => + A.vectorPlaneRead_prefix_bounds (V := Space) i 2 (m+1) + let L := ‖spaceCoordinates.toContinuousLinearMap‖ + have hL : 0 ≤ L := norm_nonneg _ + let J := fun m x => 1+∑ i : A.centers, L*D i m*P (m+1) x + have hterms (m : ℕ) (x : ℝ) (hx : 1 ≤ x) (i : A.centers) : + 0 ≤ L*D i m*P (m+1) x := mul_nonneg (mul_nonneg hL (hD i m)) ((hP _).nonneg hx) + refine ⟨J,?_,?_,?_⟩ + · intro m + exact (polynomialBound_const zero_le_one).add + (HasPolynomialBound.sum Finset.univ (fun i x => L*D i m*P (m+1) x) + (fun i _ => (polynomialBound_const (mul_nonneg hL (hD i m))).mul (hP _))) + · intro m x hx + have hh := Finset.sum_nonneg (s := Finset.univ) (fun i _ => hterms m x hx i) + change 1 ≤ 1+∑ i : A.centers, L*D i m*P (m+1) x + linarith + · intro x hx G hG s hs hs1 hb i m l hl + have hread := hd i m G s (P (m+1) x) hs hs1 ((hP _).nonneg hx) hG (hb (m+1)) l (by omega) + have hr := hread.linear uniqueDiffOn_univ zero_le_one + (A.vectorPlaneRead_smooth i hG).contDiffOn spaceCoordinates.toContinuousLinearMap + change WeightedEstimates.WeightedBound univ 1 l + (L*(D i m*P (m+1) x/s^(l-2))) (spaceCoordinates ∘ A.vectorPlaneRead i G) at hr + apply hr.mono_const + rw [← mul_div_assoc] + apply div_le_div_of_nonneg_right _ (pow_nonneg hs.le _) + have hh := Finset.single_le_sum (s := Finset.univ) + (fun i _ => hterms m x hx i) (Finset.mem_univ i) + change L*(D i m*P (m+1) x) ≤ 1+∑ i : A.centers, L*D i m*P (m+1) x + nlinarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRealReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRealReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..9cebb8e021702f7dd0054f613682147367a5e271 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRealReconstruction.lean @@ -0,0 +1,126 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialDualBounds + +namespace OAI + +/-! A common polynomial bound for every real reconstruction coefficient. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def normalRatioBudget (m : ℕ) (C K : ℝ) := + 2^m*dotBudget m C*((m.factorial : ℝ)^2*K^(m+1)*(1+dotBudget m C)^m) + +def reconstructionBudget (m : ℕ) (C K : ℝ) := + 1+liftBudget m C K+normalBudget m C K+tangentDualBudget m C K+ + normalDualBudget m (normalBudget m C K) K+normalRatioBudget m (normalBudget m C K) K + +lemma reconstructionBudget_bounds (m : ℕ) {C K : ℝ} (hC : 0 ≤ C) (hK : 0 ≤ K) : + 1 ≤ reconstructionBudget m C K ∧ + liftBudget m C K ≤ reconstructionBudget m C K ∧ + normalBudget m C K ≤ reconstructionBudget m C K ∧ + tangentDualBudget m C K ≤ reconstructionBudget m C K ∧ + normalDualBudget m (normalBudget m C K) K ≤ reconstructionBudget m C K ∧ + normalRatioBudget m (normalBudget m C K) K ≤ reconstructionBudget m C K := by + have hl := liftBudget_nonneg m hC hK + have hn : 0 ≤ normalBudget m C K := by unfold normalBudget; positivity + have hi := inverseGramBudget_nonneg m hC hK + have hd := dotBudget_nonneg m hC + have hdn := dotBudget_nonneg m hn + have ht : 0 ≤ tangentDualBudget m C K := by unfold tangentDualBudget; positivity + have hnd : 0 ≤ normalDualBudget m (normalBudget m C K) K := by unfold normalDualBudget; positivity + have hnr : 0 ≤ normalRatioBudget m (normalBudget m C K) K := by unfold normalRatioBudget; positivity + unfold reconstructionBudget + constructor + · linarith + constructor + · linarith + constructor + · linarith + constructor + · linarith + constructor <;> linarith + +/-- The two inverse bounds concern the Gram determinant and the squared +length of the transverse second fundamental form. All derivatives are +estimated by explicit polynomials in these bounds and the two-jet bound. -/ +theorem weighted_realJet_coefficients {U : Set E} (hU : UniqueDiffOn ℝ U) + {J : E → RealTwoJet} (hJ : ContDiff ℝ ∞ J) {s C K : ℝ} {m : ℕ} + (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) (bJ : WeightedBound U s m C J) + (hD : ∀ x ∈ U, NormalFrame.gramDet (J x 0) (J x 1) ≠ 0) + (hN : ∀ x ∈ U, realJetNormal (J x) 4 ≠ 0) + (hGD : ∀ x ∈ U, ‖(NormalFrame.gramDet (J x 0) (J x 1))⁻¹‖ ≤ K) + (hGN : ∀ x ∈ U, ‖(realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4)⁻¹‖ ≤ K) : + (∀ i, WeightedBound U s m (reconstructionBudget m C K) (fun x => realScalarCoefficients (J x) i)) ∧ + (∀ i, WeightedBound U s m (reconstructionBudget m C K) (fun x => realVectorCoefficients (J x) i)) := by + have hC0 := zero_le_one.trans hC + have hK0 := zero_le_one.trans hK + have hJs (i : Fin 5) : ContDiff ℝ ∞ (fun x => J x i) := contDiff_pi.mp hJ i + have bj (i : Fin 5) := bJ.component hU hs.le hC0 hJ.contDiffOn i + have bc (i : Fin 5) := weighted_realConnections hU hs hC hK + (hJs 0).contDiffOn (hJs 1).contDiffOn (hJs i).contDiffOn (bj 0) (bj 1) (bj i) hD hGD + have bN (i : Fin 5) : WeightedBound U s m (normalBudget m C K) (fun x => realJetNormal (J x) i) := + weighted_realNormalPart hU hs hC hK (hJs 0).contDiffOn (hJs 1).contDiffOn + (hJs i).contDiffOn (bj 0) (bj 1) (bj i) hD hGD + have hNs (i : Fin 5) : ContDiffOn ℝ ∞ (fun x => realJetNormal (J x) i) U := by + intro x hx + exact (contDiffAt_realNormalPart (hJs 0).contDiffAt (hJs 1).contDiffAt + (hJs i).contDiffAt (hD x hx)).contDiffWithinAt + have hn0 : 0 ≤ normalBudget m C K := by + have hh := liftBudget_nonneg m hC0 hK0 + unfold normalBudget + positivity + have hd0 := dotBudget_nonneg m hn0 + have hpos : ∀ x ∈ U, 0 < realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4 := by + intro x hx + have hh : 0 ≤ realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4 := + Finset.sum_nonneg (fun i _ => mul_self_nonneg _) + exact hh.lt_of_ne' ((dotProduct_self_eq_zero).not.mpr (hN x hx)) + have hplain : ∀ x ∈ U, (realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4)⁻¹ ≤ K := + fun x hx => (le_abs_self _).trans (hGN x hx) + have hsq := contDiffOn_dot_real (hNs 4) (hNs 4) + have bsq : WeightedBound U s m (1+dotBudget m (normalBudget m C K)) + (fun x => realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4) := + ((bN 4).dot_real hU hs.le hn0 hn0 (hNs 4) (hNs 4) (bN 4)).mono_const (by + change dotBudget m (normalBudget m C K) ≤ _ + linarith) + have binv := bsq.inv_real hU hs (by linarith : 1 ≤ 1+dotBudget m (normalBudget m C K)) + hK hsq (fun x hx => (hpos x hx).ne') hGN + have hsqi := hsq.inv (fun x hx => (hpos x hx).ne') + have hbi : 0 ≤ (m.factorial : ℝ)^2*K^(m+1)*(1+dotBudget m (normalBudget m C K))^m := by positivity + have bratio (i : Fin 5) : WeightedBound U s m (normalRatioBudget m (normalBudget m C K) K) + (fun x => (realJetNormal (J x) i ⬝ᵥ realJetNormal (J x) 4)/ + (realJetNormal (J x) 4 ⬝ᵥ realJetNormal (J x) 4)) := by + have hh := ((bN i).dot_real hU hs.le hn0 hn0 (hNs i) (hNs 4) (bN 4)).mul_real + hU hs.le hd0 hbi (contDiffOn_dot_real (hNs i) (hNs 4)) hsqi binv + exact hh.congr (fun x hx => div_eq_mul_inv _ _) + have bduals := weighted_realTangentDuals hU hs hC hK (hJs 0).contDiffOn (hJs 1).contDiffOn + (bj 0) (bj 1) hD hGD + have bnormal := weighted_vector_over_norm_sq hU hs hn0 hK (hNs 4) (bN 4) hpos hplain + obtain ⟨_,hbl,hbn,hbt,hbnd,hbnr⟩ := reconstructionBudget_bounds m hC0 hK0 + constructor + · intro i + fin_cases i + · exact (bc 2).1.mono_const hbl + · exact (bc 2).2.mono_const hbl + · exact (bc 3).1.mono_const hbl + · exact (bc 3).2.mono_const hbl + · exact (bc 4).1.mono_const hbl + · exact (bc 4).2.mono_const hbl + · exact (bratio 2).mono_const hbnr + · exact (bratio 3).mono_const hbnr + · intro i + fin_cases i + · exact (bN 2).mono_const hbn + · exact (bN 3).mono_const hbn + · exact bduals.1.mono_const hbt + · exact bduals.2.mono_const hbt + · exact bnormal.mono_const hbnd + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReconstruction.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReconstruction.lean new file mode 100644 index 0000000000000000000000000000000000000000..8554afc498b5a114bb622063ad4beeaec4655abe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialReconstruction.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialRealReconstruction + +namespace OAI + +/-! Quantitative reconstruction bounds for the actual complexified surface +map, derived from real two-jet and inverse denominator bounds. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.SmallModes +open RealModes WeightedEstimates + +theorem polynomial_reconstruction_bound {U : Set Base} {F : RField 4} + (hF : ContDiff ℝ ∞ F) (hU : RealModeDomain F U) {s C K : ℝ} {m : ℕ} + (hs : 0 < s) (hC : 1 ≤ C) (hK : 1 ≤ K) + (hb : WeightedBound U s m C (realTwoJet F)) + (hGD : ∀ x ∈ U, ‖(NormalFrame.gramDet (coordDeriv dx F x) (coordDeriv dy F x))⁻¹‖ ≤ K) + (hGN : ∀ x ∈ U, ‖(realSecond F x ⬝ᵥ realSecond F x)⁻¹‖ ≤ K) : + ReconstructionCoefficientBound (fun p => complexify (F p)) U s m (reconstructionBudget m C K) := by + let J := realTwoJet F + have hJ : ContDiff ℝ ∞ J := contDiff_realTwoJet hF + have hJn : ∀ x ∈ U, realJetNormal (J x) 4 ≠ 0 := hU.good + obtain ⟨hscalar,hvector⟩ := weighted_realJet_coefficients hU.isOpen.uniqueDiffOn + hJ hs hC hK hb hU.determinant hJn hGD hGN + have hmap : MapsTo (complexifyJetCLM ∘ J) U admissibleComplexJets := + fun x hx => complexifyJet_mem (hU.determinant x hx) (hU.good x hx) + have hcoeff := admissibleComplexJets_domain.smoothCoefficients.comp + (complexifyJetCLM.contDiff.comp hJ).contDiffOn hmap + have hsc (i : Fin 8) : ContDiffOn ℝ ∞ (fun x => realScalarCoefficients (J x) i) U := by + have hh := Complex.reCLM.contDiff.comp_contDiffOn (contDiffOn_pi.mp hcoeff (Sum.inl i)) + apply hh.congr + intro x hx + change realScalarCoefficients (J x) i = (LowJet.scalarCoefficients (complexifyJetCLM (J x)) i).re + rw [scalarCoefficients_complexify,Complex.ofReal_re] + have hvc (i : Fin 5) : ContDiffOn ℝ ∞ (fun x => realVectorCoefficients (J x) i) U := by + apply contDiffOn_pi.mpr + intro a + have hh := Complex.reCLM.contDiff.comp_contDiffOn (contDiffOn_pi.mp hcoeff (Sum.inr (i,a))) + apply hh.congr + intro x hx + change realVectorCoefficients (J x) i a = (LowJet.vectorCoefficients (complexifyJetCLM (J x)) i a).re + rw [vectorCoefficients_complexify,Complex.ofReal_re] + have hcs (i : Fin 8) : WeightedBound U s m (reconstructionBudget m C K) + (fun p => LowJet.scalarCoefficients (twoJet (fun p => complexify (F p)) p) i) := by + have hh := weighted_linearIsometry hU.isOpen.uniqueDiffOn (hsc i) (hscalar i) Complex.ofRealLI + apply hh.congr + intro p hp + change LowJet.scalarCoefficients (twoJet (fun p => complexify (F p)) p) i = + (realScalarCoefficients (J p) i : ℂ) + rw [show twoJet (fun p => complexify (F p)) p = complexifyJetCLM (J p) from + congrFun (twoJet_complexify hF) p] + exact scalarCoefficients_complexify (J p) i + have hcv (i : Fin 5) : WeightedBound U s m (reconstructionBudget m C K) + (fun p => LowJet.vectorCoefficients (twoJet (fun p => complexify (F p)) p) i) := by + have hh := weighted_linearIsometry hU.isOpen.uniqueDiffOn (hvc i) (hvector i) (complexifyLI 4) + apply hh.congr + intro p hp + change LowJet.vectorCoefficients (twoJet (fun p => complexify (F p)) p) i = + complexify (realVectorCoefficients (J p) i) + rw [show twoJet (fun p => complexify (F p)) p = complexifyJetCLM (J p) from + congrFun (twoJet_complexify hF) p] + ext a + exact vectorCoefficients_complexify (J p) i a + exact ⟨⟨⟨hcs 0,hcs 1,hcs 2,hcs 3,hcs 4,hcs 5,hcs 6,hcs 7⟩,hcv 0,hcv 1⟩, + hcv 2,hcv 3,hcv 4⟩ + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRootBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRootBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..f02ce5067c2c0bbacbf837ea3607ffd2fc99c6c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRootBounds.lean @@ -0,0 +1,99 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedInverseSqrt +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedRealAlgebra +import OAI.Geometry.Immersion.ClosedSurface.RootMean + +namespace OAI + +/-! Explicit square-root and square-root-difference bounds from a reciprocal +positivity margin, without a compact-set derivative constant. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RootMean +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def sqrtBudget (m : ℕ) (D B : ℝ) : ℝ := + 2^m*B*((m.factorial : ℝ)*D*B^(m+1)*B^m) + +def rootDifferenceBudget (m : ℕ) (D B : ℝ) : ℝ := + 2^m*((m.factorial : ℝ)^2*B^(m+1)*(1+2*sqrtBudget m D B)^m) + +lemma sqrtBudget_nonneg (m : ℕ) {D B : ℝ} (hD : 0 ≤ D) (hB : 0 ≤ B) : + 0 ≤ sqrtBudget m D B := by unfold sqrtBudget; positivity + +lemma inverse_sqrt_le {x B : ℝ} (hx : 0 < x) (hB : 1 ≤ B) (hi : x⁻¹ ≤ B) : + (Real.sqrt x)⁻¹ ≤ B := by + have hh := inverse_half_power_bound hx hB hi (j := 0) (m := 0) (Nat.le_refl 0) + have he : x^(-1/2 : ℝ) = (Real.sqrt x)⁻¹ := by + rw [Real.sqrt_eq_rpow,show (-1/2 : ℝ) = -(1/2) by ring,Real.rpow_neg hx.le] + simpa only [Nat.cast_zero,Nat.zero_add,sub_zero,pow_one,he] using hh + +theorem polynomial_sqrt_bound (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ {U : Set E}, UniqueDiffOn ℝ U → + ∀ {s B : ℝ} {f : E → ℝ}, 0 < s → 1 ≤ B → + ContDiffOn ℝ ∞ f U → (∀ x ∈ U, 0 < f x) → + (∀ x ∈ U, (f x)⁻¹ ≤ B) → WeightedBound U s m B f → + WeightedBound U s m (sqrtBudget m D B) (fun x => Real.sqrt (f x)) := by + obtain ⟨D,hD,hbound⟩ := weighted_inverse_sqrt (E := E) m + refine ⟨D,hD,?_⟩ + intro U hU s B f hs hB hf hp hi hb + have hr := hf.sqrt (fun x hx => (hp x hx).ne') + have hi' := hr.inv (fun x hx => (Real.sqrt_pos.mpr (hp x hx)).ne') + have hh := hb.mul_real hU hs.le (zero_le_one.trans hB) (by positivity) + hf hi' (hbound hU hs hB hB hf hp hi hb) + apply hh.congr + intro x hx + change Real.sqrt (f x) = f x*(Real.sqrt (f x))⁻¹ + rw [← div_eq_mul_inv,eq_div_iff (Real.sqrt_pos.mpr (hp x hx)).ne'] + exact Real.mul_self_sqrt (hp x hx).le + +theorem polynomial_root_bounds (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ {U : Set E}, UniqueDiffOn ℝ U → + ∀ {s B A : ℝ} {f g : E → ℝ}, 0 < s → 1 ≤ B → 0 ≤ A → + ContDiffOn ℝ ∞ f U → ContDiffOn ℝ ∞ g U → + (∀ x ∈ U, 0 < f x) → (∀ x ∈ U, 0 < g x) → + (∀ x ∈ U, (f x)⁻¹ ≤ B) → (∀ x ∈ U, (g x)⁻¹ ≤ B) → + WeightedBound U s m B f → WeightedBound U s m B g → + WeightedBound U s m A (f-g) → + WeightedBound U s m (sqrtBudget m D B) (fun x => Real.sqrt (f x)) ∧ + WeightedBound U s m (sqrtBudget m D B) (fun x => Real.sqrt (g x)) ∧ + WeightedBound U s m (rootDifferenceBudget m D B*A) + (fun x => Real.sqrt (f x)-Real.sqrt (g x)) := by + obtain ⟨D,hD,hr⟩ := polynomial_sqrt_bound (E := E) m + refine ⟨D,hD,?_⟩ + intro U hU s B A f g hs hB hA hf hg hfp hgp hfi hgi hfb hgb hdiff + have hrf := hf.sqrt (fun x hx => (hfp x hx).ne') + have hrg := hg.sqrt (fun x hx => (hgp x hx).ne') + have bF := hr hU hs hB hf hfp hfi hfb + have bG := hr hU hs hB hg hgp hgi hgb + have hS : 0 ≤ sqrtBudget m D B := sqrtBudget_nonneg m (zero_le_one.trans hD) (zero_le_one.trans hB) + have hsum := bF.add hU hs.le hrf hrg bG + have hsum' : WeightedBound U s m (1+2*sqrtBudget m D B) + (fun x => Real.sqrt (f x)+Real.sqrt (g x)) := hsum.mono_const (by linarith) + have hpos (x : E) (hx : x ∈ U) : 0 < Real.sqrt (f x)+Real.sqrt (g x) := + add_pos (Real.sqrt_pos.mpr (hfp x hx)) (Real.sqrt_pos.mpr (hgp x hx)) + have hinv (x : E) (hx : x ∈ U) : + ‖(Real.sqrt (f x)+Real.sqrt (g x))⁻¹‖ ≤ B := by + rw [Real.norm_eq_abs,abs_of_pos (inv_pos.mpr (hpos x hx))] + exact ((inv_le_inv₀ (hpos x hx) (Real.sqrt_pos.mpr (hfp x hx))).mpr + (le_add_of_nonneg_right (Real.sqrt_nonneg _))).trans (inverse_sqrt_le (hfp x hx) hB (hfi x hx)) + have bInv := hsum'.inv_real hU hs (by linarith) hB (hrf.add hrg) + (fun x hx => (hpos x hx).ne') hinv + have hsmoothInv := (hrf.add hrg).inv (fun x hx => (hpos x hx).ne') + have hh := hdiff.mul_real hU hs.le hA (by positivity) (hf.sub hg) hsmoothInv bInv + refine ⟨bF,bG,?_⟩ + have hh' : WeightedBound U s m (rootDifferenceBudget m D B*A) + (fun x => (f x-g x)*(Real.sqrt (f x)+Real.sqrt (g x))⁻¹) := by + convert hh using 1 + unfold rootDifferenceBudget + ring + apply hh'.congr + intro x hx + exact sqrt_difference (hfp x hx) (hgp x hx) + +end ClosedSurfaceR4.RootMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRotationFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRotationFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..be51efa804315a29d840e1fd439246e99b8b82e7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialRotationFrame.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalPlaneFrame + +namespace OAI + +/-! Polynomial rotation columns from a three-coordinate quaternion. +They fill a twice-winding planar frame by allowing its first column to move. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +abbrev FrameTarget := Fin 3 → ℝ + +def rotationFirst (a b c : ℝ) : FrameTarget := + ![a^2+b^2-c^2,2*b*c,-2*a*c] +def rotationSecond (a b c : ℝ) : FrameTarget := + ![2*b*c,a^2-b^2+c^2,2*a*b] +def polynomialRotationFrame (a b c : ℝ) : Base →L[ℝ] FrameTarget := + (ContinuousLinearMap.proj 0).smulRight (rotationFirst a b c) + + (ContinuousLinearMap.proj 1).smulRight (rotationSecond a b c) + +lemma polynomialRotationFrame_apply (a b c : ℝ) (v : Base) : + polynomialRotationFrame a b c v = + v 0 • rotationFirst a b c + v 1 • rotationSecond a b c := by + rfl + +lemma rotationFirst_sq (a b c : ℝ) : + (rotationFirst a b c 0)^2+(rotationFirst a b c 1)^2+ + (rotationFirst a b c 2)^2 = (a^2+b^2+c^2)^2 := by + dsimp [rotationFirst] + ring +lemma rotationSecond_sq (a b c : ℝ) : + (rotationSecond a b c 0)^2+(rotationSecond a b c 1)^2+ + (rotationSecond a b c 2)^2 = (a^2+b^2+c^2)^2 := by + dsimp [rotationSecond] + ring +lemma rotation_columns_orthogonal (a b c : ℝ) : + rotationFirst a b c 0 * rotationSecond a b c 0+ + rotationFirst a b c 1 * rotationSecond a b c 1+ + rotationFirst a b c 2 * rotationSecond a b c 2 = 0 := by + dsimp [rotationFirst,rotationSecond] + ring + +lemma polynomialRotationFrame_injective {a b c : ℝ} (hq : 0 < a^2+b^2+c^2) : + Function.Injective (polynomialRotationFrame a b c) := by + intro u v huv + have he (i : Fin 3) : + (u 0-v 0)*rotationFirst a b c i+(u 1-v 1)*rotationSecond a b c i = 0 := by + have hi := congrFun huv i + simp only [polynomialRotationFrame_apply,Pi.add_apply,Pi.smul_apply,smul_eq_mul] at hi + linear_combination hi + have hd0 : (u 0-v 0)*(a^2+b^2+c^2)^2 = 0 := by + rw [←rotationFirst_sq a b c] + linear_combination (rotationFirst a b c 0)*he 0+ + (rotationFirst a b c 1)*he 1+(rotationFirst a b c 2)*he 2- + (u 1-v 1)*rotation_columns_orthogonal a b c + have hd1 : (u 1-v 1)*(a^2+b^2+c^2)^2 = 0 := by + rw [←rotationSecond_sq a b c] + linear_combination (rotationSecond a b c 0)*he 0+ + (rotationSecond a b c 1)*he 1+(rotationSecond a b c 2)*he 2- + (u 0-v 0)*rotation_columns_orthogonal a b c + have hn : (a^2+b^2+c^2)^2 ≠ 0 := (sq_pos_of_pos hq).ne' + have h0 := sub_eq_zero.mp ((mul_eq_zero.mp hd0).resolve_right hn) + have h1 := sub_eq_zero.mp ((mul_eq_zero.mp hd1).resolve_right hn) + ext i + fin_cases i + · exact h0 + · exact h1 + +lemma polynomialRotationFrame_smooth : + ContDiff ℝ ∞ (fun q : FrameTarget => polynomialRotationFrame (q 0) (q 1) (q 2)) := by + have hu : ContDiff ℝ ∞ (fun q : FrameTarget => rotationFirst (q 0) (q 1) (q 2)) := by + apply contDiff_pi.mpr + intro i + fin_cases i <;> dsimp [rotationFirst] <;> fun_prop + have hv : ContDiff ℝ ∞ (fun q : FrameTarget => rotationSecond (q 0) (q 1) (q 2)) := 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 polynomialRotationFrame_boundary (a b : ℝ) : + polynomialRotationFrame a b 0 = + (ContinuousLinearMap.proj 0).smulRight (![a^2+b^2,0,0] : FrameTarget)+ + (ContinuousLinearMap.proj 1).smulRight (![0,a^2-b^2,2*a*b] : FrameTarget) := by + simp [polynomialRotationFrame,rotationFirst,rotationSecond] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialScaleSelection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialScaleSelection.lean new file mode 100644 index 0000000000000000000000000000000000000000..e7580e01c45ff2c6f38080d5159a2054bbb63e56 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialScaleSelection.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FixedOrderThreshold +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! Choose a single power of the geometric parameter for the finitely many +smallness conditions in the initial correction block. The exponent is +chosen before the multiplicative constants. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.ExactCorrection + +lemma polynomial_scale_smallness {p q μ C d : ℝ} + (hq : 0 < q) (hμ : 2*p < μ*q) (hC : 0 ≤ C) (hd : 0 < d) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ z t : ℝ, 0 < z → z < η → + 0 < t → t ≤ z^μ → C*z^(-p)*t^q < d*z^p := by + obtain ⟨η,hη,hη1,hsmall⟩ := positive_power_threshold C (μ*q-2*p) d + (by linarith) hd + refine ⟨η,hη,hη1,?_⟩ + intro z t hz hzη ht htz + have hpow : t^q ≤ (z^μ)^q := Real.rpow_le_rpow ht.le htz hq.le + have he : z^(-p)*(z^μ)^q = z^(μ*q-2*p)*z^p := by + rw [← Real.rpow_mul hz.le,← Real.rpow_add hz,← Real.rpow_add hz] + congr 1 + ring + calc + C*z^(-p)*t^q ≤ C*z^(-p)*(z^μ)^q := + mul_le_mul_of_nonneg_left hpow (mul_nonneg hC (Real.rpow_nonneg hz.le _)) + _ = (C*z^(μ*q-2*p))*z^p := by rw [mul_assoc,he]; ring + _ < d*z^p := mul_lt_mul_of_pos_right (hsmall z hz hzη) (Real.rpow_pos_of_pos hz _) + +/-- The first correction block uses finitely many strict positive powers +of its scale. Polynomial geometric losses determine an exponent; the +numerical bounds determine only the final parameter threshold. -/ +theorem finite_polynomial_scale_selection {ι : Type*} [Fintype ι] + (p q : ι → ℝ) (hq : ∀ i, 0 < q i) : + ∃ μ : ℝ, 1 < μ ∧ ∀ C d : ι → ℝ, (∀ i, 0 ≤ C i) → (∀ i, 0 < d i) → + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ ∀ z t : ℝ, 0 < z → z < η → + 0 < t → t ≤ z^μ → ∀ i, C i*z^(-p i)*t^(q i) < d i*z^(p i) := by + classical + let μ := 2+∑ i, max (2*p i/q i) 0 + have hsum : 0 ≤ ∑ i, max (2*p i/q i) 0 := + Finset.sum_nonneg (fun i _ => le_max_right _ _) + have hμ : 1 < μ := by change 1 < 2+∑ i, max (2*p i/q i) 0; linarith + have hμq (i : ι) : 2*p i < μ*q i := by + have hs := Finset.single_le_sum (fun j _ => le_max_right (2*p j/q j) 0) (Finset.mem_univ i) + have hi : 2*p i/q i < μ := by + change 2*p i/q i < 2+∑ i, max (2*p i/q i) 0 + linarith [le_max_left (2*p i/q i) 0] + exact (div_lt_iff₀ (hq i)).mp hi + refine ⟨μ,hμ,?_⟩ + intro C d hC hd + choose η hη hη1 hsmall using fun i => polynomial_scale_smallness (hq i) (hμq i) (hC i) (hd i) + obtain ⟨η₀,hη₀,hη₀1,hall⟩ := finite_positive_threshold η hη + refine ⟨η₀,hη₀,hη₀1,?_⟩ + intro z t hz hzη ht htz i + exact hsmall i z t hz (hzη.trans_le (hall i)) ht htz + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSlowFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSlowFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..741e8399d9ebda1091f468e5f2785ddc862cabdc --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSlowFamily.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.SurfaceImmersion.Correction.MetricPolynomialSlowStep +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveSeedBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveInitialFamily + +namespace OAI + +/-! The finite family solving the perturbed mean equation to successively +higher amplitude orders. Every member is an actual smooth map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PrimitiveRealization +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Uniform profiles for the nearby smooth maps at one finite stage. -/ +def HasPolynomialSlowFamily {n : A.centers → ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (γ : ∀ x : M, CovariantTwoTensor x) (F : M → Space) (d b : ℝ) : Prop := + ∃ (a u η L : ℝ) (P D : ℕ → ℝ), 0 < a ∧ 0 < u ∧ 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ + (∀ m, 0 ≤ P m) ∧ (∀ m, 0 ≤ D m) ∧ + (∀ m, A.ShiftedBound 2 m 1 (P m) F) ∧ + ∀ z : ℝ, 0 < z → z < η → ∃ G : M → Space, + ContMDiff planeModel spaceModel ∞ G ∧ + A.WeightedBound 1 3 (L*z^u) (G-F) ∧ + (∀ m, A.ShiftedBound 2 m (z^b) (P m) G) ∧ + (∀ m, A.TensorWeightedBound (z^b) m (D m*z^a) + (A.normalizedPolynomialDefect Pol z (z^d) γ G)) + +lemma polynomial_slow_seed {n : A.centers → ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) : + A.HasPolynomialSlowFamily Pol (inducedTensor F) F (1/4) 0 := by + classical + obtain ⟨U,K,hU,hUK,_,houter⟩ := A.exists_outer_domains + obtain ⟨L,D,hL,hD,hseed⟩ := A.atlas_primitive_seed_defect_bounds Pol hPol F hF U hU K hUK houter + choose P hP hPF using fun m => A.exists_shifted_bound 2 m hF + refine ⟨1/2,1/2,1,L 3,P,D,by norm_num,by norm_num,zero_lt_one,le_rfl, + hL 3,hP,hD,hPF,?_⟩ + 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.le (by norm_num) + obtain ⟨hclose,hdefect⟩ := hseed (z^(1/4 : ℝ)) z hδ.ne' hδ1 hz.le hz1.le + have hsqrt : |Real.sqrt (1-(z^(1/4 : ℝ))^2)| ≤ 1 := by + rw [abs_of_nonneg (Real.sqrt_nonneg _)] + nlinarith [Real.sq_sqrt (sub_nonneg.mpr hδ1),Real.sqrt_nonneg (1-(z^(1/4 : ℝ))^2)] + refine ⟨Real.sqrt (1-(z^(1/4 : ℝ))^2) • F,space_smul_contMDiff hF _,?_,?_,?_⟩ + · simpa only [initial_amplitude_square hz] using hclose 3 + · intro m + simpa only [Real.rpow_zero] using + A.shiftedBound_smul_of_abs_le_one hF zero_le_one (hP m) hsqrt (hPF m) + · intro m + have he : D m*z/(z^(1/4 : ℝ))^2 = D m*z^(1/2 : ℝ) := by + rw [mul_div_assoc,initial_error_quotient hz] + simpa only [Real.rpow_zero,he] using hdefect m + +end SmoothingAtlas + +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The number of stages and the loss determine the slow scales before any +accuracy order. This finite induction uses only constructed increments. -/ +theorem polynomial_finite_slow_family (data : MetricGoodPhaseData g F) + {n : data.A.centers → ℕ} + (Pol : ∀ i : data.A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (hF : ContMDiff planeModel spaceModel ∞ F) (hmetric : g.inner = inducedTensor F) + (steps : ℕ) (hsteps : 1 ≤ steps) (σmax : ℝ) (hσmax : 0 < σmax) : + ∃ σ : ℝ, 0 < σ ∧ σ < 1/16 ∧ σ < σmax ∧ ∀ j : ℕ, j ≤ steps → + data.A.HasPolynomialSlowFamily Pol g.inner F (amplitudeExponent j) (scaleExponent σ steps j) := by + obtain ⟨loss,hstep⟩ := data.polynomial_slow_step Pol hPol hF + obtain ⟨σ₀,hσ₀,_,_,hσ₀loss,hσ₀16,_⟩ := exists_slow_exponent 0 0 1 (by norm_num) (loss : ℝ) 0 + let σ := min σ₀ (σmax/2) + have hσ : 0 < σ := lt_min hσ₀ (half_pos hσmax) + have hσ16 : σ < 1/16 := (min_le_left _ _).trans_lt hσ₀16 + have hσσmax : σ < σmax := (min_le_right _ _).trans_lt (half_lt_self hσmax) + have hσloss : σ*(loss : ℝ) < 1/2 := (mul_le_mul_of_nonneg_right + (min_le_left σ₀ (σmax/2)) (Nat.cast_nonneg loss : (0 : ℝ) ≤ loss)).trans_lt hσ₀loss + refine ⟨σ,hσ,hσ16,hσσmax,?_⟩ + intro j hj + induction j with + | zero => + simpa only [amplitudeExponent_zero,scaleExponent,Nat.cast_zero,zero_mul,zero_div,hmetric] using + data.A.polynomial_slow_seed Pol hPol F hF + | succ j ih => + have hjlt : j < steps := by omega + obtain ⟨a,u,η,L,P,D,ha,hu,hη,hη1,hL,hP,hD,hPF,hfamily⟩ := ih (by omega) + have hb := (scaleExponent_bounds hσ hsteps (by omega : j ≤ steps)).1 + have hb' := (scaleExponent_bounds hσ hsteps (by omega : j+1 ≤ steps)).2 + have hscale : scaleExponent σ steps j < scaleExponent σ steps (j+1) := by + have hdiff := scaleExponent_step (σ := σ) (steps := steps) (j := j) + have hd : 0 < σ/(steps : ℝ) := div_pos hσ (by exact_mod_cast (by omega : 0 < steps)) + linarith + have hloss : scaleExponent σ steps (j+1)*(loss : ℝ) < 1 := by + have hh := mul_le_mul_of_nonneg_right hb' (Nat.cast_nonneg loss : (0 : ℝ) ≤ loss) + linarith + have hpositives := slow_step_positive_powers hσ hσ16 hsteps hjlt + have hbd : 2*scaleExponent σ steps (j+1) < amplitudeExponent j := by + have hd := amplitudeExponent_lower j + linarith + have hdd : amplitudeExponent j < amplitudeExponent (j+1) := by + rw [amplitudeExponent_succ] + linarith [amplitudeExponent_pos j] + obtain ⟨a',η',L',P',D',ha',hη',hη'1,hL',hP',hD',hnext⟩ := + hstep (scaleExponent σ steps j) (scaleExponent σ steps (j+1)) + (amplitudeExponent j) (amplitudeExponent (j+1)) a u hb hscale hloss hbd hdd + (by linarith [hpositives.1]) ha hu P D L hP hD hL hPF + let R : ℕ → ℝ := fun m => max (P' m) (P m) + refine ⟨a',min u (amplitudeExponent j-2*scaleExponent σ steps (j+1)),min η η',L',R,D', + ha',lt_min hu (sub_pos.mpr hbd),lt_min hη hη', + (min_le_left _ _).trans hη1,hL',?_,hD',?_,?_⟩ + · intro m + exact (hP' m).trans (le_max_left _ _) + · intro m i k hk x + exact (hPF m i k hk x).trans (le_max_right _ _) + · intro z hz hzmin + obtain ⟨G,hG,hclose,hmap,hdefect⟩ := hfamily z hz (hzmin.trans_le (min_le_left _ _)) + obtain ⟨G',hG',hclose',hmap',hdefect'⟩ := hnext z hz + (hzmin.trans_le (min_le_right _ _)) G hG hclose hmap hdefect + refine ⟨G',hG',hclose',?_,hdefect'⟩ + intro m i k hk x + exact (hmap' m i k hk x).trans (le_max_left _ _) + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSmoothingProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSmoothingProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..d7ba109ddc838bad3120ea744b952a77cb921d5b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSmoothingProfiles.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformSmoothingInputProfiles +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanIteration + +namespace OAI + +/-! Polynomial bounds for smoothed inputs with a polynomial finite input budget. -/ +noncomputable section +open Set Manifold Bundle MeasureTheory +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates RealModes +local instance polySmoothingProfileFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polySmoothingProfileFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polySmoothingProfileDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polySmoothingProfileDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polySmoothingProfileSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polySmoothingProfileSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_smoothing_input_profiles (r : ℕ) (B : ℝ → ℝ) (hB : HasPolynomialBound B) : + ∃ P C : ℕ → ℝ → ℝ, + (∀ m, HasPolynomialBound (P m)) ∧ (∀ m, HasPolynomialBound (C m)) ∧ + (∀ m x, 1 ≤ x → 1 ≤ C m x) ∧ + ∀ x : ℝ, 1 ≤ x → + ∀ (G : M → Space) (H : ∀ y : M, CovariantTwoTensor y) (t s : ℝ), + 0 < t → t ≤ 1 → 0 < s → s ≤ 1 → + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (H y)) → + A.InputBound t r (B x) G H → + (∀ m, A.ShiftedBound 2 m s (P m x) (A.smooth r s G)) ∧ + (∀ m, A.TensorWeightedBound s m (C m x) (A.tensorSmooth r s H)) := by + classical + choose DG hDG hg using fun m => A.smoothing_shifted_gain (V := Space) r 2 m + choose DH hDH hh using fun m => A.tensor_smoothing_bounds r m + let U := fun m => DG m*((1+(1+∫ y, ‖kernel 0 y‖)^r)+weightedGainConstant r m) + let V := fun m => DH m*weightedGainConstant r m + have hker : 0 ≤ ∫ y, ‖kernel 0 y‖ := integral_nonneg (fun _ => norm_nonneg _) + have hU (m : ℕ) : 0 ≤ U m := by + have hd := hDG m + have hg := weightedGainConstant_nonneg r m + dsimp [U]; positivity + have hV (m : ℕ) : 0 ≤ V m := mul_nonneg (hDH m) (weightedGainConstant_nonneg r m) + let P := fun m x => U m*B x + let C := fun m x => 1+V m*B x + refine ⟨P,C,fun m => (polynomialBound_const (hU m)).mul hB, + fun m => (polynomialBound_const zero_le_one).add ((polynomialBound_const (hV m)).mul hB),?_,?_⟩ + · intro m x hx + have hh := mul_nonneg (hV m) (hB.nonneg hx) + dsimp [C]; linarith + · intro x hx G H t s _ht _ht1 hs hs1 hG hH hinput + have hb := hB.nonneg hx + have hprefix : A.ShiftedBound 2 0 1 (B x) G := by + intro i j hj y + have hj2 : j ≤ 2 := by omega + have hjr : j ≤ 2+r := by omega + simpa only [Nat.sub_eq_zero_of_le hj2,pow_zero,one_mul] using hinput.1 i j hjr y + refine ⟨fun m => hg m G s (B x) hs hs1 hb hG hprefix,?_⟩ + intro m i + have hzero : A.TensorWeightedBound t 0 (B x) H := + fun k => (hinput.2 k).mono_order (Nat.zero_le r) + apply (((hh m).2 H s t (B x) hs hs1 hb hH hzero) i).mono_const + change V m*B x ≤ 1+V m*B x + linarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveData.lean new file mode 100644 index 0000000000000000000000000000000000000000..521f181448b6d5e9cf4e77c071fc6b81a13d08d0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveData.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalChartedForcedMode + +namespace OAI + +/-! Geometric and quantitative data for the already constructed finite +polynomial phase solver. The operator bound here is supplied by +`phaseChartPolynomialOperator_bounds`; it concerns the actual transported +polynomial derivative. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +structure PolynomialSolveData {n : ℕ} (P : Fin 3 → Fin n → Expression) + (ε : ℝ) (G : Base → Space) (hG : ContDiff ℝ ∞ G) + (φ : Base → ℝ) (K : Compacts Base) (τ : ℝ) (s : ℝ≥0) where + U : Set Base + O : Set LowJet + openU : IsOpen U + openO : IsOpen O + smoothP : ∀ k l, (P k l).SmoothCoeffs O + mapsG : Set.MapsTo (lowJet G) U O + supportU : (K : Set Base) ⊆ U + smoothPhase : ContDiff ℝ ∞ φ + e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base + smoothForward : ContDiffOn ℝ ∞ e e.source + smoothInverse : ContDiffOn ℝ ∞ e.symm e.target + supportChart : (modeSupport K : Set SmallModes.Base) ⊆ e.source + phase : ∀ x ∈ e.source, (e x).1 = coordinatePhase φ x + smoothMap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) + domain : SmallModes.ModeDomain (fun p => RealModes.complexify + (G (planeCoordinateIsometry.symm (e.symm p)))) e.target + C : ℕ → ℝ + D : ℕ → ℝ + J : ℕ → ℝ + nonnegC : ∀ m, 0 ≤ C m + nonnegD : ∀ m, 0 ≤ D m + oneLEJ : ∀ m, 1 ≤ J m + coordinates : ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ e.source, + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m + coefficients : ∀ m, SmallModes.ReconstructionCoefficientBound + (fun p => RealModes.complexify (G (planeCoordinateIsometry.symm (e.symm p)))) + e.target s (m + 1) (C m) + polynomial : ∀ m Z, supportedWeightedSeminorm (chartSupport e (modeSupport K) supportChart) s m + (phaseChartPolynomialOperator openO openU P smoothP hG mapsG K supportU smoothPhase + τ ε e smoothForward smoothInverse supportChart Z) ≤ + ε / τ ^ tensorLoss P * D m * supportedWeightedSeminorm + (chartSupport e (modeSupport K) supportChart) s (m + tensorOrder P) Z + +namespace PolynomialSolveData +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P ε G hG φ K τ s) + +def norm (f : SupportedField (F := ComplexTensor) (modeSupport K)) (m : ℕ) : ℝ := + supportedWeightedSeminorm (chartSupport c.e (modeSupport K) c.supportChart) s m + (tensorChartPush c.e c.smoothInverse (modeSupport K) c.supportChart f) + +def κ (m : ℕ) : ℝ := max (SmallModes.errorConstant m (c.C m)) + (c.D m * SmallModes.initialConstant 4 (m + tensorOrder P) (c.C (m + tensorOrder P))) + +def size (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q m : ℕ) : ℝ := + (m.factorial : ℝ) * (2 ^ m * (SmallModes.forcedModeBudget 4 (tensorOrder P) c.C c.D q m * + c.norm f (m + (q + 1) * (tensorOrder P + 1)))) * c.J m ^ m + +def residual (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q m : ℕ) : ℝ := + tensorChartBudget m (c.J m) (c.J (m + 1)) * + (2 ^ m * ((τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + FiniteParametrix.boundProfile (tensorOrder P + 1) c.κ + (fun r => c.κ r * c.norm f (r + (tensorOrder P + 1))) q m)) + +theorem exists_solution (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) + (hε : 0 ≤ ε) (hsmall : τ / s + ε / τ ^ tensorLoss P ≤ 1) + (f : SupportedField (F := ComplexTensor) (modeSupport K)) (q : ℕ) : + ∃ X : RealModes.RField 4, ContDiff ℝ ∞ X ∧ tsupport X ⊆ (modeSupport K : Set SmallModes.Base) ∧ + (∀ m, WeightedBound Set.univ τ m (c.size f q m) X) ∧ + (∀ m, WeightedBound Set.univ τ m (c.residual f q m) + (fun x => coordinateFullLinearized P ε G X x + QuadraticMean.displacement τ (coordinatePhase φ) f x)) := by + exact global_charted_forced_mode c.openO c.openU P c.smoothP hG c.mapsG K c.supportU + c.smoothPhase τ ε c.e c.smoothForward c.smoothInverse c.supportChart c.phase c.smoothMap c.domain + hτ hs hτs hs1 hε hsmall c.C c.D c.J c.nonnegC c.nonnegD c.oneLEJ c.coordinates c.coefficients c.polynomial f q + +end PolynomialSolveData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveFactors.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveFactors.lean new file mode 100644 index 0000000000000000000000000000000000000000..f658cda1704326133369227d3ab80924a0f8d030 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSolveFactors.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialSolveData +import OAI.Geometry.SurfaceImmersion.Primitive.FiniteProfileBounds + +namespace OAI + +/-! Separate the finite input norm and the small residual power from the +geometric solver constants. The input order is explicit. -/ +noncomputable section +open scoped NNReal ContDiff +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.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) + +def inputOrder (q m : ℕ) : ℕ := m + (q + 1) * (tensorOrder P + 1) + +def sizeFactor (q m : ℕ) : ℝ := + (m.factorial : ℝ) * 2 ^ m * SmallModes.forcedModeBudget 4 (tensorOrder P) c.C c.D q m * c.J m ^ m + +def residualFactor (q m : ℕ) : ℝ := + tensorChartBudget m (c.J m) (c.J (m + 1)) * 2 ^ m * + FiniteParametrix.boundProfile (tensorOrder P + 1) c.κ c.κ q m + +lemma sizeFactor_nonneg (q m : ℕ) : 0 ≤ c.sizeFactor q m := by + have hj : 0 ≤ c.J m := zero_le_one.trans (c.oneLEJ m) + exact mul_nonneg (mul_nonneg (by positivity) + (SmallModes.forcedModeBudget_nonneg 4 (tensorOrder P) c.C c.D c.nonnegC q m)) (pow_nonneg hj _) + +lemma κ_nonneg (m : ℕ) : 0 ≤ c.κ m := + (SmallModes.errorConstant_nonneg m (c.nonnegC m)).trans (le_max_left _ _) + +lemma residualFactor_nonneg (q m : ℕ) : 0 ≤ c.residualFactor q m := by + exact mul_nonneg (mul_nonneg (tensorChartBudget_nonneg m + (zero_le_one.trans (c.oneLEJ m)) (zero_le_one.trans (c.oneLEJ (m + 1)))) (by positivity)) + (FiniteParametrix.boundProfile_nonneg c.κ_nonneg c.κ_nonneg q m) + +lemma size_eq_factor (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) : + c.size f q m = c.sizeFactor q m * c.norm f (inputOrder (P := P) q m) := by + unfold size sizeFactor inputOrder + ring + +lemma residual_eq_factor (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) : + c.residual f q m = (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * + c.residualFactor q m * c.norm f (inputOrder (P := P) q m) := by + unfold residual residualFactor inputOrder + rw [FiniteParametrix.boundProfile_terminal] + ring + +lemma size_le_scaled {a A : ℝ} (_ha : 0 ≤ a) + (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) + (hb : c.norm f (inputOrder (P := P) q m) ≤ a * A) : + c.size f q m ≤ a * (c.sizeFactor q m * A) := by + rw [c.size_eq_factor] + calc + _ ≤ c.sizeFactor q m * (a * A) := mul_le_mul_of_nonneg_left hb (c.sizeFactor_nonneg q m) + _ = _ := by ring + +lemma residual_le_scaled {a A : ℝ} (hη : 0 ≤ τ / s + ε / τ ^ tensorLoss P) + (f : SupportedField (F := PhaseMean.ComplexTensor) (modeSupport K)) (q m : ℕ) + (hb : c.norm f (inputOrder (P := P) q m) ≤ a * A) : + c.residual f q m ≤ a * (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * (c.residualFactor q m * A) := by + rw [c.residual_eq_factor] + calc + _ ≤ (τ / s + ε / τ ^ tensorLoss P) ^ (q + 1) * c.residualFactor q m * (a * A) := + mul_le_mul_of_nonneg_left hb (mul_nonneg (pow_nonneg hη _) (c.residualFactor_nonneg q m)) + _ = _ := by ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSplitBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSplitBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..c3f1a5987d5ef77a989ca062b54171d5afc96a25 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSplitBudgets.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ExplicitSplitCancellation +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra + +namespace OAI + +/-! The explicit finite-chart constants have polynomial dependence on the +coordinate and splitting profiles. -/ +noncomputable section +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation RealModes + +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 splitInputBudget_polynomial (q m : ℕ) (I S : ℕ → ℝ → ℝ) + (hI : ∀ j, HasPolynomialBound (I j)) (hS : ∀ j, HasPolynomialBound (S j)) : + HasPolynomialBound (fun x => splitInputBudget q m (fun j => I j x) (fun j => S j x)) := by + unfold splitInputBudget + exact (tensorChartBudget_polynomial _ _ _ (hI _) (hI _)).mul (hS _) + +lemma splitSizeBudget_polynomial (q m : ℕ) (C J I S : ℕ → ℝ → ℝ) + (hC : ∀ j, HasPolynomialBound (C j)) (hJ : ∀ j, HasPolynomialBound (J j)) + (hI : ∀ j, HasPolynomialBound (I j)) (hS : ∀ j, HasPolynomialBound (S j)) + (hC1 : ∀ j x, 1 ≤ x → 1 ≤ C j x) : + HasPolynomialBound (fun x => splitSizeBudget q m + (fun j => C j x) (fun j => J j x) (fun j => I j x) (fun j => S j x)) := by + exact ((polynomialBound_const zero_le_one).max + (metricForcedSizeBudget_polynomial C J (fun _ _ => 1) hC hJ + (fun _ => polynomialBound_const zero_le_one) hC1 q m)).mul + (splitInputBudget_polynomial q m I S hI hS) + +lemma splitResidualBudget_polynomial (q m : ℕ) (C J I S : ℕ → ℝ → ℝ) + (hC : ∀ j, HasPolynomialBound (C j)) (hJ : ∀ j, HasPolynomialBound (J j)) + (hI : ∀ j, HasPolynomialBound (I j)) (hS : ∀ j, HasPolynomialBound (S j)) + (hC1 : ∀ j x, 1 ≤ x → 1 ≤ C j x) : + HasPolynomialBound (fun x => splitResidualBudget q m + (fun j => C j x) (fun j => J j x) (fun j => I j x) (fun j => S j x)) := by + exact ((polynomialBound_const zero_le_one).max + (metricForcedResidualBudget_polynomial C J (fun _ _ => 1) hC hJ + (fun _ => polynomialBound_const zero_le_one) hC1 q m)).mul + (splitInputBudget_polynomial q m I S hI hS) + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..e239505966ac9617b95d0ec6025596675b7d4e42 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedMeanData.lean @@ -0,0 +1,151 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLinearSolver +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLinearMeanData +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseCutoffBounds +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseDenominatorNeighborhood + +namespace OAI + +/-! Supported linear-phase mean data with numerical budgets chosen before +its phase domain. The domain is constructed from the actual denominator +bounds on the support. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean RealModes PhaseGeometry + +private lemma linear_phase_derivative (ξ x : SmallModes.Base) : + phaseDerivative (phaseLinear ξ) x = ξ := by + unfold phaseDerivative + rw [(phaseLinear ξ).hasFDerivAt.fderiv] + ext <;> simp [phaseLinear_apply,SmallModes.dx,SmallModes.dy] + +theorem polynomial_supported_linear_mean_data : + ∃ (p p' : ℕ → ℕ) (C C' : ℕ → ℝ), (∀ m, 1 ≤ C m) ∧ (∀ m, 1 ≤ C' m) ∧ + ∀ {G : Base → Space} (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + {W : Set SmallModes.Base} (_hW : IsOpen W) + (_hKW : (modeSupport K : Set SmallModes.Base) ⊆ W) + {U₀ : Set Base} (_hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (_hU₀K : U₀ ⊆ K₀) (_hKU₀ : (K : Set Base) ⊆ U₀) + {D : ℝ} (_hD : 0 < D), + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x)) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) ξ) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ D) → + (∀ x ∈ (modeSupport K : Set SmallModes.Base), + ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-ξ.2,ξ.1)‖⁻¹ ≤ D) → + ∀ (Q : Tensor →L[ℝ] ℝ) {r ρ R : ℝ} {reference : SmallModes.Base → Tensor}, + (∀ x ∈ W, ρ+‖Q‖*r ≤ Q (reference x) ∧ Q (reference x) ≤ R-‖Q‖*r) → + ∀ (τ : ℝ) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ B P : ℕ → ℝ, (∀ m, 1 ≤ B m) → (∀ m, 1 ≤ P m) → + (∀ m, 2*D ≤ B m ∧ ‖ξ‖ ≤ B m ∧ + ‖(phaseEquiv ξ hξ).symm.toContinuousLinearMap‖ ≤ B m ∧ ‖Q‖ ≤ B m) → + (∀ m j, j ≤ m+3 → WeightedBound univ 1 j (B m/(s : ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∀ f : SupportedField (F := ℝ) (modeSupport K), + (∀ m, WeightedBound univ s m (P m) f) → + ∃ (U : Set SmallModes.Base) (hU : IsOpen U), + ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG + (phaseLinear ξ ∘ planeCoordinateIsometry) K τ s, + ∃ d : ChartedMeanData c r ρ R reference, + c.e = linearPhaseChart ξ hξ U hU ∧ + (∀ m, c.C m = C m*(B m)^(p m)) ∧ (∀ m, c.J m = 1+2*B m) ∧ + (∀ m, c.D m = 0) ∧ + (∀ x ∈ c.e.source, d.cutoff (c.e x) = f x) ∧ d.form = (fun _ => Q) ∧ + ∀ m, let b := linearMeanGeometryBudget p' C' B (fun j => 1+phaseCutoffBudget j (P j) (B j) 1) m; + d.budgets.inv m ≤ b ∧ d.budgets.chi m ≤ b ∧ d.budgets.forms m ≤ b ∧ + d.budgets.pull m ≤ b ∧ d.budgets.psi m ≤ b ∧ d.budgets.normal m ≤ b ∧ + d.budgets.mode m ≤ b := by + obtain ⟨p,C,hC,hsolver⟩ := polynomial_linear_unperturbed_solver + obtain ⟨p',C',hC',hmean⟩ := polynomial_linear_charted_mean_data + refine ⟨p,p',C,C',hC,hC',?_⟩ + intro G hG K ξ hξ W hW hKW U₀ hU₀ K₀ hU₀K hKU₀ D hD hImm hgood hgram hnormal + Q r ρ R reference hmargin τ s hs hs1 B P hB hP hb hjets f hf + have hGc := hG.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨V,hV,hKV,hVdata⟩ := phase_denominator_neighborhood hGc + (phaseLinear ξ).contDiff (modeSupport K) hD hImm + (by simpa only [linear_phase_derivative] using hgood) hgram + (by simpa only [linear_phase_derivative] using hnormal) + let U := V ∩ W + have hU : IsOpen U := hV.inter hW + have hKU : (modeSupport K : Set SmallModes.Base) ⊆ U := fun x hx => ⟨hKV hx,hKW hx⟩ + have hdata (x : SmallModes.Base) (hx : x ∈ U) : + Function.Injective (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) x) ∧ + Good (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) ξ ∧ + ‖(NormalFrame.gramDet + (SmallModes.coordDeriv SmallModes.dx (G ∘ planeCoordinateIsometry.symm) x) + (SmallModes.coordDeriv SmallModes.dy (G ∘ planeCoordinateIsometry.symm) x))⁻¹‖ ≤ 2*D ∧ + ‖secondQuadratic (realSecondTensor (G ∘ planeCoordinateIsometry.symm) x) + (-ξ.2,ξ.1)‖⁻¹ ≤ 2*D := by + simpa only [linear_phase_derivative] using hVdata x hx.1 + have hphase : coordinatePhase (phaseLinear ξ ∘ planeCoordinateIsometry) = phaseLinear ξ := by + funext x + simp only [coordinatePhase,Function.comp_apply,LinearIsometryEquiv.apply_symm_apply] + have hsb (m : ℕ) := (hb m).1 + obtain ⟨c,hce,hcC,hcD,hcJ⟩ := hsolver hG K hU hξ + ((phaseLinear ξ).contDiff.comp planeCoordinateIsometry.contDiff) hphase hKU + (fun x hx => (hdata x hx).1) (fun x hx => (hdata x hx).2.1) τ s hs hs1 B hB + (fun m => ⟨(hb m).2.1,(hb m).2.2.1, + fun j hj => (hjets m j hj).restrict_open hU, + fun x hx => (hdata x hx).2.2.1.trans (hsb m), + fun x hx => (hdata x hx).2.2.2.trans (hsb m)⟩) + let e := linearPhaseChart ξ hξ U hU + let ψ : SupportedField (F := ℝ) c.chartCompact := + chartPush c.e c.smoothInverse (modeSupport K) c.supportChart f + have hψeq : (ψ : SmallModes.Base → ℝ) = + chartPush e (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn (modeSupport K) hKU f := by + funext x + simp only [ψ,chartPush_apply] + rw [hce] + rfl + let P' := fun m => 1+phaseCutoffBudget m (P m) (B m) 1 + have hP' (m : ℕ) : 1 ≤ P' m := by + apply le_add_of_nonneg_right + have hPm := zero_le_one.trans (hP m) + have hBm := zero_le_one.trans (hB m) + dsimp [phaseCutoffBudget] + positivity + have hψ (m : ℕ) : WeightedBound c.e.target s m (P' m) ψ := by + have hh := linear_phase_cutoff_bound hU hξ (modeSupport K) hKU hs hs1 + (zero_le_one.trans (hP m)) (hB m) (hb m).2.2.1 + (show |(1 : ℝ)⁻¹| ≤ 1 by norm_num) f (hf m) + simp only [inv_one,one_smul] at hh + have hh' : WeightedBound univ s m (phaseCutoffBudget m (P m) (B m) 1) ψ := by + exact hh.congr (fun x _ => congrFun hψeq x) + exact (hh'.mono_const (le_add_of_nonneg_left zero_le_one)).restrict_open c.e.open_target + have hpref (m j : ℕ) (hj : j ≤ m+2) : + WeightedBound U₀ 1 j (B m/(s : ℝ)^(j-2)) G := by + have hh := weightedBound_comp_isometry planeCoordinateIsometry hGc (hjets m j (by omega)) + have he : (G ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = G := by + funext x + simp only [Function.comp_apply,LinearIsometryEquiv.symm_apply_apply] + rw [he] at hh + exact hh.restrict_open hU₀ + obtain ⟨d,hdψ,hdQ,hbd⟩ := hmean c hU hξ hce hU₀ K₀ hU₀K hKU₀ hs hs1 ψ Q + (fun x hx => hmargin x hx.2) (fun x hx => (hdata x hx).1) + (fun x hx => (hdata x hx).2.1) B P' B hB hP' + (fun m => zero_le_one.trans (hB m)) + (fun m => ⟨(hb m).2.1,(hb m).2.2.1,(hb m).2.2.2, + fun j hj => (hjets m j (by omega)).restrict_open hU, + fun x hx => (hdata x hx).2.2.1.trans (hsb m), + fun x hx => (hdata x hx).2.2.2.trans (hsb m)⟩) hψ hpref + refine ⟨U,hU,c.onSourceDomain U₀ hU₀ hKU₀,d,hce,hcC,hcJ,fun _ => rfl,?_,hdQ,hbd⟩ + intro x hx + rw [hdψ] + have hx' : x ∈ e.source := by simpa only [PolynomialSolveData.onSourceDomain,hce,e] using hx + change ψ (c.e x) = f x + rw [hce,congrFun hψeq (e x)] + exact chartPush_eval_source e (linearPhaseChart_smooth ξ hξ U hU).2.contDiffOn + (modeSupport K) hKU f hx' + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedModeBudgets.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedModeBudgets.lean new file mode 100644 index 0000000000000000000000000000000000000000..130956bed7917f77ac5a5864d0713250cc26e1e6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialSupportedModeBudgets.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialModeBudgets +import OAI.Geometry.SurfaceImmersion.Geometry.CorrectedNormalSeed +import OAI.Geometry.SurfaceImmersion.Correction.UniformNormalizedMean + +namespace OAI + +/-! Polynomial control of the actual supported free-mode and normalized +mean constants, including their finite derivative-loss recurrences. -/ +noncomputable section +open scoped BigOperators +namespace ClosedSurfaceR4.SmallModes +open RealModes + +theorem freeModeBudget_polynomial (n L : ℕ) (B D : ℕ → ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q m : ℕ) : + HasPolynomialBound (fun x => freeModeBudget n L (fun r => B r x) (fun r => D r x) q m) := by + let κ := fun r x => max (errorConstant r (B r x)) + (D r x * initialConstant n (r+L) (B (r+L) x)) + let κ₀ := fun r x => max (fullErrorConstant n r (B r x)) + (D r x * initialConstant n (r+L) (B (r+L) x)) + have hκ (r : ℕ) : HasPolynomialBound (κ r) := + ((errorConstant_polynomial r).comp (hB r) (hB1 r)).max + ((hD r).mul ((initialConstant_polynomial n (r+L)).comp (hB (r+L)) (hB1 (r+L)))) + have hκ₀ (r : ℕ) : HasPolynomialBound (κ₀ r) := + ((fullErrorConstant_polynomial n r).comp (hB r) (hB1 r)).max + ((hD r).mul ((initialConstant_polynomial n (r+L)).comp (hB (r+L)) (hB1 (r+L)))) + have hi := (initialConstant_polynomial n m).comp (hB m) (hB1 m) + have hsum := HasPolynomialBound.sum (Finset.range q) + (fun i x => initialConstant n m (B m x)* + FiniteParametrix.boundProfile (L+1) (fun r => κ r x) (fun r => κ₀ r x) i (m+(L+1))) + (fun i _ => hi.mul (FiniteParametrix.boundProfile_polynomial (L+1) κ κ₀ hκ hκ₀ i (m+(L+1)))) + exact hsum.add ((amplitudeConstant_polynomial n m).comp (hB m) (hB1 m)) + +theorem freeMeanBudget_polynomial (n L : ℕ) (B D : ℕ → ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q m : ℕ) : + HasPolynomialBound (fun x => freeMeanBudget n L (fun r => B r x) (fun r => D r x) q m) := by + have hA := freeModeBudget_polynomial n L B D hB hD hB1 q (m+1) + have h2A := (polynomialBound_const (show (0 : ℝ) ≤ 2 by norm_num)).mul hA + have h1 := (polynomialBound_const zero_le_one).add h2A + have h2 := (polynomialBound_const (show (0 : ℝ) ≤ 2 by norm_num)).add h2A + exact ((polynomialBound_const (Nat.cast_nonneg n)).mul + (polynomialBound_const (show (0 : ℝ) ≤ 2^m by positivity))).mul ((h1.mul h2).add h1) + +end ClosedSurfaceR4.SmallModes + +namespace ClosedSurfaceR4.RealModes +open SmallModes + +theorem correctedSeedBudget_polynomial (L : ℕ) (B D : ℕ → ℝ → ℝ) (N : ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hN : HasPolynomialBound N) (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q m : ℕ) : + HasPolynomialBound (fun x => correctedSeedBudget L (fun r => B r x) (fun r => D r x) q m (N x)) := by + exact ((polynomialBound_const zero_le_one).add + (freeModeBudget_polynomial 4 L B D hB hD hB1 q m)).mul + (((polynomialBound_const (Real.sqrt_nonneg 2)).mul + (polynomialBound_const (show (0 : ℝ) ≤ 2^(m+(q+1)*(L+1)) by positivity))).mul hN) + +theorem normalizedMeanBudget_polynomial (L : ℕ) (B D : ℕ → ℝ → ℝ) (N : ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) (hD : ∀ m, HasPolynomialBound (D m)) + (hN : HasPolynomialBound N) (hB1 : ∀ m x, 1 ≤ x → 1 ≤ B m x) (q m : ℕ) : + HasPolynomialBound (fun x => normalizedMeanBudget L (fun r => B r x) (fun r => D r x) q m (N x)) := by + exact (freeMeanBudget_polynomial 4 L B D hB hD hB1 q m).mul + ((((polynomialBound_const (Real.sqrt_nonneg 2)).mul + (polynomialBound_const (show (0 : ℝ) ≤ 2^(m+1+(q+1)*(L+1)) by positivity))).mul hN).pow 2) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..dcb6c4ed9926a845a7730af152e6f5bc249f125f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorBounds.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialTaylorRemainder +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedMultilinearVariations + +namespace OAI + +/-! A fixed-power cubic remainder bound for the actual polynomial map. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open MixedExpression ParameterTaylor SmoothParameterIntegral WeightedEstimates + +/-- The third variation controls the nonlinear remainder, with an exponent +independent of the requested output derivative order. -/ +theorem compact_taylorRemainder_bound {U : Set Base} {Q : Set LowJet} + (hU : IsOpen U) (hQ : IsCompact Q) (e : Expression) (he : e.SmoothCoeffs Set.univ) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G H : Base → Space) (s C : ℝ), + 0 < s → s ≤ 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 + e.order) B + (lowJet (fun p => G p + t • H p))) → + WeightedBound U s (m + e.order) C H → + ∀ θ ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D * C ^ 3 / s ^ (e.loss + 6) / 2) (e.taylorRemainder G H θ) := by + obtain ⟨D, hD, hd⟩ := e.compact_multilinear_variation_bound hU isOpen_univ hQ + (Set.subset_univ Q) he m B hB + refine ⟨D, hD, ?_⟩ + intro G H s C hs hs1 hC hG hH hGQ hGb hHb θ hθ + apply weighted_taylorRemainder he hG hH θ hU hs + (show 0 ≤ D * C ^ 3 / s ^ (e.loss + 6) by positivity) m + intro j hj p hp t ht + let V := varyBase (diagonalFamily G H) H t + have hV : ∀ i, ContDiff ℝ ∞ (V i) := + varyBase_smooth (diagonalFamily_smooth hG hH) hH t + have hVQ : Set.MapsTo (lowJet (V 0)) U Q := hGQ t ht + have hVb : WeightedBound U s (m + e.order) B (lowJet (V 0)) := hGb t ht + have hdirs : ∀ i : Fin 3, WeightedBound U s (m + e.order) C (V i.succ) := by + intro i + simpa only [V, varyBase_other _ _ _ (Fin.succ_ne_zero i), diagonalFamily_succ] using hHb + have hv := hd V s (fun _ => C) hs hs1 (fun _ => hC) hV hVQ hVb hdirs θ hθ 2 + change WeightedBound U s m (D * (C * C * C) / s ^ (e.loss + 6)) + (fun p => (e.variations 2).eval V (p, θ)) at hv + have hcubic : D * (C * C * C) / s ^ (e.loss + 6) = D * C ^ 3 / s ^ (e.loss + 6) := by ring + rw [hcubic] at hv + have hval := hv j hj p hp + have hJ := eval_varyBase_joint_smooth (diagonalFamily_smooth hG hH) hH + (e.variations_smoothCoeffs isOpen_univ he 2) θ + have hslice := hJ.comp (contDiff_id.prodMk (contDiff_const (c := t))) + change ContDiff ℝ ∞ (fun p => (e.variations 2).eval V (p, θ)) at hslice + rw [iteratedFDerivWithin_eq_iteratedFDeriv hU.uniqueDiffOn + ((hslice.of_le (by simp : (j : ℕ∞ω) ≤ ∞)).contDiffAt) hp] at hval + exact hval + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorRemainder.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorRemainder.lean new file mode 100644 index 0000000000000000000000000000000000000000..75db9512cc6a859f84c269cf879d98186b3a6b96 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTaylorRemainder.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialDiagonalVariations + +namespace OAI + +/-! The weighted cubic estimate for the actual higher-jet polynomial map. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open MixedExpression ParameterTaylor SmoothParameterIntegral WeightedEstimates + +lemma affinePolynomial_apply (e : Expression) (G H : Base → Space) (θ : ℝ) (z : Base × ℝ) : + e.affinePolynomial G H θ z = e.eval (fun p => G p + z.2 • H p) (z.1, θ) := by + rw [affinePolynomial, ofExpression_eval, varyBase_base] + rfl + +def taylorRemainder (e : Expression) (G H : Base → Space) (θ : ℝ) (p : Base) : ℝ := + e.eval (fun q => G q + H q) (p, θ) - e.eval G (p, θ) - e.variation G H (p, θ) - + (1 / 2 : ℝ) * (e.variations 1).eval (diagonalFamily G H) (p, θ) + +lemma cubicRemainder_affine {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) : + cubicRemainder (e.affinePolynomial G H θ) = e.taylorRemainder G H θ := by + funext p + unfold cubicRemainder taylorRemainder + rw [affinePolynomial_first he hG hH, affinePolynomial_second he hG hH] + simp only [affinePolynomial_apply, one_smul, zero_smul, add_zero, varyBase_zero] + rw [e.first_variation_eval isOpen_univ he (diagonalFamily_smooth hG hH) (p, θ) (Set.mem_univ _)] + rfl + +theorem taylorRemainder_eq_integral {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) (p : Base) : + e.taylorRemainder G H θ p = + ∫ t in (0 : ℝ)..1, ((1 - t) ^ 2 / 2) * + (e.variations 2).eval (varyBase (diagonalFamily G H) H t) (p, θ) := by + rw [← cubicRemainder_affine he hG hH θ] + rw [cubicRemainder_eq_integral (affinePolynomial_smooth he hG hH θ), affinePolynomial_third he hG hH] + rfl + +theorem weighted_taylorRemainder {e : Expression} (he : e.SmoothCoeffs Set.univ) + {G H : Base → Space} (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) (θ : ℝ) + {U : Set Base} (hU : IsOpen U) {s M : ℝ} (hs : 0 < s) (hM : 0 ≤ M) (m : ℕ) + (hb : ∀ j ≤ m, ∀ p ∈ U, ∀ t ∈ Set.Icc (0 : ℝ) 1, + s ^ j * ‖partialIterated j + (fun z : Base × ℝ => (e.variations 2).eval (varyBase (diagonalFamily G H) H z.2) (z.1, θ)) + (p, t)‖ ≤ M) : + WeightedBound U s m (M / 2) (e.taylorRemainder G H θ) := by + rw [← cubicRemainder_affine he hG hH θ] + apply weighted_cubicRemainder (affinePolynomial_smooth he hG hH θ) hU hs hM m + simpa only [affinePolynomial_third he hG hH] using hb + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..bbee490bbcb85b1aeabf4ef2784d98e2576874e2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorMean.lean @@ -0,0 +1,94 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanThreshold + +namespace OAI + +/-! An explicit polynomial threshold for the actual global tensor iteration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean RealModes WeightedEstimates FiniteMean +open JetPolynomial (Base) +local instance polynomialTensorMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialTensorMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialTensorMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialTensorMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialTensorMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialTensorMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem polynomial_tensor_mean_threshold (L : ℕ) (p : ℕ → ℕ) (C : ℕ → ℝ) + (G H : ℕ → ℝ → ℝ) (hC : ∀ m, 0 ≤ C m) + (hG : ∀ m, HasPolynomialBound (G m)) (hH : ∀ m, HasPolynomialBound (H m)) (steps : ℕ) : + ∃ d : ℕ, ∃ E : ℝ, 1 ≤ E ∧ ∀ x : ℝ, 1 ≤ x → + ∀ {s : ℝ}, 0 < s → ∀ reference f : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (f y)) → + ∀ r₀ r : ℝ, r₀ < r → + (∀ y, ‖A.tensorEncode f y-A.tensorEncode reference y‖ ≤ r₀) → + (∀ m, 1 ≤ H m x) → (∀ m, A.TensorWeightedBound s m (H m x) f) → + ∀ η : ℝ, 0 < η → η ≤ min 1 ((r-r₀)/(2*(E*x^d))) → + ∀ T : (∀ y : M, CovariantTwoTensor y) → ∀ y : M, CovariantTwoTensor y, + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator T)) + (polynomialMeanProfile p C (fun m => G m x)) + (polynomialMeanProfile p C (fun m => G m x)) → + ∀ j ≤ steps, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (A.tensorMeanTrial f T j y)) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode (A.tensorMeanTrial f T j)) ∧ + (∀ m, A.TensorWeightedBound s m (polynomialMeanSize L p C G H j m x) + (A.tensorMeanTrial f T j)) ∧ + (∀ m, A.TensorWeightedBound s m (polynomialMeanDifference L p C G H j m x*η^(j+1)) + (A.tensorMeanTrial f T j+T (A.tensorMeanTrial f T j)-f)) := by + obtain ⟨d,E,hE,hvalue⟩ := polynomialMean_threshold_budget L p C G H hC hG hH steps + refine ⟨d,E,hE,?_⟩ + intro x hx s hs reference f hf r₀ r hgap hnear hH1 hbound η hη hsmall T hT j hj + have henc := A.tensorEncode_smooth hf + have hh := finite_substitution_with_threshold uniqueDiffOn_univ hs.le hgap hT hH1 henc.contDiffOn + (fun y _ => hnear y) + (fun m => A.tensorEncode_bound hf hs (zero_le_one.trans (hH1 m)) (hbound m)) steps + (mul_pos (zero_lt_one.trans_le hE) (pow_pos (zero_lt_one.trans_le hx) d)) (hvalue x hx) + obtain ⟨ha,hb,hc,hd⟩ := hh.2 η hη hsmall j hj + rw [trial_rescaledMean hη.ne'] at ha hb hc hd + rw [rescaledMean_self hη.ne'] at hd + have htrial : ContDiff ℝ ∞ (fixedTrial (A.tensorEncode f) (A.tensorMeanOperator T) j) := + contDiffOn_univ.mp ha + have hη1 : η ≤ 1 := hsmall.trans (min_le_left _ _) + have hmean : ContDiff ℝ ∞ (A.tensorMeanOperator T + (fixedTrial (A.tensorEncode f) (A.tensorMeanOperator T) j)) := by + have h := hT.smooth η hη hη1 _ ha hb + rw [rescaledMean_self hη.ne'] at h + exact contDiffOn_univ.mp h + have hres : ContDiff ℝ ∞ (A.tensorEncode + (A.tensorMeanTrial f T j+T (A.tensorMeanTrial f T j)-f)) := by + rw [A.tensorEncode_meanResidual] + exact (htrial.add hmean).sub henc + refine ⟨A.tensorDecode_smooth htrial,?_,?_,?_⟩ + · rw [A.tensorEncode_meanTrial] + exact hb + · intro m + apply A.tensorBound_of_encode (by rw [A.tensorEncode_meanTrial]; exact htrial) hs.le + (zero_le_one.trans (sizeBound_ge_one hH1 hT.B_pos j m)) + rw [A.tensorEncode_meanTrial] + exact hc m + · intro m + apply A.tensorBound_of_encode hres hs.le + (mul_nonneg (differenceBound_nonneg hH1 hT.B_pos hT.K_pos j m) (pow_nonneg hη.le _)) + rw [A.tensorEncode_meanResidual] + exact hd m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorReadBudget.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorReadBudget.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fb381bd71b0f2ae63876040b1e883ef88d9feb3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTensorReadBudget.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialBudgetAlgebra +import OAI.Geometry.SurfaceImmersion.Geometry.TensorDecodedBounds + +namespace OAI + + +/-! One polynomial profile for all actual grid amplitudes, before the variable family. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial PhaseMean RealModes +local instance polynomialTensorReadFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance polynomialTensorReadFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance polynomialTensorReadDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance polynomialTensorReadDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance polynomialTensorReadSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance polynomialTensorReadSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + +theorem polynomial_tensor_read_budget (B : ℕ → ℝ → ℝ) + (hB : ∀ m, HasPolynomialBound (B m)) : + ∃ R : ℕ → ℝ → ℝ, (∀ m, HasPolynomialBound (R m)) ∧ + (∀ m x, 1 ≤ x → 1 ≤ R m x ∧ B m x ≤ R m x) ∧ + ∀ x : ℝ, 1 ≤ x → ∀ s : ℝ, 0 < s → s ≤ 1 → + ∀ u : ∀ y : M, CovariantTwoTensor y, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun y => TotalSpace.mk' TensorFiber y (u y)) → + (∀ m, A.TensorWeightedBound s m (B m x) u) → + ∀ i m, WeightedEstimates.WeightedBound univ s m (R m x) (A.tensorPlaneRead i u) := by + classical + choose D hD hread using A.tensorPlaneRead_decode_bound + let R := fun m x => 1+B m x+D m*B m x + have hR (m : ℕ) : HasPolynomialBound (R m) := + ((polynomialBound_const zero_le_one).add (hB m)).add + ((polynomialBound_const (zero_le_one.trans (hD m))).mul (hB m)) + have hB0 (m : ℕ) (x : ℝ) (hx : 1 ≤ x) : 0 ≤ B m x := by + obtain ⟨_,_,_,hh⟩ := hB m + exact (hh x hx).1 + refine ⟨R,hR,?_,?_⟩ + · intro m x hx + have hb := hB0 m x hx + have hd := zero_le_one.trans (hD m) + dsimp [R] + constructor <;> nlinarith + · intro x hx s hs hs1 u hu hb i m + have he := A.tensorEncode_bound hu hs (hB0 m x hx) (hb m) + have hh := hread m i (A.tensorEncode u) s (B m x) hs hs1 (hB0 m x hx) + (A.tensorEncode_smooth hu) he + rw [A.tensorDecode_encode] at hh + apply hh.mono_const + dsimp [R] + linarith [hB0 m x hx] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTrialAmplitude.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTrialAmplitude.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca9496bc34c1d311422d51a04dd502b212e9f9f1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialTrialAmplitude.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialLocalAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanData + +namespace OAI + +/-! Polynomial bounds for the actual supported square-root trial amplitude. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes RootMean WeightedEstimates FiniteMean + + theorem polynomial_trial_amplitude_bounds (m : ℕ) : + ∃ p : ℕ, ∃ C : ℝ, 1 ≤ C ∧ + ∀ {n : ℕ} {P : Fin 3 → Fin n → Expression} {ε τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + {c : PolynomialSolveData P ε G hG φ K τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference), + ∀ hρ : 0 < ρ, 0 < (s : ℝ) → s ≤ 1 → ∀ B : ℝ, 1 ≤ B → ρ⁻¹ ≤ B → + d.budgets.inv m ≤ B → d.budgets.forms m ≤ B → d.budgets.psi m ≤ B → + ∀ (f g : SmallModes.Base → Tensor) (D : ℝ), 0 ≤ D → + ContDiffOn ℝ ∞ f c.e.source → ContDiffOn ℝ ∞ g c.e.source → + InTrialBall c.e.source reference r f → InTrialBall c.e.source reference r g → + WeightedBound c.e.source s m B f → WeightedBound c.e.source s m B g → + WeightedBound c.e.source s m D (f-g) → + supportedWeightedSeminorm c.chartCompact s m (d.amplitude hρ f) ≤ C*B^p ∧ + supportedWeightedSeminorm c.chartCompact s m (d.amplitude hρ g) ≤ C*B^p ∧ + supportedWeightedSeminorm c.chartCompact s m + (d.amplitude hρ f-d.amplitude hρ g) ≤ C*B^p*D := by + obtain ⟨p,C,hC,hamp⟩ := polynomial_local_amplitude_bounds m + refine ⟨p,C,hC,?_⟩ + intro n P ε τ G hG φ K s c r ρ R reference d hρ hs hs1 B hB hρB hi hf hp f g D hD + hfs hgs hfb hgb hbf hbg hdiff + obtain ⟨hu,hv,hd⟩ := hamp d.localBounds d.budgets hs hs1 hρ B hB hρB hi hf hp + f g D hD hfs hgs hfb hgb hbf hbg hdiff + have hef : (d.amplitude hρ f : SmallModes.Base → ℝ) = + phaseAmplitude d.cutoff (coefficient d.form c.e.symm f) := + funext (c.trialAmplitude_apply d.cutoff d.form d.localBounds hρ hfs hfb) + have heg : (d.amplitude hρ g : SmallModes.Base → ℝ) = + phaseAmplitude d.cutoff (coefficient d.form c.e.symm g) := + funext (c.trialAmplitude_apply d.cutoff d.form d.localBounds hρ hgs hgb) + have hC0 : 0 ≤ C*B^p := mul_nonneg (zero_le_one.trans hC) (pow_nonneg (zero_le_one.trans hB) _) + have hsp := chartSupport_subset c.e (modeSupport K) c.supportChart + have hb1 : WeightedBound c.e.target s m (C*B^p) (d.amplitude hρ f) := by + simpa only [hef] using hu + have hb2 : WeightedBound c.e.target s m (C*B^p) (d.amplitude hρ g) := by + simpa only [heg] using hv + have hb3 : WeightedBound c.e.target s m (C*B^p*D) (d.amplitude hρ f-d.amplitude hρ g) := by + change WeightedBound c.e.target s m _ (fun x => d.amplitude hρ f x-d.amplitude hρ g x) + simpa only [hef,heg] using hd + exact ⟨supportedSeminorm_le_of_weightedBound hs hC0 _ + (hb1.extend_support c.e.open_target ((d.amplitude hρ f).tsupport_subset.trans hsp) hC0), + supportedSeminorm_le_of_weightedBound hs hC0 _ + (hb2.extend_support c.e.open_target ((d.amplitude hρ g).tsupport_subset.trans hsp) hC0), + supportedSeminorm_le_of_weightedBound hs (mul_nonneg hC0 hD) _ + (hb3.extend_support c.e.open_target + ((d.amplitude hρ f-d.amplitude hρ g).tsupport_subset.trans hsp) (mul_nonneg hC0 hD))⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialUnitPerpBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialUnitPerpBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..84b838d46967c689292e3499a90a8c7ddbbaaa08 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialUnitPerpBounds.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerpBounds + +namespace OAI + +/-! Quantitative bounds for the actual unit perpendicular vector. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open WeightedEstimates +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The only denominator parameter is an upper bound for the reciprocal +squared length of the perpendicular product. -/ +theorem weighted_unitPerp (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ {U : Set E}, UniqueDiffOn ℝ U → + ∀ {s C K : ℝ} {X Y B : E → RVec 4}, 0 < s → 0 ≤ C → 1 ≤ K → + ContDiffOn ℝ ∞ X U → ContDiffOn ℝ ∞ Y U → ContDiffOn ℝ ∞ B U → + WeightedBound U s m C X → WeightedBound U s m C Y → WeightedBound U s m C B → + (∀ x ∈ U, 0 < NormalFrame.perpProduct (X x) (Y x) (B x) ⬝ᵥ + NormalFrame.perpProduct (X x) (Y x) (B x)) → + (∀ x ∈ U, (NormalFrame.perpProduct (X x) (Y x) (B x) ⬝ᵥ + NormalFrame.perpProduct (X x) (Y x) (B x))⁻¹ ≤ K) → + WeightedBound U s m + (2^m*((m.factorial : ℝ)*D*K^(m+1)*(1+dotBudget m (perpBudget m C))^m)*perpBudget m C) + (fun x => NormalFrame.unitPerp (X x) (Y x) (B x)) := by + obtain ⟨D,hD,hroot⟩ := weighted_inverse_sqrt (E := E) m + refine ⟨D,hD,?_⟩ + intro U hU s C K X Y B hs hC hK hX hY hB bX bY bB hpos hi + let P : E → RVec 4 := fun x => NormalFrame.perpProduct (X x) (Y x) (B x) + have hP : ContDiffOn ℝ ∞ P U := contDiffOn_perpProduct hX hY hB + have bP : WeightedBound U s m (perpBudget m C) P := + weighted_perpProduct hU hs hC hX hY hB bX bY bB + have hPn := perpBudget_nonneg m hC + have hS := contDiffOn_dot_real hP hP + have bS : WeightedBound U s m (1+dotBudget m (perpBudget m C)) (fun x => P x ⬝ᵥ P x) := + (bP.dot_real hU hs.le hPn hPn hP hP bP).mono_const (by + change dotBudget m (perpBudget m C) ≤ 1+dotBudget m (perpBudget m C) + linarith) + have hS1 : 1 ≤ 1+dotBudget m (perpBudget m C) := by + have hh := dotBudget_nonneg m hPn + linarith + have br := hroot hU hs hS1 hK hS hpos hi bS + have hrootSmooth := (hS.sqrt (fun x hx => (hpos x hx).ne')).inv + (fun x hx => (Real.sqrt_pos.mpr (hpos x hx)).ne') + exact br.smul_real_pi hU hs (by positivity) hPn hrootSmooth hP bP + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialValueBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialValueBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..7c364b5af51955ac4f45ba3a65f4649997f69cff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialValueBounds.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedPhaseExpressions +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIsometryBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationCalculus + +namespace OAI + +/-! Uniform evaluation bounds for the polynomial part of the actual mean +metric. The loss is fixed by P, before any accuracy order is chosen. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma coordinatePolynomialValue_smooth {n : ℕ} {P : Fin 3 → Fin n → Expression} + (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (ε : ℝ) : + ContDiff ℝ ∞ (coordinatePolynomialValue P ε G 0) := by + apply contDiff_pi.mpr + intro k + have hs : ContDiff ℝ ∞ (fun p : Base => eval (P k) ε G (p,0)) := by + have he : ContDiff ℝ ∞ (eval (P k) ε G) := contDiffOn_univ.mp (by + simpa only [Set.univ_prod_univ] using + (eval_smooth (U := Set.univ) (hP k) ε hG (fun _ _ => Set.mem_univ _))) + exact he.comp (contDiff_id.prodMk contDiff_const) + change ContDiff ℝ ∞ ((fun p : Base => eval (P k) ε G (p,0)) ∘ planeCoordinateIsometry.symm) + exact hs.comp planeCoordinateIsometry.symm.contDiff + +theorem coordinatePolynomialValue_bound {n : ℕ} {Q : Set LowJet} + (hQ : IsCompact Q) (P : Fin 3 → Fin n → Expression) + (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (U : Set Base), IsOpen U → + ∀ {G : Base → Space}, ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) U Q → + ∀ (s ε : ℝ), 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + WeightedBound U s (m + tensorOrder P) B (lowJet G) → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) s m + (D * ε / s ^ tensorLoss P) (coordinatePolynomialValue P ε G 0) := by + classical + choose D hD hd using fun k l => Expression.compact_phase_bound isOpen_univ hQ + (Set.subset_univ _) (P k l) (hP k l) m B 1 hB le_rfl + let E : ℝ := ∑ k, ∑ l, D k l + have hE : 0 ≤ E := Finset.sum_nonneg fun k _ => Finset.sum_nonneg fun l _ => hD k l + refine ⟨E,hE,?_⟩ + intro U hU G hG hGQ s ε hs hs1 hε hε1 hGb + have ho (k : Fin 3) (l : Fin n) : (P k l).order ≤ tensorOrder P := + (Finset.le_sup (f := fun l => (P k l).order) (Finset.mem_univ l)).trans + (Finset.le_sup (f := fun k => order (P k)) (Finset.mem_univ k)) + have hl (k : Fin 3) (l : Fin n) : (P k l).loss ≤ tensorLoss P := by + have h₁ := Finset.le_sup (f := fun l => (P k l).loss + 6) (Finset.mem_univ l) + change (P k l).loss + 6 ≤ loss (P k) at h₁ + have h₂ := Finset.le_sup (f := fun k => loss (P k)) (Finset.mem_univ k) + change _ ≤ tensorLoss P at h₂ + exact (by omega : (P k l).loss ≤ loss (P k)).trans h₂ + have hsmooth (k : Fin 3) (l : Fin n) : + ContDiff ℝ ∞ (fun p : Base => (P k l).eval G (p,0)) := by + have hh := (P k l).eval_smooth (S := Set.univ) hG + (fun _ _ => Set.mem_univ _) (hP k l) + have hh' : ContDiff ℝ ∞ ((P k l).eval G) := + contDiffOn_univ.mp (by simpa only [Set.univ_prod_univ] using hh) + exact hh'.comp (contDiff_id.prodMk contDiff_const) + have hb (k : Fin 3) (l : Fin n) : WeightedBound U s m + (D k l * ε / s ^ tensorLoss P) (fun x => ε^(l.val+1) * (P k l).eval G (x,0)) := by + have he := hd k l U hU G (fun _ => 0) s s hs le_rfl hs1 hG contDiffOn_const hGQ + (fun _ _ => by constructor <;> norm_num) + (hGb.mono_order (Nat.add_le_add_left (ho k l) m)) + ((weightedBound_zero U s m (F := ℝ)).mono_const zero_le_one) + have he' := he.const_smul hU.uniqueDiffOn (hsmooth k l).contDiffOn (ε^(l.val+1)) + apply (he'.congr (fun _ _ => by simp only [smul_eq_mul])).mono_const + rw [abs_of_nonneg (pow_nonneg hε _)] + have hp : ε^(l.val+1) ≤ ε := by + simpa only [pow_one] using + pow_le_pow_of_le_one hε hε1 (by omega : 1 ≤ l.val+1) + calc + _ ≤ ε * (D k l / s^(P k l).loss) := mul_le_mul_of_nonneg_right hp + (div_nonneg (hD k l) (pow_nonneg hs.le _)) + _ ≤ ε * (D k l / s^tensorLoss P) := mul_le_mul_of_nonneg_left + (div_le_div_of_nonneg_left (hD k l) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (hl k l))) hε + _ = _ := by ring + have hsum (k : Fin 3) : WeightedBound U s m + ((∑ l, D k l) * ε / s^tensorLoss P) (fun x => eval (P k) ε G (x,0)) := by + have hh := WeightedBound.finset_sum hU.uniqueDiffOn hs.le Finset.univ + (fun l => D k l * ε / s^tensorLoss P) + (fun l x => ε^(l.val+1) * (P k l).eval G (x,0)) + (fun l _ => ((hsmooth k l).const_smul (ε^(l.val+1))).contDiffOn) + (fun l _ => hb k l) + simpa only [eval,← Finset.sum_mul,← Finset.sum_div] using hh + have hsource : WeightedBound U s m (E*ε/s^tensorLoss P) + (fun x k => eval (P k) ε G (x,0)) := by + apply WeightedBound.pi hU.uniqueDiffOn hs (by positivity) + · intro k + exact (ContDiff.sum (fun l _ => (hsmooth k l).const_smul (ε^(l.val+1)))).contDiffOn + · intro k + apply (hsum k).mono_const + exact div_le_div_of_nonneg_right + (mul_le_mul_of_nonneg_right + (Finset.single_le_sum (fun k _ => Finset.sum_nonneg fun l _ => hD k l) + (Finset.mem_univ k)) hε) (pow_nonneg hs.le _) + have hsourceSmooth : ContDiff ℝ ∞ (fun x k => eval (P k) ε G (x,0)) := by + apply contDiff_pi.mpr + intro k + exact ContDiff.sum (fun l _ => (hsmooth k l).const_smul (ε^(l.val+1))) + exact weightedBound_comp_isometry_on planeCoordinateIsometry.symm hU hsourceSmooth hsource + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..3763764179ae270c974f8ed4d38e1f3c64a558f5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationBounds.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedMixedJets +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetDerivatives +import OAI.Geometry.SurfaceImmersion.Geometry.MixedJetHomogeneity + +namespace OAI + +/-! The first three actual polynomial variations have one fixed scale +exponent, the excess-jet loss plus six. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates MixedExpression + +namespace Expression + +def variations (e : Expression) : Fin 3 → MixedExpression := + ![(ofExpression e).differentiate 0, + ((ofExpression e).differentiate 0).differentiate 1, + (((ofExpression e).differentiate 0).differentiate 1).differentiate 2] + +lemma variations_smoothCoeffs {O : Set LowJet} (hO : IsOpen O) + {e : Expression} (he : e.SmoothCoeffs O) (i : Fin 3) : + (e.variations i).SmoothCoeffs O := by + have h₀ := smoothCoeffs_ofExpression he + have h₁ := differentiate_smoothCoeffs hO 0 h₀ + have h₂ := differentiate_smoothCoeffs hO 1 h₁ + have h₃ := differentiate_smoothCoeffs hO 2 h₂ + fin_cases i + · exact h₁ + · exact h₂ + · exact h₃ + +lemma variations_order (e : Expression) (i : Fin 3) : (e.variations i).order ≤ e.order := by + have h₁ := order_differentiate 0 (ofExpression e) + have h₂ := order_differentiate 1 ((ofExpression e).differentiate 0) + have h₃ := order_differentiate 2 (((ofExpression e).differentiate 0).differentiate 1) + rw [order_ofExpression] at h₁ + fin_cases i + · exact h₁ + · exact h₂.trans h₁ + · exact h₃.trans (h₂.trans h₁) + +lemma variations_loss (e : Expression) (i : Fin 3) : (e.variations i).loss ≤ e.loss + 6 := by + have h₁ := loss_differentiate 0 (ofExpression e) + have h₂ := loss_differentiate 1 ((ofExpression e).differentiate 0) + have h₃ := loss_differentiate 2 (((ofExpression e).differentiate 0).differentiate 1) + rw [ofExpression_loss] at h₁ + fin_cases i + · change ((ofExpression e).differentiate 0).loss ≤ e.loss + 6 + omega + · change (((ofExpression e).differentiate 0).differentiate 1).loss ≤ e.loss + 6 + omega + · exact loss_third_variation e + +lemma first_variation_eval {O : Set LowJet} (hO : IsOpen O) {e : Expression} + (he : e.SmoothCoeffs O) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (z : Base × ℝ) (hQ : lowJet (G 0) z.1 ∈ O) : + (e.variations 0).eval G z = e.variation (G 0) (G 1) z := by + have ha := differentiate_hasDerivAt hO hG (smoothCoeffs_ofExpression he) 0 z hQ + have hb := variation_hasDerivAt hO (hG 0) (hG 1) he z hQ + have ha' : HasDerivAt (fun s : ℝ => e.eval (fun p => G 0 p + s • G 1 p) z) + ((e.variations 0).eval G z) 0 := by + change HasDerivAt _ (((ofExpression e).differentiate 0).eval G z) 0 + simpa only [ofExpression_eval, varyBase_base, Fin.succ_zero_eq_one] using ha + exact ha'.unique hb + +/-- The constant can depend on the requested output order; the exponent and +finite input loss do not. All three direction maps have unit weighted norm. -/ +theorem compact_three_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 : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Fin 4 → Base → Space) (s : ℝ), 0 < s → s ≤ 1 → + (∀ i, ContDiff ℝ ∞ (G i)) → Set.MapsTo (lowJet (G 0)) U K → + WeightedBound U s (m + e.order) B (lowJet (G 0)) → + (∀ i : Fin 3, WeightedBound U s (m + e.order) 1 (G i.succ)) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ i : Fin 3, + WeightedBound U s m (D / s ^ (e.loss + 6)) + (fun p => (e.variations i).eval G (p, t)) := by + classical + have hex := fun i : Fin 3 => compact_mixed_bound hU hO hK hKO (e.variations i) + (e.variations_smoothCoeffs hO he i) m B hB + choose D hD hb using hex + refine ⟨∑ i, D i, Finset.sum_nonneg (fun i _ => hD i), ?_⟩ + intro G s hs hs1 hG hGK hGb hHb t ht i + have hi := hb i G s hs hs1 hG hGK + (hGb.mono_order (Nat.add_le_add_left (e.variations_order i) m)) + (fun j => (hHb j).mono_order (Nat.add_le_add_left (e.variations_order i) m)) t ht + apply hi.mono_const + calc + D i / s ^ (e.variations i).loss ≤ D i / s ^ (e.loss + 6) := + div_le_div_of_nonneg_left (hD i) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (e.variations_loss i)) + _ ≤ (∑ j, D j) / s ^ (e.loss + 6) := + div_le_div_of_nonneg_right (Finset.single_le_sum (fun j _ => hD j) (Finset.mem_univ i)) + (pow_nonneg hs.le _) + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5ffe4eeaee87a6d1b86d18dae95f208fde34852 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationDerivatives.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationBounds + +namespace OAI + +/-! The second and third mixed polynomials differentiate the preceding actual +variation; these are not independent formal symbols. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +lemma eval_differentiate_ofExpression (e : Expression) (j : Fin 3) + (G : Fin 4 → Base → Space) (z : Base × ℝ) : + ((ofExpression e).differentiate j).eval G z = e.variation (G 0) (G j.succ) z := by + induction e with + | coeff c => exact differentiate_coeff_eval c j G z + | atom w a e ih => + simp only [ofExpression, differentiate, ↓reduceIte, eval, ofExpression_eval, + Expression.variation, ih] + | add e f ihe ihf => simp only [ofExpression, differentiate, eval, Expression.variation, ihe, ihf] + +namespace Expression + +theorem second_variation_hasDerivAt {O : Set LowJet} (hO : IsOpen O) + {e : Expression} (he : e.SmoothCoeffs O) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (z : Base × ℝ) (hQ : lowJet (G 0) z.1 ∈ O) : + HasDerivAt (fun s : ℝ => e.variation (fun p => G 0 p + s • G 2 p) (G 1) z) + ((e.variations 1).eval G z) 0 := by + have hd := differentiate_hasDerivAt hO hG + (e.variations_smoothCoeffs hO he 0) 1 z hQ + simp only [show (1 : Fin 3).succ = (2 : Fin 4) by decide] at hd + have heq : (fun s : ℝ => (e.variations 0).eval (varyBase G (G 2) s) z) = + (fun s : ℝ => e.variation (fun p => G 0 p + s • G 2 p) (G 1) z) := by + funext s + change ((ofExpression e).differentiate 0).eval (varyBase G (G 2) s) z = _ + rw [eval_differentiate_ofExpression, varyBase_base, Fin.succ_zero_eq_one, + varyBase_other _ _ _ (by decide : (1 : Fin 4) ≠ 0)] + rw [heq] at hd + exact hd + +theorem third_variation_hasDerivAt {O : Set LowJet} (hO : IsOpen O) + {e : Expression} (he : e.SmoothCoeffs O) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (z : Base × ℝ) (hQ : lowJet (G 0) z.1 ∈ O) : + HasDerivAt (fun s : ℝ => (e.variations 1).eval (varyBase G (G 3) s) z) + ((e.variations 2).eval G z) 0 := by + exact differentiate_hasDerivAt hO hG (e.variations_smoothCoeffs hO he 1) 2 z hQ + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationScaling.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationScaling.lean new file mode 100644 index 0000000000000000000000000000000000000000..91a04e537e27b85fdd04840abd85622dce401048 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialVariationScaling.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialVariationBounds + +namespace OAI + +/-! Multilinear scaling of the three actual polynomial variations. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression + +namespace MixedExpression + +def rescale (G : Fin 4 → Base → Space) (c : Fin 3 → ℝ) : Fin 4 → Base → Space := + ![G 0, fun p => c 0 • G 1 p, fun p => c 1 • G 2 p, fun p => c 2 • G 3 p] + +lemma rescale_base (G : Fin 4 → Base → Space) (c : Fin 3 → ℝ) : rescale G c 0 = G 0 := rfl + +lemma rescale_smooth {G : Fin 4 → Base → Space} (hG : ∀ i, ContDiff ℝ ∞ (G i)) + (c : Fin 3 → ℝ) : ∀ i, ContDiff ℝ ∞ (rescale G c i) := by + intro i + fin_cases i + · exact hG 0 + · exact ContDiff.const_smul (c 0) (hG 1) + · exact ContDiff.const_smul (c 1) (hG 2) + · exact ContDiff.const_smul (c 2) (hG 3) + +lemma rescale_eq (G : Fin 4 → Base → Space) (c : Fin 3 → ℝ) : + rescale G c = scaleSlot (scaleSlot (scaleSlot G 0 (c 0)) 1 (c 1)) 2 (c 2) := by + funext i p + fin_cases i <;> simp [rescale, scaleSlot] + +lemma eval_rescale {e : MixedExpression} {n : Fin 3 → ℕ} + (he : ∀ j, DegreeIn j e (n j)) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (c : Fin 3 → ℝ) (z : Base × ℝ) : + e.eval (rescale G c) z = + (c 0 ^ n 0 * c 1 ^ n 1 * c 2 ^ n 2) * e.eval G z := by + rw [rescale_eq, (he 2).eval_scaleSlot + (scaleSlot_smooth (scaleSlot_smooth hG 0 (c 0)) 1 (c 1)), + (he 1).eval_scaleSlot (scaleSlot_smooth hG 0 (c 0)), (he 0).eval_scaleSlot hG] + ring + +end MixedExpression +namespace Expression + +lemma variations_degree (e : Expression) (i j : Fin 3) : + DegreeIn j (e.variations i) (if j ≤ i then 1 else 0) := by + have h₀ := degree_ofExpression j e + have h₁ := h₀.differentiate 0 + have h₂ := h₁.differentiate 1 + have h₃ := h₂.differentiate 2 + fin_cases i <;> fin_cases j <;> simp_all [variations] + +lemma variations_rescale (e : Expression) {G : Fin 4 → Base → Space} + (hG : ∀ i, ContDiff ℝ ∞ (G i)) (c : Fin 3 → ℝ) (z : Base × ℝ) (i : Fin 3) : + (e.variations i).eval (rescale G c) z = + (c 0 * (if 1 ≤ i then c 1 else 1) * (if 2 ≤ i then c 2 else 1)) * + (e.variations i).eval G z := by + have h := eval_rescale (fun j => e.variations_degree i j) hG c z + fin_cases i <;> simpa using h + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialZeroPhaseExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialZeroPhaseExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..bca9cd4b03b88a6fffff32d4b0a13b4dd909f6d3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PolynomialZeroPhaseExpansion.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FinitePolynomialPhases +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanCoefficient + +namespace OAI + +/-! Separate the actual polynomial Hessian into its zero-phase part and +explicit doubled and mixed phases. Ordered pairs retain all multiplicities. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial +open MixedExpression ModulatedJets +namespace Perturbation + +def quadraticPhaseCoefficient {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Base → Space) (φ ψ : Base → ℝ) (H K : Base → Fin 4 → ℂ) + (τ t : ℝ) (p : Base) : ℂ := + conjugated P ε G (pairPhases φ ψ) (pairDirections H K) τ 1 (p, t) / 4 + +lemma phase_mul (τ : ℝ) (φ ψ : Base → ℝ) (p : Base) : + phase τ φ p * phase τ ψ p = phase τ (fun x => φ x + ψ x) p := by + simp only [phase, Complex.ofReal_add, mul_add, Complex.exp_add] + +def quadraticOscillation {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : ℝ := + (∑ i, ∑ j, (phase τ (fun x => φ i x + φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ t p).re) + + ∑ i, ∑ j ∈ Finset.univ.erase i, + (phase τ (fun x => φ i x - φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ t p).re + +lemma quadraticMeanCoefficient_eq_phaseCoefficient {n : ℕ} + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : Base → ℝ) (H : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanCoefficient P ε G φ H τ t p = + (quadraticPhaseCoefficient P ε G φ (fun x => -φ x) H (starField H) τ t p).re := by + simp only [quadraticMeanCoefficient, quadraticPhaseCoefficient, Complex.div_ofNat_re] + +lemma quadraticPhaseCoefficient_oscillation {n : ℕ} + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ ψ : Base → ℝ) (H K : Base → Fin 4 → ℂ) (τ : ℝ) (z : Base × ℝ) : + (phase τ (fun x => φ x + ψ x) z.1 * + quadraticPhaseCoefficient P ε G φ ψ H K τ z.2 z.1).re = + ∑ l, ε ^ (l.val + 1) * + ((phase τ φ z.1 * phase τ ψ z.1) * + conjugatedVariation (P l) G (pairPhases φ ψ) (pairDirections H K) τ 1 z).re / 4 := by + rw [← phase_mul] + simp only [quadraticPhaseCoefficient, conjugated, div_eq_mul_inv, Finset.mul_sum, + Finset.sum_mul, Complex.re_sum] + apply Finset.sum_congr rfl + intro l hl + simp only [Complex.real_smul, Complex.mul_re, Complex.mul_im, Complex.ofReal_re, + Complex.ofReal_im, zero_mul, sub_zero, Complex.inv_re, Complex.inv_im, + Complex.normSq_ofNat] + norm_num + ring + +lemma weighted_half_second_variation_phases {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) + (τ : ℝ) (z : Base × ℝ) : + (∑ l : Fin n, ε ^ (l.val + 1) * ((1 / 2 : ℝ) * ((P l).variations 1).eval + ![G, realField (oscillatorySum τ φ H), realField (oscillatorySum τ φ H), 0] z)) = + (∑ i, ∑ j, (phase τ (fun x => φ i x + φ j x) z.1 * + quadraticPhaseCoefficient P ε G (φ i) (φ j) (H i) (H j) τ z.2 z.1).re) + + ∑ i, ∑ j, (phase τ (fun x => φ i x - φ j x) z.1 * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ z.2 z.1).re := by + classical + simp only [half_second_variation_phases _ G φ H hφ hH τ z, + mul_add, Finset.mul_sum, Finset.sum_add_distrib] + congr 1 <;> rw [Finset.sum_comm] <;> apply Finset.sum_congr rfl <;> intro i hi <;> + rw [Finset.sum_comm] <;> apply Finset.sum_congr rfl <;> intro j hj + · simpa only [mul_div_assoc] using (quadraticPhaseCoefficient_oscillation P ε G (φ i) (φ j) (H i) (H j) τ z).symm + · simpa only [mul_div_assoc, sub_eq_add_neg] using (quadraticPhaseCoefficient_oscillation P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ z).symm + +/-- The omitted terms have exactly the doubled/sum/difference phases. The +geometric good-phase hypothesis is only needed later to solve these modes. -/ +theorem quadratic_zero_phase_expansion {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) + (τ t : ℝ) (p : Base) : + (∑ l : Fin n, ε ^ (l.val + 1) * ((1 / 2 : ℝ) * ((P l).variations 1).eval + ![G, realField (oscillatorySum τ φ H), realField (oscillatorySum τ φ H), 0] (p,t))) = + (∑ i, quadraticMeanCoefficient P ε G (φ i) (H i) τ t p) + + quadraticOscillation P ε G φ H τ t p := by + rw [weighted_half_second_variation_phases P ε G φ H hφ hH τ (p,t)] + have hrow (i : ι) : + (∑ j, (phase τ (fun x => φ i x - φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ t p).re) = + quadraticMeanCoefficient P ε G (φ i) (H i) τ t p + + ∑ j ∈ Finset.univ.erase i, (phase τ (fun x => φ i x - φ j x) p * + quadraticPhaseCoefficient P ε G (φ i) (fun x => -φ j x) + (H i) (starField (H j)) τ t p).re := by + rw [← Finset.sum_erase_add Finset.univ _ (Finset.mem_univ i)] + have hz : phase τ (fun _ : Base => (0 : ℝ)) p = 1 := by simp [phase] + simp only [sub_self, hz, one_mul, quadraticMeanCoefficient_eq_phaseCoefficient] + ring + simp only [hrow, Finset.sum_add_distrib, quadraticOscillation] + ring + +end Perturbation +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PositivePolynomialBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PositivePolynomialBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bcbd376318742ade46d4d7601edc379a7dbae671 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PositivePolynomialBounds.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialFreeNormal +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialRealReconstruction + +namespace OAI + +/-! The explicit normal-frame budgets have fixed polynomial growth. This +keeps their exponents independent of multiplicative input constants. -/ +noncomputable section +namespace ClosedSurfaceR4.RealModes + +/-- An explicit polynomial upper bound on the positive half-line. -/ +def HasPolynomialBound (f : ℝ → ℝ) : Prop := + ∃ d : ℕ, ∃ C : ℝ, 1 ≤ C ∧ ∀ x : ℝ, 1 ≤ x → 0 ≤ f x ∧ f x ≤ C*x^d + +lemma polynomialBound_const {c : ℝ} (hc : 0 ≤ c) : HasPolynomialBound (fun _ => c) := by + exact ⟨0,max 1 c,le_max_left _ _,fun x _ => ⟨hc,by + simp only [pow_zero,mul_one] + exact le_max_right (1 : ℝ) c⟩⟩ + +lemma polynomialBound_id : HasPolynomialBound (fun x => x) := by + exact ⟨1,1,le_rfl,fun x hx => ⟨zero_le_one.trans hx,by simp⟩⟩ + +lemma HasPolynomialBound.add {f g : ℝ → ℝ} (hf : HasPolynomialBound f) + (hg : HasPolynomialBound g) : HasPolynomialBound (fun x => f x+g x) := by + obtain ⟨d,C,hC,hf⟩ := hf + obtain ⟨e,D,hD,hg⟩ := hg + refine ⟨d+e,C+D,by linarith,?_⟩ + intro x hx + have hf' := hf x hx + have hg' := hg x hx + refine ⟨add_nonneg hf'.1 hg'.1,?_⟩ + calc + f x+g x ≤ C*x^d+D*x^e := add_le_add hf'.2 hg'.2 + _ ≤ C*x^(d+e)+D*x^(d+e) := add_le_add + (mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hx (Nat.le_add_right d e)) (zero_le_one.trans hC)) + (mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hx (Nat.le_add_left e d)) (zero_le_one.trans hD)) + _ = (C+D)*x^(d+e) := by ring + +lemma HasPolynomialBound.mul {f g : ℝ → ℝ} (hf : HasPolynomialBound f) + (hg : HasPolynomialBound g) : HasPolynomialBound (fun x => f x*g x) := by + obtain ⟨d,C,hC,hf⟩ := hf + obtain ⟨e,D,hD,hg⟩ := hg + refine ⟨d+e,C*D,by + nlinarith [mul_nonneg (sub_nonneg.mpr hC) (sub_nonneg.mpr hD)],?_⟩ + intro x hx + have hf' := hf x hx + have hg' := hg x hx + refine ⟨mul_nonneg hf'.1 hg'.1,?_⟩ + calc + f x*g x ≤ (C*x^d)*(D*x^e) := mul_le_mul hf'.2 hg'.2 hg'.1 + (mul_nonneg (zero_le_one.trans hC) (pow_nonneg (zero_le_one.trans hx) _)) + _ = (C*D)*x^(d+e) := by rw [pow_add]; ring + +lemma HasPolynomialBound.pow {f : ℝ → ℝ} (hf : HasPolynomialBound f) (n : ℕ) : + HasPolynomialBound (fun x => (f x)^n) := by + obtain ⟨d,C,hC,hf⟩ := hf + refine ⟨d*n,C^n,one_le_pow₀ hC,?_⟩ + intro x hx + have hh := hf x hx + refine ⟨pow_nonneg hh.1 _,?_⟩ + calc + (f x)^n ≤ (C*x^d)^n := pow_le_pow_left₀ hh.1 hh.2 _ + _ = C^n*x^(d*n) := by rw [mul_pow,pow_mul] + +lemma normalBudget_polynomial (m : ℕ) : HasPolynomialBound (fun x => normalBudget m x x) := by + unfold normalBudget liftBudget inverseGramBudget quadraticBudget dotBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +lemma freeNormalBudget_polynomial (m : ℕ) {D : ℝ} (hD : 0 ≤ D) : + HasPolynomialBound (fun x => freeNormalBudget m D x x) := by + unfold freeNormalBudget freeNormalInputBudget perpBudget minorTermBudget crossBudget + normalBudget liftBudget inverseGramBudget quadraticBudget dotBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +lemma reconstructionBudget_polynomial (m : ℕ) : + HasPolynomialBound (fun x => reconstructionBudget m x x) := by + unfold reconstructionBudget normalRatioBudget normalDualBudget tangentDualBudget + normalBudget liftBudget inverseGramBudget quadraticBudget dotBudget + repeat first + | exact polynomialBound_id + | apply HasPolynomialBound.add + | apply HasPolynomialBound.mul + | apply HasPolynomialBound.pow + | (apply polynomialBound_const; positivity) + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PositiveSmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PositiveSmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..2a4102a5c64109b453d7fb6f2ca2c80939f60155 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PositiveSmoothingAtlas.lean @@ -0,0 +1,116 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Every smoothing atlas admits nonnegative square-partition weights with +exactly the same supports and outer cutoffs. This makes the associated +primitive amplitudes positive on their open nonzero loci. -/ +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] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def positiveWeightNormalizer (p : M) : ℝ := + ∑ i : A.centers, ((A.weight i p)^2)^2 + +lemma positiveWeightNormalizer_pos (p : M) : 0 < A.positiveWeightNormalizer p := by + have hn : 0 ≤ A.positiveWeightNormalizer p := + Finset.sum_nonneg (fun i _ => sq_nonneg ((A.weight i p)^2)) + by_contra hp + have hz : A.positiveWeightNormalizer p = 0 := le_antisymm (not_lt.mp hp) hn + have hi : ∀ i : A.centers, A.weight i p = 0 := by + intro i + have hsum := (Finset.sum_eq_zero_iff_of_nonneg + (fun j (_ : j ∈ Finset.univ) => sq_nonneg ((A.weight j p)^2))).mp hz + exact sq_eq_zero_iff.mp (sq_eq_zero_iff.mp (hsum i (Finset.mem_univ i))) + have hpart := A.partition p + simp only [hi,zero_pow (by decide : 2 ≠ 0),Finset.sum_const_zero] at hpart + norm_num at hpart + +lemma positiveWeightNormalizer_smooth : + ContMDiff planeModel 𝓘(ℝ) ∞ A.positiveWeightNormalizer := + contMDiff_finsetSum (fun i _ => ((A.weight_smooth i).pow 2).pow 2) + +def positiveWeight (i : A.centers) (p : M) : ℝ := + (A.weight i p)^2 / Real.sqrt (A.positiveWeightNormalizer p) + +lemma positiveWeight_smooth (i : A.centers) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.positiveWeight i) := by + have hsqrt : ContMDiff planeModel 𝓘(ℝ) ∞ + (fun p => Real.sqrt (A.positiveWeightNormalizer p)) := by + intro p + exact (Real.contDiffAt_sqrt (A.positiveWeightNormalizer_pos p).ne').contMDiffAt.comp p + (A.positiveWeightNormalizer_smooth p) + exact ((A.weight_smooth i).pow 2).div₀ hsqrt + (fun p => (Real.sqrt_pos.mpr (A.positiveWeightNormalizer_pos p)).ne') + +lemma positiveWeight_nonneg (i : A.centers) (p : M) : 0 ≤ A.positiveWeight i p := + div_nonneg (sq_nonneg _) (Real.sqrt_nonneg _) + +lemma positiveWeight_pos_iff (i : A.centers) (p : M) : + 0 < A.positiveWeight i p ↔ A.weight i p ≠ 0 := by + change 0 < (A.weight i p)^2 / Real.sqrt (A.positiveWeightNormalizer p) ↔ _ + rw [div_pos_iff_of_pos_right (Real.sqrt_pos.mpr (A.positiveWeightNormalizer_pos p))] + exact sq_pos_iff + +lemma positiveWeight_ne_zero_iff (i : A.centers) (p : M) : + A.positiveWeight i p ≠ 0 ↔ A.weight i p ≠ 0 := by + constructor + · intro hp hw + exact hp (by simp only [positiveWeight,hw,zero_pow (by decide : 2 ≠ 0),zero_div]) + · intro hw + exact (A.positiveWeight_pos_iff i p).mpr hw |>.ne' + +lemma positiveWeight_tsupport (i : A.centers) : + tsupport (A.positiveWeight i) = tsupport (A.weight i) := by + change closure (Function.support (A.positiveWeight i)) = closure (Function.support (A.weight i)) + congr 1 + ext p + exact A.positiveWeight_ne_zero_iff i p + +lemma positiveWeight_partition (p : M) : + (∑ i : A.centers, (A.positiveWeight i p)^2) = 1 := by + calc + _ = (∑ i : A.centers, ((A.weight i p)^2)^2) / + (Real.sqrt (A.positiveWeightNormalizer p))^2 := by + simp only [positiveWeight,div_pow,Finset.sum_div] + _ = A.positiveWeightNormalizer p / A.positiveWeightNormalizer p := by + rw [Real.sq_sqrt (A.positiveWeightNormalizer_pos p).le] + rfl + _ = 1 := div_self (A.positiveWeightNormalizer_pos p).ne' + +/-- The centers and outer functions are unchanged. Only the square +partition is normalized, retaining every support exactly. -/ +def positiveAtlas : SmoothingAtlas M where + centers := A.centers + weight := A.positiveWeight + outer := A.outer + weight_smooth := A.positiveWeight_smooth + weight_support := fun i => by + rw [A.positiveWeight_tsupport i] + exact A.weight_support i + outer_smooth := A.outer_smooth + outer_support := A.outer_support + outer_one := fun i p hp => A.outer_one i p ((A.positiveWeight_tsupport i) ▸ hp) + partition := A.positiveWeight_partition + +lemma positiveAtlas_weight_nonneg (i : A.centers) (p : M) : + 0 ≤ A.positiveAtlas.weight i p := A.positiveWeight_nonneg i p + +lemma positiveAtlas_weight_tsupport (i : A.centers) : + tsupport (A.positiveAtlas.weight i) = tsupport (A.weight i) := + A.positiveWeight_tsupport i + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PreparedCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PreparedCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..82ac744c3eacd65fa473da6be555f32bbff7aa96 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PreparedCorrection.lean @@ -0,0 +1,127 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformRadiusInputStep +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionBudgetThresholds +import OAI.Geometry.SurfaceImmersion.Correction.ExplicitCorrectionBudgetThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.InputSize +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionGeometry + +namespace OAI + +/-! Fixed geometry and numerical budgets for the adaptive iteration. All the +fields below are constructed from the proved small-increment theorem. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance preparedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance preparedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance preparedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance preparedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance preparedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance preparedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +/-- Construction starts at order ten, as required by the scale estimates. -/ +def correctionOrder (k : ℕ) : ℕ := k+10 + +def correctionInputOrder (k : ℕ) : ℕ := 40*(correctionOrder k+1) + +variable {g : SmoothMetric M} {F : M → Space} + +/-- Uniform geometric radii and the order-dependent estimates used by the +iteration. This package is obtained by `preparedCorrection_nonempty`. -/ +structure PreparedCorrection (d : CorrectionGeometry g F) where + a : ℝ + ρ : ℝ + baseline : ℝ + budget : ℝ + a_pos : 0 < a + ρ_pos : 0 < ρ + baseline_nonneg : 0 ≤ baseline + budget_pos : 0 < budget + baseline_lt : baseline < budget/4 + ε : ℕ → ℝ + L : ℕ → ℝ + N : ℕ → ℕ → ℝ + ε_pos : ∀ k, 0 < ε k + ε_le_one : ∀ k, ε k ≤ 1 + L_nonneg : ∀ k, 0 ≤ L k + N_nonneg : ∀ k m, 0 ≤ N k m + preserve : ∀ k t, 0 < t → t < ε k → + baseline+N k (correctionInputOrder k)*t^(1/5 : ℝ)*(1+budget) ≤ budget ∧ + L k*(1+2*budget)*t^(1/5 : ℝ) ≤ a/8 + step : ∀ k (G : M → Space), ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε k → ∀ j : ℕ, + correctionOrder k ≤ j → j ≤ correctionOrder k+1 → + d.A.InputBound t (correctionInputOrder k) budget G + (normalizedTensorDefect g.inner (t^(correctionOrder k : ℝ)) G) → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode (normalizedTensorDefect g.inner + (t^(correctionOrder k : ℝ)) G) x-d.A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m ≤ correctionOrder k/2, d.A.WeightedBound 1 m (ρ*t) U) ∧ + d.A.TensorWeightedBound (t^(6/5 : ℝ)) 0 + (L k*(1+2*budget)*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^(correctionOrder k : ℝ)) G) → + d.A.InputBound (t^(6/5 : ℝ)) m + (baseline+N k m*t^(1/5 : ℝ)*(1+C)) (G+U) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)) + +namespace MetricGoodPhaseData + +/-- No new analytic input is assumed in preparing the iteration. The fixed +input budget exceeds four times the baseline, and each order's threshold +preserves both the input and metric neighborhoods. -/ +theorem preparedCorrection_large (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (R : ℝ) : + ∃ c : PreparedCorrection d.toCorrectionGeometry, R < c.budget/4 := by + classical + obtain ⟨a,ρ,A₀,ha,hρ,hA,hall⟩ := d.uniform_radius_input_step hF + let B₀ : ℝ := 4*(A₀+max R 0+1) + have hR0 := le_max_right R 0 + have hRR := le_max_left R 0 + have hB₀ : 0 < B₀ := by dsimp [B₀]; linarith + have hAB : A₀ < B₀/4 := by dsimp [B₀]; linarith + have hAB' : A₀ < B₀ := by linarith + have hk (k : ℕ) : 10 ≤ correctionOrder k := by unfold correctionOrder; omega + choose ε B L N hε hε1 hB hL hN hstep using fun k => hall (correctionOrder k) (hk k) B₀ hB₀.le + let η := fun k => ExactCorrection.correctionBudgetThreshold A₀ B₀ a + (N k (correctionInputOrder k)) (L k 0) + have hbudget (k : ℕ) := ExactCorrection.correctionBudgetThreshold_spec + (N := N k (correctionInputOrder k)) (L := L k 0) hAB' ha + have hη (k : ℕ) : 0 < η k := (hbudget k).1 + have hpres (k : ℕ) := (hbudget k).2.2 + refine ⟨⟨a,ρ,A₀,B₀,ha,hρ,hA,hB₀,hAB, + (fun k => min (ε k) (η k)),(fun k => L k 0),N, + (fun k => lt_min (hε k) (hη k)), + (fun k => (min_le_left _ _).trans (hε1 k)), + (fun k => hL k 0),hN, + (fun k t ht htε => hpres k t ht (htε.trans_le (min_le_right _ _))),?_⟩,?_⟩ + · intro k G hG t ht htε j hj hj' hin hnear hmetric + obtain ⟨U,hU,_,hsmall,herror,hnext⟩ := hstep k G hG t ht + (htε.trans_le (min_le_left _ _)) j hj hj' hin hnear hmetric + refine ⟨U,hU,hsmall,?_,hnext⟩ + have hi0 := d.A.inputBound_mono_order hin (show 0 ≤ correctionInputOrder k from Nat.zero_le _) + simpa only [MetricGoodPhaseData.toCorrectionGeometry, show 1+B₀+B₀ = 1+2*B₀ by ring] using herror 0 B₀ hB₀.le hi0 + · change R < B₀/4 + dsimp [B₀] + linarith + +/-- The basic preparation follows by allowing any positive finite budget. -/ +theorem preparedCorrection_nonempty (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : Nonempty (PreparedCorrection d.toCorrectionGeometry) := by + obtain ⟨c,_⟩ := d.preparedCorrection_large hF 0 + exact ⟨c⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PrescribedTransverseModel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrescribedTransverseModel.lean new file mode 100644 index 0000000000000000000000000000000000000000..9e4d023c6d9f884474b70ccf0174afb351cfef35 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrescribedTransverseModel.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.TransverseRuledSurface + +namespace OAI + +/-! An actual smooth comparison map with any prescribed transverse +first derivative and the original values along the boundary axis. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {W : Type*} [NormedAddCommGroup W] [NormedSpace ℝ W] + +def prescribedTransverseModel (f : Base → W) (b : ℝ → W) (x : Base) : W := + f x + x 0 • (b (x 1)-axisTransverse f (x 1)) + +lemma prescribedTransverseModel_smooth {f : Base → W} {b : ℝ → W} + (hf : ContDiff ℝ ∞ f) (hb : ContDiff ℝ ∞ b) : + ContDiff ℝ ∞ (prescribedTransverseModel f b) := + hf.add ((contDiff_apply ℝ ℝ 0).smul + ((hb.sub (axisTransverse_smooth hf)).comp (contDiff_apply ℝ ℝ 1))) + +lemma prescribedTransverseModel_axis (f : Base → W) (b : ℝ → W) (t : ℝ) : + prescribedTransverseModel f b (crosscapAxis t) = f (crosscapAxis t) := by + simp [prescribedTransverseModel,crosscapAxis_apply] + +lemma prescribedTransverseModel_first_jet {f : Base → W} {b : ℝ → W} + (hf : ContDiff ℝ ∞ f) (hb : ContDiff ℝ ∞ b) (t : ℝ) : + fderiv ℝ (prescribedTransverseModel f b) (crosscapAxis t) = + fderiv ℝ f (crosscapAxis t) + + (ContinuousLinearMap.proj 0).smulRight (b t-axisTransverse f t) := by + let a := crosscapAxis t + have hdB := (((hb.sub (axisTransverse_smooth hf)).comp + (contDiff_apply ℝ ℝ 1)).differentiable (by simp) a).hasFDerivAt + have hd := (hf.differentiable (by simp) a).hasFDerivAt.add + ((hasFDerivAt_apply (𝕜 := ℝ) (0 : Fin 2) a).smul hdB) + change HasFDerivAt (prescribedTransverseModel f b) _ a at hd + rw [hd.fderiv] + simp [a,crosscapAxis_apply] + +lemma prescribedTransverseModel_transverse {f : Base → W} {b : ℝ → W} + (hf : ContDiff ℝ ∞ f) (hb : ContDiff ℝ ∞ b) (t : ℝ) : + axisTransverse (prescribedTransverseModel f b) t = b t := by + rw [axisTransverse,prescribedTransverseModel_first_jet hf hb] + simp only [add_apply,ContinuousLinearMap.smulRight_apply, + ContinuousLinearMap.proj_apply,Matrix.cons_val_zero,one_smul] + change axisTransverse f t + (b t-axisTransverse f t) = b t + abel + +lemma prescribedTransverseModel_eq {f : Base → W} {b : ℝ → W} {x : Base} + (hb : b (x 1) = axisTransverse f (x 1)) : prescribedTransverseModel f b x = f x := by + simp only [prescribedTransverseModel,hb,sub_self,smul_zero,add_zero] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveInitialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveInitialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..a77c503000bee34805418780518787033245ab3e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveInitialMean.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialValueBounds +import OAI.Geometry.SurfaceImmersion.Correction.PrimitiveMeanStep +import OAI.Geometry.Immersion.ClosedSurface.MetricTensors + +namespace OAI + +/-! The actual scalar contraction starts the primitive mean iteration. +Its normalized defect is only the polynomial perturbation divided by δ². -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates PhaseMean + +def primitiveSeed (δ : ℝ) (F : JetPolynomial.Base → JetPolynomial.Space) : + JetPolynomial.Base → JetPolynomial.Space := fun x => Real.sqrt (1-δ^2) • F x + +lemma primitiveSeed_smooth (δ : ℝ) {F : JetPolynomial.Base → JetPolynomial.Space} + (hF : ContDiff ℝ ∞ F) : ContDiff ℝ ∞ (primitiveSeed δ F) := hF.const_smul _ + +lemma realMetricTensor_const_smul {F : RealModes.RField 4} + (hF : ContDiff ℝ ∞ F) (a : ℝ) : + RealModes.realMetricTensor (fun x => a • F x) = + fun x => a^2 • RealModes.realMetricTensor F x := by + have hd (p v : SmallModes.Base) : SmallModes.coordDeriv v (fun x => a • F x) p = + a • SmallModes.coordDeriv v F p := by + change (fderiv ℝ (fun x => a • F x) p) v = a • (fderiv ℝ F p) v + rw [fderiv_fun_const_smul (hF.differentiable (by simp) p),smul_apply] + ext x k + simp only [RealModes.realMetricTensor_apply,RealModes.realMetric,hd,Pi.smul_apply, + smul_dotProduct,dotProduct_smul,smul_eq_mul] + ring + +lemma primitiveSeed_metric {F : JetPolynomial.Base → JetPolynomial.Space} + (hF : ContDiff ℝ ∞ F) {δ : ℝ} (hδ : δ^2 ≤ 1) : + RealModes.realMetricTensor (primitiveSeed δ F ∘ planeCoordinateIsometry.symm) = + fun x => (1-δ^2) • RealModes.realMetricTensor (F ∘ planeCoordinateIsometry.symm) x := by + have hh := realMetricTensor_const_smul (hF.comp planeCoordinateIsometry.symm.contDiff) + (Real.sqrt (1-δ^2)) + rw [Real.sq_sqrt (sub_nonneg.mpr hδ)] at hh + exact hh + +lemma primitiveSeed_defect {n : ℕ} (P : Fin 3 → Fin n → Expression) (ε : ℝ) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {δ : ℝ} (hδ : δ ≠ 0) (hδ1 : δ^2 ≤ 1) : + normalizedMeanDefect δ (RealModes.realMetricTensor (F ∘ planeCoordinateIsometry.symm)) + (coordinateMetricMap P ε (primitiveSeed δ F)) = + fun x => (-(δ^2)⁻¹) • coordinatePolynomialValue P ε (primitiveSeed δ F) 0 x := by + ext x k + simp only [normalizedMeanDefect,coordinateMetricMap,primitiveSeed_metric hF hδ1, + Pi.add_apply,Pi.sub_apply,Pi.smul_apply,smul_eq_mul] + field_simp + ring + +theorem primitiveSeed_defect_bound {n : ℕ} {Q : Set LowJet} (hQ : IsCompact Q) + (P : Fin 3 → Fin n → Expression) (hP : ∀ k l, (P k l).SmoothCoeffs Set.univ) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ (U : Set JetPolynomial.Base), IsOpen U → + ∀ {F : JetPolynomial.Base → JetPolynomial.Space}, ContDiff ℝ ∞ F → + ∀ (δ ε : ℝ), δ ≠ 0 → δ^2 ≤ 1 → 0 ≤ ε → ε ≤ 1 → + Set.MapsTo (lowJet (primitiveSeed δ F)) U Q → + WeightedBound U 1 (m + tensorOrder P) B (lowJet (primitiveSeed δ F)) → + WeightedBound (planeCoordinateIsometry.symm ⁻¹' U) 1 m (C*ε/δ^2) + (normalizedMeanDefect δ (RealModes.realMetricTensor (F ∘ planeCoordinateIsometry.symm)) + (coordinateMetricMap P ε (primitiveSeed δ F))) := by + obtain ⟨C,hC,hb⟩ := coordinatePolynomialValue_bound hQ P hP m B hB + refine ⟨C,hC,?_⟩ + intro U hU F hF δ ε hδ hδ1 hε hε1 hGQ hGb + have hSeed := primitiveSeed_smooth δ hF + have hvalue := hb U hU hSeed hGQ 1 ε zero_lt_one le_rfl hε hε1 hGb + have hvalueS := coordinatePolynomialValue_smooth hP hSeed ε + have hscaled := hvalue.const_smul (hU.preimage planeCoordinateIsometry.symm.continuous).uniqueDiffOn + hvalueS.contDiffOn (-(δ^2)⁻¹) + have hc : |-(δ^2)⁻¹| * (C*ε/1^tensorLoss P) = C*ε/δ^2 := by + rw [abs_neg,abs_of_pos (inv_pos.mpr (sq_pos_of_ne_zero hδ))] + simp only [one_pow,div_one] + ring + rw [hc] + at hscaled + exact hscaled.congr (fun x _ => congrFun (primitiveSeed_defect P ε hF hδ hδ1) x) + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveMeanRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveMeanRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..cbd20d1ba1d8d4a7b73553f92be14d2f62151656 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveMeanRealization.lean @@ -0,0 +1,219 @@ +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 primitiveRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance primitiveRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance primitiveRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance primitiveRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance primitiveRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance primitiveRealizationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for a genuine supported primitive. +The slow baseline maps are constructed by the polynomial mean iteration; +their admissibility follows from the original map's compact jet margin. -/ +theorem primitive_mean_realization (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 : ℕ) : + ∃ (b u η L C Cv c cB : ℝ) (P : ℕ → ℝ), 0 ≤ b ∧ b < 1/16 ∧ 0 < u ∧ + 0 < η ∧ η ≤ 1 ∧ 0 ≤ L ∧ 0 ≤ C ∧ 0 ≤ Cv ∧ 0 < c ∧ 0 < cB ∧ (∀ 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 ![a y^2,0,0]))) ∧ + (∀ 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, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V) 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 ⟨ρg,hρg,hgeometry⟩ := data.supported_primitive_geometry hF i + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := data.A.lowJet_neighborhood_of_C2 i hF S.isOpen hQ O.isOpen hQO hFQ + obtain ⟨Pol,hPol,lm,hconstruct⟩ := data.A.supported_primitive_metric i l ha hamp S houter + 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 + obtain ⟨ρB,cB,hρB,hcB,hmargin⟩ := data.primitive_atlas_normal_margin hF i hc + let loss := max lm ln + have hcap : 0 < 1/(1+(loss : ℝ)) := by positivity + 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 Pol) + (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.atlas_jet_profiles + (fun _ => (S : Set JetPolynomial.Base)) (fun _ => S.isOpen) (fun _ => T) (fun _ => hST) P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B i ((R+2)+(2*(N+(R+2)+1)+1))) (hB _ _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B i ((2*(N+(R+2))+2)+2)) (hB _ _) + obtain ⟨ηn,hηn,_,hnsmall⟩ := primitive_normal_threshold hb hbln hε Dn + refine ⟨b,u,min η (min η₀ (min ηn (min ηg ηB))),L,C+D,P 0+P R+Dmap,c,cB,P,hb,hb16,hu, + lt_min hη (lt_min hη₀ (lt_min hηn (lt_min hηg hηB))), + (min_le_left _ _).trans hη1,hL,add_nonneg hC hD, + add_nonneg (add_nonneg (hP 0) (hP R)) hDmap,hc,hcB,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)) 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) p,t) = + SurfaceVelocityFamily.normal (lowJet (data.A.jetChartMap i G) 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 hGv + let V := data.A.periodicAtlasAnsatz i G U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 i ((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 Pol) 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, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + have hcoord : data.A.vectorChartRead i V = + finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (data.A.jetChartMap i G q)) + U ℓ (N+(R+2)+1) z := by + rw [data.A.euclidean_jetChartMap] + funext q + apply spaceCoordinates.injective + exact congrFun (data.A.periodicAtlasAnsatz_coordinate i G U hK hKA hzero ℓ + (N+(R+2)+1) z) q + rw [hcoord] + exact hnormal (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGQ + (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 i ((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 + have hext : ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + intro p hp + exact data.A.periodicAtlasAnsatz_eventuallyEq i G U hK hKA hzero ℓ (N+(R+2)+1) z hp + 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 => by + have hpouter : p ∈ tsupport (data.A.outer i) := subset_tsupport _ (by + change data.A.outer i p ≠ 0 + rw [data.A.outer_one i p hp] + norm_num) + have hh := hnall (chart (i : M) p) (houter ⟨p,hpouter,rfl⟩) + exact ⟨hh.1,norm_pos_iff.mp (hc.trans hh.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 => by + have hpouter : p ∈ tsupport (data.A.outer i) := subset_tsupport _ (by + change data.A.outer i p ≠ 0 + rw [data.A.outer_one i p hp] + norm_num) + have hh := hnall (chart (i : M) p) (houter ⟨p,hpouter,rfl⟩) + exact data.A.secondTensor_margin_of_primitive_normal i (hVs z) + (chart (i : M) p) hc hh.1 hh.2) hext + refine ⟨G,V,hG,hVs z,hclose,hmap,hVweighted',hvmap', + fun j => ((hfinal j).mono_order (by omega)).mono_const ?_, + hglobal.1,hglobal.2,hBglobal,hnall,hext⟩ + · 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/Correction/PrimitiveMeanStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveMeanStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..def6a0df19e9f241b182c9c285b09ab4b723a3b7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/PrimitiveMeanStep.lean @@ -0,0 +1,123 @@ +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! The normalized target and error in successive primitive mean steps. +The target is defined from the actual old mean metric; its next defect is +exactly the rescaled error of the constructed increment. -/ +noncomputable section +open scoped ContDiff +namespace ClosedSurfaceR4.PrimitiveRealization +open WeightedEstimates PhaseMean + +def normalizedMeanDefect (δ : ℝ) (γ P : SmallModes.Base → Tensor) : + SmallModes.Base → Tensor := fun x => (δ^2)⁻¹ • (γ x-P x)-γ x + +def primitiveMeanTarget (δ δ' : ℝ) (γ P : SmallModes.Base → Tensor) : + SmallModes.Base → Tensor := fun x => (δ^2)⁻¹ • (γ x-P x-δ'^2 • γ x) + +lemma primitiveMeanTarget_eq (δ δ' : ℝ) (γ P : SmallModes.Base → Tensor) : + primitiveMeanTarget δ δ' γ P = fun x => + γ x + normalizedMeanDefect δ γ P x - (δ'^2 / δ^2) • γ x := by + ext x k + simp only [primitiveMeanTarget,normalizedMeanDefect,Pi.add_apply,Pi.sub_apply,Pi.smul_apply, + smul_eq_mul] + ring + +lemma primitiveMeanTarget_smooth {δ δ' : ℝ} {γ P : SmallModes.Base → Tensor} + (hγ : ContDiff ℝ ∞ γ) (hP : ContDiff ℝ ∞ P) : + ContDiff ℝ ∞ (primitiveMeanTarget δ δ' γ P) := + ((hγ.sub hP).sub (hγ.const_smul (δ'^2))).const_smul _ + +lemma normalizedMeanDefect_smooth {δ : ℝ} {γ P : SmallModes.Base → Tensor} + (hγ : ContDiff ℝ ∞ γ) (hP : ContDiff ℝ ∞ P) : + ContDiff ℝ ∞ (normalizedMeanDefect δ γ P) := + ((hγ.sub hP).const_smul _).sub hγ + +lemma primitiveMeanTarget_identity {δ δ' : ℝ} (hδ : δ ≠ 0) + (γ P : SmallModes.Base → Tensor) : + (δ^2 : ℝ) • primitiveMeanTarget δ δ' γ P = γ-P-(δ'^2 : ℝ) • γ := by + ext x k + simp only [primitiveMeanTarget,Pi.sub_apply,Pi.smul_apply,smul_eq_mul] + field_simp + +lemma primitiveMeanTarget_distance {δ δ' : ℝ} {γ P : SmallModes.Base → Tensor} + {x : SmallModes.Base} {a b : ℝ} + (hD : ‖normalizedMeanDefect δ γ P x‖ ≤ a) (hγ : ‖γ x‖ ≤ b) : + ‖primitiveMeanTarget δ δ' γ P x - γ x‖ ≤ a + (δ'^2 / δ^2) * b := by + have hid : primitiveMeanTarget δ δ' γ P x - γ x = + normalizedMeanDefect δ γ P x - (δ'^2 / δ^2) • γ x := by + rw [primitiveMeanTarget_eq] + ext k + simp only [Pi.sub_apply,Pi.add_apply,Pi.smul_apply,smul_eq_mul] + ring + rw [hid] + calc + _ ≤ ‖normalizedMeanDefect δ γ P x‖ + ‖(δ'^2 / δ^2) • γ x‖ := norm_sub_le _ _ + _ = ‖normalizedMeanDefect δ γ P x‖ + (δ'^2 / δ^2) * ‖γ x‖ := by + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (div_nonneg (sq_nonneg δ') (sq_nonneg δ))] + _ ≤ _ := add_le_add hD (mul_le_mul_of_nonneg_left hγ + (div_nonneg (sq_nonneg δ') (sq_nonneg δ))) + +lemma primitiveMeanTarget_bound {U : Set SmallModes.Base} (hU : IsOpen U) + {γ P : SmallModes.Base → Tensor} (hγ : ContDiff ℝ ∞ γ) (hP : ContDiff ℝ ∞ P) + {δ δ' s A B : ℝ} {m : ℕ} (hδ : 0 < δ) (hδ' : 0 ≤ δ') (hδδ : δ' ≤ δ) + (hs : 0 ≤ s) (hA : 0 ≤ A) + (hγb : WeightedBound U s m A γ) + (hDb : WeightedBound U s m B (normalizedMeanDefect δ γ P)) : + WeightedBound U s m (2*A+B) (primitiveMeanTarget δ δ' γ P) := by + have hr : 0 ≤ δ'^2 / δ^2 := div_nonneg (sq_nonneg δ') (sq_nonneg δ) + have hr1 : δ'^2 / δ^2 ≤ 1 := (div_le_one (sq_pos_of_pos hδ)).2 (by nlinarith) + have hscaled := hγb.const_smul hU.uniqueDiffOn hγ.contDiffOn (δ'^2 / δ^2) + have hscaled' : WeightedBound U s m A (fun x => (δ'^2 / δ^2) • γ x) := by + apply hscaled.mono_const + rw [abs_of_nonneg hr] + exact mul_le_of_le_one_left hA hr1 + have hD := normalizedMeanDefect_smooth (δ := δ) hγ hP + have hb := (hγb.add hU.uniqueDiffOn hs hγ.contDiffOn hD.contDiffOn hDb).sub + hU.uniqueDiffOn hs (hγ.add hD).contDiffOn (hγ.const_smul _).contDiffOn hscaled' + have he : A+B+A = 2*A+B := by ring + rw [he] at hb + exact hb.congr (fun x _ => congrFun (primitiveMeanTarget_eq δ δ' γ P) x) + +lemma normalizedMeanDefect_after_step {U : Set SmallModes.Base} (hU : IsOpen U) + {γ P Q : SmallModes.Base → Tensor} (hγ : ContDiff ℝ ∞ γ) + (hP : ContDiff ℝ ∞ P) (hQ : ContDiff ℝ ∞ Q) + {δ δ' s C : ℝ} {m : ℕ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + (hb : WeightedBound U s m C (Q-P-(δ^2 : ℝ) • primitiveMeanTarget δ δ' γ P)) : + WeightedBound U s m (C / δ'^2) (normalizedMeanDefect δ' γ Q) := by + have hT := primitiveMeanTarget_smooth (δ := δ) (δ' := δ') hγ hP + have hsmooth : ContDiff ℝ ∞ (Q-P-(δ^2 : ℝ) • primitiveMeanTarget δ δ' γ P) := + (hQ.sub hP).sub (by + change ContDiff ℝ ∞ (fun x => (δ^2 : ℝ) • primitiveMeanTarget δ δ' γ P x) + exact hT.const_smul _) + have hh := hb.const_smul hU.uniqueDiffOn hsmooth.contDiffOn (-(δ'^2)⁻¹) + have hc : |-(δ'^2)⁻¹| * C = C/δ'^2 := by + rw [abs_neg,abs_of_pos (inv_pos.mpr (sq_pos_of_ne_zero hδ'))] + ring + rw [hc] at hh + apply hh.congr + intro x _ + ext k + simp only [normalizedMeanDefect,primitiveMeanTarget,Pi.sub_apply,Pi.smul_apply,smul_eq_mul] + field_simp + ring + +/-- A cutoff extension of the target gives the same next defect wherever +it agrees with the actual primitive mean target. -/ +lemma normalizedMeanDefect_after_local_step {U : Set SmallModes.Base} (hU : IsOpen U) + {γ P Q H : SmallModes.Base → Tensor} (hγ : ContDiff ℝ ∞ γ) + (hP : ContDiff ℝ ∞ P) (hQ : ContDiff ℝ ∞ Q) + {δ δ' s C : ℝ} {m : ℕ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + (hH : ∀ x ∈ U, H x = primitiveMeanTarget δ δ' γ P x) + (hb : WeightedBound U s m C (Q-P-(δ^2 : ℝ) • H)) : + WeightedBound U s m (C / δ'^2) (normalizedMeanDefect δ' γ Q) := by + apply normalizedMeanDefect_after_step hU hγ hP hQ hδ hδ' + exact hb.congr (fun x hx => by simp only [Pi.sub_apply,Pi.smul_apply,hH x hx]) + +end ClosedSurfaceR4.PrimitiveRealization + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledAtlasAdjustedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledAtlasAdjustedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..80eeabddbf4abcda14ca035fd4ab3c0def223668 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledAtlasAdjustedMean.lean @@ -0,0 +1,104 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Uniform finite mean adjustment from profiles, including varying base maps. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation +local instance profiledMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem profiled_atlas_adjusted_mean + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) + {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))) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ r D₀ : ℝ, 0 < r ∧ 1 ≤ D₀ ∧ D₀*r ≤ r₁ ∧ + ∃ β κ : ℕ → ℝ → ℝ, + ∀ C : ℕ → ℝ, (∀ m, 1 ≤ C m) → ∀ steps : ℕ, + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (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 → 0 ≤ ε → ε ≤ 1 → τ/s + ε/τ^loss ≤ η₀ → + ∀ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference), + (∀ i, (d i).Fits (p i)) → + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) → + (∀ 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) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) ∧ + (∀ x v v', u x v v' = u x v' v) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) u) ∧ + (∀ m, A.TensorWeightedBound s m + (δ^2 * (differenceBound L C β κ j m * (τ/s + ε/τ^loss)^(j+1))) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H)) := by + obtain ⟨D₀,hD₀,hall⟩ := A.uniform_atlas_mean_majorants_all_radii (R := R) p hρ reference href q + have hDpos : 0 < D₀ := zero_lt_one.trans_le hD₀ + let r := r₁/(2*D₀) + have hr : 0 < r := div_pos hr₁ (mul_pos (by norm_num) hDpos) + have hDr : D₀*r = r₁/2 := by dsimp [r]; field_simp + obtain ⟨hball,β,κ,hm⟩ := hall r hr.le + refine ⟨r,D₀,hr,hD₀,?_,β,κ,?_⟩ + · rw [hDr] + linarith + · intro C hC steps + obtain ⟨η₀,hη₀,hη₁,htall⟩ := A.tensor_finite_mean_substitution_uniform + (by linarith : r/2 < r) hC steps (B := β) (K := κ) + refine ⟨η₀,hη₀,hη₁,?_⟩ + intro s hs hs1 H hH hsym hH0 hHC ε τ hτ hτs hε hε1 hsmall d hfit hphase hcut hform hsup δ hδ j hj + have hη : 0 < τ/s + ε/τ^(Finset.univ.sup (fun i : A.centers => tensorLoss (P i))) := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨hu,hb,hsize,herror⟩ := htall s hs reference H hH hH0 hHC _ hη hsmall _ + (hm d hfit hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) j hj + have hsymu := A.tensorMeanTrial_symmetric H (A.atlasMean (fun i => (d i).mean hρ δ q)) hsym + (fun u _ => A.atlasMean_symmetric _ u) j + have hlocal (i : A.centers) := hball _ (A.tensorEncode_smooth hu) hb i + simp only [A.tensorDecode_encode] at hlocal + refine ⟨_,hu,hsymu,hb,hlocal,hsize,?_⟩ + intro m + exact A.charted_family_atlas_quadratic_residual d hρ Q w hw hphase hcut hform hsup + _ H hu hH hsymu hlocal hδ.ne' hτ.ne' q (herror m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledPolynomialSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledPolynomialSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..52b8cbf82abbb7169f261f7cf1433371681a91ce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ProfiledPolynomialSmallIncrement.lean @@ -0,0 +1,151 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InputPolynomialSmallIncrement +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 profiledPolynomialSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance profiledPolynomialSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance profiledPolynomialSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance profiledPolynomialSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance profiledPolynomialSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance profiledPolynomialSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem profiled_polynomial_atlas_small_increment + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (P : A.centers → Fin 3 → Fin nq → Expression) + (hP : ∀ i k l, (P i k l).SmoothCoeffs univ) + (hquad : A.PolynomialQuadraticRepresentation Pol P) + (hlin : A.PolynomialLinearRepresentation Pol P) + (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)) + (Ω : A.centers → Set JetPolynomial.Base) (hΩ : ∀ i, IsOpen (Ω i)) + (KΩ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hΩK : ∀ i, Ω i ⊆ KΩ i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ Ω i) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ Ω i) + (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 → 0 ≤ ε → ε ≤ 1 → + τ/s+ε/τ^(max (Finset.univ.sup (fun i : A.centers => tensorLoss (P i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i)))) ≤ η₀ → 0 < δ → δ ≤ τ → + ∀ d : ∀ i, ChartedMeanFamilyData (P i) ε τ 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+ε/τ^(max (Finset.univ.sup (fun i : A.centers => tensorLoss (P i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i)))))^(q+1)+δ^3/τ)) + (A.atlasPolynomialMetric Pol ε (G+X)-A.atlasPolynomialMetric Pol ε 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 ⟨ρ₀,hρ₀,hall⟩ := A.input_polynomial_small_increment_fixed_phase Pol hPol P hP hquad hlin F hF + (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) + (fun a => A.freeGlobalPhase_smooth d₀ a.1 a.2) hImm hgood Ω hΩ KΩ hΩK hweight houter + obtain ⟨B,T,hB,hT,hsmall⟩ := hall p hρ (fun _ => D₀*r) + (fun i => A.tensorPlaneRead i reference) 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ε1 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 + let lossP := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + let loss := max lossP (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i))) + let η := τ/s+ε/τ^loss + have hηP : τ/s+ε/τ^lossP ≤ η := by + apply add_le_add le_rfl + apply div_le_div_of_nonneg_left hε (pow_pos hτ _) + exact pow_le_pow_of_le_one hτ.le (hτs.trans hs1) (le_max_left _ _) + have hη0 : 0 ≤ η := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hηP0 : 0 ≤ τ/s+ε/τ^lossP := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨u,hu,_,_,hball,hsize,herror⟩ := hbuild ε τ hτ hτs hε hε1 (hηP.trans 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*η^(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 + apply hh.mono_const + have hp := pow_le_pow_left₀ hηP0 hηP (q+1) + calc + δ^2*(differenceBound L C β κ q m*(τ/s+ε/τ^lossP)^(q+1)) ≤ + δ^2*(E m*η^(q+1)) := mul_le_mul_of_nonneg_left + ((mul_le_mul_of_nonneg_right (le_max_right _ _) (pow_nonneg hηP0 _)).trans + (mul_le_mul_of_nonneg_left hp (hE m))) (sq_nonneg δ) + _ = _ := by ring + apply hsmall G hG b hb hbρ hclose d hfit _ hmap hτ hs hτs hs1 hε hε1 η hη0 (hη.trans hη₁) + le_rfl hd hK δ hδ hδτ u H hu hH hball hbu hmu + intro a + unfold freeGlobalPhase + rw [hphase a.1] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/QuadratureMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/QuadratureMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c7e81a299f762cbc1306a31fa6d370c78eb08c3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/QuadratureMean.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.Immersion.ClosedSurface.CrossModes + +namespace OAI + +/-! Recover the zero Fourier mode from two quadrature displacements. -/ +noncomputable section +open Set Complex +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.QuadraticMean + +lemma conjugate_I_smul {n : ℕ} (B : CVec n) : + conjugate (Complex.I • B) = (-Complex.I) • conjugate B := by + ext k + simp [conjugate,Pi.smul_apply,smul_eq_mul] + +lemma zeroPair_quadrature {n : ℕ} (θ : ℝ) (A B : CVec n) : + 2 * zeroPair A B = realMode θ A ⬝ᵥ realMode θ B + + realMode θ (Complex.I • A) ⬝ᵥ realMode θ (Complex.I • B) := by + have hc : (Complex.I • A) ⬝ᵥ conjugate (Complex.I • B) = A ⬝ᵥ conjugate B := by + rw [conjugate_I_smul,smul_dotProduct,dotProduct_smul] + simp [smul_eq_mul,← mul_assoc] + have hd : (Complex.I • A) ⬝ᵥ (Complex.I • B) = -(A ⬝ᵥ B) := by + rw [smul_dotProduct,dotProduct_smul] + simp [smul_eq_mul,← mul_assoc] + rw [realMode_self_phase,realMode_self_phase,hc,hd] + simp only [zeroPair,mul_neg,neg_re] + ring + +lemma derivativeAmplitude_const_smul {n : ℕ} {φ : Base → ℝ} {Z : Base → CVec n} + {p : Base} (hZ : DifferentiableAt ℝ Z p) (τ : ℝ) (c : ℂ) (v : Base) : + derivativeAmplitude τ φ (fun x => c • Z x) v p = c • derivativeAmplitude τ φ Z v p := by + unfold derivativeAmplitude + have hd : fderiv ℝ (fun x => c • Z x) p = c • fderiv ℝ Z p := + (hZ.hasFDerivAt.const_smul c).fderiv + rw [hd] + simp only [smul_apply,smul_add,smul_smul] + congr 1 + rw [mul_comm] + +end ClosedSurfaceR4.QuadraticMean +namespace ClosedSurfaceR4.RealModes +open QuadraticMean PhaseMean + +lemma phaseZeroTensor_quadrature {n : ℕ} {φ : SmallModes.Base → ℝ} + {Z : SmallModes.Base → QuadraticMean.CVec n} {p : SmallModes.Base} + (hφ : DifferentiableAt ℝ φ p) (hZ : DifferentiableAt ℝ Z p) (τ : ℝ) : + (2 : ℝ) • phaseZeroTensor τ φ Z p = + realMetricTensor (displacement τ φ Z) p + + realMetricTensor (displacement τ φ (fun x => Complex.I • Z x)) p := by + ext k + simp only [Pi.smul_apply,smul_eq_mul,Pi.add_apply,phaseZeroTensor,realMetricTensor_apply, + realMetric,SmallModes.coordDeriv] + have hi : DifferentiableAt ℝ (fun x => Complex.I • Z x) p := hZ.const_smul Complex.I + rw [derivative_displacement hφ hZ,derivative_displacement hφ hZ, + derivative_displacement hφ hi, + derivative_displacement hφ hi, + derivativeAmplitude_const_smul hZ,derivativeAmplitude_const_smul hZ] + exact zeroPair_quadrature _ _ _ + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialQuadraticBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialQuadraticBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..75bcd17716f38cba104b9cebd15e0f340a0dba06 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialQuadraticBounds.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Correction.RealPolynomialVariationBounds + +namespace OAI + +/-! Bilinear bounds for the mixed polynomial contribution of the free and +forced displacements. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates MixedExpression + +def quadraticCross {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G H K : Base → Space) (t : ℝ) : Base → ℝ := + fun p => (1 / 2 : ℝ) * (realVariation P ε ![G,H,K,0] 1 t p + + realVariation P ε ![G,K,H,0] 1 t p) + +lemma pairFamily_smooth {G H K : Base → Space} (hG : ContDiff ℝ ∞ G) + (hH : ContDiff ℝ ∞ H) (hK : ContDiff ℝ ∞ K) : + ∀ i, ContDiff ℝ ∞ (![G,H,K,0] i) := by + intro i + fin_cases i + · exact hG + · exact hH + · exact hK + · exact contDiff_const + +lemma realVariation_smooth {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hO : IsOpen O) (hP : ∀ l, (P l).SmoothCoeffs O) + {G : Fin 4 → Base → Space} (hG : ∀ j, ContDiff ℝ ∞ (G j)) + (hQ : Set.MapsTo (lowJet (G 0)) U O) (ε : ℝ) (i : Fin 3) (t : ℝ) : + ContDiffOn ℝ ∞ (realVariation P ε G i t) U := + ContDiffOn.sum fun l _ => contDiffOn_const.mul + (MixedExpression.parameter_smooth hG hQ ((P l).variations_smoothCoeffs hO (hP l) i) t) + +theorem quadraticCross_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (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 + order P) B (lowJet G) → + WeightedBound U s (m + order P) C H → WeightedBound U s (m + order P) D K → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * C * D / s ^ loss P) (quadraticCross P ε G H K t) := by + obtain ⟨E,hE,he⟩ := compact_real_variation_bound hU hO hQ hQO P hP m B hB + refine ⟨E,hE,?_⟩ + intro G H K s ε C D hs hs1 hε hε1 hC hD hG hH hK hGQ hGb hHb hKb t ht + have hh (X Y : Base → Space) (A B : ℝ) (hA : 0 < A) (hB : 0 < B) + (hX : ContDiff ℝ ∞ X) (hY : ContDiff ℝ ∞ Y) + (hbX : WeightedBound U s (m + order P) A X) + (hbY : WeightedBound U s (m + order P) B Y) : + WeightedBound U s m (E * ε * A * B / s ^ loss P) (realVariation P ε ![G,X,Y,0] 1 t) := by + have hb : ∀ j : Fin 3, WeightedBound U s (m + order P) (![A,B,1] j) (![G,X,Y,0] j.succ) := by + intro j + fin_cases j + · exact hbX + · exact hbY + · exact (weightedBound_zero U s (m + order P)).mono_const zero_le_one + have hx := he ![G,X,Y,0] s ε ![A,B,1] hs hs1 hε hε1 + (fun j => by fin_cases j; exact hA; exact hB; norm_num) + (pairFamily_smooth hG hX hY) hGQ hGb hb t ht 1 + simpa only [Matrix.cons_val_zero, Matrix.cons_val_one, show (1 : Fin 3) ≤ 1 by decide, + show ¬ (2 : Fin 3) ≤ 1 by decide, ↓reduceIte, mul_one, mul_assoc] using hx + have hsHK := realVariation_smooth hO hP (pairFamily_smooth hG hH hK) + (fun _ hp => hQO (hGQ hp)) ε 1 t + have hsKH := realVariation_smooth hO hP (pairFamily_smooth hG hK hH) + (fun _ hp => hQO (hGQ hp)) ε 1 t + have hb := (hh H K C D hC hD hH hK hHb hKb).add hU.uniqueDiffOn hs.le hsHK hsKH + (hh K H D C hD hC hK hH hKb hHb) + have hf := hb.const_smul hU.uniqueDiffOn (hsHK.add hsKH) (1 / 2 : ℝ) + change WeightedBound U s m _ (quadraticCross P ε G H K t) at hf + convert hf using 1 + rw [abs_of_pos (by norm_num : (0 : ℝ) < 1 / 2)] + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialVariationBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialVariationBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..31f1584777f78b29461ad5ca9a7cb61c88def2be --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/RealPolynomialVariationBounds.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationBounds +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedMultilinearVariations + +namespace OAI + +/-! Bounds for arbitrary real variations at the short scale. These are the +nonoscillatory estimates used for mixed terms and the Taylor remainder. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates MixedExpression + +def realVariation {n : ℕ} (P : Fin n → Expression) (ε : ℝ) + (G : Fin 4 → Base → Space) (i : Fin 3) (t : ℝ) : Base → ℝ := + fun p => ∑ l, ε ^ (l.val + 1) * ((P l).variations i).eval G (p,t) + +theorem compact_real_variation_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Fin 4 → Base → Space) (s ε : ℝ) (C : Fin 3 → ℝ), + 0 < s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → (∀ j, 0 < C j) → + (∀ j, ContDiff ℝ ∞ (G j)) → Set.MapsTo (lowJet (G 0)) U Q → + WeightedBound U s (m + order P) B (lowJet (G 0)) → + (∀ j : Fin 3, WeightedBound U s (m + order P) (C j) (G j.succ)) → + ∀ 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)) / s ^ loss P) + (realVariation P ε G i t) := by + have hex (l : Fin n) := (P l).compact_multilinear_variation_bound hU hO hQ hQO (hP l) m B hB + choose D hD hd using hex + refine ⟨∑ l, D l, Finset.sum_nonneg (fun l _ => hD l), ?_⟩ + intro G s ε C hs hs1 hε hε1 hC hG hGQ hGb hHb 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 h0 := (hC 0).le + have h1 := (hC 1).le + have h2 := (hC 2).le + dsimp only [W] + split_ifs <;> positivity + have hv (l : Fin n) : WeightedBound U s m (D l * ε * W / s ^ loss P) + (fun p => ε ^ (l.val + 1) * ((P l).variations i).eval G (p,t)) := by + have hDl := hD l + have ho : (P l).order ≤ order P := Finset.le_sup (f := fun k => (P k).order) (Finset.mem_univ l) + have hh := hd l G s C hs hs1 hC hG hGQ + (hGb.mono_order (Nat.add_le_add_left ho m)) + (fun j => (hHb j).mono_order (Nat.add_le_add_left ho m)) t ht i + have hsmall := hh.mono_const (div_le_div_of_nonneg_left (mul_nonneg (hD l) hW) (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 + (Finset.le_sup (f := fun k => (P k).loss + 6) (Finset.mem_univ l)))) + have hsm := MixedExpression.parameter_smooth hG (fun p hp => hQO (hGQ hp)) + (e := (P l).variations i) ((P l).variations_smoothCoeffs hO (hP l) i) t + have hscaled := hsmall.const_smul hU.uniqueDiffOn hsm (ε ^ (l.val + 1)) + apply hscaled.mono_const + rw [abs_of_nonneg (pow_nonneg hε _)] + have he : ε ^ (l.val + 1) ≤ ε := by + simpa only [pow_one] using pow_le_pow_of_le_one hε hε1 (show 1 ≤ l.val + 1 by omega) + calc + _ ≤ ε * (D l * W / s ^ loss P) := mul_le_mul_of_nonneg_right he (by positivity) + _ = _ := by ring + have hh := WeightedBound.finset_sum hU.uniqueDiffOn hs.le Finset.univ + (fun l => D l * ε * W / s ^ loss P) + (fun l p => ε ^ (l.val + 1) * ((P l).variations i).eval G (p,t)) + (fun l _ => contDiffOn_const.mul (MixedExpression.parameter_smooth hG (fun p hp => hQO (hGQ hp)) + (e := (P l).variations i) ((P l).variations_smoothCoeffs hO (hP l) i) t)) + (fun l _ => hv l) + change WeightedBound U s m ((∑ l, D l) * ε * W / s ^ loss P) + (fun p => ∑ l, ε ^ (l.val + 1) * ((P l).variations i).eval G (p,t)) + simpa only [← Finset.sum_div, ← Finset.sum_mul] using hh + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredLinearizedMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredLinearizedMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..02a576a93cfb150a1f9cce8d76a5a9ff3065f514 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredLinearizedMetric.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.VectorReadDifferential +import OAI.Geometry.SurfaceImmersion.Geometry.RestoredMetricTensor + +namespace OAI + +/-! Exact globalization of the actual metric linearization. The local +base map is the constructed smooth representative of the global map. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4 + +lemma euclidean_linearized_coordinate_value (F U : SmallModes.Base → Space) + {y : SmallModes.Base} (hF : DifferentiableAt ℝ F y) (hU : DifferentiableAt ℝ U y) + (v w : SmallModes.Base) : + PhaseMean.evaluate (RealModes.realLinearizedTensor (spaceCoordinates ∘ F) (spaceCoordinates ∘ U) y) v w = + inner ℝ (fderiv ℝ F y v) (fderiv ℝ U y w) + + inner ℝ (fderiv ℝ U y v) (fderiv ℝ F y w) := by + rw [RealModes.evaluate_realLinearizedTensor] + simp only [RealModes.realLinearized,SmallModes.coordDeriv] + rw [(spaceCoordinates.hasFDerivAt.comp y hF.hasFDerivAt).fderiv, + (spaceCoordinates.hasFDerivAt.comp y hU.hasFDerivAt).fderiv] + simp only [ContinuousLinearMap.comp_apply] + change spaceCoordinates (fderiv ℝ F y v) ⬝ᵥ spaceCoordinates (fderiv ℝ U y w) + + spaceCoordinates (fderiv ℝ F y w) ⬝ᵥ spaceCoordinates (fderiv ℝ U y v) = _ + rw [spaceCoordinates_dot,spaceCoordinates_dot] + congr 1 + exact real_inner_comm _ _ + +namespace FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation +local instance restoredLinearFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredLinearFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredLinearDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredLinearDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredLinearSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredLinearSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem restored_linearized_metric (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)) : + linearMetricTensor F (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (RealModes.realLinearizedTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) + (spaceCoordinates ∘ f) (planeCoordinateIsometry y))) := by + funext p + ext v w + by_cases hp : p ∈ (chart (i : M)).source + · rw [linearMetricTensor_apply,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 + change planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap + (surfaceDifferential (chart (i : M)) p v) = _ at hv + change planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap + (surfaceDifferential (chart (i : M)) p w) = _ at hw + rw [euclidean_linearized_coordinate_value _ _ + ((A.vectorPlaneRead_smooth i hF).differentiable (by simp) _) (hf.differentiable (by simp) _)] + have hu := A.restore_plane_mfderiv i f hsp hp (hf.differentiable (by simp) _) + change surfaceDifferential (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) p = + (fderiv ℝ f (planeCoordinateIsometry (chart (i : M) p))).comp + (planeCoordinateIsometry.toContinuousLinearEquiv.toContinuousLinearMap.comp + (surfaceDifferential (chart (i : M)) p)) at hu + unfold linearMetricForm + rw [hu] + by_cases hs : p ∈ tsupport (A.weight i) + · rw [A.vectorPlaneRead_differential i hF hs,A.outer_one i p hs,one_mul] + simp only [ContinuousLinearMap.comp_apply,hv,hw] + 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)) + rw [fderiv_of_notMem_tsupport ℝ hn] + simp only [ContinuousLinearMap.zero_comp,zero_apply,inner_zero_left,inner_zero_right,add_zero,mul_zero] + · have hs : p ∉ tsupport (A.weight i) := fun h => hp (A.weight_support i h) + have hu := surfaceDifferential_zero_off_support + (restore (i : M) (A.outer i) (f ∘ planeCoordinateIsometry)) + (fun h => hs (A.restore_plane_tsupport i f hsp h)) + have ho : A.outer i p = 0 := image_eq_zero_of_notMem_tsupport + (fun h => hp (A.outer_support i h)) + simp only [linearMetricTensor_apply,linearMetricForm,hu,zero_apply,inner_zero_left, + inner_zero_right,add_zero,bundleRestore,ho,zero_smul] + +end SmoothingAtlas +end FiniteOrderSmoothing +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredPolynomialModeMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredPolynomialModeMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..efbe3f934fbc027857a26f81532f5d9929187a13 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredPolynomialModeMean.lean @@ -0,0 +1,141 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPolynomialModeMean +import OAI.Geometry.SurfaceImmersion.Correction.RestoredQuadratureMean + +namespace OAI + +/-! The full quadratic global interaction has one supported family of +oscillatory targets, including the polynomial perturbation. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean +local instance restoredPolynomialMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredPolynomialMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredPolynomialMeanDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredPolynomialMeanDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredPolynomialMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredPolynomialMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + + + + +lemma real_restored_polynomial_quadratic {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε : ℝ) + (i : A.centers) (X : RealModes.RField 4) (hX : ContDiff ℝ ∞ X) + (hsp : tsupport X ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + A.atlasPolynomialQuadratic P ε F + (spaceCoordinates.symm ∘ restore (i : M) (A.outer i) (X ∘ planeCoordinateIsometry)) = + A.bundleRestore A.tensorTriv i (fun x => fiberFromThree + (coordinateQuadraticPolynomial (Q i) ε (A.jetChartMap i F) X 0 + (planeCoordinateIsometry x))) := by + let W := restore (i : M) (A.outer i) + ((spaceCoordinates.symm ∘ X) ∘ planeCoordinateIsometry) + have hW : ContMDiff planeModel spaceModel ∞ W := restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) + ((spaceCoordinates.symm.contDiff.comp hX).comp planeCoordinateIsometry.contDiff) + have he : W = spaceCoordinates.symm ∘ + restore (i : M) (A.outer i) (X ∘ planeCoordinateIsometry) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source <;> + simp [W,restore,hp,Function.comp_apply,map_smul] + have hj : A.jetChartMap i W ∘ planeCoordinateIsometry.symm = X := by + rw [A.jetChartMap_restored_direction i X hsp] + funext x + simp only [Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + rw [← he] + apply A.restored_polynomial_quadratic P i (Q i) F X hsp ε + intro x hx + have hr := hrep F W hF hW i x hx ε + simpa only [hj] using hr + +theorem restored_polynomial_mode_mean {n : A.centers → ℕ} {m : ℕ} + (P : ∀ j : A.centers, Fin 3 → Fin (n j) → Expression) + (Q : A.centers → Fin 3 → Fin m → Expression) + (hrep : A.PolynomialQuadraticRepresentation P Q) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) (ε τ : ℝ) + (i : A.centers) (φ : SmallModes.Base → ℝ) (Z : SmallModes.Base → Fin 4 → ℂ) + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) + (hs : tsupport Z ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + let Φ := restore (i : M) (A.outer i) (φ ∘ planeCoordinateIsometry) + let W := restore (i : M) (A.outer i) (Z ∘ planeCoordinateIsometry) + A.polynomialModeMean Q F ε τ Φ W = + A.bundleRestore A.tensorTriv i (fun y => fiberFromThree + (fun k => quadraticMeanCoefficient (Q i k) ε (A.jetChartMap i F) + (φ ∘ planeCoordinateIsometry) (Z ∘ planeCoordinateIsometry) τ 0 y)) := by + dsimp only + let Φ := restore (i : M) (A.outer i) (φ ∘ planeCoordinateIsometry) + let W := restore (i : M) (A.outer i) (Z ∘ planeCoordinateIsometry) + let ZI := fun x => Complex.I • Z x + have hΦ : ContMDiff planeModel 𝓘(ℝ) ∞ Φ := restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) (hφ.comp planeCoordinateIsometry.contDiff) + have hW : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ W := restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) (hZ.comp planeCoordinateIsometry.contDiff) + have hZI : ContDiff ℝ ∞ ZI := (contDiff_const (c := Complex.I)).smul hZ + have hsI : tsupport ZI ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (tsupport_smul_subset_right (fun _ => Complex.I) Z).trans hs + have hWI : (fun p => Complex.I • W p) = + restore (i : M) (A.outer i) (ZI ∘ planeCoordinateIsometry) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · simp only [W,ZI,restore,indicator_of_mem hp,Function.comp_apply] + exact smul_comm _ _ _ + · simp only [W,restore,indicator_of_notMem hp,smul_zero] + have hdisp := contDiffOn_univ.mp (RealModes.contDiffOn_displacement hφ.contDiffOn hZ.contDiffOn τ) + have hdispI := contDiffOn_univ.mp (RealModes.contDiffOn_displacement hφ.contDiffOn hZI.contDiffOn τ) + have hsdisp := (surfaceMode_tsupport τ φ Z).trans hs + have hsdispI := (surfaceMode_tsupport τ φ ZI).trans hsI + have he := A.polynomial_mode_quadrature P Q hrep F hF ε τ Φ W hΦ hW + rw [hWI,← A.restore_displacement i τ φ Z hs,← A.restore_displacement i τ φ ZI hsI, + A.real_restored_polynomial_quadratic P Q hrep F hF ε i _ hdisp hsdisp, + A.real_restored_polynomial_quadratic P Q hrep F hF ε i _ hdispI hsdispI] at he + have hc : + (fun y => fiberFromThree (coordinateQuadraticPolynomial (Q i) ε (A.jetChartMap i F) + (QuadraticMean.displacement τ φ Z) 0 (planeCoordinateIsometry y)))+ + (fun y => fiberFromThree (coordinateQuadraticPolynomial (Q i) ε (A.jetChartMap i F) + (QuadraticMean.displacement τ φ ZI) 0 (planeCoordinateIsometry y))) = + (2 : ℝ) • (fun y => fiberFromThree (fun k => + quadraticMeanCoefficient (Q i k) ε (A.jetChartMap i F) + (φ ∘ planeCoordinateIsometry) (Z ∘ planeCoordinateIsometry) τ 0 y)) := by + have hq := coordinate_polynomial_quadrature (Q i) ε (A.jetChartMap i F) + (hφ.comp planeCoordinateIsometry.contDiff) (hZ.comp planeCoordinateIsometry.contDiff) τ 0 + have hφback : coordinatePhase (φ ∘ planeCoordinateIsometry) = φ := by + funext x + simp only [coordinatePhase,Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + have hZback : coordinateAmplitude (Z ∘ planeCoordinateIsometry) = Z := by + funext x + simp only [coordinateAmplitude,Function.comp_apply,planeCoordinateIsometry.apply_symm_apply] + have hZIback : coordinateAmplitude (fun p => Complex.I • (Z ∘ planeCoordinateIsometry) p) = ZI := by + funext x + simp only [coordinateAmplitude,Function.comp_apply,planeCoordinateIsometry.apply_symm_apply,ZI] + rw [hφback,hZback,hZIback] at hq + funext y + change fiberFromThree _ + fiberFromThree _ = (2 : ℝ) • fiberFromThree _ + rw [← map_add] + have hh := congrFun hq (planeCoordinateIsometry y) + simp only [Pi.add_apply,Pi.smul_apply,planeCoordinateIsometry.symm_apply_apply] at hh + rw [hh,map_smul] + rw [← A.bundleRestore_add,hc,A.bundleRestore_smul] at he + have hh := congrArg (fun X => (1/2 : ℝ) • X) he + simpa only [smul_smul,show (1/2 : ℝ)*2 = 1 by norm_num,one_smul] using hh.symm + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredQuadratureMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredQuadratureMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..bae763e531504bfc6f56b09d9e1a6f427b3920ca --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/RestoredQuadratureMean.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.RealRestoredMetric +import OAI.Geometry.SurfaceImmersion.Correction.GlobalQuadraticModes + +namespace OAI + +/-! Transport the actual zero Fourier coefficient through supported atlas restoration. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation + +local instance restoredMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance restoredMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance restoredMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance restoredMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance restoredMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance restoredMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem restored_zeroPhase (i : A.centers) (τ : ℝ) + (φ : SmallModes.Base → ℝ) (Z : SmallModes.Base → Fin 4 → ℂ) + (hφ : ContDiff ℝ ∞ φ) (hZ : ContDiff ℝ ∞ Z) + (hs : tsupport Z ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base)) : + let Φ := restore (i : M) (A.outer i) (φ ∘ planeCoordinateIsometry) + let W := restore (i : M) (A.outer i) (Z ∘ planeCoordinateIsometry) + A.tensorPlaneRestore (fun j x => (A.planeWeight j x)^2 • + RealModes.phaseZeroTensor τ (A.vectorPlaneRead j Φ) (A.vectorPlaneRead j W) x) = + A.bundleRestore A.tensorTriv i (fun y => + fiberFromThree (RealModes.phaseZeroTensor τ φ Z (planeCoordinateIsometry y))) := by + dsimp only + let Φ := restore (i : M) (A.outer i) (φ ∘ planeCoordinateIsometry) + let W := restore (i : M) (A.outer i) (Z ∘ planeCoordinateIsometry) + let ZI := fun x => Complex.I • Z x + have hΦ : ContMDiff planeModel 𝓘(ℝ) ∞ Φ := restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) (hφ.comp planeCoordinateIsometry.contDiff) + have hW : ContMDiff planeModel 𝓘(ℝ,Fin 4 → ℂ) ∞ W := restore_smooth (i : M) + (A.outer_smooth i) (A.outer_support i) (hZ.comp planeCoordinateIsometry.contDiff) + have hZI : ContDiff ℝ ∞ ZI := (contDiff_const (c := Complex.I)).smul hZ + have hsI : tsupport ZI ⊆ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (tsupport_smul_subset_right (fun _ => Complex.I) Z).trans hs + have hWI : (fun p => Complex.I • W p) = + restore (i : M) (A.outer i) (ZI ∘ planeCoordinateIsometry) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · simp only [W,ZI,restore,indicator_of_mem hp,Function.comp_apply] + exact smul_comm _ _ _ + · simp only [W,restore,indicator_of_notMem hp,smul_zero] + have hdisp := contDiffOn_univ.mp (RealModes.contDiffOn_displacement hφ.contDiffOn hZ.contDiffOn τ) + have hdispI := contDiffOn_univ.mp (RealModes.contDiffOn_displacement hφ.contDiffOn hZI.contDiffOn τ) + have hsdisp : tsupport (QuadraticMean.displacement τ φ Z) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (surfaceMode_tsupport τ φ Z).trans hs + have hsdispI : tsupport (QuadraticMean.displacement τ φ ZI) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := + (surfaceMode_tsupport τ φ ZI).trans hsI + have he := A.global_zeroPhase_quadrature τ Φ W hΦ hW + rw [hWI,← A.restore_displacement i τ φ Z hs,← A.restore_displacement i τ φ ZI hsI, + A.real_restored_metric i _ hdisp hsdisp,A.real_restored_metric i _ hdispI hsdispI] at he + have hc : + (fun y => fiberFromThree (RealModes.realMetricTensor (QuadraticMean.displacement τ φ Z) + (planeCoordinateIsometry y))) + + (fun y => fiberFromThree (RealModes.realMetricTensor (QuadraticMean.displacement τ φ ZI) + (planeCoordinateIsometry y))) = + (2 : ℝ) • (fun y => fiberFromThree (RealModes.phaseZeroTensor τ φ Z (planeCoordinateIsometry y))) := by + funext y + change fiberFromThree _ + fiberFromThree _ = (2 : ℝ) • fiberFromThree _ + rw [← map_add,← RealModes.phaseZeroTensor_quadrature + (hφ.differentiable (by simp) _) (hZ.differentiable (by simp) _) τ,map_smul] + rw [← A.bundleRestore_add,hc,A.bundleRestore_smul] at he + funext p + ext v w + have hv := congrArg (fun T => T p v w) he + change (2 : ℝ) * _ = 2 * _ at hv + exact mul_left_cancel₀ (by norm_num : (2 : ℝ) ≠ 0) hv + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/ShiftedSmoothingBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/ShiftedSmoothingBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..93d1a6a74b5e7c2bbefc7b82536b88a834c072c1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/ShiftedSmoothingBounds.lean @@ -0,0 +1,144 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTailBounds + +namespace OAI + +/-! Smoothing bounds with an unweighted finite derivative prefix. In the +correction scheme the map has prefix order two and the metric defect order zero. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates MeasureTheory +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def ShiftedBound (q m : ℕ) (s C : ℝ) (f : Base → V) : Prop := + ∀ j ≤ q + m, ∀ x, s ^ (j - q) * ‖iteratedFDeriv ℝ j f x‖ ≤ C + +lemma ShiftedBound.deriv_le {q m : ℕ} {s C : ℝ} {f : Base → V} + (h : ShiftedBound q m s C f) (hs : 0 < s) {j : ℕ} (hj : j ≤ q + m) (x : Base) : + ‖iteratedFDeriv ℝ j f x‖ ≤ C / s ^ (j - q) := by + apply (le_div_iff₀ (pow_pos hs _)).mpr + simpa only [mul_comm] using h j hj x + +/-- An unweighted prefix of any lower order is controlled by a shifted bound. -/ +lemma ShiftedBound.prefix {q m : ℕ} {s C : ℝ} {f : Base → V} + (h : ShiftedBound q m s C f) (hs : 0 < s) (hs1 : s ≤ 1) (hC : 0 ≤ C) + {j : ℕ} (hj : j ≤ q + m) : + WeightedBound Set.univ 1 j (C / s ^ (j - q)) f := by + intro i hi x _ + simp only [one_pow, one_mul, iteratedFDerivWithin_univ] + apply (h.deriv_le hs (hi.trans hj) x).trans + exact div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (Nat.sub_le_sub_right hi q)) + +/-- No derivative in the unweighted prefix incurs a smoothing-scale loss. -/ +theorem finiteSmooth_shifted_gain (r q m : ℕ) {s C : ℝ} (hs : 0 < s) + (hC : 0 ≤ C) {f : Base → V} (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) + (hb : WeightedBound Set.univ 1 q C f) : + ShiftedBound q m s + (((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) + weightedGainConstant r m) * C) + (finiteSmooth r s f) := by + intro j hj x + by_cases hjq : j ≤ q + · have hi : ∀ y, ‖iteratedFDeriv ℝ j f y‖ ≤ C := fun y => by + simpa only [one_pow, one_mul, iteratedFDerivWithin_univ] using hb j hjq y (Set.mem_univ y) + have h := finiteSmooth_bounded r j hs hf hc hi x + rw [Nat.sub_eq_zero_of_le hjq, pow_zero, one_mul] + apply h.trans + exact mul_le_mul_of_nonneg_right + (le_add_of_nonneg_right (weightedGainConstant_nonneg r m)) hC + · have hi : ∀ y, ‖iteratedFDeriv ℝ q f y‖ ≤ C := fun y => by + simpa only [one_pow, one_mul, iteratedFDerivWithin_univ] using hb q le_rfl y (Set.mem_univ y) + have h := finiteSmooth_gain_from_derivatives r q (j - q) hs hf hc hi x + rw [Nat.add_sub_of_le (by omega : q ≤ j)] at h + have hsum : gainConstant r (j - q) ≤ weightedGainConstant r m := + Finset.single_le_sum (fun i _ => gainConstant_nonneg r i) (Finset.mem_range.mpr (by omega)) + calc + _ ≤ s ^ (j - q) * ((s ^ (j - q))⁻¹ * gainConstant r (j - q) * C) := + mul_le_mul_of_nonneg_left h (pow_nonneg hs.le _) + _ = gainConstant r (j - q) * C := by field_simp + _ ≤ (((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) + weightedGainConstant r m) * C) := by + apply mul_le_mul_of_nonneg_right _ hC + exact hsum.trans (le_add_of_nonneg_left (by positivity)) + +/-- The original shifted norm remains bounded independently of the smoothing scale. -/ +theorem finiteSmooth_shifted_bounded (r q m : ℕ) {s t C : ℝ} + (hs : 0 < s) (ht : 0 < t) {f : Base → V} + (hf : ContDiff ℝ ∞ f) (hc : HasCompactSupport f) + (hb : ShiftedBound q m t C f) : + ShiftedBound q m t ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) + (finiteSmooth r s f) := by + intro j hj x + have h := finiteSmooth_bounded r j hs hf hc (fun y => hb.deriv_le ht hj y) x + calc + _ ≤ t ^ (j - q) * ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * + (C / t ^ (j - q))) := mul_le_mul_of_nonneg_left h (pow_nonneg ht.le _) + _ = _ := by field_simp + +variable [CompleteSpace V] + +/-- A finite shifted input order suffices for the approximation term. Higher +input derivatives occur linearly, with the two-scale decaying factor. -/ +theorem shifted_smoothing_tail (r q m : ℕ) {s t τ B C : ℝ} + (hτ : 0 < τ) (hτs : τ ≤ s) (hst : s ≤ t) (ht1 : t ≤ 1) + (hB : 0 ≤ B) (hC : 0 ≤ C) {f : Base → V} + (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hBr : ShiftedBound q r t B f) (hCm : ShiftedBound q m t C f) : + ShiftedBound q m τ + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (f - finiteSmooth r s f) := by + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hτt : τ ≤ t := hτs.trans hst + have hprefix := hBr.prefix ht ht1 hB (j := q + r) le_rfl + intro j hj x + by_cases hjr : j - q ≤ r + · have hbr : ∀ y, ‖iteratedFDeriv ℝ (min j q + r) f y‖ ≤ B / t ^ r := fun y => by + have h := hprefix.deriv_le (by norm_num) (show min j q + r ≤ q + r by omega) + (Set.mem_univ y) + simpa only [one_pow, div_one, iteratedFDerivWithin_univ, Nat.add_sub_cancel_left] using h + have h := finiteSmooth_approximation r (min j q) (j - q) hjr hs hf hfc hbr x + rw [show min j q + (j - q) = j by omega] at h + have hp : τ ^ (j - q) * s ^ (r - (j - q)) ≤ s ^ r := by + calc + _ ≤ s ^ (j - q) * s ^ (r - (j - q)) := mul_le_mul_of_nonneg_right + (pow_le_pow_left₀ hτ.le hτs _) (pow_nonneg hs.le _) + _ = _ := by rw [← pow_add, Nat.add_sub_of_le hjr] + calc + _ ≤ τ ^ (j - q) * (approximationConstant r (j - q) * + s ^ (r - (j - q)) * (B / t ^ r)) := + mul_le_mul_of_nonneg_left h (pow_nonneg hτ.le _) + _ = (approximationConstant r (j - q) * B / t ^ r) * + (τ ^ (j - q) * s ^ (r - (j - q))) := by ring + _ ≤ (approximationConstant r (j - q) * B / t ^ r) * s ^ r := + mul_le_mul_of_nonneg_left hp (div_nonneg + (mul_nonneg (approximationConstant_nonneg _ _) hB) (pow_nonneg ht.le _)) + _ = approximationConstant r (j - q) * (B * (s / t) ^ r) := by rw [div_pow]; ring + _ ≤ tailConstant r * (B * (s / t) ^ r) := + mul_le_mul_of_nonneg_right (approximationConstant_le_tail hjr) (by positivity) + _ ≤ _ := mul_le_mul_of_nonneg_left (le_add_of_nonneg_right (by positivity)) + (tailConstant_nonneg r) + · have hbc := fun y => hCm.deriv_le ht hj y + have h := iterated_residual_bounded hs r j hf hfc hbc x + rw [error_finiteSmooth] + have hp : (τ / t) ^ (j - q) ≤ (τ / t) ^ r := + pow_le_pow_of_le_one (by positivity) ((div_le_one ht).mpr hτt) (by omega) + calc + _ ≤ τ ^ (j - q) * ((1 + ∫ y, ‖kernel 0 y‖) ^ r * (C / t ^ (j - q))) := + mul_le_mul_of_nonneg_left h (pow_nonneg hτ.le _) + _ = (1 + ∫ y, ‖kernel 0 y‖) ^ r * C * (τ / t) ^ (j - q) := by rw [div_pow]; ring + _ ≤ (1 + ∫ y, ‖kernel 0 y‖) ^ r * C * (τ / t) ^ r := + mul_le_mul_of_nonneg_left hp (by positivity) + _ ≤ tailConstant r * (C * (τ / t) ^ r) := by + rw [mul_assoc] + exact mul_le_mul_of_nonneg_right (residualConstant_le_tail r) (by positivity) + _ ≤ _ := mul_le_mul_of_nonneg_left (le_add_of_nonneg_left (by positivity)) + (tailConstant_nonneg r) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCircularRadius.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCircularRadius.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d6433a0c049021b39d5427f961c2f19b4ede7d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCircularRadius.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CircularBoundaryParam +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasJetCoordinateRelation + +namespace OAI + +/-! A smooth global radius field agrees with the actual squared coordinate +radius near every strictly smaller disk boundary. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseGeometry +open JetPolynomial (planeCoordinateIsometry) +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] [IsManifold planeModel ∞ M] +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def circularRadiusField (i : A.centers) : M → ℝ := + restore (i : M) (A.outer i) + (circularRadiusSquared (coordinateChart (i : M) (i : M)) ∘ planeCoordinateIsometry) + +lemma circularRadiusField_smooth (i : A.centers) : + ContMDiff planeModel 𝓘(ℝ) ∞ (A.circularRadiusField i) := + restore_smooth (i : M) (A.outer_smooth i) (A.outer_support i) + ((circularRadiusSquared_smooth _).comp planeCoordinateIsometry.contDiff) + +lemma circularRadiusField_germ (i : A.centers) {p : M} (hp : A.weight i p ≠ 0) : + A.circularRadiusField i =ᶠ[𝓝 p] + (fun x => circularRadiusSquared (coordinateChart (i : M) (i : M)) (coordinateChart (i : M) x)) := by + have hs : p ∈ (chart (i : M)).source := A.weight_support i (subset_tsupport _ hp) + filter_upwards [(chart (i : M)).open_source.mem_nhds hs, + A.outer_eventually_one_of_weight_ne_zero i hp] with x hx ho + simp only [circularRadiusField,restore,indicator_of_mem hx,ho,one_smul,Function.comp_apply] + rfl + +lemma circularBoundary_weight_pos (i : A.centers) {r r0 : ℝ} + (hsmall : r^2 < r0^2) + (hpos : ∀ x, 0 < A.weight i x ↔ x ∈ circularCoordinateDisk (i : M) r0) + {p : M} (hp : p ∈ circularBoundary (i : M) r) : 0 < A.weight i p := by + apply (hpos p).mpr + exact ⟨hp.1,by change circularRadiusSquared _ _ < r0^2; rw [hp.2]; exact hsmall⟩ + +lemma circularBoundary_radiusField (i : A.centers) {r r0 : ℝ} + (hsmall : r^2 < r0^2) + (hpos : ∀ x, 0 < A.weight i x ↔ x ∈ circularCoordinateDisk (i : M) r0) + {p : M} (hp : p ∈ circularBoundary (i : M) r) : + A.circularRadiusField i p = r^2 := by + rw [(A.circularRadiusField_germ i (A.circularBoundary_weight_pos i hsmall hpos hp).ne').eq_of_nhds] + exact hp.2 + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCoverCutoff.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCoverCutoff.lean new file mode 100644 index 0000000000000000000000000000000000000000..61ebc7b05b5c12502d2c2e23b7cd20378730e2bb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothCoverCutoff.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.Immersion.ClosedSurface.MetricModel +import Mathlib.Geometry.Manifold.PartitionOfUnity + +namespace OAI + +/-! A smooth two-set cutoff with closed supports inside the prescribed +open cover of the compact surface. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology +namespace ClosedSurfaceR4 +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [T2Space M] [CompactSpace M] + +theorem smooth_cover_cutoff {U V : Set M} (hU : IsOpen U) (hV : IsOpen V) + (hcover : U ∪ V = univ) : + ∃ χ : M → ℝ, ContMDiff planeModel 𝓘(ℝ) ∞ χ ∧ + tsupport χ ⊆ U ∧ tsupport (fun p => 1-χ p) ⊆ V ∧ + ∀ p, χ p ∈ Icc (0 : ℝ) 1 := by + have hd : Disjoint Uᶜ Vᶜ := by + apply disjoint_left.mpr + intro p hpU hpV + have hp : p ∈ U ∪ V := by rw [hcover]; trivial + exact hp.elim hpU hpV + obtain ⟨χ,hzero,hone,hrange⟩ := exists_contMDiffMap_zero_one_nhds_of_isClosed + planeModel hU.isClosed_compl hV.isClosed_compl hd (n := (⊤ : ℕ∞)) + refine ⟨χ,χ.contMDiff,?_,?_,hrange⟩ + · intro p hp + by_contra hnot + have hz : (χ : M → ℝ) =ᶠ[𝓝 p] 0 := hzero.filter_mono (nhds_le_nhdsSet hnot) + exact (notMem_tsupport_iff_eventuallyEq.mpr hz) hp + · intro p hp + by_contra hnot + have ho := hone.filter_mono (nhds_le_nhdsSet hnot) + have hz : (fun q => 1-χ q) =ᶠ[𝓝 p] (0 : M → ℝ) := by + filter_upwards [ho] with q hq + simp only [hq,sub_self,Pi.zero_apply] + exact (notMem_tsupport_iff_eventuallyEq.mpr hz) hp + +end ClosedSurfaceR4 + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothMetricGauss.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothMetricGauss.lean new file mode 100644 index 0000000000000000000000000000000000000000..8de9fe6eb0fa0cd1e056c992aadb790c4fa31bd5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothMetricGauss.lean @@ -0,0 +1,54 @@ +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_smoothOn {U : Set Base} + {E F G a b c d : Base → ℝ} (hE : ContDiffOn ℝ ∞ E U) (hF : ContDiffOn ℝ ∞ F U) + (hG : ContDiffOn ℝ ∞ G U) (ha : ContDiffOn ℝ ∞ a U) (hb : ContDiffOn ℝ ∞ b U) + (hc : ContDiffOn ℝ ∞ c U) (hd : ContDiffOn ℝ ∞ d U) + (hdet : ∀ x ∈ U, E x*G x-(F x)^2 ≠ 0) : + ContDiffOn ℝ ∞ (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_smoothOn {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) : + ContDiffOn ℝ ∞ (coordinateGauss E F G) U := by + have he₁ := (scalar_partial_smooth hE dx).contDiffOn (s := U) + have he₂ := (scalar_partial_smooth hE dy).contDiffOn (s := U) + have hf₁ := (scalar_partial_smooth hF dx).contDiffOn (s := U) + have hf₂ := (scalar_partial_smooth hF dy).contDiffOn (s := U) + have hg₁ := (scalar_partial_smooth hG dx).contDiffOn (s := U) + have hg₂ := (scalar_partial_smooth hG dy).contDiffOn (s := U) + have hraw : ContDiffOn ℝ ∞ (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 ((contDiffOn_const.mul + (scalar_partial_smooth (scalar_partial_smooth hF dy) dx).contDiffOn).sub + (scalar_partial_smooth (scalar_partial_smooth hE dy) dy).contDiffOn |>.sub + (scalar_partial_smooth (scalar_partial_smooth hG dx) dx).contDiffOn).div_const 2 + exact (hraw.sub (inverseMetricPair_smoothOn hE.contDiffOn + hF.contDiffOn hG.contDiffOn (he₁.div_const 2) + (hf₁.sub (he₂.div_const 2)) (hf₂.sub (hg₁.div_const 2)) (hg₂.div_const 2) hdet)).add + (inverseMetricPair_smoothOn hE.contDiffOn + hF.contDiffOn hG.contDiffOn (he₂.div_const 2) + (hg₁.div_const 2) (he₂.div_const 2) (hg₁.div_const 2) hdet) + + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothOrderedPrefix.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothOrderedPrefix.lean new file mode 100644 index 0000000000000000000000000000000000000000..296414fa14a4bcaac90e9491bd84d9f9586fef61 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothOrderedPrefix.lean @@ -0,0 +1,90 @@ +import OAI.Geometry.SurfaceImmersion.Correction.InitialSmoothTail +import OAI.Geometry.SurfaceImmersion.Geometry.ResolvedPrefixAppend +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedNodeIntervals + +namespace OAI + +/-! Finite induction assembles the actual ordered bridges and unchanged +regular segments, preserving embeddedness and the initial endpoint. -/ +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} {n : ℕ} {O : Set M} + +theorem smooth_ordered_prefix (hγ : FiniteRegularPath planeModel γ) + (hi : Function.Injective γ) (T : Fin (n+1) → ℝ) (hT : StrictMono T) + (hTi : ∀ i, T i ∈ Ioo (0:ℝ) 1) + (B : ∀ i, LocalCornerBridge γ (T i) O) + (horder : ∀ i j, i < j → (B i).right < (B j).left) + (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))) + (hreg : ∀ t ∈ Ioo (0:ℝ) 1, t ∉ range T → + ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t)) : + ∀ j : Fin (n+1), ∃ P : SmoothArcTail γ.extend (B j).right, + P.arc.curve P.arc.start = p ∧ + P.arc.curve '' Icc P.arc.start P.arc.finish ⊆ + resolvedPrefixImage γ B {i | i ≤ j} (B j).right := by + intro j + induction j using Fin.induction with + | zero => + have hpre : ∀ t ∈ Ioo (0:ℝ) (T 0), + ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t) := by + intro t ht + exact hreg t ⟨ht.1,ht.2.trans (hTi 0).2⟩ (not_mem_range_before_first T hT ht.2) + obtain ⟨P,hPs,hPi⟩ := initial_smooth_tail_until hγ hi (B 0).left_pos (B 0).left_lt (hTi 0).2.le hpre + have hp : P.arc.curve '' Icc P.arc.start P.arc.finish ⊆ + resolvedPrefixImage γ B ∅ (B 0).left := by + intro x hx + exact Or.inl (hPi ▸ hx) + obtain ⟨R,hRi,hRs⟩ := append_resolved_bridge B (notMem_empty 0) hsep hdis P hp + have hJ : insert (0 : Fin (n+1)) (∅ : Set (Fin (n+1))) = {i | i ≤ 0} := by + ext i + simp + refine ⟨R,hRs.trans hPs,?_⟩ + simpa only [hJ] using hRi + | succ i ih => + obtain ⟨P,hPs,hPi⟩ := ih + have hik : i.castSucc < i.succ := Fin.castSucc_lt_succ + have hgap := horder i.castSucc i.succ hik + have hbetween : ∀ t ∈ Ioo (T i.castSucc) (T i.succ), + ContMDiffAt 𝓘(ℝ) planeModel ∞ γ.extend t ∧ + Function.Injective (mfderiv 𝓘(ℝ) planeModel γ.extend t) := by + intro t ht + exact hreg t ⟨(hTi i.castSucc).1.trans ht.1,ht.2.trans (hTi i.succ).2⟩ + (not_mem_range_between_successive T hT (by rfl) ht.1 ht.2) + obtain ⟨Q,hQs,hQf,hQc⟩ := original_regular_segment hi isOpen_Ioo + (fun _ ht => ⟨(hTi i.castSucc).1.trans ht.1,ht.2.trans (hTi i.succ).2⟩) + hbetween hgap (fun u hu => + ⟨(B i.castSucc).lt_right.trans_le hu.1,hu.2.trans_lt (B i.succ).left_lt⟩) + have hJ : ∀ k ∈ {k : Fin (n+1) | k ≤ i.castSucc}, (B k).right ≤ (B i.castSucc).right := by + intro k hk + change k ≤ i.castSucc at hk + rcases lt_or_eq_of_le hk with hk | rfl + · exact (horder k i.castSucc hk).le.trans ((B i.castSucc).left_lt.trans (B i.castSucc).lt_right).le + · exact le_rfl + obtain ⟨P',hP'i,hP's⟩ := append_resolved_segment B hi (B i.castSucc).rightPoint.property.1 + hgap (B i.succ).leftPoint.property.2 hJ hsep P hPi Q hQs hQf hQc + have hk : i.succ ∉ {k : Fin (n+1) | k ≤ i.castSucc} := by + change ¬ i.succ ≤ i.castSucc + exact not_le_of_gt Fin.castSucc_lt_succ + obtain ⟨R,hRi,hRs⟩ := append_resolved_bridge B hk hsep hdis P' hP'i + have hJ' : insert i.succ {k : Fin (n+1) | k ≤ i.castSucc} = {k | k ≤ i.succ} := by + ext k + simp only [mem_insert_iff,mem_ofPred_eq,Fin.le_castSucc_iff] + exact le_iff_eq_or_lt.symm + refine ⟨R,hRs.trans (hP's.trans hPs),?_⟩ + simpa only [hJ'] using hRi + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothParameterIntegral.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothParameterIntegral.lean new file mode 100644 index 0000000000000000000000000000000000000000..ace301fa1a872ba8a27de48f1f2c674cd35da57e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothParameterIntegral.lean @@ -0,0 +1,91 @@ +import Mathlib + +namespace OAI + +/-! Smooth parameter dependence of an integral over a fixed compact interval. -/ + +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] + +def partialDerivative (F : P × ℝ → E) (z : P × ℝ) : P →L[ℝ] E := + (fderiv ℝ F z).comp (ContinuousLinearMap.inl ℝ P ℝ) + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +lemma contDiff_partialDerivative {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (partialDerivative F) := + (hF.fderiv_right (m := ∞) (by simp)).clm_comp contDiff_const + +omit [FiniteDimensional ℝ P] [CompleteSpace E] in +lemma partial_hasFDerivAt {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (p : P) (t : ℝ) : + HasFDerivAt (fun q => F (q, t)) (partialDerivative F (p, t)) p := 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) + exact (hF.differentiable (by simp) (p, t)).hasFDerivAt.comp p hi + +omit [CompleteSpace E] in +/-- Compactness gives the domination required to differentiate under the +integral. No uniform derivative bound is an extra premise. -/ +theorem hasFDerivAt_integral {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) + (a b : ℝ) (p₀ : P) : + HasFDerivAt (fun p => ∫ t in a..b, F (p, t)) + (∫ t in a..b, partialDerivative F (p₀, t)) p₀ := by + have hDs := contDiff_partialDerivative hF + have hK : IsCompact (closedBall p₀ 1 ×ˢ uIcc a b) := + (isCompact_closedBall p₀ 1).prod isCompact_uIcc + obtain ⟨C, hC⟩ := hK.exists_bound_of_continuousOn hDs.continuous.continuousOn + have hcF (p : P) : Continuous (fun t => F (p, t)) := + hF.continuous.comp (continuous_const.prodMk continuous_id) + have hcD (p : P) : Continuous (fun t => partialDerivative F (p, t)) := + hDs.continuous.comp (continuous_const.prodMk continuous_id) + apply hasFDerivAt_integral_of_dominated_of_fderiv_le'' + (s := ball p₀ 1) (bound := fun _ => C) (ball_mem_nhds p₀ zero_lt_one) + · exact Eventually.of_forall (fun p => (hcF p).aestronglyMeasurable) + · exact (hcF p₀).intervalIntegrable a b + · exact (hcD p₀).aestronglyMeasurable + · filter_upwards [ae_restrict_mem measurableSet_uIoc] with t ht + intro p hp + exact hC (p, t) ⟨ball_subset_closedBall hp, uIoc_subset_uIcc ht⟩ + · exact intervalIntegrable_const + · exact Eventually.of_forall (fun t p _ => partial_hasFDerivAt hF p t) + +/-- Induction on derivative order; the target Banach space is allowed to +change to a continuous-linear-map space at each induction step. -/ +theorem contDiff_integral_nat (a b : ℝ) (n : ℕ) : + ∀ (E : Type u) [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + (F : P × ℝ → E), ContDiff ℝ ∞ F → + ContDiff ℝ n (fun p => ∫ t in a..b, F (p, t)) := by + induction n with + | zero => + intro E _ _ _ F hF + apply contDiff_zero.mpr + exact (show Differentiable ℝ (fun p => ∫ t in a..b, F (p, t)) from + fun p => (hasFDerivAt_integral hF a b p).differentiableAt).continuous + | succ n ih => + intro E _ _ _ F hF + apply contDiff_succ_iff_hasFDerivAt.mpr + exact ⟨fun p => ∫ t in a..b, partialDerivative F (p, t), + ih (P →L[ℝ] E) (partialDerivative F) (contDiff_partialDerivative hF), + fun p => hasFDerivAt_integral hF a b p⟩ + +/-- Integrating a smooth family on a fixed compact interval preserves all +orders of smoothness. -/ +theorem contDiff_integral {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) (a b : ℝ) : + ContDiff ℝ ∞ (fun p => ∫ t in a..b, F (p, t)) := by + apply contDiff_infty.mpr + intro n + exact contDiff_integral_nat a b n E F hF + +end ClosedSurfaceR4.SmoothParameterIntegral + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPathRegularInterior.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPathRegularInterior.lean new file mode 100644 index 0000000000000000000000000000000000000000..8cacc83fbf83f3082f4786b390f7a0b662285737 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPathRegularInterior.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SmoothFiniteRegularPath + +namespace OAI + +/-! Interior regularity survives the finite smoothing: injectivity excludes +both fixed endpoints from every interior parameter. -/ +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} + +theorem smoothed_arc_interior {O : Set M} + (hγO : ∀ t : unitInterval, 0 < (t:ℝ) → (t:ℝ) < 1 → γ t ∈ O) + (P : SmoothCompactArc planeModel M) {K : Set M} (hKO : K ⊆ O) + (hPs : P.curve P.start = p) (hPf : P.curve P.finish = q) + (hPi : P.curve '' Icc P.start P.finish ⊆ range γ ∪ K) : + ∀ t ∈ Ioo P.start P.finish, P.curve t ∈ O := by + intro t ht + rcases hPi ⟨t,⟨ht.1.le,ht.2.le⟩,rfl⟩ with h | h + · obtain ⟨u,hu⟩ := h + have hu0 : u ≠ 0 := by + intro he + have heq : P.curve t = P.curve P.start := by rw [← hu,he,Path.source,hPs] + exact (ne_of_gt ht.1) (P.injective ⟨ht.1.le,ht.2.le⟩ + (left_mem_Icc.mpr P.start_lt_finish.le) heq) + have hu1 : u ≠ 1 := by + intro he + have heq : P.curve t = P.curve P.finish := by rw [← hu,he,Path.target,hPf] + exact (ne_of_lt ht.2) (P.injective ⟨ht.1.le,ht.2.le⟩ + (right_mem_Icc.mpr P.start_lt_finish.le) heq) + rw [← hu] + exact hγO u (lt_of_le_of_ne u.property.1 (fun he => hu0 (Subtype.ext he.symm))) + (lt_of_le_of_ne u.property.2 (fun he => hu1 (Subtype.ext he))) + · exact hKO h + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCalculus.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCalculus.lean new file mode 100644 index 0000000000000000000000000000000000000000..f80861d43e66d738b9eda66aebb9bcaf4060a399 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCalculus.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicPrimitive +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicCalculus + +namespace OAI + +/-! Canonical periodic primitives and angular derivatives in a smooth family. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.SmoothPeriodicCalculus + +open CovarianceCorrector PeriodicPrimitive PeriodicCalculus + +variable {A E : Type u} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +def angleDerivative (F : A × ℝ → E) (z : A × ℝ) : E := + fderiv ℝ F z (0, 1) + +lemma contDiff_angleDerivative {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (angleDerivative F) := + (hF.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + +lemma angle_hasDerivAt {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) (p : A) (t : ℝ) : + HasDerivAt (fun s => F (p, s)) (angleDerivative F (p, t)) t := by + have hi : HasFDerivAt (fun s : ℝ => (p, s)) (ContinuousLinearMap.inr ℝ A ℝ) t := by + simpa only [ContinuousLinearMap.inr_apply, Prod.mk_add_mk, add_zero, zero_add] using + ((ContinuousLinearMap.inr ℝ A ℝ).hasFDerivAt (x := t)).add_const (p, 0) + have hd := ((hF.differentiable (by simp) (p, t)).hasFDerivAt.comp t hi).hasDerivAt + simpa only [Function.comp_def, ContinuousLinearMap.comp_apply, ContinuousLinearMap.inr_apply, + angleDerivative] using hd + +def bundle (f : ℝ → E) (hp : Function.Periodic f 1) (hc : Continuous f) : C(Period, E) := + ⟨hp.lift, continuous_coinduced_dom.mpr hc⟩ + +omit [NormedSpace ℝ E] in +@[simp] lemma bundle_apply (f : ℝ → E) (hp : Function.Periodic f 1) (hc : Continuous f) + (t : ℝ) : bundle f hp hc (t : Period) = f t := rfl + +def bundleFamily (F : A × ℝ → E) (hF : ContDiff ℝ ∞ F) + (hp : ∀ p, Function.Periodic (fun t => F (p, t)) 1) : A → C(Period, E) := + fun p => bundle (fun t => F (p, t)) (hp p) + (hF.continuous.comp (continuous_const.prodMk continuous_id)) + +@[simp] lemma bundleFamily_apply (F : A × ℝ → E) (hF : ContDiff ℝ ∞ F) + (hp : ∀ p, Function.Periodic (fun t => F (p, t)) 1) (p : A) (t : ℝ) : + bundleFamily F hF hp p (t : Period) = F (p, t) := rfl + +lemma periodic_angleDerivative {F : A × ℝ → E} (hF : ContDiff ℝ ∞ F) + (hp : ∀ p, Function.Periodic (fun t => F (p, t)) 1) (p : A) : + 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 hF p t).deriv.symm) + rw [he] + exact periodic_deriv (hp p) + +omit [NormedAddCommGroup A] [NormedSpace ℝ A] [NormedSpace ℝ E] in +lemma periodic_lift (F : A → C(Period, E)) (p : A) : + Function.Periodic (fun t : ℝ => F p (t : Period)) 1 := by + intro t + change F p ((t + 1 : ℝ) : Period) = _ + rw [AddCircle.coe_add_period] + +def derivativeFamily (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) : A → C(Period, E) := + bundleFamily (angleDerivative (fun z : A × ℝ => F z.1 (z.2 : Period))) + (contDiff_angleDerivative hF) (periodic_angleDerivative hF (periodic_lift F)) + +lemma derivativeFamily_hasDerivAt (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) (p : A) (t : ℝ) : + HasDerivAt (fun s : ℝ => F p (s : Period)) (derivativeFamily F hF p (t : Period)) t := + angle_hasDerivAt hF p t + +lemma derivativeFamily_smooth (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) : + ContDiff ℝ ∞ (fun z : A × ℝ => derivativeFamily F hF z.1 (z.2 : Period)) := + contDiff_angleDerivative hF + +variable [CompleteSpace E] + +lemma derivativeFamily_mean_zero (F : A → C(Period, E)) + (hF : ContDiff ℝ ∞ (fun z : A × ℝ => F z.1 (z.2 : Period))) (p : A) : + (∫ t, derivativeFamily F hF p t ∂AddCircle.haarAddCircle) = 0 := by + rw [← integral_lift_eq_haar] + rw [intervalIntegral.integral_eq_sub_of_hasDerivAt + (fun t _ => derivativeFamily_hasDerivAt F hF p t) + (((derivativeFamily F hF p).continuous.comp (AddCircle.continuous_mk' 1)).intervalIntegrable 0 1)] + exact sub_eq_zero.mpr (by simpa using periodic_lift F p 0) + +variable [FiniteDimensional ℝ A] + +def primitiveFamily (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) : A → C(Period, E) := + bundleFamily (fun z : A × ℝ => primitive (fun t : ℝ => F z.1 (t : Period)) z.2) + (contDiff_primitive_joint hF) (fun p => primitive_periodic + ((F p).continuous.comp (AddCircle.continuous_mk' 1)) (periodic_lift F p) + ((integral_lift_eq_haar (F p)).trans (hm p))) + +@[simp] lemma primitiveFamily_apply (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) (t : ℝ) : + primitiveFamily F hF hm p (t : Period) = primitive (fun s : ℝ => F p (s : Period)) t := rfl + +lemma primitiveFamily_smooth (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) : + ContDiff ℝ ∞ (fun z : A × ℝ => primitiveFamily F hF hm z.1 (z.2 : Period)) := + contDiff_primitive_joint hF + +lemma primitiveFamily_hasDerivAt (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) (t : ℝ) : + HasDerivAt (fun s : ℝ => primitiveFamily F hF hm p (s : Period)) (F p (t : Period)) t := + primitive_hasDerivAt ((F p).continuous.comp (AddCircle.continuous_mk' 1)) t + +lemma primitiveFamily_mean_zero (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) : + (∫ t, primitiveFamily F hF hm p t ∂AddCircle.haarAddCircle) = 0 := by + rw [← integral_lift_eq_haar] + exact primitive_mean_zero ((F p).continuous.comp (AddCircle.continuous_mk' 1)) + +lemma derivativeFamily_primitiveFamily (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) : + derivativeFamily (primitiveFamily F hF hm) (primitiveFamily_smooth F hF hm) = F := by + funext p + ext t + refine Quotient.inductionOn' t ?_ + intro x + exact (derivativeFamily_hasDerivAt _ (primitiveFamily_smooth F hF hm) p x).unique + (primitiveFamily_hasDerivAt F hF hm p x) + +end ClosedSurfaceR4.SmoothPeriodicCalculus + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCorrector.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCorrector.lean new file mode 100644 index 0000000000000000000000000000000000000000..16fac1e894ec14f173d537e12dfd90e054203b49 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicCorrector.lean @@ -0,0 +1,185 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothSpanSolve +import OAI.Geometry.SurfaceImmersion.Correction.SmoothPeriodicCalculus +import OAI.Geometry.SurfaceImmersion.Geometry.IntegratedCovariance +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicVanishing + +namespace OAI + +/-! The periodic corrector constructed smoothly over finite-dimensional +families of geometric data. -/ + +noncomputable section +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.PeriodicCorrector + +open CovarianceCorrector SmoothPeriodicCalculus + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [FiniteDimensional ℝ A] [NormedAddCommGroup E] [InnerProductSpace ℝ E] + [CompleteSpace E] [FiniteDimensional ℝ E] + +def correctorFamily (V : A → C(Period, E)) (r : A → C(Period, ℝ)) (q : A → ℝ) : + A → C(Period, E) := fun p => + ⟨parameterCorrector V r q p, by + unfold parameterCorrector correctedVector correctedScalar + exact continuous_const.smul ((((r p).continuous.add + ((((V p).continuous.sub continuous_const).inner continuous_const).div_const _)).smul + (V p).continuous).sub continuous_const)⟩ + +/-- A smooth family of solutions of the angular equations, with zero mean. +The varying subspace is used only for orthogonality and membership; the +actual covariance solve takes place in the fixed ambient Euclidean space. -/ +theorem solve_smooth_family (S : A → Submodule ℝ E) (Y C X₀ : A → E) + (hY : ContDiff ℝ ∞ Y) (hC : ContDiff ℝ ∞ C) (hX₀ : ContDiff ℝ ∞ X₀) + (hdet : ∀ p, gramDet (Y p) (C p) ≠ 0) + (hPY : ∀ p w, w ∈ S p → inner ℝ (Y p) w = 0) + (hPC : ∀ p w, w ∈ S p → inner ℝ (C p) w = 0) + (hPX : ∀ p w, w ∈ S p → inner ℝ (X₀ p) w = 0) + (V : A → C(Period, E)) (hVmem : ∀ p t, V p t ∈ S p) + (hV : ContDiff ℝ ∞ (fun z : A × ℝ => V z.1 (z.2 : Period))) + (q : A → ℝ) (hq : ContDiff ℝ ∞ q) (hqpos : ∀ p, 0 < q p) + (hcircle : ∀ p t, inner ℝ (V p t) (V p t) = q p) + (h K e : A → C(Period, ℝ)) + (hhs : ContDiff ℝ ∞ (fun z : A × ℝ => h z.1 (z.2 : Period))) + (hKs : ContDiff ℝ ∞ (fun z : A × ℝ => K z.1 (z.2 : Period))) + (hes : ContDiff ℝ ∞ (fun z : A × ℝ => e z.1 (z.2 : Period))) + (hmh : ∀ p, average (h p) = 0) (hmK : ∀ p, average (K p) = 0) + (hme : ∀ p, average (e p) = 0) : + ∃ U D : A → C(Period, E), + ContDiff ℝ ∞ (fun z : A × ℝ => U z.1 (z.2 : Period)) ∧ + ContDiff ℝ ∞ (fun z : A × ℝ => D z.1 (z.2 : Period)) ∧ + (∀ p, average (U p) = 0) ∧ + (∀ (p : A) (t : ℝ), HasDerivAt (fun s : ℝ => U p (s : Period)) (D p (t : Period)) t) ∧ + (∀ p t, inner ℝ (C p) (U p t) = K p t ∧ inner ℝ (Y p) (D p t) = h p t) ∧ + (∀ p, fluctuation (fun t => inner ℝ (X₀ p + V p t) (D p t)) = e p) ∧ + (∀ p (t : ℝ), inner ℝ (Y p) (U p (t : Period)) = + PeriodicPrimitive.primitive (fun s : ℝ => h p (s : Period)) t) ∧ + (∀ p, h p = 0 → K p = 0 → e p = 0 → U p = 0) := by + let H : A → C(Period, ℝ) := primitiveFamily h hhs hmh + let K' : A → C(Period, ℝ) := derivativeFamily K hKs + have hHs : ContDiff ℝ ∞ (fun z : A × ℝ => H z.1 (z.2 : Period)) := + primitiveFamily_smooth h hhs hmh + have hK's : ContDiff ℝ ∞ (fun z : A × ℝ => K' z.1 (z.2 : Period)) := + derivativeFamily_smooth K hKs + let T : A → C(Period, E) := fun p => + ⟨fun t => spanSolve (Y p) (C p) (H p t, K p t), + (spanSolve (Y p) (C p)).continuous.comp ((H p).continuous.prodMk (K p).continuous)⟩ + let T' : A → C(Period, E) := fun p => + ⟨fun t => spanSolve (Y p) (C p) (h p t, K' p t), + (spanSolve (Y p) (C p)).continuous.comp ((h p).continuous.prodMk (K' p).continuous)⟩ + have hTs : ContDiff ℝ ∞ (fun z : A × ℝ => T z.1 (z.2 : Period)) := + contDiff_spanSolve (hY.comp contDiff_fst) (hC.comp contDiff_fst) + (hHs.prodMk hKs) (fun z => hdet z.1) + have hT's : ContDiff ℝ ∞ (fun z : A × ℝ => T' z.1 (z.2 : Period)) := + contDiff_spanSolve (hY.comp contDiff_fst) (hC.comp contDiff_fst) + (hhs.prodMk hK's) (fun z => hdet z.1) + have hTd (p : A) (t : ℝ) : HasDerivAt (fun s : ℝ => T p (s : Period)) (T' p (t : Period)) t := + (spanSolve (Y p) (C p)).hasFDerivAt.comp_hasDerivAt t + ((primitiveFamily_hasDerivAt h hhs hmh p t).prodMk (derivativeFamily_hasDerivAt K hKs p t)) + let X : A → C(Period, E) := fun p => ContinuousMap.const Period (X₀ p) + V p + have hXs : ContDiff ℝ ∞ (fun z : A × ℝ => X z.1 (z.2 : Period)) := + (hX₀.comp contDiff_fst).add hV + let a : A → C(Period, ℝ) := fun p => + ⟨fun t => inner ℝ (X p t) (T' p t), (X p).continuous.inner (T' p).continuous⟩ + have has : ContDiff ℝ ∞ (fun z : A × ℝ => a z.1 (z.2 : Period)) := hXs.inner ℝ hT's + let r : A → C(Period, ℝ) := fun p => e p - (a p - ContinuousMap.const Period (average (a p))) + have hrs : ContDiff ℝ ∞ (fun z : A × ℝ => r z.1 (z.2 : Period)) := + hes.sub (has.sub ((contDiff_average_joint has).comp contDiff_fst)) + have hr0 (p : A) : average (r p) = 0 := by + change average (fun t => e p t - fluctuation (a p) t) = 0 + rw [average_sub (f := e p) (g := fluctuation (a p)) (e p).continuous + ((a p).continuous.sub continuous_const), hme p, average_fluctuation (a p).continuous, sub_self] + let W : A → C(Period, E) := correctorFamily V r q + have hWs : ContDiff ℝ ∞ (fun z : A × ℝ => W z.1 (z.2 : Period)) := + contDiff_parameterCorrector_joint hV hrs hq hqpos hcircle + have hW0 (p : A) : average (W p) = 0 := parameterCorrector_average hqpos hcircle p + let Z : A → C(Period, E) := primitiveFamily W hWs hW0 + have hZs : ContDiff ℝ ∞ (fun z : A × ℝ => Z z.1 (z.2 : Period)) := + primitiveFamily_smooth W hWs hW0 + have hWmem (p : A) (t : Period) : W p t ∈ S p := + parameterCorrector_mem_submodule S V r q hVmem hqpos hcircle p t + have hZmem (p : A) (t : Period) : Z p t ∈ S p := by + refine Quotient.inductionOn' t ?_ + intro x + exact PeriodicPrimitive.primitive_mem_submodule (S p) + ((W p).continuous.comp (AddCircle.continuous_mk' 1)) (fun s => hWmem p (s : Period)) x + let U : A → C(Period, E) := fun p => T p + Z p + let D : A → C(Period, E) := fun p => T' p + W p + have hU0 (p : A) : average (U p) = 0 := by + change average (fun t => T p t + Z p t) = 0 + rw [average_add (f := T p) (g := Z p) (T p).continuous (Z p).continuous] + have ht0 := average_spanSolve (Y p) (C p) (H p).continuous (K p).continuous + (primitiveFamily_mean_zero h hhs hmh p) (hmK p) + change average (T p) = 0 at ht0 + rw [ht0, zero_add] + exact primitiveFamily_mean_zero W hWs hW0 p + refine ⟨U, D, hTs.add hZs, hT's.add hWs, hU0, ?_, ?_, ?_, ?_, ?_⟩ + · intro p t + exact (hTd p t).add (primitiveFamily_hasDerivAt W hWs hW0 p t) + · intro p t + have hy := hPY p (W p t) (hWmem p t) + have hc := hPC p (Z p t) (hZmem p t) + change inner ℝ (C p) (T p t + Z p t) = _ ∧ inner ℝ (Y p) (T' p t + W p t) = _ + rw [inner_add_right, hc, add_zero, inner_add_right, hy, add_zero] + exact ⟨(spanSolve_pairings (Y p) (C p) (hdet p) _).2, + (spanSolve_pairings (Y p) (C p) (hdet p) _).1⟩ + · intro p + have hs := parameterCorrector_projection hr0 hqpos hcircle p + have heq : (fun t => inner ℝ (X₀ p + V p t) (D p t)) = + (fun t => a p t + inner ℝ (V p t) (W p t)) := by + funext t + change inner ℝ (X₀ p + V p t) (T' p t + W p t) = + inner ℝ (X₀ p + V p t) (T' p t) + inner ℝ (V p t) (W p t) + simp only [inner_add_right, inner_add_left, hPX p _ (hWmem p t), zero_add] + rw [heq] + change (fun t => a p t + inner ℝ (V p t) (W p t) - + average (fun s => a p s + inner ℝ (V p s) (W p s))) = e p + rw [average_add (a p).continuous ((V p).continuous.inner (W p).continuous)] + funext t + have ht := congrFun hs t + change inner ℝ (V p t) (W p t) - average (fun s => inner ℝ (V p s) (W p s)) = + e p t - (a p t - average (a p)) at ht + linarith + · intro p t + change inner ℝ (Y p) (T p (t : Period) + Z p (t : Period)) = _ + rw [inner_add_right, hPY p _ (hZmem p (t : Period)), add_zero] + exact (spanSolve_pairings (Y p) (C p) (hdet p) _).1 + · intro p hh hK he + have hHp : H p = 0 := primitiveFamily_zero_at h hhs hmh hh + have hK'p : K' p = 0 := derivativeFamily_zero_at K hKs hK + have hTp : T p = 0 := by + ext t + change spanSolve (Y p) (C p) (H p t, K p t) = 0 + rw [hHp, hK] + exact (spanSolve (Y p) (C p)).map_zero + have hT'p : T' p = 0 := by + ext t + change spanSolve (Y p) (C p) (h p t, K' p t) = 0 + rw [hh, hK'p] + exact (spanSolve (Y p) (C p)).map_zero + have hap : a p = 0 := by + ext t + change inner ℝ (X p t) (T' p t) = 0 + rw [hT'p] + exact inner_zero_right _ + have hrp : r p = 0 := by + ext t + change e p t - (a p t - average (a p)) = 0 + rw [he, hap] + change (0 : ℝ) - (0 - average (fun _ => (0 : ℝ))) = 0 + rw [average_const, sub_self, sub_self] + have hWp : W p = 0 := by + ext t + exact parameterCorrector_zero (fun s => congrArg (fun f : C(Period, ℝ) => f s) hrp) t + have hZp : Z p = 0 := primitiveFamily_zero_at W hWs hW0 hWp + change T p + Z p = 0 + rw [hTp, hZp, add_zero] + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicPrimitive.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicPrimitive.lean new file mode 100644 index 0000000000000000000000000000000000000000..1dfaa04d9339b76671cf14b8be50f923d739baff --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPeriodicPrimitive.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicPrimitive + +namespace OAI + +/-! Jointly smooth normalized primitives with parameters. -/ + +noncomputable section +open MeasureTheory +open scoped ContDiff + +universe u + +namespace ClosedSurfaceR4.PeriodicPrimitive + +variable {P E : Type u} [NormedAddCommGroup P] [NormedSpace ℝ P] + [FiniteDimensional ℝ P] [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +theorem contDiff_rawPrimitive_joint {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fun z : P × ℝ => rawPrimitive (fun t => F (z.1, t)) z.2) := by + let A : (P × ℝ) × ℝ → E := fun z => F (z.1.1, z.1.2 * z.2) + have hA : ContDiff ℝ ∞ A := hF.comp + (contDiff_fst.fst.prodMk (contDiff_fst.snd.mul contDiff_snd)) + have hi := SmoothParameterIntegral.contDiff_integral hA 0 1 + have hs := contDiff_snd.smul hi + convert hs using 1 + funext z + change (∫ t in 0..z.2, F (z.1, t)) = + z.2 • (∫ t in 0..1, F (z.1, z.2 * t)) + simpa only [A, rawPrimitive, mul_zero, mul_one, Pi.smul_apply] using + (intervalIntegral.smul_integral_comp_mul_left (a := 0) (b := 1) + (fun t => F (z.1, t)) z.2).symm + +/-- Normalization by the mean preserves joint smoothness in the parameter +and the real periodic argument. -/ +theorem contDiff_primitive_joint {F : P × ℝ → E} (hF : ContDiff ℝ ∞ F) : + ContDiff ℝ ∞ (fun z : P × ℝ => primitive (fun t => F (z.1, t)) z.2) := by + have hraw := contDiff_rawPrimitive_joint hF + have hmean := SmoothParameterIntegral.contDiff_integral hraw 0 1 + exact hraw.sub (hmean.comp contDiff_fst) + +omit [CompleteSpace E] in +lemma primitive_zero (x : ℝ) : primitive (fun _ : ℝ => (0 : E)) x = 0 := by + simp [primitive, rawPrimitive] + +omit [NormedAddCommGroup P] [NormedSpace ℝ P] [FiniteDimensional ℝ P] + [CompleteSpace E] in +lemma primitive_zero_at_parameter {F : P × ℝ → E} {p : P} + (hz : ∀ t, F (p, t) = 0) (x : ℝ) : + primitive (fun t => F (p, t)) x = 0 := by + simp only [hz] + exact primitive_zero x + +end ClosedSurfaceR4.PeriodicPrimitive + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPhaseChart.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPhaseChart.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a36afc5ea1d5a62d070973314eae6cc856aa1fa --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPhaseChart.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseChart +import Mathlib.Analysis.Calculus.InverseFunctionTheorem.ContDiff + +namespace OAI + +/-! A noncritical smooth phase is the first coordinate of a smooth local chart. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes + +lemma phaseLinear_phaseDerivative (φ : Base → ℝ) (p : Base) : + phaseLinear (phaseDerivative φ p) = fderiv ℝ φ p := by + apply ContinuousLinearMap.ext + intro v + have he : v = v.1 • dx + v.2 • dy := by ext <;> simp [dx,dy] + conv_rhs => rw [he] + simp only [map_add,map_smul,smul_eq_mul,phaseLinear_apply,phaseDerivative] + ring + +/-- The chart is globally smooth as a function, and its inverse is smooth on +its target. Later cutoff extensions can make the inverse globally smooth. -/ +theorem exists_smooth_phase_chart {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {p : Base} (hp : phaseDerivative φ p ≠ 0) : + ∃ e : OpenPartialHomeomorph Base Base, p ∈ e.source ∧ + (∀ x, (e x).1 = φ x) ∧ ContDiff ℝ ∞ e ∧ ContDiffOn ℝ ∞ e.symm e.target := by + let L := phaseEquiv (phaseDerivative φ p) hp + let f : Base → Base := fun x => (φ x,(L x).2) + have hf : ContDiff ℝ ∞ f := hφ.prodMk (contDiff_snd.comp L.contDiff) + have hφ' : HasFDerivAt φ (phaseLinear (phaseDerivative φ p)) p := by + rw [phaseLinear_phaseDerivative] + exact (hφ.differentiable (by simp) p).hasFDerivAt + have hf' : HasFDerivAt f L.toContinuousLinearMap p := by + have hprod := hφ'.prodMk ((ContinuousLinearMap.snd ℝ ℝ ℝ).hasFDerivAt.comp p L.hasFDerivAt) + have heq : (phaseLinear (phaseDerivative φ p)).prod + ((ContinuousLinearMap.snd ℝ ℝ ℝ).comp L.toContinuousLinearMap) = L.toContinuousLinearMap := by + apply ContinuousLinearMap.ext + intro v + rfl + rw [heq] at hprod + exact hprod + let e₀ := hf.contDiffAt.toOpenPartialHomeomorph f hf' (by simp) + let W := {x : Base | IsUnit (fderiv ℝ f x)} + have hW : IsOpen W := Units.isOpen.preimage (hf.continuous_fderiv (by simp)) + have hpW : p ∈ W := by + change IsUnit (fderiv ℝ f p) + rw [hf'.fderiv] + exact L.toUnit.isUnit + let e := e₀.restrOpen W hW + have he : (e : Base → Base) = f := rfl + refine ⟨e,?_,?_,?_,?_⟩ + · exact ⟨hf.contDiffAt.mem_toOpenPartialHomeomorph_source hf' (by simp),hpW⟩ + · exact fun x => rfl + · simpa only [he] using hf + · intro y hy + have hunit : IsUnit (fderiv ℝ f (e.symm y)) := (e.map_target hy).2 + obtain ⟨u,hu⟩ := hunit + let D := ContinuousLinearEquiv.ofUnit u + have hd : HasFDerivAt e D.toContinuousLinearMap (e.symm y) := by + rw [he] + convert (hf.differentiable (by simp) (e.symm y)).hasFDerivAt using 1 + exact hu + exact (e.contDiffAt_symm hy hd (by rw [he]; exact hf.contDiffAt)).contDiffWithinAt + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPrimitiveFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPrimitiveFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..d1b32ef0afdff7406b8f2c0b5dc0c74b07ea8948 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothPrimitiveFamily.lean @@ -0,0 +1,194 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorOperatorSmooth +import OAI.Geometry.SurfaceImmersion.Geometry.PositiveTensorMetric +import OAI.Geometry.SurfaceImmersion.Geometry.ShortMetricPath + +namespace OAI + +/-! Actual finite smooth primitive families and their partial-cycle metrics. +Different cycles may use different supports and phases. -/ +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 familyFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance familyFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance familyDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance familyDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance familySectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance familySectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +structure SmoothPrimitiveFamily (ι : Type*) [Fintype ι] + (u : ∀ p : M, CovariantTwoTensor p) where + amplitude : ι → M → ℝ + phase : ι → M → ℝ + smoothAmplitude : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (amplitude a) + smoothPhase : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phase a) + sum_eq : ∀ p, (∑ a, (amplitude a p)^2 • + SmoothingAtlas.phaseDifferentialSquare (phase a) p) = u p + +namespace SmoothPrimitiveFamily +variable {ι : Type*} [Fintype ι] {u : ∀ p : M, CovariantTwoTensor p} + (d : SmoothPrimitiveFamily ι u) + +def term (a : ι) (p : M) : CovariantTwoTensor p := + (d.amplitude a p)^2 • SmoothingAtlas.phaseDifferentialSquare (d.phase a) p + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma term_apply (a : ι) (p : M) (v w : TangentSpace planeModel p) : + d.term a p v w = (d.amplitude a p)^2 * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p w) := by + change (d.amplitude a p)^2 * + ((show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p v) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p w)) = _ + ring + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma term_symmetric (a : ι) (p : M) (v w : TangentSpace planeModel p) : + d.term a p v w = d.term a p w v := by + rw [d.term_apply,d.term_apply] + ring + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma term_nonneg (a : ι) (p : M) (v : TangentSpace planeModel p) : + 0 ≤ d.term a p v v := by + rw [d.term_apply] + nlinarith [sq_nonneg (d.amplitude a p), + sq_nonneg (show ℝ from mfderiv planeModel 𝓘(ℝ) (d.phase a) p v)] + +lemma term_smooth (A : SmoothingAtlas M) (a : ι) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (d.term a p)) := + ((d.smoothAmplitude a).pow 2).smul_section (A.phaseDifferentialSquare_smooth _ (d.smoothPhase a)) + +include d in +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma tensor_nonneg (p : M) (v : TangentSpace planeModel p) : 0 ≤ u p v v := by + rw [← d.sum_eq p] + simp only [sum_apply] + exact Finset.sum_nonneg (fun a _ => d.term_nonneg a p v) + +include d in +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma tensor_symmetric (p : M) (v w : TangentSpace planeModel p) : u p v w = u p w v := by + rw [← d.sum_eq p] + simp only [sum_apply] + exact Finset.sum_congr rfl (fun a _ => d.term_symmetric a p v w) + +include d in +lemma tensor_smooth (A : SmoothingAtlas M) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) := by + have he : u = fun p => ∑ a, d.term a p := funext (fun p => (d.sum_eq p).symm) + rw [he] + exact ContMDiff.sum_section (fun a _ => d.term_smooth A a) + +/-- The completed-cycle contribution plus any subset of the current cycle. -/ +def cycleTensor (N c : ℕ) (s : Finset ι) (p : M) : CovariantTwoTensor p := + ((c : ℝ)/(N : ℝ)) • u p+(N : ℝ)⁻¹ • ∑ a ∈ s, d.term a p + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleTensor_empty (N c : ℕ) (p : M) : + d.cycleTensor N c ∅ p = ((c : ℝ)/(N : ℝ)) • u p := by + simp only [cycleTensor,Finset.sum_empty,smul_zero,add_zero] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleTensor_complete (N c : ℕ) (p : M) : + d.cycleTensor N c Finset.univ p = (((c+1 : ℕ) : ℝ)/(N : ℝ)) • u p := by + change ((c : ℝ)/(N : ℝ)) • u p+(N : ℝ)⁻¹ • (∑ a, d.term a p) = _ + rw [show (∑ a, d.term a p) = u p from d.sum_eq p,← add_smul] + congr 1 + simp only [Nat.cast_add,Nat.cast_one,div_eq_mul_inv,add_mul,one_mul] + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleTensor_insert [DecidableEq ι] (N c : ℕ) (s : Finset ι) (a : ι) (ha : a ∉ s) (p : M) : + d.cycleTensor N c (insert a s) p = d.cycleTensor N c s p+(N : ℝ)⁻¹ • d.term a p := by + simp only [cycleTensor,Finset.sum_insert ha,smul_add] + abel + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleTensor_nonneg (N c : ℕ) (s : Finset ι) (p : M) (v : TangentSpace planeModel p) : + 0 ≤ d.cycleTensor N c s p v v := by + change 0 ≤ (c : ℝ)/(N : ℝ)*u p v v+(N : ℝ)⁻¹*(∑ a ∈ s, d.term a p) v v + apply add_nonneg + · exact mul_nonneg (by positivity) (d.tensor_nonneg p v) + · apply mul_nonneg (by positivity) + simp only [sum_apply] + exact Finset.sum_nonneg (fun a _ => d.term_nonneg a p v) + +omit [IsManifold planeModel ∞ M] [CompactSpace M] in +lemma cycleTensor_symmetric (N c : ℕ) (s : Finset ι) (p : M) (v w : TangentSpace planeModel p) : + d.cycleTensor N c s p v w = d.cycleTensor N c s p w v := by + change (c : ℝ)/(N : ℝ)*u p v w+(N : ℝ)⁻¹*(∑ a ∈ s, d.term a p) v w = + (c : ℝ)/(N : ℝ)*u p w v+(N : ℝ)⁻¹*(∑ a ∈ s, d.term a p) w v + simp only [sum_apply] + rw [d.tensor_symmetric p v w] + congr 2 + exact Finset.sum_congr rfl (fun a _ => d.term_symmetric a p v w) + +lemma cycleTensor_smooth (A : SmoothingAtlas M) (N c : ℕ) (s : Finset ι) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (d.cycleTensor N c s p)) := + (d.tensor_smooth A).const_smul_section.add_section + ((ContMDiff.sum_section (fun a _ => d.term_smooth A a)).const_smul_section) + +def cycleMetric (A : SmoothingAtlas M) (g : SmoothMetric M) (N c : ℕ) (s : Finset ι) : SmoothMetric M := + positiveTensorMetric (g.inner+d.cycleTensor N c s) + (g.contMDiff.add_section (d.cycleTensor_smooth A N c s)) + (by + intro p v w + change g.inner p v w+d.cycleTensor N c s p v w = + g.inner p w v+d.cycleTensor N c s p w v + rw [g.symm,d.cycleTensor_symmetric]) + (by + intro p v hv + exact add_pos_of_pos_of_nonneg (g.pos p v hv) (d.cycleTensor_nonneg N c s p v)) + +lemma cycleMetric_lower (A : SmoothingAtlas M) (g : SmoothMetric M) + (N c : ℕ) (s : Finset ι) (p : M) (v : TangentSpace planeModel p) : + g.inner p v v ≤ (d.cycleMetric A g N c s).inner p v v := + le_add_of_nonneg_right (d.cycleTensor_nonneg N c s p v) + +end SmoothPrimitiveFamily + +namespace SmoothingAtlas +open PhaseGeometry +variable (A : SmoothingAtlas M) + +def correctedSmoothPrimitiveFamily + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi phi : (A.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi 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 phi 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 phi u p)) : + SmoothPrimitiveFamily (A.centers × Fin 3) u where + amplitude := A.correctedPrimitiveAmplitude P psi phi u + phase := phi + smoothAmplitude := A.correctedPrimitiveAmplitude_smooth_of_data P psi phi + hpsi hphi hsupport hQ houter hinv u hu hpos + smoothPhase := hphi + sum_eq := A.correctedPrimitiveAmplitude_reconstruct P psi phi hinv u hsymm + (fun a p hp => (hpos a p hp).le) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothSpanSolve.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothSpanSolve.lean new file mode 100644 index 0000000000000000000000000000000000000000..101b1ab35b95fa03f8567c7e209e3b24e2d0612e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothSpanSolve.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PeriodicCorrector + +namespace OAI + +/-! Smooth dependence of the two-by-two Gram solve used by each corrector. -/ + +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.PeriodicCorrector + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +theorem contDiff_gramDet {Y C : A → E} (hY : ContDiff ℝ ∞ Y) (hC : ContDiff ℝ ∞ C) : + ContDiff ℝ ∞ (fun p => gramDet (Y p) (C p)) := + ((hY.inner ℝ hY).mul (hC.inner ℝ hC)).sub ((hY.inner ℝ hC).pow 2) + +theorem contDiff_spanSolve {Y C : A → E} {a : A → ℝ × ℝ} + (hY : ContDiff ℝ ∞ Y) (hC : ContDiff ℝ ∞ C) (ha : ContDiff ℝ ∞ a) + (hD : ∀ p, gramDet (Y p) (C p) ≠ 0) : + ContDiff ℝ ∞ (fun p => spanSolve (Y p) (C p) (a p)) := by + have hd := contDiff_gramDet hY hC + change ContDiff ℝ ∞ (fun p => + ((inner ℝ (C p) (C p) * (a p).1 - inner ℝ (Y p) (C p) * (a p).2) / + gramDet (Y p) (C p)) • Y p + + ((inner ℝ (Y p) (Y p) * (a p).2 - inner ℝ (Y p) (C p) * (a p).1) / + gramDet (Y p) (C p)) • C p) + exact ((((hC.inner ℝ hC).mul ha.fst).sub ((hY.inner ℝ hC).mul ha.snd)).div hd hD).smul hY |>.add + (((((hY.inner ℝ hY).mul ha.snd).sub ((hY.inner ℝ hC).mul ha.fst)).div hd hD).smul hC) + +end ClosedSurfaceR4.PeriodicCorrector + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothTransitionDerivativeBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothTransitionDerivativeBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..74757291c17cf743c2f23cd6b15ee78a01e5b8c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothTransitionDerivativeBound.lean @@ -0,0 +1,45 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.IntervalInteriorCutoff +import Mathlib.Analysis.SpecialFunctions.SmoothTransition +import Mathlib.Analysis.Calculus.ContDiff.Deriv + +namespace OAI + +/-! A fixed bound for the derivative of the standard smooth step. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +theorem smoothTransition_derivative_bound : ∃ C : ℝ, 0 < C ∧ + ∀ x : ℝ, |deriv Real.smoothTransition x| ≤ C := by + have hψ : ContDiff ℝ ∞ Real.smoothTransition := Real.smoothTransition.contDiff + have hd : ContDiff ℝ ∞ (deriv Real.smoothTransition) := hψ.deriv' + obtain ⟨B,hB⟩ := (isCompact_Icc : IsCompact (Icc (0:ℝ) 1)).exists_bound_of_continuousOn + hd.continuous.continuousOn + refine ⟨|B|+1,by positivity,?_⟩ + intro x + by_cases hx : x ∈ Icc (0:ℝ) 1 + · have hb' : |deriv Real.smoothTransition x| ≤ B := by + simpa only [Real.norm_eq_abs] using hB x hx + exact hb'.trans (by linarith [le_abs_self B]) + · have hz : deriv Real.smoothTransition x = 0 := by + rcases lt_or_ge x 0 with hl | hl + · have he : Real.smoothTransition =ᶠ[𝓝 x] fun _ => (0:ℝ) := by + filter_upwards [isOpen_Iio.mem_nhds hl] with y hy + exact Real.smoothTransition.zero_of_nonpos hy.le + rw [he.deriv_eq] + exact deriv_const _ _ + · have hr : 1 < x := lt_of_not_ge (fun h => hx ⟨hl,h⟩) + have he : Real.smoothTransition =ᶠ[𝓝 x] fun _ => (1:ℝ) := by + filter_upwards [isOpen_Ioi.mem_nhds hr] with y hy + exact Real.smoothTransition.one_of_one_le hy.le + rw [he.deriv_eq] + exact deriv_const _ _ + rw [hz,abs_zero] + positivity + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothZeroFactor.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothZeroFactor.lean new file mode 100644 index 0000000000000000000000000000000000000000..c971f1d6cfa78e145f2b55a11b9a9b561f5a0c79 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothZeroFactor.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothParameterIntegral + +namespace OAI + +/-! Exact smooth division by a real coordinate vanishing at one point. -/ +noncomputable section +open Set Filter MeasureTheory +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing + +variable {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] [CompleteSpace V] + +def smoothZeroFactor (f : ℝ → V) (p t : ℝ) : V := + ∫ s in (0:ℝ)..1, deriv f (p+s*(t-p)) + +lemma smoothZeroFactor_smooth {f : ℝ → V} (hf : ContDiff ℝ ∞ f) (p : ℝ) : + ContDiff ℝ ∞ (smoothZeroFactor f p) := by + have hD : ContDiff ℝ ∞ (deriv f) := hf.deriv' + have hF : ContDiff ℝ ∞ (fun z : ℝ × ℝ => deriv f (p+z.2*(z.1-p))) := + hD.comp (contDiff_const.add (contDiff_snd.mul (contDiff_fst.sub contDiff_const))) + exact SmoothParameterIntegral.contDiff_integral hF 0 1 + +lemma smoothZeroFactor_identity {f : ℝ → V} (hf : ContDiff ℝ ∞ f) (p t : ℝ) : + (t-p) • smoothZeroFactor f p t = f t-f p := by + have hD : Continuous (deriv f) := (hf.deriv' (n := ∞)).continuous + have hcont : Continuous (fun s : ℝ => (t-p) • deriv f (p+s*(t-p))) := by fun_prop + have hd (s : ℝ) : HasDerivAt (fun s : ℝ => f (p+s*(t-p))) + ((t-p) • deriv f (p+s*(t-p))) s := by + simpa [Function.comp_def] using ((hf.differentiable (by simp) _).hasDerivAt).scomp s + (((hasDerivAt_id s).mul_const (t-p)).const_add p) + have hi := intervalIntegral.integral_eq_sub_of_hasDerivAt (fun s _ => hd s) + (hcont.intervalIntegrable 0 1) + rw [intervalIntegral.integral_smul] at hi + simpa only [smoothZeroFactor,zero_mul,add_zero,one_mul,add_sub_cancel] using hi + +lemma smoothZeroFactor_self (f : ℝ → V) (p : ℝ) : + smoothZeroFactor f p p = deriv f p := by + simp [smoothZeroFactor] + +/-- Division by two distinct simple-zero coordinates is globally smooth. -/ +theorem two_zero_smooth_factor {f : ℝ → V} (hf : ContDiff ℝ ∞ f) + {p q : ℝ} (hpq : p ≠ q) (hp : f p = 0) (hq : f q = 0) : + ∃ d : ℝ → V, ContDiff ℝ ∞ d ∧ + (∀ t, f t = ((t-p)*(t-q)) • d t) ∧ + deriv f p = (p-q) • d p ∧ deriv f q = (q-p) • d q := by + let h := smoothZeroFactor f p + have hh : ContDiff ℝ ∞ h := smoothZeroFactor_smooth hf p + have he (t : ℝ) : f t = (t-p) • h t := by + simpa only [hp,sub_zero] using (smoothZeroFactor_identity hf p t).symm + have hhq : h q = 0 := by + have hz := he q + rw [hq] at hz + exact (smul_eq_zero.mp hz.symm).resolve_left (sub_ne_zero.mpr hpq.symm) + let d := smoothZeroFactor h q + have hd : ContDiff ℝ ∞ d := smoothZeroFactor_smooth hh q + have hed (t : ℝ) : h t = (t-q) • d t := by + simpa only [hhq,sub_zero] using (smoothZeroFactor_identity hh q t).symm + have hef (t : ℝ) : f t = ((t-p)*(t-q)) • d t := by + rw [he t,hed t,smul_smul] + have hep : deriv f p = (p-q) • d p := by + rw [←hed p] + exact (smoothZeroFactor_self f p).symm + have heq : deriv f q = (q-p) • d q := by + have hder := (((hasDerivAt_id q).sub_const p).smul + (hh.differentiable (by simp) q).hasDerivAt) + have hefun : f = fun t => (t-p) • h t := funext he + change HasDerivAt (fun t => (t-p) • h t) + ((q-p) • deriv h q+1 • h q) q at hder + rw [←hefun] at hder + rw [hder.deriv,hhq,smul_zero,add_zero] + exact congrArg ((q-p) • ·) (smoothZeroFactor_self h q).symm + exact ⟨d,hd,hef,hep,heq⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputAdmissibility.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputAdmissibility.lean new file mode 100644 index 0000000000000000000000000000000000000000..cfe5310c9b93e3f3763f0e6e66ac5827b9267861 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputAdmissibility.lean @@ -0,0 +1,107 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothedInputCloseness +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasLinearMapBounds +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothingLinearity + +namespace OAI + +/-! Low-norm bootstrap assumptions imply the actual smoothed inputs +remain inside the fixed map and tensor neighborhoods. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates + +local instance admissibilityFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance admissibilityFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance admissibilityDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance admissibilityDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance admissibilitySectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance admissibilitySectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem smoothed_input_admissibility (r : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ + ∀ (g : SmoothMetric M) (F G : M → Space) (H : ∀ x : M, CovariantTwoTensor x) + (ρ a b B t s α K : ℝ), + 0 < ρ → 0 < a → 0 ≤ B → 0 < s → s ≤ t → t ≤ 1 → + ContMDiff planeModel spaceModel ∞ F → ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + A.InputBound t r B G H → A.WeightedBound 1 2 b (G-F) → b ≤ ρ/4 → + (∀ x, ‖A.tensorEncode H x - A.tensorEncode g.inner x‖ ≤ a/8) → + D*B*(s/t)^r ≤ min (ρ/4) (a/8) → + 0 ≤ α → (∀ x, ‖A.tensorEncode g.inner x‖ ≤ K) → α*K ≤ a/8 → + A.WeightedBound 1 2 (ρ/2) (A.smooth r s G-F) ∧ + ∀ x, ‖A.tensorEncode (A.tensorSmooth r s H - α • g.inner) x - + A.tensorEncode g.inner x‖ ≤ a/2 := by + obtain ⟨D,hD,htail⟩ := A.smoothed_input_closeness r + refine ⟨D,hD,?_⟩ + intro g F G H ρ a b B t s α K _hρ ha hB hs hst ht1 hF hG hH hinput + hnear hb hHnear hsmall hα hK hαK + obtain ⟨hmap,htensor⟩ := htail G H B t s hB hs hst ht1 hG hH hinput + have hsmooth := A.smooth_smooth r hs hG + have hmapneg : A.WeightedBound 1 2 (D*B*(s/t)^r) (A.smooth r s G-G) := by + have he : A.smooth r s G-G = (-1 : ℝ) • (G-A.smooth r s G) := by + funext p + simp only [Pi.sub_apply,Pi.smul_apply,neg_one_smul] + abel + rw [he] + intro i + rw [localize_smul] + rw [neg_one_smul] + have hnegative := (hmap i).neg uniqueDiffOn_univ + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) + (hG.sub hsmooth)).contDiffOn + convert hnegative using 1 + have hsum := A.weightedBound_add (hsmooth.sub hG) (hG.sub hF) + (show (0 : ℝ) ≤ 1 by norm_num) hmapneg hnear + change A.WeightedBound 1 2 (D*B*(s/t)^r+b) + ((A.smooth r s G-G)+(G-F)) at hsum + have he : (A.smooth r s G-G) + (G-F) = A.smooth r s G-F := by abel + rw [he] at hsum + refine ⟨fun i => (hsum i).mono_const (by + have hsmall' := hsmall.trans (min_le_left _ _) + linarith),?_⟩ + intro x + have htail' : ‖A.tensorEncode (A.tensorSmooth r s H) x - A.tensorEncode H x‖ ≤ a/8 := by + rw [norm_sub_rev] + exact (htensor x).trans (hsmall.trans (min_le_right _ _)) + have hscalar : ‖α • A.tensorEncode g.inner x‖ ≤ a/8 := by + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hα] + exact (mul_le_mul_of_nonneg_left (hK x) hα).trans hαK + rw [A.tensorEncode_sub,A.tensorEncode_smul] + change ‖(A.tensorEncode (A.tensorSmooth r s H) x - α • A.tensorEncode g.inner x) - + A.tensorEncode g.inner x‖ ≤ _ + calc + _ = ‖(A.tensorEncode (A.tensorSmooth r s H) x - A.tensorEncode H x) + + (A.tensorEncode H x - A.tensorEncode g.inner x) - α • A.tensorEncode g.inner x‖ := by + congr 1 + abel + _ ≤ (‖A.tensorEncode (A.tensorSmooth r s H) x - A.tensorEncode H x‖ + + ‖A.tensorEncode H x - A.tensorEncode g.inner x‖) + ‖α • A.tensorEncode g.inner x‖ := + (norm_sub_le _ _).trans (add_le_add (norm_add_le _ _) le_rfl) + _ ≤ (a/8+a/8)+a/8 := add_le_add (add_le_add htail' (hHnear x)) hscalar + _ ≤ a/2 := by linarith + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputCloseness.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputCloseness.lean new file mode 100644 index 0000000000000000000000000000000000000000..66f7edf060c11e6d8a25f0415c7fd26f65790ef9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedInputCloseness.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoupledSmoothing +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanCoordinates + +namespace OAI + +/-! A fixed low input bound controls the map's C2 smoothing error and +the encoded tensor smoothing error with the same positive scale power. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates + +local instance inputClosenessFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance inputClosenessFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance inputClosenessDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance inputClosenessDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance inputClosenessSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance inputClosenessSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem smoothed_input_closeness (r : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : M → Space) (H : ∀ x : M, CovariantTwoTensor x) (B t s : ℝ), + 0 ≤ B → 0 < s → s ≤ t → t ≤ 1 → + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + A.InputBound t r B G H → + A.WeightedBound 1 2 (D*B*(s/t)^r) (G - A.smooth r s G) ∧ + ∀ x, ‖A.tensorEncode H x - A.tensorEncode (A.tensorSmooth r s H) x‖ ≤ D*B*(s/t)^r := by + obtain ⟨D,hD,htail⟩ := A.coupled_smoothing_tail r 0 + refine ⟨2*D*tailConstant r,mul_nonneg (mul_nonneg (by norm_num) hD) (tailConstant_nonneg r),?_⟩ + intro G H B t s hB hs hst ht1 hG hH hinput + have ht : 0 < t := hs.trans_le hst + have hzero : A.InputBound t 0 B G H := by + constructor + · intro i j hj x + exact hinput.1 i j (by omega) x + · exact fun i => (hinput.2 i).mono_order (Nat.zero_le r) + have hb := htail G H s t s B B hs le_rfl hst ht1 hB hB hG hH hinput hzero + have he : D * tailConstant r * (B * (s/t)^r + B * (s/t)^r) = + (2*D*tailConstant r)*B*(s/t)^r := by ring + rw [he] at hb + have hC : 0 ≤ (2*D*tailConstant r)*B*(s/t)^r := + mul_nonneg (mul_nonneg + (mul_nonneg (mul_nonneg (by norm_num) hD) (tailConstant_nonneg r)) hB) + (pow_nonneg (div_nonneg hs.le ht.le) r) + constructor + · intro i j hj x _hx + have hh := hb.1 i j (by omega) x + simpa only [Nat.sub_eq_zero_of_le hj,pow_zero,one_pow,one_mul, + iteratedFDerivWithin_univ] using hh + · have hdiff := hH.sub_section (A.tensorSmooth_smooth r hs hH) + have henc := A.tensorEncode_bound hdiff hs hC hb.2 + intro x + have hh := henc.norm_le (mem_univ x) + simpa only [A.tensorEncode_sub,Pi.sub_apply] using hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..f910993f5462aa5ad69bbd5901a373990408b816 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricIncrement.lean @@ -0,0 +1,158 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricSmallIncrement +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 + +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 smoothedMetricIncrementFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance smoothedMetricIncrementFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance smoothedMetricIncrementDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance smoothedMetricIncrementDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance smoothedMetricIncrementSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance smoothedMetricIncrementSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- A finite true-input bound supplies every analytic profile used to +construct the increment at the smoothed map. All constants and thresholds +precede the true input, its higher derivatives, and the three scales. -/ +theorem smoothed_increment (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (r q : ℕ) {B₀ : ℝ} (hB₀ : 0 ≤ B₀) : + ∃ a ρ η : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < η ∧ η ≤ 1 ∧ + ∃ B T : ℕ → ℝ, (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space) (H : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + (∀ p v w, H p v w = H p w v) → + ∀ t s : ℝ, 0 < t → t ≤ 1 → 0 < s → s ≤ 1 → + d.A.InputBound t r B₀ G H → + ∀ b : ℝ, 0 ≤ b → b < ρ → d.A.WeightedBound 1 2 b (d.A.smooth r s G-F) → + ∀ δ δ' τ : ℝ, 0 < δ → 0 ≤ δ' → δ' ≤ δ → + 0 < τ → τ ≤ s → τ/s ≤ η → δ ≤ τ → + (∀ x, ‖d.A.tensorEncode (d.A.tensorSmooth r s H - (δ'/δ)^2 • g.inner) x - + d.A.tensorEncode g.inner x‖ ≤ a/2) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) U) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (realizedTensorError g.inner (d.A.tensorSmooth r s H) δ δ' (d.A.smooth r s G) U)) := by + classical + obtain ⟨PG,CH,hPG,hCH,hprofiles⟩ := d.A.uniform_smoothing_input_profiles r B₀ hB₀ + choose PF hPF hbase using fun m => d.A.exists_shifted_bound 2 m hF + choose CG hCG hgBound using fun m => d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain m g.contMDiff + let P := fun m => PG m + PF m + have hP (m : ℕ) : 0 ≤ P m := add_nonneg (hPG m) (hPF m) + have hPF' (m : ℕ) : d.A.ShiftedBound 2 m 1 (P m) F := by + intro i j hj x + exact (hbase m i j hj x).trans (le_add_of_nonneg_left (hPG m)) + let C := fun m => CH m + CG m + have hC (m : ℕ) : 1 ≤ C m := (hCH m).trans (le_add_of_nonneg_right (hCG m)) + obtain ⟨a,ha,hstep⟩ := d.small_increment hF P hP hPF' q + obtain ⟨ρ,η,B,T,hρ,hη,hη1,hB,hT,hbuild⟩ := hstep C hC + refine ⟨a,ρ,η,ha,hρ,hη,hη1,B,T,hB,hT,?_⟩ + intro G H hG hH hsym t s ht ht1 hs hs1 hinput b hb hbρ hnear δ δ' τ + hδ hδ' hδ'δ hτ hτs hτη hδτ hTensorNear + obtain ⟨hPG',hCH'⟩ := hprofiles G H t s ht ht1 hs hs1 hG hH hinput + let α := (δ'/δ)^2 + have hα : 0 ≤ α := sq_nonneg _ + have hα1 : α ≤ 1 := by + have hdiv : 0 ≤ δ'/δ := div_nonneg hδ' hδ.le + have hdiv1 : δ'/δ ≤ 1 := (div_le_one hδ).mpr hδ'δ + dsimp [α] + nlinarith + have hHs := d.A.tensorSmooth_smooth r hs hH + have htarget : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p ((d.A.tensorSmooth r s H - α • g.inner) p)) := + hHs.sub_section g.contMDiff.const_smul_section + have htargetBound (m : ℕ) : d.A.TensorWeightedBound s m (C m) + (d.A.tensorSmooth r s H - α • g.inner) := by + have hgb : d.A.TensorWeightedBound s m (CG m) g.inner := + fun i => (hgBound m i).shrink_scale hs.le hs1 + have hαg := d.A.tensorWeightedBound_const_smul g.contMDiff hgb α + have hαg' : d.A.TensorWeightedBound s m (CG m) (α • g.inner) := by + intro i + apply (hαg i).mono_const + rw [abs_of_nonneg hα] + exact mul_le_of_le_one_left (hCG m) hα1 + exact d.A.tensorWeightedBound_sub hHs g.contMDiff.const_smul_section hs.le (hCH' m) hαg' + have hmapBound (m : ℕ) : d.A.ShiftedBound 2 m s (P m) (d.A.smooth r s G) := by + intro i j hj x + exact (hPG' m i j hj x).trans (le_add_of_nonneg_right (hPF m)) + have htargetSym : ∀ p v w, + (d.A.tensorSmooth r s H - α • g.inner) p v w = + (d.A.tensorSmooth r s H - α • g.inner) p w v := by + intro p v w + simp only [Pi.sub_apply,Pi.smul_apply,sub_apply, + smul_apply,smul_eq_mul] + rw [d.A.tensorSmooth_symmetric r hs hH hsym p v w,g.symm p v w] + obtain ⟨U,hU,hUB,hUT⟩ := hbuild (d.A.smooth r s G) (d.A.smooth_smooth r hs hG) + b hb hbρ hnear ⟨s,hs.le⟩ hs hs1 hmapBound + (d.A.tensorSmooth r s H - α • g.inner) htarget htargetSym hTensorNear htargetBound + τ δ hτ hτs hτη hδ hδτ + refine ⟨U,hU,hUB,?_⟩ + have hαδ : δ^2*α = δ'^2 := by dsimp [α]; field_simp [hδ.ne'] + have he : δ^2 • (d.A.tensorSmooth r s H - α • g.inner) = + δ^2 • d.A.tensorSmooth r s H - δ'^2 • g.inner := by + rw [smul_sub,smul_smul,hαδ] + intro m + convert hUT m using 1 <;> first | rfl | simp only [realizedTensorError,he] + +/-- The low-norm bootstrap gives the required neighborhoods of the +smoothed input, so no smoothed-map hypothesis is needed by the iteration. -/ +theorem smoothed_increment_of_input (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) (r q : ℕ) {B₀ : ℝ} (hB₀ : 0 ≤ B₀) : + ∃ a ρ η D K : ℝ, 0 < a ∧ 0 < ρ ∧ 0 < η ∧ η ≤ 1 ∧ 0 ≤ D ∧ 0 ≤ K ∧ + ∃ B T : ℕ → ℝ, (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space) (H : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + (∀ p v w, H p v w = H p w v) → + ∀ t s : ℝ, 0 < t → t ≤ 1 → 0 < s → s ≤ t → + d.A.InputBound t r B₀ G H → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode H x - d.A.tensorEncode g.inner x‖ ≤ a/8) → + D*B₀*(s/t)^r ≤ min (ρ/4) (a/8) → + ∀ δ δ' τ : ℝ, 0 < δ → 0 ≤ δ' → δ' ≤ δ → + 0 < τ → τ ≤ s → τ/s ≤ η → δ ≤ τ → (δ'/δ)^2*K ≤ a/8 → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) U) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (realizedTensorError g.inner (d.A.tensorSmooth r s H) δ δ' (d.A.smooth r s G) U)) := by + obtain ⟨a,ρ,η,ha,hρ,hη,hη1,B,T,hB,hT,hstep⟩ := d.smoothed_increment hF r q hB₀ + obtain ⟨D,hD,hadmissible⟩ := d.A.smoothed_input_admissibility r + obtain ⟨K,hK,hKb⟩ := d.A.exists_bundle_bound d.A.tensorTriv d.A.tensorTriv_domain 0 g.contMDiff + have hgBound (x : JetPolynomial.Base) : ‖d.A.tensorEncode g.inner x‖ ≤ K := + (d.A.tensorEncode_bound g.contMDiff zero_lt_one hK hKb).norm_le (mem_univ x) + refine ⟨a,ρ,η,D,K,ha,hρ,hη,hη1,hD,hK,B,T,hB,hT,?_⟩ + intro G H hG hH hsym t s ht ht1 hs hst hinput hnear hHnear htail δ δ' τ + hδ hδ' hδ'δ hτ hτs hτη hδτ hratio + have had := hadmissible g F G H ρ a (ρ/4) B₀ t s ((δ'/δ)^2) K + hρ ha hB₀ hs hst ht1 hF hG hH hinput hnear le_rfl hHnear htail + (sq_nonneg _) hgBound hratio + exact hstep G H hG hH hsym t s ht ht1 hs (hst.trans ht1) hinput + (ρ/2) (by positivity) (by linarith) had.1 + δ δ' τ hδ hδ' hδ'δ hτ hτs hτη hδτ had.2 + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..305757f465a38d83fddbaf114e7ad2ab45800a2e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStep.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingMetricCrossBounds + +namespace OAI + +/-! The normalized defect of the actual unsmoothed map update. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.ExactCorrection +open FiniteOrderSmoothing WeightedEstimates +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] + +def normalizedMetricDefect (target : Base → ℝ) (δ : ℝ) (G : Base → V) + (v w : Base) : Base → ℝ := fun x => (target x - pullbackMetric G x v w) / δ ^ 2 + +def realizedMetricError (target Hs : Base → ℝ) (δ δ' : ℝ) + (G U : Base → V) (v w : Base) : Base → ℝ := fun x => + pullbackMetric (G + U) x v w - pullbackMetric G x v w - + (δ ^ 2 * Hs x - δ' ^ 2 * target x) + +lemma contDiff_pullbackMetric {G : Base → V} (hG : ContDiff ℝ ∞ G) (v w : Base) : + ContDiff ℝ ∞ (fun x => pullbackMetric G x v w) := by + have hd := hG.fderiv_right (m := ∞) (by simp) + exact ContDiff.inner ℝ (hd.clm_apply contDiff_const) (hd.clm_apply contDiff_const) + +lemma contDiff_metricCrossTerm {G U : Base → V} + (hG : ContDiff ℝ ∞ G) (hU : ContDiff ℝ ∞ U) (v w : Base) : + ContDiff ℝ ∞ (fun x => metricCrossTerm G U x v w) := by + have hdG := hG.fderiv_right (m := ∞) (by simp) + have hdU := hU.fderiv_right (m := ∞) (by simp) + exact (ContDiff.inner ℝ (hdG.clm_apply contDiff_const) (hdU.clm_apply contDiff_const)).add + (ContDiff.inner ℝ (hdG.clm_apply contDiff_const) (hdU.clm_apply contDiff_const)) + +lemma contDiff_normalizedMetricDefect {target : Base → ℝ} (ht : ContDiff ℝ ∞ target) + (δ : ℝ) {G : Base → V} (hG : ContDiff ℝ ∞ G) (v w : Base) : + ContDiff ℝ ∞ (normalizedMetricDefect target δ G v w) := + (ht.sub (contDiff_pullbackMetric hG v w)).div_const _ + +lemma contDiff_realizedMetricError {target Hs : Base → ℝ} + (ht : ContDiff ℝ ∞ target) (hs : ContDiff ℝ ∞ Hs) (δ δ' : ℝ) + {G U : Base → V} (hG : ContDiff ℝ ∞ G) (hU : ContDiff ℝ ∞ U) (v w : Base) : + ContDiff ℝ ∞ (realizedMetricError target Hs δ δ' G U v w) := + ((contDiff_pullbackMetric (hG.add hU) v w).sub (contDiff_pullbackMetric hG v w)).sub + ((contDiff_const.mul hs).sub (contDiff_const.mul ht)) + +/-- The chosen error of the smoothed realization controls the actual new +normalized defect. This is an identity of concrete maps, before estimates. -/ +theorem actual_normalized_defect_identity {target Hs : Base → ℝ} + {δ δ' : ℝ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + {G S U : Base → V} (hG : ContDiff ℝ ∞ G) (hS : ContDiff ℝ ∞ S) + (hU : ContDiff ℝ ∞ U) (v w : Base) (x : Base) : + δ' ^ 2 * (normalizedMetricDefect target δ' (G + U) v w x - target x) = + δ ^ 2 * (normalizedMetricDefect target δ G v w x - Hs x) - + realizedMetricError target Hs δ δ' S U v w x - metricCrossTerm (G - S) U x v w := by + apply normalized_defect_identity (hG.differentiable (by simp) x) + (hS.differentiable (by simp) x) (hU.differentiable (by simp) x) v w + · exact mul_div_cancel₀ _ (pow_ne_zero 2 hδ) + · exact mul_div_cancel₀ _ (pow_ne_zero 2 hδ') + · rfl + +/-- Weighted estimate for a complete normalized metric update. The three +bounds are on the concrete smoothing tail, realization error and cross term. -/ +theorem normalized_metric_step_bound {target Hs : Base → ℝ} + (ht : ContDiff ℝ ∞ target) (hs : ContDiff ℝ ∞ Hs) + {δ δ' τ BH BE BC : ℝ} (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) (hτ : 0 ≤ τ) (m : ℕ) + {G S U : Base → V} (hG : ContDiff ℝ ∞ G) (hS : ContDiff ℝ ∞ S) + (hU : ContDiff ℝ ∞ U) (v w : Base) + (hbH : WeightedBound Set.univ τ m BH (normalizedMetricDefect target δ G v w - Hs)) + (hbE : WeightedBound Set.univ τ m BE (realizedMetricError target Hs δ δ' S U v w)) + (hbC : WeightedBound Set.univ τ m BC (fun x => metricCrossTerm (G - S) U x v w)) : + WeightedBound Set.univ τ m ((δ' ^ 2)⁻¹ * (δ ^ 2 * BH + BE + BC)) + (normalizedMetricDefect target δ' (G + U) v w - target) := by + have hH := (contDiff_normalizedMetricDefect ht δ hG v w).sub hs + have hE := contDiff_realizedMetricError ht hs δ δ' hS hU v w + have hC := contDiff_metricCrossTerm (hG.sub hS) hU v w + have h₁ := hbH.const_smul isOpen_univ.uniqueDiffOn hH.contDiffOn (δ ^ 2) + simp only [abs_of_nonneg (sq_nonneg δ)] at h₁ + have h₂ := h₁.sub isOpen_univ.uniqueDiffOn hτ (hH.const_smul (δ ^ 2)).contDiffOn + hE.contDiffOn hbE + have h₃ := h₂.sub isOpen_univ.uniqueDiffOn hτ + ((hH.const_smul (δ ^ 2)).sub hE).contDiffOn hC.contDiffOn hbC + have h₄ := h₃.const_smul isOpen_univ.uniqueDiffOn + (((hH.const_smul (δ ^ 2)).sub hE).sub hC).contDiffOn ((δ' ^ 2)⁻¹) + simp only [abs_inv, abs_of_nonneg (sq_nonneg δ')] at h₄ + apply h₄.congr + intro x _ + have hi := actual_normalized_defect_identity (target := target) (Hs := Hs) + hδ hδ' hG hS hU v w x + change normalizedMetricDefect target δ' (G + U) v w x - target x = + (δ' ^ 2)⁻¹ * _ + simp only [smul_eq_mul] + have hi' := congrArg (fun a : ℝ => (δ' ^ 2)⁻¹ * a) hi + rw [inv_mul_cancel_left₀ (pow_ne_zero 2 hδ')] at hi' + exact hi' + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStepBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStepBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..085c53f483e2e9e754c153d1215784c2df99d560 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothedMetricStepBounds.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothedMetricStep + +namespace OAI + +/-! The full one-step defect bound with the constructed coordinate smoother. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.ExactCorrection +open FiniteOrderSmoothing WeightedEstimates +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [CompleteSpace V] + +/-- Substituting the actual smoothing estimates into the metric identity +keeps the dependence on both uncontrolled higher input norms linear. -/ +theorem smoothed_metric_step_bound (r m : ℕ) + {target : Base → ℝ} (htarget : ContDiff ℝ ∞ target) + {G U : Base → V} (hG : ContDiff ℝ ∞ G) (hGc : HasCompactSupport G) + (hU : ContDiff ℝ ∞ U) (v w : Base) + {s t τ δ δ' BH CH BG CG D BE : ℝ} + (hτ : 0 < τ) (hτs : τ ≤ s) (hst : s ≤ t) (hδ : δ ≠ 0) (hδ' : δ' ≠ 0) + (hHc : HasCompactSupport (normalizedMetricDefect target δ G v w)) + (hbH : WeightedBound Set.univ t r BH (normalizedMetricDefect target δ G v w)) + (hcH : WeightedBound Set.univ t m CH (normalizedMetricDefect target δ G v w)) + (hbG : WeightedBound Set.univ t r BG (fderiv ℝ G)) + (hcG : WeightedBound Set.univ t m CG (fderiv ℝ G)) + (hbU : WeightedBound Set.univ τ m D (fderiv ℝ U)) + (hbE : WeightedBound Set.univ τ m BE + (realizedMetricError target (finiteSmooth r s (normalizedMetricDefect target δ G v w)) + δ δ' (finiteSmooth r s G) U v w)) : + WeightedBound Set.univ τ m + ((δ' ^ 2)⁻¹ * + (δ ^ 2 * (tailConstant r * (BH * (s / t) ^ r + CH * (τ / t) ^ r)) + BE + + 2 * ‖v‖ * ‖w‖ * (2 ^ m * + (tailConstant r * (BG * (s / t) ^ r + CG * (τ / t) ^ r)) * D))) + (normalizedMetricDefect target δ' (G + U) v w - target) := by + have hs : 0 < s := hτ.trans_le hτs + have hH := contDiff_normalizedMetricDefect htarget δ hG v w + exact normalized_metric_step_bound htarget (finiteSmooth_smooth r hs hH) + hδ hδ' hτ.le m hG (finiteSmooth_smooth r hs hG) hU v w + (weighted_smoothing_tail r m hτ hτs hst hH hHc hbH hcH) hbE + (weighted_smoothing_metricCrossTerm r m hτ hτs hst hG hGc hU hbG hcG hbU v w) + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingAtlas.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingAtlas.lean new file mode 100644 index 0000000000000000000000000000000000000000..f8304d22832668b07fe54336ae9400c46d8e7cd2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingAtlas.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherLinearity +import OAI.Geometry.Immersion.ClosedSurface.SquarePartition +import OAI.Geometry.Immersion.ClosedSurface.MetricModel + +namespace OAI + +/-! Finite chart data with inner and outer cutoffs for smoothing on a closed +surface. All chart and cutoff data are chosen independently of the input. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + +def chart (p : M) : OpenPartialHomeomorph M Base := + (chartAt Plane p).trans + (EuclideanSpace.equiv (Fin 2) ℝ).toHomeomorph.toOpenPartialHomeomorph + +lemma chart_source (p : M) : (chart p).source = (chartAt Plane p).source := by + simp [chart] + +variable [IsManifold planeModel ∞ M] + +lemma chart_smooth (p : M) : + ContMDiffOn planeModel 𝓘(ℝ, Base) ∞ (chart p) (chart p).source := by + rw [chart_source] + exact (EuclideanSpace.equiv (Fin 2) ℝ).contDiff.contMDiff.comp_contMDiffOn contMDiffOn_chart + +lemma chart_symm_smooth (p : M) : + ContMDiffOn 𝓘(ℝ, Base) planeModel ∞ (chart p).symm (chart p).target := by + have h := (contMDiffOn_chart_symm (I := planeModel) (x := p) (n := ∞)).comp + (EuclideanSpace.equiv (Fin 2) ℝ).symm.contDiff.contMDiff.contMDiffOn + (fun x (hx : x ∈ (chart p).target) => by simpa [chart] using hx) + simpa [chart] using h + +/-- The outer cutoff is one on the support of the partition weight and has +its own closed support inside the same chart. -/ +structure SmoothingAtlas (M : Type*) [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] where + centers : Finset M + weight : centers → M → ℝ + outer : centers → M → ℝ + weight_smooth : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (weight i) + weight_support : ∀ i, tsupport (weight i) ⊆ (chart (i : M)).source + outer_smooth : ∀ i, ContMDiff planeModel 𝓘(ℝ) ∞ (outer i) + outer_support : ∀ i, tsupport (outer i) ⊆ (chart (i : M)).source + outer_one : ∀ i x, x ∈ tsupport (weight i) → outer i x = 1 + partition : ∀ x, ∑ i, (weight i x) ^ 2 = 1 + +variable [T2Space M] [CompactSpace M] + +/-- A compact smooth surface admits fixed finite smoothing chart data. -/ +theorem exists_smoothingAtlas : Nonempty (SmoothingAtlas M) := by + classical + obtain ⟨t, ψ, hψ, hsupp, _, _, hsum⟩ := + PhaseGeometry.exists_finite_smooth_square_partition (E := Plane) + (fun p : M => (chart p).source) (fun p => (chart p).open_source) + (fun p => by rw [chart_source]; exact mem_chart_source Plane p) + have hout : ∀ i : t, ∃ χ : M → ℝ, + ContMDiff planeModel 𝓘(ℝ) ∞ χ ∧ + tsupport χ ⊆ (chart (i : M)).source ∧ + ∀ x ∈ tsupport (ψ i), χ x = 1 := by + intro i + have hc : IsCompact (tsupport (ψ i)) := (isClosed_tsupport _).isCompact + obtain ⟨O, hO, hKO, hOc⟩ := hc.exists_isOpen_closure_subset + ((chart (i : M)).open_source.mem_nhdsSet.mpr (hsupp i)) + obtain ⟨χ, hχ, _, hχs, hχone⟩ := + exists_contMDiff_support_eq_eq_one_iff (I := planeModel) (n := (⊤ : ℕ∞)) + hO (isClosed_tsupport (ψ i)) hKO + refine ⟨χ, hχ, ?_, fun x hx => (hχone x).mp hx⟩ + change closure (Function.support χ) ⊆ _ + rw [hχs] + exact hOc + choose χ hχ hχs hχone using hout + exact ⟨⟨t, ψ, χ, hψ, hsupp, hχ, hχs, hχone, hsum⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingC1Approximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingC1Approximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..59b5a39598bbdf2944c7425290d02f3169a2cf94 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingC1Approximation.lean @@ -0,0 +1,108 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingDerivatives +import Mathlib.Topology.UniformSpace.HeineCantor + +namespace OAI + +/-! Uniform approximation of C1 coordinate maps by the existing smooth kernel. -/ +noncomputable section +open scoped ContDiff Convolution Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory Set Filter ContinuousLinearMap +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +omit [CompleteSpace E] in +lemma fderiv_smooth_C1 (r : ℕ) {s : ℝ} (hs : 0 < s) {f : Base → E} + (hf : ContDiff ℝ 1 f) (hfc : HasCompactSupport f) (x : Base) : + fderiv ℝ (smooth r s f) x = smooth r s (fderiv ℝ f) x := by + let L : ℝ →L[ℝ] E →L[ℝ] E := lsmul ℝ ℝ + have hk : LocallyIntegrable (dilate (kernel r) s) volume := + (((smooth_dilate (kernel_smooth r) s).continuous).integrable_of_hasCompactSupport + (compact_dilate (kernel_compact r) hs.ne')).locallyIntegrable + have h := hfc.hasFDerivAt_convolution_right L hk hf x + have heq : ((dilate (kernel r) s) ⋆[L.precompR Base, volume] fderiv ℝ f) x = + smooth r s (fderiv ℝ f) x := by + apply integral_congr_ae + exact Eventually.of_forall (fun y => by ext v; rfl) + exact h.fderiv.trans heq + +/-- Uniform continuity suffices for uniform convergence of the signed +finite-moment kernel. Positivity of the kernel is not required. -/ +theorem smooth_uniform_approximation (r : ℕ) {f : Base → E} + (hf : UniformContinuous f) {ε : ℝ} (hε : 0 < ε) : + ∃ η : ℝ, 0 < η ∧ ∀ s : ℝ, 0 < s → s < η → + ∀ x : Base, ‖smooth r s f x-f x‖ ≤ ε := by + let C : ℝ := ∫ y, ‖kernel r y‖ + have hC : 0 ≤ C := integral_nonneg (fun _ => norm_nonneg _) + have ha : 0 < ε/(C+1) := div_pos hε (by linarith) + obtain ⟨δ,hδ,hδf⟩ := Metric.uniformContinuous_iff.mp hf (ε/(C+1)) ha + obtain ⟨R,hR,hRK⟩ := (kernel_compact r).isCompact.isBounded.exists_pos_norm_le + refine ⟨δ/(R+1),div_pos hδ (by linarith),?_⟩ + intro s hs hsη x + let k := dilate (kernel r) s + have hk : HasCompactSupport k := compact_dilate (kernel_compact r) hs.ne' + have hkc : Continuous k := (smooth_dilate (kernel_smooth r) s).continuous + have hki : Integrable k volume := hkc.integrable_of_hasCompactSupport hk + have hloc : LocallyIntegrable f volume := hf.continuous.locallyIntegrable + have hif := hk.convolutionExists_left (lsmul ℝ ℝ) hkc hloc x + have hif' : Integrable (fun y => k y • f (x-y)) volume := hif + have heq : smooth r s f x-f x = ∫ y, k y • (f (x-y)-f x) := by + symm + simp_rw [smul_sub] + rw [integral_sub hif' (hki.smul_const (f x)),integral_smul_const] + change smooth r s f x-(∫ y, dilate (kernel r) s y) • f x = _ + rw [mass_dilate _ hs,kernel_mass,one_smul] + have hbound (y : Base) : ‖k y • (f (x-y)-f x)‖ ≤ ‖k y‖*(ε/(C+1)) := by + by_cases hy : k y = 0 + · simp [hy] + have hyn : kernel r (s⁻¹ • y) ≠ 0 := (mul_ne_zero_iff.mp hy).2 + have hyR := hRK (s⁻¹ • y) (subset_tsupport _ hyn) + have hn : ‖y‖ ≤ R*s := by + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_of_pos hs] at hyR + have hh : ‖y‖/s ≤ R := by simpa only [div_eq_mul_inv,mul_comm] using hyR + exact (div_le_iff₀ hs).mp hh + have hsR : R*s < δ := by + have hh := (lt_div_iff₀ (show 0 < R+1 by linarith)).mp hsη + nlinarith + have hd : dist (x-y) x < δ := by + simpa only [dist_eq_norm,sub_sub_cancel_left,norm_neg] using hn.trans_lt hsR + rw [norm_smul] + exact mul_le_mul_of_nonneg_left (le_of_lt (by + simpa only [dist_eq_norm] using hδf hd)) (norm_nonneg _) + rw [heq] + calc + ‖∫ y, k y • (f (x-y)-f x)‖ ≤ ∫ y, ‖k y‖*(ε/(C+1)) := + norm_integral_le_of_norm_le (hki.norm.mul_const _) (Eventually.of_forall hbound) + _ = C*(ε/(C+1)) := by rw [integral_mul_const,norm_mass_dilate _ hs] + _ ≤ ε := by + rw [← mul_div_assoc] + apply (div_le_iff₀ (show 0 < C+1 by linarith)).mpr + nlinarith + +/-- Compactly supported C1 maps have smooth approximants converging uniformly +both as maps and in their first derivatives. -/ +theorem smooth_C1_approximation (r : ℕ) {f : Base → E} + (hf : ContDiff ℝ 1 f) (hfc : HasCompactSupport f) {ε : ℝ} (hε : 0 < ε) : + ∃ η : ℝ, 0 < η ∧ ∀ s : ℝ, 0 < s → s < η → + ContDiff ℝ ∞ (smooth r s f) ∧ + ∀ x, ‖smooth r s f x-f x‖ ≤ ε ∧ + ‖fderiv ℝ (smooth r s f) x-fderiv ℝ f x‖ ≤ ε := by + have hu := hfc.uniformContinuous_of_continuous hf.continuous + have hd : UniformContinuous (fderiv ℝ f) := + (hfc.fderiv ℝ).uniformContinuous_of_continuous (hf.continuous_fderiv one_ne_zero) + obtain ⟨η₁,hη₁,h₁⟩ := smooth_uniform_approximation r hu hε + obtain ⟨η₂,hη₂,h₂⟩ := smooth_uniform_approximation r hd hε + refine ⟨min η₁ η₂,lt_min hη₁ hη₂,?_⟩ + intro s hs hsη + refine ⟨smooth_smooth r hs hf.continuous.locallyIntegrable,?_⟩ + intro x + refine ⟨h₁ s hs (hsη.trans_le (min_le_left _ _)) x,?_⟩ + rw [fderiv_smooth_C1 r hs hf hfc] + exact h₂ s hs (hsη.trans_le (min_le_right _ _)) x + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingConvolution.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingConvolution.lean new file mode 100644 index 0000000000000000000000000000000000000000..d146c71712cd3422ad8fdc66b7dfba98bc40bd82 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingConvolution.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingKernel +import Mathlib.Analysis.Calculus.ContDiff.Convolution + +namespace OAI + +/-! The actual smoothing operators from the finite-moment kernels. They are +linear on locally integrable inputs, smooth their outputs, and fix constants. -/ +noncomputable section +open scoped ContDiff Convolution + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory ContinuousLinearMap +open JetPolynomial (Base) + +def kernel (r : ℕ) : Base → ℝ := Classical.choose (exists_smoothing_kernel r) + +lemma kernel_smooth (r : ℕ) : ContDiff ℝ ∞ (kernel r) := + (Classical.choose_spec (exists_smoothing_kernel r)).1 + +lemma kernel_compact (r : ℕ) : HasCompactSupport (kernel r) := + (Classical.choose_spec (exists_smoothing_kernel r)).2.1 + +lemma kernel_mass (r : ℕ) : (∫ x, kernel r x) = 1 := + (Classical.choose_spec (exists_smoothing_kernel r)).2.2.1 + +lemma kernel_moment (r : ℕ) (α : Fin 2 → ℕ) (hα : 1 ≤ degree α) (hαr : degree α ≤ r) : + (∫ x, monomial α x * kernel r x) = 0 := + (Classical.choose_spec (exists_smoothing_kernel r)).2.2.2 α hα hαr + +lemma mass_dilate (K : Base → ℝ) {s : ℝ} (hs : 0 < s) : + (∫ x, dilate K s x) = ∫ x, K x := by + simpa only [monomial, degree, Finset.sum_const_zero, pow_zero, + Finset.prod_const_one, one_mul] using moment_dilate K (fun _ => 0) hs + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Smoothing at scale `s`, using the kernel whose moments vanish through `r`. -/ +def smooth (r : ℕ) (s : ℝ) (f : Base → E) : Base → E := + (dilate (kernel r) s) ⋆[lsmul ℝ ℝ, volume] f + +omit [CompleteSpace E] in +lemma smooth_smooth (r : ℕ) {s : ℝ} (hs : 0 < s) {f : Base → E} + (hf : LocallyIntegrable f volume) : ContDiff ℝ ∞ (smooth r s f) := + (compact_dilate (kernel_compact r) hs.ne').contDiff_convolution_left (lsmul ℝ ℝ) + (smooth_dilate (kernel_smooth r) s) hf + +omit [CompleteSpace E] in +lemma smooth_add (r : ℕ) {s : ℝ} (hs : 0 < s) {f g : Base → E} + (hf : LocallyIntegrable f volume) (hg : LocallyIntegrable g volume) : + smooth r s (f + g) = smooth r s f + smooth r s g := by + have hc := compact_dilate (kernel_compact r) hs.ne' + have hcont := (smooth_dilate (kernel_smooth r) s).continuous + exact (hc.convolutionExists_left (lsmul ℝ ℝ) hcont hf).distrib_add + (hc.convolutionExists_left (lsmul ℝ ℝ) hcont hg) + +omit [CompleteSpace E] in +lemma smooth_smul (r : ℕ) (s a : ℝ) (f : Base → E) : + smooth r s (a • f) = a • smooth r s f := + convolution_smul + +lemma smooth_const (r : ℕ) {s : ℝ} (hs : 0 < s) (v : E) : + smooth r s (fun _ => v) = fun _ => v := by + funext x + change (∫ y, dilate (kernel r) s y • v) = v + rw [integral_smul_const, mass_dilate (kernel r) hs, kernel_mass, one_smul] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivativeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivativeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..472dfd01152d078f7b4ddac4e4db6cf304bd91d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivativeBounds.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingDerivatives +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Smoothing is bounded in every original derivative norm. The bound uses +only the input derivative of that order and the fixed kernel L1 norm. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory WeightedEstimates +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Exact derivative commutation gives the scale-independent bound at every +order on localized inputs. -/ +theorem iterated_smooth_norm_le (r : ℕ) {s : ℝ} (hs : 0 < s) (n : ℕ) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) {C : ℝ} + (hb : ∀ x, ‖iteratedFDeriv ℝ n f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ n (smooth r s f) x‖ ≤ (∫ y, ‖kernel r y‖) * C := by + induction n generalizing E with + | zero => + simp only [norm_iteratedFDeriv_zero] at hb ⊢ + exact smooth_norm_le r hs hb x + | succ n ih => + rw [← norm_iteratedFDeriv_fderiv] + have heq : fderiv ℝ (smooth r s f) = smooth r s (fderiv ℝ f) := + funext (fderiv_smooth r hs hf hfc) + rw [heq] + apply ih (hf.fderiv_right (m := ∞) (by simp)) (hfc.fderiv ℝ) + intro y + rw [norm_iteratedFDeriv_fderiv] + exact hb y + +/-- The boundedness part of finite-order smoothing in weighted norms. +The weight scale may differ from the kernel scale. -/ +theorem smooth_weighted_bound (r : ℕ) {s t C : ℝ} (hs : 0 < s) (ht : 0 < t) + (m : ℕ) {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : WeightedBound Set.univ t m C f) : + WeightedBound Set.univ t m ((∫ y, ‖kernel r y‖) * C) (smooth r s f) := by + intro j hj x _ + rw [iteratedFDerivWithin_univ] + have hd : ∀ y, ‖iteratedFDeriv ℝ j f y‖ ≤ C / t ^ j := by + intro y + simpa only [iteratedFDerivWithin_univ] using hb.deriv_le ht hj (Set.mem_univ y) + have h := iterated_smooth_norm_le r hs j hf hfc hd x + calc + _ ≤ t ^ j * ((∫ y, ‖kernel r y‖) * (C / t ^ j)) := + mul_le_mul_of_nonneg_left h (pow_nonneg ht.le _) + _ = _ := by field_simp + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivatives.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivatives.lean new file mode 100644 index 0000000000000000000000000000000000000000..e774ccfeb3443af8776759d092512d552cdb38b3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingDerivatives.lean @@ -0,0 +1,34 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingNormBounds + +namespace OAI + +/-! Exact differentiation of the constructed smoothing operator on localized +smooth inputs. This moves derivatives onto the input without scale loss. -/ +noncomputable section +open scoped ContDiff Convolution + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory ContinuousLinearMap +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma fderiv_smooth (r : ℕ) {s : ℝ} (hs : 0 < s) {f : Base → E} + (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) (x : Base) : + fderiv ℝ (smooth r s f) x = smooth r s (fderiv ℝ f) x := by + let L : ℝ →L[ℝ] E →L[ℝ] E := lsmul ℝ ℝ + have hk : LocallyIntegrable (dilate (kernel r) s) volume := + (((smooth_dilate (kernel_smooth r) s).continuous).integrable_of_hasCompactSupport + (compact_dilate (kernel_compact r) hs.ne')).locallyIntegrable + have h := hfc.hasFDerivAt_convolution_right L hk (hf.of_le (by simp)) x + have heq : ((dilate (kernel r) s) ⋆[L.precompR Base, volume] fderiv ℝ f) x = + smooth r s (fderiv ℝ f) x := by + apply integral_congr_ae + exact Filter.Eventually.of_forall (fun y => by ext v; rfl) + exact h.fderiv.trans heq + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingFirstMoment.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingFirstMoment.lean new file mode 100644 index 0000000000000000000000000000000000000000..77d057da327e76f056e9f6325f2a459ce334aa5b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingFirstMoment.lean @@ -0,0 +1,80 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingDerivativeBounds +import Mathlib.Analysis.Calculus.MeanValue + +namespace OAI + +/-! First-moment control of the error of the actual convolution operator. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +def firstMoment (K : Base → ℝ) : ℝ := ∫ x, ‖K x‖ * ‖x‖ + +lemma firstMoment_nonneg (K : Base → ℝ) : 0 ≤ firstMoment K := + integral_nonneg fun _x => mul_nonneg (norm_nonneg _) (norm_nonneg _) + +lemma firstMoment_dilate (K : Base → ℝ) {s : ℝ} (hs : 0 < s) : + firstMoment (dilate K s) = s * firstMoment K := by + have hdim : Module.finrank ℝ Base = 2 := by simp [Base] + have hn (x : Base) : ‖x‖ = s * ‖s⁻¹ • x‖ := by + rw [norm_smul, norm_inv, Real.norm_eq_abs, abs_of_pos hs] + field_simp + have heq : (fun x => ‖dilate K s x‖ * ‖x‖) = + fun x => (s / s ^ 2) * ((fun y => ‖K y‖ * ‖y‖) (s⁻¹ • x)) := by + funext x + rw [hn x, norm_dilate] + unfold dilate + ring + unfold firstMoment + rw [heq, integral_const_mul, + Measure.integral_comp_inv_smul_of_nonneg volume (fun x => ‖K x‖ * ‖x‖) hs.le] + rw [hdim, smul_eq_mul] + field_simp + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- The smoothing error loses one derivative and gains one power of its scale. -/ +theorem smooth_sub_norm_le (r : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : ContDiff ℝ ∞ f) + (hb : ∀ x, ‖fderiv ℝ f x‖ ≤ C) (x : Base) : + ‖f x - smooth r s f x‖ ≤ s * firstMoment (kernel r) * C := by + let K := dilate (kernel r) s + have hk : HasCompactSupport K := compact_dilate (kernel_compact r) hs.ne' + have hkc : Continuous K := (smooth_dilate (kernel_smooth r) s).continuous + have hi₁ : Integrable (fun y => K y • f x) := by + exact ((hkc.smul continuous_const).integrable_of_hasCompactSupport + (hk.smul_right (f' := fun _ => f x))) + have hi₂ : Integrable (fun y => K y • f (x - y)) := by + exact ((hkc.smul (hf.continuous.comp (continuous_const.sub continuous_id))).integrable_of_hasCompactSupport + (hk.smul_right (f' := fun y => f (x - y)))) + have heq : f x - smooth r s f x = ∫ y, K y • (f x - f (x - y)) := by + simp_rw [smul_sub] + rw [integral_sub hi₁ hi₂, integral_smul_const] + change f x - smooth r s f x = (∫ y, dilate (kernel r) s y) • f x - smooth r s f x + rw [mass_dilate _ hs, kernel_mass, one_smul] + have him : Integrable (fun y => ‖K y‖ * ‖y‖ * C) := by + exact ((hkc.norm.mul continuous_norm).integrable_of_hasCompactSupport + (hk.norm.mul_right (f' := fun y => ‖y‖))).mul_const C + rw [heq] + calc + _ ≤ ∫ y, ‖K y‖ * ‖y‖ * C := by + apply norm_integral_le_of_norm_le him + exact Filter.Eventually.of_forall fun y => by + rw [norm_smul] + have h := Convex.norm_image_sub_le_of_norm_fderiv_le + (s := Set.univ) (fun z _ => hf.differentiable (by simp) z) + (fun z _ => hb z) convex_univ (Set.mem_univ (x - y)) (Set.mem_univ x) + have hd : ‖f x - f (x - y)‖ ≤ C * ‖y‖ := by + simpa only [sub_sub_cancel] using h + nlinarith [mul_le_mul_of_nonneg_left hd (norm_nonneg (K y))] + _ = firstMoment K * C := by rw [integral_mul_const]; rfl + _ = s * firstMoment (kernel r) * C := by rw [firstMoment_dilate _ hs] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingGain.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingGain.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef3d028ceae85185142e5b58063fbb413366546e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingGain.lean @@ -0,0 +1,61 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ConvolutionDerivativeBounds + +namespace OAI + +/-! Scale-exact derivative gains for convolution by the constructed kernels. -/ +noncomputable section +open scoped ContDiff Convolution + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory ContinuousLinearMap +open JetPolynomial (Base) + +lemma norm_iterated_dilate {K : Base → ℝ} (hK : ContDiff ℝ ∞ K) + {s : ℝ} (hs : 0 < s) (n : ℕ) (x : Base) : + ‖iteratedFDeriv ℝ n (dilate K s) x‖ = + (s ^ 2)⁻¹ * (s ^ n)⁻¹ * ‖iteratedFDeriv ℝ n K (s⁻¹ • x)‖ := by + have heq : dilate K s = (s ^ 2)⁻¹ • (fun y : Base => K (s⁻¹ • y)) := rfl + have hc : ContDiff ℝ (n : ℕ∞ω) (fun y : Base => K (s⁻¹ • y)) := + (hK.comp (contDiff_id.const_smul s⁻¹)).of_le (by simp) + rw [heq, iteratedFDeriv_const_smul_apply (f := fun y : Base => K (s⁻¹ • y)) hc.contDiffAt] + rw [congrFun (iteratedFDeriv_comp_const_smul s⁻¹ (hK.of_le (by simp))) x] + simp only [norm_smul, Real.norm_eq_abs, abs_inv, abs_pow, + abs_of_pos hs, inv_pow] + ring + +lemma integral_norm_iterated_dilate {K : Base → ℝ} (hK : ContDiff ℝ ∞ K) + {s : ℝ} (hs : 0 < s) (n : ℕ) : + (∫ x, ‖iteratedFDeriv ℝ n (dilate K s) x‖) = + (s ^ n)⁻¹ * ∫ x, ‖iteratedFDeriv ℝ n K x‖ := by + have hdim : Module.finrank ℝ Base = 2 := by simp [Base] + simp_rw [norm_iterated_dilate hK hs] + rw [integral_const_mul, + Measure.integral_comp_inv_smul_of_nonneg volume + (fun x => ‖iteratedFDeriv ℝ n K x‖) hs.le, hdim, smul_eq_mul] + field_simp + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- An arbitrarily high output derivative is bounded by the zeroth input +norm and the corresponding fixed kernel derivative mass. -/ +theorem smooth_derivative_gain (r n : ℕ) {s C : ℝ} (hs : 0 < s) + {f : Base → E} (hf : Continuous f) (hb : ∀ x, ‖f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ n (smooth r s f) x‖ ≤ + (s ^ n)⁻¹ * (∫ y, ‖iteratedFDeriv ℝ n (kernel r) y‖) * C := by + have hC : 0 ≤ C := (norm_nonneg (f 0)).trans (hb 0) + have h := convolution_iterated_norm_le (lsmul ℝ ℝ) + n (smooth_dilate (kernel_smooth r) s) (compact_dilate (kernel_compact r) hs.ne') hf hb x + change ‖iteratedFDeriv ℝ n (smooth r s f) x‖ ≤ _ at h + apply h.trans + rw [integral_norm_iterated_dilate (kernel_smooth r) hs] + calc + _ ≤ 1 * ((s ^ n)⁻¹ * ∫ y, ‖iteratedFDeriv ℝ n (kernel r) y‖) * C := by + gcongr + exact opNorm_lsmul_le + _ = _ := by rw [one_mul] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingKernel.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingKernel.lean new file mode 100644 index 0000000000000000000000000000000000000000..ca429d110c716f7b73085fc021b76d773ae68189 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingKernel.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingMoments +import Mathlib.Analysis.Calculus.BumpFunction.Normed +import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension + +namespace OAI + +/-! Smooth compactly supported smoothing kernels with arbitrarily many +vanishing moments, constructed from finitely many positive dilations. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +lemma continuous_monomial (α : Fin 2 → ℕ) : Continuous (monomial α) := by + unfold monomial + fun_prop + +lemma smooth_dilate {K : Base → ℝ} (hK : ContDiff ℝ ∞ K) (a : ℝ) : + ContDiff ℝ ∞ (dilate K a) := + contDiff_const.mul (hK.comp (contDiff_id.const_smul a⁻¹)) + +lemma compact_dilate {K : Base → ℝ} (hK : HasCompactSupport K) {a : ℝ} (ha : a ≠ 0) : + HasCompactSupport (dilate K a) := by + let e : Base ≃ₜ Base := Homeomorph.smul (Units.mk0 a⁻¹ (inv_ne_zero ha)) + have h := (hK.comp_homeomorph e).mul_left (f := fun _ => (a ^ 2)⁻¹) + exact h + +lemma integrable_moment_dilate {K : Base → ℝ} (hK : Continuous K) (hKc : HasCompactSupport K) + (α : Fin 2 → ℕ) {a : ℝ} (ha : a ≠ 0) : + Integrable (fun x => monomial α x * dilate K a x) := by + have hd : Continuous (dilate K a) := + continuous_const.mul (hK.comp (continuous_id.const_smul a⁻¹)) + exact ((continuous_monomial α).mul hd).integrable_of_hasCompactSupport + (compact_dilate hKc ha).mul_left + +lemma moment_sum_dilates {r : ℕ} {K : Base → ℝ} + (hK : Continuous K) (hKc : HasCompactSupport K) + (b c : Fin (r + 1) → ℝ) (hb : ∀ i, 0 < b i) (α : Fin 2 → ℕ) : + (∫ x, monomial α x * (∑ i, c i * dilate K (b i) x)) = + (∑ i, c i * b i ^ degree α) * ∫ x, monomial α x * K x := by + have hi (i : Fin (r + 1)) : Integrable (fun x => c i * (monomial α x * dilate K (b i) x)) := + (integrable_moment_dilate hK hKc α (hb i).ne').const_mul (c i) + have heq : (fun x => monomial α x * (∑ i, c i * dilate K (b i) x)) = + (fun x => ∑ i, c i * (monomial α x * dilate K (b i) x)) := by + funext x + rw [Finset.mul_sum] + apply Finset.sum_congr rfl + intro i _ + ring + rw [heq, integral_finsetSum _ (fun i _ => hi i)] + simp_rw [integral_const_mul, moment_dilate K α (hb _)] + simp only [← mul_assoc, ← Finset.sum_mul] + +def basicBump : ContDiffBump (0 : Base) := ⟨1, 2, by norm_num, by norm_num⟩ + +def basicKernel : Base → ℝ := basicBump.normed volume + +lemma smooth_basicKernel : ContDiff ℝ ∞ basicKernel := basicBump.contDiff_normed + +lemma compact_basicKernel : HasCompactSupport basicKernel := basicBump.hasCompactSupport_normed + +lemma integral_basicKernel : (∫ x, basicKernel x) = 1 := basicBump.integral_normed + +/-- A concrete kernel used for finite-order smoothing. Its mass is one and +all nonconstant coordinate moments through degree `r` vanish. -/ +theorem exists_smoothing_kernel (r : ℕ) : + ∃ K : Base → ℝ, ContDiff ℝ ∞ K ∧ HasCompactSupport K ∧ + (∫ x, K x) = 1 ∧ ∀ α : Fin 2 → ℕ, 1 ≤ degree α → degree α ≤ r → + (∫ x, monomial α x * K x) = 0 := by + let f : Base → ℝ := basicKernel + have hfs : ContDiff ℝ ∞ f := smooth_basicKernel + have hfc : HasCompactSupport f := compact_basicKernel + have hfi : (∫ x, f x) = 1 := integral_basicKernel + let b : Fin (r + 1) → ℝ := fun i => ((i.val + 1 : ℕ) : ℝ) + have hb (i : Fin (r + 1)) : 0 < b i := by dsimp [b]; positivity + obtain ⟨c, hc⟩ := exists_positive_dilation_weights r + let K : Base → ℝ := fun x => ∑ i, c i * dilate f (b i) x + have hs : ContDiff ℝ ∞ K := ContDiff.sum (fun i _ => (contDiff_const (c := c i)).mul (smooth_dilate hfs (b i))) + have hk : HasCompactSupport K := by + have hh := HasCompactSupport.finset_sum (s := Finset.univ) + (f := fun i x => c i * dilate f (b i) x) + (fun i _ => (compact_dilate hfc (hb i).ne').mul_left) + have heq : (∑ i, fun x => c i * dilate f (b i) x) = K := by + funext x + simp only [K, Finset.sum_apply] + exact heq ▸ hh + refine ⟨K, hs, hk, ?_, ?_⟩ + · let α : Fin 2 → ℕ := fun _ => 0 + have hm := moment_sum_dilates hfs.continuous hfc b c hb α + have hm' : (∫ x, K x) = (∑ i, c i) * ∫ x, f x := by + simpa only [α, degree, Finset.sum_const_zero, monomial, pow_zero, + Finset.prod_const_one, one_mul, mul_one] using hm + rw [hfi, mul_one] at hm' + exact hm'.trans (by simpa using hc 0) + · intro α hα hαr + have hm := moment_sum_dilates hfs.continuous hfc b c hb α + let j : Fin (r + 1) := ⟨degree α, by omega⟩ + have hj : j ≠ 0 := by intro he; have := congrArg Fin.val he; dsimp [j] at this; omega + have hcancel := hc j + simp only [ite_eq_right_iff.mpr (fun h => (hj h).elim)] at hcancel + have heq : (∑ i, c i * b i ^ degree α) = 0 := hcancel + exact hm.trans (by rw [heq, zero_mul]) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLinearMaps.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLinearMaps.lean new file mode 100644 index 0000000000000000000000000000000000000000..dc17f0fa0e7972aceb3b4fbed411a8423d0083b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLinearMaps.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherLinearity + +namespace OAI + +/-! Smoothing commutes with fixed linear constraints on the fiber. -/ +noncomputable section +open scoped ContDiff Convolution + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory ContinuousLinearMap +open JetPolynomial (Base) + +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + [NormedAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F] + +lemma smooth_clm (r : ℕ) {s : ℝ} (hs : 0 < s) (L : E →L[ℝ] F) + {f : Base → E} (hf : LocallyIntegrable f volume) : + smooth r s (fun x => L (f x)) = fun x => L (smooth r s f x) := by + funext x + have hi := (compact_dilate (kernel_compact r) hs.ne').convolutionExists_left + (lsmul ℝ ℝ) (smooth_dilate (kernel_smooth r) s).continuous hf x + change (∫ y, dilate (kernel r) s y • L (f (x - y))) = + L (∫ y, dilate (kernel r) s y • f (x - y)) + simp_rw [← L.map_smul] + exact L.integral_comp_comm hi + +lemma residual_clm (n : ℕ) {s : ℝ} (hs : 0 < s) (L : E →L[ℝ] F) + {f : Base → E} (hf : ContDiff ℝ ∞ f) : + residual s n (fun x => L (f x)) = fun x => L (residual s n f x) := by + induction n with + | zero => rfl + | succ n ih => + simp only [residual, ih] + rw [smooth_clm 0 hs L (residual_smooth hs n hf).continuous.locallyIntegrable] + ext x + simp only [Pi.sub_apply, L.map_sub] + +lemma finiteSmooth_clm (n : ℕ) {s : ℝ} (hs : 0 < s) (L : E →L[ℝ] F) + {f : Base → E} (hf : ContDiff ℝ ∞ f) : + finiteSmooth n s (fun x => L (f x)) = fun x => L (finiteSmooth n s f x) := by + simp only [finiteSmooth_eq, residual_clm n hs L hf] + ext x + simp only [Pi.sub_apply, L.map_sub] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalSections.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalSections.lean new file mode 100644 index 0000000000000000000000000000000000000000..4927fdb855022ad6edd45c90a54b77bf1a056667 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalSections.lean @@ -0,0 +1,39 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingLocalization + +namespace OAI + +/-! Localization only requires smoothness on the chosen chart. -/ +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] + +lemma localize_smooth_on (p : M) {ψ : M → ℝ} (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) + (hsupp : tsupport ψ ⊆ (chart p).source) {f : M → V} + (hf : ContMDiffOn planeModel 𝓘(ℝ, V) ∞ f (chart p).source) : + ContDiff ℝ ∞ (localize p ψ f) := by + have hfc := hf.comp (chart_symm_smooth p) (chart p).mapsTo_symm + have hlocal : ContDiffOn ℝ ∞ + (fun x => (ψ ((chart p).symm x)) ^ 2 • f ((chart p).symm x)) (chart p).target := + (((hψ.comp_contMDiffOn (chart_symm_smooth p)).pow 2).smul hfc).contDiffOn + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport (localize p ψ f) + case neg => exact contDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hx) + obtain ⟨y, hy, hxy⟩ := localize_tsupport p hsupp f hx + have hxT : x ∈ (chart p).target := hxy ▸ (chart p).map_source (hsupp hy) + apply (hlocal.contDiffAt ((chart p).open_target.mem_nhds hxT)).congr_of_eventuallyEq + filter_upwards [(chart p).open_target.mem_nhds hxT] with z hz + exact indicator_of_mem hz _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalization.lean new file mode 100644 index 0000000000000000000000000000000000000000..8f6d7d2d24d67fcfa939be6a35e0467bc84b8631 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingLocalization.lean @@ -0,0 +1,98 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingAtlas + +namespace OAI + +/-! Compactly supported coordinate representatives for smoothing. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def localize (p : M) (ψ : M → ℝ) (f : M → V) : Base → V := + (chart p).target.indicator (fun x => (ψ ((chart p).symm x)) ^ 2 • f ((chart p).symm x)) + +lemma localize_chart (p : M) (ψ : M → ℝ) (f : M → V) {x : M} + (hx : x ∈ (chart p).source) : + localize p ψ f (chart p x) = (ψ x) ^ 2 • f x := by + rw [localize, indicator_of_mem ((chart p).map_source hx), (chart p).left_inv hx] + +lemma localize_zero_off_image (p : M) (ψ : M → ℝ) (f : M → V) {x : Base} + (hx : x ∉ (chart p) '' tsupport ψ) : localize p ψ f x = 0 := by + by_cases ht : x ∈ (chart p).target + · have hψ : ψ ((chart p).symm x) = 0 := by + apply image_eq_zero_of_notMem_tsupport + intro hp + exact hx ⟨(chart p).symm x, hp, (chart p).right_inv ht⟩ + simp only [localize, indicator_of_mem ht, hψ, zero_pow (by decide : 2 ≠ 0), zero_smul] + · exact indicator_of_notMem ht _ + +variable [CompactSpace M] + +lemma localize_tsupport (p : M) {ψ : M → ℝ} (hψ : tsupport ψ ⊆ (chart p).source) + (f : M → V) : tsupport (localize p ψ f) ⊆ (chart p) '' tsupport ψ := by + have hK : IsCompact ((chart p) '' tsupport ψ) := + (isClosed_tsupport ψ).isCompact.image_of_continuousOn ((chart p).continuousOn.mono hψ) + apply closure_minimal _ hK.isClosed + intro x hx + by_contra hn + exact hx (localize_zero_off_image p ψ f hn) + +lemma localize_compact (p : M) {ψ : M → ℝ} (hψ : tsupport ψ ⊆ (chart p).source) + (f : M → V) : HasCompactSupport (localize p ψ f) := + ((isClosed_tsupport ψ).isCompact.image_of_continuousOn + ((chart p).continuousOn.mono hψ)).of_isClosed_subset (isClosed_tsupport _) (localize_tsupport p hψ f) + +/-- Both scalar localization and input support are retained in coordinates. -/ +lemma localize_tsupport_inter (p : M) {ψ : M → ℝ} + (hψ : tsupport ψ ⊆ (chart p).source) (f : M → V) : + tsupport (localize p ψ f) ⊆ (chart p) '' (tsupport ψ ∩ tsupport f) := by + have hsub : tsupport ψ ∩ tsupport f ⊆ (chart p).source := fun _ hx => hψ hx.1 + have hK : IsCompact ((chart p) '' (tsupport ψ ∩ tsupport f)) := + ((isClosed_tsupport ψ).inter (isClosed_tsupport f)).isCompact.image_of_continuousOn + ((chart p).continuousOn.mono hsub) + apply closure_minimal _ hK.isClosed + intro x hx + by_cases ht : x ∈ (chart p).target + · by_contra hn + have heq : localize p ψ f x = 0 := by + by_cases ha : ψ ((chart p).symm x) = 0 + · simp [localize, ht, ha] + by_cases hb : f ((chart p).symm x) = 0 + · simp [localize, ht, hb] + exact False.elim (hn ⟨(chart p).symm x, + ⟨subset_tsupport ψ ha, subset_tsupport f hb⟩, (chart p).right_inv ht⟩) + exact hx heq + · exact False.elim (hx (indicator_of_notMem ht _)) + +variable [IsManifold planeModel ∞ M] + +/-- Extension by zero is smooth because the localization support lies in a +compact subset of the chart target. -/ +lemma localize_smooth (p : M) {ψ : M → ℝ} (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) + (hsupp : tsupport ψ ⊆ (chart p).source) {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ, V) ∞ f) : ContDiff ℝ ∞ (localize p ψ f) := by + have hlocal : ContDiffOn ℝ ∞ + (fun x => (ψ ((chart p).symm x)) ^ 2 • f ((chart p).symm x)) (chart p).target := by + exact (((hψ.comp_contMDiffOn (chart_symm_smooth p)).pow 2).smul + (hf.comp_contMDiffOn (chart_symm_smooth p))).contDiffOn + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport (localize p ψ f) + case neg => exact contDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hx) + have hxI := localize_tsupport p hsupp f hx + obtain ⟨y, hy, hxy⟩ := hxI + have hxT : x ∈ (chart p).target := hxy ▸ (chart p).map_source (hsupp hy) + apply (hlocal.contDiffAt ((chart p).open_target.mem_nhds hxT)).congr_of_eventuallyEq + filter_upwards [(chart p).open_target.mem_nhds hxT] with z hz + exact indicator_of_mem hz _ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMetricCrossBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMetricCrossBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..08adf8c40b13e95c93a9db913e4bce8f0130cf87 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMetricCrossBounds.lean @@ -0,0 +1,56 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingTailBounds +import OAI.Geometry.SurfaceImmersion.Correction.CorrectionMetricBounds + +namespace OAI + +/-! The actual smoothing-tail contribution to the induced metric update. +The dependence on uncontrolled higher input derivatives is linear. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.ExactCorrection +open FiniteOrderSmoothing WeightedEstimates MeasureTheory +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [CompleteSpace V] + +omit [CompleteSpace V] in +lemma fderiv_smoothing_error (r : ℕ) {s : ℝ} (hs : 0 < s) + {G : Base → V} (hG : ContDiff ℝ ∞ G) (hc : HasCompactSupport G) : + fderiv ℝ (G - finiteSmooth r s G) = + fderiv ℝ G - finiteSmooth r s (fderiv ℝ G) := by + funext x + rw [fderiv_sub (hG.differentiable (by simp) x) + ((finiteSmooth_smooth r hs hG).differentiable (by simp) x), + fderiv_finiteSmooth r hs hG hc] + rfl + +/-- In the mixed metric term, all higher derivatives of the true map occur +only in the small factor `(τ/t)^r` multiplying `C`. -/ +theorem weighted_smoothing_metricCrossTerm (r m : ℕ) {s t τ B C D : ℝ} + (hτ : 0 < τ) (hτs : τ ≤ s) (hst : s ≤ t) + {G U : Base → V} (hG : ContDiff ℝ ∞ G) (hc : HasCompactSupport G) + (hU : ContDiff ℝ ∞ U) + (hBr : WeightedBound Set.univ t r B (fderiv ℝ G)) + (hCm : WeightedBound Set.univ t m C (fderiv ℝ G)) + (hDu : WeightedBound Set.univ τ m D (fderiv ℝ U)) (v w : Base) : + WeightedBound Set.univ τ m + (2 * ‖v‖ * ‖w‖ * (2 ^ m * + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) * D)) + (fun x => metricCrossTerm (G - finiteSmooth r s G) U x v w) := by + have hs : 0 < s := hτ.trans_le hτs + have hdG := hG.fderiv_right (m := ∞) (by simp) + have ht := weighted_smoothing_tail r m hτ hτs hst hdG (hc.fderiv ℝ) hBr hCm + rw [← fderiv_smoothing_error r hs hG hc] at ht + have ht0 : 0 ≤ tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r) := + (norm_nonneg (fderiv ℝ (G - finiteSmooth r s G) 0)).trans (ht.norm_le (Set.mem_univ 0)) + have hD : 0 ≤ D := (norm_nonneg (fderiv ℝ U 0)).trans (hDu.norm_le (Set.mem_univ 0)) + exact weighted_metricCrossTerm isOpen_univ.uniqueDiffOn hτ.le ht0 hD + ((hG.sub (finiteSmooth_smooth r hs hG)).fderiv_right (m := ∞) (by simp)).contDiffOn + (hU.fderiv_right (m := ∞) (by simp)).contDiffOn ht hDu v w + +end ClosedSurfaceR4.ExactCorrection + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMoments.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMoments.lean new file mode 100644 index 0000000000000000000000000000000000000000..dbe622f338afe6d496db0392b2a66346e14c6109 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingMoments.lean @@ -0,0 +1,77 @@ +import Mathlib.LinearAlgebra.Vandermonde +import Mathlib.LinearAlgebra.Matrix.NonsingularInverse +import Mathlib.MeasureTheory.Measure.Haar.NormedSpace +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetChainRule + +namespace OAI + +/-! Finite moment cancellation for smoothing kernels on the coordinate plane. +Distinct positive dilations give a kernel of mass one whose required low +moments vanish. This is the algebraic step in finite-order smoothing. -/ +noncomputable section +open scoped BigOperators Matrix + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +/-- The transpose Vandermonde system prescribes all moments through order `r`. -/ +theorem exists_dilation_weights (r : ℕ) (b : Fin (r + 1) → ℝ) + (hb : Function.Injective b) : + ∃ c : Fin (r + 1) → ℝ, ∀ j : Fin (r + 1), + ∑ i, c i * b i ^ j.val = if j = 0 then 1 else 0 := by + let A : Matrix (Fin (r + 1)) (Fin (r + 1)) ℝ := (Matrix.vandermonde b).transpose + have hdet : A.det ≠ 0 := by + simpa only [A, Matrix.det_transpose] using Matrix.det_vandermonde_ne_zero_iff.mpr hb + have hunit : IsUnit A := (Matrix.isUnit_iff_isUnit_det A).mpr (isUnit_iff_ne_zero.mpr hdet) + obtain ⟨c, hc⟩ := (Matrix.mulVec_surjective_iff_isUnit.mpr hunit) (Pi.single 0 1) + refine ⟨c, ?_⟩ + intro j + have h := congrFun hc j + simpa only [A, Matrix.mulVec, dotProduct, Matrix.transpose_apply, + Matrix.vandermonde_apply, Pi.single_apply, mul_comm] using h + +/-- Positive integral dilation factors suffice, so each dilation preserves +compact support and smoothness. -/ +theorem exists_positive_dilation_weights (r : ℕ) : + ∃ c : Fin (r + 1) → ℝ, ∀ j : Fin (r + 1), + ∑ i, c i * ((i.val + 1 : ℕ) : ℝ) ^ j.val = if j = 0 then 1 else 0 := by + apply exists_dilation_weights r + intro i j hij + apply Fin.ext + exact Nat.add_right_cancel (Nat.cast_injective hij) + +def monomial (α : Fin 2 → ℕ) (x : Base) : ℝ := ∏ i, x i ^ α i + +def degree (α : Fin 2 → ℕ) : ℕ := ∑ i, α i + +lemma monomial_smul (α : Fin 2 → ℕ) (a : ℝ) (x : Base) : + monomial α (a • x) = a ^ degree α * monomial α x := by + simp only [monomial, Pi.smul_apply, smul_eq_mul, mul_pow, Finset.prod_mul_distrib, + degree, Finset.prod_pow_eq_pow_sum] + +/-- The normalized dilation is appropriate to the two-dimensional chart. -/ +def dilate (K : Base → ℝ) (a : ℝ) (x : Base) : ℝ := (a ^ 2)⁻¹ * K (a⁻¹ • x) + +lemma moment_dilate (K : Base → ℝ) (α : Fin 2 → ℕ) {a : ℝ} (ha : 0 < a) : + (∫ x, monomial α x * dilate K a x) = a ^ degree α * ∫ x, monomial α x * K x := by + have hdim : Module.finrank ℝ Base = 2 := by simp [Base] + have hm (x : Base) : monomial α x = a ^ degree α * monomial α (a⁻¹ • x) := by + rw [← monomial_smul, smul_smul, mul_inv_cancel₀ ha.ne', one_smul] + have heq : (fun x => monomial α x * dilate K a x) = + (fun x => (a ^ degree α / a ^ 2) * + ((fun y => monomial α y * K y) (a⁻¹ • x))) := by + funext x + rw [hm x] + unfold dilate + ring + rw [heq, integral_const_mul, + Measure.integral_comp_inv_smul_of_nonneg volume (fun x => monomial α x * K x) ha.le] + rw [hdim, smul_eq_mul] + field_simp [ha.ne'] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingNormBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingNormBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..06fe21ab8da91c20d22df39a494c995034e24db6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingNormBounds.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingConvolution + +namespace OAI + +/-! Scale-independent zeroth-order bounds for the constructed smoothing +operator, including the signed finite-moment kernels. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +lemma norm_dilate (K : Base → ℝ) (s : ℝ) (x : Base) : + ‖dilate K s x‖ = dilate (fun y => ‖K y‖) s x := by + simp only [dilate, norm_mul, Real.norm_eq_abs, abs_inv, + abs_of_nonneg (sq_nonneg s)] + +lemma norm_mass_dilate (K : Base → ℝ) {s : ℝ} (hs : 0 < s) : + (∫ x, ‖dilate K s x‖) = ∫ x, ‖K x‖ := by + simp_rw [norm_dilate] + exact mass_dilate (fun x => ‖K x‖) hs + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- Signed moment cancellation does not cost a power of the smoothing scale: +the operator bound is the fixed L1 norm of the chosen kernel. -/ +lemma smooth_norm_le (r : ℕ) {s C : ℝ} (hs : 0 < s) {f : Base → E} + (hf : ∀ x, ‖f x‖ ≤ C) (x : Base) : + ‖smooth r s f x‖ ≤ (∫ y, ‖kernel r y‖) * C := by + have hk := compact_dilate (kernel_compact r) hs.ne' + have hcont := (smooth_dilate (kernel_smooth r) s).continuous + have hi := (hcont.integrable_of_hasCompactSupport (μ := volume) hk).norm.mul_const C + change ‖∫ y, dilate (kernel r) s y • f (x - y)‖ ≤ _ + calc + _ ≤ ∫ y, ‖dilate (kernel r) s y‖ * C := + norm_integral_le_of_norm_le hi (Filter.Eventually.of_forall fun y => by + rw [norm_smul] + exact mul_le_mul_of_nonneg_left (hf (x - y)) (norm_nonneg _)) + _ = (∫ y, ‖kernel r y‖) * C := by rw [integral_mul_const, norm_mass_dilate _ hs] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidual.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidual.lean new file mode 100644 index 0000000000000000000000000000000000000000..653b1204f74978c25e926cd1e35231b796285d30 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidual.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingFirstMoment + +namespace OAI + +/-! Iterated smoothing residuals give arbitrary finite approximation order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +def residual (s : ℝ) : ℕ → (Base → E) → (Base → E) + | 0, f => f + | n + 1, f => residual s n f - smooth 0 s (residual s n f) + +lemma smooth_compact (r : ℕ) {s : ℝ} (hs : 0 < s) {f : Base → E} + (hfc : HasCompactSupport f) : HasCompactSupport (smooth r s f) := + (compact_dilate (kernel_compact r) hs.ne').convolution (ContinuousLinearMap.lsmul ℝ ℝ) hfc + +lemma residual_smooth {s : ℝ} (hs : 0 < s) (n : ℕ) {f : Base → E} + (hf : ContDiff ℝ ∞ f) : ContDiff ℝ ∞ (residual s n f) := by + induction n with + | zero => exact hf + | succ n ih => exact ih.sub (smooth_smooth 0 hs ih.continuous.locallyIntegrable) + +lemma residual_compact {s : ℝ} (hs : 0 < s) (n : ℕ) {f : Base → E} + (hfc : HasCompactSupport f) : HasCompactSupport (residual s n f) := by + induction n with + | zero => exact hfc + | succ n ih => exact ih.sub (smooth_compact 0 hs ih) + +/-- Differentiation commutes with every finite residual. -/ +lemma fderiv_residual {s : ℝ} (hs : 0 < s) (n : ℕ) {f : Base → E} + (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) : + fderiv ℝ (residual s n f) = residual s n (fderiv ℝ f) := by + induction n with + | zero => rfl + | succ n ih => + funext x + have hr := residual_smooth hs n hf + change fderiv ℝ (residual s n f - smooth 0 s (residual s n f)) x = _ + rw [fderiv_sub (hr.differentiable (by simp) x) + ((smooth_smooth 0 hs hr.continuous.locallyIntegrable).differentiable (by simp) x)] + rw [fderiv_smooth 0 hs hr (residual_compact hs n hfc), ih] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..c8d158486a409544f8a0fd446e9b00ee2fb217b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualBounds.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingResidual + +namespace OAI + +/-! Arbitrary finite approximation order from a finite input derivative bound. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Applying the smoothing residual `n` times gains `s^n`, using just the +`n`-th derivative of the original input. -/ +theorem residual_norm_le {s C : ℝ} (hs : 0 < s) (n : ℕ) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ n f x‖ ≤ C) (x : Base) : + ‖residual s n f x‖ ≤ (s * firstMoment (kernel 0)) ^ n * C := by + induction n generalizing E x with + | zero => simpa only [residual, pow_zero, one_mul, norm_iteratedFDeriv_zero] using hb x + | succ n ih => + have hb' : ∀ y, ‖fderiv ℝ (residual s n f) y‖ ≤ + (s * firstMoment (kernel 0)) ^ n * C := by + intro y + rw [fderiv_residual hs n hf hfc] + apply ih (hf.fderiv_right (m := ∞) (by simp)) (hfc.fderiv ℝ) (x := y) + intro z + rw [norm_iteratedFDeriv_fderiv] + exact hb z + have h := smooth_sub_norm_le 0 hs (residual_smooth hs n hf) hb' x + change ‖residual s n f x - smooth 0 s (residual s n f) x‖ ≤ _ + apply h.trans_eq + rw [pow_succ] + ring + +/-- The same finite-order approximation estimate in each higher derivative. -/ +theorem iterated_residual_norm_le {s C : ℝ} (hs : 0 < s) (n m : ℕ) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ (n + m) f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ m (residual s n f) x‖ ≤ + (s * firstMoment (kernel 0)) ^ n * C := by + induction m generalizing E with + | zero => + rw [norm_iteratedFDeriv_zero] + exact residual_norm_le hs n hf hfc (by simpa only [Nat.add_zero] using hb) x + | succ m ih => + rw [← norm_iteratedFDeriv_fderiv, fderiv_residual hs n hf hfc] + apply ih (hf.fderiv_right (m := ∞) (by simp)) (hfc.fderiv ℝ) + intro y + rw [norm_iteratedFDeriv_fderiv] + rw [Nat.add_assoc] + exact hb y + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..b61a2edee53904e8f7212a289af1475098a3c538 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingResidualOperator.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingResidualBounds + +namespace OAI + +/-! Bounds in unchanged derivative norms for repeated residual operators. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory +open JetPolynomial (Base) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +/-- The residual operator is bounded in the original norm, independently of +its smoothing scale. -/ +theorem residual_bounded {s C : ℝ} (hs : 0 < s) (n : ℕ) + {f : Base → E} (hb : ∀ x, ‖f x‖ ≤ C) (x : Base) : + ‖residual s n f x‖ ≤ (1 + ∫ y, ‖kernel 0 y‖) ^ n * C := by + induction n generalizing x with + | zero => simpa only [residual, pow_zero, one_mul] using hb x + | succ n ih => + change ‖residual s n f x - smooth 0 s (residual s n f) x‖ ≤ _ + calc + _ ≤ ‖residual s n f x‖ + ‖smooth 0 s (residual s n f) x‖ := norm_sub_le _ _ + _ ≤ (1 + ∫ y, ‖kernel 0 y‖) ^ n * C + + (∫ y, ‖kernel 0 y‖) * ((1 + ∫ y, ‖kernel 0 y‖) ^ n * C) := + add_le_add (ih x) (smooth_norm_le 0 hs ih x) + _ = _ := by rw [pow_succ]; ring + +/-- Repeated residuals are bounded in every original derivative norm. -/ +theorem iterated_residual_bounded {s C : ℝ} (hs : 0 < s) (n m : ℕ) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hb : ∀ x, ‖iteratedFDeriv ℝ m f x‖ ≤ C) (x : Base) : + ‖iteratedFDeriv ℝ m (residual s n f) x‖ ≤ + (1 + ∫ y, ‖kernel 0 y‖) ^ n * C := by + induction m generalizing E with + | zero => + simp only [norm_iteratedFDeriv_zero] at hb ⊢ + exact residual_bounded hs n hb x + | succ m ih => + rw [← norm_iteratedFDeriv_fderiv, fderiv_residual hs n hf hfc] + apply ih (hf.fderiv_right (m := ∞) (by simp)) (hfc.fderiv ℝ) + intro y + rw [norm_iteratedFDeriv_fderiv] + exact hb y + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTailBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTailBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..ae142b4db33ea39621725fb78bd480124c594244 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTailBounds.lean @@ -0,0 +1,103 @@ +import OAI.Geometry.SurfaceImmersion.Correction.FiniteSmootherWeighted + +namespace OAI + +/-! The finite-input smoothing-tail estimate at every output order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open MeasureTheory WeightedEstimates +open JetPolynomial (Base) + +def tailConstant (r : ℕ) : ℝ := + (∑ j ∈ Finset.range (r + 1), approximationConstant r j) + + (1 + ∫ y, ‖kernel 0 y‖) ^ r + +lemma approximationConstant_le_tail {r j : ℕ} (hj : j ≤ r) : + approximationConstant r j ≤ tailConstant r := by + have h : approximationConstant r j ≤ + ∑ i ∈ Finset.range (r + 1), approximationConstant r i := + Finset.single_le_sum (fun i _ => approximationConstant_nonneg r i) + (Finset.mem_range.mpr (by omega)) + exact h.trans (le_add_of_nonneg_right (pow_nonneg + (add_nonneg zero_le_one (integral_nonneg fun _ => norm_nonneg _)) r)) + +lemma residualConstant_le_tail (r : ℕ) : + (1 + ∫ y, ‖kernel 0 y‖) ^ r ≤ tailConstant r := + le_add_of_nonneg_left (Finset.sum_nonneg fun i _ => approximationConstant_nonneg r i) + +lemma tailConstant_nonneg (r : ℕ) : 0 ≤ tailConstant r := + (approximationConstant_nonneg r 0).trans (approximationConstant_le_tail (Nat.zero_le r)) + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] + +/-- Only the finite order `r` is used in the approximation term; uncontrolled +higher input derivatives enter linearly, multiplied by `(τ/t)^r`. -/ +theorem weighted_smoothing_tail (r m : ℕ) {s t τ B C : ℝ} + (hτ : 0 < τ) (hτs : τ ≤ s) (hst : s ≤ t) + {f : Base → E} (hf : ContDiff ℝ ∞ f) (hfc : HasCompactSupport f) + (hBr : WeightedBound Set.univ t r B f) + (hCm : WeightedBound Set.univ t m C f) : + WeightedBound Set.univ τ m + (tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (f - finiteSmooth r s f) := by + have hs : 0 < s := hτ.trans_le hτs + have ht : 0 < t := hs.trans_le hst + have hτt : τ ≤ t := hτs.trans hst + have hB : 0 ≤ B := (norm_nonneg (f 0)).trans (hBr.norm_le (Set.mem_univ 0)) + have hC : 0 ≤ C := (norm_nonneg (f 0)).trans (hCm.norm_le (Set.mem_univ 0)) + intro j hj x _ + rw [iteratedFDerivWithin_univ] + by_cases hjr : j ≤ r + · have hbr : ∀ y, ‖iteratedFDeriv ℝ r f y‖ ≤ B / t ^ r := fun y => by + simpa only [iteratedFDerivWithin_univ] using hBr.deriv_le ht le_rfl (Set.mem_univ y) + have h := finiteSmooth_approximation r 0 j hjr hs hf hfc + (fun y => by rw [Nat.zero_add]; exact hbr y) x + rw [Nat.zero_add] at h + have hp : τ ^ j * s ^ (r - j) ≤ s ^ r := by + calc + _ ≤ s ^ j * s ^ (r - j) := + mul_le_mul_of_nonneg_right (pow_le_pow_left₀ hτ.le hτs j) (pow_nonneg hs.le _) + _ = _ := by rw [← pow_add, Nat.add_sub_of_le hjr] + calc + _ ≤ τ ^ j * (approximationConstant r j * s ^ (r - j) * (B / t ^ r)) := + mul_le_mul_of_nonneg_left h (pow_nonneg hτ.le _) + _ = (approximationConstant r j * B / t ^ r) * (τ ^ j * s ^ (r - j)) := by ring + _ ≤ (approximationConstant r j * B / t ^ r) * s ^ r := + mul_le_mul_of_nonneg_left hp (div_nonneg + (mul_nonneg (approximationConstant_nonneg _ _) hB) (pow_nonneg ht.le _)) + _ = approximationConstant r j * (B * (s / t) ^ r) := by rw [div_pow]; ring + _ ≤ tailConstant r * (B * (s / t) ^ r) := + mul_le_mul_of_nonneg_right (approximationConstant_le_tail hjr) + (mul_nonneg hB (pow_nonneg (div_nonneg hs.le ht.le) _)) + _ ≤ _ := mul_le_mul_of_nonneg_left + (le_add_of_nonneg_right (mul_nonneg hC (pow_nonneg (div_nonneg hτ.le ht.le) _))) + (tailConstant_nonneg r) + · have hrj : r ≤ j := by omega + have hbc : ∀ y, ‖iteratedFDeriv ℝ j f y‖ ≤ C / t ^ j := fun y => by + simpa only [iteratedFDerivWithin_univ] using hCm.deriv_le ht hj (Set.mem_univ y) + have h := iterated_residual_bounded hs r j hf hfc hbc x + rw [error_finiteSmooth] + have hp : (τ / t) ^ j ≤ (τ / t) ^ r := + pow_le_pow_of_le_one (div_nonneg hτ.le ht.le) ((div_le_one ht).mpr hτt) hrj + calc + _ ≤ τ ^ j * ((1 + ∫ y, ‖kernel 0 y‖) ^ r * (C / t ^ j)) := + mul_le_mul_of_nonneg_left h (pow_nonneg hτ.le _) + _ = (1 + ∫ y, ‖kernel 0 y‖) ^ r * C * (τ / t) ^ j := by rw [div_pow]; ring + _ ≤ (1 + ∫ y, ‖kernel 0 y‖) ^ r * C * (τ / t) ^ r := + mul_le_mul_of_nonneg_left hp (mul_nonneg + (pow_nonneg (add_nonneg zero_le_one (integral_nonneg fun _ => norm_nonneg _)) _) hC) + _ ≤ tailConstant r * (C * (τ / t) ^ r) := by + rw [mul_assoc] + exact mul_le_mul_of_nonneg_right (residualConstant_le_tail r) + (mul_nonneg hC (pow_nonneg (div_nonneg hτ.le ht.le) _)) + _ ≤ _ := mul_le_mul_of_nonneg_left + (le_add_of_nonneg_left (mul_nonneg hB (pow_nonneg (div_nonneg hs.le ht.le) _))) + (tailConstant_nonneg r) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTransition.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTransition.lean new file mode 100644 index 0000000000000000000000000000000000000000..c12ecbd20232b6ba7e8a221fbbfe190920e40229 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SmoothingTransition.lean @@ -0,0 +1,95 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ManifoldSmoothingLinearity +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedCompositionBounds + +namespace OAI + +/-! The coordinate transitions that transport each localized smoothing error. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold WeightedEstimates +open JetPolynomial (Base) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +def transition (p q : M) : OpenPartialHomeomorph Base Base := (chart p).symm.trans (chart q) + +lemma transition_smooth (p q : M) : + ContDiffOn ℝ ∞ (transition p q) (transition p q).source := by + apply ContMDiffOn.contDiffOn + exact (chart_smooth q).comp + ((chart_symm_smooth p).mono (fun _ hx => hx.1)) (fun _ hx => hx.2) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def pairWeight (i j : A.centers) : Base → ℝ := localize (i : M) (A.weight i) (A.outer j) + +def pairSupport (i j : A.centers) : Set Base := + (chart (i : M)) '' (tsupport (A.weight i) ∩ tsupport (A.outer j)) + +variable [CompactSpace M] + +lemma pairWeight_smooth (i j : A.centers) : ContDiff ℝ ∞ (A.pairWeight i j) := + localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) (A.outer_smooth j) + +lemma pairWeight_support (i j : A.centers) : tsupport (A.pairWeight i j) ⊆ A.pairSupport i j := + localize_tsupport_inter (i : M) (A.weight_support i) (A.outer j) + +lemma pairSupport_compact (i j : A.centers) : IsCompact (A.pairSupport i j) := + ((isClosed_tsupport (A.weight i)).inter (isClosed_tsupport (A.outer j))).isCompact.image_of_continuousOn + ((chart (i : M)).continuousOn.mono (fun _ hx => A.weight_support i hx.1)) + +omit [CompactSpace M] in +lemma pairSupport_transition (i j : A.centers) : + A.pairSupport i j ⊆ (transition (i : M) (j : M)).source := by + rintro x ⟨p, ⟨hp, hq⟩, rfl⟩ + have hp' := A.weight_support i hp + refine ⟨(chart (i : M)).map_source hp', ?_⟩ + change (chart (i : M)).symm (chart (i : M) p) ∈ (chart (j : M)).source + rw [(chart (i : M)).left_inv hp'] + exact A.outer_support j hq + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +omit [CompactSpace M] in +/-- Writing a restored component in another chart is multiplication by a +fixed smooth weight followed by the fixed transition. -/ +lemma localize_restore (i j : A.centers) (h : Base → V) : + localize (i : M) (A.weight i) (restore (j : M) (A.outer j) h) = + fun x => A.pairWeight i j x • h (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, pairWeight, 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 hp => hj (A.outer_support j hp)) + simp only [localize, restore, pairWeight, indicator_of_mem hi, indicator_of_notMem hj, + hz, smul_zero, zero_smul] + · simp only [localize, pairWeight, indicator_of_notMem hi, zero_smul] + +/-- Each overlap transports a global weighted bound with fixed constants. -/ +theorem pair_weighted_bound (i j : A.centers) (m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (h : Base → V) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ h → WeightedBound Set.univ s m C h → + WeightedBound Set.univ s m (D * C) + (localize (i : M) (A.weight i) (restore (j : M) (A.outer j) h)) := by + obtain ⟨D, hD, hb⟩ := compact_localized_composition_bound (V := V) + (transition (i : M) (j : M)).open_source (A.pairSupport_compact i j) + (A.pairSupport_transition i j) (A.pairWeight_smooth i j) (A.pairWeight_support i j) + (transition_smooth (i : M) (j : M)) m + refine ⟨D, hD, ?_⟩ + intro h s C hs hs1 hC hh hbh + rw [A.localize_restore] + exact hb h s C hs hs1 hC hh hbh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SpecialPointCorrection.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SpecialPointCorrection.lean new file mode 100644 index 0000000000000000000000000000000000000000..f5e7f849d514b4be02191d1065d6c7de99d48e62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SpecialPointCorrection.lean @@ -0,0 +1,94 @@ +import Mathlib + +namespace OAI + +/-! Small affine bumps prescribe the vertical derivative near an isolated special point. -/ +noncomputable section +open Filter Set Metric +open scoped ContDiff Topology + +namespace ClosedSurfaceR4.TransverseSmallFunction + +abbrev Base := ℝ × ℝ + +def pointCorrection (p : Base) (φ : ContDiffBump p) (B : ℝ) (x : Base) : ℝ := + B * (x.2 - p.2) * φ x + +lemma pointCorrection_smooth (p : Base) (φ : ContDiffBump p) (B : ℝ) : + ContDiff ℝ ∞ (pointCorrection p φ B) := + (contDiff_const.mul (contDiff_snd.sub contDiff_const)).mul φ.contDiff + +lemma pointCorrection_support (p : Base) (φ : ContDiffBump p) (B : ℝ) : + tsupport (pointCorrection p φ B) ⊆ closedBall p φ.rOut := by + rw [← φ.tsupport_eq] + exact tsupport_mul_subset_right + +lemma pointCorrection_compact (p : Base) (φ : ContDiffBump p) (B : ℝ) : + HasCompactSupport (pointCorrection p φ B) := by + exact φ.hasCompactSupport.of_isClosed_subset (isClosed_tsupport _) + (by rw [φ.tsupport_eq]; exact pointCorrection_support p φ B) + +lemma pointCorrection_derivative {p x : Base} (φ : ContDiffBump p) (B : ℝ) + (hx : x ∈ ball p φ.rIn) : + fderiv ℝ (pointCorrection p φ B) x (0, 1) = B := by + have he : pointCorrection p φ B =ᶠ[𝓝 x] (fun y : Base => B * (y.2 - p.2)) := by + filter_upwards [φ.eventuallyEq_one_of_mem_ball hx] with y hy + simp only [pointCorrection, hy, Pi.one_apply, mul_one] + rw [he.fderiv_eq] + have hd : HasFDerivAt (fun y : Base => B * (y.2 - p.2)) + (B • (ContinuousLinearMap.snd ℝ ℝ ℝ)) x := + (hasFDerivAt_snd.sub_const p.2).const_mul B + rw [hd.fderiv] + simp + +lemma pointCorrection_abs_le (p : Base) (φ : ContDiffBump p) (B : ℝ) (x : Base) : + |pointCorrection p φ B x| ≤ |B| * φ.rOut := by + by_cases hz : φ x = 0 + · simp only [pointCorrection, hz, mul_zero, abs_zero] + exact mul_nonneg (abs_nonneg _) φ.rOut_pos.le + have hmem : x ∈ ball p φ.rOut := by + rw [← φ.support_eq] + exact hz + have hdist : dist x p < φ.rOut := hmem + have hcoord : |x.2 - p.2| ≤ dist x p := by + simpa only [dist_eq_norm, Prod.snd_sub, Real.norm_eq_abs] using norm_snd_le (x - p) + have hφ : |φ x| ≤ 1 := by rw [abs_of_nonneg φ.nonneg]; exact φ.le_one + calc + |pointCorrection p φ B x| = |B| * |x.2 - p.2| * |φ x| := by simp only [pointCorrection, abs_mul] + _ ≤ |B| * φ.rOut * 1 := mul_le_mul (mul_le_mul_of_nonneg_left + (hcoord.trans hdist.le) (abs_nonneg B)) hφ (abs_nonneg _) + (mul_nonneg (abs_nonneg B) φ.rOut_pos.le) + _ = |B| * φ.rOut := mul_one _ + +theorem exists_special_point_correction {p : Base} {U : Set Base} + (hU : IsOpen U) (hpU : p ∈ U) (B : ℝ) {ε : ℝ} (hε : 0 < ε) : + ∃ H : Base → ℝ, ContDiff ℝ ∞ H ∧ HasCompactSupport H ∧ tsupport H ⊆ U ∧ + (∀ x, |H x| < ε) ∧ ∃ V : Set Base, IsOpen V ∧ p ∈ V ∧ V ⊆ U ∧ + ∀ x ∈ V, fderiv ℝ H x (0, 1) = B := by + obtain ⟨r, hr, hrU⟩ := Metric.isOpen_iff.mp hU p hpU + let δ := min (r / 2) (ε / (|B| + 1)) + have hden : 0 < |B| + 1 := by positivity + have hδ : 0 < δ := lt_min (by positivity) (div_pos hε hden) + have hδr : δ < r := lt_of_le_of_lt (min_le_left _ _) (by linarith) + let φ : ContDiffBump p := ⟨δ / 2, δ, by positivity, by linarith⟩ + have hball : closedBall p δ ⊆ U := by + intro x hx + exact hrU ((mem_ball).mpr (lt_of_le_of_lt hx hδr)) + have hsmall : |B| * δ < ε := by + have hb : |B| * (ε / (|B| + 1)) < ε := by + rw [← mul_div_assoc] + apply (div_lt_iff₀ hden).mpr + nlinarith + exact lt_of_le_of_lt (mul_le_mul_of_nonneg_left (min_le_right _ _) (abs_nonneg B)) hb + refine ⟨pointCorrection p φ B, pointCorrection_smooth p φ B, + pointCorrection_compact p φ B, (pointCorrection_support p φ B).trans hball, + (fun x => lt_of_le_of_lt (pointCorrection_abs_le p φ B x) hsmall), + ball p φ.rIn, isOpen_ball, mem_ball_self φ.rIn_pos, ?_, ?_⟩ + · exact (ball_subset_closedBall.trans (closedBall_subset_closedBall φ.rIn_lt_rOut.le)).trans hball + · exact fun x hx => pointCorrection_derivative φ B hx + +end ClosedSurfaceR4.TransverseSmallFunction + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedFreeLinearity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedFreeLinearity.lean new file mode 100644 index 0000000000000000000000000000000000000000..774ad576da07f9a166edcdbbcb285ac96143e997 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedFreeLinearity.lean @@ -0,0 +1,70 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeModeSize +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteParametrixLinearity + +namespace OAI + +/-! The free seed and its finite perturbed correction are actual linear maps. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial +variable {n : ℕ} {G : Field n} {U : Set Base} + +def initialFreeLM (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) : + SupportedField (F := Ambient n) K →ₗ[ℂ] SupportedField (F := Ambient n) K where + toFun V := initialMode τ h K hKU V 0 + map_add' V W := by + apply DFunLike.ext + intro p + by_cases hp : p ∈ U + · have hh := modeApprox_sub τ hG h (V.contDiff.add W.contDiff).contDiffOn W.contDiff.contDiffOn + (f := fun _ => 0) (g := fun _ => 0) contDiffOn_const contDiffOn_const 0 hp + change initialAmplitude τ G (fun x => V x + W x) (fun _ => 0) p = + initialAmplitude τ G V (fun _ => 0) p + initialAmplitude τ G W (fun _ => 0) p + simp only [modeApprox, add_sub_cancel_right, sub_self] at hh + exact sub_eq_iff_eq_add.mp hh.symm + · have hk : p ∉ (K : Set Base) := fun hk => hp (hKU hk) + change initialMode τ h K hKU (V + W) 0 p = + initialMode τ h K hKU V 0 p + initialMode τ h K hKU W 0 p + rw [(initialMode τ h K hKU (V + W) 0).zero_on_compl hk, + (initialMode τ h K hKU V 0).zero_on_compl hk, + (initialMode τ h K hKU W 0).zero_on_compl hk] + simp only [Pi.zero_apply, zero_add] + map_smul' c V := by + apply DFunLike.ext + intro p + by_cases hp : p ∈ U + · have hh := modeApprox_smul τ c hG h V.contDiff.contDiffOn + (f := fun _ => 0) contDiffOn_const 0 hp + change initialAmplitude τ G (fun x => c • V x) (fun _ => 0) p = + c • initialAmplitude τ G V (fun _ => 0) p + simpa only [modeApprox, smul_zero] using hh + · have hk : p ∉ (K : Set Base) := fun hk => hp (hKU hk) + change initialMode τ h K hKU (c • V) 0 p = c • initialMode τ h K hKU V 0 p + rw [(initialMode τ h K hKU (c • V) 0).zero_on_compl hk, + (initialMode τ h K hKU V 0).zero_on_compl hk] + simp only [Pi.zero_apply, smul_zero] + +def perturbedFreeLM (τ : ℝ) (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) + (q : ℕ) : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K := + (FiniteParametrix.homogeneousLM ((conjugatedDLM τ hG K).restrictScalars ℝ + R) + ((forcedModeLM τ hG h K hKU 0).restrictScalars ℝ) q).comp + ((initialFreeLM τ hG h K hKU).restrictScalars ℝ) + +lemma perturbedFreeLM_apply (τ : ℝ) (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) + (q : ℕ) (V : SupportedField (F := Ambient n) K) : + perturbedFreeLM τ hG h K hKU R q V = perturbedFreeMode τ hG h K hKU R V q := by + exact FiniteParametrix.homogeneousLM_apply _ _ q _ + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedInitialMode.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedInitialMode.lean new file mode 100644 index 0000000000000000000000000000000000000000..1f54041f599668d2739937833487ce772614c0dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedInitialMode.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedModeBounds + +namespace OAI + +/-! Supported initial amplitudes with both forcing and a free normal seed. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +lemma initialAmplitude_tsupport (τ : ℝ) (G V : Field n) (f : Tensor) : + tsupport (initialAmplitude τ G V f) ⊆ tsupport V ∪ tsupport f := + modeApprox_tsupport τ G V f 0 + +def initialMode (τ : ℝ) (h : ModeDomain G U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (V : SupportedField (F := Ambient n) K) + (f : SupportedField (F := Fin 3 → ℂ) K) : SupportedField (F := Ambient n) K := + let hs := (initialAmplitude_tsupport τ G V f).trans (Set.union_subset V.tsupport_subset f.tsupport_subset) + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset h.isOpen (hs.trans hKU) + (contDiffOn_initialAmplitude τ h V.contDiff.contDiffOn f.contDiff.contDiffOn)) + (subset_closure.trans hs) + +lemma initialMode_apply (τ : ℝ) (h : ModeDomain G U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (V : SupportedField (F := Ambient n) K) + (f : SupportedField (F := Fin 3 → ℂ) K) (p : Base) : + initialMode τ h K hKU V f p = initialAmplitude τ G V f p := rfl + +lemma initialMode_free_bound (τ : ℝ) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {B : ℝ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hB : 0 ≤ B) + (m : ℕ) (hc : ReconstructionCoefficientBound G U s (m + 1) B) + (V : SupportedField (F := Ambient n) K) : + supportedWeightedSeminorm K s m (initialMode τ h K hKU V 0) ≤ + initialConstant n m B * supportedWeightedSeminorm K s (m + 1) V := by + let C := supportedWeightedSeminorm K s (m + 1) V + have hC : 0 ≤ C := apply_nonneg _ _ + have hv := weighted_initialAmplitude hτ h hs hτs hs1 hB hC hc + (f := fun _ => 0) contDiffOn_const V.contDiff.contDiffOn + ((weightedBound_zero U s (m + 1)).mono_const hC) + ((weightedBound_of_supportedSeminorm s (m + 1) V).restrict_open h.isOpen) + have hglobal : WeightedBound Set.univ s m (initialConstant n m B * C) + (initialMode τ h K hKU V 0) := + hv.extend_support h.isOpen ((initialMode τ h K hKU V 0).tsupport_subset.trans hKU) + (mul_nonneg (initialConstant_nonneg _ _ hB) hC) + exact supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (initialConstant_nonneg _ _ hB) hC) _ hglobal + +lemma initialMode_free_difference (τ : ℝ) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {B : ℝ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hB : 0 ≤ B) + (m : ℕ) (hc : ReconstructionCoefficientBound G U s (m + 1) B) + (V : SupportedField (F := Ambient n) K) : + supportedWeightedSeminorm K s m (initialMode τ h K hKU V 0 - V) ≤ + amplitudeConstant n m B * (τ / s) * supportedWeightedSeminorm K s (m + 1) V := by + let C := supportedWeightedSeminorm K s (m + 1) V + have hC : 0 ≤ C := apply_nonneg _ _ + have hv := weighted_initialAmplitude_free_sub hτ h hs hs1 hB hC hc V.contDiff.contDiffOn + ((weightedBound_of_supportedSeminorm s (m + 1) V).restrict_open h.isOpen) + have hn : 0 ≤ amplitudeConstant n m B * (τ / s) * C := + mul_nonneg (mul_nonneg (amplitudeConstant_nonneg _ _ hB) (div_nonneg hτ.le hs.le)) hC + have hl : WeightedBound U s m (amplitudeConstant n m B * (τ / s) * C) + (initialMode τ h K hKU V 0 - V) := hv + have hg := hl.extend_support h.isOpen ((initialMode τ h K hKU V 0 - V).tsupport_subset.trans hKU) hn + exact supportedSeminorm_le_of_weightedBound hs hn _ hg + +lemma initialMode_free_residual (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {B : ℝ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hB : 0 ≤ B) + (m : ℕ) (hc : FullModeCoefficientBound G U s (m + 1) B) + (V : SupportedField (F := Ambient n) K) + (hX : ∀ p ∈ U, coordDeriv dx G p ⬝ᵥ V p = 0) + (hY : ∀ p ∈ U, coordDeriv dy G p ⬝ᵥ V p = 0) + (hV : ∀ p ∈ U, goodSecond G p ⬝ᵥ V p = 0) : + supportedWeightedSeminorm K s m (conjugatedDLM τ hG K (initialMode τ h K hKU V 0)) ≤ + fullErrorConstant n m B * (τ / s) * supportedWeightedSeminorm K s (m + 1) V := by + let C := supportedWeightedSeminorm K s (m + 1) V + have hC : 0 ≤ C := apply_nonneg _ _ + have hv := weighted_residual_modeApprox hτ hG h hs hs1 hB hC + (f := fun _ => 0) contDiffOn_const V.contDiff.contDiffOn hX hY hV 0 m hc + ((weightedBound_zero U s (m + 1)).mono_const hC) + ((weightedBound_of_supportedSeminorm s (m + 1) V).restrict_open h.isOpen) + have hn : 0 ≤ fullErrorConstant n m B * (τ / s) * C := + mul_nonneg (mul_nonneg (fullErrorConstant_nonneg _ _ hB) (div_nonneg hτ.le hs.le)) hC + have hl : WeightedBound U s m (fullErrorConstant n m B * (τ / s) * C) + (conjugatedDLM τ hG K (initialMode τ h K hKU V 0)) := by + change WeightedBound U s m (fullErrorConstant n m B * (τ / s) * C) + (conjugatedD τ G (initialAmplitude τ G V (fun _ => 0))) + simp only [Nat.add_zero, zero_add, pow_one, modeApprox] at hv + change WeightedBound U s m (fullErrorConstant n m B * (τ / s) * C) + (fun p => conjugatedD τ G (initialAmplitude τ G V (fun _ => 0)) p - (0 : Fin 3 → ℂ)) at hv + simpa only [sub_zero] using hv + have hg := hl.extend_support h.isOpen + ((conjugatedDLM τ hG K (initialMode τ h K hKU V 0)).tsupport_subset.trans hKU) hn + exact supportedSeminorm_le_of_weightedBound hs hn _ hg + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedMeanError.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedMeanError.lean new file mode 100644 index 0000000000000000000000000000000000000000..80ec1b5f03aaac27bc6b97d6cad599e4a9ed9db1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedMeanError.lean @@ -0,0 +1,78 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedFreeLinearity +import OAI.Geometry.Immersion.ClosedSurface.MeanDifferences + +namespace OAI + +/-! The actual zero-phase metric error is bilinear in the free seeds. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial + +variable {n : ℕ} {K : Compacts Base} + +def seedMeanError (τ : ℝ) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W : SupportedField (F := Ambient n) K) (v w p : Base) : ℝ := + QuadraticMean.zeroPair (gradientAmplitude τ (T V) v p) (gradientAmplitude τ (T W) w p) - + QuadraticMean.zeroPair (leadingDerivative τ V v p) (leadingDerivative τ W w p) + +lemma seedMeanError_sub_left (τ : ℝ) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W Z : SupportedField (F := Ambient n) K) (v w p : Base) : + seedMeanError τ T (V - W) Z v w p = + seedMeanError τ T V Z v w p - seedMeanError τ T W Z v w p := by + have he : ((T (V - W)) : Field n) = fun x => T V x - T W x := by + rw [map_sub] + rfl + simp only [seedMeanError, he] + change QuadraticMean.zeroPair (gradientAmplitude τ (fun x => T V x - T W x) v p) + (gradientAmplitude τ (T Z) w p) - + QuadraticMean.zeroPair (leadingDerivative τ (fun x => V x - W x) v p) (leadingDerivative τ Z w p) = _ + rw [gradientAmplitude_sub τ ((T V).contDiff.differentiable (by simp) p) + ((T W).contDiff.differentiable (by simp) p), leadingDerivative_sub, + QuadraticMean.zeroPair_sub_left, QuadraticMean.zeroPair_sub_left] + ring + +lemma seedMeanError_sub_right (τ : ℝ) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W Z : SupportedField (F := Ambient n) K) (v w p : Base) : + seedMeanError τ T Z (V - W) v w p = + seedMeanError τ T Z V v w p - seedMeanError τ T Z W v w p := by + have he : ((T (V - W)) : Field n) = fun x => T V x - T W x := by + rw [map_sub] + rfl + simp only [seedMeanError, he] + change QuadraticMean.zeroPair (gradientAmplitude τ (T Z) v p) + (gradientAmplitude τ (fun x => T V x - T W x) w p) - + QuadraticMean.zeroPair (leadingDerivative τ Z v p) (leadingDerivative τ (fun x => V x - W x) w p) = _ + rw [gradientAmplitude_sub τ ((T V).contDiff.differentiable (by simp) p) + ((T W).contDiff.differentiable (by simp) p), leadingDerivative_sub, + QuadraticMean.zeroPair_sub_right, QuadraticMean.zeroPair_sub_right] + ring + +lemma seedMeanError_difference (τ : ℝ) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W : SupportedField (F := Ambient n) K) (v w p : Base) : + seedMeanError τ T V V v w p - seedMeanError τ T W W v w p = + seedMeanError τ T (V - W) V v w p + seedMeanError τ T W (V - W) v w p := by + rw [seedMeanError_sub_left, seedMeanError_sub_right] + ring + +lemma seedMeanError_smooth (τ : ℝ) + (T : SupportedField (F := Ambient n) K →ₗ[ℝ] SupportedField (F := Ambient n) K) + (V W : SupportedField (F := Ambient n) K) (v w : Base) : + ContDiff ℝ ∞ (seedMeanError τ T V W v w) := by + apply contDiffOn_univ.mp + exact (QuadraticMean.contDiffOn_zeroPair + (contDiffOn_gradientAmplitude isOpen_univ (T V).contDiff.contDiffOn τ v) + (contDiffOn_gradientAmplitude isOpen_univ (T W).contDiff.contDiffOn τ w)).sub + (QuadraticMean.contDiffOn_zeroPair (contDiffOn_leadingDerivative τ V.contDiff.contDiffOn v) + (contDiffOn_leadingDerivative τ W.contDiff.contDiffOn w)) + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..178c39130456f35ae5e281a9a0784cd6860ec531 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeBounds.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedModeOperators + +namespace OAI + +/-! Weighted seminorm bounds for the actual first geometric parametrix and +its conjugated metric residual. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +lemma forcedModeLM_zero_bound (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {B : ℝ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hτs : τ ≤ s) (hs1 : s ≤ 1) (hB : 0 ≤ B) + (m : ℕ) (hc : ReconstructionCoefficientBound G U s (m + 1) B) + (f : SupportedField (F := Fin 3 → ℂ) K) : + supportedWeightedSeminorm K s m (forcedModeLM τ hG h K hKU 0 f) ≤ + initialConstant n m B * supportedWeightedSeminorm K s (m + 1) f := by + let C := supportedWeightedSeminorm K s (m + 1) f + have hC : 0 ≤ C := apply_nonneg _ _ + have hb := (weightedBound_of_supportedSeminorm s (m + 1) f).restrict_open h.isOpen + have hv := weighted_initialAmplitude hτ h hs hτs hs1 hB hC hc + f.contDiff.contDiffOn (V := fun _ => 0) contDiffOn_const hb + ((weightedBound_zero U s (m + 1)).mono_const hC) + have hg : WeightedBound Set.univ s m (initialConstant n m B * C) + (forcedModeLM τ hG h K hKU 0 f) := + hv.extend_support h.isOpen + ((forcedModeLM τ hG h K hKU 0 f).tsupport_subset.trans hKU) + (mul_nonneg (initialConstant_nonneg _ _ hB) hC) + exact supportedSeminorm_le_of_weightedBound hs + (mul_nonneg (initialConstant_nonneg _ _ hB) hC) _ hg + +/-- One geometric correction gains the factor `τ / s` with one derivative +of the forcing. This is the actual differential operator residual. -/ +lemma geometric_defect_bound (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {s : ℝ≥0} {B : ℝ} + (hτ : 0 < τ) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) (hB : 0 ≤ B) + (m : ℕ) (hc : ModeCoefficientBound G U s (m + 1) B) + (f : SupportedField (F := Fin 3 → ℂ) K) : + supportedWeightedSeminorm K s m + (conjugatedDLM τ hG K (forcedModeLM τ hG h K hKU 0 f) - f) ≤ + (τ / s) * errorConstant m B * supportedWeightedSeminorm K s (m + 1) f := by + let C := supportedWeightedSeminorm K s (m + 1) f + have hC : 0 ≤ C := apply_nonneg _ _ + have hb := (weightedBound_of_supportedSeminorm s (m + 1) f).restrict_open h.isOpen + have hv := weighted_residual_modeApprox_zero hτ hG h hs hs1 hB hC + f.contDiff.contDiffOn 0 m hc hb + have hn : 0 ≤ errorConstant m B * (τ / s) * C := + mul_nonneg (mul_nonneg (errorConstant_nonneg _ hB) (div_nonneg hτ.le hs.le)) hC + have hg : WeightedBound Set.univ s m (errorConstant m B * (τ / s) * C) + (conjugatedDLM τ hG K (forcedModeLM τ hG h K hKU 0 f) - f) := by + apply (show WeightedBound U s m (errorConstant m B * (τ / s) * C) + (conjugatedDLM τ hG K (forcedModeLM τ hG h K hKU 0 f) - f) by + change WeightedBound U s m (errorConstant m B * (τ / s) * C) + (residual τ G f (modeApprox τ G (fun _ => 0) f 0)) + simpa only [Nat.add_zero, zero_add, pow_one] using hv).extend_support h.isOpen + ((conjugatedDLM τ hG K (forcedModeLM τ hG h K hKU 0 f) - f).tsupport_subset.trans hKU) hn + have hh := supportedSeminorm_le_of_weightedBound hs hn + (conjugatedDLM τ hG K (forcedModeLM τ hG h K hKU 0 f) - f) hg + convert hh using 1 + dsimp only [C] + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeOperators.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeOperators.lean new file mode 100644 index 0000000000000000000000000000000000000000..a8dd1a9fef2a61efe17c537b026b73d696853853 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedModeOperators.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.Immersion.ClosedSurface.SupportedCancellation +import OAI.Geometry.Immersion.ClosedSurface.ModeDifferences +import OAI.Geometry.Immersion.ClosedSurface.ModeScaling + +namespace OAI + +/-! The geometric finite differential parametrix as a linear map on actual +compactly supported smooth fields. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff + +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +lemma tsupport_conjugatedD (τ : ℝ) (G Z : Field n) : + tsupport (conjugatedD τ G Z) ⊆ tsupport Z := by + apply closure_minimal _ (isClosed_tsupport Z) + intro p hp + by_contra hn + have hz : Z =ᶠ[nhds p] 0 := notMem_tsupport_iff_eventuallyEq.mp hn + exact hp (by rw [conjugatedD_congr τ G hz]; exact congrFun (conjugatedD_zero τ G) p) + +def conjugatedDLM (τ : ℝ) (hG : ContDiff ℝ ∞ G) (K : Compacts Base) : + SupportedField (F := Ambient n) K →ₗ[ℂ] SupportedField (F := Fin 3 → ℂ) K where + toFun Z := ContDiffMapSupportedIn.of_support_subset + (contDiff_iff_contDiffAt.mpr (fun _ => contDiffAt_conjugatedD τ hG.contDiffAt Z.contDiff.contDiffAt)) + (subset_closure.trans ((tsupport_conjugatedD τ G Z).trans Z.tsupport_subset)) + map_add' Z W := by + apply DFunLike.ext + intro p + change conjugatedD τ G (fun q => Z q + W q) p = + conjugatedD τ G Z p + conjugatedD τ G W p + have hh := conjugatedD_sub τ G ((Z.contDiff.add W.contDiff).differentiable (by simp) p) + (W.contDiff.differentiable (by simp) p) + have he : (fun q => (Z q + W q) - W q) = (Z : Field n) := by + funext q + exact add_sub_cancel_right _ _ + rw [he] at hh + exact sub_eq_iff_eq_add.mp hh.symm + map_smul' c Z := by + apply DFunLike.ext + intro p + exact conjugatedD_smul τ c G (Z.contDiff.differentiable (by simp) p) + +lemma conjugatedDLM_apply (τ : ℝ) (hG : ContDiff ℝ ∞ G) (K : Compacts Base) + (Z : SupportedField (F := Ambient n) K) (p : Base) : + conjugatedDLM τ hG K Z p = conjugatedD τ G Z p := rfl + +/-- All correction depths preserve the same compact support. -/ +def forcedMode (τ : ℝ) (h : ModeDomain G U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (q : ℕ) (f : SupportedField (F := Fin 3 → ℂ) K) : + SupportedField (F := Ambient n) K := + ContDiffMapSupportedIn.of_support_subset + (contDiff_of_tsupport_subset h.isOpen + ((forcedMode_tsupport τ G f q).trans (f.tsupport_subset.trans hKU)) + (contDiffOn_modeApprox τ h contDiffOn_const f.contDiff.contDiffOn q)) + (subset_closure.trans ((forcedMode_tsupport τ G f q).trans f.tsupport_subset)) + +lemma forcedMode_apply (τ : ℝ) (h : ModeDomain G U) (K : Compacts Base) + (hKU : (K : Set Base) ⊆ U) (q : ℕ) (f : SupportedField (F := Fin 3 → ℂ) K) (p : Base) : + forcedMode τ h K hKU q f p = modeApprox τ G (fun _ => 0) f q p := rfl + +lemma forcedMode_sub (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (q : ℕ) + (f g : SupportedField (F := Fin 3 → ℂ) K) : + forcedMode τ h K hKU q (f - g) = + forcedMode τ h K hKU q f - forcedMode τ h K hKU q g := by + apply DFunLike.ext + intro p + by_cases hp : p ∈ U + · have hh := modeApprox_sub τ hG h (V := fun _ => 0) (W := fun _ => 0) + contDiffOn_const contDiffOn_const f.contDiff.contDiffOn g.contDiff.contDiffOn q hp + change modeApprox τ G (fun _ => 0) (fun p => f p - g p) q p = + modeApprox τ G (fun _ => 0) f q p - modeApprox τ G (fun _ => 0) g q p + simpa only [sub_self] using hh + · have hk : p ∉ (K : Set Base) := fun hmem => hp (hKU hmem) + change forcedMode τ h K hKU q (f - g) p = + forcedMode τ h K hKU q f p - forcedMode τ h K hKU q g p + rw [(forcedMode τ h K hKU q (f - g)).zero_on_compl hk, + (forcedMode τ h K hKU q f).zero_on_compl hk, + (forcedMode τ h K hKU q g).zero_on_compl hk] + exact (sub_self _).symm + +def forcedModeLM (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (q : ℕ) : + SupportedField (F := Fin 3 → ℂ) K →ₗ[ℂ] SupportedField (F := Ambient n) K where + toFun := forcedMode τ h K hKU q + map_add' f g := by + have hh := forcedMode_sub τ hG h K hKU q (f + g) g + rw [add_sub_cancel_right] at hh + exact sub_eq_iff_eq_add.mp hh.symm + map_smul' c f := by + apply DFunLike.ext + intro p + by_cases hp : p ∈ U + · have hh := modeApprox_smul τ c hG h (V := fun _ => 0) + contDiffOn_const f.contDiff.contDiffOn q hp + change modeApprox τ G (fun _ => 0) (fun p => c • f p) q p = + c • modeApprox τ G (fun _ => 0) f q p + simpa only [smul_zero] using hh + · have hk : p ∉ (K : Set Base) := fun hmem => hp (hKU hmem) + change forcedMode τ h K hKU q (c • f) p = c • forcedMode τ h K hKU q f p + rw [(forcedMode τ h K hKU q (c • f)).zero_on_compl hk, + (forcedMode τ h K hKU q f).zero_on_compl hk] + simp only [Pi.zero_apply, smul_zero] + +lemma forcedModeLM_apply (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (q : ℕ) + (f : SupportedField (F := Fin 3 → ℂ) K) (p : Base) : + forcedModeLM τ hG h K hKU q f p = modeApprox τ G (fun _ => 0) f q p := rfl + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..aed4b23dac52ca8e111a488bae8b042f9ca0b5b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMean.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialMeanPairBounds +import OAI.Geometry.SurfaceImmersion.Geometry.ConjugatedOperatorBounds + +namespace OAI + +/-! The zero-phase Hessian estimate in the actual supported seminorms. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma quadraticMeanPair_zero_left {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ 0 K τ t p = 0 := by + have hh := quadraticMeanPair_add_left P ε G hφ + (H := 0) (K := 0) contDiff_const contDiff_const K τ t p + have he : (fun x => (0 : Base → Fin 4 → ℂ) x + (0 : Base → Fin 4 → ℂ) x) = 0 := by + funext x + exact zero_add _ + rw [he] at hh + linarith + +lemma quadraticMeanPair_zero_right {n : ℕ} (P : Fin n → Expression) (ε : ℝ) (G : Base → Space) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (H : Base → Fin 4 → ℂ) (τ t : ℝ) (p : Base) : + quadraticMeanPair P ε G φ H 0 τ t p = 0 := by + have hh := quadraticMeanPair_add_right P ε G hφ + (H := 0) (K := 0) contDiff_const contDiff_const H τ t p + have he : (fun x => (0 : Base → Fin 4 → ℂ) x + (0 : Base → Fin 4 → ℂ) x) = 0 := by + funext x + exact zero_add _ + rw [he] at hh + linarith + +theorem supported_quadraticMeanPair_bound {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (_hG : ContDiff ℝ ∞ G) (_hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) + (H J : SupportedField (F := Fin 4 → ℂ) K) (s : ℝ≥0) (τ ε : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (E * ε * supportedWeightedSeminorm K s (m + order P) H * + supportedWeightedSeminorm K s (m + order P) J / τ ^ loss P) + (quadraticMeanPair P ε G φ H J τ t) := by + obtain ⟨E, hE, he⟩ := quadraticMeanPair_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨E, hE, ?_⟩ + intro G φ hG hφ K H J s τ ε hτ hs hτs hs1 hε hε1 hGQ hGb hφb t ht + let C := supportedWeightedSeminorm K s (m + order P) H + let D := supportedWeightedSeminorm K s (m + order P) J + have hC : 0 ≤ C := apply_nonneg _ _ + have hD : 0 ≤ D := apply_nonneg _ _ + change WeightedBound U s m (E * ε * C * D / τ ^ loss P) _ + by_cases hC0 : C = 0 + · have hH0 : H = 0 := supportedField_eq_zero_of_seminorm_eq_zero s (m + order P) hC0 + have hfun : (H : Base → Fin 4 → ℂ) = 0 := congrArg + (fun Z : SupportedField (F := Fin 4 → ℂ) K => (Z : Base → Fin 4 → ℂ)) hH0 + have hz : quadraticMeanPair P ε G φ H J τ t = 0 := by + funext x + rw [hfun] + exact quadraticMeanPair_zero_left P ε G hφ J τ t x + rw [hC0, mul_zero, zero_mul, zero_div, hz] + exact weightedBound_zero U s m + by_cases hD0 : D = 0 + · have hJ0 : J = 0 := supportedField_eq_zero_of_seminorm_eq_zero s (m + order P) hD0 + have hfun : (J : Base → Fin 4 → ℂ) = 0 := congrArg + (fun Z : SupportedField (F := Fin 4 → ℂ) K => (Z : Base → Fin 4 → ℂ)) hJ0 + have hz : quadraticMeanPair P ε G φ H J τ t = 0 := by + funext x + rw [hfun] + exact quadraticMeanPair_zero_right P ε G hφ H τ t x + rw [hD0, mul_zero, zero_div, hz] + exact weightedBound_zero U s m + exact he G φ H J s τ ε C D hτ hs hτs hs1 hε hε1 + (lt_of_le_of_ne hC (Ne.symm hC0)) (lt_of_le_of_ne hD (Ne.symm hD0)) + hG hφ H.contDiff J.contDiff hGQ hGb + ((weightedBound_of_supportedSeminorm s (m + order P) H).restrict_open hU) + ((weightedBound_of_supportedSeminorm s (m + order P) J).restrict_open hU) hφb t ht + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMeanDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMeanDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..64fc089e6798f8712822deae2bdf922c488f00ca --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialMeanDifference.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Correction.SupportedPolynomialMean + +namespace OAI + +/-! The finite-loss difference estimate for the actual polynomial mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates + +lemma quadraticMeanPair_smooth {n : ℕ} {P : Fin n → Expression} + {U : Set Base} {O : Set LowJet} (hO : IsOpen O) (hP : ∀ l, (P l).SmoothCoeffs O) + {G : Base → Space} {φ : Base → ℝ} {H J : Base → Fin 4 → ℂ} + (hG : ContDiff ℝ ∞ G) (hφ : ContDiff ℝ ∞ φ) + (hH : ContDiff ℝ ∞ H) (hJ : ContDiff ℝ ∞ J) + (hQ : Set.MapsTo (lowJet G) U O) (ε τ t : ℝ) : + ContDiffOn ℝ ∞ (quadraticMeanPair P ε G φ H J τ t) U := by + have hs := fun l => conjugatedVariation_smooth (hP l) hG (pairPhases_smooth hφ hφ.neg) + (pairDirections_smooth hH (starField_smooth hJ)) hO hQ τ 1 t + have hh : ContDiffOn ℝ ∞ (fun p => + (conjugated P ε G (pairPhases φ (fun p => -φ p)) + (pairDirections H (starField J)) τ 1 (p, t)).re / 4) U := + (Complex.reCLM.contDiff.comp_contDiffOn + (ContDiffOn.sum fun l _ => (hs l).const_smul (ε ^ (l.val + 1)))).div_const 4 + have he : quadraticMeanPair P ε G φ H J τ t = + fun p => (conjugated P ε G (pairPhases φ (fun p => -φ p)) + (pairDirections H (starField J)) τ 1 (p, t)).re / 4 := by + funext p + exact quadraticMeanPair_eq P ε G hφ H hJ τ t p + rw [he] + exact hh + +theorem supported_quadraticMean_difference {n : ℕ} {U : Set Base} {O Q : Set LowJet} + (hU : IsOpen U) (hO : IsOpen O) (hQ : IsCompact Q) (hQO : Q ⊆ O) + (P : Fin n → Expression) (hP : ∀ l, (P l).SmoothCoeffs O) + (m : ℕ) (B F : ℝ) (hB : 1 ≤ B) (hF : 0 ≤ F) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ (G : Base → Space) (φ : Base → ℝ) + (_hG : ContDiff ℝ ∞ G) (_hφ : ContDiff ℝ ∞ φ) (K : Compacts Base) + (H J : SupportedField (F := Fin 4 → ℂ) K) (s : ℝ≥0) (τ ε A D : ℝ), + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → 0 ≤ A → 0 ≤ D → + Set.MapsTo (lowJet G) U Q → WeightedBound U s (m + order P) B (lowJet G) → + (∀ v, WeightedBound U s (m + order P) F (fun p => fderiv ℝ φ p (coordinateVector v))) → + supportedWeightedSeminorm K s (m + order P) H ≤ A → + supportedWeightedSeminorm K s (m + order P) J ≤ A → + supportedWeightedSeminorm K s (m + order P) (H - J) ≤ D → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (2 * E * ε * A * D / τ ^ loss P) + (fun p => quadraticMeanCoefficient P ε G φ H τ t p - + quadraticMeanCoefficient P ε G φ J τ t p) := by + obtain ⟨E, hE, he⟩ := supported_quadraticMeanPair_bound hU hO hQ hQO P hP m B F hB hF + refine ⟨E, hE, ?_⟩ + intro G φ hG hφ K H J s τ ε A D hτ hs hτs hs1 hε hε1 hA hD hGQ hGb hφb hH hJ hHJ t ht + have h1 := he G φ hG hφ K (H - J) H s τ ε hτ hs hτs hs1 hε hε1 hGQ hGb hφb t ht + have h2 := he G φ hG hφ K J (H - J) s τ ε hτ hs hτs hs1 hε hε1 hGQ hGb hφb t ht + have h1' := h1.mono_const (show E * ε * supportedWeightedSeminorm K s _ (H - J) * + supportedWeightedSeminorm K s _ H / τ ^ loss P ≤ E * ε * D * A / τ ^ loss P by gcongr) + have h2' := h2.mono_const (show E * ε * supportedWeightedSeminorm K s _ J * + supportedWeightedSeminorm K s _ (H - J) / τ ^ loss P ≤ E * ε * A * D / τ ^ loss P by gcongr) + have hHQ : Set.MapsTo (lowJet G) U O := fun _ hx => hQO (hGQ hx) + have hadd := h1'.add hU.uniqueDiffOn hs.le + (quadraticMeanPair_smooth hO hP hG hφ (H - J).contDiff H.contDiff hHQ ε τ t) + (quadraticMeanPair_smooth hO hP hG hφ J.contDiff (H - J).contDiff hHQ ε τ t) h2' + have hfinal := hadd.congr (fun x _ => + quadraticMeanCoefficient_difference P ε G hφ (H := H) (K := J) H.contDiff J.contDiff τ t x) + convert hfinal using 1 + ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialOperator.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialOperator.lean new file mode 100644 index 0000000000000000000000000000000000000000..60fe05f1015d2e9cdb7602bb0c76e734495a3fe6 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SupportedPolynomialOperator.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.SupportedWeightedSeminorm +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariationSupport +import OAI.Geometry.SurfaceImmersion.Geometry.JetVariationLinearity +import OAI.Geometry.SurfaceImmersion.Correction.WeightedPolynomialVariation +import OAI.Geometry.Immersion.ClosedSurface.MeanSupport + +namespace OAI + +/-! The actual polynomial linearization as an operator on smooth fields of +fixed compact support, with its finite derivative-loss seminorm estimate. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open WeightedEstimates + +variable {O : Set LowJet} {U : Set Base} {G : Base → Space} {e : Expression} + +def variationLM (hO : IsOpen O) (hU : IsOpen U) (he : e.SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (t : ℝ) : + SupportedField (F := Space) K →ₗ[ℝ] SupportedField (F := ℝ) K where + toFun H := ContDiffMapSupportedIn.of_support_subset + (e.variation_smooth_global hO hU K.isCompact.isClosed hKU he hG H.contDiff hQ H.tsupport_subset t) + (subset_closure.trans ((e.tsupport_variation G H t).trans H.tsupport_subset)) + map_add' H J := by + apply DFunLike.ext + intro p + exact e.variation_add G H.contDiff J.contDiff (p, t) + map_smul' c H := by + apply DFunLike.ext + intro p + exact e.variation_smul G H.contDiff c (p, t) + +lemma variationLM_apply (hO : IsOpen O) (hU : IsOpen U) (he : e.SmoothCoeffs O) + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (t : ℝ) + (H : SupportedField (F := Space) K) (p : Base) : + variationLM hO hU he hG hQ K hKU t H p = e.variation G H (p, t) := rfl + +/-- A fixed finite derivative loss suffices at every output order. The +operator acts on genuine supported smooth functions, not a Banach completion. -/ +theorem variationLM_bound {Q : Set LowJet} (hO : IsOpen O) (hU : IsOpen U) + (hQcompact : IsCompact Q) (hQO : Q ⊆ O) (he : e.SmoothCoeffs O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) (m : ℕ) (B : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (hG : ContDiff ℝ ∞ G) + (hGQ : Set.MapsTo (lowJet G) U Q) (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + WeightedBound U s (m + e.order) B (lowJet G) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, ∀ H : SupportedField (F := Space) K, + supportedWeightedSeminorm K s m + (variationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU t H) ≤ + D / (s : ℝ) ^ (e.loss + e.order) * supportedWeightedSeminorm K s (m + e.order) H := by + obtain ⟨D, hD, hd⟩ := e.compact_variation_bound hU hO hQcompact hQO he m B hB + refine ⟨D, hD, ?_⟩ + intro G hG hGQ s hs hs1 hGb t ht H + let C := supportedWeightedSeminorm K s (m + e.order) H + have hC : 0 ≤ C := apply_nonneg _ _ + have hHb := (weightedBound_of_supportedSeminorm s (m + e.order) H).restrict_open hU + have hv := hd G H s C hs hs1 hC hG H.contDiff hGQ hGb hHb t ht + have hglobal := hv.extend_support hU + ((e.tsupport_variation G H t).trans (H.tsupport_subset.trans hKU)) (by positivity) + have hresult := supportedSeminorm_le_of_weightedBound hs + (show 0 ≤ D * C / (s : ℝ) ^ (e.loss + e.order) by positivity) + (variationLM hO hU he hG (fun _ hp => hQO (hGQ hp)) K hKU t H) hglobal + convert hresult using 1 + dsimp only [C] + ring + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceCircularSmooth.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceCircularSmooth.lean new file mode 100644 index 0000000000000000000000000000000000000000..c7a067353dbcd3ebfdb340ba754913b68a43e4e3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceCircularSmooth.lean @@ -0,0 +1,47 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfaceCircularThreshold +import OAI.Geometry.SurfaceImmersion.Primitive.CircularFrozenCoefficients + +namespace OAI + +/-! Smoothness of the actual circular surface profile on the selected +jet neighborhood. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open SmallModes RealModes VelocityFrame NormalFrame GeometryPreservation + +lemma surfaceCircularProfile_smoothOn {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₂ Ω) + {α : GeometricJet × ℝ → ℝ} (hα : ContDiffOn ℝ ∞ α (Z ×ˢ univ)) : + ContDiffOn ℝ ∞ (surfaceCircularProfile F a e₁ e₂ α) + ((CollarVelocity.jetSection F ⁻¹' Z) ×ˢ univ) := 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⟩) + exact circularFamilyProfile_smoothOn hV (hx.sub hv) hx hy hc hR + (h₁.comp hσ.contDiffOn hmaps) (h₂.comp hσ.contDiffOn hmaps) hα' hD dy + +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanPolynomial.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanPolynomial.lean new file mode 100644 index 0000000000000000000000000000000000000000..9ac2594ce052f15dcc063fca060f8964ec29f548 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanPolynomial.lean @@ -0,0 +1,191 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceMetricExpansion +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialPerturbationCalculus +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCoefficientExtension + +namespace OAI + +/-! The finite mean correction is an actual higher-jet polynomial, so the +perturbed small-increment solver applies to the same metric expansion. -/ +noncomputable section +open Set +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.SurfaceVelocityFamily +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector + +namespace Loop +variable {O : TopologicalSpace.Opens LowJet} (l : Loop O) + +def meanTangentExpression (n : ℕ) (b : Bool) : ℕ → VectorExpression := + MetricPolynomial.tangentExpression (MetricPolynomial.longitudinal xData l.euclideanVelocity) + (MetricPolynomial.transverse yData) (l.coefficientExpressions n) 0 1 (n+1) b + +def meanPolynomial (n : ℕ) (b c : Bool) : Fin n → Expression := fun r => + (MetricPolynomial.finiteMetric (n+1) (r.val+1) + (l.meanTangentExpression n (b || c)) (l.meanTangentExpression n (b && c))).mean + +lemma coefficientExpressions_smooth (n i : ℕ) : + (l.coefficientExpressions n i).SmoothCoeffs O := + MetricPolynomial.coefficients_smooth O.isOpen yData_smooth cData_smooth + (xData_smooth l) l.euclideanVelocity_smooth + (fun J hJ => by rw [yData,cData,gram_toEuclidean]; exact l.gram_ne J hJ) + l.smoothQ (fun _ hJ => l.q_pos hJ) (fun _ hJ => l.euclideanVelocity_length hJ) 0 1 n i + +lemma meanPolynomial_smooth (n : ℕ) (b c : Bool) (r : Fin n) : + (l.meanPolynomial n b c r).SmoothCoeffs O := by + apply Expression.smoothCoeffs_mean O.isOpen + apply MetricPolynomial.smooth_finiteMetric + all_goals + intro i + exact MetricPolynomial.smooth_tangentExpression O.isOpen + (MetricPolynomial.smooth_longitudinal (xData_smooth l) l.euclideanVelocity_smooth) + (MetricPolynomial.smooth_transverse yData_smooth) (l.coefficientExpressions_smooth n) + 0 1 (n+1) _ i + +lemma meanPolynomial_order (n : ℕ) (b c : Bool) (r : Fin n) : + (l.meanPolynomial n b c r).order ≤ 2*(n+1)+1 := by + unfold meanPolynomial + rw [Expression.order_mean] + apply MetricPolynomial.order_finiteMetric (by omega) + all_goals + intro i hi a + exact MetricPolynomial.order_tangentExpression (by omega) + (fun _ => le_rfl) (fun _ => le_rfl) + (fun j _ a => MetricPolynomial.coefficients_order _ _ _ _ _ 0 1 n j a) + 0 1 _ hi a + +def meanCoefficientValue {S : TopologicalSpace.Opens JetPolynomial.Base} + (g : Geometry (E := Euclidean) S (coordinateVector 1)) + (U : ℕ → Family S Euclidean) (b c : Bool) (r : ℕ) (p : JetPolynomial.Base) : ℝ := + if b && c then average ((g.xxCoefficient (coordinateVector 0) U r).val p) + else if b || c then average ((g.xyCoefficient (coordinateVector 0) U r).val p) + else average ((g.yyCoefficient U r).val p) + +/-- Each coefficient used by the slow correction is the mean of the same +coefficient in the actual periodic pullback metric. -/ +lemma meanPolynomial_eval {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) (n : ℕ) (b c : Bool) (r : Fin n) + (U : ℕ → Family S Euclidean) + (hU : ∀ i, VectorExpression.Represents G (l.coefficientExpressions n i) (U i)) + {p : JetPolynomial.Base} (hp : p ∈ S) (t : ℝ) : + (l.meanPolynomial n b c r).eval G (p,t) = + meanCoefficientValue (l.geometry G hG hGO) U b c (r.val+1) p := by + let g := l.geometry G hG hGO + have hX : VectorExpression.Represents G + (MetricPolynomial.longitudinal xData l.euclideanVelocity) g.longitudinal := + MetricPolynomial.represents_longitudinal g xData l.euclideanVelocity (fun _ _ => rfl) + (fun _ hp => l.geometry_velocity hG hGO hp) + have hY : VectorExpression.Represents G (MetricPolynomial.transverse yData) g.transverse := + MetricPolynomial.represents_transverse g yData (fun _ _ => rfl) + have hT (b : Bool) (i : ℕ) := MetricPolynomial.represents_tangentExpression + O.isOpen hG hGO 0 1 g hX hY (l.coefficientExpressions_smooth n) hU (n+1) b i + have hrep := MetricPolynomial.represents_finiteMetric (hT (b || c)) (hT (b && c)) + (n+1) (r.val+1) + have hs := MetricPolynomial.smooth_finiteMetric + (fun i => MetricPolynomial.smooth_tangentExpression O.isOpen + (MetricPolynomial.smooth_longitudinal (xData_smooth l) l.euclideanVelocity_smooth) + (MetricPolynomial.smooth_transverse yData_smooth) (l.coefficientExpressions_smooth n) + 0 1 (n+1) (b || c) i) + (fun i => MetricPolynomial.smooth_tangentExpression O.isOpen + (MetricPolynomial.smooth_longitudinal (xData_smooth l) l.euclideanVelocity_smooth) + (MetricPolynomial.smooth_transverse yData_smooth) (l.coefficientExpressions_smooth n) + 0 1 (n+1) (b && c) i) (n+1) (r.val+1) + unfold meanPolynomial meanTangentExpression + rw [Expression.eval_mean O.isOpen hs G (hGO hp)] + have hr : 0 < r.val+1 := by omega + have hrn : r.val+1 < n+1 := by omega + cases b <;> cases c + all_goals + simp only [Bool.and,Bool.or,meanCoefficientValue,Bool.false_eq_true,↓reduceIte] + simp only [Bool.and,Bool.or] at hrep + simp_rw [hrep p hp,metricCoefficientFamily_apply] + · change (∫ s in (0 : ℝ)..1, (g.yyPolynomial U (n+1) p (s : Period)).coeff (r.val+1)) = + average ((g.yyCoefficient U (r.val+1)).val p) + simp_rw [g.yyPolynomial_coeff U hr hrn.le] + exact PeriodicPrimitive.integral_lift_eq_haar _ + · change (∫ s in (0 : ℝ)..1, (g.xyPolynomial (coordinateVector 0) U (n+1) p + (s : Period)).coeff (r.val+1)) = average ((g.xyCoefficient (coordinateVector 0) U + (r.val+1)).val p) + simp_rw [g.xyPolynomial_coeff (coordinateVector 0) U hr hrn] + exact PeriodicPrimitive.integral_lift_eq_haar _ + · change (∫ s in (0 : ℝ)..1, (g.xyPolynomial (coordinateVector 0) U (n+1) p + (s : Period)).coeff (r.val+1)) = average ((g.xyCoefficient (coordinateVector 0) U + (r.val+1)).val p) + simp_rw [g.xyPolynomial_coeff (coordinateVector 0) U hr hrn] + exact PeriodicPrimitive.integral_lift_eq_haar _ + · change (∫ s in (0 : ℝ)..1, (g.xxPolynomial (coordinateVector 0) U (n+1) p + (s : Period)).coeff (r.val+1)) = average ((g.xxCoefficient (coordinateVector 0) U + (r.val+1)).val p) + simp_rw [g.xxPolynomial_coeff (coordinateVector 0) U hr hrn] + exact PeriodicPrimitive.integral_lift_eq_haar _ + +/-- The full mean correction is precisely the polynomial perturbation +evaluated by the finite-parametrix machinery. -/ +lemma meanPolynomial_eval_sum {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) (t : ℝ) : + Perturbation.eval (l.meanPolynomial n b c) z G (p,t) = + meanCorrection (l.geometry G hG hGO) U n b c z p := by + unfold Perturbation.eval + simp_rw [l.meanPolynomial_eval hG hGO n b c _ U hU hp t] + change (∑ r : Fin n, (fun j : ℕ => z^(j+1)* + meanCoefficientValue (l.geometry G hG hGO) U b c (j+1) p) r.val) = _ + rw [Fin.sum_univ_eq_sum_range (fun j : ℕ => z^(j+1)* + meanCoefficientValue (l.geometry G hG hGO) U b c (j+1) p)] + have he := Finset.sum_Ico_add' + (fun r => z^r*meanCoefficientValue (l.geometry G hG hGO) U b c r p) 0 n 1 + simp only [zero_add,Nat.Ico_zero_eq_range] at he + rw [he] + cases b <;> cases c <;> + simp only [meanCoefficientValue,meanCorrection,Bool.and,Bool.or,Bool.false_eq_true,↓reduceIte] + all_goals exact Finset.sum_congr rfl (fun _ _ => mul_comm _ _) + +/-- The mean pullback metric is the original metric plus the primitive +rank-one term and this explicitly constructed polynomial operator. -/ +theorem meanMetric_eq_polynomial {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 l.amplitude (lowJet G p)^2 else 0) + + Perturbation.eval (l.meanPolynomial n b c) z G (p,0) := by + rw [l.meanPolynomial_eval_sum hG hGO n b c U hU z hp 0] + exact l.meanMetric_eq hG hGO U n b c z hp + +/-- Global smooth coefficients for Taylor estimates, retaining exactly the +same operator and loss on the compact set of low jets used by the primitive. -/ +theorem meanPolynomial_global_extension {Q : Set LowJet} (hQ : IsCompact Q) + (hQO : Q ⊆ O) (n : ℕ) (b c : Bool) : + ∃ P : Fin n → Expression, + (∀ r, (P r).SmoothCoeffs univ) ∧ + (∀ r, (P r).order = (l.meanPolynomial n b c r).order) ∧ + (∀ r, (P r).loss = (l.meanPolynomial n b c r).loss) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (z : ℝ) + (p : JetPolynomial.Base) (t : ℝ), lowJet G p ∈ Q → + Perturbation.eval P z G (p,t) = + Perturbation.eval (l.meanPolynomial n b c) z G (p,t) := by + choose P hs ho hl he using fun r : Fin n => + Expression.exists_global_extension O.isOpen (l.meanPolynomial_smooth n b c r) hQ hQO + refine ⟨P,hs,ho,hl,?_⟩ + intro G z p t hp + unfold Perturbation.eval + apply Finset.sum_congr rfl + intro r _ + rw [he r G (p,t) hp] + +end Loop +end ClosedSurfaceR4.SurfaceVelocityFamily + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanTensor.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanTensor.lean new file mode 100644 index 0000000000000000000000000000000000000000..2987c7577db87707cf057ae55bde4b717bf450fd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/SurfaceMeanTensor.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.SurfacePrimitiveError +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateTaylorIdentity + +namespace OAI + +/-! The primitive's three mean metric coefficients are exactly the tensor +operator used by the finite parametrix, in its product coordinates. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion +open CovarianceCorrector + +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +def meanTensorPolynomial (n : ℕ) : Fin 3 → Fin n → Expression := + ![l.meanPolynomial n true true,l.meanPolynomial n true false,l.meanPolynomial n false false] + +def meanTensorOperator (n : ℕ) (z : ℝ) (G : JetPolynomial.Base → JetPolynomial.Space) : + SmallModes.Base → PhaseMean.Tensor := fun p => + ![l.meanOperator n true true z G (planeCoordinateIsometry.symm p), + l.meanOperator n true false z G (planeCoordinateIsometry.symm p), + l.meanOperator n false false z G (planeCoordinateIsometry.symm p)] + +lemma meanTensorPolynomial_smooth (n : ℕ) (k : Fin 3) (r : Fin n) : + (l.meanTensorPolynomial n k r).SmoothCoeffs O := by + fin_cases k <;> exact l.meanPolynomial_smooth n _ _ r + +lemma meanTensorPolynomial_order (n : ℕ) (k : Fin 3) (r : Fin n) : + (l.meanTensorPolynomial n k r).order ≤ 2*(n+1)+1 := by + fin_cases k <;> exact l.meanPolynomial_order n _ _ r + +private lemma realMetric_coordinate {G : JetPolynomial.Base → JetPolynomial.Space} + (hG : ContDiff ℝ ∞ G) (p : SmallModes.Base) (b c : Bool) : + RealModes.realMetric (G ∘ planeCoordinateIsometry.symm) + (if b then SmallModes.dx else SmallModes.dy) + (if c then SmallModes.dx else SmallModes.dy) p = + inner ℝ + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) + (planeCoordinateIsometry.symm p) + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) b)) + (fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) + (planeCoordinateIsometry.symm p) + (MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) c)) := by + have hcomp (v : SmallModes.Base) : + fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p v = + fderiv ℝ G (planeCoordinateIsometry.symm p) (planeCoordinateIsometry.symm v) := by + rw [fderiv_comp p (hG.differentiable (by simp) _) planeCoordinateIsometry.symm.differentiableAt] + change (fderiv ℝ G (planeCoordinateIsometry.symm p)) + ((fderiv ℝ planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap p) v) = _ + rw [planeCoordinateIsometry.symm.toContinuousLinearEquiv.toContinuousLinearMap.fderiv] + rfl + have heuc (v : JetPolynomial.Base) : + fderiv ℝ (fun q => JetVelocityCoordinates.toEuclidean (G q)) + (planeCoordinateIsometry.symm p) v = + JetVelocityCoordinates.toEuclidean (fderiv ℝ G (planeCoordinateIsometry.symm p) v) := by + change (fderiv ℝ ((JetVelocityCoordinates.toEuclidean : JetPolynomial.Space → Euclidean) ∘ G) + (planeCoordinateIsometry.symm p)) v = _ + rw [fderiv_comp (planeCoordinateIsometry.symm p) + JetVelocityCoordinates.toEuclidean.differentiableAt (hG.differentiable (by simp) _)] + change (fderiv ℝ JetVelocityCoordinates.toEuclidean.toContinuousLinearMap + (G (planeCoordinateIsometry.symm p))) ((fderiv ℝ G (planeCoordinateIsometry.symm p)) v) = _ + rw [JetVelocityCoordinates.toEuclidean.toContinuousLinearMap.fderiv] + rfl + have hdir (d : Bool) : + planeCoordinateIsometry.symm (if d then SmallModes.dx else SmallModes.dy) = + MetricPolynomial.metricDirection (coordinateVector 0) (coordinateVector 1) d := by + cases d <;> ext i <;> fin_cases i <;> rfl + change (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p + (if b then SmallModes.dx else SmallModes.dy)) ⬝ᵥ + (fderiv ℝ (G ∘ planeCoordinateIsometry.symm) p + (if c then SmallModes.dx else SmallModes.dy)) = _ + rw [hcomp,hcomp,heuc,heuc,inner_toEuclidean,hdir,hdir] + +/-- No identification of metric operators is assumed: the coordinate +conversion and all three polynomial coefficients are proved equal. -/ +theorem coordinateMetricMap_eq_meanTensorOperator + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (n : ℕ) (z : ℝ) : + Perturbation.coordinateMetricMap (l.meanTensorPolynomial n) z G = + l.meanTensorOperator n z G := by + funext p k + fin_cases k + all_goals + dsimp only [Perturbation.coordinateMetricMap,RealModes.realMetricTensor, + Perturbation.coordinatePolynomialValue,meanTensorOperator,meanTensorPolynomial, + meanOperator,Perturbation.eval,Pi.add_apply,Matrix.cons_val_zero,Matrix.cons_val_one, + Matrix.cons_val_two] + · change RealModes.realMetric (G ∘ planeCoordinateIsometry.symm) + SmallModes.dx SmallModes.dx p + _ = _ + have hh := realMetric_coordinate hG p true true + simp only [↓reduceIte] at hh + rw [hh] + rfl + · change RealModes.realMetric (G ∘ planeCoordinateIsometry.symm) + SmallModes.dx SmallModes.dy p + _ = _ + have hh := realMetric_coordinate hG p true false + simp only [Bool.false_eq_true, ↓reduceIte] at hh + rw [hh] + rfl + · change RealModes.realMetric (G ∘ planeCoordinateIsometry.symm) + SmallModes.dy SmallModes.dy p + _ = _ + have hh := realMetric_coordinate hG p false false + simp only [Bool.false_eq_true, ↓reduceIte] at hh + rw [hh] + rfl + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3aa1095f796f5189cbd7256783f45d1b059881b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasFiniteMean.lean @@ -0,0 +1,89 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean + +namespace OAI + +/-! Finite nonlinear mean adjustment for the actual global atlas operator. +All local trial radii and the smallness threshold precede the local maps. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance atlasFiniteFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasFiniteFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasFiniteDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasFiniteDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasFiniteSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasFiniteSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem tensor_atlas_finite_mean {s r r₀ : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) + (hr : 0 ≤ r) (hgap : r₀ < r) (reference H : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x))) + (hsym : ∀ p v w, H p v w = H p w v) + (hH0 : ∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r₀) + (L : ℕ) (B K : ℕ → ℝ → ℝ) (C : ℕ → ℝ) + (hB : ∀ m c, 1 ≤ c → 1 ≤ B m c) (hK : ∀ m c, 1 ≤ c → 1 ≤ K m c) + (hC : ∀ m, 1 ≤ C m) (hHC : ∀ m, A.TensorWeightedBound s m (C m) H) (steps : ℕ) : + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ η : ℝ, 0 < η → η ≤ η₀ → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m c f, 1 ≤ c → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + WeightedBound univ s (m+L) c f → WeightedBound univ s m (η * B m c) (μ i f)) → + (∀ i m c d f g, 1 ≤ c → 0 ≤ d → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) g → + WeightedBound univ s (m+L) c f → WeightedBound univ s (m+L) c g → + WeightedBound univ s (m+L) d (f-g) → + WeightedBound univ s m (K m c * η * d) (μ i f - μ i g)) → + ∀ j ≤ steps, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (A.tensorMeanTrial H (A.atlasMean μ) j p)) ∧ + (∀ p v w, A.tensorMeanTrial H (A.atlasMean μ) j p v w = + A.tensorMeanTrial H (A.atlasMean μ) j p w v) ∧ + InTrialBall univ (A.tensorEncode reference) r + (A.tensorEncode (A.tensorMeanTrial H (A.atlasMean μ) j)) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) + (A.tensorPlaneRead i (A.tensorMeanTrial H (A.atlasMean μ) j))) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) + (A.tensorMeanTrial H (A.atlasMean μ) j)) ∧ + (∀ m, A.TensorWeightedBound s m (differenceBound L C β κ j m * η^(j+1)) + (A.tensorMeanTrial H (A.atlasMean μ) j + + A.atlasMean μ (A.tensorMeanTrial H (A.atlasMean μ) j) - H)) := by + obtain ⟨D₀,hD₀,hlocal,β,κ,hm⟩ := A.atlasMean_majorants hr reference href L B K hB hK + obtain ⟨η₀,hη₀,hη₁,ht⟩ := A.tensor_finite_mean_substitution hs hgap hC hH hH0 hHC steps + (B := β) (K := κ) (L := L) + refine ⟨D₀,hD₀,β,κ,η₀,hη₀,hη₁,?_⟩ + intro η hη hsmall μ hsm hv hd j hj + obtain ⟨htr,hball,hsize,herror⟩ := ht η hη hsmall (A.atlasMean μ) + (hm hs hs1 η hη μ hsm hv hd) j hj + refine ⟨htr,A.tensorMeanTrial_symmetric H (A.atlasMean μ) hsym + (fun u _ => A.atlasMean_symmetric μ u) j,hball,?_,hsize,herror⟩ + intro i + have hb := hlocal (A.tensorEncode (A.tensorMeanTrial H (A.atlasMean μ) j)) + (A.tensorEncode_smooth htr) hball i + rwa [A.tensorDecode_encode] at hb + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..4559caf418b6493895ff5d1caf53e433fd1f068b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMean.lean @@ -0,0 +1,244 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.TensorDecodedBounds + +namespace OAI + +/-! The global nonlinear mean is the finite restoration of the actual +local means evaluated on unweighted chart readings. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance atlasMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance atlasMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance atlasMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance atlasMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance atlasMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance atlasMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def atlasMean (μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor) + (u : ∀ x : M, CovariantTwoTensor x) : ∀ x : M, CovariantTwoTensor x := + A.tensorPlaneRestore (fun i => μ i (A.tensorPlaneRead i u)) + +omit [CompactSpace M] in +lemma atlasMean_symmetric + (μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor) + (u : ∀ x : M, CovariantTwoTensor x) : ∀ p v w, A.atlasMean μ u p v w = A.atlasMean μ u p w v := + A.tensorPlaneRestore_symmetric _ + +omit [CompactSpace M] in +lemma atlasMean_sub + (μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor) + (u v : ∀ x : M, CovariantTwoTensor x) : + A.atlasMean μ u - A.atlasMean μ v = A.tensorPlaneRestore + (fun i => μ i (A.tensorPlaneRead i u) - μ i (A.tensorPlaneRead i v)) := + (A.tensorPlaneRestore_sub _ _).symm + +/-- The atlas-only enlargement needed when a global encoded tensor ball is +read in any one chart. It is independent of reference tensors and all orders. -/ +def tensorReadBallConstant : ℝ := Classical.choose A.tensorPlaneRead_decode_ball + +lemma one_le_tensorReadBallConstant : 1 ≤ A.tensorReadBallConstant := + (Classical.choose_spec A.tensorPlaneRead_decode_ball).1 + +lemma tensorReadBallConstant_ball + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (f : Base → A.centers → TensorFiber) (r : ℝ) (hr : 0 ≤ r) + (hf : ContDiff ℝ ∞ f) (hb : InTrialBall univ (A.tensorEncode reference) r f) + (i : A.centers) : + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) + (A.tensorPlaneRead i (A.tensorDecode f)) := + (Classical.choose_spec A.tensorPlaneRead_decode_ball).2 reference href f r hr hf hb i + +/-- A fixed global trial radius for a prescribed local geometric margin. -/ +def tensorTrialRadius (r₁ : ℝ) : ℝ := r₁/(2*A.tensorReadBallConstant) + +lemma tensorTrialRadius_pos {r₁ : ℝ} (hr₁ : 0 < r₁) : 0 < A.tensorTrialRadius r₁ := + div_pos hr₁ (mul_pos (by norm_num) + (zero_lt_one.trans_le A.one_le_tensorReadBallConstant)) + +lemma tensorReadBallConstant_mul_trialRadius (r₁ : ℝ) : + A.tensorReadBallConstant*A.tensorTrialRadius r₁ = r₁/2 := by + have hD : A.tensorReadBallConstant ≠ 0 := + (zero_lt_one.trans_le A.one_le_tensorReadBallConstant).ne' + unfold tensorTrialRadius + field_simp [hD] + +lemma tensorTrialRadius_margin {r₁ : ℝ} (hr₁ : 0 ≤ r₁) : + A.tensorReadBallConstant*A.tensorTrialRadius r₁ ≤ r₁ := by + rw [A.tensorReadBallConstant_mul_trialRadius] + linarith + +/-- Fixed atlas constants turn local value and difference estimates into +exactly the hypotheses used by finite global mean substitution. -/ +theorem atlasMean_majorants_fixed_ball + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (L : ℕ) (B K : ℕ → ℝ → ℝ) + (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) : + ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorEncode reference) r f → ∀ i : A.centers, + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) + (A.tensorPlaneRead i (A.tensorDecode f))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {s : ℝ}, 0 < s → s ≤ 1 → ∀ η : ℝ, 0 < η → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m C f, 1 ≤ C → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + WeightedBound univ s (m+L) C f → WeightedBound univ s m (η * B m C) (μ i f)) → + (∀ i m C D f g, 1 ≤ C → 0 ≤ D → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) g → + WeightedBound univ s (m+L) C f → WeightedBound univ s (m+L) C g → + WeightedBound univ s (m+L) D (f-g) → + WeightedBound univ s m (K m C * η * D) (μ i f - μ i g)) → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator (A.atlasMean μ))) β κ := by + classical + have hball := A.tensorReadBallConstant_ball + intro r hr + choose D hD hd using A.tensorPlaneRead_decode_bound + choose E hE he using A.tensorPlaneRestore_bound + let β : ℕ → ℝ → ℝ := fun m C => max 1 (E m * B m (D (m+L)*C)) + let κ : ℕ → ℝ → ℝ := fun m C => max 1 (E m * K m (D (m+L)*C) * D (m+L)) + refine ⟨(fun f hf hb i => hball reference href f r hr hf hb i),β,κ,?_⟩ + intro s hs hs1 η hη μ hsm hv hdiff + have hb0 (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) + (hb : InTrialBall univ (A.tensorEncode reference) r f) (i : A.centers) := + hball reference href f r hr hf hb i + have hf0 (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) (i : A.centers) := + A.tensorPlaneRead_smooth i (A.tensorDecode_smooth hf) + have hms (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) + (hb : InTrialBall univ (A.tensorEncode reference) r f) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.atlasMean μ (A.tensorDecode f) x)) := + A.tensorPlaneRestore_smooth (fun i => hsm i _ (hf0 f hf i) (hb0 f hf hb i)) + apply rescaledMean_bounds uniqueDiffOn_univ hη + · exact fun m C _ => le_max_left _ _ + · exact fun m C _ => le_max_left _ _ + · intro f hf hb + exact (A.tensorEncode_smooth (hms f (contDiffOn_univ.mp hf) hb)).contDiffOn + · intro m C f hC hf hb hbf + have hfs := contDiffOn_univ.mp hf + have hDC : 1 ≤ D (m+L)*C := one_le_mul_of_one_le_of_one_le (hD _) hC + have hl (i : A.centers) := hv i m (D (m+L)*C) _ hDC (hf0 f hfs i) (hb0 f hfs hb i) + (hd (m+L) i f s C hs hs1 (zero_le_one.trans hC) hfs hbf) + have hg := he m (fun i => μ i (A.tensorPlaneRead i (A.tensorDecode f))) s + (η * B m (D (m+L)*C)) hs hs1 (mul_nonneg hη.le (zero_le_one.trans (hB _ _ hDC))) + (fun i => hsm i _ (hf0 f hfs i) (hb0 f hfs hb i)) hl + have henc := A.tensorEncode_bound (hms f hfs hb) hs + (mul_nonneg (hE m) (mul_nonneg hη.le (zero_le_one.trans (hB _ _ hDC)))) hg + apply henc.mono_const + calc + _ = η * (E m * B m (D (m+L)*C)) := by ring + _ ≤ η * β m C := mul_le_mul_of_nonneg_left (le_max_right _ _) hη.le + · intro m C D' f g hC hD' hf hg hbf hbg hbf' hbg' hfg + have hfs := contDiffOn_univ.mp hf + have hgs := contDiffOn_univ.mp hg + have hDC : 1 ≤ D (m+L)*C := one_le_mul_of_one_le_of_one_le (hD _) hC + have hl (i : A.centers) := hdiff i m (D (m+L)*C) (D (m+L)*D') _ _ hDC + (mul_nonneg (zero_le_one.trans (hD _)) hD') (hf0 f hfs i) (hf0 g hgs i) + (hb0 f hfs hbf i) (hb0 g hgs hbg i) + (hd (m+L) i f s C hs hs1 (zero_le_one.trans hC) hfs hbf') + (hd (m+L) i g s C hs hs1 (zero_le_one.trans hC) hgs hbg') + (by rw [← A.tensorPlaneRead_decode_sub]; exact + hd (m+L) i (f-g) s D' hs hs1 hD' (hfs.sub hgs) hfg) + have hnon : 0 ≤ K m (D (m+L)*C) * η * (D (m+L)*D') := + mul_nonneg (mul_nonneg (zero_le_one.trans (hK _ _ hDC)) hη.le) + (mul_nonneg (zero_le_one.trans (hD _)) hD') + have hb := he m (fun i => μ i (A.tensorPlaneRead i (A.tensorDecode f)) - + μ i (A.tensorPlaneRead i (A.tensorDecode g))) s _ hs hs1 hnon + (fun i => (hsm i _ (hf0 f hfs i) (hb0 f hfs hbf i)).sub + (hsm i _ (hf0 g hgs i) (hb0 g hgs hbg i))) hl + rw [← A.atlasMean_sub μ] at hb + have hsec := (hms f hfs hbf).sub_section (hms g hgs hbg) + have henc := A.tensorEncode_bound hsec hs (mul_nonneg (hE m) hnon) hb + rw [A.tensorEncode_sub] at henc + apply henc.mono_const + calc + _ = (E m * K m (D (m+L)*C) * D (m+L)) * η * D' := by ring + _ ≤ κ m C * η * D' := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) hη.le) hD' + +/-- Fixed atlas constants turn local value and difference estimates into +exactly the hypotheses used by finite global mean substitution. -/ +theorem atlasMean_majorants_all_radii + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (L : ℕ) (B K : ℕ → ℝ → ℝ) + (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) : + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, 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))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {s : ℝ}, 0 < s → s ≤ 1 → ∀ η : ℝ, 0 < η → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m C f, 1 ≤ C → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + WeightedBound univ s (m+L) C f → WeightedBound univ s m (η * B m C) (μ i f)) → + (∀ i m C D f g, 1 ≤ C → 0 ≤ D → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) g → + WeightedBound univ s (m+L) C f → WeightedBound univ s (m+L) C g → + WeightedBound univ s (m+L) D (f-g) → + WeightedBound univ s m (K m C * η * D) (μ i f - μ i g)) → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator (A.atlasMean μ))) β κ := by + exact ⟨A.tensorReadBallConstant,A.one_le_tensorReadBallConstant, + A.atlasMean_majorants_fixed_ball reference href L B K hB hK⟩ + +theorem atlasMean_majorants {r : ℝ} (hr : 0 ≤ r) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (L : ℕ) (B K : ℕ → ℝ → ℝ) + (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) : + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ + (∀ f : Base → A.centers → TensorFiber, 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))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {s : ℝ}, 0 < s → s ≤ 1 → ∀ η : ℝ, 0 < η → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m C f, 1 ≤ C → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + WeightedBound univ s (m+L) C f → WeightedBound univ s m (η * B m C) (μ i f)) → + (∀ i m C D f g, 1 ≤ C → 0 ≤ D → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) g → + WeightedBound univ s (m+L) C f → WeightedBound univ s (m+L) C g → + WeightedBound univ s (m+L) D (f-g) → + WeightedBound univ s m (K m C * η * D) (μ i f - μ i g)) → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator (A.atlasMean μ))) β κ := by + obtain ⟨D₀,hD₀,h⟩ := A.atlasMean_majorants_all_radii reference href L B K hB hK + obtain ⟨hball,β,κ,hm⟩ := h r hr + exact ⟨D₀,hD₀,hball,β,κ,hm⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMeanExplicit.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMeanExplicit.lean new file mode 100644 index 0000000000000000000000000000000000000000..4cf66cfcf02229067767b2904fa4a03191eb9431 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorAtlasMeanExplicit.lean @@ -0,0 +1,133 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean + +namespace OAI + +/-! The atlas mean estimate with its read and restore constants exposed. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance explicitAtlasMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance explicitAtlasMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance explicitAtlasMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance explicitAtlasMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance explicitAtlasMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance explicitAtlasMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem atlasMean_majorants_explicit + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (L : ℕ) (B K : ℕ → ℝ → ℝ) + (hB : ∀ m C, 1 ≤ C → 1 ≤ B m C) (hK : ∀ m C, 1 ≤ C → 1 ≤ K m C) + (D E : ℕ → ℝ) (hD : ∀ m, 1 ≤ D m) (hE : ∀ m, 0 ≤ E m) + (hd : ∀ m (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 m*C) (A.tensorPlaneRead i (A.tensorDecode f))) + (he : ∀ m (f : A.centers → SmallModes.Base → Tensor) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → (∀ i, ContDiff ℝ ∞ (f i)) → + (∀ i, WeightedBound univ s m C (f i)) → + A.TensorWeightedBound s m (E m*C) (A.tensorPlaneRestore f)) : + ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorEncode reference) r f → ∀ i : A.centers, + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) + (A.tensorPlaneRead i (A.tensorDecode f))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + β = (fun m C => max 1 (E m * B m (D (m+L)*C))) ∧ + κ = (fun m C => max 1 (E m * K m (D (m+L)*C) * D (m+L))) ∧ + ∀ {s : ℝ}, 0 < s → s ≤ 1 → ∀ η : ℝ, 0 < η → + ∀ μ : A.centers → (SmallModes.Base → Tensor) → SmallModes.Base → Tensor, + (∀ i f, ContDiff ℝ ∞ f → InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + ContDiff ℝ ∞ (μ i f)) → + (∀ i m C f, 1 ≤ C → ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + WeightedBound univ s (m+L) C f → WeightedBound univ s m (η * B m C) (μ i f)) → + (∀ i m C D f g, 1 ≤ C → 0 ≤ D → ContDiff ℝ ∞ f → ContDiff ℝ ∞ g → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) f → + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) g → + WeightedBound univ s (m+L) C f → WeightedBound univ s (m+L) C g → + WeightedBound univ s (m+L) D (f-g) → + WeightedBound univ s m (K m C * η * D) (μ i f - μ i g)) → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator (A.atlasMean μ))) β κ := by + classical + have hball := A.tensorReadBallConstant_ball + intro r hr + let β : ℕ → ℝ → ℝ := fun m C => max 1 (E m * B m (D (m+L)*C)) + let κ : ℕ → ℝ → ℝ := fun m C => max 1 (E m * K m (D (m+L)*C) * D (m+L)) + refine ⟨(fun f hf hb i => hball reference href f r hr hf hb i),β,κ,rfl,rfl,?_⟩ + intro s hs hs1 η hη μ hsm hv hdiff + have hb0 (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) + (hb : InTrialBall univ (A.tensorEncode reference) r f) (i : A.centers) := + hball reference href f r hr hf hb i + have hf0 (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) (i : A.centers) := + A.tensorPlaneRead_smooth i (A.tensorDecode_smooth hf) + have hms (f : Base → A.centers → TensorFiber) (hf : ContDiff ℝ ∞ f) + (hb : InTrialBall univ (A.tensorEncode reference) r f) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.atlasMean μ (A.tensorDecode f) x)) := + A.tensorPlaneRestore_smooth (fun i => hsm i _ (hf0 f hf i) (hb0 f hf hb i)) + apply rescaledMean_bounds uniqueDiffOn_univ hη + · exact fun m C _ => le_max_left _ _ + · exact fun m C _ => le_max_left _ _ + · intro f hf hb + exact (A.tensorEncode_smooth (hms f (contDiffOn_univ.mp hf) hb)).contDiffOn + · intro m C f hC hf hb hbf + have hfs := contDiffOn_univ.mp hf + have hDC : 1 ≤ D (m+L)*C := one_le_mul_of_one_le_of_one_le (hD _) hC + have hl (i : A.centers) := hv i m (D (m+L)*C) _ hDC (hf0 f hfs i) (hb0 f hfs hb i) + (hd (m+L) i f s C hs hs1 (zero_le_one.trans hC) hfs hbf) + have hg := he m (fun i => μ i (A.tensorPlaneRead i (A.tensorDecode f))) s + (η * B m (D (m+L)*C)) hs hs1 (mul_nonneg hη.le (zero_le_one.trans (hB _ _ hDC))) + (fun i => hsm i _ (hf0 f hfs i) (hb0 f hfs hb i)) hl + have henc := A.tensorEncode_bound (hms f hfs hb) hs + (mul_nonneg (hE m) (mul_nonneg hη.le (zero_le_one.trans (hB _ _ hDC)))) hg + apply henc.mono_const + calc + _ = η * (E m * B m (D (m+L)*C)) := by ring + _ ≤ η * β m C := mul_le_mul_of_nonneg_left (le_max_right _ _) hη.le + · intro m C D' f g hC hD' hf hg hbf hbg hbf' hbg' hfg + have hfs := contDiffOn_univ.mp hf + have hgs := contDiffOn_univ.mp hg + have hDC : 1 ≤ D (m+L)*C := one_le_mul_of_one_le_of_one_le (hD _) hC + have hl (i : A.centers) := hdiff i m (D (m+L)*C) (D (m+L)*D') _ _ hDC + (mul_nonneg (zero_le_one.trans (hD _)) hD') (hf0 f hfs i) (hf0 g hgs i) + (hb0 f hfs hbf i) (hb0 g hgs hbg i) + (hd (m+L) i f s C hs hs1 (zero_le_one.trans hC) hfs hbf') + (hd (m+L) i g s C hs hs1 (zero_le_one.trans hC) hgs hbg') + (by rw [← A.tensorPlaneRead_decode_sub]; exact + hd (m+L) i (f-g) s D' hs hs1 hD' (hfs.sub hgs) hfg) + have hnon : 0 ≤ K m (D (m+L)*C) * η * (D (m+L)*D') := + mul_nonneg (mul_nonneg (zero_le_one.trans (hK _ _ hDC)) hη.le) + (mul_nonneg (zero_le_one.trans (hD _)) hD') + have hb := he m (fun i => μ i (A.tensorPlaneRead i (A.tensorDecode f)) - + μ i (A.tensorPlaneRead i (A.tensorDecode g))) s _ hs hs1 hnon + (fun i => (hsm i _ (hf0 f hfs i) (hb0 f hfs hbf i)).sub + (hsm i _ (hf0 g hgs i) (hb0 g hgs hbg i))) hl + rw [← A.atlasMean_sub μ] at hb + have hsec := (hms f hfs hbf).sub_section (hms g hgs hbg) + have henc := A.tensorEncode_bound hsec hs (mul_nonneg (hE m) hnon) hb + rw [A.tensorEncode_sub] at henc + apply henc.mono_const + calc + _ = (E m * K m (D (m+L)*C) * D (m+L)) * η * D' := by ring + _ ≤ κ m C * η * D' := mul_le_mul_of_nonneg_right + (mul_le_mul_of_nonneg_right (le_max_right _ _) hη.le) hD' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..380116443be4b4f5c1f5d8215071b515b405e66f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorFiniteMean.lean @@ -0,0 +1,115 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanIteration + +namespace OAI + +/-! Finite derivative-losing mean substitution on global surface tensors. +The actual section iterates are recovered exactly from their atlas encoding. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance finiteMeanModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance finiteMeanModelSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance finiteMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance finiteMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) + +local instance finiteMeanSectionTensorNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance finiteMeanSectionTensorSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem tensor_finite_mean_substitution_uniform {r₀ r : ℝ} (hgap : r₀ < r) + {L : ℕ} {B K : ℕ → ℝ → ℝ} {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) + (steps : ℕ) : + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ ∀ s : ℝ, 0 < s → + ∀ reference H : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + (∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r₀) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ η : ℝ, 0 < η → η ≤ η₀ → + ∀ T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x, + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator T)) B K → + ∀ j ≤ steps, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.tensorMeanTrial H T j x)) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode (A.tensorMeanTrial H T j)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C B j m) (A.tensorMeanTrial H T j)) ∧ + (∀ m, A.TensorWeightedBound s m (differenceBound L C B K j m * η ^ (j + 1)) + (A.tensorMeanTrial H T j + T (A.tensorMeanTrial H T j) - H)) := by + obtain ⟨η₀,hη₀,hη₁,ht⟩ := finite_substitution_uniform_inputs + (E := Base) (F := A.centers → TensorFiber) (B := B) (K := K) hgap hC steps + refine ⟨η₀,hη₀,hη₁,?_⟩ + intro s hs reference H hH hH0 hbH η hη hsmall T hm j hj + have henc := A.tensorEncode_smooth hH + obtain ⟨ha,hb,hc,hd⟩ := ht univ uniqueDiffOn_univ s hs.le + (A.tensorEncode reference) (A.tensorEncode H) henc.contDiffOn (fun x _ => hH0 x) + (fun m => A.tensorEncode_bound hH hs (zero_le_one.trans (hC m)) (hbH m)) + _ hm η hη hsmall j hj + rw [trial_rescaledMean hη.ne'] at ha hb hc hd + rw [rescaledMean_self hη.ne'] at hd + have htrial : ContDiff ℝ ∞ (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j) := + contDiffOn_univ.mp ha + have hmean : ContDiff ℝ ∞ (A.tensorMeanOperator T + (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j)) := by + have hh := hm.smooth η hη (hsmall.trans hη₁) _ ha hb + rw [rescaledMean_self hη.ne'] at hh + exact contDiffOn_univ.mp hh + have hres : ContDiff ℝ ∞ (A.tensorEncode + (A.tensorMeanTrial H T j + T (A.tensorMeanTrial H T j) - H)) := by + rw [A.tensorEncode_meanResidual] + exact (htrial.add hmean).sub henc + refine ⟨A.tensorDecode_smooth htrial,?_,?_,?_⟩ + · rw [A.tensorEncode_meanTrial] + exact hb + · intro m + apply A.tensorBound_of_encode (by rw [A.tensorEncode_meanTrial]; exact htrial) hs.le + (zero_le_one.trans (sizeBound_ge_one hC hm.B_pos j m)) + rw [A.tensorEncode_meanTrial] + exact hc m + · intro m + apply A.tensorBound_of_encode hres hs.le + (mul_nonneg (differenceBound_nonneg hC hm.B_pos hm.K_pos j m) (pow_nonneg hη.le _)) + rw [A.tensorEncode_meanResidual] + exact hd m + +theorem tensor_finite_mean_substitution {s : ℝ} (hs : 0 < s) + {reference H : ∀ x : M, CovariantTwoTensor x} {r₀ r : ℝ} (hgap : r₀ < r) + {L : ℕ} {B K : ℕ → ℝ → ℝ} {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x))) + (hH0 : ∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r₀) + (hbH : ∀ m, A.TensorWeightedBound s m (C m) H) (steps : ℕ) : + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ ∀ η : ℝ, 0 < η → η ≤ η₀ → + ∀ T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x, + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean η (A.tensorMeanOperator T)) B K → + ∀ j ≤ steps, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.tensorMeanTrial H T j x)) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode (A.tensorMeanTrial H T j)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C B j m) (A.tensorMeanTrial H T j)) ∧ + (∀ m, A.TensorWeightedBound s m (differenceBound L C B K j m * η ^ (j + 1)) + (A.tensorMeanTrial H T j + T (A.tensorMeanTrial H T j) - H)) := by + obtain ⟨η₀,hη₀,hη₁,ht⟩ := A.tensor_finite_mean_substitution_uniform + (B := B) (K := K) hgap hC steps + exact ⟨η₀,hη₀,hη₁,ht s hs reference H hH hH0 hbH⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanCoordinates.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanCoordinates.lean new file mode 100644 index 0000000000000000000000000000000000000000..0efb02d393257a1d69b472b2c1ecc742f1519f3f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanCoordinates.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothing +import OAI.Geometry.SurfaceImmersion.Correction.BundleSmoothingLinearity + +namespace OAI + +/-! Encode global tensor sections by their finite atlas coordinates. This +retains the compact-surface partition identity while permitting the finite +mean iteration to run on a normed vector-valued function space. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates +open JetPolynomial (Base) + +local instance meanModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance meanModelSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance meanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance meanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) + +local instance sectionTensorNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance sectionTensorSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorEncode (u : ∀ x : M, CovariantTwoTensor x) : Base → A.centers → TensorFiber := + fun x i => A.bundleLocalize A.tensorTriv i u x + +def tensorDecode (f : Base → A.centers → TensorFiber) : ∀ x : M, CovariantTwoTensor x := + fun x => ∑ i : A.centers, A.bundleRestore A.tensorTriv i (fun y => f y i) x + +lemma tensorDecode_encode (u : ∀ x : M, CovariantTwoTensor x) : + A.tensorDecode (A.tensorEncode u) = u := by + funext x + exact A.bundle_sum_restore_localize A.tensorTriv A.tensorTriv_domain u x + +lemma tensorEncode_add (u v : ∀ x : M, CovariantTwoTensor x) : + A.tensorEncode (u + v) = A.tensorEncode u + A.tensorEncode v := by + funext x i + exact congrFun (A.bundleLocalize_add A.tensorTriv i u v) x + +lemma tensorEncode_smul (a : ℝ) (u : ∀ x : M, CovariantTwoTensor x) : + A.tensorEncode (a • u) = a • A.tensorEncode u := by + funext x i + exact congrFun (A.bundleLocalize_smul A.tensorTriv i a u) x + +lemma tensorDecode_add (f g : Base → A.centers → TensorFiber) : + A.tensorDecode (f + g) = A.tensorDecode f + A.tensorDecode g := by + funext x + simp only [tensorDecode, Pi.add_apply, ← Finset.sum_add_distrib] + apply Finset.sum_congr rfl + intro i _ + exact congrFun (A.bundleRestore_add A.tensorTriv i (fun y => f y i) (fun y => g y i)) x + +lemma tensorDecode_smul (a : ℝ) (f : Base → A.centers → TensorFiber) : + A.tensorDecode (a • f) = a • A.tensorDecode f := by + funext x + simp only [tensorDecode, Pi.smul_apply, Finset.smul_sum] + apply Finset.sum_congr rfl + intro i _ + exact congrFun (A.bundleRestore_smul A.tensorTriv i a (fun y => f y i)) x + +lemma tensorEncode_sub (u v : ∀ x : M, CovariantTwoTensor x) : + A.tensorEncode (u - v) = A.tensorEncode u - A.tensorEncode v := by + funext x i + change A.bundleLocalize A.tensorTriv i (u - v) x = + A.bundleLocalize A.tensorTriv i u x - A.bundleLocalize A.tensorTriv i v x + by_cases hx : x ∈ (chart (i : M)).target + · simp only [bundleLocalize, localize, indicator_of_mem hx, bundleComponent, + Pi.sub_apply, map_sub, smul_sub] + · simp only [bundleLocalize, localize, indicator_of_notMem hx, sub_self] + +lemma tensorDecode_sub (f g : Base → A.centers → TensorFiber) : + A.tensorDecode (f - g) = A.tensorDecode f - A.tensorDecode g := by + funext x + simp only [tensorDecode, Pi.sub_apply, ← Finset.sum_sub_distrib] + apply Finset.sum_congr rfl + intro i _ + simp only [bundleRestore, map_sub, smul_sub] + +def tensorProject (f : Base → A.centers → TensorFiber) : Base → A.centers → TensorFiber := + A.tensorEncode (A.tensorDecode f) + +lemma tensorProject_encode (u : ∀ x : M, CovariantTwoTensor x) : + A.tensorProject (A.tensorEncode u) = A.tensorEncode u := by + unfold tensorProject + rw [A.tensorDecode_encode] + +lemma tensorProject_idempotent (f : Base → A.centers → TensorFiber) : + A.tensorProject (A.tensorProject f) = A.tensorProject f := + A.tensorProject_encode _ + +variable [CompactSpace M] + +lemma tensorEncode_smooth {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) : ContDiff ℝ ∞ (A.tensorEncode u) := by + apply contDiff_pi.mpr + intro i + exact A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hu + +omit [CompactSpace M] in +lemma tensorDecode_smooth {f : Base → A.centers → TensorFiber} (hf : ContDiff ℝ ∞ f) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (A.tensorDecode f x)) := by + apply ContMDiff.sum_section + intro i _ + exact A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i (contDiff_pi.mp hf i) + +lemma tensorEncode_bound {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x))) + {s C : ℝ} {m : ℕ} (hs : 0 < s) (hC : 0 ≤ C) (hb : A.TensorWeightedBound s m C u) : + WeightedBound univ s m C (A.tensorEncode u) := + WeightedBound.pi uniqueDiffOn_univ hs hC + (contDiffOn_pi.mp (A.tensorEncode_smooth hu).contDiffOn) hb + +omit [CompactSpace M] in +lemma tensorBound_of_encode {u : ∀ x : M, CovariantTwoTensor x} + (hu : ContDiff ℝ ∞ (A.tensorEncode u)) {s C : ℝ} {m : ℕ} + (hs : 0 ≤ s) (hC : 0 ≤ C) (hb : WeightedBound univ s m C (A.tensorEncode u)) : + A.TensorWeightedBound s m C u := + fun i => hb.component uniqueDiffOn_univ hs hC hu.contDiffOn i + +lemma tensorDecode_bound (m : ℕ) : ∃ D : ℝ, 0 ≤ D ∧ + ∀ (f : Base → A.centers → TensorFiber) (s C : ℝ), 0 < s → s ≤ 1 → 0 ≤ C → + ContDiff ℝ ∞ f → WeightedBound univ s m C f → + A.TensorWeightedBound s m (D * C) (A.tensorDecode f) := by + obtain ⟨D,hD,hd⟩ := A.bundle_restoration_bound A.tensorTriv A.tensorTriv_domain m + refine ⟨D,hD,?_⟩ + intro f s C hs hs1 hC hf hb + exact hd (fun i x => f x i) s C hs hs1 hC (fun i => contDiff_pi.mp hf i) + (fun i => hb.component uniqueDiffOn_univ hs.le hC hf.contDiffOn i) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanIteration.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanIteration.lean new file mode 100644 index 0000000000000000000000000000000000000000..d87bbf95c29dc9b626d5e93274008f86cfccf38c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorMeanIteration.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanCoordinates +import OAI.Geometry.SurfaceImmersion.Correction.FixedMeanSubstitution + +namespace OAI + +/-! Finite mean substitution on actual global tensor sections, represented +by redundant atlas coordinates. Every iterate stays in the representation +range, so no leading-identity premise on arbitrary plane fields is needed. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates FiniteMean +open JetPolynomial (Base) + +local instance iterationModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance iterationModelSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance iterationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance iterationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) + +local instance iterationSectionTensorNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance iterationSectionTensorSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorEncodeLM : (∀ x : M, CovariantTwoTensor x) →ₗ[ℝ] (Base → A.centers → TensorFiber) where + toFun := A.tensorEncode + map_add' := A.tensorEncode_add + map_smul' := A.tensorEncode_smul + +def tensorDecodeLM : (Base → A.centers → TensorFiber) →ₗ[ℝ] (∀ x : M, CovariantTwoTensor x) where + toFun := A.tensorDecode + map_add' := A.tensorDecode_add + map_smul' := A.tensorDecode_smul + +def tensorProjectLM : (Base → A.centers → TensorFiber) →ₗ[ℝ] (Base → A.centers → TensorFiber) := + A.tensorEncodeLM.comp A.tensorDecodeLM + +def tensorMeanOperator + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) + (f : Base → A.centers → TensorFiber) : Base → A.centers → TensorFiber := + A.tensorEncode (T (A.tensorDecode f)) + +lemma tensorMeanOperator_project + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) + (f : Base → A.centers → TensorFiber) : + A.tensorProjectLM (A.tensorMeanOperator T f) = A.tensorMeanOperator T f := + A.tensorProject_encode _ + +lemma tensorMean_trial_project (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) (j : ℕ) : + A.tensorProjectLM (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j) = + fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j := by + induction j with + | zero => exact A.tensorProject_encode H + | succ j _ => + change A.tensorProjectLM (A.tensorEncode H - A.tensorMeanOperator T + (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j)) = _ + rw [(A.tensorProjectLM).map_sub,show A.tensorProjectLM (A.tensorEncode H) = A.tensorEncode H from + A.tensorProject_encode H,A.tensorMeanOperator_project] + rfl + +def tensorMeanTrial (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) (j : ℕ) : + ∀ x : M, CovariantTwoTensor x := + A.tensorDecode (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j) + +lemma tensorEncode_meanTrial (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) (j : ℕ) : + A.tensorEncode (A.tensorMeanTrial H T j) = + fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j := + A.tensorMean_trial_project H T j + +lemma tensorMeanTrial_zero (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) : + A.tensorMeanTrial H T 0 = H := A.tensorDecode_encode H + +lemma tensorMeanTrial_succ (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) (j : ℕ) : + A.tensorMeanTrial H T (j + 1) = H - T (A.tensorMeanTrial H T j) := by + change A.tensorDecode (A.tensorEncode H - A.tensorMeanOperator T + (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j)) = _ + rw [A.tensorDecode_sub, A.tensorDecode_encode] + change H - A.tensorDecode (A.tensorEncode (T (A.tensorMeanTrial H T j))) = _ + rw [A.tensorDecode_encode] + +lemma tensorEncode_meanResidual (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) (j : ℕ) : + A.tensorEncode (A.tensorMeanTrial H T j + T (A.tensorMeanTrial H T j) - H) = + fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j + + A.tensorMeanOperator T (fixedTrial (A.tensorEncode H) (A.tensorMeanOperator T) j) - + A.tensorEncode H := by + rw [A.tensorEncode_sub, A.tensorEncode_add, A.tensorEncode_meanTrial] + rfl + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorOperatorSmooth.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorOperatorSmooth.lean new file mode 100644 index 0000000000000000000000000000000000000000..325f9f68d5eadc5f5b83042b985cfcb79cfef798 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorOperatorSmooth.lean @@ -0,0 +1,248 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.AtlasPrimitiveOperator +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothingSymmetry +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanCoordinates +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasMetricBounds +import OAI.Geometry.SurfaceImmersion.Correction.AtlasCorrectionLimit +import Mathlib.Analysis.Calculus.ContDiff.FiniteDimension + +namespace OAI + +/-! Smoothness of the actual finite primitive operator, derived from its +supported coefficients and the smooth phase differentials. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open PhaseMean PhaseGeometry + +local instance operatorSmoothFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance operatorSmoothFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance operatorSmoothFiberComplete : CompleteSpace TensorFiber := inferInstance +private lemma completedPrimitiveOperator_rankOne {ι : Type*} [Fintype ι] + (q : ι → TensorFiber →L[ℝ] ℝ) (psi : ι → ℝ) (xi : ι → Plane →L[ℝ] ℝ) + (B : TensorFiber) : + completedPrimitiveOperator q psi xi B = + (∑ a, ((psi a)^2 * q a (tensorSymmetrizer B)) • (xi a).smulRight (xi a)) + + (B - tensorSymmetrizer B) := by + rw [completedPrimitiveOperator_apply,finitePrimitiveOperator_apply] + abel + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance operatorSmoothDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance operatorSmoothDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance operatorSmoothSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance operatorSmoothSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +local instance operatorSmoothSectionGroup (p : M) : AddCommGroup (CovariantTwoTensor p) := + (operatorSmoothSectionNormed p).toAddCommGroup + +omit [CompactSpace M] [IsManifold planeModel ∞ M] in +private lemma smooth_clm_of_evaluation {F : M → TensorFiber →L[ℝ] TensorFiber} {p : M} + (h : ∀ v, ContMDiffAt planeModel 𝓘(ℝ,TensorFiber) ∞ (fun x => F x v) p) : + ContMDiffAt planeModel 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber) ∞ F p := by + let d := Module.finrank ℝ TensorFiber + have hd : d = Module.finrank ℝ (Fin d → ℝ) := (Module.finrank_fin_fun ℝ).symm + let e₁ := ContinuousLinearEquiv.ofFinrankEq hd + let e₂ := (e₁.arrowCongr (1 : TensorFiber ≃L[ℝ] TensorFiber)).trans + (ContinuousLinearEquiv.piRing (Fin d)) + rw [← Function.id_comp F, ← e₂.symm_comp_self] + exact e₂.symm.contDiff.contDiffAt.contMDiffAt.comp p + (contMDiffAt_pi_space.mpr fun i => h _) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +/-- Testing a field on smooth sections suffices for smoothness of the +endomorphism field. The atlas cutoffs provide the local constant frames. -/ +theorem tensorOperator_smooth_of_apply + (L : ∀ p : M, CovariantTwoTensor p →L[ℝ] CovariantTwoTensor p) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (hL : ∀ u : ∀ p : M, CovariantTwoTensor p, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (L p (u p)))) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun p => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) p (L p)) := by + intro p + obtain ⟨i,hi⟩ := A.exists_weight_ne_zero p + have hp := subset_tsupport _ hi + have hpS := A.weight_support i hp + let e := A.tensorTriv i + let eL := e.continuousLinearMap (RingHom.id ℝ) e + have he : p ∈ e.baseSet := A.tensorTriv_domain i hpS + apply (eL.contMDiffAt_section_iff (show p ∈ eL.baseSet from ⟨he,he⟩)).mpr + apply smooth_clm_of_evaluation + intro v + let u := A.bundleRestore A.tensorTriv i (fun _ => v) + have hu := A.bundleRestore_smooth A.tensorTriv A.tensorTriv_domain i + (contDiff_const : ContDiff ℝ ∞ (fun _ : JetPolynomial.Base => v)) + have hLu := (A.bundleComponent_smooth_on A.tensorTriv A.tensorTriv_domain i (hL u hu) + p hpS).contMDiffAt ((chart (i : M)).open_source.mem_nhds hpS) + apply hLu.congr_of_eventuallyEq + filter_upwards [houter i p hp, (chart (i : M)).open_source.mem_nhds hpS] with x hx hxS + simp only [eL, Trivialization.continuousLinearMap_apply] + change e.continuousLinearMapAt ℝ x (L x (e.symmL ℝ x v)) = + e.continuousLinearMapAt ℝ x (L x (u x)) + congr 2 + change e.symmL ℝ x v = A.outer i x • e.symmL ℝ x v + rw [hx,one_smul] + +include A in +/-- Transposition and symmetrization are smooth operations on genuine tensor +sections, with no symmetry assumption on the input. -/ +lemma tensorSymmetrizer_smooth (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 (show CovariantTwoTensor p from tensorSymmetrizer (u p))) := by + have ht : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (tensorTranspose (u p))) := by + have henc := A.tensorEncode_smooth hu + have hflip : ContDiff ℝ ∞ (fun y => A.tensorEncode (fun p => tensorTranspose (u p)) y) := by + apply contDiff_pi.mpr + intro i + have h := (ContinuousLinearMap.flipₗᵢ ℝ Plane Plane ℝ).toContinuousLinearMap.contDiff.comp + (contDiff_pi.mp henc i) + simpa only [tensorEncode,A.tensorLocalize_flip,Function.comp_def] using! h + simpa only [A.tensorDecode_encode] using A.tensorDecode_smooth hflip + change ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p ((1 / 2 : ℝ) • (u p + tensorTranspose (u p)))) + exact (hu.add_section ht).const_smul_section (a := (1 / 2 : ℝ)) + +def phaseDifferentialSquare (phi : M → ℝ) (p : M) : CovariantTwoTensor p := + (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) phi p).smulRight + (show Plane →L[ℝ] ℝ from mfderiv planeModel 𝓘(ℝ) phi p) + +include A in +/-- The square of a smooth scalar differential is a smooth covariant tensor. -/ +lemma phaseDifferentialSquare_smooth (phi : M → ℝ) + (hphi : ContMDiff planeModel 𝓘(ℝ) ∞ phi) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (phaseDifferentialSquare phi p)) := by + let v : Space := EuclideanSpace.single 0 1 + let e : ℝ →L[ℝ] Space := (ContinuousLinearMap.id ℝ ℝ).smulRight v + have he : ContMDiff 𝓘(ℝ) spaceModel ∞ e := e.contDiff.contMDiff + have hF := he.comp hphi + have hEq : inducedTensor (e ∘ phi) = + fun p => phaseDifferentialSquare phi p := by + funext p + ext a b + change inner ℝ (mfderiv planeModel spaceModel (e ∘ phi) p a) + (mfderiv planeModel spaceModel (e ∘ phi) p b) = _ + rw [mfderiv_comp p (he.mdifferentiable (by simp)).mdifferentiableAt + (hphi.mdifferentiable (by simp)).mdifferentiableAt, + mfderiv_eq_fderiv,e.fderiv] + change inner ℝ ((show ℝ from mfderiv planeModel 𝓘(ℝ) phi p a) • v) + ((show ℝ from mfderiv planeModel 𝓘(ℝ) phi p b) • v) = + (show ℝ from mfderiv planeModel 𝓘(ℝ) phi p a) * + (show ℝ from mfderiv planeModel 𝓘(ℝ) phi p b) + have hv : inner ℝ v v = 1 := by + simp [v] + have hinner (s t : ℝ) : inner ℝ (s • v) (t • v) = s*t := by + rw [real_inner_smul_left,real_inner_smul_right,hv,mul_one] + exact hinner _ _ + simpa only [hEq] using A.inducedTensor_smooth hF + +omit [CompactSpace M] in +/-- The cutoff absorbs all coefficient chart boundaries. -/ +lemma supportedPrimitiveCoefficient_smooth + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi : (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)) + (u : ∀ p : M, CovariantTwoTensor p) + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) (a : A.centers × Fin 3) : + ContMDiff planeModel 𝓘(ℝ) ∞ + (fun p => (psi a p)^2 * A.primitiveCoefficientField P a p (u p)) := by + apply contMDiff_of_tsupport + intro p hp + have hp2 : p ∈ tsupport (fun x => (psi a x)^2) := tsupport_mul_subset_left hp + have hps : p ∈ tsupport (psi a) := by + apply (closure_mono (show Function.support (fun x => (psi a x)^2) ⊆ + Function.support (psi a) from ?_)) hp2 + intro x hx + exact fun hz => hx (by simp [hz]) + 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 + exact ((hpsi a p).pow 2).mul (hq.clm_apply hf) + +/-- Smoothness of the actual independent-cutoff correction operator follows +from the smooth input coefficients and phases. -/ +theorem primitiveFullOperator_smooth + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi phi : (A.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi 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)) : + ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber →L[ℝ] TensorFiber)) ∞ + (fun p => TotalSpace.mk' (TensorFiber →L[ℝ] TensorFiber) p (A.primitiveFullOperator P psi phi p)) := by + apply A.tensorOperator_smooth_of_apply _ houter + intro u hu + have hs := A.tensorSymmetrizer_smooth u hu + have hfinite : ContMDiff planeModel (planeModel.prod 𝓘(ℝ,TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p + (show CovariantTwoTensor p from + ∑ a : A.centers × Fin 3, ((psi a p)^2 * A.primitiveCoefficientField P a p + (tensorSymmetrizer (u p))) • (A.primitivePhaseCovector phi a p).smulRight + (A.primitivePhaseCovector phi a p))) := by + apply ContMDiff.sum_section + intro a _ + exact (A.supportedPrimitiveCoefficient_smooth P psi hpsi hsupport hQ _ hs a).smul_section + (A.phaseDifferentialSquare_smooth (phi a) (hphi a)) + have h := hfinite.add_section (hu.sub_section hs) + have he (p : M) : A.primitiveFullOperator P psi phi p (u p) = + (show CovariantTwoTensor p from ∑ a : A.centers × Fin 3, + ((psi a p)^2 * A.primitiveCoefficientField P a p (tensorSymmetrizer (u p))) • + (A.primitivePhaseCovector phi a p).smulRight (A.primitivePhaseCovector phi a p)) + + (u p - (show CovariantTwoTensor p from tensorSymmetrizer (u p))) := by + exact completedPrimitiveOperator_rankOne (fun a => A.primitiveCoefficientField P a p) + (fun a => psi a p) (fun a => A.primitivePhaseCovector phi a p) (u p) + simpa only [he,Pi.add_apply,Pi.sub_apply] using! h + + +/-- The corrected amplitudes are smooth from their genuine coefficient, +cutoff and phase data; no operator-smoothness hypothesis remains. -/ +theorem correctedPrimitiveAmplitude_smooth_of_data + (P : A.centers → JetPolynomial.Base → PhaseBasis) + (psi phi : (A.centers × Fin 3) → M → ℝ) + (hpsi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (psi a)) + (hphi : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi 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 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) := + A.correctedPrimitiveAmplitude_smooth P psi phi hpsi hsupport hQ + (A.primitiveFullOperator_smooth P psi phi hpsi hphi hsupport hQ houter) hinv u hu hpos a + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothing.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothing.lean new file mode 100644 index 0000000000000000000000000000000000000000..92995cef96aa2d9d9cedf82c4820e22c8b6af8db --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothing.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalBundleSmoothing + +namespace OAI + +/-! Smoothing on the actual covariant two-tensor bundle of the surface. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle MeasureTheory +open JetPolynomial (Base) + +abbrev TensorFiber := Plane →L[ℝ] Plane →L[ℝ] ℝ + +local instance tensorModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance tensorModelSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance tensorModelComplete : CompleteSpace TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +abbrev CovariantTwoTensor (p : M) := + TangentSpace planeModel p →L[ℝ] TangentSpace planeModel p →L[ℝ] ℝ + +local instance tensorDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) + +local instance tensorDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +def tensorTriv (i : A.centers) : + Trivialization TensorFiber (TotalSpace.proj : TotalSpace TensorFiber + (CovariantTwoTensor (M := M)) → M) := + trivializationAt TensorFiber (CovariantTwoTensor (M := M)) (i : M) + +instance tensorTriv_mem (i : A.centers) : MemTrivializationAtlas (A.tensorTriv i) := by + unfold tensorTriv + infer_instance + +lemma tensorTriv_domain (i : A.centers) : + (chart (i : M)).source ⊆ (A.tensorTriv i).baseSet := by + intro x hx + unfold tensorTriv CovariantTwoTensor TensorFiber + rw [hom_trivializationAt_baseSet, hom_trivializationAt_baseSet] + simp only [TangentBundle.trivializationAt_baseSet, mem_inter_iff] + exact ⟨by simpa only [chart_source] using hx, + by simpa only [chart_source] using hx, mem_univ x⟩ + +def tensorSmooth (r : ℕ) (s : ℝ) (u : ∀ p : M, CovariantTwoTensor p) : + ∀ p : M, CovariantTwoTensor p := A.bundleSmooth (F := TensorFiber) (E := CovariantTwoTensor (M := M)) A.tensorTriv r s u + +def TensorWeightedBound (s : ℝ) (m : ℕ) (C : ℝ) + (u : ∀ p : M, CovariantTwoTensor p) : Prop := + A.BundleWeightedBound (F := TensorFiber) (E := CovariantTwoTensor (M := M)) A.tensorTriv s m C u + +variable [CompactSpace M] + +theorem tensorSmooth_smooth (r : ℕ) {s : ℝ} (hs : 0 < s) + {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.tensorSmooth r s u p)) := + A.bundleSmooth_smooth (F := TensorFiber) (E := CovariantTwoTensor (M := M)) A.tensorTriv A.tensorTriv_domain r hs hu + +theorem tensor_smoothing_bounds (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ + (∀ (u : ∀ p : M, CovariantTwoTensor p) (s t C : ℝ), + 0 < s → 0 < t → t ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → A.TensorWeightedBound t m C u → + A.TensorWeightedBound t m + (D * (1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) * C) (A.tensorSmooth r s u)) ∧ + (∀ (u : ∀ p : M, CovariantTwoTensor p) (s t C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → A.TensorWeightedBound t 0 C u → + A.TensorWeightedBound s m (D * weightedGainConstant r m * C) (A.tensorSmooth r s u)) := + A.bundle_smoothing_bounds (F := TensorFiber) (E := CovariantTwoTensor (M := M)) + A.tensorTriv A.tensorTriv_domain r m + +theorem tensor_smoothing_tail (r m : ℕ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (u : ∀ p : M, CovariantTwoTensor p) (s t τ B C : ℝ), + 0 < τ → τ ≤ s → s ≤ t → t ≤ 1 → 0 ≤ B → 0 ≤ C → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p)) → + A.TensorWeightedBound t r B u → A.TensorWeightedBound t m C u → + A.TensorWeightedBound τ m + (D * tailConstant r * (B * (s / t) ^ r + C * (τ / t) ^ r)) + (fun p => u p - A.tensorSmooth r s u p) := + A.bundle_smoothing_tail (F := TensorFiber) (E := CovariantTwoTensor (M := M)) A.tensorTriv A.tensorTriv_domain r m + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothingSymmetry.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothingSymmetry.lean new file mode 100644 index 0000000000000000000000000000000000000000..3132864cd7741cd738d79869bd6847599ac2d2cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSmoothingSymmetry.lean @@ -0,0 +1,145 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorSmoothing +import OAI.Geometry.SurfaceImmersion.Correction.SmoothingLinearMaps + +namespace OAI + +/-! Tensor coordinate maps commute with transposition. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle +open JetPolynomial (Base) + +local instance symmetryModelNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance symmetryModelSpace : NormedSpace ℝ TensorFiber := inferInstance +local instance symmetryModelComplete : CompleteSpace TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] + +local instance symmetryDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance symmetryDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) + +/-- Transpose a covariant tensor by interchanging its two arguments. -/ +def tensorTranspose {p : M} (u : CovariantTwoTensor p) : CovariantTwoTensor p := + (show TensorFiber from u).flip + +omit [IsManifold planeModel ∞ M] in +@[simp] lemma tensorTranspose_apply {p : M} (u : CovariantTwoTensor p) + (v w : TangentSpace planeModel p) : tensorTranspose u v w = u w v := rfl + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorComponent_flip (i : A.centers) (u : ∀ p : M, CovariantTwoTensor p) + {p : M} (hp : p ∈ (chart (i : M)).source) : + A.bundleComponent A.tensorTriv i (fun p => tensorTranspose (u p)) p = + (A.bundleComponent A.tensorTriv i u p).flip := by + have ht : p ∈ (trivializationAt Plane (TangentSpace planeModel) (i : M)).baseSet := by + simpa only [TangentBundle.trivializationAt_baseSet, chart_source] using hp + have hs : p ∈ (trivializationAt ℝ (fun _ : M => ℝ) (i : M)).baseSet := mem_univ p + unfold bundleComponent + rw [(A.tensorTriv i).continuousLinearMapAt_apply_of_mem ℝ (A.tensorTriv_domain i hp), + (A.tensorTriv i).continuousLinearMapAt_apply_of_mem ℝ (A.tensorTriv_domain i hp)] + unfold tensorTriv + simp only [hom_trivializationAt_apply] + ext v w + simp only [ContinuousLinearMap.flip_apply] + rw [inCoordinates_apply_eq₂ ht ht hs, inCoordinates_apply_eq₂ ht ht hs] + rfl + +lemma tensorLocalize_flip (i : A.centers) (u : ∀ p : M, CovariantTwoTensor p) : + A.bundleLocalize A.tensorTriv i (fun p => tensorTranspose (u p)) = + fun x => (A.bundleLocalize A.tensorTriv i u x).flip := by + funext x + by_cases hx : x ∈ (chart (i : M)).target + · unfold bundleLocalize localize + rw [indicator_of_mem hx, indicator_of_mem hx, + A.tensorComponent_flip i u ((chart (i : M)).map_target hx)] + ext v w + rfl + · simp only [bundleLocalize, localize, indicator_of_notMem hx] + rfl + +lemma tensorRestore_flip (i : A.centers) (h : Base → TensorFiber) : + A.bundleRestore A.tensorTriv i (fun x => (h x).flip) = + fun p => tensorTranspose (A.bundleRestore A.tensorTriv i h p) := by + funext p + by_cases hp : p ∈ (chart (i : M)).source + · have hd := A.tensorTriv_domain i hp + have hinj : Function.Injective ((A.tensorTriv i).continuousLinearMapAt ℝ p) := by + intro v w heq + have heq' := congrArg ((A.tensorTriv i).symmL ℝ p) heq + simpa only [(A.tensorTriv i).symmL_continuousLinearMapAt hd] using heq' + apply hinj + have hflip := A.tensorComponent_flip i (A.bundleRestore A.tensorTriv i h) hp + change (A.tensorTriv i).continuousLinearMapAt ℝ p + (tensorTranspose (A.bundleRestore A.tensorTriv i h p)) = + ((A.tensorTriv i).continuousLinearMapAt ℝ p (A.bundleRestore A.tensorTriv i h p)).flip at hflip + have hcoord (f : Base → TensorFiber) : + (A.tensorTriv i).continuousLinearMapAt ℝ p (A.bundleRestore A.tensorTriv i f p) = + A.outer i p • f (chart (i : M) p) := by + change (A.tensorTriv i).continuousLinearMapAt ℝ p + (A.outer i p • (A.tensorTriv i).symmL ℝ p (f (chart (i : M) p))) = _ + rw [(A.tensorTriv i).continuousLinearMapAt ℝ p |>.map_smul] + rw [(A.tensorTriv i).continuousLinearMapAt_symmL hd] + rw [hflip, hcoord, hcoord] + ext v w + rfl + · have ho : A.outer i p = 0 := + image_eq_zero_of_notMem_tsupport (fun hh => hp (A.outer_support i hh)) + simp only [bundleRestore, ho, zero_smul] + rfl + +variable [CompactSpace M] + +/-- The actual tensor smoother preserves transposition, so it acts on +symmetric tensors without any extra projection. -/ +theorem tensorSmooth_flip (r : ℕ) {s : ℝ} (hs : 0 < s) + {u : ∀ p : M, CovariantTwoTensor p} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (u p))) : + A.tensorSmooth r s (fun p => tensorTranspose (u p)) = + fun p => tensorTranspose (A.tensorSmooth r s u p) := by + have hflip (i : A.centers) : + finiteSmooth r s (fun x => (A.bundleLocalize A.tensorTriv i u x).flip) = + fun x => (finiteSmooth r s (A.bundleLocalize A.tensorTriv i u) x).flip := + finiteSmooth_clm r hs + (ContinuousLinearMap.flipₗᵢ ℝ Plane Plane ℝ).toContinuousLinearEquiv.toContinuousLinearMap + (A.bundleLocalize_smooth A.tensorTriv A.tensorTriv_domain i hu) + funext p + simp only [tensorSmooth, bundleSmooth, A.tensorLocalize_flip, hflip] + calc + _ = ∑ i : A.centers, tensorTranspose + (A.bundleRestore A.tensorTriv i (finiteSmooth r s (A.bundleLocalize A.tensorTriv i u)) p) := by + apply Finset.sum_congr rfl + intro i _ + exact congrFun (A.tensorRestore_flip i _) p + _ = _ := by + ext v w + simp only [tensorTranspose_apply, sum_apply] + +theorem tensorSmooth_symmetric (r : ℕ) {s : ℝ} (hs : 0 < s) + {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) : + ∀ p v w, A.tensorSmooth r s u p v w = A.tensorSmooth r s u p w v := by + have heq : (fun p => tensorTranspose (u p)) = u := by + funext p + ext v w + exact (hsymm p v w).symm + have h := A.tensorSmooth_flip r hs hu + rw [heq] at h + intro p v w + exact congrArg (fun b : CovariantTwoTensor p => b v w) (congrFun h p) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSymmetricMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSymmetricMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..80a0a0660baf41f8379e8434cd663976fa3c5215 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/TensorSymmetricMean.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Correction.TensorMeanIteration +import OAI.Geometry.SurfaceImmersion.Atlas.TensorPhaseDecomposition + +namespace OAI + +/-! Symmetry is invariant under the actual global finite mean iteration. -/ +noncomputable section +open scoped ContDiff Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle + +local instance symmetricMeanFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance symmetricMeanFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] +local instance symmetricMeanDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance symmetricMeanDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance symmetricMeanSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance symmetricMeanSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +lemma tensorMeanTrial_symmetric (H : ∀ x : M, CovariantTwoTensor x) + (T : (∀ x : M, CovariantTwoTensor x) → ∀ x : M, CovariantTwoTensor x) + (hH : ∀ p v w, H p v w = H p w v) + (hT : ∀ u, (∀ p v w, u p v w = u p w v) → ∀ p v w, T u p v w = T u p w v) + (j : ℕ) : ∀ p v w, A.tensorMeanTrial H T j p v w = A.tensorMeanTrial H T j p w v := by + induction j with + | zero => simpa only [A.tensorMeanTrial_zero] using hH + | succ j ih => + rw [A.tensorMeanTrial_succ] + intro p v w + change H p v w - T (A.tensorMeanTrial H T j) p v w = + H p w v - T (A.tensorMeanTrial H T j) p w v + rw [hH p v w, hT _ ih p v w] + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasAdjustedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasAdjustedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..f201b18d989e3740c82499970593aa4869d83651 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasAdjustedMean.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.ChartedAtlasQuadraticResidual + +namespace OAI + +/-! Finite global adjustment of the actual quadratic zero phase. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean PhaseGeometry WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance adjustedAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance adjustedAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance adjustedAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance adjustedAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance adjustedAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance adjustedAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_adjusted_quadratic_mean + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R r r₀ : ℝ} {s : ℝ≥0} + (hρ : 0 < ρ) (hr : 0 ≤ r) (hgap : r₀ < r) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (reference H : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x))) + (hsym : ∀ x v w, H x v w = H x w v) + (hH0 : ∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r₀) + (C : ℕ → ℝ) (hC : ∀ m, 1 ≤ C m) + (hHC : ∀ m, A.TensorWeightedBound s m (C m) H) (q steps : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ ∀ {ε τ : ℝ} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference)), + (∀ i, (d i).Fits (p i)) → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ loss ≤ η₀ → + ∀ (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ), + (∀ i j, w i j ≠ 0) → + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) → + (∀ 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) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ u : ∀ x : M, CovariantTwoTensor x, + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) ∧ + (∀ x v w, u x v w = u x w v) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) u) ∧ + (∀ m, A.TensorWeightedBound s m + (δ^2 * (differenceBound L C β κ j m * (τ / s + ε / τ ^ loss)^(j+1))) + (A.tensorPlaneRestore (fun i => (d i).quadraticMean hρ δ q (A.tensorPlaneRead i u)) - δ^2 • H)) := by + obtain ⟨D₀,hD₀,β,κ,η₀,hη₀,hη₁,ht⟩ := A.uniform_atlas_finite_mean (R := R) p hρ hr hgap hs hs1 + reference H href hH hsym hH0 C hC hHC q steps + refine ⟨D₀,hD₀,β,κ,η₀,hη₀,hη₁,?_⟩ + intro ε τ d hd hτ hτs hε hε1 hsmall Q w hw hphase hcutoff hform hsupport δ hδ j hj + obtain ⟨hu,hsymu,hball,hlocal,hsize,herror⟩ := + ht d hd hτ hτs hε hε1 hsmall δ hδ j hj + refine ⟨_,hu,hsymu,hball,hlocal,hsize,?_⟩ + intro m + exact A.charted_family_atlas_quadratic_residual d hρ Q w hw hphase hcutoff hform hsupport + _ H hu hH hsymu hlocal hδ.ne' hτ.ne' q (herror m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..08c3b19160064588aa56a847f517560b7060f4d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasFiniteMean.lean @@ -0,0 +1,82 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.TensorSymmetricMean + +namespace OAI + +/-! Finite adjustment of the actual global charted means. +The threshold precedes the local solvers, frequency and amplitude. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance uniformFiniteAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformFiniteAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformFiniteAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformFiniteAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformFiniteAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformFiniteAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_finite_mean + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R r r₀ : ℝ} {s : ℝ≥0} + (hρ : 0 < ρ) (hr : 0 ≤ r) (hgap : r₀ < r) (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (reference H : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hH : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x))) + (hsym : ∀ x v w, H x v w = H x w v) + (hH0 : ∀ x, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r₀) + (C : ℕ → ℝ) (hC : ∀ m, 1 ≤ C m) + (hHC : ∀ m, A.TensorWeightedBound s m (C m) H) (q steps : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ ∀ {ε τ : ℝ} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference)), + (∀ i, (d i).Fits (p i)) → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + τ / s + ε / τ ^ loss ≤ η₀ → ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, + let u := A.tensorMeanTrial H (A.atlasMean (fun i => (d i).mean hρ δ q)) j + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (u x)) ∧ + (∀ x v w, u x v w = u x w v) ∧ + InTrialBall univ (A.tensorEncode reference) r (A.tensorEncode u) ∧ + (∀ i, InTrialBall univ (A.tensorPlaneRead i reference) (D₀*r) (A.tensorPlaneRead i u)) ∧ + (∀ m, A.TensorWeightedBound s m (sizeBound L C β j m) u) ∧ + (∀ m, A.TensorWeightedBound s m + (differenceBound L C β κ j m * (τ / s + ε / τ ^ loss)^(j+1)) + (u + A.atlasMean (fun i => (d i).mean hρ δ q) u - H)) := by + obtain ⟨D₀,hD₀,hball,β,κ,hm⟩ := A.uniform_atlas_mean_majorants (R := R) p hρ hr reference href q + obtain ⟨η₀,hη₀,hη₁,ht⟩ := A.tensor_finite_mean_substitution hs hgap hC hH hH0 hHC steps + (B := β) (K := κ) + refine ⟨D₀,hD₀,β,κ,η₀,hη₀,hη₁,?_⟩ + intro ε τ d hd hτ hτs hε hε1 hsmall δ hδ j hj + have hη : 0 < τ / s + ε / τ ^ Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨hu,hb,hsize,herror⟩ := ht _ hη hsmall _ + (hm d hd hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) j hj + refine ⟨hu,A.tensorMeanTrial_symmetric H _ hsym + (fun v _ => A.atlasMean_symmetric _ v) j,hb,?_,hsize,herror⟩ + intro i + have hh := hball _ (A.tensorEncode_smooth hu) hb i + rwa [A.tensorDecode_encode] at hh + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..e89a04d1dfd62315f9cff01ab6dbc0263a044024 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasMean.lean @@ -0,0 +1,174 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData +import OAI.Geometry.SurfaceImmersion.Correction.TensorAtlasMean + +namespace OAI + +/-! Uniform global majorants for the actual charted polynomial means. +Constants precede both scales, all coordinate maps and all local solvers. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance uniformAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_atlas_mean_majorants_fixed_ball + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, ContDiff ℝ ∞ f → + InTrialBall univ (A.tensorEncode reference) r f → ∀ i : A.centers, + InTrialBall univ (A.tensorPlaneRead i reference) (A.tensorReadBallConstant*r) + (A.tensorPlaneRead i (A.tensorDecode f))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {ε τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (A.tensorReadBallConstant*r) ρ R (A.tensorPlaneRead i reference)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ loss ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean (τ / s + ε / τ ^ loss) + (A.tensorMeanOperator (A.atlasMean (fun i => (d i).mean hρ δ q)))) β κ := by + classical + dsimp only + let Ls := fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1) + let L := Finset.univ.sup Ls + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + choose B K hlocal using fun i : A.centers => uniform_chartedFamilyData_majorants (R := R) (p i) hρ q + let B' := fun m C => 1 + ∑ i : A.centers, max 1 (B i m C) + let K' := fun m C => 1 + ∑ i : A.centers, max 1 (K i m C) + have hB (m : ℕ) (C : ℝ) (_ : 1 ≤ C) : 1 ≤ B' m C := by + have hn : 0 ≤ ∑ i : A.centers, max 1 (B i m C) := + Finset.sum_nonneg (fun _ _ => zero_le_one.trans (le_max_left _ _)) + change 1 ≤ 1 + ∑ i : A.centers, max 1 (B i m C) + linarith + have hK (m : ℕ) (C : ℝ) (_ : 1 ≤ C) : 1 ≤ K' m C := by + have hn : 0 ≤ ∑ i : A.centers, max 1 (K i m C) := + Finset.sum_nonneg (fun _ _ => zero_le_one.trans (le_max_left _ _)) + change 1 ≤ 1 + ∑ i : A.centers, max 1 (K i m C) + linarith + have hBle (i : A.centers) (m : ℕ) (C : ℝ) : B i m C ≤ B' m C := by + have h := Finset.single_le_sum (s := (Finset.univ : Finset A.centers)) + (f := fun j => max 1 (B j m C)) (fun _ _ => zero_le_one.trans (le_max_left _ _)) (Finset.mem_univ i) + change B i m C ≤ 1 + ∑ j : A.centers, max 1 (B j m C) + linarith [le_max_right 1 (B i m C)] + have hKle (i : A.centers) (m : ℕ) (C : ℝ) : K i m C ≤ K' m C := by + have h := Finset.single_le_sum (s := (Finset.univ : Finset A.centers)) + (f := fun j => max 1 (K j m C)) (fun _ _ => zero_le_one.trans (le_max_left _ _)) (Finset.mem_univ i) + change K i m C ≤ 1 + ∑ j : A.centers, max 1 (K j m C) + linarith [le_max_right 1 (K i m C)] + have hall := A.atlasMean_majorants_fixed_ball reference href L B' K' hB hK + intro r hr + obtain ⟨hball,β,κ,hm⟩ := hall r hr + refine ⟨hball,β,κ,?_⟩ + intro ε τ s d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + let η := τ / s + ε / τ ^ loss + have hη : 0 < η := add_pos_of_pos_of_nonneg (div_pos hτ hs) + (div_nonneg hε (pow_nonneg hτ.le _)) + have hηle (i : A.centers) : τ / s + ε / τ ^ tensorLoss (P i) ≤ η := by + change τ / s + ε / τ ^ tensorLoss (P i) ≤ τ / s + ε / τ ^ loss + apply add_le_add le_rfl + apply div_le_div_of_nonneg_left hε (pow_pos hτ _) + apply pow_le_pow_of_le_one hτ.le (hτs.trans hs1) + exact Finset.le_sup (f := fun i : A.centers => tensorLoss (P i)) (Finset.mem_univ i) + have hηi (i : A.centers) : 0 < τ / s + ε / τ ^ tensorLoss (P i) := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + have hL (i : A.centers) : Ls i ≤ L := Finset.le_sup (Finset.mem_univ i) + have hmi (i : A.centers) := hlocal i (d i) (hd i) hτ hs hτs hs1 hε hε1 + ((hηle i).trans hsmall) δ hδ + apply hm hs hs1 η hη (fun i => (d i).mean hρ δ q) + · intro i f _ _ + exact (d i).mean_smooth hρ δ q f + · intro i m C f hC hf hb hbf + have hh := (hmi i).value _ (hηi i) ((hηle i).trans hsmall) m C f hC hf.contDiffOn hb + (hbf.mono_order (Nat.add_le_add_left (hL i) m)) + rw [rescaledMean_self (hηi i).ne'] at hh + apply hh.mono_const + calc + _ ≤ η * B i m C := mul_le_mul_of_nonneg_right (hηle i) + (zero_le_one.trans ((hmi i).B_pos m C hC)) + _ ≤ _ := mul_le_mul_of_nonneg_left (hBle i m C) hη.le + · intro i m C D f g hC hD hf hg hbf hbg hbf' hbg' hdiff + have hh := (hmi i).difference _ (hηi i) ((hηle i).trans hsmall) m C D f g hC hD + hf.contDiffOn hg.contDiffOn hbf hbg + (hbf'.mono_order (Nat.add_le_add_left (hL i) m)) + (hbg'.mono_order (Nat.add_le_add_left (hL i) m)) + (hdiff.mono_order (Nat.add_le_add_left (hL i) m)) + rw [rescaledMean_self (hηi i).ne'] at hh + apply hh.mono_const + apply mul_le_mul_of_nonneg_right _ hD + exact mul_le_mul (hKle i m C) (hηle i) + (hηi i).le (zero_le_one.trans (hK m C hC)) + +theorem uniform_atlas_mean_majorants_all_radii + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R : ℝ} (hρ : 0 < ρ) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ ∀ r : ℝ, 0 ≤ r → + (∀ f : Base → A.centers → TensorFiber, 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))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {ε τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ loss ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean (τ / s + ε / τ ^ loss) + (A.tensorMeanOperator (A.atlasMean (fun i => (d i).mean hρ δ q)))) β κ := by + exact ⟨A.tensorReadBallConstant,A.one_le_tensorReadBallConstant, + A.uniform_atlas_mean_majorants_fixed_ball (R := R) p hρ reference href q⟩ + +theorem uniform_atlas_mean_majorants + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + (p : ∀ i, Fin 3 → ChartedMeanProfile (P i)) {ρ R r : ℝ} (hρ : 0 < ρ) (hr : 0 ≤ r) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ D₀ : ℝ, 1 ≤ D₀ ∧ + (∀ f : Base → A.centers → TensorFiber, 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))) ∧ ∃ β κ : ℕ → ℝ → ℝ, + ∀ {ε τ : ℝ} {s : ℝ≥0} + (d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference)), + (∀ i, (d i).Fits (p i)) → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ loss ≤ 1 → ∀ δ : ℝ, 0 < δ → + MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean (τ / s + ε / τ ^ loss) + (A.tensorMeanOperator (A.atlasMean (fun i => (d i).mean hρ δ q)))) β κ := by + obtain ⟨D₀,hD₀,h⟩ := A.uniform_atlas_mean_majorants_all_radii (R := R) p hρ reference href q + obtain ⟨hball,β,κ,hm⟩ := h r hr + exact ⟨D₀,hD₀,hball,β,κ,hm⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasPhaseMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasPhaseMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..4cc0bd0c8db9eea2eb6466111a18ac750030dd29 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformAtlasPhaseMeanData.lean @@ -0,0 +1,163 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformInputAtlasMeanData +import OAI.Geometry.Immersion.ClosedSurface.PhaseWeights + +namespace OAI + +/-! Actual atlas phase cutoffs discharge the geometric identities required +by finite mean adjustment. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold Topology NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The supported cutoff, phase, and coefficient form are constructed from +the fixed atlas weights and phase bases. No solver or cutoff is supplied for +the varying map. -/ +theorem uniform_atlas_phase_mean_data_all_profiles + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {r ρ R : ℝ} (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r ≤ (Q i).Q j (reference i x) ∧ + (Q i).Q j (reference i x) ≤ R - ‖(Q i).Q j‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → + ∃ p : A.centers → Fin 3 → ChartedMeanProfile emptyMetricPolynomial, + ∀ (G : M → Space) (_hG : 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 (P m) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ∀ i, ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = fun j => + phaseLinear (w i j • (Q i).ξ j) ∘ planeCoordinateIsometry) ∧ + (∀ i, (d i).support = fun _ => A.chartWeightCompact i) ∧ + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) ∧ + (∀ 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) := by + classical + let ξ := fun i j => w i j • (Q i).ξ j + have hξ (i j) : ξ i j ≠ 0 := smul_ne_zero (hw i j) ((Q i).nonzero j) + let e := fun i j => linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j) + let φ : A.centers → Fin 3 → JetPolynomial.Base → ℝ := + fun i j => phaseLinear (ξ i j) ∘ planeCoordinateIsometry + have hφ (i j) : ContDiff ℝ ∞ (φ i j) := + (phaseLinear (ξ i j)).contDiff.comp planeCoordinateIsometry.contDiff + have hphase (i j) : coordinatePhase (φ i j) = phaseLinear (ξ i j) := by + funext x + change phaseLinear (ξ i j) (planeCoordinateIsometry (planeCoordinateIsometry.symm x)) = _ + rw [LinearIsometryEquiv.apply_symm_apply] + let ψ := fun i j => A.phaseWeightCutoff i (e i j) + (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2.contDiffOn + (hsupport i j) (w i j) + obtain ⟨ρ₀,hρ₀,hall⟩ := A.uniform_input_atlas_mean_data_all_profiles F hF Ω U K hΩ hU hK hUK hKΩ + ξ hξ hImm (fun i j x hx => good_smul (hw i j) (hgood i j x hx)) + (fun i _ => A.chartWeightCompact i) hsupport U₀ hU₀ K₀ hU₀K (fun i _ => hSU₀ i) + φ hφ hphase ψ (fun i j => (Q i).Q j) reference hmargin + refine ⟨ρ₀,hρ₀,?_⟩ + intro P hP + obtain ⟨p,hdata⟩ := hall P hP + refine ⟨p,?_⟩ + intro G hG B hB hBρ hclose s hs hs1 hp τ r' hr + obtain ⟨d,hfit,hmap,hphases,hsupp,he,hcut,hform⟩ := + hdata G hG B hB hBρ hclose s hs hs1 hp τ r' hr + refine ⟨d,hfit,hmap,hphases,hsupp,?_,?_,?_,?_⟩ + · intro i j + rw [hphases i] + exact hphase i j + · intro i j x hx + have hx' : x ∈ (e i j).source := by simpa only [he i j] using hx + calc + ((d i).data j).cutoff (((d i).solver j).e x) = ψ i j (((d i).solver j).e x) := + hcut i j _ + _ = ψ i j (e i j x) := congrArg (ψ i j) + (congrArg (fun e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base => e x) (he i j)) + _ = A.planeWeight i x / w i j := A.phaseWeightCutoff_apply i (e i j) + (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2.contDiffOn + (hsupport i j) (w i j) hx' + · intro i j x _ + rw [hform i j] + · intro i j x hx + have hx' : x ∈ (e i j).source := + A.planeWeight_support_chart i (e i j) (hsupport i j) hx + simpa only [he i j] using hx' + +/-- The supported cutoff, phase, and coefficient form are constructed from +the fixed atlas weights and phase bases. No solver or cutoff is supplied for +the varying map. -/ +theorem uniform_atlas_phase_mean_data + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {r ρ R : ℝ} (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r ≤ (Q i).Q j (reference i x) ∧ + (Q i).Q j (reference i x) ≤ R - ‖(Q i).Q j‖*r) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) : + ∃ (ρ₀ : ℝ) (p : A.centers → Fin 3 → ChartedMeanProfile emptyMetricPolynomial), + 0 < ρ₀ ∧ ∀ (G : M → Space) (_hG : 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 (P m) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ∀ i, ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = fun j => + phaseLinear (w i j • (Q i).ξ j) ∘ planeCoordinateIsometry) ∧ + (∀ i, (d i).support = fun _ => A.chartWeightCompact i) ∧ + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) ∧ + (∀ 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) := by + obtain ⟨ρ₀,hρ₀,hall⟩ := A.uniform_atlas_phase_mean_data_all_profiles F hF Q w hw Ω U K + hΩ hU hK hUK hKΩ hImm hgood hsupport U₀ hU₀ K₀ hU₀K hSU₀ reference hmargin + obtain ⟨p,hdata⟩ := hall P hP + exact ⟨ρ₀,p,hρ₀,hdata⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFiniteMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFiniteMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef7391e0731625f482d9e9e398e931310fa0e328 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFiniteMean.lean @@ -0,0 +1,143 @@ +import OAI.Geometry.Immersion.ClosedSurface.FiniteMean + +namespace OAI + +/-! A uniform version of finite mean substitution: the admissible size is +chosen from the majorants before the actual mean operator is chosen. -/ +noncomputable section +open Set Complex Bundle Manifold +open scoped ContDiff Matrix Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteMean +open ClosedSurfaceR4.WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem finite_substitution_uniform_inputs {r0 r1 : ℝ} (hgap : r0 < r1) {L : ℕ} + {B K : ℕ → ℝ → ℝ} + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (n : ℕ) : + ∃ η0 : ℝ, 0 < η0 ∧ η0 ≤ 1 ∧ + ∀ (U : Set E), UniqueDiffOn ℝ U → ∀ s : ℝ, 0 ≤ s → ∀ reference H : E → F, + ContDiffOn ℝ ∞ H U → (∀ p ∈ U, ‖H p - reference p‖ ≤ r0) → + (∀ m, WeightedBound U s m (C m) H) → + ∀ (T : ℝ → (E → F) → E → F), MeanBounds U s reference r1 L T B K → + ∀ η, 0 < η → η ≤ η0 → + ∀ j ≤ n, ContDiffOn ℝ ∞ (trial H T η j) U ∧ + InTrialBall U reference r1 (trial H T η j) ∧ + (∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L C B K j m * η ^ (j + 1)) + (trial H T η j + T η (trial H T η j) - H)) := by + obtain ⟨D, hD, hbD⟩ := finite_upper (fun j => B 0 (sizeBound L C B j L)) n + let η0 := min 1 ((r1 - r0) / (2 * D)) + have hη0 : 0 < η0 := lt_min (by norm_num) (div_pos (sub_pos.mpr hgap) (by linarith)) + refine ⟨η0, hη0, min_le_left _ _, ?_⟩ + intro U hU s hs reference H hH hH0 hbH T hT η hη hsmall + have hη1 : η ≤ 1 := hsmall.trans (min_le_left _ _) + have hηD : r0 + η * D < r1 := by + have hh : η ≤ (r1 - r0) / (2 * D) := hsmall.trans (min_le_right _ _) + have hh' := (le_div_iff₀ (by linarith : 0 < 2 * D)).mp hh + nlinarith + have hstates : ∀ j ≤ n + 1, + ContDiffOn ℝ ∞ (trial H T η j) U ∧ InTrialBall U reference r1 (trial H T η j) ∧ + ∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j) := by + intro j + induction j with + | zero => + intro hj + exact ⟨hH, fun p hp => (hH0 p hp).trans_lt hgap, hbH⟩ + | succ j ih => + intro hj + obtain ⟨hjS, hjBall, hjB⟩ := ih (by omega) + have hTS := hT.smooth η hη hη1 _ hjS hjBall + have hVal (m : ℕ) := hT.value η hη hη1 m (sizeBound L C B j (m + L)) + (trial H T η j) (sizeBound_ge_one hC hT.B_pos _ _) hjS hjBall (hjB (m + L)) + refine ⟨hH.sub hTS, ?_, ?_⟩ + · intro p hp + calc + ‖trial H T η (j + 1) p - reference p‖ = + ‖(H p - reference p) - T η (trial H T η j) p‖ := by + congr 1 + dsimp [trial] + abel + _ ≤ ‖H p - reference p‖ + ‖T η (trial H T η j) p‖ := norm_sub_le _ _ + _ ≤ r0 + η * D := by + apply add_le_add (hH0 p hp) + exact ((hVal 0).norm_le hp).trans (mul_le_mul_of_nonneg_left (by simpa using hbD j (by omega)) hη.le) + _ < r1 := hηD + · intro m + have hh := (hbH m).sub hU hs hH hTS (hVal m) + apply hh.mono_const + dsimp only [sizeBound] + have hp : 0 ≤ B m (sizeBound L C B j (m + L)) := + le_trans zero_le_one (hT.B_pos m _ (sizeBound_ge_one hC hT.B_pos j (m + L))) + nlinarith + have hdiff : ∀ j ≤ n, ∀ m, + WeightedBound U s m (differenceBound L C B K j m * η ^ (j + 1)) + (trial H T η (j + 1) - trial H T η j) := by + intro j + induction j with + | zero => + intro hj m + have hBall : InTrialBall U reference r1 H := fun p hp => (hH0 p hp).trans_lt hgap + have hTS := hT.smooth η hη hη1 H hH hBall + have hh := (hT.value η hη hη1 m (C (m + L)) H (hC _) hH hBall (hbH _)).neg hU hTS + have he : trial H T η (0 + 1) - trial H T η 0 = -(T η H) := by + funext p; simp only [trial, Pi.sub_apply, Pi.neg_apply]; abel + rw [he] + have hh' : WeightedBound U s m (η * B m (C (m + L))) (-(T η H)) := + hh.congr (by intro p hp; rfl) + convert hh' using 1 + try rfl + dsimp only [differenceBound] + simp only [Nat.zero_add, pow_one] + ring + | succ j ih => + intro hj m + obtain ⟨hf, hfBall, hbf⟩ := hstates (j + 1) (by omega) + obtain ⟨hg, hgBall, hbg⟩ := hstates j (by omega) + let C' := max (sizeBound L C B (j + 1) (m + L)) (sizeBound L C B j (m + L)) + have hC' : 1 ≤ C' := (sizeBound_ge_one hC hT.B_pos _ _).trans (le_max_left _ _) + have hD' : 0 ≤ differenceBound L C B K j (m + L) * η ^ (j + 1) := + mul_nonneg (differenceBound_nonneg hC hT.B_pos hT.K_pos _ _) (pow_nonneg hη.le _) + have hh := hT.difference η hη hη1 m C' _ _ _ hC' hD' hf hg hfBall hgBall + ((hbf (m + L)).mono_const (le_max_left _ _)) + ((hbg (m + L)).mono_const (le_max_right _ _)) (ih (by omega) (m + L)) + have hTF := hT.smooth η hη hη1 _ hf hfBall + have hTG := hT.smooth η hη hη1 _ hg hgBall + have hn := hh.neg hU (hTF.sub hTG) + rw [show j + 1 + 1 = j + 2 by omega, trial_difference] + convert hn using 1 + try rfl + dsimp only [differenceBound, C'] + rw [pow_succ] + ring + intro j hj + obtain ⟨hjS, hjBall, hjB⟩ := hstates j (by omega) + refine ⟨hjS, hjBall, hjB, ?_⟩ + intro m + rw [trial_residual] + have hnext := (hstates (j + 1) (by omega)).1 + exact (hdiff j hj m).neg hU (hnext.sub hjS) + +theorem finite_substitution_uniform {U : Set E} (hU : UniqueDiffOn ℝ U) {s : ℝ} (hs : 0 ≤ s) + {reference H : E → F} {r0 r1 : ℝ} (hgap : r0 < r1) {L : ℕ} + {B K : ℕ → ℝ → ℝ} + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) (hH : ContDiffOn ℝ ∞ H U) + (hH0 : ∀ p ∈ U, ‖H p - reference p‖ ≤ r0) + (hbH : ∀ m, WeightedBound U s m (C m) H) (n : ℕ) : + ∃ η0 : ℝ, 0 < η0 ∧ η0 ≤ 1 ∧ + ∀ (T : ℝ → (E → F) → E → F), MeanBounds U s reference r1 L T B K → + ∀ η, 0 < η → η ≤ η0 → + ∀ j ≤ n, ContDiffOn ℝ ∞ (trial H T η j) U ∧ + InTrialBall U reference r1 (trial H T η j) ∧ + (∀ m, WeightedBound U s m (sizeBound L C B j m) (trial H T η j)) ∧ + (∀ m, WeightedBound U s m (differenceBound L C B K j m * η ^ (j + 1)) + (trial H T η j + T η (trial H T η j) - H)) := by + obtain ⟨η0,hη0,hη1,ht⟩ := finite_substitution_uniform_inputs (E := E) (F := F) + (B := B) (K := K) hgap hC n + exact ⟨η0,hη0,hη1,ht U hU s hs reference H hH hH0 hbH⟩ + +end ClosedSurfaceR4.FiniteMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFreeModeConstants.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFreeModeConstants.lean new file mode 100644 index 0000000000000000000000000000000000000000..eecfb27e7a47f4cf3659ef643a5b950b6abc5e46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformFreeModeConstants.lean @@ -0,0 +1,87 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedFreeOrderBounds +import OAI.Geometry.SurfaceImmersion.Correction.SupportedFreeLinearity + +namespace OAI + +/-! Explicit free-mode constants, independent of both short scales and +of the perturbation size. These constants are used before selecting scales. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +def freeModeBudget (n L : ℕ) (B D : ℕ → ℝ) (q 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 (fullErrorConstant n r (B r)) (D r * initialConstant n (r + L) (B (r + L)))) + i (m + (L + 1))) + amplitudeConstant n m (B m) + +lemma freeModeBudget_nonneg (n L : ℕ) (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (q m : ℕ) : + 0 ≤ freeModeBudget n L B D q m := by + apply add_nonneg _ (amplitudeConstant_nonneg _ _ (hB m)) + apply Finset.sum_nonneg + intro i _ + apply mul_nonneg (initialConstant_nonneg _ _ (hB m)) + exact FiniteParametrix.boundProfile_nonneg + (fun r => (errorConstant_nonneg _ (hB r)).trans (le_max_left _ _)) + (fun r => (fullErrorConstant_nonneg _ _ (hB r)).trans (le_max_left _ _)) _ _ + +theorem freeModeBudget_bound {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) + (q m : ℕ) (V : SupportedField (F := Ambient n) K) (hV : FreeCoefficient G U V) : + supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) ≤ + (τ / s + ε / τ ^ p) * freeModeBudget n L B D q m * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + rw [perturbedFreeLM_apply] + exact perturbedFreeMode_near_seed_order τ hG h K hKU hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR V hV.perpX hV.perpY hV.perpSecond q m + + +theorem freeModeBudget_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) + (q m : ℕ) (V : SupportedField (F := Ambient n) K) (hV : FreeCoefficient G U V) : + supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V) ≤ + (1 + freeModeBudget n L B D q m) * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + have hh := freeModeBudget_bound hG h K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q m V hV + have hn : 0 ≤ freeModeBudget n L B D q m * + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := + mul_nonneg (freeModeBudget_nonneg n L B D hB q m) (apply_nonneg _ _) + have he : supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) ≤ + freeModeBudget n L B D q m * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := by + apply hh.trans + simpa only [mul_assoc, one_mul] using mul_le_mul_of_nonneg_right hsmall hn + have hmono := supportedWeightedSeminorm_mono s + (show m ≤ m + (q + 1) * (L + 1) by omega) V + calc + _ = supportedWeightedSeminorm K s m ((perturbedFreeLM τ hG h K hKU R q V - V) + V) := by + rw [sub_add_cancel] + _ ≤ supportedWeightedSeminorm K s m (perturbedFreeLM τ hG h K hKU R q V - V) + + supportedWeightedSeminorm K s m V := map_add_le_add _ _ _ + _ ≤ freeModeBudget n L B D q m * supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V + + supportedWeightedSeminorm K s (m + (q + 1) * (L + 1)) V := add_le_add he hmono + _ = _ := by ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricAtlasMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricAtlasMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..50b803ce8a7718596a7a1e93bfb5f7dd8e3646d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricAtlasMean.lean @@ -0,0 +1,84 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformGeometricMeanFamily +import OAI.Geometry.SurfaceImmersion.Correction.UniformAtlasMean + +namespace OAI + +/-! Global charted mean data constructed from fixed unit-scale geometry. +The global trial radius is selected after the atlas amplification bound. -/ +noncomputable section +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle PhaseMean WeightedEstimates FiniteMean +open JetPolynomial (Base) +open JetPolynomial.Perturbation + +local instance geometricAtlasFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance geometricAtlasFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance geometricAtlasDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance geometricAtlasDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance geometricAtlasSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance geometricAtlasSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_geometric_atlas_mean + {n : A.centers → ℕ} {P : (i : A.centers) → Fin 3 → Fin (n i) → JetPolynomial.Expression} + {G : A.centers → Base → JetPolynomial.Space} {hG : ∀ i, ContDiff ℝ ∞ (G i)} + {φ : A.centers → Fin 3 → Base → ℝ} {K : A.centers → Fin 3 → TopologicalSpace.Compacts Base} + (c₀ : ∀ i j, PolynomialSolveData (P i) 0 (G i) (hG i) (φ i j) (K i j) 1 1) + {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))) + (d₀ : ∀ i j, ChartedMeanData (c₀ i j) r₁ ρ R (A.tensorPlaneRead i reference)) (q : ℕ) : + let L := Finset.univ.sup (fun i : A.centers => tensorOrder (P i)+1+(q+1)*(tensorOrder (P i)+1)) + let loss := Finset.univ.sup (fun i : A.centers => tensorLoss (P i)) + ∃ r D₀ : ℝ, 0 < r ∧ 1 ≤ D₀ ∧ D₀*r ≤ r₁ ∧ + ∃ p : ∀ i, Fin 3 → ChartedMeanProfile (P i), ∃ β κ : ℕ → ℝ → ℝ, + (∀ f : Base → A.centers → TensorFiber, 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))) ∧ + ∀ (ε τ : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ loss ≤ 1 → + ∃ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s (D₀*r) ρ R (A.tensorPlaneRead i reference), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = G i ∧ (d i).phase = φ i ∧ (d i).support = K i ∧ + (∀ j, ((d i).solver j).e = (c₀ i j).e) ∧ + (∀ j x, ((d i).data j).cutoff x = (d₀ i j).cutoff x) ∧ + (∀ j, ((d i).data j).form = (d₀ i j).form)) ∧ + ∀ δ : ℝ, 0 < δ → MeanBounds univ s (A.tensorEncode reference) r L + (rescaledMean (τ / s + ε / τ ^ loss) + (A.tensorMeanOperator (A.atlasMean (fun i => (d i).mean hρ δ q)))) β κ := by + classical + choose p hp using fun i => unit_mean_family_uniform (c₀ i) (d₀ i) + obtain ⟨D₀,hD₀,hall⟩ := A.uniform_atlas_mean_majorants_all_radii (R := R) p hρ reference href q + have hDpos : 0 < D₀ := zero_lt_one.trans_le hD₀ + let r := r₁/(2*D₀) + have hr : 0 < r := div_pos hr₁ (mul_pos (by norm_num) hDpos) + have hDr : D₀*r = r₁/2 := by + dsimp [r] + field_simp + have hsmallr : D₀*r ≤ r₁ := by rw [hDr]; linarith + obtain ⟨hball,β,κ,hm⟩ := hall r hr.le + refine ⟨r,D₀,hr,hD₀,hsmallr,p,β,κ,hball,?_⟩ + intro ε τ s hτ hs hτs hs1 hε hε1 hsmall + choose d hd hmap hphase hsupport he hcut hform using fun i => + hp i ε τ s (D₀*r) hsmallr hτ hs hτs hs1 hε hε1 + refine ⟨d,hd,?_,?_⟩ + · exact fun i => ⟨hmap i,hphase i,hsupport i,he i,hcut i,hform i⟩ + · exact fun δ hδ => hm d hd hτ hs hτs hs1 hε hε1 hsmall δ hδ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..f146636d135dee60b4780ee5e1ea0a175d6cbd74 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanData.lean @@ -0,0 +1,148 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanProfile +import OAI.Geometry.SurfaceImmersion.Correction.CompactMeanBudgets +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds + +namespace OAI + +/-! A single geometric mean datum at unit slow scale supplies one fixed +profile and actual mean data at all admissible smaller scales. -/ +noncomputable section +open TopologicalSpace Set +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseMean +open RealModes + +theorem LocalBounds.atScale {U V : Set SmallModes.Base} {s r ρ R : ℝ} + {reference : SmallModes.Base → Tensor} {F : RField 4} {ψ : SmallModes.Base → ℝ} + {Q : SmallModes.Base → Tensor →L[ℝ] ℝ} {χ e : SmallModes.Base → SmallModes.Base} + (h : LocalBounds U V s r ρ R reference F ψ Q χ e) (t : ℝ) : + LocalBounds U V t r ρ R reference F ψ Q χ e where + openU := h.openU + smoothF := h.smoothF + domain := h.domain + smoothPsi := h.smoothPsi + smoothQ := h.smoothQ + smoothChi := h.smoothChi + smoothInv := h.smoothInv + chiInto := h.chiInto + invInto := h.invInto + smoothPullback := h.smoothPullback + margin := h.margin + +theorem LocalBounds.atRadius {U V : Set SmallModes.Base} {s r r' ρ R : ℝ} + {reference : SmallModes.Base → Tensor} {F : RField 4} {ψ : SmallModes.Base → ℝ} + {Q : SmallModes.Base → Tensor →L[ℝ] ℝ} {χ e : SmallModes.Base → SmallModes.Base} + (h : LocalBounds U V s r ρ R reference F ψ Q χ e) (hr : r' ≤ r) : + LocalBounds U V s r' ρ R reference F ψ Q χ e := by + refine { h with margin := ?_ } + intro x hx + have hm := h.margin x hx + have hn : ‖Q x‖*r' ≤ ‖Q x‖*r := mul_le_mul_of_nonneg_left hr (norm_nonneg _) + constructor <;> linarith + +end ClosedSurfaceR4.PhaseMean + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem unit_mean_data_uniform_family {n : ℕ} {P : Fin 3 → Fin n → Expression} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} {K : Compacts Base} + (c₀ : PolynomialSolveData P 0 G hG φ K 1 1) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d₀ : ChartedMeanData c₀ r ρ R reference) : + ∃ p : ChartedMeanProfile P, ∀ (ε τ : ℝ) (s : ℝ≥0) (r' : ℝ), r' ≤ r → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + ∃ c : PolynomialSolveData P ε G hG φ K τ s, + ∃ d : ChartedMeanData c r' ρ R reference, + p.Fits d ∧ c.e = c₀.e ∧ (∀ x, d.cutoff x = d₀.cutoff x) ∧ d.form = d₀.form := by + let I : ℕ → ℝ := fun m => d₀.budgets.inv (m+1) + have hI (m : ℕ) : 1 ≤ I m := d₀.budgets.inv_pos (m+1) + have hIb (m j : ℕ) (hj : 1 ≤ j) (hjm : j ≤ m+1) (x : SmallModes.Base) (hx : x ∈ c₀.e.target) : + ‖iteratedFDerivWithin ℝ j c₀.e.symm c₀.e.target x‖ ≤ I m := + d₀.budgets.inv_bound (m+1) j hj hjm x hx + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds c₀.openU c₀.openO d₀.compact d₀.subsetDomain + P c₀.smoothP K c₀.supportU c₀.e c₀.smoothForward c₀.smoothInverse c₀.supportChart + d₀.B d₀.F c₀.J I d₀.oneLEB d₀.nonnegF c₀.oneLEJ hI c₀.coordinates hIb + let p : ChartedMeanProfile P := { + U := c₀.U + O := c₀.O + Q := d₀.compactJets + V := c₀.e.target + openU := c₀.openU + openO := c₀.openO + openV := c₀.e.open_target + compact := d₀.compact + subsetDomain := d₀.subsetDomain + smoothP := c₀.smoothP + C := c₀.C + D := D + J := c₀.J + inv := d₀.budgets.inv + forms := d₀.budgets.forms + psi := d₀.budgets.psi + normal := d₀.budgets.normal + B := d₀.B + F := d₀.F + nonnegC := c₀.nonnegC + oneLEJ := c₀.oneLEJ + oneLEInv := d₀.budgets.inv_pos + oneLEForms := d₀.budgets.forms_pos + oneLEPsi := d₀.budgets.psi_pos + oneLENormal := d₀.budgets.normal_pos + oneLEB := d₀.oneLEB + nonnegF := d₀.nonnegF + } + refine ⟨p,?_⟩ + intro ε τ s r' hr hτ hs hτs hs1 hε hε1 + have hBj (m : ℕ) := (d₀.jetsBound m).shrink_scale s.coe_nonneg hs1 + have hFj (m : ℕ) (v : Fin 2) := (d₀.phaseBound m v).shrink_scale s.coe_nonneg hs1 + let c : PolynomialSolveData P ε G hG φ K τ s := { + 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 := D + J := c₀.J + nonnegC := c₀.nonnegC + nonnegD := hD + oneLEJ := c₀.oneLEJ + coordinates := c₀.coordinates + coefficients := fun m => reconstruction_shrink_scale (c₀.coefficients m) s.coe_nonneg hs1 + polynomial := hd G φ hG c₀.smoothPhase d₀.mapsJets s τ ε hτ hs hτs hs1 hε hε1 hBj hFj + } + let d : ChartedMeanData c r' ρ R reference := { + cutoff := d₀.cutoff + form := d₀.form + localBounds := (d₀.localBounds.atScale s).atRadius hr + budgets := d₀.budgets.atScale s s.coe_nonneg hs1 + compactJets := d₀.compactJets + compact := d₀.compact + subsetDomain := d₀.subsetDomain + mapsJets := d₀.mapsJets + B := d₀.B + F := d₀.F + oneLEB := d₀.oneLEB + nonnegF := d₀.nonnegF + jetsBound := hBj + phaseBound := hFj + } + refine ⟨c,d,?_,rfl,(fun _ => rfl),rfl⟩ + exact ⟨rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..c39452197f47e44a5433fafb76cee500bf9dc309 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformGeometricMeanFamily.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformGeometricMeanData +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData + +namespace OAI + +/-! Build a uniformly profiled three-phase family from fixed geometric +unit-scale data, also allowing a smaller trial radius. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean + +theorem unit_mean_family_uniform {n : ℕ} {P : Fin 3 → Fin n → Expression} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Fin 3 → Base → ℝ} + {K : Fin 3 → Compacts Base} (c₀ : ∀ j, PolynomialSolveData P 0 G hG (φ j) (K j) 1 1) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d₀ : ∀ j, ChartedMeanData (c₀ j) r ρ R reference) : + ∃ p : Fin 3 → ChartedMeanProfile P, ∀ (ε τ : ℝ) (s : ℝ≥0) (r' : ℝ), r' ≤ r → + 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → ε ≤ 1 → + ∃ d : ChartedMeanFamilyData P ε τ s r' ρ R reference, + d.Fits p ∧ d.G = G ∧ d.phase = φ ∧ d.support = K ∧ + (∀ j, (d.solver j).e = (c₀ j).e) ∧ + (∀ j x, (d.data j).cutoff x = (d₀ j).cutoff x) ∧ + (∀ j, (d.data j).form = (d₀ j).form) := by + choose p hp using fun j => unit_mean_data_uniform_family (c₀ j) (d₀ j) + refine ⟨p,?_⟩ + intro ε τ s r' hr hτ hs hτs hs1 hε hε1 + choose c d hfit he hcut hform using fun j => hp j ε τ s r' hr hτ hs hτs hs1 hε hε1 + refine ⟨{ + G := G + smoothG := hG + phase := φ + support := K + solver := c + data := d + },hfit,rfl,rfl,rfl,he,hcut,hform⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformInputAtlasMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformInputAtlasMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..b4ce63e6fe97d0b50f3c6b63f7a491f525815b62 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformInputAtlasMeanData.lean @@ -0,0 +1,202 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanFamily +import OAI.Geometry.SurfaceImmersion.Atlas.AtlasPhaseStability +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! Fixed atlas mean profiles from the global norms of the actual input map. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold Topology NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The fixed local geometry determines all mean profiles and one global C2 +radius before the nearby map, the scales, and the smaller trial radius. -/ +theorem uniform_input_atlas_mean_data_all_profiles + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (ξ : A.centers → Fin 3 → SmallModes.Base) (hξ : ∀ i j, ξ i j ≠ 0) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) (ξ i j)) + (S : A.centers → Fin 3 → Compacts JetPolynomial.Base) + (hS : ∀ i j, (modeSupport (S i j) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) (hSU₀ : ∀ i j, (S i j : Set JetPolynomial.Base) ⊆ U₀ i) + (φ : A.centers → Fin 3 → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (hphase : ∀ i j, coordinatePhase (φ i j) = phaseLinear (ξ i j)) + (ψ : ∀ i j, SupportedField (F := ℝ) + (JetPolynomial.chartSupport (linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) + (modeSupport (S i j)) (hS i j))) + (Q : A.centers → Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → ρ + ‖Q i j‖*r ≤ Q i j (reference i x) ∧ + Q i j (reference i x) ≤ R - ‖Q i j‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (P : ℕ → ℝ), (∀ m, 0 ≤ P m) → + ∃ p : A.centers → Fin 3 → ChartedMeanProfile emptyMetricPolynomial, + ∀ (G : M → Space) (_hG : 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 (P m) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ∀ i, ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = φ i) ∧ (∀ i, (d i).support = S i) ∧ + (∀ i j, ((d i).solver j).e = + linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) ∧ + (∀ i j x, ((d i).data j).cutoff x = ψ i j x) ∧ + (∀ i j, ((d i).data j).form = fun _ => Q i j) := by + classical + let e := fun i j => linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j) + let KV : A.centers → Fin 3 → Compacts SmallModes.Base := fun i j => + ⟨(phaseEquiv (ξ i j) (hξ i j)) '' K i j, + (hK i j).image (phaseEquiv (ξ i j) (hξ i j)).continuous⟩ + have htarget (i j) : (e i j).target ⊆ KV i j := image_mono (hUK i j) + choose E hE he using fun (i : A.centers) (j : Fin 3) (m : ℕ) => + A.phaseChart_twoJet_bound i (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2 + (KV i j) (e i j).open_target (htarget i j) m + choose V hV hv using fun (i : A.centers) (m : ℕ) => + A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + choose V₀ hV₀ hv₀ using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i 2 + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + choose a ha hall using fun i : A.centers => uniform_linear_charted_mean_family_all_profiles + (A.jetChartMap_smooth i hF) (Ω i) (U i) (K i) (hΩ i) (hU i) (hK i) (hUK i) (hKΩ i) + (ξ i) (hξ i) + (by simpa only [A.jetChartMap_plane] using hImm i) + (by simpa only [A.jetChartMap_plane] using hgood i) + (S i) (hS i) (hU₀ i) (K₀ i) (hU₀K i) (hSU₀ i) (φ i) (hφ i) (hphase i) + (ψ i) (Q i) (hmargin i) + have hL₀ (i) : 0 ≤ L * V₀ i := mul_nonneg (norm_nonneg _) (hV₀ i) + obtain ⟨ρ₀,hρ₀,_,hρa⟩ := finite_positive_threshold + (fun i : A.centers => a i / (1 + L * V₀ i)) + (fun i => div_pos (ha i) (by linarith [hL₀ i])) + refine ⟨ρ₀,hρ₀,?_⟩ + intro P hP + let H : A.centers → Fin 3 → ℕ → ℝ := fun i j m => 1 + E i j m * P m + let Pjet : A.centers → ℕ → ℝ := fun i m => L * V i m * P m + have hH (i j m) : 1 ≤ H i j m := + le_add_of_nonneg_right (mul_nonneg (zero_le_one.trans (hE i j m)) (hP m)) + have hPjet (i m) : 0 ≤ Pjet i m := + mul_nonneg (mul_nonneg (norm_nonneg _) (hV i m)) (hP m) + choose p _ _ _ hdata using fun i => hall i (H i) (Pjet i) (hH i) (hPjet i) + refine ⟨p,?_⟩ + intro G hG B hB hBρ hclose s hs hs1 hp τ r' hr + have hsmall (i) : L * V₀ i * B < a i := by + have hh := (lt_div_iff₀ (show 0 < 1 + L * V₀ i by linarith [hL₀ i])).mp + (hBρ.trans_le (hρa i)) + nlinarith + have hlocalClose (i) : WeightedEstimates.WeightedBound univ 1 2 (L * V₀ i * B) + ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) - + (A.jetChartMap i F ∘ planeCoordinateIsometry.symm)) := by + have hh := (hv₀ i (G-F) 1 B zero_lt_one le_rfl hB (hG.sub hF) hclose).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn + spaceCoordinates.toContinuousLinearMap + simp only [ContinuousLinearEquiv.coe_coe] at hh + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hh + have hsub : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [hsub] at hh + simpa only [A.jetChartMap_plane,L,mul_assoc] using hh + have hlocalJets (i j m) : WeightedEstimates.WeightedBound (e i j).target s m (H i j m) + (realTwoJet ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) ∘ (e i j).symm)) := by + have hh := he i j m G s (P m) hs hs1 (hP m) hG (hp m) + apply (show WeightedEstimates.WeightedBound (e i j).target s m (E i j m * P m) + (realTwoJet ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) ∘ (e i j).symm)) from + by simpa only [A.jetChartMap_plane] using hh).mono_const + exact le_add_of_nonneg_left zero_le_one + have hprefix (i m j) (hj : j ≤ m+2) : WeightedEstimates.WeightedBound (U₀ i) 1 j + (Pjet i m / (s : ℝ)^(j-2)) (A.jetChartMap i G) := by + have hread := (hv i m G s (P m) hs hs1 (hP m) hG (hp m) j (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hcoordinate := weightedBound_comp_isometry planeCoordinateIsometry + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) hread + 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 + rw [heq] at hcoordinate + have hjet : WeightedEstimates.WeightedBound univ 1 j + (Pjet i m / (s : ℝ)^(j-2)) (A.jetChartMap i G) := by + simpa only [Pjet,L,mul_div_assoc,mul_assoc] using hcoordinate + exact hjet.restrict_open (hU₀ i) + choose d hfit hmap hphase' hsupp he' hcut hform using fun i : A.centers => + hdata i (A.jetChartMap i G) (A.jetChartMap_smooth i hG) (L * V₀ i * B) + (mul_nonneg (hL₀ i) hB) (hsmall i) (hlocalClose i) s hs hs1 (hlocalJets i) + (hprefix i) τ r' hr + exact ⟨d,hfit,hmap,hphase',hsupp,he',hcut,hform⟩ + +/-- The fixed local geometry determines all mean profiles and one global C2 +radius before the nearby map, the scales, and the smaller trial radius. -/ +theorem uniform_input_atlas_mean_data + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (ξ : A.centers → Fin 3 → SmallModes.Base) (hξ : ∀ i j, ξ i j ≠ 0) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) (ξ i j)) + (S : A.centers → Fin 3 → Compacts JetPolynomial.Base) + (hS : ∀ i j, (modeSupport (S i j) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) (hSU₀ : ∀ i j, (S i j : Set JetPolynomial.Base) ⊆ U₀ i) + (φ : A.centers → Fin 3 → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (hphase : ∀ i j, coordinatePhase (φ i j) = phaseLinear (ξ i j)) + (ψ : ∀ i j, SupportedField (F := ℝ) + (JetPolynomial.chartSupport (linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) + (modeSupport (S i j)) (hS i j))) + (Q : A.centers → Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → ρ + ‖Q i j‖*r ≤ Q i j (reference i x) ∧ + Q i j (reference i x) ≤ R - ‖Q i j‖*r) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) : + ∃ (ρ₀ : ℝ) (p : A.centers → Fin 3 → ChartedMeanProfile emptyMetricPolynomial), + 0 < ρ₀ ∧ ∀ (G : M → Space) (_hG : 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 (P m) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ∀ i, ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = φ i) ∧ (∀ i, (d i).support = S i) ∧ + (∀ i j, ((d i).solver j).e = + linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) ∧ + (∀ i j x, ((d i).data j).cutoff x = ψ i j x) ∧ + (∀ i j, ((d i).data j).form = fun _ => Q i j) := by + obtain ⟨ρ₀,hρ₀,hall⟩ := A.uniform_input_atlas_mean_data_all_profiles F hF Ω U K hΩ hU hK + hUK hKΩ ξ hξ hImm hgood S hS U₀ hU₀ K₀ hU₀K hSU₀ φ hφ hphase ψ Q reference hmargin + obtain ⟨p,hdata⟩ := hall P hP + exact ⟨ρ₀,p,hρ₀,hdata⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..43a19e83a9f2f3aca8ebd28d948ae71b986b20d1 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanData.lean @@ -0,0 +1,258 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformLinearPhaseBudgets +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetCompactRange +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanProfile +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedGeometricSolver + +namespace OAI + +/-! Actual charted mean data with one profile for a nearby family. The +positional jet is read on a fixed bounded original-coordinate domain. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseMean PhaseGeometry + +@[simp] lemma tensorOrder_emptyMetricPolynomial : tensorOrder emptyMetricPolynomial = 0 := by + simp [tensorOrder,order,emptyMetricPolynomial] + +/-- A bounded original-coordinate domain and explicit weighted jet profiles +give one charted-mean profile before the nearby map and both scales. -/ +theorem uniform_linear_charted_mean_data_all_profiles + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set SmallModes.Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) ξ) + (S : Compacts Base) (hS : (modeSupport S : Set SmallModes.Base) ⊆ U) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : (S : Set Base) ⊆ U₀) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (hphase : coordinatePhase φ = phaseLinear ξ) + (ψ : SupportedField (F := ℝ) + (chartSupport (linearPhaseChart ξ hξ U hU) (modeSupport S) hS)) + (Q : Tensor →L[ℝ] ℝ) {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (hmargin : ∀ x ∈ U, ρ + ‖Q‖*r ≤ Q (reference x) ∧ + Q (reference x) ≤ R - ‖Q‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H Pjet : ℕ → ℝ), + (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ Pjet m) → + ∃ p : ChartedMeanProfile emptyMetricPolynomial, + p.U = U₀ ∧ p.O = univ ∧ (∀ m, p.D m = 0) ∧ + ∀ (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, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (H m) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart ξ hξ U hU).symm))) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ)^(j-2)) G) → + ∀ τ : ℝ, ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ S τ s, + ∃ d : ChartedMeanData c r ρ R reference, + p.Fits d ∧ c.e = linearPhaseChart ξ hξ U hU ∧ + (∀ x, d.cutoff x = ψ x) ∧ d.form = fun _ => Q := by + classical + have hFc : ContDiff ℝ ∞ (F ∘ planeCoordinateIsometry.symm) := + hF.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨ρ₀,hρ₀,hall⟩ := uniform_linear_phase_budgets_all_profiles hFc hΩ hU hK hUK hKΩ + hξ hImm hgood ψ.contDiff Q + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + obtain ⟨b,hb⟩ := hall H hH + choose D hD hd using fun m => bounded_lowJet_prefix hU₀ K₀ hU₀K m + obtain ⟨Qjet,hQjet,hQrange⟩ := bounded_lowJet_range hU₀ K₀ hU₀K (hPjet 0) + have hφderiv (v : Fin 2) : ContDiff ℝ ∞ (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose A hA ha using fun (m : ℕ) (v : Fin 2) => compact_local_weighted_bound + hU₀ isOpen_univ K₀.isCompact hU₀K (subset_univ _) (hφderiv v).contDiffOn m + let B : ℕ → ℝ := fun m => D m + Pjet m + let Ph : ℕ → ℝ := fun m => ∑ v : Fin 2, A m v + have hB (m : ℕ) : 1 ≤ B m := (hD m).trans (le_add_of_nonneg_right (hPjet m)) + have hPh (m : ℕ) : 0 ≤ Ph m := + Finset.sum_nonneg (fun v _ => zero_le_one.trans (hA m v)) + have hP : ∀ k l, (emptyMetricPolynomial k l).SmoothCoeffs univ := + fun _ l => Fin.elim0 l + let e := linearPhaseChart ξ hξ U hU + have he := linearPhaseChart_smooth ξ hξ U hU + let p : ChartedMeanProfile emptyMetricPolynomial := { + U := U₀ + O := univ + Q := Qjet + V := e.target + openU := hU₀ + openO := isOpen_univ + openV := e.open_target + compact := hQjet + subsetDomain := subset_univ _ + smoothP := hP + C := fun m => b.mode (m+1) + D := fun _ => 0 + J := b.chi + inv := b.inv + forms := b.forms + psi := b.psi + normal := b.normal + B := B + F := Ph + nonnegC := fun m => zero_le_one.trans (b.mode_pos (m+1)) + oneLEJ := b.chi_pos + oneLEInv := b.inv_pos + oneLEForms := b.forms_pos + oneLEPsi := b.psi_pos + oneLENormal := b.normal_pos + oneLEB := hB + nonnegF := hPh + } + refine ⟨p,rfl,rfl,(fun _ => rfl),?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ + have hGc : ContDiff ℝ ∞ (G ∘ planeCoordinateIsometry.symm) := + hG.comp planeCoordinateIsometry.symm.contDiff + obtain ⟨hdom,d₀,hprofiles⟩ := hb (G ∘ planeCoordinateIsometry.symm) hGc C₀ + hC₀ hCρ hclose s hs hs1 hjet + have hmode : d₀.mode = b.mode := congrArg BudgetProfiles.mode hprofiles + have hchi : d₀.chi = b.chi := congrArg BudgetProfiles.chi hprofiles + have hinv : d₀.inv = b.inv := congrArg BudgetProfiles.inv hprofiles + have hforms : d₀.forms = b.forms := congrArg BudgetProfiles.forms hprofiles + have hpsi : d₀.psi = b.psi := congrArg BudgetProfiles.psi hprofiles + have hnormal : d₀.normal = b.normal := congrArg BudgetProfiles.normal hprofiles + have hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) := + hGc.comp he.2 + let c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ S τ s := { + U := U₀ + O := univ + openU := hU₀ + openO := isOpen_univ + smoothP := hP + mapsG := mapsTo_univ _ _ + supportU := hSU₀ + smoothPhase := hφ + e := e + smoothForward := he.1.contDiffOn + smoothInverse := he.2.contDiffOn + supportChart := hS + phase := by + intro x _ + rw [hphase] + exact linearPhaseChart_phase ξ hξ U hU x + smoothMap := hmap + domain := hdom.complexDomain hmap + C := fun m => b.mode (m+1) + D := fun _ => 0 + J := b.chi + nonnegC := fun m => zero_le_one.trans (b.mode_pos (m+1)) + nonnegD := fun _ => le_rfl + oneLEJ := b.chi_pos + coordinates := by + intro m j hj hjm x hx + have hxU : x ∈ U := by simpa only [e,linearPhaseChart_source] using hx + simpa only [e,linearPhaseChart_source,hchi] using d₀.chi_bound m j hj hjm x hxU + coefficients := by + intro m + simpa only [e,hmode,Function.comp_def] using d₀.mode_bound (m+1) + polynomial := by + intro m Z + have hsS : (modeSupport S : Set SmallModes.Base) ⊆ e.source := hS + have hz := phaseChartPolynomialOperator_zero isOpen_univ hU₀ emptyMetricPolynomial hP hG + (mapsTo_univ _ _) S hSU₀ hφ τ e he.1.contDiffOn he.2.contDiffOn hsS + rw [hz] + simp + } + have hpull : ContDiffOn ℝ ∞ (pullbackField e) U := by + have hh : pullbackField e = fun _ => pullback (phaseEquiv ξ hξ).toContinuousLinearMap := + funext (pullbackField_linearPhaseChart hξ hU) + rw [hh] + exact contDiffOn_const + let loc : LocalBounds U e.target s r ρ R reference c.realMap ψ (fun _ => Q) e e.symm := { + openU := hU + smoothF := hmap + domain := hdom + smoothPsi := ψ.contDiff.contDiffOn + smoothQ := contDiffOn_const + smoothChi := he.1.contDiffOn + smoothInv := he.2.contDiffOn + chiInto := fun x hx => e.map_source hx + invInto := fun x hx => e.map_target hx + smoothPullback := hpull + margin := fun x hx => hmargin _ (e.map_target hx) + } + have hjetRange : MapsTo (lowJet G) U₀ Qjet := by + apply hQrange G hG + simpa only [Nat.sub_self,pow_zero,div_one] using hpref 0 2 (by omega) + let d : ChartedMeanData c r ρ R reference := { + cutoff := ψ + form := fun _ => Q + localBounds := loc + budgets := d₀ + compactJets := Qjet + compact := hQjet + subsetDomain := subset_univ _ + mapsJets := hjetRange + B := B + F := Ph + oneLEB := hB + nonnegF := hPh + jetsBound := by + intro m + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero] using + hd m G hG s (Pjet m) hs hs1 (hPjet m) (hpref m) + phaseBound := by + intro m v + have hv : A m v ≤ Ph m := Finset.single_le_sum + (fun w _ => zero_le_one.trans (hA m w)) (Finset.mem_univ v) + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero] using + (ha m v s s.coe_nonneg hs1).mono_const hv + } + refine ⟨c,d,?_,rfl,(fun _ => rfl),rfl⟩ + exact ⟨rfl,rfl,rfl,rfl,rfl,hinv,hforms,hpsi,hnormal,rfl,rfl,rfl⟩ + +/-- A bounded original-coordinate domain and explicit weighted jet profiles +give one charted-mean profile before the nearby map and both scales. -/ +theorem uniform_linear_charted_mean_data + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set SmallModes.Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) + {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) ξ) + (S : Compacts Base) (hS : (modeSupport S : Set SmallModes.Base) ⊆ U) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : (S : Set Base) ⊆ U₀) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (hphase : coordinatePhase φ = phaseLinear ξ) + (ψ : SupportedField (F := ℝ) + (chartSupport (linearPhaseChart ξ hξ U hU) (modeSupport S) hS)) + (Q : Tensor →L[ℝ] ℝ) {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (hmargin : ∀ x ∈ U, ρ + ‖Q‖*r ≤ Q (reference x) ∧ + Q (reference x) ≤ R - ‖Q‖*r) + (H Pjet : ℕ → ℝ) (hH : ∀ m, 1 ≤ H m) (hPjet : ∀ m, 0 ≤ Pjet m) : + ∃ (ρ₀ : ℝ) (p : ChartedMeanProfile emptyMetricPolynomial), + 0 < ρ₀ ∧ p.U = U₀ ∧ p.O = univ ∧ (∀ m, p.D m = 0) ∧ + ∀ (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, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (H m) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart ξ hξ U hU).symm))) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ)^(j-2)) G) → + ∀ τ : ℝ, ∃ c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ S τ s, + ∃ d : ChartedMeanData c r ρ R reference, + p.Fits d ∧ c.e = linearPhaseChart ξ hξ U hU ∧ + (∀ x, d.cutoff x = ψ x) ∧ d.form = fun _ => Q := by + obtain ⟨ρ₀,hρ₀,hall⟩ := uniform_linear_charted_mean_data_all_profiles hF hΩ hU hK hUK hKΩ + hξ hImm hgood S hS hU₀ K₀ hU₀K hSU₀ hφ hphase ψ Q hmargin + obtain ⟨p,hU,hO,hD,hdata⟩ := hall H Pjet hH hPjet + exact ⟨ρ₀,p,hρ₀,hU,hO,hD,hdata⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..bfad20a5beaf353a2a8ffaacdbbed9a09ad7a4b0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearChartedMeanFamily.lean @@ -0,0 +1,181 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanData +import OAI.Geometry.SurfaceImmersion.Correction.UniformGeometricMeanData +import OAI.Geometry.SurfaceImmersion.Correction.ChartedMeanFamilyData + +namespace OAI + +/-! A uniformly profiled three-phase mean family for nearby immersions. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseMean PhaseGeometry + +def ChartedMeanData.atRadius {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {s : ℝ≥0} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {S : Compacts Base} + {c : PolynomialSolveData P ε G hG φ S τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanData c r ρ R reference) (r' : ℝ) (hr : r' ≤ r) : + ChartedMeanData c r' ρ R reference where + cutoff := d.cutoff + form := d.form + localBounds := d.localBounds.atRadius hr + budgets := d.budgets + compactJets := d.compactJets + compact := d.compact + subsetDomain := d.subsetDomain + mapsJets := d.mapsJets + B := d.B + F := d.F + oneLEB := d.oneLEB + nonnegF := d.nonnegF + jetsBound := d.jetsBound + phaseBound := d.phaseBound + +theorem ChartedMeanProfile.Fits.atRadius {n : ℕ} {P : Fin 3 → Fin n → Expression} + {ε τ : ℝ} {s : ℝ≥0} {G : Base → Space} {hG : ContDiff ℝ ∞ G} + {φ : Base → ℝ} {S : Compacts Base} + {c : PolynomialSolveData P ε G hG φ S τ s} + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + {p : ChartedMeanProfile P} {d : ChartedMeanData c r ρ R reference} + (h : p.Fits d) (r' : ℝ) (hr : r' ≤ r) : p.Fits (d.atRadius r' hr) := by + exact ⟨h.domain,h.coefficients,h.perturbation,h.coordinates,h.target,h.inverse, + h.forms,h.cutoff,h.normal,h.jets,h.phase,h.range⟩ + +/-- Three local linear phases have one common perturbation radius and fixed +mean profiles. The maps, slow scale, frequency and smaller trial radius are +supplied only after those profiles have been chosen. -/ +theorem uniform_linear_charted_mean_family_all_profiles + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + (Ω U K : Fin 3 → Set SmallModes.Base) + (hΩ : ∀ j, IsOpen (Ω j)) (hU : ∀ j, IsOpen (U j)) + (hK : ∀ j, IsCompact (K j)) + (hUK : ∀ j, U j ⊆ K j) (hKΩ : ∀ j, K j ⊆ Ω j) + (ξ : Fin 3 → SmallModes.Base) (hξ : ∀ j, ξ j ≠ 0) + (hImm : ∀ j x, x ∈ Ω j → Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ j x, x ∈ Ω j → + Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) (ξ j)) + (S : Fin 3 → Compacts Base) + (hS : ∀ j, (modeSupport (S j) : Set SmallModes.Base) ⊆ U j) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : ∀ j, (S j : Set Base) ⊆ U₀) + (φ : Fin 3 → Base → ℝ) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hphase : ∀ j, coordinatePhase (φ j) = phaseLinear (ξ j)) + (ψ : ∀ j, SupportedField (F := ℝ) + (chartSupport (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) + (modeSupport (S j)) (hS j))) + (Q : Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + {reference : SmallModes.Base → Tensor} + (hmargin : ∀ j x, x ∈ U j → ρ + ‖Q j‖*r ≤ Q j (reference x) ∧ + Q j (reference x) ≤ R - ‖Q j‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H : Fin 3 → ℕ → ℝ) (Pjet : ℕ → ℝ), + (∀ j m, 1 ≤ H j m) → (∀ m, 0 ≤ Pjet m) → + ∃ p : Fin 3 → ChartedMeanProfile emptyMetricPolynomial, + (∀ j, (p j).U = U₀) ∧ (∀ j, (p j).O = univ) ∧ + (∀ j m, (p j).D m = 0) ∧ + ∀ (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 → + (∀ j m, WeightedBound (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).target + s m (H j m) (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).symm))) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ)^(j-2)) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R reference, + d.Fits p ∧ d.G = G ∧ d.phase = φ ∧ d.support = S ∧ + (∀ j, (d.solver j).e = linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) ∧ + (∀ j x, (d.data j).cutoff x = ψ j x) ∧ + (∀ j, (d.data j).form = fun _ => Q j) := by + classical + choose a ha hall using fun j => uniform_linear_charted_mean_data_all_profiles + hF (hΩ j) (hU j) (hK j) (hUK j) (hKΩ j) (hξ j) (hImm j) (hgood j) + (S j) (hS j) hU₀ K₀ hU₀K (hSU₀ j) (hφ j) (hphase j) (ψ j) (Q j) + (hmargin j) + let ρ₀ := min (a 0) (min (a 1) (a 2)) + have hρ₀ : 0 < ρ₀ := lt_min (ha 0) (lt_min (ha 1) (ha 2)) + have hρa (j : Fin 3) : ρ₀ ≤ a 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 _ _) + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + choose p hpU hpO hpD hdata using fun j => hall j (H j) Pjet (hH j) hPjet + refine ⟨p,hpU,hpO,hpD,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ r' hr + choose c d hfit he hcut hform using fun j => hdata j G hG C₀ hC₀ + (hCρ.trans_le (hρa j)) hclose s hs hs1 (hjet j) hpref τ + refine ⟨{ + G := G + smoothG := hG + phase := φ + support := S + solver := c + data := fun j => (d j).atRadius r' hr + },?_,rfl,rfl,rfl,he,hcut,hform⟩ + exact fun j => (hfit j).atRadius r' hr + +/-- Three local linear phases have one common perturbation radius and fixed +mean profiles. The maps, slow scale, frequency and smaller trial radius are +supplied only after those profiles have been chosen. -/ +theorem uniform_linear_charted_mean_family + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + (Ω U K : Fin 3 → Set SmallModes.Base) + (hΩ : ∀ j, IsOpen (Ω j)) (hU : ∀ j, IsOpen (U j)) + (hK : ∀ j, IsCompact (K j)) + (hUK : ∀ j, U j ⊆ K j) (hKΩ : ∀ j, K j ⊆ Ω j) + (ξ : Fin 3 → SmallModes.Base) (hξ : ∀ j, ξ j ≠ 0) + (hImm : ∀ j x, x ∈ Ω j → Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ j x, x ∈ Ω j → + Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) (ξ j)) + (S : Fin 3 → Compacts Base) + (hS : ∀ j, (modeSupport (S j) : Set SmallModes.Base) ⊆ U j) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : ∀ j, (S j : Set Base) ⊆ U₀) + (φ : Fin 3 → Base → ℝ) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hphase : ∀ j, coordinatePhase (φ j) = phaseLinear (ξ j)) + (ψ : ∀ j, SupportedField (F := ℝ) + (chartSupport (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) + (modeSupport (S j)) (hS j))) + (Q : Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + {reference : SmallModes.Base → Tensor} + (hmargin : ∀ j x, x ∈ U j → ρ + ‖Q j‖*r ≤ Q j (reference x) ∧ + Q j (reference x) ≤ R - ‖Q j‖*r) + (H : Fin 3 → ℕ → ℝ) (Pjet : ℕ → ℝ) + (hH : ∀ j m, 1 ≤ H j m) (hPjet : ∀ m, 0 ≤ Pjet m) : + ∃ (ρ₀ : ℝ) (p : Fin 3 → ChartedMeanProfile emptyMetricPolynomial), + 0 < ρ₀ ∧ (∀ j, (p j).U = U₀) ∧ (∀ j, (p j).O = univ) ∧ + (∀ j m, (p j).D m = 0) ∧ + ∀ (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 → + (∀ j m, WeightedBound (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).target + s m (H j m) (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).symm))) → + (∀ m j, j ≤ m+2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ)^(j-2)) G) → + ∀ (τ r' : ℝ), r' ≤ r → + ∃ d : ChartedMeanFamilyData emptyMetricPolynomial 0 τ s r' ρ R reference, + d.Fits p ∧ d.G = G ∧ d.phase = φ ∧ d.support = S ∧ + (∀ j, (d.solver j).e = linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) ∧ + (∀ j x, (d.data j).cutoff x = ψ j x) ∧ + (∀ j, (d.data j).form = fun _ => Q j) := by + obtain ⟨ρ₀,hρ₀,hall⟩ := uniform_linear_charted_mean_family_all_profiles hF Ω U K hΩ hU hK + hUK hKΩ ξ hξ hImm hgood S hS hU₀ K₀ hU₀K hSU₀ φ hφ hphase ψ Q hmargin + obtain ⟨p,hU,hO,hD,hdata⟩ := hall H Pjet hH hPjet + exact ⟨ρ₀,p,hρ₀,hU,hO,hD,hdata⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..742b2e4a81406399c19040e7ea8ddd686289af24 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanData.lean @@ -0,0 +1,155 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PerturbedMeanTransfer +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanData + +namespace OAI + +/-! Uniform perturbed mean data in a fixed linear phase chart. Bounds for +transporting the polynomial may be chosen independently of the numerical +profiles retained by the geometric solver. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseMean PhaseGeometry + +/-- Independent fixed chart bounds control polynomial transport without +changing the geometric solver or the profile fitted by its mean data. -/ +theorem uniform_perturbed_mean_transfer_with_chart_profiles {n : ℕ} + (p₀ : ChartedMeanProfile emptyMetricPolynomial) + (P : Fin 3 → Fin n → Expression) {O : Set LowJet} (hO : IsOpen O) + (hP : ∀ k j, (P k j).SmoothCoeffs O) (hQO : p₀.Q ⊆ O) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ p₀.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) + (J I : ℕ → ℝ) (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 → + ∀ (c₀ : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s), + c₀.e = e → ∀ {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d₀ : ChartedMeanData c₀ r ρ R reference), p₀.Fits d₀ → + ∃ c : PolynomialSolveData P ε G hG φ K τ s, + ∃ d : ChartedMeanData c r ρ R reference, + (p₀.withPolynomial P hO hP hQO D).Fits d ∧ c.e = e ∧ + (∀ x, d.cutoff x = d₀.cutoff x) ∧ d.form = d₀.form := by + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds + p₀.openU hO p₀.compact hQO P hP K hKU e he hi hKe + (fun m => p₀.B (m + tensorOrder P)) (fun m => p₀.F (m + tensorOrder P)) + J I (fun m => p₀.oneLEB (m + tensorOrder P)) + (fun m => p₀.nonnegF (m + tensorOrder P)) hJ hI hebound hibound + refine ⟨D,hD,?_⟩ + intro G hG φ τ ε s hτ hs hτs hs1 hε hε1 c₀ he₀ r ρ R reference d₀ hf + subst e + have hGQ : Set.MapsTo (lowJet G) p₀.U p₀.Q := by + simpa only [hf.domain,hf.range] using d₀.mapsJets + have hGb (m : ℕ) : WeightedBound p₀.U s (m + tensorOrder P) + (p₀.B (m + tensorOrder P)) (lowJet G) := by + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero,hf.domain,hf.jets] using + d₀.jetsBound (m + tensorOrder P) + have hφb (m : ℕ) (v : Fin 2) : WeightedBound p₀.U s (m + tensorOrder P) + (p₀.F (m + tensorOrder P)) (fun x => fderiv ℝ φ x (coordinateVector v)) := by + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero,hf.domain,hf.phase] using + d₀.phaseBound (m + tensorOrder P) v + have hGO : Set.MapsTo (lowJet G) c₀.U O := by + intro x hx + exact hQO (hGQ (by simpa only [hf.domain] using hx)) + have 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 := by + simpa only [← hf.domain] using + hd G φ hG c₀.smoothPhase hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb + let c := c₀.withPolynomial P ε hO hP hGO D hD hpoly + let d := d₀.withPolynomial P ε hO hP hGO D hD hpoly + (fun _ hx => hQO (by simpa only [hf.range] using hx)) + exact ⟨c,d,hf.withPolynomial P ε hO hP hGO D hD hpoly hQO,rfl, + (fun _ => rfl),rfl⟩ + +/-- A fixed globally smooth polynomial and linear-phase geometry give one +perturbed mean profile before every nearby map and both scales. -/ +theorem uniform_linear_perturbed_mean_data_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set SmallModes.Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) ξ) + (S : Compacts Base) (hS : (modeSupport S : Set SmallModes.Base) ⊆ U) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : (S : Set Base) ⊆ U₀) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (hphase : coordinatePhase φ = phaseLinear ξ) + (ψ : SupportedField (F := ℝ) + (chartSupport (linearPhaseChart ξ hξ U hU) (modeSupport S) hS)) + (Q : Tensor →L[ℝ] ℝ) {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (hmargin : ∀ x ∈ U, ρ + ‖Q‖ * r ≤ Q (reference x) ∧ + Q (reference x) ≤ R - ‖Q‖ * r) : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H Pjet : ℕ → ℝ), + (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ Pjet m) → + ∃ p : ChartedMeanProfile P, + p.U = U₀ ∧ p.O = univ ∧ (∀ m, 0 ≤ p.D 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, WeightedBound (linearPhaseChart ξ hξ U hU).target s m (H m) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart ξ hξ U hU).symm))) → + (∀ m j, j ≤ m + 2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ) ^ (j - 2)) G) → + ∀ τ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + ∃ c : PolynomialSolveData P ε G hG φ S τ s, + ∃ d : ChartedMeanData c r ρ R reference, + p.Fits d ∧ c.e = linearPhaseChart ξ hξ U hU ∧ + (∀ x, d.cutoff x = ψ x) ∧ d.form = fun _ => Q := by + classical + obtain ⟨ρ₀,hρ₀,hbase⟩ := uniform_linear_charted_mean_data_all_profiles + hF hΩ hU hK hUK hKΩ hξ hImm hgood S hS hU₀ K₀ hU₀K hSU₀ hφ hphase ψ Q hmargin + let e := linearPhaseChart ξ hξ U hU + have hsm := linearPhaseChart_smooth ξ hξ U hU + have hsource : e.source ⊆ K := hUK + let KV := (phaseEquiv ξ hξ) '' K + have hKV : IsCompact KV := hK.image (phaseEquiv ξ hξ).continuous + have htarget : e.target ⊆ KV := image_mono hUK + choose J hJ hj using fun m => compact_local_weighted_bound e.open_source isOpen_univ + hK hsource (subset_univ K) hsm.1.contDiffOn m + choose I hI hi using fun m => compact_local_weighted_bound e.open_target isOpen_univ + hKV htarget (subset_univ KV) hsm.2.contDiffOn (m + 1) + have hJb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m) + (x : SmallModes.Base) (hx : x ∈ e.source) : + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m := by + simpa only [one_pow,one_mul] using hj m 1 zero_le_one le_rfl j hjm x hx + have hIb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m + 1) + (x : SmallModes.Base) (hx : x ∈ e.target) : + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I m := by + simpa only [one_pow,one_mul] using hi m 1 zero_le_one le_rfl j hjm x hx + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + obtain ⟨p₀,hpU,_hpO,_hpD,hdata⟩ := hbase H Pjet hH hPjet + have hSp : (S : Set Base) ⊆ p₀.U := by simpa only [hpU] using hSU₀ + obtain ⟨D,hD,ht⟩ := uniform_perturbed_mean_transfer_with_chart_profiles + p₀ P isOpen_univ hP (subset_univ _) S hSp e hsm.1.contDiffOn hsm.2.contDiffOn + hS J I hJ hI hJb hIb + let p := p₀.withPolynomial P isOpen_univ hP (subset_univ _) D + refine ⟨p,hpU,rfl,hD,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ ε hτ hτs hε hε1 + obtain ⟨c₀,d₀,hfit,hce,hcut,hform⟩ := hdata G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ + obtain ⟨c,d,hfit',hce',hcut',hform'⟩ := + ht G hG φ τ ε s hτ hs hτs hs1 hε hε1 c₀ hce d₀ hfit + exact ⟨c,d,hfit',hce',(fun x => (hcut' x).trans (hcut x)),hform'.trans hform⟩ + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..443e6fd28b0b2dce91dc44f6c01eb190b21e04c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPerturbedMeanFamily.lean @@ -0,0 +1,92 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearPerturbedMeanData +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanFamily + +namespace OAI + +/-! A three-phase perturbed mean family with a common geometric radius. +The radius precedes all derivative profiles, and the actual family retains +the fixed phase charts, cutoffs and coefficient forms. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseMean PhaseGeometry + +theorem uniform_linear_perturbed_mean_family_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + (Ω U K : Fin 3 → Set SmallModes.Base) + (hΩ : ∀ j, IsOpen (Ω j)) (hU : ∀ j, IsOpen (U j)) + (hK : ∀ j, IsCompact (K j)) (hUK : ∀ j, U j ⊆ K j) (hKΩ : ∀ j, K j ⊆ Ω j) + (ξ : Fin 3 → SmallModes.Base) (hξ : ∀ j, ξ j ≠ 0) + (hImm : ∀ j x, x ∈ Ω j → Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ j x, x ∈ Ω j → + Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) (ξ j)) + (S : Fin 3 → Compacts Base) + (hS : ∀ j, (modeSupport (S j) : Set SmallModes.Base) ⊆ U j) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : ∀ j, (S j : Set Base) ⊆ U₀) + (φ : Fin 3 → Base → ℝ) (hφ : ∀ j, ContDiff ℝ ∞ (φ j)) + (hphase : ∀ j, coordinatePhase (φ j) = phaseLinear (ξ j)) + (ψ : ∀ j, SupportedField (F := ℝ) + (chartSupport (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) + (modeSupport (S j)) (hS j))) + (Q : Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + {reference : SmallModes.Base → Tensor} + (hmargin : ∀ j x, x ∈ U j → ρ + ‖Q j‖ * r ≤ Q j (reference x) ∧ + Q j (reference x) ≤ R - ‖Q j‖ * r) : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H : Fin 3 → ℕ → ℝ) (Pjet : ℕ → ℝ), + (∀ j m, 1 ≤ H j m) → (∀ m, 0 ≤ Pjet m) → + ∃ p : Fin 3 → ChartedMeanProfile P, + (∀ j, (p j).U = U₀) ∧ (∀ j, (p j).O = univ) ∧ + (∀ j m, 0 ≤ (p j).D 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 → + (∀ j m, WeightedBound (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).target + s m (H j m) (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart (ξ j) (hξ j) (U j) (hU j)).symm))) → + (∀ m j, j ≤ m + 2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ) ^ (j - 2)) G) → + ∀ (τ ε r' : ℝ), r' ≤ r → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + ∃ d : ChartedMeanFamilyData P ε τ s r' ρ R reference, + d.Fits p ∧ d.G = G ∧ d.phase = φ ∧ d.support = S ∧ + (∀ j, (d.solver j).e = linearPhaseChart (ξ j) (hξ j) (U j) (hU j)) ∧ + (∀ j x, (d.data j).cutoff x = ψ j x) ∧ + (∀ j, (d.data j).form = fun _ => Q j) := by + classical + choose a ha hall using fun j => uniform_linear_perturbed_mean_data_all_profiles + P hP hF (hΩ j) (hU j) (hK j) (hUK j) (hKΩ j) (hξ j) (hImm j) (hgood j) + (S j) (hS j) hU₀ K₀ hU₀K (hSU₀ j) (hφ j) (hphase j) (ψ j) (Q j) (hmargin j) + let ρ₀ := min (a 0) (min (a 1) (a 2)) + have hρ₀ : 0 < ρ₀ := lt_min (ha 0) (lt_min (ha 1) (ha 2)) + have hρa (j : Fin 3) : ρ₀ ≤ a 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 _ _) + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + choose p hpU hpO hpD hdata using fun j => hall j (H j) Pjet (hH j) hPjet + refine ⟨p,hpU,hpO,hpD,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ ε r' hr hτ hτs hε hε1 + choose c d hfit he hcut hform using fun j => hdata j G hG C₀ hC₀ + (hCρ.trans_le (hρa j)) hclose s hs hs1 (hjet j) hpref τ ε hτ hτs hε hε1 + refine ⟨{ + G := G + smoothG := hG + phase := φ + support := S + solver := c + data := fun j => (d j).atRadius r' hr + },?_,rfl,rfl,rfl,he,hcut,hform⟩ + exact fun j => (hfit j).atRadius r' hr + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPolynomialSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPolynomialSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..201b27006001d64018f836086ed7fdfac1925bf7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformLinearPolynomialSolver.lean @@ -0,0 +1,164 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseChartSolver +import OAI.Geometry.SurfaceImmersion.Atlas.LinearPhaseChart +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetCompactRange +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds + +namespace OAI + +/-! Actual polynomial solvers for a fixed linear phase, with all profiles +chosen before the nearby map and scales. No mean target or cutoff enters +the construction. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates RealModes PhaseGeometry + +theorem uniform_linear_polynomial_solver_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : Base → Space} (hF : ContDiff ℝ ∞ F) + {Ω U K : Set SmallModes.Base} (hΩ : IsOpen Ω) (hU : IsOpen U) (hK : IsCompact K) + (hUK : U ⊆ K) (hKΩ : K ⊆ Ω) {ξ : SmallModes.Base} (hξ : ξ ≠ 0) + (hImm : ∀ x ∈ Ω, Function.Injective + (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ Ω, Good (realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) ξ) + (S : Compacts Base) (hS : (modeSupport S : Set SmallModes.Base) ⊆ U) + {U₀ : Set Base} (hU₀ : IsOpen U₀) (K₀ : Compacts Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : (S : Set Base) ⊆ U₀) + {φ : Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (hphase : coordinatePhase φ = phaseLinear ξ) : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H Pjet : ℕ → ℝ), + (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ Pjet m) → + ∃ (Qjet : Set LowJet) (C D J I : ℕ → ℝ), IsCompact Qjet ∧ + (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ + (∀ m, 1 ≤ J m) ∧ (∀ m, 1 ≤ I 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, WeightedBound (linearPhaseChart ξ hξ U hU).target s (m + 1) (H (m + 1)) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + (linearPhaseChart ξ hξ U hU).symm))) → + (∀ m j, j ≤ m + 2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ) ^ (j - 2)) G) → + ∀ τ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + MapsTo (lowJet G) U₀ Qjet ∧ + ∃ c : PolynomialSolveData P ε G hG φ S τ s, + c.U = U₀ ∧ c.O = univ ∧ c.e = linearPhaseChart ξ hξ U hU ∧ + c.C = C ∧ c.D = D ∧ c.J = J ∧ + ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I m := by + classical + let e := linearPhaseChart ξ hξ U hU + have hsm := linearPhaseChart_smooth ξ hξ U hU + let KV := (phaseEquiv ξ hξ) '' K + have hKV : IsCompact KV := hK.image (phaseEquiv ξ hξ).continuous + let g : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ) := { + chart := e + phase := by + intro x + rw [hphase] + exact linearPhaseChart_phase ξ hξ U hU x + smooth := hsm.1 + smoothInverse := hsm.2 + sourceCompact := ⟨K,hK⟩ + targetCompact := ⟨KV,hKV⟩ + domain := (phaseEquiv ξ hξ) '' Ω + sourceBound := hUK + targetBound := image_mono hUK + targetInside := image_mono hKΩ + good := realModeDomain_phase (hF.comp planeCoordinateIsometry.symm.contDiff) + hΩ hξ hImm hgood + } + obtain ⟨ρ₀,R,N,hρ₀,hR,_hN,hnear⟩ := + g.uniform_mode_bounds (hF.comp planeCoordinateIsometry.symm.contDiff) + choose J hJ hj using fun m => compact_local_weighted_bound e.open_source isOpen_univ + hK hUK (subset_univ K) hsm.1.contDiffOn m + choose I hI hi using fun m => compact_local_weighted_bound e.open_target isOpen_univ + hKV (image_mono hUK) (subset_univ KV) hsm.2.contDiffOn (m + 1) + have hJb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m) + (x : SmallModes.Base) (hx : x ∈ e.source) : + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m := by + simpa only [one_pow,one_mul] using hj m 1 zero_le_one le_rfl j hjm x hx + have hIb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m + 1) + (x : SmallModes.Base) (hx : x ∈ e.target) : + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I m := by + simpa only [one_pow,one_mul] using hi m 1 zero_le_one le_rfl j hjm x hx + have hφd (v : Fin 2) : ContDiff ℝ ∞ (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose Fp hFp hf using fun m v => compact_local_weighted_bound hU₀ isOpen_univ + K₀.isCompact hU₀K (subset_univ _) (hφd v).contDiffOn (m + tensorOrder P) + let Ph : ℕ → ℝ := fun m => ∑ v : Fin 2, Fp m v + have hPh (m : ℕ) : 0 ≤ Ph m := + Finset.sum_nonneg (fun v _ => zero_le_one.trans (hFp m v)) + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + 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 ⟨Qjet,hQjet,hQrange⟩ := bounded_lowJet_range hU₀ K₀ hU₀K (hPjet 0) + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds hU₀ isOpen_univ hQjet + (subset_univ _) P hP S hSU₀ e hsm.1.contDiffOn hsm.2.contDiffOn hS + B Ph J I hB hPh hJ hI hJb hIb + let C : ℕ → ℝ := fun m => ((m + 1).factorial : ℝ) * R (m + 1) * H (m + 1) ^ (m + 1) + have hC (m : ℕ) : 0 ≤ C m := mul_nonneg + (mul_nonneg (Nat.cast_nonneg _) (zero_le_one.trans (hR _))) + (pow_nonneg (zero_le_one.trans (hH _)) _) + refine ⟨Qjet,C,D,J,I,hQjet,hC,hD,hJ,hI,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ ε hτ hτs hε hε1 + have hGQ : MapsTo (lowJet G) U₀ Qjet := by + apply hQrange G hG + simpa only [Nat.sub_self,pow_zero,div_one] using hpref 0 2 (by omega) + have hGb (m : ℕ) : WeightedBound U₀ s (m + tensorOrder P) (B m) (lowJet G) := + hb m G hG s (Pjet (m + tensorOrder P)) hs hs1 (hPjet _) (hpref _) + have hφb (m : ℕ) (v : Fin 2) : WeightedBound U₀ s (m + tensorOrder P) (Ph m) + (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hf m v s s.coe_nonneg hs1).mono_const (Finset.single_le_sum + (fun w _ => zero_le_one.trans (hFp m w)) (Finset.mem_univ v)) + obtain ⟨hdom,hbounds⟩ := hnear (G ∘ planeCoordinateIsometry.symm) + (hG.comp planeCoordinateIsometry.symm.contDiff) C₀ hC₀ hCρ hclose + have hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) := + (hG.comp planeCoordinateIsometry.symm.contDiff).comp hsm.2 + let c : PolynomialSolveData P ε G hG φ S τ s := { + U := U₀ + O := univ + openU := hU₀ + openO := isOpen_univ + smoothP := hP + mapsG := mapsTo_univ _ _ + supportU := hSU₀ + smoothPhase := hφ + e := e + smoothForward := hsm.1.contDiffOn + smoothInverse := hsm.2.contDiffOn + supportChart := hS + phase := by + intro x _ + rw [hphase] + exact linearPhaseChart_phase ξ hξ U hU x + smoothMap := hmap + domain := by simpa only [g,Function.comp_def] using hdom.complexDomain hmap + C := C + D := D + J := J + nonnegC := hC + nonnegD := hD + oneLEJ := hJ + coordinates := hJb + coefficients := by + intro m + simpa only [C,g,Function.comp_def] using + (hbounds (m + 1) s (H (m + 1)) hs (hH _) (hjet m)).1 + polynomial := hd G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb + } + refine ⟨hGQ,c,rfl,rfl,rfl,rfl,rfl,rfl,?_⟩ + intro m j hj hjm x hx + exact hIb m j hj (hjm.trans (Nat.le_succ m)) x hx + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..1a51718f2403478dcb5f8d7e1467523d8299cd77 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMean.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformFreeModeConstants +import OAI.Geometry.SurfaceImmersion.Correction.SupportedMeanError +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledGradientEstimates + +namespace OAI + +/-! The metric mean budget is fixed before either scale is selected. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +def freeMeanBudget (n L : ℕ) (B D : ℕ → ℝ) (q m : ℕ) : ℝ := + let A := freeModeBudget n L B D q (m + 1) + (n : ℝ) * 2 ^ m * ((1 + 2 * A) * (2 + 2 * A) + (1 + 2 * A)) + +lemma freeMeanBudget_nonneg (n L : ℕ) (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (q m : ℕ) : + 0 ≤ freeMeanBudget n L B D q m := by + have hA := freeModeBudget_nonneg n L B D hB q (m + 1) + unfold freeMeanBudget + positivity + +theorem freeMeanBudget_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 ≤ ε) + (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) (q m : ℕ) : + let N := m + 1 + (q + 1) * (L + 1) + let η := τ / s + ε / τ ^ p + let T := perturbedFreeLM τ hG h K hKU R q + ∀ (V W : SupportedField (F := Ambient n) K), + FreeCoefficient G U V → FreeCoefficient G U W → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m + (freeMeanBudget n L B D q m * supportedWeightedSeminorm K s N V * supportedWeightedSeminorm K s N W * η / τ ^ 2) + (seedMeanError τ T V W v w) := by + dsimp only + let A := freeModeBudget n L B D q (m + 1) + have hA : 0 ≤ A := freeModeBudget_nonneg n L B D hB q (m + 1) + let η := τ / s + ε / τ ^ p + let N := m + 1 + (q + 1) * (L + 1) + let T := perturbedFreeLM τ hG h K hKU R q + have hη : 0 ≤ η := add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hratio : τ / s ≤ η := le_add_of_nonneg_right (div_nonneg hε (pow_nonneg hτ.le _)) + have hw (V : SupportedField (F := Ambient n) K) (hV : FreeCoefficient G U V) : + WeightedBound Set.univ s (m + 1) ((1 + A) * supportedWeightedSeminorm K s N V) (T V) ∧ + WeightedBound Set.univ s m (η * (A * supportedWeightedSeminorm K s N V)) (fun x => T V x - V x) ∧ + WeightedBound Set.univ s m (supportedWeightedSeminorm K s N V) V := by + have he := freeModeBudget_bound hG h K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q (m + 1) V hV + have hz := freeModeBudget_size hG h K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q (m + 1) V hV + refine ⟨(weightedBound_of_supportedSeminorm s (m + 1) (T V)).mono_const hz, ?_, ?_⟩ + · have he' := ((weightedBound_of_supportedSeminorm s (m + 1) (T V - V)).mono_const he).mono_order + (show m ≤ m + 1 by omega) + convert he' using 1 + ring + · exact (weightedBound_of_supportedSeminorm s N V).mono_order (by dsimp [N]; omega) + intro V W hV hW v w hv hw' + obtain ⟨hZ, hE, hVb⟩ := hw V hV + obtain ⟨hZ', hE', hWb⟩ := hw W hW + have hVN : 0 ≤ supportedWeightedSeminorm K s N V := apply_nonneg _ _ + have hWN : 0 ≤ supportedWeightedSeminorm K s N W := apply_nonneg _ _ + have hm := weighted_mean_small_error isOpen_univ hτ hs hη hsmall hratio + (mul_nonneg (by linarith : 0 ≤ 1 + A) hVN) (mul_nonneg hA hVN) hVN + (mul_nonneg (by linarith : 0 ≤ 1 + A) hWN) (mul_nonneg hA hWN) hWN + (T V).contDiff.contDiffOn V.contDiff.contDiffOn (T W).contDiff.contDiffOn W.contDiff.contDiffOn + hZ hE hVb hZ' hE' hWb v w hv hw' + change WeightedBound Set.univ s m _ (seedMeanError τ T V W v w) at hm + convert hm using 1 + dsimp [freeMeanBudget, A] + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMeanDifference.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMeanDifference.lean new file mode 100644 index 0000000000000000000000000000000000000000..357a8b875f3f7b00c3b7a4f8db075df1400048b2 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformMetricMeanDifference.lean @@ -0,0 +1,63 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformMetricMean + +namespace OAI + +/-! Scale-independent constants for differences of the actual metric mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial WeightedEstimates + +variable {n : ℕ} {G : Field n} {U : Set Base} + +theorem freeMeanBudget_difference (τ : ℝ) (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) (q m : ℕ) : + let N := m + 1 + (q + 1) * (L + 1) + let η := τ / s + ε / τ ^ p + let T := perturbedFreeLM τ hG h K hKU R q + ∀ (V W : SupportedField (F := Ambient n) K), + FreeCoefficient G U V → FreeCoefficient G U W → + ∀ a d : ℝ, 0 ≤ a → 0 ≤ d → + supportedWeightedSeminorm K s N V ≤ a → supportedWeightedSeminorm K s N W ≤ a → + supportedWeightedSeminorm K s N (V - W) ≤ d → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m (2 * freeMeanBudget n L B D q m * a * d * η / τ ^ 2) + (fun x => seedMeanError τ T V V v w x - seedMeanError τ T W W v w x) := by + dsimp only + let C := freeMeanBudget n L B D q m + have hC : 0 ≤ C := freeMeanBudget_nonneg n L B D hB q m + have hcmean := freeMeanBudget_bound τ hG h K hKU hτ hs hτs hs1 hε hsmall B D hB hD hc R hR q m + intro V W hV hW a d ha hd hVa hWa hDiff v w hv hw + have hsub : FreeCoefficient G U (V - W : SupportedField (F := Ambient n) K) := hV.sub hW + have h1 := hcmean (V - W) V hsub hV v w hv hw + have h2 := hcmean W (V - W) hW hsub v w hv hw + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have h1' := h1.mono_const (show C * supportedWeightedSeminorm K s _ (V - W) * + supportedWeightedSeminorm K s _ V * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * d * a * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have h2' := h2.mono_const (show C * supportedWeightedSeminorm K s _ W * + supportedWeightedSeminorm K s _ (V - W) * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * a * d * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have hadd := h1'.add isOpen_univ.uniqueDiffOn hs.le + (seedMeanError_smooth τ _ (V - W) V v w).contDiffOn + (seedMeanError_smooth τ _ W (V - W) v w).contDiffOn h2' + have he := hadd.congr (fun x _ => seedMeanError_difference τ _ V W v w x) + convert he using 1 + ring + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformNormalizedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformNormalizedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..11d1ea6740bc1bca6c0a0c7de0ecf549e3a8331d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformNormalizedMean.lean @@ -0,0 +1,136 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformMetricMeanDifference +import OAI.Geometry.SurfaceImmersion.Geometry.NormalizedPerturbedDifference + +namespace OAI + +/-! Explicit constants for the normalized geometric metric mean, independent +of its oscillation and amplitude scales. -/ +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 normalizedMeanBudget (L : ℕ) (B D : ℕ → ℝ) (q m : ℕ) (N : ℝ) : ℝ := + freeMeanBudget 4 L B D q m * + (Real.sqrt 2 * 2 ^ (m + 1 + (q + 1) * (L + 1)) * N) ^ 2 + +lemma normalizedMeanBudget_nonneg (L : ℕ) (B D : ℕ → ℝ) + (hB : ∀ m, 0 ≤ B m) (q m : ℕ) (N : ℝ) : + 0 ≤ normalizedMeanBudget L B D q m N := + mul_nonneg (freeMeanBudget_nonneg 4 L B D hB q m) (sq_nonneg _) + +theorem normalizedMeanBudget_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 + 1 + (q + 1) * (L + 1)) N (freeNormal F)) : + ∀ b : SupportedField (F := ℝ) K, + supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) b ≤ A → + ∀ v w : Base, ‖v‖ ≤ 1 → ‖w‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * (normalizedMeanBudget L B D q m N * A ^ 2)) + (normalizedPerturbedMean δ τ hF h K hKU R q b v w) := by + let C := freeMeanBudget 4 L B D q m + have hC : 0 ≤ C := freeMeanBudget_nonneg 4 L B D hB q m + have hm := freeMeanBudget_bound τ (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 * A * N + have hS : 0 ≤ S := by dsimp [S]; positivity + intro b hb v w hv hw + let V := supportedFreeSeed δ τ hF h K hKU b + have hV := supportedFreeSeed_isFree δ τ hF h K hKU b + have hn := supportedFreeSeed_bound hF h K hKU b hδ.le hτ.le hs hA hN r hb hbN + have hh := hm V V hV hV v w hv hw + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + have hh' := hh.mono_const (show C * supportedWeightedSeminorm K s r V * + supportedWeightedSeminorm K s r V * (τ / s + ε / τ ^ p) / τ ^ 2 ≤ + C * (S * (δ * τ)) * (S * (δ * τ)) * (τ / s + ε / τ ^ p) / τ ^ 2 by + gcongr) + have hsm := seedMeanError_smooth τ + (perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) K hKU R q) V V v w + have hscaled := hh'.const_smul isOpen_univ.uniqueDiffOn hsm.contDiffOn (δ⁻¹ ^ 2) + change WeightedBound Set.univ s m _ (normalizedPerturbedMean δ τ hF h K hKU R q b v w) at hscaled + convert hscaled using 1 + rw [abs_of_nonneg (sq_nonneg δ⁻¹)] + dsimp [normalizedMeanBudget, C, S, r] + field_simp [hδ.ne', hτ.ne'] + + +theorem normalizedMeanBudget_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)) : + ∀ (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 (2 * normalizedMeanBudget L B D q m N * A * (τ / 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 + let C := 2 * freeMeanBudget 4 L B D q m + have hm := freeMeanBudget_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 + 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 δ⁻¹)] + dsimp [normalizedMeanBudget, C, S, r] + field_simp [hδ.ne', hτ.ne'] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPerturbedMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPerturbedMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..a7eb1a74b42b2eeafaca24176dfda85c0c9d8883 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPerturbedMean.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedUniformFiniteMean +import OAI.Geometry.SurfaceImmersion.Correction.UniformFiniteMean + +namespace OAI + +/-! The finite perturbed mean construction with its threshold fixed before +the slow scale and the target tensor. This ordering is needed when both vary +at successive stages of the primitive realization. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates FiniteMean + +theorem uniform_perturbed_mean {n : ℕ} {ι : Type*} [Fintype ι] + {P : Fin 3 → Fin n → Expression} (p : ι → ChartedMeanProfile P) + {ρ R r r₀ : ℝ} (hρ : 0 < ρ) (hgap : r₀ < r) (q steps : ℕ) + {C : ℕ → ℝ} (hC : ∀ m, 1 ≤ C m) : + let L := tensorOrder P + 1 + (q + 1) * (tensorOrder P + 1) + ∃ β κ : ℕ → ℝ → ℝ, ∃ η₀ : ℝ, 0 < η₀ ∧ η₀ ≤ 1 ∧ + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + ∀ (reference H : SmallModes.Base → Tensor), ContDiff ℝ ∞ H → + (∀ x, ‖H x - reference x‖ ≤ r₀) → + (∀ m, WeightedBound Set.univ s m (C m) H) → + ∀ {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : ι → Base → ℝ} + {K : ι → Compacts Base} {ε τ : ℝ} + {c : ∀ i, PolynomialSolveData P ε G hG (φ i) (K i) τ s} + (d : ∀ i, ChartedMeanData (c i) r ρ R reference), (∀ i, (p i).Fits (d i)) → + 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → τ / s + ε / τ ^ tensorLoss P ≤ η₀ → + (∀ A, ContDiff ℝ ∞ A → InTrialBall Set.univ reference r A → + chartedFamilyLeading d hρ A = A) → + ∀ δ : ℝ, 0 < δ → ∀ j ≤ steps, ∃ A : SmallModes.Base → Tensor, + ContDiff ℝ ∞ A ∧ InTrialBall Set.univ reference r A ∧ + (∀ m, WeightedBound Set.univ s m (sizeBound L C β j m) A) ∧ + (∀ m, WeightedBound Set.univ s m + (δ ^ 2 * (differenceBound L C β κ j m * + (τ / s + ε / τ ^ tensorLoss P) ^ (j + 1))) + (combinedQuadraticMean P ε G φ (fun i => (d i).freeAmplitude hρ δ q A) τ 0 - + δ ^ 2 • H)) := by + obtain ⟨β,κ,hm⟩ := uniform_charted_family_majorants (R := R) p hρ q + obtain ⟨η₀,hη₀,hη₁,ht⟩ := finite_substitution_uniform_inputs + (E := SmallModes.Base) (F := Tensor) (B := β) (K := κ) hgap hC steps + refine ⟨β,κ,η₀,hη₀,hη₁,?_⟩ + intro s hs hs1 reference H hH hH0 hbH G hG φ K ε τ c d hd + hτ hτs hε hε1 hsmall hdecomp δ hδ j hj + have hη : 0 < τ / s + ε / τ ^ tensorLoss P := + add_pos_of_pos_of_nonneg (div_pos hτ hs) (div_nonneg hε (pow_nonneg hτ.le _)) + obtain ⟨ha,hb,hc,he⟩ := ht Set.univ isOpen_univ.uniqueDiffOn s s.coe_nonneg + reference H hH.contDiffOn (fun x _ => hH0 x) hbH _ + (hm d hd hτ hs hτs hs1 hε hε1 (hsmall.trans hη₁) δ hδ) _ hη hsmall j hj + have ha' : ContDiff ℝ ∞ (fixedTrial H (chartedFamilyMean d hρ δ q) j) := + contDiffOn_univ.mp (by simpa only [trial_rescaledMean hη.ne'] using ha) + have hb' : InTrialBall Set.univ reference r (fixedTrial H (chartedFamilyMean d hρ δ q) j) := by + simpa only [trial_rescaledMean hη.ne'] using hb + refine ⟨fixedTrial H (chartedFamilyMean d hρ δ q) j,ha',hb',?_,?_⟩ + · simpa only [trial_rescaledMean hη.ne'] using hc + · intro m + apply charted_quadratic_mean_residual d hρ hδ.ne' hτ.ne' q ha' hH (hdecomp _ ha' hb') + simpa only [trial_rescaledMean hη.ne',rescaledMean_self hη.ne'] using he m + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialAtlasMeanData.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialAtlasMeanData.lean new file mode 100644 index 0000000000000000000000000000000000000000..0ade7b1c1174a3e59766214f2a32e2f0ccde84d5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialAtlasMeanData.lean @@ -0,0 +1,250 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearPerturbedMeanFamily +import OAI.Geometry.SurfaceImmersion.Correction.UniformInputAtlasMeanData +import OAI.Geometry.Immersion.ClosedSurface.PhaseWeights + +namespace OAI + +/-! Actual perturbed polynomial mean families on a fixed smoothing atlas. +The common geometric radius precedes the derivative profiles, the nearby +map, and both scales. -/ +noncomputable section +open Set Manifold TopologicalSpace +open scoped ContDiff Manifold Topology NNReal + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean PhaseGeometry WeightedEstimates RealModes +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- The fixed local geometry determines all mean profiles and one global C2 +radius before the nearby map, the scales, and the smaller trial radius. -/ +theorem uniform_polynomial_input_atlas_mean_data_all_profiles {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k j, (P i k j).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (ξ : A.centers → Fin 3 → SmallModes.Base) (hξ : ∀ i j, ξ i j ≠ 0) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) (ξ i j)) + (S : A.centers → Fin 3 → Compacts JetPolynomial.Base) + (hS : ∀ i j, (modeSupport (S i j) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) (hSU₀ : ∀ i j, (S i j : Set JetPolynomial.Base) ⊆ U₀ i) + (φ : A.centers → Fin 3 → JetPolynomial.Base → ℝ) + (hφ : ∀ i j, ContDiff ℝ ∞ (φ i j)) + (hphase : ∀ i j, coordinatePhase (φ i j) = phaseLinear (ξ i j)) + (ψ : ∀ i j, SupportedField (F := ℝ) + (JetPolynomial.chartSupport (linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) + (modeSupport (S i j)) (hS i j))) + (Q : A.centers → Fin 3 → Tensor →L[ℝ] ℝ) {r ρ R : ℝ} + (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → ρ + ‖Q i j‖*r ≤ Q i j (reference i x) ∧ + Q i j (reference i x) ≤ R - ‖Q i j‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (Pinput : ℕ → ℝ), (∀ m, 0 ≤ Pinput m) → + ∃ p : ∀ i : A.centers, Fin 3 → ChartedMeanProfile (P i), + ∀ (G : M → Space) (_hG : 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 (Pinput m) G) → + ∀ (τ ε r' : ℝ), r' ≤ r → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + ∃ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = φ i) ∧ (∀ i, (d i).support = S i) ∧ + (∀ i j, ((d i).solver j).e = + linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j)) ∧ + (∀ i j x, ((d i).data j).cutoff x = ψ i j x) ∧ + (∀ i j, ((d i).data j).form = fun _ => Q i j) := by + classical + let e := fun i j => linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j) + let KV : A.centers → Fin 3 → Compacts SmallModes.Base := fun i j => + ⟨(phaseEquiv (ξ i j) (hξ i j)) '' K i j, + (hK i j).image (phaseEquiv (ξ i j) (hξ i j)).continuous⟩ + have htarget (i j) : (e i j).target ⊆ KV i j := image_mono (hUK i j) + choose E hE he using fun (i : A.centers) (j : Fin 3) (m : ℕ) => + A.phaseChart_twoJet_bound i (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2 + (KV i j) (e i j).open_target (htarget i j) m + choose V hV hv using fun (i : A.centers) (m : ℕ) => + A.vectorPlaneRead_prefix_bounds (V := Space) i 2 m + choose V₀ hV₀ hv₀ using fun i : A.centers => A.vectorPlaneRead_bound (V := Space) i 2 + let L : ℝ := ‖spaceCoordinates.toContinuousLinearMap‖ + choose a ha hall using fun i : A.centers => uniform_linear_perturbed_mean_family_all_profiles + (P i) (hP i) (A.jetChartMap_smooth i hF) (Ω i) (U i) (K i) (hΩ i) (hU i) (hK i) (hUK i) (hKΩ i) + (ξ i) (hξ i) + (by simpa only [A.jetChartMap_plane] using hImm i) + (by simpa only [A.jetChartMap_plane] using hgood i) + (S i) (hS i) (hU₀ i) (K₀ i) (hU₀K i) (hSU₀ i) (φ i) (hφ i) (hphase i) + (ψ i) (Q i) (hmargin i) + have hL₀ (i) : 0 ≤ L * V₀ i := mul_nonneg (norm_nonneg _) (hV₀ i) + obtain ⟨ρ₀,hρ₀,_,hρa⟩ := finite_positive_threshold + (fun i : A.centers => a i / (1 + L * V₀ i)) + (fun i => div_pos (ha i) (by linarith [hL₀ i])) + refine ⟨ρ₀,hρ₀,?_⟩ + intro Pinput hPinput + let H : A.centers → Fin 3 → ℕ → ℝ := fun i j m => 1 + E i j m * Pinput m + let Pjet : A.centers → ℕ → ℝ := fun i m => L * V i m * Pinput m + have hH (i j m) : 1 ≤ H i j m := + le_add_of_nonneg_right (mul_nonneg (zero_le_one.trans (hE i j m)) (hPinput m)) + have hPjet (i m) : 0 ≤ Pjet i m := + mul_nonneg (mul_nonneg (norm_nonneg _) (hV i m)) (hPinput m) + choose p _ _ _ hdata using fun i => hall i (H i) (Pjet i) (hH i) (hPjet i) + refine ⟨p,?_⟩ + intro G hG B hB hBρ hclose s hs hs1 hp τ ε r' hr hτ hτs hε hε1 + have hsmall (i) : L * V₀ i * B < a i := by + have hh := (lt_div_iff₀ (show 0 < 1 + L * V₀ i by linarith [hL₀ i])).mp + (hBρ.trans_le (hρa i)) + nlinarith + have hlocalClose (i) : WeightedEstimates.WeightedBound univ 1 2 (L * V₀ i * B) + ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) - + (A.jetChartMap i F ∘ planeCoordinateIsometry.symm)) := by + have hh := (hv₀ i (G-F) 1 B zero_lt_one le_rfl hB (hG.sub hF) hclose).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i (hG.sub hF)).contDiffOn + spaceCoordinates.toContinuousLinearMap + simp only [ContinuousLinearEquiv.coe_coe] at hh + change WeightedEstimates.WeightedBound univ 1 2 _ + (spaceCoordinates ∘ A.vectorPlaneRead i (G-F)) at hh + have hsub : spaceCoordinates ∘ A.vectorPlaneRead i (G-F) = + (spaceCoordinates ∘ A.vectorPlaneRead i G) - + (spaceCoordinates ∘ A.vectorPlaneRead i F) := by + rw [A.vectorPlaneRead_sub] + funext x + exact map_sub spaceCoordinates _ _ + rw [hsub] at hh + simpa only [A.jetChartMap_plane,L,mul_assoc] using hh + have hlocalJets (i j m) : WeightedEstimates.WeightedBound (e i j).target s m (H i j m) + (realTwoJet ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) ∘ (e i j).symm)) := by + have hh := he i j m G s (Pinput m) hs hs1 (hPinput m) hG (hp m) + apply (show WeightedEstimates.WeightedBound (e i j).target s m (E i j m * Pinput m) + (realTwoJet ((A.jetChartMap i G ∘ planeCoordinateIsometry.symm) ∘ (e i j).symm)) from + by simpa only [A.jetChartMap_plane] using hh).mono_const + exact le_add_of_nonneg_left zero_le_one + have hprefix (i m j) (hj : j ≤ m+2) : WeightedEstimates.WeightedBound (U₀ i) 1 j + (Pjet i m / (s : ℝ)^(j-2)) (A.jetChartMap i G) := by + have hread := (hv i m G s (Pinput m) hs hs1 (hPinput m) hG (hp m) j (by omega)).linear + uniqueDiffOn_univ zero_le_one (A.vectorPlaneRead_smooth i hG).contDiffOn + spaceCoordinates.toContinuousLinearMap + have hcoordinate := weightedBound_comp_isometry planeCoordinateIsometry + (spaceCoordinates.contDiff.comp (A.vectorPlaneRead_smooth i hG)) hread + 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 + rw [heq] at hcoordinate + have hjet : WeightedEstimates.WeightedBound univ 1 j + (Pjet i m / (s : ℝ)^(j-2)) (A.jetChartMap i G) := by + simpa only [Pjet,L,mul_div_assoc,mul_assoc] using hcoordinate + exact hjet.restrict_open (hU₀ i) + choose d hfit hmap hphase' hsupp he' hcut hform using fun i : A.centers => + hdata i (A.jetChartMap i G) (A.jetChartMap_smooth i hG) (L * V₀ i * B) + (mul_nonneg (hL₀ i) hB) (hsmall i) (hlocalClose i) s hs hs1 (hlocalJets i) + (hprefix i) τ ε r' hr hτ hτs hε hε1 + exact ⟨d,hfit,hmap,hphase',hsupp,he',hcut,hform⟩ + +/-- The supported cutoff, phase, and coefficient form are constructed from +the fixed atlas weights and phase bases. No solver or cutoff is supplied for +the varying map. -/ +theorem uniform_polynomial_atlas_phase_mean_data_all_profiles {n : A.centers → ℕ} + (P : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hP : ∀ i k j, (P i k j).SmoothCoeffs univ) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {r ρ R : ℝ} (reference : A.centers → SmallModes.Base → Tensor) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r ≤ (Q i).Q j (reference i x) ∧ + (Q i).Q j (reference i x) ≤ R - ‖(Q i).Q j‖*r) + : ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (Pinput : ℕ → ℝ), (∀ m, 0 ≤ Pinput m) → + ∃ p : ∀ i : A.centers, Fin 3 → ChartedMeanProfile (P i), + ∀ (G : M → Space) (_hG : 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 (Pinput m) G) → + ∀ (τ ε r' : ℝ), r' ≤ r → 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + ∃ d : ∀ i, ChartedMeanFamilyData (P i) ε τ s r' ρ R (reference i), + (∀ i, (d i).Fits (p i)) ∧ + (∀ i, (d i).G = A.jetChartMap i G) ∧ + (∀ i, (d i).phase = fun j => + phaseLinear (w i j • (Q i).ξ j) ∘ planeCoordinateIsometry) ∧ + (∀ i, (d i).support = fun _ => A.chartWeightCompact i) ∧ + (∀ i j, coordinatePhase ((d i).phase j) = phaseLinear (w i j • (Q i).ξ j)) ∧ + (∀ 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) := by + classical + let ξ := fun i j => w i j • (Q i).ξ j + have hξ (i j) : ξ i j ≠ 0 := smul_ne_zero (hw i j) ((Q i).nonzero j) + let e := fun i j => linearPhaseChart (ξ i j) (hξ i j) (U i j) (hU i j) + let φ : A.centers → Fin 3 → JetPolynomial.Base → ℝ := + fun i j => phaseLinear (ξ i j) ∘ planeCoordinateIsometry + have hφ (i j) : ContDiff ℝ ∞ (φ i j) := + (phaseLinear (ξ i j)).contDiff.comp planeCoordinateIsometry.contDiff + have hphase (i j) : coordinatePhase (φ i j) = phaseLinear (ξ i j) := by + funext x + change phaseLinear (ξ i j) (planeCoordinateIsometry (planeCoordinateIsometry.symm x)) = _ + rw [LinearIsometryEquiv.apply_symm_apply] + let ψ := fun i j => A.phaseWeightCutoff i (e i j) + (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2.contDiffOn + (hsupport i j) (w i j) + obtain ⟨ρ₀,hρ₀,hall⟩ := A.uniform_polynomial_input_atlas_mean_data_all_profiles P hP F hF Ω U K hΩ hU hK hUK hKΩ + ξ hξ hImm (fun i j x hx => good_smul (hw i j) (hgood i j x hx)) + (fun i _ => A.chartWeightCompact i) hsupport U₀ hU₀ K₀ hU₀K (fun i _ => hSU₀ i) + φ hφ hphase ψ (fun i j => (Q i).Q j) reference hmargin + refine ⟨ρ₀,hρ₀,?_⟩ + intro Pinput hPinput + obtain ⟨p,hdata⟩ := hall Pinput hPinput + refine ⟨p,?_⟩ + intro G hG B hB hBρ hclose s hs hs1 hp τ ε r' hr hτ hτs hε hε1 + obtain ⟨d,hfit,hmap,hphases,hsupp,he,hcut,hform⟩ := + hdata G hG B hB hBρ hclose s hs hs1 hp τ ε r' hr hτ hτs hε hε1 + refine ⟨d,hfit,hmap,hphases,hsupp,?_,?_,?_,?_⟩ + · intro i j + rw [hphases i] + exact hphase i j + · intro i j x hx + have hx' : x ∈ (e i j).source := by simpa only [he i j] using hx + calc + ((d i).data j).cutoff (((d i).solver j).e x) = ψ i j (((d i).solver j).e x) := + hcut i j _ + _ = ψ i j (e i j x) := congrArg (ψ i j) + (congrArg (fun e : OpenPartialHomeomorph SmallModes.Base SmallModes.Base => e x) (he i j)) + _ = A.planeWeight i x / w i j := A.phaseWeightCutoff_apply i (e i j) + (linearPhaseChart_smooth (ξ i j) (hξ i j) (U i j) (hU i j)).2.contDiffOn + (hsupport i j) (w i j) hx' + · intro i j x _ + rw [hform i j] + · intro i j x hx + have hx' : x ∈ (e i j).source := + A.planeWeight_support_chart i (e i j) (hsupport i j) hx + simpa only [he i j] using hx' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialCompactFamily.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialCompactFamily.lean new file mode 100644 index 0000000000000000000000000000000000000000..d827764c1d62dae5758c0108b16d51ff4a4a6665 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialCompactFamily.lean @@ -0,0 +1,59 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CompactPhaseFamily +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialPhasePrefix +import OAI.Geometry.Immersion.ClosedSurface.AtlasPartition + +namespace OAI + +/-! Fixed finite good-phase covers provide the perturbed polynomial solvers. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem CompactPhaseFamily.uniform_polynomial_solvers_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + {K : Compacts SmallModes.Base} (a : CompactPhaseFamily F φ K) + {U : Set JetPolynomial.Base} (hU : IsOpen U) (KU : Compacts JetPolynomial.Base) + (hUK : U ⊆ KU) (hKU : (jetSupport K : Set JetPolynomial.Base) ⊆ U) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ R : ℕ → ℝ, (∀ m, 0 ≤ R m) → + ∃ C D J I : a.centers → ℕ → ℝ, + (∀ i m, 0 ≤ C i m) ∧ (∀ i m, 0 ≤ D i m) ∧ + (∀ i m, 1 ≤ J i m) ∧ (∀ i m, 1 ≤ I i m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm)-(F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ ε : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : (i : a.centers) → PolynomialSolveData P ε G hG φ (a.support i) τ s, + (∀ i, (c i).C = C i) ∧ (∀ i, (c i).D = D i) ∧ (∀ 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 := by + classical + have hs (i : a.centers) : (a.support i : Set JetPolynomial.Base) ⊆ U := by + intro x hx + apply hKU + have hp : planeCoordinateIsometry x ∈ (K : Set SmallModes.Base) := + a.support_subset i ⟨x,hx,rfl⟩ + exact ⟨planeCoordinateIsometry x,hp,planeCoordinateIsometry.symm_apply_apply x⟩ + choose r hr hall using fun i => (a.charts i).uniform_polynomial_solvers_of_prefix_all_profiles + P hP hF hφ (a.support i) (a.support_chart i) hU KU hUK (hs i) + obtain ⟨ρ,hρ,_,hρr⟩ := finite_positive_threshold r hr + refine ⟨ρ,hρ,?_⟩ + intro R hR + choose C D J I hC hD hJ hI hsolve using fun i => hall i R hR + refine ⟨C,D,J,I,hC,hD,hJ,hI,?_⟩ + intro G hG B hB hBρ hb τ ε s hτ hs hτs hs1 hε hε1 hp + choose c _ hc hd hj hi using fun i => hsolve i G hG B hB (hBρ.trans_le (hρr i)) + hb τ ε s hτ hs hτs hs1 hε hε1 hp + exact ⟨c,hc,hd,hj,hi⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialNearbyCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialNearbyCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..44f920988f7c58fc4ce996df422f4f13b63dcf07 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialNearbyCancellation.lean @@ -0,0 +1,58 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialCompactFamily +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialProfiledSplitCancellation + +namespace OAI + +/-! Actual polynomial cancellation on compact supports, uniform over nearby maps. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation PhaseMean WeightedEstimates + +theorem uniform_polynomial_nearby_cancellation_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) (K : Compacts SmallModes.Base) + (hImm : ∀ x ∈ (K : Set SmallModes.Base), + Function.Injective (fderiv ℝ (F ∘ planeCoordinateIsometry.symm) x)) + (hgood : ∀ x ∈ (K : Set SmallModes.Base), + Good (RealModes.realSecondTensor (F ∘ planeCoordinateIsometry.symm) x) + (phaseDerivative (coordinatePhase φ) x)) + {U : Set JetPolynomial.Base} (hU : IsOpen U) (KU : Compacts JetPolynomial.Base) + (hUK : U ⊆ KU) (hKU : (jetSupport K : Set JetPolynomial.Base) ⊆ U) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ R : ℕ → ℝ, (∀ m, 0 ≤ R m) → ∀ q : ℕ, + ∃ Cv Ct : ℕ → ℝ, (∀ m, 0 ≤ Cv m) ∧ (∀ m, 0 ≤ Ct m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (_hG : ContDiff ℝ ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm)-(F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ ε : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → τ/s+ε/τ^tensorLoss P ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∀ 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+ε/τ^tensorLoss P)^(q+1)*Ct m * + supportedWeightedSeminorm K s (PolynomialSolveData.inputOrder (P := P) q m) A) + (coordinateFullLinearized P ε G X+QuadraticMean.displacement τ (coordinatePhase φ) A)) := by + classical + obtain ⟨a⟩ := exists_compactPhaseFamily hF hφ K hImm hgood + obtain ⟨ρ,hρ,hall⟩ := a.uniform_polynomial_solvers_all_profiles P hP hF hφ hU KU hUK hKU + refine ⟨ρ,hρ,?_⟩ + intro R hR q + obtain ⟨C,D,J,I,hC,_,hJ,hI,hsol⟩ := hall R hR + obtain ⟨Cv,Ct,hCv,hCt,hcancel⟩ := polynomial_profiled_split_cancellation P K + a.support a.split a.support_subset C D J I hC hJ hI a.partition.splitConstant + a.partition.one_le_splitConstant a.split_bound a.split_sum q + refine ⟨Cv,Ct,hCv,hCt,?_⟩ + intro G hG B hB hBρ hb τ ε s hτ hs hτs hs1 hε hε1 hsmall hp A + obtain ⟨c,hc,hd,hj,hi⟩ := hsol G hG B hB hBρ hb τ ε s hτ hs hτs hs1 hε hε1 hp + exact hcancel G hG φ τ ε s hτ hs hτs hs1 hε hsmall c hc hd hj hi A + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhasePrefix.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhasePrefix.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb02c119a08163e09d2674addc6278e2a2776191 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhasePrefix.lean @@ -0,0 +1,67 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialPhaseSolver +import OAI.Geometry.SurfaceImmersion.Geometry.LocalIsometryBounds + +namespace OAI + +/-! Polynomial phase solvers from the shifted derivative bounds of the iteration. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates PhaseMean RealModes PhaseGeometry + +theorem GoodPhaseChart.uniform_polynomial_solvers_of_prefix_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (e : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (K : Compacts JetPolynomial.Base) (hK : (modeSupport K : Set SmallModes.Base) ⊆ e.chart.source) + {U : Set JetPolynomial.Base} (hU : IsOpen U) (KU : Compacts JetPolynomial.Base) + (hUK : U ⊆ KU) (hKU : (K : Set JetPolynomial.Base) ⊆ U) : + ∃ ρ : ℝ, 0 < ρ ∧ ∀ R : ℕ → ℝ, (∀ m, 0 ≤ R m) → + ∃ C D J I : ℕ → ℝ, (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ + (∀ m, 1 ≤ J m) ∧ (∀ m, 1 ≤ I m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.Space) (hG : ContDiff ℝ ∞ G) (B : ℝ), + 0 ≤ B → B < ρ → WeightedBound univ 1 2 B + ((G ∘ planeCoordinateIsometry.symm)-(F ∘ planeCoordinateIsometry.symm)) → + ∀ (τ ε : ℝ) (s : ℝ≥0), 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → + 0 ≤ ε → ε ≤ 1 → + (∀ m j, j ≤ m+2 → WeightedBound univ 1 j (R m/(s:ℝ)^(j-2)) + (G ∘ planeCoordinateIsometry.symm)) → + ∃ c : PolynomialSolveData P ε G hG φ K τ s, + c.e = e.chart ∧ c.C = C ∧ c.D = D ∧ c.J = J ∧ + ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I m := by + obtain ⟨ρ,hρ,hall⟩ := e.uniform_polynomial_solvers_all_profiles P hP hF hφ K hK hU KU hUK hKU + refine ⟨ρ,hρ,?_⟩ + intro R hR + choose E hE he using fun m => compact_realTwoJet_comp_prefix_bound e.smoothInverse + e.targetCompact e.chart.open_target e.targetBound m + let H := fun m => 1+E m*R m + have hH (m) : 1 ≤ H m := le_add_of_nonneg_right + (mul_nonneg (zero_le_one.trans (hE m)) (hR m)) + obtain ⟨Q,C,D,J,I,_,hC,hD,hJ,hI,hsolve⟩ := hall H R hH hR + refine ⟨C,D,J,I,hC,hD,hJ,hI,?_⟩ + intro G hG B hB hBρ hb τ ε s hτ hs hτs hs1 hε hε1 hp + have hjet (m) : WeightedBound e.chart.target s (m+1) (H (m+1)) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ e.chart.symm)) := by + apply (he (m+1) (G ∘ planeCoordinateIsometry.symm) + (hG.comp planeCoordinateIsometry.symm.contDiff) s (R (m+1)) hs hs1 (hR _) (hp _)).mono_const + exact le_add_of_nonneg_left zero_le_one + have hpref (m j) (hj : j ≤ m+2) : WeightedBound U 1 j (R m/(s:ℝ)^(j-2)) G := by + have hh := weightedBound_comp_isometry planeCoordinateIsometry + (hG.comp planeCoordinateIsometry.symm.contDiff) (hp m j hj) + have hcomp : (G ∘ planeCoordinateIsometry.symm) ∘ planeCoordinateIsometry = G := by + funext x + simp only [Function.comp_apply,planeCoordinateIsometry.symm_apply_apply] + rw [hcomp] at hh + exact hh.restrict_open hU + obtain ⟨_,c,_,_,heq,hc,hd,hj,hi⟩ := + hsolve G hG B hB hBρ hb s hs hs1 hjet hpref τ ε hτ hτs hε hε1 + exact ⟨c,heq,hc,hd,hj,hi⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhaseSolver.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhaseSolver.lean new file mode 100644 index 0000000000000000000000000000000000000000..30d88bc8f9d0212bddc6fc3bf042f58d58c44bfe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialPhaseSolver.lean @@ -0,0 +1,138 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformPhaseChartSolver +import OAI.Geometry.SurfaceImmersion.Geometry.RealJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetCompactRange +import OAI.Geometry.SurfaceImmersion.Atlas.PhaseChartBounds + +namespace OAI + +/-! Actual polynomial solvers for a fixed good phase chart, with all profiles +chosen before the nearby map and scales. No mean target or cutoff enters +the construction. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal BigOperators +namespace ClosedSurfaceR4.PhaseGeometry +open JetPolynomial JetPolynomial.Perturbation WeightedEstimates RealModes PhaseGeometry + +theorem GoodPhaseChart.uniform_polynomial_solvers_all_profiles {n : ℕ} + (P : Fin 3 → Fin n → Expression) (hP : ∀ k j, (P k j).SmoothCoeffs univ) + {F : JetPolynomial.Base → JetPolynomial.Space} (hF : ContDiff ℝ ∞ F) + {φ : JetPolynomial.Base → ℝ} (hφ : ContDiff ℝ ∞ φ) + (g : GoodPhaseChart (F ∘ planeCoordinateIsometry.symm) (coordinatePhase φ)) + (S : Compacts JetPolynomial.Base) (hS : (modeSupport S : Set SmallModes.Base) ⊆ g.chart.source) + {U₀ : Set JetPolynomial.Base} (hU₀ : IsOpen U₀) (K₀ : Compacts JetPolynomial.Base) + (hU₀K : U₀ ⊆ K₀) (hSU₀ : (S : Set JetPolynomial.Base) ⊆ U₀) + : + ∃ ρ₀ : ℝ, 0 < ρ₀ ∧ ∀ (H Pjet : ℕ → ℝ), + (∀ m, 1 ≤ H m) → (∀ m, 0 ≤ Pjet m) → + ∃ (Qjet : Set LowJet) (C D J I : ℕ → ℝ), IsCompact Qjet ∧ + (∀ m, 0 ≤ C m) ∧ (∀ m, 0 ≤ D m) ∧ + (∀ m, 1 ≤ J m) ∧ (∀ m, 1 ≤ I m) ∧ + ∀ (G : JetPolynomial.Base → JetPolynomial.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, WeightedBound g.chart.target s (m + 1) (H (m + 1)) + (realTwoJet ((G ∘ planeCoordinateIsometry.symm) ∘ + g.chart.symm))) → + (∀ m j, j ≤ m + 2 → WeightedBound U₀ 1 j + (Pjet m / (s : ℝ) ^ (j - 2)) G) → + ∀ τ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + MapsTo (lowJet G) U₀ Qjet ∧ + ∃ c : PolynomialSolveData P ε G hG φ S τ s, + c.U = U₀ ∧ c.O = univ ∧ c.e = g.chart ∧ + c.C = C ∧ c.D = D ∧ c.J = J ∧ + ∀ m j, 1 ≤ j → j ≤ m → ∀ x ∈ c.e.target, + ‖iteratedFDerivWithin ℝ j c.e.symm c.e.target x‖ ≤ I m := by + classical + let e := g.chart + have hsm := And.intro g.smooth g.smoothInverse + obtain ⟨ρ₀,R,N,hρ₀,hR,_hN,hnear⟩ := + g.uniform_mode_bounds (hF.comp planeCoordinateIsometry.symm.contDiff) + choose J hJ hj using fun m => compact_local_weighted_bound e.open_source isOpen_univ + g.sourceCompact.isCompact g.sourceBound (subset_univ _) hsm.1.contDiffOn m + choose I hI hi using fun m => compact_local_weighted_bound e.open_target isOpen_univ + g.targetCompact.isCompact g.targetBound (subset_univ _) hsm.2.contDiffOn (m + 1) + have hJb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m) + (x : SmallModes.Base) (hx : x ∈ e.source) : + ‖iteratedFDerivWithin ℝ j e e.source x‖ ≤ J m := by + simpa only [one_pow,one_mul] using hj m 1 zero_le_one le_rfl j hjm x hx + have hIb (m j : ℕ) (_ : 1 ≤ j) (hjm : j ≤ m + 1) + (x : SmallModes.Base) (hx : x ∈ e.target) : + ‖iteratedFDerivWithin ℝ j e.symm e.target x‖ ≤ I m := by + simpa only [one_pow,one_mul] using hi m 1 zero_le_one le_rfl j hjm x hx + have hφd (v : Fin 2) : ContDiff ℝ ∞ (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hφ.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose Fp hFp hf using fun m v => compact_local_weighted_bound hU₀ isOpen_univ + K₀.isCompact hU₀K (subset_univ _) (hφd v).contDiffOn (m + tensorOrder P) + let Ph : ℕ → ℝ := fun m => ∑ v : Fin 2, Fp m v + have hPh (m : ℕ) : 0 ≤ Ph m := + Finset.sum_nonneg (fun v _ => zero_le_one.trans (hFp m v)) + refine ⟨ρ₀,hρ₀,?_⟩ + intro H Pjet hH hPjet + 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 ⟨Qjet,hQjet,hQrange⟩ := bounded_lowJet_range hU₀ K₀ hU₀K (hPjet 0) + obtain ⟨D,hD,hd⟩ := phaseChartPolynomialOperator_bounds hU₀ isOpen_univ hQjet + (subset_univ _) P hP S hSU₀ e hsm.1.contDiffOn hsm.2.contDiffOn hS + B Ph J I hB hPh hJ hI hJb hIb + let C : ℕ → ℝ := fun m => ((m + 1).factorial : ℝ) * R (m + 1) * H (m + 1) ^ (m + 1) + have hC (m : ℕ) : 0 ≤ C m := mul_nonneg + (mul_nonneg (Nat.cast_nonneg _) (zero_le_one.trans (hR _))) + (pow_nonneg (zero_le_one.trans (hH _)) _) + refine ⟨Qjet,C,D,J,I,hQjet,hC,hD,hJ,hI,?_⟩ + intro G hG C₀ hC₀ hCρ hclose s hs hs1 hjet hpref τ ε hτ hτs hε hε1 + have hGQ : MapsTo (lowJet G) U₀ Qjet := by + apply hQrange G hG + simpa only [Nat.sub_self,pow_zero,div_one] using hpref 0 2 (by omega) + have hGb (m : ℕ) : WeightedBound U₀ s (m + tensorOrder P) (B m) (lowJet G) := + hb m G hG s (Pjet (m + tensorOrder P)) hs hs1 (hPjet _) (hpref _) + have hφb (m : ℕ) (v : Fin 2) : WeightedBound U₀ s (m + tensorOrder P) (Ph m) + (fun x => fderiv ℝ φ x (coordinateVector v)) := + (hf m v s s.coe_nonneg hs1).mono_const (Finset.single_le_sum + (fun w _ => zero_le_one.trans (hFp m w)) (Finset.mem_univ v)) + obtain ⟨hdom,hbounds⟩ := hnear (G ∘ planeCoordinateIsometry.symm) + (hG.comp planeCoordinateIsometry.symm.contDiff) C₀ hC₀ hCρ hclose + have hmap : ContDiff ℝ ∞ ((G ∘ planeCoordinateIsometry.symm) ∘ e.symm) := + (hG.comp planeCoordinateIsometry.symm.contDiff).comp hsm.2 + let c : PolynomialSolveData P ε G hG φ S τ s := { + U := U₀ + O := univ + openU := hU₀ + openO := isOpen_univ + smoothP := hP + mapsG := mapsTo_univ _ _ + supportU := hSU₀ + smoothPhase := hφ + e := e + smoothForward := hsm.1.contDiffOn + smoothInverse := hsm.2.contDiffOn + supportChart := hS + phase := fun x _ => g.phase x + smoothMap := hmap + domain := by simpa only [Function.comp_def] using hdom.complexDomain hmap + C := C + D := D + J := J + nonnegC := hC + nonnegD := hD + oneLEJ := hJ + coordinates := hJb + coefficients := by + intro m + simpa only [C,Function.comp_def] using + (hbounds (m + 1) s (H (m + 1)) hs (hH _) (hjet m)).1 + polynomial := hd G φ hG hφ hGQ s τ ε hτ hs hτs hs1 hε hε1 hGb hφb + } + refine ⟨hGQ,c,rfl,rfl,rfl,rfl,rfl,rfl,?_⟩ + intro m j hj hjm x hx + exact hIb m j hj (hjm.trans (Nat.le_succ m)) x hx + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..f9c19889d8960f538a65b53a3038130153d276d4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPolynomialSmallIncrement.lean @@ -0,0 +1,145 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ProfiledPolynomialSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.UniformPolynomialAtlasMeanData +import OAI.Geometry.SurfaceImmersion.Atlas.UniformNearbyAtlasSmallIncrement + +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 uniformPolynomialSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformPolynomialSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformPolynomialSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformPolynomialSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformPolynomialSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformPolynomialSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_polynomial_atlas_small_increment + {n : A.centers → ℕ} {nq : ℕ} + (Pol : ∀ i : A.centers, Fin 3 → Fin (n i) → Expression) + (hPol : ∀ i k l, (Pol i k l).SmoothCoeffs univ) + (Ql : A.centers → Fin 3 → Fin nq → Expression) + (hQl : ∀ i k l, (Ql i k l).SmoothCoeffs univ) + (hquad : A.PolynomialQuadraticRepresentation Pol Ql) + (hlin : A.PolynomialLinearRepresentation Pol Ql) + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (Ω U K : A.centers → Fin 3 → Set SmallModes.Base) + (hΩ : ∀ i j, IsOpen (Ω i j)) (hU : ∀ i j, IsOpen (U i j)) + (hK : ∀ i j, IsCompact (K i j)) + (hUK : ∀ i j, U i j ⊆ K i j) (hKΩ : ∀ i j, K i j ⊆ Ω i j) + (hImm : ∀ i j x, x ∈ Ω i j → Function.Injective + (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ Ω i j → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (hsupport : ∀ i j, (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) ⊆ U i j) + (U₀ : A.centers → Set JetPolynomial.Base) (hU₀ : ∀ i, IsOpen (U₀ i)) + (K₀ : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) + (hU₀K : ∀ i, U₀ i ⊆ K₀ i) + (hSU₀ : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ U₀ i) + {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))) + (hmargin : ∀ i j x, x ∈ U i j → + ρ + ‖(Q i).Q j‖*r₁ ≤ (Q i).Q j (A.tensorPlaneRead i reference x) ∧ + (Q i).Q j (A.tensorPlaneRead i reference x) ≤ R - ‖(Q i).Q j‖*r₁) + (hImmQ : ∀ 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)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + (Ωp : A.centers → Set JetPolynomial.Base) (hΩp : ∀ i, IsOpen (Ωp i)) + (KΩp : A.centers → TopologicalSpace.Compacts JetPolynomial.Base) (hΩpK : ∀ i, Ωp i ⊆ KΩp i) + (hweight : ∀ i, (A.chartWeightCompact i : Set JetPolynomial.Base) ⊆ Ωp i) + (houter : ∀ i : A.centers, (chart (i : M)) '' tsupport (A.outer i) ⊆ Ωp i) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) + (hPF : ∀ m, 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ ε : ℝ, 0 < τ → τ ≤ s → 0 ≤ ε → ε ≤ 1 → + τ/s+ε/τ^(max (Finset.univ.sup (fun i : A.centers => tensorLoss (Ql i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i)))) ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ X : M → Space, ContMDiff planeModel spaceModel ∞ X ∧ + (∀ m, A.WeightedBound τ m (B m*(δ*τ)) X) ∧ + (∀ m, A.TensorWeightedBound τ m (T m*(δ*(τ/s+ε/τ^(max (Finset.univ.sup (fun i : A.centers => tensorLoss (Ql i))) + (Finset.univ.sup (fun i : A.centers => tensorLoss (Pol i)))))^(q+1)+δ^3/τ)) + (A.atlasPolynomialMetric Pol ε (G+X)-A.atlasPolynomialMetric Pol ε G-δ^2 • H)) := by + classical + obtain ⟨ρd,hρd,halldata⟩ := A.uniform_polynomial_atlas_phase_mean_data_all_profiles Ql hQl F hF Q w hw Ω U K + hΩ hU hK hUK hKΩ hImm hgood hsupport U₀ hU₀ K₀ hU₀K hSU₀ + (fun i => A.tensorPlaneRead i reference) hmargin + obtain ⟨p,hdata⟩ := halldata P hP + have hzero : A.WeightedBound 1 2 0 (F-F) := by + simp only [sub_self] + intro i + have he : localize (i : M) (A.weight i) (0 : M → Space) = + (fun _ : JetPolynomial.Base => (0 : Space)) := by + funext x + simp [localize] + rw [he] + exact weightedBound_zero (univ : Set JetPolynomial.Base) 1 2 + obtain ⟨d₀,_,_,hphase₀,_,hlinear₀,_,_,_⟩ := hdata F hF 0 le_rfl hρd hzero + 1 zero_lt_one le_rfl hPF 1 0 r₁ le_rfl zero_lt_one le_rfl le_rfl zero_le_one + have hφ₀ : (fun a : A.centers × Fin 3 => A.freeGlobalPhase d₀ a.1 a.2) = + A.linearAtlasPhase Q w := by + funext a + unfold freeGlobalPhase linearAtlasPhase + rw [hphase₀ a.1] + have hgoodQ' : ∀ 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) → + 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) := by + simpa only [hφ₀] using hgoodQ + obtain ⟨r,D₀,hr,hD₀,hDr,hsmall⟩ := A.profiled_polynomial_atlas_small_increment Pol hPol Ql hQl hquad hlin + F hF hr₁ hρ reference href p d₀ Q w hw hlinear₀ hImmQ hgoodQ' Ωp hΩp KΩp hΩpK hweight houter P hP q + refine ⟨r,hr,?_⟩ + intro C hC + obtain ⟨ρs,η₀,B,T,hρs,hη₀,hη₁,hB,hT,hstep⟩ := hsmall C hC + refine ⟨min ρd ρs,η₀,B,T,lt_min hρd hρs,hη₀,hη₁,hB,hT,?_⟩ + intro G hG b hb hbr hclose s hs hs1 hp H hH hsym hnear hHC τ δ ε hτ hτs hε hε1 hη hδ hδτ + have hrealize := hstep G hG b hb (hbr.trans_le (min_le_right _ _)) hclose + s hs hs1 hp H hH hsym hnear hHC + obtain ⟨d,hfit,hmap,hphase,hsupport',_,hcut,hform,hsup⟩ := + hdata G hG b hb (hbr.trans_le (min_le_left _ _)) hclose s hs hs1 hp τ ε (D₀*r) hDr hτ hτs hε hε1 + have hph (i) : (d i).phase = (d₀ i).phase := (hphase i).trans (hphase₀ i).symm + have hK' (i j) : (modeSupport ((d i).support j) : Set SmallModes.Base) ⊆ + (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) := by + rw [hsupport' i] + exact hrealize τ δ ε hτ hτs hε hε1 hη hδ hδτ d hfit hph hmap hcut hform hsup hK' + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPrimitiveMeanRealization.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPrimitiveMeanRealization.lean new file mode 100644 index 0000000000000000000000000000000000000000..81ef36ef0404bae0a556ee689301918cca24eccd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformPrimitiveMeanRealization.lean @@ -0,0 +1,365 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PrimitiveMeanRealization +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 +import OAI.Geometry.SurfaceImmersion.Primitive.UniformPrimitiveProfiles + +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.SurfaceVelocityFamily.Loop +open RealModes JetPolynomial JetVelocityCoordinates LocalPeriodicExpansion CovarianceCorrector +open WeightedEstimates NormalFrame +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +theorem all_orders_primitive_normal_geometry {S : TopologicalSpace.Opens JetPolynomial.Base} + {Q : Set LowJet} (hQ : IsCompact Q) (hQO : Q ⊆ O) + (ℓ : JetPolynomial.Base →L[ℝ] ℝ) + (hx : ℓ (coordinateVector 0) = 1) (hy : ℓ (coordinateVector 1) = 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ n : ℕ, ∃ 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) → 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 ⟨ε,c,hε,hc,hn⟩ := l.compact_normal_margin hQ hQO + refine ⟨ε,c,hε,hc,?_⟩ + intro n + obtain ⟨loss,hb⟩ := l.uniform_primitive_normal_triple (S := S) hQ hQO n ℓ hx hy + refine ⟨loss,?_⟩ + 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 + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation LocalPeriodicExpansion CovarianceCorrector WeightedEstimates +local instance uniformPrimitiveRealizationFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformPrimitiveRealizationFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformPrimitiveRealizationDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformPrimitiveRealizationDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformPrimitiveRealizationSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformPrimitiveRealizationSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +open PrimitiveRealization +variable {g : SmoothMetric M} {F : M → Space} + +/-- Arbitrary finite metric accuracy for a genuine supported primitive. +The slow baseline maps are constructed by the polynomial mean iteration; +their admissibility follows from the original map's compact jet margin. -/ +theorem profiled_primitive_mean_realization (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 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 ![a y^2,0,0]))) ∧ + (∀ 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, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V) 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) ∧ + ∃ hGs : ContMDiff planeModel spaceModel ∞ G, + ∃ hGO : MapsTo (lowJet (data.A.jetChartMap i G)) S O, + ∀ p ∈ S, + let geom := l.geometry (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hGs) hGO + let t : Period := ((ℓ p/z : ℝ) : Period) + ‖SurfaceVelocityFamily.Loop.primitiveJetProfile (data.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]‖ ≤ + Dp*z/(z^b)^lp := by + obtain ⟨ρg,hρg,hgeometry⟩ := data.supported_primitive_geometry hF i + obtain ⟨ρ,Q',hρ,hQ',hQ'O,hnear⟩ := data.A.lowJet_neighborhood_of_C2 i hF S.isOpen 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 ⟨ρB,cB,hρB,hcB,hmargin⟩ := data.primitive_atlas_normal_margin hF i hc + 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_primitive_metric i l ha hamp S houter + 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 + 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 Pol) + (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.atlas_jet_profiles + (fun _ => (S : Set JetPolynomial.Base)) (fun _ => S.isOpen) (fun _ => T) (fun _ => hST) P hP + obtain ⟨Dmap,D,hDmap,hD,hprimitive⟩ := hconstruct (R+2) (B i ((R+2)+(2*(N+(R+2)+1)+1))) (hB _ _) + obtain ⟨Dn,_,hnormal⟩ := hnb (B i ((2*(N+(R+2))+2)+2)) (hB _ _) + obtain ⟨Dp,hDp,hprofile⟩ := hpb (B i ((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)) 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) p,t) = + SurfaceVelocityFamily.normal (lowJet (data.A.jetChartMap i G) 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 hGv + let V := data.A.periodicAtlasAnsatz i G U ℓ (N+(R+2)+1) z + have hjet := (hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 i ((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 Pol) 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 hcoord : data.A.vectorChartRead i V = + finiteAnsatz (fun q => JetVelocityCoordinates.toEuclidean (data.A.jetChartMap i G q)) + U ℓ (N+(R+2)+1) z := by + rw [data.A.euclidean_jetChartMap] + funext q + apply spaceCoordinates.injective + exact congrFun (data.A.periodicAtlasAnsatz_coordinate i G U hK hKA hzero ℓ + (N+(R+2)+1) z) q + have hnall : ∀ p ∈ S, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V) p + NormalFrame.gramDet (H 0) (H 1) ≠ 0 ∧ + c < ‖RealModes.realNormalPart (H 0) (H 1) (H 2)‖ := by + rw [hcoord] + exact hnormal (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGQ + (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 i ((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 + have hext : ∀ p ∉ tsupport (data.A.weight i), V =ᶠ[𝓝 p] G := by + intro p hp + exact data.A.periodicAtlasAnsatz_eventuallyEq i G U hK hKA hzero ℓ (N+(R+2)+1) z hp + 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 => by + have hpouter : p ∈ tsupport (data.A.outer i) := subset_tsupport _ (by + change data.A.outer i p ≠ 0 + rw [data.A.outer_one i p hp] + norm_num) + have hh := hnall (chart (i : M) p) (houter ⟨p,hpouter,rfl⟩) + exact ⟨hh.1,norm_pos_iff.mp (hc.trans hh.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 => by + have hpouter : p ∈ tsupport (data.A.outer i) := subset_tsupport _ (by + change data.A.outer i p ≠ 0 + rw [data.A.outer_one i p hp] + norm_num) + have hh := hnall (chart (i : M) p) (houter ⟨p,hpouter,rfl⟩) + exact data.A.secondTensor_margin_of_primitive_normal i (hVs z) + (chart (i : M) p) hc hh.1 hh.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', + fun j => ((hfinal j).mono_order (by omega)).mono_const ?_, + hglobal.1,hglobal.2,hBglobal,hnall,hext,?_⟩ + · 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 + rw [hcoord] + exact hprofile (data.A.jetChartMap i G) (data.A.jetChartMap_smooth i hG) hGQ + (z^b) z hz hzs hs1 + ((hprofiles G hG ⟨z^b,hs.le⟩ hs hs1 hmap).2 i ((2*(N+(R+2))+2)+2)) + U hUs hrep hinit p hp + +/-- The geometric consequence with profile bookkeeping erased. -/ +theorem uniform_primitive_mean_realization (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 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 ![a y^2,0,0]))) ∧ + (∀ 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, + let H := SurfaceVelocityFamily.Loop.primitiveNormalTriple (data.A.vectorChartRead i V) 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 ⟨c,cB,V₀,hc,hcB,hV₀,hall⟩ := 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 ⟨c,cB,V₀,hc,hcB,hV₀,?_⟩ + intro R N + obtain ⟨lp,b,u,η,L,C,Cv,Dp,P,hb,hb16,hu,hη,hη1,hL,hC,hCv,_,_,hP,hfamily⟩ := hall R N + refine ⟨b,u,η,L,C,Cv,P,hb,hb16,hu,hη,hη1,hL,hC,hCv,hP,?_⟩ + intro z hz hzη + obtain ⟨G,V,hG,hV,hclose,hmap,hvb,hv0,hshift,herr,himm,hB,hglobal,hlocal,hext,_⟩ := hfamily z hz hzη + exact ⟨G,V,hG,hV,hclose,hmap,hvb,hv0,hshift,herr,himm,hB,hglobal,hlocal,hext⟩ + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRadiusSmoothedMetricIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRadiusSmoothedMetricIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..01663b47d78aa4a1113386b7c7485d1235697e6a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRadiusSmoothedMetricIncrement.lean @@ -0,0 +1,161 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricRadiusSmallIncrement +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 + +namespace OAI + +/-! One fixed geometric neighborhood supports smoothed metric correction at +every smoothing and cancellation order. -/ +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 uniformRadiusSmoothedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance uniformRadiusSmoothedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance uniformRadiusSmoothedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance uniformRadiusSmoothedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance uniformRadiusSmoothedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance uniformRadiusSmoothedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace MetricGoodPhaseData +variable {g : SmoothMetric M} {F : M → Space} + +/-- The two geometric radii are fixed before all smoothing orders, +correction orders, and true-input bounds. -/ +theorem uniform_radius_smoothed_increment (d : MetricGoodPhaseData g F) + (hF : ContMDiff planeModel spaceModel ∞ F) : + ∃ a ρ : ℝ, 0 < a ∧ 0 < ρ ∧ + ∀ (r q : ℕ) (B₀ : ℝ), 0 ≤ B₀ → + ∃ (η : ℝ) (B T : ℕ → ℝ), 0 < η ∧ η ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space) (H : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + (∀ p v w, H p v w = H p w v) → + ∀ t s : ℝ, 0 < t → t ≤ 1 → 0 < s → s ≤ 1 → + d.A.InputBound t r B₀ G H → + ∀ b : ℝ, 0 ≤ b → b < ρ → d.A.WeightedBound 1 2 b (d.A.smooth r s G-F) → + ∀ δ δ' τ : ℝ, 0 < δ → 0 ≤ δ' → δ' ≤ δ → + 0 < τ → τ ≤ s → τ/s ≤ η → δ ≤ τ → + (∀ x, ‖d.A.tensorEncode (d.A.tensorSmooth r s H - (δ'/δ)^2 • g.inner) x - + d.A.tensorEncode g.inner x‖ ≤ a/2) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) U) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (realizedTensorError g.inner (d.A.tensorSmooth r s H) δ δ' (d.A.smooth r s G) U)) := by + classical + obtain ⟨a,ρ,ha,hρ,hsmall⟩ := d.uniform_radius_small_increment hF + refine ⟨a,ρ,ha,hρ,?_⟩ + intro r q B₀ hB₀ + obtain ⟨PG,CH,hPG,hCH,hprofiles⟩ := d.A.uniform_smoothing_input_profiles r B₀ hB₀ + choose CG hCG hgBound using fun m => d.A.exists_bundle_bound + d.A.tensorTriv d.A.tensorTriv_domain m g.contMDiff + let C := fun m => CH m + CG m + have hC (m : ℕ) : 1 ≤ C m := (hCH m).trans (le_add_of_nonneg_right (hCG m)) + obtain ⟨η,B,T,hη,hη1,hB,hT,hbuild⟩ := hsmall PG hPG q C hC + refine ⟨η,B,T,hη,hη1,hB,hT,?_⟩ + intro G H hG hH hsym t s ht ht1 hs hs1 hinput b hb hbρ hnear δ δ' τ + hδ hδ' hδ'δ hτ hτs hτη hδτ hTensorNear + obtain ⟨hPG',hCH'⟩ := hprofiles G H t s ht ht1 hs hs1 hG hH hinput + let α := (δ'/δ)^2 + have hα : 0 ≤ α := sq_nonneg _ + have hα1 : α ≤ 1 := by + have hdiv : 0 ≤ δ'/δ := div_nonneg hδ' hδ.le + have hdiv1 : δ'/δ ≤ 1 := (div_le_one hδ).mpr hδ'δ + dsimp [α] + nlinarith + have hHs := d.A.tensorSmooth_smooth r hs hH + have htarget : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p ((d.A.tensorSmooth r s H - α • g.inner) p)) := + hHs.sub_section g.contMDiff.const_smul_section + have htargetBound (m : ℕ) : d.A.TensorWeightedBound s m (C m) + (d.A.tensorSmooth r s H - α • g.inner) := by + have hgb : d.A.TensorWeightedBound s m (CG m) g.inner := + fun i => (hgBound m i).shrink_scale hs.le hs1 + have hαg := d.A.tensorWeightedBound_const_smul g.contMDiff hgb α + have hαg' : d.A.TensorWeightedBound s m (CG m) (α • g.inner) := by + intro i + apply (hαg i).mono_const + rw [abs_of_nonneg hα] + exact mul_le_of_le_one_left (hCG m) hα1 + exact d.A.tensorWeightedBound_sub hHs g.contMDiff.const_smul_section hs.le (hCH' m) hαg' + have htargetSym : ∀ p v w, + (d.A.tensorSmooth r s H - α • g.inner) p v w = + (d.A.tensorSmooth r s H - α • g.inner) p w v := by + intro p v w + simp only [Pi.sub_apply,Pi.smul_apply,sub_apply, + smul_apply,smul_eq_mul] + rw [d.A.tensorSmooth_symmetric r hs hH hsym p v w,g.symm p v w] + obtain ⟨U,hU,hUB,hUT⟩ := hbuild (d.A.smooth r s G) (d.A.smooth_smooth r hs hG) + b hb hbρ hnear ⟨s,hs.le⟩ hs hs1 hPG' + (d.A.tensorSmooth r s H - α • g.inner) htarget htargetSym hTensorNear htargetBound + τ δ hτ hτs hτη hδ hδτ + refine ⟨U,hU,hUB,?_⟩ + have hαδ : δ^2*α = δ'^2 := by dsimp [α]; field_simp [hδ.ne'] + have he : δ^2 • (d.A.tensorSmooth r s H - α • g.inner) = + δ^2 • d.A.tensorSmooth r s H - δ'^2 • g.inner := by + rw [smul_sub,smul_smul,hαδ] + intro m + convert hUT m using 1 <;> first | rfl | simp only [realizedTensorError,he] + +/-- The metric norm bound is fixed once, and the smoothing-tail constant +is chosen from the smoothing order before the correction order or input bound. -/ +theorem uniform_radius_smoothed_increment_of_input (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 : ℕ → ℝ), 0 < η ∧ η ≤ 1 ∧ + (∀ m, 0 ≤ B m) ∧ (∀ m, 0 ≤ T m) ∧ + ∀ (G : M → Space) (H : ∀ p : M, CovariantTwoTensor p), + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun p => TotalSpace.mk' TensorFiber p (H p)) → + (∀ p v w, H p v w = H p w v) → + ∀ t s : ℝ, 0 < t → t ≤ 1 → 0 < s → s ≤ t → + d.A.InputBound t r B₀ G H → + d.A.WeightedBound 1 2 (ρ/4) (G-F) → + (∀ x, ‖d.A.tensorEncode H x - d.A.tensorEncode g.inner x‖ ≤ a/8) → + D*B₀*(s/t)^r ≤ min (ρ/4) (a/8) → + ∀ δ δ' τ : ℝ, 0 < δ → 0 ≤ δ' → δ' ≤ δ → + 0 < τ → τ ≤ s → τ/s ≤ η → δ ≤ τ → (δ'/δ)^2*K ≤ a/8 → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, d.A.WeightedBound τ m (B m*(δ*τ)) U) ∧ + (∀ m, d.A.TensorWeightedBound τ m (T m*(δ*(τ/s)^(q+1)+δ^3/τ)) + (realizedTensorError g.inner (d.A.tensorSmooth r s H) δ δ' (d.A.smooth r s G) U)) := by + obtain ⟨a,ρ,ha,hρ,hsmoothed⟩ := d.uniform_radius_smoothed_increment hF + obtain ⟨K,hK,hKb⟩ := d.A.exists_bundle_bound d.A.tensorTriv d.A.tensorTriv_domain 0 g.contMDiff + have hgBound (x : JetPolynomial.Base) : ‖d.A.tensorEncode g.inner x‖ ≤ K := + (d.A.tensorEncode_bound g.contMDiff zero_lt_one hK hKb).norm_le (mem_univ x) + refine ⟨a,ρ,K,ha,hρ,hK,?_⟩ + intro r + obtain ⟨D,hD,hadmissible⟩ := d.A.smoothed_input_admissibility r + refine ⟨D,hD,?_⟩ + intro q B₀ hB₀ + obtain ⟨η,B,T,hη,hη1,hB,hT,hstep⟩ := hsmoothed r q B₀ hB₀ + refine ⟨η,B,T,hη,hη1,hB,hT,?_⟩ + intro G H hG hH hsym t s ht ht1 hs hst hinput hnear hHnear htail δ δ' τ + hδ hδ' hδ'δ hτ hτs hτη hδτ hratio + have had := hadmissible g F G H ρ a (ρ/4) B₀ t s ((δ'/δ)^2) K + hρ ha hB₀ hs hst ht1 hF hG hH hinput hnear le_rfl hHnear htail + (sq_nonneg _) hgBound hratio + exact hstep G H hG hH hsym t s ht ht1 hs (hst.trans ht1) hinput + (ρ/2) (by positivity) (by linarith) had.1 + δ δ' τ hδ hδ' hδ'δ hτ hτs hτη hδτ had.2 + +end MetricGoodPhaseData +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRealModeCoefficients.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRealModeCoefficients.lean new file mode 100644 index 0000000000000000000000000000000000000000..5dd9066ba0eb9de4669c53189c23ba376f59e3a4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRealModeCoefficients.lean @@ -0,0 +1,113 @@ +import OAI.Geometry.Immersion.ClosedSurface.NormalJets +import OAI.Geometry.Immersion.ClosedSurface.RealBounds + +namespace OAI + +/-! Uniform reconstruction estimates on a fixed compact set of real two-jets. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.SmallModes +open RealModes WeightedEstimates + +def admissibleComplexJets : Set (TwoJet 4) := + {J | gramDet (J 0) (J 1) ≠ 0 ∧ + normalPart (J 0) (J 1) (J 4) ⬝ᵥ normalPart (J 0) (J 1) (J 4) ≠ 0} + +lemma admissibleComplexJets_domain : LowJet.Domain admissibleComplexJets := by + refine ⟨?_,fun _ h => h.1,fun _ h => h.2⟩ + apply isOpen_iff_mem_nhds.mpr + intro J hJ + have hs (i : Fin 5) : ContDiffAt ℝ ∞ (fun K : TwoJet 4 => K i) J := + (ContinuousLinearMap.proj i : TwoJet 4 →L[ℝ] Ambient 4).contDiff.contDiffAt + have hd := LowJet.contDiffAt_gramDet (hs 0) (hs 1) + have hn := LowJet.contDiffAt_normalPart (hs 0) (hs 1) (hs 4) hJ.1 + exact (hd.continuousAt.eventually_ne hJ.1).and + ((LowJet.contDiffAt_dot hn hn).continuousAt.eventually_ne hJ.2) + +def complexifyJetCLM : RealTwoJet →L[ℝ] TwoJet 4 := + ContinuousLinearMap.pi fun i => (complexifyCLM 4).comp (ContinuousLinearMap.proj i) + +def complexifyJetLI : RealTwoJet →ₗᵢ[ℝ] TwoJet 4 where + toLinearMap := complexifyJetCLM.toLinearMap + norm_map' J := by + apply le_antisymm + · apply (pi_norm_le_iff_of_nonneg (norm_nonneg J)).mpr + intro i + exact (norm_complexify (J i)).trans_le (norm_le_pi_norm J i) + · apply (pi_norm_le_iff_of_nonneg (norm_nonneg (complexifyJetCLM J))).mpr + intro i + exact (norm_complexify (J i)).symm.trans_le (norm_le_pi_norm (complexifyJetCLM J) i) + +lemma complexifyJet_mem {J : RealTwoJet} + (hD : NormalFrame.gramDet (J 0) (J 1) ≠ 0) + (hB : realNormalPart (J 0) (J 1) (J 4) ≠ 0) : + complexifyJetCLM J ∈ admissibleComplexJets := by + constructor + · change gramDet (complexify (J 0)) (complexify (J 1)) ≠ 0 + rw [complexify_gram] + exact Complex.ofReal_ne_zero.mpr hD + · change normalPart (complexify (J 0)) (complexify (J 1)) (complexify (J 4)) ⬝ᵥ + normalPart (complexify (J 0)) (complexify (J 1)) (complexify (J 4)) ≠ 0 + rw [← complexify_normalPart,complexify_dot] + exact Complex.ofReal_ne_zero.mpr ((dotProduct_self_eq_zero).not.mpr hB) + +lemma twoJet_complexify {F : RField 4} (hF : ContDiff ℝ ∞ F) : + twoJet (fun p => complexify (F p)) = complexifyJetCLM ∘ realTwoJet F := by + have hfirst (v : Base) : coordDeriv v (fun p => complexify (F p)) = + fun p => complexify (coordDeriv v F p) := by + funext p + exact coordDeriv_complexify (hF.differentiable (by simp) p) v + have hsecond (v w : Base) : coordDeriv v (fun p => complexify (coordDeriv w F p)) = + fun p => complexify (coordDeriv v (coordDeriv w F) p) := by + funext p + exact coordDeriv_complexify ((contDiff_real_coordDeriv hF w).differentiable (by simp) p) v + funext p i + fin_cases i + · change coordDeriv dx (fun p => complexify (F p)) p = complexify (coordDeriv dx F p) + exact congrFun (hfirst dx) p + · change coordDeriv dy (fun p => complexify (F p)) p = complexify (coordDeriv dy F p) + exact congrFun (hfirst dy) p + · change coordDeriv dx (coordDeriv dx (fun p => complexify (F p))) p = + complexify (coordDeriv dx (coordDeriv dx F) p) + rw [hfirst dx] + exact congrFun (hsecond dx dx) p + · change coordDeriv dx (coordDeriv dy (fun p => complexify (F p))) p = + complexify (coordDeriv dx (coordDeriv dy F) p) + rw [hfirst dy] + exact congrFun (hsecond dx dy) p + · change coordDeriv dy (coordDeriv dy (fun p => complexify (F p))) p = + complexify (coordDeriv dy (coordDeriv dy F) p) + rw [hfirst dy] + exact congrFun (hsecond dy dy) p + +/-- The constant precedes the map and scale. Its only geometric input is a +fixed compact set of admissible real two-jets; higher bounds enter polynomially. -/ +theorem compact_real_reconstruction_bounds {U : Set Base} (hU : IsOpen U) + {Ω K : Set RealTwoJet} (hΩ : RealJetDomain Ω) (hK : IsCompact K) (hKΩ : K ⊆ Ω) + (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (F : RField 4) (s C : ℝ), 0 < s → 1 ≤ C → + ContDiff ℝ ∞ F → MapsTo (realTwoJet F) U K → + WeightedBound U s m C (realTwoJet F) → + ReconstructionCoefficientBound (fun p => complexify (F p)) U s m + ((m.factorial : ℝ) * D * C^m) := by + have hKc : IsCompact (complexifyJetCLM '' K) := hK.image complexifyJetCLM.continuous + have hKo : complexifyJetCLM '' K ⊆ admissibleComplexJets := by + rintro _ ⟨J,hJ,rfl⟩ + exact complexifyJet_mem (hΩ.determinant J (hKΩ hJ)) (hΩ.good J (hKΩ hJ)) + obtain ⟨D,hD,hd⟩ := compact_reconstructionCoefficientBound hU + admissibleComplexJets_domain hKc hKo m + refine ⟨D,hD,?_⟩ + intro F s C hs hC hF hFK hb + apply hd (fun p => complexify (F p)) s C hs hC (contDiff_complexify hF).contDiffOn + · intro p hp + rw [twoJet_complexify hF] + exact mem_image_of_mem complexifyJetCLM (hFK hp) + · rw [twoJet_complexify hF] + exact weighted_linearIsometry hU.uniqueDiffOn (contDiff_realTwoJet hF).contDiffOn hb complexifyJetLI + +end ClosedSurfaceR4.SmallModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRootMean.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRootMean.lean new file mode 100644 index 0000000000000000000000000000000000000000..8080a9781192bd8dad581fa760714fab535149cb --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformRootMean.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedRootAmplitude +import OAI.Geometry.SurfaceImmersion.Correction.UniformNormalizedMean + +namespace OAI + +/-! Uniform constants for actual square-root trials are chosen before the scales +and the supported perturbation operator. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates RootMean +open JetPolynomial (SupportedField supportedWeightedSeminorm) + +variable {F : RField 4} {U : Set Base} + +theorem uniform_perturbed_root_mean_bounds (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) {p L : ℕ} + (B D : ℕ → ℝ) (hB : ∀ m, 0 ≤ B m) (hD : ∀ m, 0 ≤ D m) + (q m : ℕ) {r R₀ C P N : ℝ} (hr : 0 < r) (hC : 1 ≤ C) (hP : 0 ≤ P) (hN : 0 ≤ N) : + ∃ E : ℝ, 1 ≤ E ∧ ∀ (δ τ : ℝ) (s : ℝ≥0) (ε : ℝ), + 0 < δ → 0 < τ → 0 < (s : ℝ) → τ ≤ s → s ≤ 1 → 0 ≤ ε → + τ / s + ε / τ ^ p ≤ 1 → + (∀ m, ReconstructionCoefficientBound (fun p => complexify (F p)) U s (m + 1) (B m)) → + ∀ (R : SupportedField (F := Ambient 4) K →ₗ[ℝ] SupportedField (F := Fin 3 → ℂ) K), + (∀ m Z, supportedWeightedSeminorm K s m (R Z) ≤ + ε / τ ^ p * D m * supportedWeightedSeminorm K s (m + L) Z) → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) N (freeNormal F) → + ∀ (ψ : 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 ≤ d → supportedWeightedSeminorm K s (m + 1 + (q + 1) * (L + 1)) ψ ≤ P → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) C u → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) C v → + WeightedBound U s (m + 1 + (q + 1) * (L + 1)) d (fun x => u x - v x) → + let bu := supportedRootAmplitude h.isOpen K hKU ψ u hu (fun _ hx => hr.trans_le (hru hx).1) + let bv := supportedRootAmplitude h.isOpen K hKU ψ v hv (fun _ hx => hr.trans_le (hrv hx).1) + ∀ a b : Base, ‖a‖ ≤ 1 → ‖b‖ ≤ 1 → + WeightedBound Set.univ s m ((τ / s + ε / τ ^ p) * E) + (normalizedPerturbedMean δ τ hF h K hKU R q bu a b) ∧ + WeightedBound Set.univ s m (E * (τ / s + ε / τ ^ p) * d) + (fun x => normalizedPerturbedMean δ τ hF h K hKU R q bu a b x - + normalizedPerturbedMean δ τ hF h K hKU R q bv a b x) := by + obtain ⟨A, hA, ha⟩ := supportedRootAmplitude_bounds h.isOpen K hKU (R := R₀) hr hC hP + (m + 1 + (q + 1) * (L + 1)) + have hA0 := zero_le_one.trans hA + let Cv := normalizedMeanBudget L B D q m N * A ^ 2 + let Cd := 2 * normalizedMeanBudget L B D q m N * A + let E := max 1 (max Cv (Cd * A)) + have hvE : Cv ≤ E := (le_max_left _ _).trans (le_max_right _ _) + have hdE : Cd * A ≤ E := (le_max_right _ _).trans (le_max_right _ _) + refine ⟨E, le_max_left _ _, ?_⟩ + intro δ τ s ε hδ hτ hs hτs hs1 hε hsmall hc R hR hbN + have hval := normalizedMeanBudget_bound δ τ hF h K hKU hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA0 hN hbN + have hdiff := normalizedMeanBudget_difference δ τ hF h K hKU hδ hτ hs hτs hs1 hε hsmall + B D hB hD hc R hR q m A N hA0 hN hbN + intro ψ u v hu hv hru hrv d hd hψ hbu hbv hdu + obtain ⟨hbu', hbv', hdu'⟩ := ha s ψ u v hu hv hru hrv d hs hd hψ hbu hbv hdu + dsimp only + intro a b ha hb + have hη : 0 ≤ τ / s + ε / τ ^ p := + add_nonneg (div_nonneg hτ.le hs.le) (div_nonneg hε (pow_nonneg hτ.le _)) + constructor + · exact (hval _ hbu' a b ha hb).mono_const (mul_le_mul_of_nonneg_left hvE hη) + · have hh := hdiff _ _ (A * d) (mul_nonneg hA0 hd) hbu' hbv' hdu' a b ha hb + apply hh.mono_const + calc + Cd * (τ / s + ε / τ ^ p) * (A * d) = (Cd * A) * ((τ / s + ε / τ ^ p) * d) := by ring + _ ≤ E * ((τ / s + ε / τ ^ p) * d) := mul_le_mul_of_nonneg_right hdE (mul_nonneg hη hd) + _ = _ := by ring + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformSmoothingInputProfiles.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformSmoothingInputProfiles.lean new file mode 100644 index 0000000000000000000000000000000000000000..c9ea2aabc041890b5cd9d207898c249a2ea03808 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UniformSmoothingInputProfiles.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CoupledSmoothing + +namespace OAI + +/-! The fixed low input norm supplies all profiles of the smoothed map +and tensor, before the true input or either scale is chosen. -/ +noncomputable section +open Set Manifold Bundle MeasureTheory +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open WeightedEstimates + +local instance smoothingProfileFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance smoothingProfileFiberSpace : NormedSpace ℝ TensorFiber := inferInstance + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +local instance smoothingProfileDualAdd : ∀ p : M, + ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance smoothingProfileDualSmul : ∀ p : M, + ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance smoothingProfileSectionNormed (p : M) : + NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance smoothingProfileSectionSpace (p : M) : + NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem uniform_smoothing_input_profiles (r : ℕ) (B : ℝ) (hB : 0 ≤ B) : + ∃ P C : ℕ → ℝ, (∀ m, 0 ≤ P m) ∧ (∀ m, 1 ≤ C m) ∧ + ∀ (G : M → Space) (H : ∀ x : M, CovariantTwoTensor x) (t s : ℝ), + 0 < t → t ≤ 1 → 0 < s → s ≤ 1 → + ContMDiff planeModel spaceModel ∞ G → + ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (H x)) → + A.InputBound t r B G H → + (∀ m, A.ShiftedBound 2 m s (P m) (A.smooth r s G)) ∧ + (∀ m, A.TensorWeightedBound s m (C m) (A.tensorSmooth r s H)) := by + classical + choose DG hDG hg using fun m => A.smoothing_shifted_gain (V := Space) r 2 m + choose DH hDH hh using fun m => A.tensor_smoothing_bounds r m + let P : ℕ → ℝ := fun m => + DG m * ((1 + (1 + ∫ y, ‖kernel 0 y‖) ^ r) + weightedGainConstant r m) * B + let C : ℕ → ℝ := fun m => 1 + DH m * weightedGainConstant r m * B + have hker : 0 ≤ ∫ y, ‖kernel 0 y‖ := integral_nonneg (fun _ => norm_nonneg _) + have hP (m : ℕ) : 0 ≤ P m := by + have := hDG m + have := weightedGainConstant_nonneg r m + dsimp [P] + positivity + have hC (m : ℕ) : 1 ≤ C m := by + have ht := mul_nonneg (mul_nonneg (hDH m) (weightedGainConstant_nonneg r m)) hB + dsimp [C] + linarith + refine ⟨P,C,hP,hC,?_⟩ + intro G H t s _ht _ht1 hs hs1 hG hH hinput + have hprefix : A.ShiftedBound 2 0 1 B G := by + intro i j hj x + have hj2 : j ≤ 2 := by omega + have hjr : j ≤ 2 + r := by omega + have hb := hinput.1 i j hjr x + simpa only [Nat.sub_eq_zero_of_le hj2,pow_zero,one_mul] using hb + refine ⟨fun m => hg m G s B hs hs1 hB hG hprefix,?_⟩ + intro m i + have hzero : A.TensorWeightedBound t 0 B H := + fun k => (hinput.2 k).mono_order (Nat.zero_le r) + exact ((hh m).2 H s t B hs hs1 hB hH hzero i).mono_const (by + change DH m * weightedGainConstant r m * B ≤ 1 + DH m * weightedGainConstant r m * B + linarith) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedFreeModeIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedFreeModeIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..cca417b8f743fcf3d1000a69853520712a5c9870 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedFreeModeIdentity.lean @@ -0,0 +1,109 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverScale +import OAI.Geometry.SurfaceImmersion.Correction.ChartedCombinedMean + +namespace OAI + +/-! The unperturbed supported solver is exactly the explicit finite +metric-mode parametrix, including its quadratic mean. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.SmallModes +open JetPolynomial +variable {n : ℕ} {G : Field n} {U : Set Base} + +lemma perturbedFreeMode_zero (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (V : SupportedField (F := Ambient n) K) (q : ℕ) : + (perturbedFreeMode τ hG h K hKU 0 V q : Field n) = modeApprox τ G V (fun _ => 0) q := by + induction q with + | zero => rfl + | succ q ih => + have he : (fun p => conjugatedD τ G + (perturbedFreeMode τ hG h K hKU 0 V q) p) = + residual τ G (fun _ => 0) (modeApprox τ G V (fun _ => 0) q) := by + rw [ih] + funext p + simp only [residual, sub_zero] + funext p + change (perturbedFreeMode τ hG h K hKU 0 V q) p - + initialAmplitude τ G (fun _ => 0) + (fun y => conjugatedD τ G (perturbedFreeMode τ hG h K hKU 0 V q) y + 0 - 0) p = _ + simp only [add_zero, sub_zero, he] + rw [show (perturbedFreeMode τ hG h K hKU 0 V q) p = + modeApprox τ G V (fun _ => 0) q p from congrFun ih p] + rfl + +lemma perturbedFreeLM_zero (τ : ℝ) (hG : ContDiff ℝ ∞ G) (h : ModeDomain G U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (V : SupportedField (F := Ambient n) K) (q : ℕ) : + (perturbedFreeLM τ hG h K hKU 0 q V : Field n) = modeApprox τ G V (fun _ => 0) q := by + rw [perturbedFreeLM_apply] + exact perturbedFreeMode_zero τ hG h K hKU V q + +end ClosedSurfaceR4.SmallModes + +namespace ClosedSurfaceR4.RealModes +open SmallModes +open JetPolynomial (SupportedField) +variable {F : RField 4} {U : Set Base} + +lemma normalizedPerturbedMean_zero (δ τ : ℝ) (hF : ContDiff ℝ ∞ F) (h : RealModeDomain F U) + (K : Compacts Base) (hKU : (K : Set Base) ⊆ U) + (q : ℕ) (b : SupportedField (F := ℝ) K) (v w p : Base) : + normalizedPerturbedMean δ τ hF h K hKU 0 q b v w p = + normalizedMeanError δ τ F b q v w p := by + have he := perturbedFreeLM_zero τ (contDiff_complexify hF) (h.complexDomain hF) + K hKU (supportedFreeSeed δ τ hF h K hKU b) q + change δ⁻¹ ^ 2 * + (QuadraticMean.zeroPair + (gradientAmplitude τ (perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) + K hKU 0 q (supportedFreeSeed δ τ hF h K hKU b)) v p) + (gradientAmplitude τ (perturbedFreeLM τ (contDiff_complexify hF) (h.complexDomain hF) + K hKU 0 q (supportedFreeSeed δ τ hF h K hKU b)) w p) - + QuadraticMean.zeroPair (leadingDerivative τ (freeSeed δ τ b F) v p) + (leadingDerivative τ (freeSeed δ τ b F) w p)) = _ + rw [he] + simp only [normalizedMeanError, modeMeanError, inv_pow] + rfl + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData +open PhaseMean RealModes +variable {n : ℕ} {P : Fin 3 → Fin n → Expression} {τ : ℝ} + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {s : ℝ≥0} + (c : PolynomialSolveData P 0 G hG φ K τ s) + +lemma operator_unperturbed : c.operator = 0 := + phaseChartPolynomialOperator_zero c.openO c.openU P c.smoothP hG c.mapsG K c.supportU + c.smoothPhase τ c.e c.smoothForward c.smoothInverse c.supportChart + +lemma metricMeanInChart_unperturbed (δ : ℝ) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) : + c.metricMeanInChart δ q b = meanTensor δ τ c.realMap b q := by + funext y k + unfold metricMeanInChart + rw [c.operator_unperturbed] + exact normalizedPerturbedMean_zero δ τ c.smoothMap c.realDomain c.chartCompact + (chartSupport_subset c.e (modeSupport K) c.supportChart) q b (firstDirection k) (secondDirection k) y + +lemma combinedMeanField_unperturbed (δ : ℝ) (q : ℕ) + (b : SupportedField (F := ℝ) c.chartCompact) (x : SmallModes.Base) : + c.combinedMeanField δ q b x = c.e.source.indicator + (fun p => pullbackField c.e p (meanTensor δ τ c.realMap b q (c.e p))) x := by + have hz : c.polynomialMeanField δ q b = 0 := by + ext y k + change normalizedPolynomialMean (P k) δ 0 G φ (c.originalFreeSeed δ q b) τ 0 y = 0 + simp [normalizedPolynomialMean, quadraticMeanCoefficient, conjugated] + change c.metricMeanField δ q b x + (pushSupported planeCoordinateIsometry K (c.polynomialMeanField δ q b)) x = _ + rw [hz] + change c.metricMeanField δ q b x + (0 : Tensor) = _ + rw [add_zero, metricMeanField_apply, c.metricMeanInChart_unperturbed] + +end ClosedSurfaceR4.JetPolynomial.Perturbation.PolynomialSolveData + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanDataFromBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanDataFromBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..2f53b67b5fa49f6e24c46c5564134e511422ef0c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanDataFromBounds.lean @@ -0,0 +1,75 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UnperturbedSolverRestrictedDomain +import OAI.Geometry.SurfaceImmersion.Correction.UniformLinearChartedMeanData + +namespace OAI + +/-! Complete actual mean data from the local geometry and its specified +budgets. Compact positional jets are obtained on a bounded source domain. -/ +noncomputable section +open Set TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open WeightedEstimates PhaseMean + +theorem unperturbed_mean_data_from_bounds + {G : Base → Space} {hG : ContDiff ℝ ∞ G} {φ : Base → ℝ} + {K : Compacts Base} {τ : ℝ} {s : ℝ≥0} + (c : PolynomialSolveData emptyMetricPolynomial 0 G hG φ K τ s) + {U : Set Base} (hU : IsOpen U) (K₀ : Compacts Base) + (hUK : U ⊆ K₀) (hKU : (K : Set Base) ⊆ U) + (hs : 0 < (s : ℝ)) (hs1 : s ≤ 1) + (ψ : SupportedField (F := ℝ) c.chartCompact) + (Q : SmallModes.Base → Tensor →L[ℝ] ℝ) + {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (loc : LocalBounds c.e.source c.e.target s r ρ R reference + c.realMap ψ Q c.e c.e.symm) + (b : Budgets c.e.source c.e.target s c.realMap ψ Q c.e c.e.symm) + (Pjet : ℕ → ℝ) (hPjet : ∀ m, 0 ≤ Pjet m) + (hpref : ∀ m j, j ≤ m+2 → WeightedBound U 1 j + (Pjet m/(s : ℝ)^(j-2)) G) : + ∃ d : ChartedMeanData (c.onSourceDomain U hU hKU) r ρ R reference, + d.cutoff = ψ ∧ d.form = Q ∧ + d.budgets.inv = b.inv ∧ d.budgets.chi = b.chi ∧ + d.budgets.forms = b.forms ∧ d.budgets.pull = b.pull ∧ + d.budgets.psi = b.psi ∧ d.budgets.normal = b.normal ∧ d.budgets.mode = b.mode := by + classical + choose D hD hd using fun m => bounded_lowJet_prefix hU K₀ hUK m + have hφ (v : Fin 2) : ContDiff ℝ ∞ (fun x => fderiv ℝ φ x (coordinateVector v)) := + (c.smoothPhase.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + choose A hA ha using fun (m : ℕ) (v : Fin 2) => compact_local_weighted_bound + hU isOpen_univ K₀.isCompact hUK (subset_univ _) (hφ v).contDiffOn m + let B := fun m => D m+Pjet m + let F := fun m => ∑ v : Fin 2, A m v + refine ⟨{ + cutoff := ψ + form := Q + localBounds := loc + budgets := b + compactJets := lowJet G '' (K₀ : Set Base) + compact := K₀.isCompact.image (lowJet_smooth hG).continuous + subsetDomain := subset_univ _ + mapsJets := fun x hx => ⟨x,hUK hx,rfl⟩ + B := B + F := F + oneLEB := fun m => (hD m).trans (le_add_of_nonneg_right (hPjet m)) + nonnegF := fun m => Finset.sum_nonneg (fun v _ => zero_le_one.trans (hA m v)) + jetsBound := ?_ + phaseBound := ?_ + },rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl,rfl⟩ + · intro m + change WeightedBound U s (m+tensorOrder emptyMetricPolynomial) (B m) (lowJet G) + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero] using + hd m G hG s (Pjet m) hs hs1 (hPjet m) (hpref m) + · intro m v + change WeightedBound U s (m+tensorOrder emptyMetricPolynomial) (F m) + (fun x => fderiv ℝ φ x (coordinateVector v)) + have hv : A m v ≤ F m := Finset.single_le_sum + (fun w _ => zero_le_one.trans (hA m w)) (Finset.mem_univ v) + simpa only [tensorOrder_emptyMetricPolynomial,Nat.add_zero] using + (ha m v s s.coe_nonneg hs1).mono_const hv + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanIdentity.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanIdentity.lean new file mode 100644 index 0000000000000000000000000000000000000000..815e85e0da8bbb807c42f6727d830d769f47213d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/UnperturbedMeanIdentity.lean @@ -0,0 +1,28 @@ +import OAI.Geometry.SurfaceImmersion.Correction.ChartedFreeMetricSplit + +namespace OAI + +/-! At zero perturbation the actual quadratic mean is its metric zero phase. -/ +noncomputable section +open scoped ContDiff BigOperators NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean +namespace ChartedMeanFamilyData + +lemma quadraticMean_unperturbed {n : ℕ} {P : Fin 3 → Fin n → Expression} + {τ : ℝ} {s : ℝ≥0} {r ρ R : ℝ} {reference : SmallModes.Base → Tensor} + (d : ChartedMeanFamilyData P 0 τ s r ρ R reference) + (hρ : 0 < ρ) (δ : ℝ) (q : ℕ) (f : SmallModes.Base → Tensor) : + d.quadraticMean hρ δ q f = RealModes.zeroPhaseSum τ + (fun j => coordinatePhase (d.phase j)) + (fun j => coordinateAmplitude ((d.data j).freeAmplitude hρ δ q f)) := by + ext x k + simp [quadraticMean,combinedQuadraticMean,coordinateQuadraticMean, + quadraticMeanCoefficient,conjugated] + +end ChartedMeanFamilyData +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedJetExpressions.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedJetExpressions.lean new file mode 100644 index 0000000000000000000000000000000000000000..2b62a0e2604f84516b966c7edcac466137cbe61f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedJetExpressions.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedLowCoefficients +import OAI.Geometry.SurfaceImmersion.Correction.JetPolynomialAlgebra + +namespace OAI + +/-! Uniform weighted estimates for actual coordinate-jet expressions. +The scale exponent is the algebraic excess-jet loss and is independent of +the requested output derivative order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial.Expression +open WeightedEstimates + +lemma parameter_smooth {O : Set LowJet} {U : Set Base} {G : Base → Space} + (hG : ContDiff ℝ ∞ G) (hQ : Set.MapsTo (lowJet G) U O) + {e : Expression} (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⟩) + +/-- Compact low-jet control bounds every finite correction expression. +Only the numerical prefactor depends on the output derivative order. -/ +theorem compact_expression_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 : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G : Base → Space) (s : ℝ), 0 < s → s ≤ 1 → + ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) U K → + WeightedBound U s (m + e.order) B (lowJet G) → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D / s ^ e.loss) (fun p => e.eval G (p, t)) := by + induction e with + | coeff c => + obtain ⟨D, hD, hd⟩ := compact_low_coefficient hU hO hK hKO he m B hB + refine ⟨D, hD, ?_⟩ + intro G s hs _ hG hGK hb t ht + simpa only [loss, pow_zero, div_one, eval] using + hd (lowJet G) s hs (lowJet_smooth hG).contDiffOn hGK (hb.mono_order (by omega)) t ht + | atom w a e ih => + obtain ⟨D, hD, hd⟩ := ih he + refine ⟨2 ^ m * B * D, by positivity, ?_⟩ + intro G s hs hs1 hG hGK hb t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have hj := weighted_actual_jet hU hG hs (zero_le_one.trans hB) m w a + (hb.mono_order (by simp only [order]; omega)) + have hb' := hd G s hs hs1 hG hGK (hb.mono_order (by simp only [order]; omega)) t ht + have hp := hj.mul_real hU.uniqueDiffOn hs.le (by positivity) (by positivity) + (jet_smooth hG w a).contDiffOn (parameter_smooth hG hQ (e := e) he t) hb' + convert hp using 1 <;> first | rfl | simp only [loss, pow_add]; ring + | add e f ihe ihf => + obtain ⟨D, hD, hd⟩ := ihe he.1 + obtain ⟨C, hC, hc⟩ := ihf he.2 + refine ⟨D + C, add_nonneg hD hC, ?_⟩ + intro G s hs hs1 hG hGK hb t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have hd' := hd G s hs hs1 hG hGK (hb.mono_order (by simp only [order]; omega)) t ht + have hc' := hc G s hs hs1 hG hGK (hb.mono_order (by simp only [order]; omega)) t ht + have hd'' : WeightedBound U s m (D / s ^ max e.loss f.loss) (fun p => e.eval G (p, t)) := + hd'.mono_const (div_le_div_of_nonneg_left hD (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_left _ _))) + have hc'' : WeightedBound U s m (C / s ^ max e.loss f.loss) (fun p => f.eval G (p, t)) := + hc'.mono_const (div_le_div_of_nonneg_left hC (pow_pos hs _) + (pow_le_pow_of_le_one hs.le hs1 (le_max_right _ _))) + simpa only [loss, add_div, eval] using hd''.add hU.uniqueDiffOn hs.le + (parameter_smooth hG hQ (e := e) he.1 t) (parameter_smooth hG hQ (e := f) he.2 t) hc'' + +end ClosedSurfaceR4.JetPolynomial.Expression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..1058a265692b3eb9a715dae7f3b6feba9f9c0d34 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialBounds.lean @@ -0,0 +1,100 @@ +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Weighted estimates for the finite higher-jet monomials in paper 094-01. +The loss exponent adds under products and is unchanged when the output +order increases; only the multiplicative constant depends on that order. -/ +noncomputable section +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.WeightedEstimates + +variable {A E : Type*} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [NormedSpace ℝ E] + +lemma weightedBound_const (U : Set A) (s : ℝ) (m : ℕ) (c : E) : + WeightedBound U s m ‖c‖ (fun _ => c) := by + intro j _ x _ + by_cases hj : j = 0 + · subst j + simp only [pow_zero, one_mul, norm_iteratedFDerivWithin_zero] + exact le_rfl + · rw [iteratedFDerivWithin_const_of_ne hj] + simp [norm_nonneg c] + +lemma WeightedBound.smul_real {U : Set A} (hU : UniqueDiffOn ℝ U) + {s C D : ℝ} {m : ℕ} {c : A → ℝ} {f : A → E} + (hs : 0 ≤ s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hc : ContDiffOn ℝ ∞ c U) (hf : ContDiffOn ℝ ∞ f U) + (hbc : WeightedBound U s m C c) (hbf : WeightedBound U s m D f) : + WeightedBound U s m (2 ^ m * C * D) (fun x => c x • f x) := by + have h := hbc.bilinear hU hs hC hD hc hf hbf (ContinuousLinearMap.lsmul ℝ ℝ) + apply h.mono_const + exact mul_le_of_le_one_left (by positivity) ContinuousLinearMap.opNorm_lsmul_le + +lemma WeightedBound.mul_real {U : Set A} (hU : UniqueDiffOn ℝ U) + {s C D : ℝ} {m : ℕ} {f g : A → ℝ} + (hs : 0 ≤ s) (hC : 0 ≤ C) (hD : 0 ≤ D) + (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) + (hbf : WeightedBound U s m C f) (hbg : WeightedBound U s m D g) : + WeightedBound U s m (2 ^ m * C * D) (fun x => f x * g x) := + hbf.smul_real hU hs hC hD hf hg hbg + +/-- A finite product pays only the sum of the factor losses in the scale. -/ +lemma WeightedBound.finset_prod {ι : Type*} {U : Set A} (hU : UniqueDiffOn ℝ U) + {s : ℝ} {m : ℕ} (hs : 0 ≤ s) (a : Finset ι) (C : ι → ℝ) (f : ι → A → ℝ) + (hC : ∀ i ∈ a, 0 ≤ C i) (hf : ∀ i ∈ a, ContDiffOn ℝ ∞ (f i) U) + (hb : ∀ i ∈ a, WeightedBound U s m (C i) (f i)) : + WeightedBound U s m ((2 ^ m) ^ a.card * ∏ i ∈ a, C i) (fun x => ∏ i ∈ a, f i x) := by + classical + induction a using Finset.induction_on with + | empty => simpa using weightedBound_const U s m (1 : ℝ) + | @insert i a hi ih => + have hCa : ∀ j ∈ a, 0 ≤ C j := fun j hj => hC j (Finset.mem_insert_of_mem hj) + have hfa : ∀ j ∈ a, ContDiffOn ℝ ∞ (f j) U := + fun j hj => hf j (Finset.mem_insert_of_mem hj) + have hba : ∀ j ∈ a, WeightedBound U s m (C j) (f j) := + fun j hj => hb j (Finset.mem_insert_of_mem hj) + have hh := (hb i (Finset.mem_insert_self i a)).mul_real hU hs + (hC i (Finset.mem_insert_self i a)) + (mul_nonneg (by positivity) (Finset.prod_nonneg hCa)) + (hf i (Finset.mem_insert_self i a)) (contDiffOn_prod hfa) (ih hCa hfa hba) + have he : 2 ^ m * C i * ((2 ^ m) ^ a.card * ∏ j ∈ a, C j) = + (2 ^ m) ^ (a.card + 1) * (C i * ∏ j ∈ a, C j) := by rw [pow_succ]; ring + rw [he] at hh + simpa only [Finset.card_insert_of_notMem hi, Finset.prod_insert hi] using hh + +lemma WeightedBound.finset_prod_losses {ι : Type*} {U : Set A} (hU : UniqueDiffOn ℝ U) + {s : ℝ} {m : ℕ} (hs : 0 < s) (a : Finset ι) (C : ι → ℝ) (p : ι → ℕ) + (f : ι → A → ℝ) (hC : ∀ i ∈ a, 0 ≤ C i) + (hf : ∀ i ∈ a, ContDiffOn ℝ ∞ (f i) U) + (hb : ∀ i ∈ a, WeightedBound U s m (C i / s ^ p i) (f i)) : + WeightedBound U s m + (((2 ^ m) ^ a.card * ∏ i ∈ a, C i) / s ^ (∑ i ∈ a, p i)) + (fun x => ∏ i ∈ a, f i x) := by + have h := WeightedBound.finset_prod hU hs.le a (fun i => C i / s ^ p i) f + (fun i hi => div_nonneg (hC i hi) (pow_nonneg hs.le _)) hf hb + simpa only [Finset.prod_div_distrib, Finset.prod_pow_eq_pow_sum, mul_div_assoc] using h + +/-- A common loss bound for a finite polynomial is the maximum of the +monomial losses, independent of the number of output derivatives. -/ +lemma WeightedBound.finset_sum_losses {ι : Type*} {U : Set A} (hU : UniqueDiffOn ℝ U) + {s : ℝ} {m p : ℕ} (hs : 0 < s) (hs1 : s ≤ 1) (a : Finset ι) + (C : ι → ℝ) (loss : ι → ℕ) (f : ι → A → E) + (hC : ∀ i ∈ a, 0 ≤ C i) (hp : ∀ i ∈ a, loss i ≤ p) + (hf : ∀ i ∈ a, ContDiffOn ℝ ∞ (f i) U) + (hb : ∀ i ∈ a, WeightedBound U s m (C i / s ^ loss i) (f i)) : + WeightedBound U s m ((∑ i ∈ a, C i) / s ^ p) (fun x => ∑ i ∈ a, f i x) := by + have hm (i : ι) (hi : i ∈ a) : WeightedBound U s m (C i / s ^ p) (f i) := by + apply (hb i hi).mono_const + exact div_le_div_of_nonneg_left (hC i hi) (pow_pos hs p) + (pow_le_pow_of_le_one hs.le hs1 (hp i hi)) + simpa only [Finset.sum_div] using + WeightedBound.finset_sum hU hs.le a (fun i => C i / s ^ p) f hf hm + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialVariation.lean b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialVariation.lean new file mode 100644 index 0000000000000000000000000000000000000000..7434aa417df1d0c68edcf7aadab2d7a8e8361836 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Correction/WeightedPolynomialVariation.lean @@ -0,0 +1,130 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.WeightedCoefficientVariation +import OAI.Geometry.SurfaceImmersion.Correction.WeightedJetExpressions + +namespace OAI + +/-! A first-variation estimate for every finite higher-jet polynomial. +Its scale exponent is fixed by the polynomial, independently of output order. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +lemma weighted_plain_jet {U : Set Base} (hU : IsOpen U) {H : Base → Space} + (hH : ContDiff ℝ ∞ H) {s C : ℝ} (hs : 0 < s) (hC : 0 ≤ C) + (m : ℕ) (w : List (Fin 2)) (a : Fin 4) + (hb : WeightedBound U s (m + w.length) C H) : + WeightedBound U s m (C / s ^ w.length) (jet H w a) := by + have hc := hb.component hU.uniqueDiffOn hs.le hC hH.contDiffOn a + have hcw : WeightedBound U s (m + (w.map coordinateVector).length) C (fun p => H p a) := by + simpa only [List.length_map] using hc + change WeightedBound U s m (C / s ^ w.length) + (iteratedDirectional (w.map coordinateVector) (fun x => H x a)) + simpa only [List.length_map] using hcw.iteratedDirectional hU hs hC + (contDiff_pi.mp hH a).contDiffOn (w.map coordinateVector) + (fun v hv => by + obtain ⟨i, _, rfl⟩ := List.mem_map.mp hv + exact norm_coordinateVector_le i) m + +namespace Expression + +lemma order_ge_two (e : Expression) : 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 _ _) + +private lemma increase_loss {U : Set Base} {s D : ℝ} {m d p : ℕ} {f : Base → ℝ} + (hs : 0 < s) (hs1 : s ≤ 1) (hD : 0 ≤ D) (hdp : d ≤ p) + (hb : WeightedBound U s m (D / s ^ d) f) : WeightedBound U s m (D / s ^ p) f := + hb.mono_const (div_le_div_of_nonneg_left hD (pow_pos hs p) + (pow_le_pow_of_le_one hs.le hs1 hdp)) + +theorem compact_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 : ℝ) (hB : 1 ≤ B) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (G H : Base → Space) (s C : ℝ), + 0 < s → s ≤ 1 → 0 ≤ C → ContDiff ℝ ∞ G → ContDiff ℝ ∞ H → + Set.MapsTo (lowJet G) U K → + WeightedBound U s (m + e.order) B (lowJet G) → + WeightedBound U s (m + e.order) C H → + ∀ t ∈ Set.Icc (0 : ℝ) 1, + WeightedBound U s m (D * C / s ^ (e.loss + e.order)) + (fun p => e.variation G H (p, t)) := by + induction e with + | coeff c => + obtain ⟨D, hD, hb⟩ := compact_coefficient_variation hU hO hK hKO he m B hB + refine ⟨D, hD, ?_⟩ + intro G H s C hs hs1 hC hG hH hGK hGb hHb t ht + exact hb G H s C hs hs1 hC hG hH hGK (hGb.mono_order (by simp [order])) hHb t ht + | atom w a e ih => + obtain ⟨D, hD, hb⟩ := ih he + obtain ⟨A, hA, ha⟩ := compact_expression_bound hU hO hK hKO e he m B hB + refine ⟨2 ^ m * A + 2 ^ m * B * D, by positivity, ?_⟩ + intro G H s C hs hs1 hC hG hH hGK hGb hHb t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have htail := ha G s hs hs1 hG hGK (hGb.mono_order (by simp only [order]; omega)) t ht + have hvar := hb G H s C hs hs1 hC hG hH hGK + (hGb.mono_order (by simp only [order]; omega)) (hHb.mono_order (by simp only [order]; omega)) t ht + have hhjet := weighted_plain_jet hU hH hs hC m w a + (hHb.mono_order (by simp only [order]; omega)) + have hgjet := weighted_actual_jet hU hG hs (zero_le_one.trans hB) m w a + (hGb.mono_order (by simp only [order]; omega)) + have hfirst := hhjet.mul_real hU.uniqueDiffOn hs.le (by positivity) (by positivity) + (jet_smooth hH w a).contDiffOn (parameter_smooth (e := e) hG hQ he t) htail + have hsecond := hgjet.mul_real hU.uniqueDiffOn hs.le (by positivity) (by positivity) + (jet_smooth hG w a).contDiffOn + ((variation_smooth (e := e) hO hG hH hQ he).comp + (contDiffOn_id.prodMk contDiffOn_const) (fun _ hp => ⟨hp, Set.mem_univ t⟩)) hvar + have hfirst' : WeightedBound U s m ((2 ^ m * A * C) / s ^ (w.length + e.loss)) + (fun p => jet H w a p * e.eval G (p, t)) := by + convert hfirst using 1 + rw [pow_add] + ring + have hsecond' : WeightedBound U s m + ((2 ^ m * B * D * C) / s ^ ((w.length - 2) + (e.loss + e.order))) + (fun p => jet G w a p * e.variation G H (p, t)) := by + convert hsecond using 1 <;> first | rfl | rw [pow_add]; ring + have hp1 := increase_loss hs hs1 (by positivity : 0 ≤ 2 ^ m * A * C) + (show w.length + e.loss ≤ (atom w a e).loss + (atom w a e).order by + have hn := order_ge_two e + simp only [loss, order] + omega) hfirst' + have hp2 := increase_loss hs hs1 (by positivity : 0 ≤ 2 ^ m * B * D * C) + (show (w.length - 2) + (e.loss + e.order) ≤ (atom w a e).loss + (atom w a e).order by + simp only [loss, order] + omega) hsecond' + have hsum := hp1.add hU.uniqueDiffOn hs.le + ((jet_smooth hH w a).contDiffOn.mul (parameter_smooth (e := e) hG hQ he t)) + ((jet_smooth hG w a).contDiffOn.mul + ((variation_smooth (e := e) hO hG hH hQ he).comp + (contDiffOn_id.prodMk contDiffOn_const) (fun _ hp => ⟨hp, Set.mem_univ t⟩))) hp2 + convert hsum using 1 <;> first | rfl | ring + | add e f ihe ihf => + obtain ⟨D, hD, hd⟩ := ihe he.1 + obtain ⟨A, hA, ha⟩ := ihf he.2 + refine ⟨D + A, add_nonneg hD hA, ?_⟩ + intro G H s C hs hs1 hC hG hH hGK hGb hHb t ht + have hQ : Set.MapsTo (lowJet G) U O := fun _ hp => hKO (hGK hp) + have hd' := hd G H s C hs hs1 hC hG hH hGK + (hGb.mono_order (by simp only [order]; omega)) (hHb.mono_order (by simp only [order]; omega)) t ht + have ha' := ha G H s C hs hs1 hC hG hH hGK + (hGb.mono_order (by simp only [order]; omega)) (hHb.mono_order (by simp only [order]; omega)) t ht + have hd'' := increase_loss hs hs1 (mul_nonneg hD hC) + (show e.loss + e.order ≤ (add e f).loss + (add e f).order by simp only [loss, order]; omega) hd' + have ha'' := increase_loss hs hs1 (mul_nonneg hA hC) + (show f.loss + f.order ≤ (add e f).loss + (add e f).order by simp only [loss, order]; omega) ha' + have hsum := hd''.add hU.uniqueDiffOn hs.le + ((variation_smooth (e := e) hO hG hH hQ he.1).comp + (contDiffOn_id.prodMk contDiffOn_const) (fun _ hp => ⟨hp, Set.mem_univ t⟩)) + ((variation_smooth (e := f) hO hG hH hQ he.2).comp + (contDiffOn_id.prodMk contDiffOn_const) (fun _ hp => ⟨hp, Set.mem_univ t⟩)) ha'' + convert hsum using 1 <;> first | rfl | ring + +end Expression +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualCurveAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualCurveAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..f132432775f1503d4ba70f800af066e508e212ce --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualCurveAvoidance.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.ActualCrossingInvariant +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCurveAvoidance + +namespace OAI + +/-! Turn the componentwise ray exclusion into nonvanishing and non-antipodality +for the actual unit normal and second fundamental form. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes VelocityFrame + +lemma frameVector_avoids_negative_axis {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] + {n m : E} (hn : ‖n‖ = 1) (hm : ‖m‖ = 1) (hmn : inner ℝ m n = 0) + {v : ℝ × ℝ} (hv : 0 < v.1 ∨ v.2 ≠ 0) : + frameVector n m v ≠ 0 ∧ ‖frameVector n m v‖⁻¹ • frameVector n m v ≠ -n := by + let P := frameVector n m v + have hfirst : inner ℝ P n = v.1 := frameVector_inner_first hn hmn v + have hsecond : inner ℝ P m = v.2 := frameVector_inner_second hm hmn v + have hP : P ≠ 0 := by + intro hz + rw [hz,inner_zero_left] at hfirst hsecond + rcases hv with hp | hs + · linarith + · exact hs hsecond.symm + refine ⟨hP,?_⟩ + intro heq + have hscale : ‖P‖ • (‖P‖⁻¹ • P) = P := by + rw [smul_smul,mul_inv_cancel₀ (norm_ne_zero_iff.mpr hP),one_smul] + have hPeq : P = (-‖P‖) • n := by + rw [heq] at hscale + simpa only [smul_neg,neg_smul] using hscale.symm + have hnm : inner ℝ n m = 0 := by rw [real_inner_comm]; exact hmn + rw [hPeq,real_inner_smul_left,real_inner_self_eq_norm_sq,hn,one_pow,mul_one] at hfirst + rw [hPeq,real_inner_smul_left,hnm,mul_zero] at hsecond + rcases hv with hp | hs + · linarith [norm_nonneg P] + · exact hs hsecond.symm + +namespace SecondFormFrame +variable {F : RField 4} {p : Base} {k : ℝ} (d : SecondFormFrame F p k) + +lemma actual_curve_avoidance (hF : ContDiff ℝ ∞ F) (b c : ℝ) + (hcomp : 0 < (pureComponents d.S d.D d.N d.L k b c).1 ∨ + (pureComponents d.S d.D d.N d.L k b c).2 ≠ 0) : + realSecondForm F (b,c) (b,c) p ≠ 0 ∧ + normalize (realSecondForm F (b,c) (b,c) p) ≠ -d.n := by + have hmn : inner ℝ (spaceCoordinates.symm d.m) (spaceCoordinates.symm d.n) = 0 := by + rw [spaceCoordinates_symm_inner, dotProduct_comm] + exact d.orthogonal + obtain ⟨hneq,hanti⟩ := frameVector_avoids_negative_axis + (spaceCoordinates_norm_unit d.unit_n) (spaceCoordinates_norm_unit d.unit_m) hmn hcomp + rw [← d.pure_space_components hF b c] at hneq hanti + constructor + · intro hz + rw [hz,map_zero] at hneq + exact hneq rfl + · intro heq + apply hanti + have he := congrArg spaceCoordinates.symm heq + simpa only [spaceCoordinates_symm_normalize,map_neg] using he + +end SecondFormFrame +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualOperatorTolerance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualOperatorTolerance.lean new file mode 100644 index 0000000000000000000000000000000000000000..4067659d55adba4d77f81cd1d78ed5f199d5150e --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualOperatorTolerance.lean @@ -0,0 +1,112 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveFrameBounds +import OAI.Geometry.SurfaceImmersion.Primitive.FinitePrimitiveOperatorTolerance +import OAI.Geometry.SurfaceImmersion.Primitive.PrimitiveOperatorMask + +namespace OAI + +/-! Independent cutoff and phase perturbations give uniform control of +the actual operator in every chart of the fixed primitive atlas. -/ +noncomputable section +open Set Manifold +open scoped ContDiff Topology BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +local instance actualToleranceFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance actualToleranceFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance actualToleranceDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualToleranceDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := fun _ => inferInstance +local instance actualToleranceSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance actualToleranceSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (B : SmoothingAtlas M) + +theorem primitive_operator_tolerance + (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)) + (phi₀ : (B.centers × Fin 3) → M → ℝ) + (hphi₀ : ∀ a, ContMDiff planeModel 𝓘(ℝ) ∞ (phi₀ a)) + {eta : ℝ} (heta : 0 < eta) : + ∃ eps : ℝ, 0 < eps ∧ ∀ psi phi : (B.centers × Fin 3) → M → ℝ, + (∀ a, tsupport (psi a) ⊆ tsupport (B.weight a.1)) → + (∀ a p, |psi a p-B.weight a.1 p| < eps) → + (∀ (i : B.centers) (a : B.centers × Fin 3) p, p ∈ tsupport (B.weight i) → p ∈ tsupport (B.weight a.1) → + ‖B.covectorFrame i p (B.primitivePhaseCovector phi a p)- + B.covectorFrame i p (B.primitivePhaseCovector phi₀ a p)‖ < eps) → + ∀ i p, p ∈ tsupport (B.weight i) → + ‖B.tensorOperatorFrame i p (B.primitiveFullOperator P psi phi p)- + B.tensorOperatorFrame i p + (B.primitiveFullOperator P (fun a => B.weight a.1) phi₀ p)‖ < eta := by + classical + obtain ⟨Dq,hDq,hq⟩ := B.coefficientFrame_bound P hQ + choose Dv hDv hv using fun a => B.covectorFrame_bound (phi₀ a) (hphi₀ a) + let D : ℝ := Dq+1+∑ a, Dv a + have hDqD : Dq ≤ D := by + have := Finset.sum_nonneg (s := Finset.univ) (fun a _ => zero_le_one.trans (hDv a)); dsimp only [D]; linarith + have hD1 : 1 ≤ D := by linarith + have hDvD (a : B.centers × Fin 3) : Dv a ≤ D := by + have := Finset.single_le_sum (fun a _ => zero_le_one.trans (hDv a)) (Finset.mem_univ a) + dsimp only [D]; linarith + obtain ⟨eps,heps,_,hnear⟩ := finite_primitive_operator_tolerance (ι := B.centers × Fin 3) D heta + refine ⟨eps,heps,?_⟩ + intro psi phi hs hw hd i p hp + let S : Set (B.centers × Fin 3) := {a | p ∈ tsupport (B.weight a.1)} + let q := fun a => if a ∈ S then B.coefficientFrame P i a p else 0 + let v₀ := fun a => B.covectorFrame i p (B.primitivePhaseCovector phi₀ a p) + let v := fun a => if a ∈ S then B.covectorFrame i p (B.primitivePhaseCovector phi a p) else v₀ a + let z₀ : PrimitiveOperatorData (B.centers × Fin 3) := ((q,fun a => B.weight a.1 p),v₀) + let z : PrimitiveOperatorData (B.centers × Fin 3) := ((q,fun a => psi a p),v) + have hqD : ‖q‖ ≤ D := by + apply (pi_norm_le_iff_of_nonneg (zero_le_one.trans hD1)).mpr + intro a + dsimp [q] + split_ifs with ha + · exact (hq i a p hp ha).trans hDqD + · simpa only [norm_zero] using zero_le_one.trans hD1 + have hwD : ‖fun a : B.centers × Fin 3 => B.weight a.1 p‖ ≤ D := by + apply (pi_norm_le_iff_of_nonneg (zero_le_one.trans hD1)).mpr + intro a + have hh := Finset.single_le_sum (fun b _ => sq_nonneg (B.weight b p)) (Finset.mem_univ a.1) + rw [B.partition p] at hh + have hh' : |B.weight a.1 p| ≤ 1 := by nlinarith [sq_abs (B.weight a.1 p),abs_nonneg (B.weight a.1 p)] + exact (show ‖B.weight a.1 p‖ ≤ 1 by simpa only [Real.norm_eq_abs] using hh').trans hD1 + have hvD : ‖v₀‖ ≤ D := by + apply (pi_norm_le_iff_of_nonneg (zero_le_one.trans hD1)).mpr + intro a + exact (hv a i p hp).trans (hDvD a) + have hz₀ : ‖z₀‖ ≤ D := by + exact max_le (max_le hqD hwD) hvD + have hdist : ‖z-z₀‖ < eps := by + change max (max ‖q-q‖ ‖(fun a => psi a p)-(fun a => B.weight a.1 p)‖) ‖v-v₀‖ < eps + rw [sub_self,norm_zero] + apply max_lt + · apply max_lt heps + apply (pi_norm_lt_iff heps).mpr + intro a + simpa only [Pi.sub_apply,Real.norm_eq_abs] using hw a p + · apply (pi_norm_lt_iff heps).mpr + intro a + dsimp [v] + split_ifs with ha + · exact hd i a p hp ha + · simpa only [sub_self,norm_zero] using heps + have hz := hnear z₀ z hz₀ hdist + have hzero (a : B.centers × Fin 3) (ha : a ∉ S) : psi a p = 0 := + image_eq_zero_of_notMem_tsupport (fun hh => ha (hs a hh)) + have hzero₀ (a : B.centers × Fin 3) (ha : a ∉ S) : B.weight a.1 p = 0 := + image_eq_zero_of_notMem_tsupport ha + rw [B.primitiveFullOperator_frame P psi phi i (B.weight_support i hp), + B.primitiveFullOperator_frame P (fun a => B.weight a.1) phi₀ i (B.weight_support i hp)] + rw [completedPrimitiveOperator_mask _ _ _ v₀ S hzero, + completedPrimitiveOperator_mask _ _ _ v₀ S hzero₀] + simpa only [primitiveDataOperator,z,z₀,v₀,v,q,ite_self] using hz + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualSecondFormFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualSecondFormFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..55cde9a3ed4684ddfc69fcd62d7da201ad45e9b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ActualSecondFormFrame.lean @@ -0,0 +1,110 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussInvariance +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityCoordinateData + +namespace OAI + +/-! An actual orthonormal normal frame and the Gauss-constrained coordinates +of the second fundamental form of a smooth surface in four-space. -/ +noncomputable section +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +structure SecondFormFrame (F : RField 4) (p : Base) (k : ℝ) where + n : Vec + m : Vec + S : ℝ + D : ℝ + N : ℝ + L : ℝ + size_pos : 0 < S + unit_n : n ⬝ᵥ n = 1 + unit_m : m ⬝ᵥ m = 1 + orthogonal : n ⬝ᵥ m = 0 + tangent_n : coordDeriv dx F p ⬝ᵥ n = 0 ∧ coordDeriv dy F p ⬝ᵥ n = 0 + tangent_m : coordDeriv dx F p ⬝ᵥ m = 0 ∧ coordDeriv dy F p ⬝ᵥ m = 0 + xx : realSecondForm F dx dx p = ((k+D^2+N^2)/S) • n+L • m + xy : realSecondForm F dx dy p = D • n+N • m + yy : realSecondForm F dy dy p = S • n + +theorem exists_secondFormFrame_with_coordinates {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) : + ∃ d : SecondFormFrame F p + (coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p), + d.n = normalize (realSecondForm F dy dy p) ∧ + d.m = unitPerp (coordDeriv dx F p) (coordDeriv dy F p) d.n ∧ + d.S = Real.sqrt (realSecondForm F dy dy p ⬝ᵥ realSecondForm F dy dy p) ∧ + d.D = realSecondForm F dx dy p ⬝ᵥ d.n ∧ + d.N = realSecondForm F dx dy p ⬝ᵥ d.m ∧ + d.L = realSecondForm F dx dx p ⬝ᵥ d.m := by + let X := coordDeriv dx F p + let Y := coordDeriv dy F p + let B := realSecondForm F dy dy p + let n := normalize B + let m := unitPerp X Y n + let S := Real.sqrt (B ⬝ᵥ B) + let Bxx := realSecondForm F dx dx p + let Bxy := realSecondForm F dx dy p + let D := Bxy ⬝ᵥ n + let N := Bxy ⬝ᵥ m + let L := Bxx ⬝ᵥ m + let k := coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p + have hperp (v w : Base) : X ⬝ᵥ realSecondForm F v w p = 0 ∧ + Y ⬝ᵥ realSecondForm F v w p = 0 := realNormalPart_perp X Y _ hD + have hn : n ⬝ᵥ n = 1 := normalize_unit hB + have hnn : n ≠ 0 := normalize_nonzero hB + have hXn : X ⬝ᵥ n = 0 := dot_normalize_zero (hperp dy dy).1 + have hYn : Y ⬝ᵥ n = 0 := dot_normalize_zero (hperp dy dy).2 + obtain ⟨hXm,hYm,hnm⟩ := unitPerp_orthogonal X Y n + have hm : m ⬝ᵥ m = 1 := unitPerp_unit hD hnn hXn hYn + have hS : 0 < S := Real.sqrt_pos.mpr (VelocityFrame.dot_self_pos hB) + have hyy : B = S • n := (norm_smul_normalize hB).symm + have hreconstruct (v w : Base) : realSecondForm F v w p = + (realSecondForm F v w p ⬝ᵥ n) • n+(realSecondForm F v w p ⬝ᵥ m) • m := by + have hr := plane_coordinates_reconstruct hD hn hm hnm hXn hXm hYn hYm + (hperp v w).1 (hperp v w).2 + simpa only [planeLift_apply,VelocityFrame.planeCoordinates,Matrix.cons_val_zero, + Matrix.cons_val_one] using hr.symm + have hlength : D^2+N^2 = Bxy ⬝ᵥ Bxy := + plane_coordinates_length hD hn hm hnm hXn hXm hYn hYm (hperp dx dy).1 (hperp dx dy).2 + have hgauss : Bxx ⬝ᵥ B-Bxy ⬝ᵥ Bxy = k := gauss_metric_identity hF p hD + rw [hyy,dotProduct_smul] at hgauss + change S*(Bxx ⬝ᵥ n)-Bxy ⬝ᵥ Bxy = k at hgauss + have hcoef : Bxx ⬝ᵥ n = (k+D^2+N^2)/S := by + apply (eq_div_iff hS.ne').mpr + nlinarith + refine ⟨{ + n := n + m := m + S := S + D := D + N := N + L := L + size_pos := hS + unit_n := hn + unit_m := hm + orthogonal := hnm + tangent_n := ⟨hXn,hYn⟩ + tangent_m := ⟨hXm,hYm⟩ + xx := ?_ + xy := hreconstruct dx dy + yy := hyy },rfl,rfl,rfl,rfl,rfl,rfl⟩ + rw [hreconstruct dx dx] + change (Bxx ⬝ᵥ n) • n+L • m = _ + rw [hcoef] + + +theorem exists_secondFormFrame {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) : + Nonempty (SecondFormFrame F p + (coordinateGauss (realMetric F dx dx) (realMetric F dx dy) (realMetric F dy dy) p)) := by + obtain ⟨d,_⟩ := exists_secondFormFrame_with_coordinates hF p hD hB + exact ⟨d⟩ + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AmplitudeBoundaryMetric.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AmplitudeBoundaryMetric.lean new file mode 100644 index 0000000000000000000000000000000000000000..3ff7a0f29fa7a0a8a242f09d9b52637c2a75556a --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AmplitudeBoundaryMetric.lean @@ -0,0 +1,119 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.MetricGaussInvariance +import Mathlib.Analysis.Calculus.LocalExtr.Basic + +namespace OAI + +/-! At a zero of a nonnegative smooth amplitude, its square has zero two-jet. +Thus adding the primitive metric does not change the boundary Gauss scalar. -/ +noncomputable section +open Set Filter +open scoped ContDiff 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 scalar_partial_mul {f g : Base → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (v p : Base) : + coordDeriv v (fun x => f x*g x) p = coordDeriv v f p*g p+f p*coordDeriv v g p := by + unfold coordDeriv + rw [fderiv_fun_mul (hf.differentiable (by simp) p) (hg.differentiable (by simp) p)] + simp only [add_apply,smul_apply,smul_eq_mul] + ring + +private lemma scalar_partial_add {f g : Base → ℝ} (hf : ContDiff ℝ ∞ f) + (hg : ContDiff ℝ ∞ g) (v p : Base) : + coordDeriv v (fun x => f x+g x) p = coordDeriv v f p+coordDeriv v g p := by + unfold coordDeriv + rw [fderiv_fun_add (hf.differentiable (by simp) p) (hg.differentiable (by simp) p)] + rfl + +lemma square_twoJet_zero {a : Base → ℝ} (ha : ContDiff ℝ ∞ a) {p : Base} + (hzero : a p = 0) (hnonneg : ∀ᶠ q in 𝓝 p, 0 ≤ a q) : + (fun q => (a q)^2) p = 0 ∧ + (∀ v, coordDeriv v (fun q => (a q)^2) p = 0) ∧ + ∀ v w, coordDeriv v (coordDeriv w (fun q => (a q)^2)) p = 0 := by + have hmin : IsLocalMin a p := by simpa only [IsLocalMin,IsMinFilter,hzero] using hnonneg + have hda : fderiv ℝ a p = 0 := hmin.fderiv_eq_zero + have hd (v : Base) : coordDeriv v a p = 0 := by simp [coordDeriv,hda] + have heq (w : Base) : coordDeriv w (fun q => (a q)^2) = + fun q => coordDeriv w a q*a q+a q*coordDeriv w a q := by + funext q + simpa only [pow_two] using scalar_partial_mul ha ha w q + refine ⟨by simp [hzero],?_,?_⟩ + · intro v + rw [heq] + simp [hzero] + · intro v w + rw [heq,scalar_partial_add ((scalar_partial_smooth ha w).mul ha) + (ha.mul (scalar_partial_smooth ha w)), + scalar_partial_mul (scalar_partial_smooth ha w) ha, + scalar_partial_mul ha (scalar_partial_smooth ha w)] + simp [hzero,hd] + +lemma coordinateGauss_add_square_boundary {E F G a : Base → ℝ} + (hE : ContDiff ℝ ∞ E) (ha : ContDiff ℝ ∞ a) {p : Base} + (hzero : a p = 0) (hnonneg : ∀ᶠ q in 𝓝 p, 0 ≤ a q) : + coordinateGauss (fun q => E q+(a q)^2) F G p = coordinateGauss E F G p := by + obtain ⟨hz,hd,hdd⟩ := square_twoJet_zero ha hzero hnonneg + have hsq : ContDiff ℝ ∞ (fun q => (a q)^2) := ha.pow 2 + have hfirst (v : Base) : coordDeriv v (fun q => E q+(a q)^2) = + fun q => coordDeriv v E q+coordDeriv v (fun q => (a q)^2) q := by + funext q + exact scalar_partial_add hE hsq v q + have hsecond (v w : Base) : coordDeriv v (coordDeriv w (fun q => E q+(a q)^2)) p = + coordDeriv v (coordDeriv w E) p := by + rw [hfirst,scalar_partial_add (scalar_partial_smooth hE w) + (scalar_partial_smooth hsq w),hdd,add_zero] + unfold coordinateGauss + rw [hsecond] + simp only [hfirst,hd,hzero,zero_pow (by decide : 2 ≠ 0),add_zero] + +lemma factor_square_twoJet_zero {a f : Base → ℝ} (ha : ContDiff ℝ ∞ a) + (hf : ContDiff ℝ ∞ f) {p : Base} (hzero : a p = 0) + (hnonneg : ∀ᶠ q in 𝓝 p, 0 ≤ a q) : + (fun q => f q*(a q)^2) p = 0 ∧ + (∀ v, coordDeriv v (fun q => f q*(a q)^2) p = 0) ∧ + ∀ v w, coordDeriv v (coordDeriv w (fun q => f q*(a q)^2)) p = 0 := by + obtain ⟨hz,hd,hdd⟩ := square_twoJet_zero ha hzero hnonneg + have hsq : ContDiff ℝ ∞ (fun q => (a q)^2) := ha.pow 2 + have heq (w : Base) : coordDeriv w (fun q => f q*(a q)^2) = + fun q => coordDeriv w f q*(a q)^2+f q*coordDeriv w (fun q => (a q)^2) q := by + funext q + exact scalar_partial_mul hf hsq w q + refine ⟨by simp [hzero],?_,?_⟩ + · intro v + rw [heq] + simp only [hz,hd,mul_zero,add_zero] + · intro v w + rw [heq,scalar_partial_add ((scalar_partial_smooth hf w).mul hsq) + (hf.mul (scalar_partial_smooth hsq w)), + scalar_partial_mul (scalar_partial_smooth hf w) hsq, + scalar_partial_mul hf (scalar_partial_smooth hsq w)] + simp only [hz,hd,hdd,mul_zero,add_zero] + +lemma coordinateGauss_add_factor_square_boundary {E F G a f : Base → ℝ} + (hE : ContDiff ℝ ∞ E) (ha : ContDiff ℝ ∞ a) (hf : ContDiff ℝ ∞ f) {p : Base} + (hzero : a p = 0) (hnonneg : ∀ᶠ q in 𝓝 p, 0 ≤ a q) : + coordinateGauss (fun q => E q+f q*(a q)^2) F G p = coordinateGauss E F G p := by + obtain ⟨hz,hd,hdd⟩ := factor_square_twoJet_zero ha hf hzero hnonneg + have hsq : ContDiff ℝ ∞ (fun q => f q*(a q)^2) := hf.mul (ha.pow 2) + have hfirst (v : Base) : coordDeriv v (fun q => E q+f q*(a q)^2) = + fun q => coordDeriv v E q+coordDeriv v (fun q => f q*(a q)^2) q := by + funext q + exact scalar_partial_add hE hsq v q + have hsecond (v w : Base) : coordDeriv v (coordDeriv w (fun q => E q+f q*(a q)^2)) p = + coordDeriv v (coordDeriv w E) p := by + rw [hfirst,scalar_partial_add (scalar_partial_smooth hE w) + (scalar_partial_smooth hsq w),hdd,add_zero] + unfold coordinateGauss + rw [hsecond] + simp only [hfirst,hd,hz,add_zero] + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredActualStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredActualStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..8a1be81bc076fddb481362af6ee9afee6380c778 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredActualStep.lean @@ -0,0 +1,102 @@ +import OAI.Geometry.SurfaceImmersion.Correction.AnchoredSmoothedIncrement +import OAI.Geometry.SurfaceImmersion.Correction.ActualSmoothedStep + +namespace OAI + +/-! Actual normalized correction steps with an explicit fast-map neighborhood. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry MetricGoodPhaseData +local instance anchoredActualFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredActualFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredActualDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredActualDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredActualSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredActualSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_actual_step (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ a D K : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < a ∧ 1 ≤ D ∧ 0 ≤ K ∧ + ∀ r : ℕ, ∃ T : ℝ, 0 ≤ T ∧ + ∀ (q : ℕ) (Budget : ℝ → ℝ), HasPolynomialBound Budget → + ∃ e : ℕ, ∃ E : ℝ, ∃ P Q : ℕ → ℝ → ℝ, ∃ Dm Em : ℕ → ℝ, 1 ≤ E ∧ + (∀ m, HasPolynomialBound (P m)) ∧ (∀ m, HasPolynomialBound (Q m)) ∧ + (∀ m, 0 ≤ Dm m) ∧ (∀ m, 0 ≤ Em m) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ δ δ' t s τ : ℝ, 0 < δ → 0 < δ' → δ' ≤ δ → + 0 < t → t ≤ 1 → 0 < s → s ≤ t → 0 < τ → τ ≤ s → δ ≤ τ → + τ/s ≤ min 1 ((a-a/2)/(2*(E*(z⁻¹)^e))) → + A.InputBound t r (Budget z⁻¹) G (normalizedTensorDefect g.inner δ G) → + A.WeightedBound 1 2 ((z^4/D)/4) (G-F) → + (∀ x, ‖A.tensorEncode (normalizedTensorDefect g.inner δ G) x-A.tensorEncode g.inner x‖ ≤ a/8) → + T*(Budget z⁻¹)*(s/t)^r ≤ min ((z^4/D)/4) (a/8) → (δ'/δ)^2*K ≤ a/8 → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound τ m (P m z⁻¹*(δ*τ)) U) ∧ + ∀ m C, 0 ≤ C → A.InputBound t m C G (normalizedTensorDefect g.inner δ G) → + A.TensorWeightedBound τ m + (normalizedStepBound r q (Budget z⁻¹) (Dm m) (Em m) (P (m+1) z⁻¹) (Q m z⁻¹) C δ δ' τ s t) + (normalizedTensorDefect g.inner δ' (G+U)-g.inner) := by + classical + obtain ⟨z₀,a,D,hz₀,hz₀1,ha,hD,hall⟩ := A.anchored_smoothed_increment g houter R c B b hc hB hb + obtain ⟨K,hK,hKb⟩ := A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain 0 g.contMDiff + have hKn (x : JetPolynomial.Base) : ‖A.tensorEncode g.inner x‖ ≤ K := + (A.tensorEncode_bound g.contMDiff zero_lt_one hK hKb).norm_le (mem_univ x) + refine ⟨z₀,a,D,K,hz₀,hz₀1,ha,hD,hK,?_⟩ + intro r + obtain ⟨T,hT,hadmissible⟩ := A.smoothed_input_admissibility r + refine ⟨T,hT,?_⟩ + intro q Budget hBudget + obtain ⟨e,E,P,Q,hE,hP,hQ,hbuild⟩ := hall r q Budget hBudget + choose Dm Em hDm hEm hmetric using fun m => A.smoothed_normalized_metric_step_bound r m + refine ⟨e,E,P,Q,Dm,Em,hE,hP,hQ,hDm,hEm,?_⟩ + intro z hz hzsmall F hF hFb hFm G hG δ δ' t s τ hδ hδ' hδ'δ ht ht1 hs hst hτ hτs hδτ + hsmall hinput hnear hHnear htail hratio + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + let H := normalizedTensorDefect g.inner δ G + have hH := A.normalizedTensorDefect_smooth g.contMDiff δ hG + have hsym : ∀ y v w, H y v w = H y w v := by + intro y v w + change (δ^2)⁻¹*(g.inner y v w-inducedTensor G y v w) = + (δ^2)⁻¹*(g.inner y w v-inducedTensor G y w v) + rw [g.symm y v w,inducedTensor_symmetric G y v w] + have hρ : 0 < z^4/D := div_pos (pow_pos hz 4) (zero_lt_one.trans_le hD) + have had := hadmissible g F G H (z^4/D) a ((z^4/D)/4) (Budget z⁻¹) t s ((δ'/δ)^2) K + hρ ha (hBudget.nonneg hx) hs hst ht1 hF hG hH hinput hnear le_rfl hHnear htail + (sq_nonneg _) hKn hratio + have hsnear : A.WeightedBound 1 2 (z^4/D) (A.smooth r s G-F) := + fun i => (had.1 i).mono_const (by linarith) + obtain ⟨U,hU,hUB,hUE⟩ := hbuild z hz hzsmall F hF hFb hFm G H hG hH hsym t s ht ht1 hs + (hst.trans ht1) hinput hsnear δ δ' τ hδ hδ'.le hδ'δ hτ hτs hδτ hsmall had.2 + refine ⟨U,hU,hUB,?_⟩ + intro m C hC hCm + exact hmetric m g.inner g.contMDiff G U hG hU δ δ' τ s t (Budget z⁻¹) C + (P (m+1) z⁻¹*(δ*τ)) (Q m z⁻¹*(δ*(τ/s)^(q+1)+δ^3/τ)) + hδ.ne' hδ'.ne' hτ hτs hst ht1 (hBudget.nonneg hx) hC + (mul_nonneg ((hP _).nonneg hx) (mul_nonneg hδ.le hτ.le)) hinput hCm (hUB (m+1)) (hUE m) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredCellGeometry.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredCellGeometry.lean new file mode 100644 index 0000000000000000000000000000000000000000..2226a49e4c2e69bd22a958a6f159b49e0c53a31d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredCellGeometry.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.Immersion.ClosedSurface.PolynomialPhases + +namespace OAI + +/-! Phase cells anchored at the compact weight support need no enclosing +convex chart on which the immersion remains nondegenerate. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +lemma firstJet_anchor_neighborhood (R c A Q : ℝ) (hc : 0 < c) (hA : 0 ≤ A) (hQ : 0 ≤ Q) : + ∃ η : ℝ, 0 < η ∧ η ≤ 1 ∧ + ∀ z : ℝ, 0 < z → z ≤ η → ∀ F : RField 4, ContDiff ℝ ∞ F → + WeightedBound univ z 3 A F → ∀ x : Base, + ‖firstJetPair F x‖ ≤ R → c ≤ NormalFrame.gramDet (firstJetPair F x).1 (firstJetPair F x).2 → + ∀ y : Base, ‖y-x‖ ≤ Q*z^6 → + ‖firstJetPair F y‖ ≤ R+1 ∧ + c/2 ≤ NormalFrame.gramDet (firstJetPair F y).1 (firstJetPair F y).2 := by + obtain ⟨ε,hε,hε1,hgram⟩ := uniform_gram_neighborhood R c hc + let η := min 1 (ε/(A*Q+1)) + have hη : 0 < η := lt_min zero_lt_one (div_pos hε (by positivity)) + refine ⟨η,hη,min_le_left _ _,?_⟩ + intro z hz hzη F hF hb x hx hxg y hy + have hz1 : z ≤ 1 := hzη.trans (min_le_left _ _) + have hze : z ≤ ε/(A*Q+1) := hzη.trans (min_le_right _ _) + have hz4 : z^4 ≤ z := by + calc + z^4 ≤ z^1 := pow_le_pow_of_le_one hz.le hz1 (by omega) + _ = z := pow_one z + have hsmall : A*Q*z^4 ≤ ε := by + have hh := (le_div_iff₀ (by positivity : 0 < A*Q+1)).mp hze + nlinarith [mul_le_mul_of_nonneg_left hz4 (mul_nonneg hA hQ)] + have hv := (coordinate_jets_variation isOpen_univ (convex_univ : Convex ℝ (univ : Set Base)) + hF.contDiffOn hz hA hb (mem_univ x) (mem_univ y)).1 + have hclose : ‖firstJetPair F x-firstJetPair F y‖ ≤ ε := by + calc + _ ≤ (A/z^2)*‖x-y‖ := hv + _ = (A/z^2)*‖y-x‖ := by rw [norm_sub_rev x y] + _ ≤ (A/z^2)*(Q*z^6) := mul_le_mul_of_nonneg_left hy (div_nonneg hA (sq_nonneg z)) + _ = A*Q*z^4 := by field_simp [hz.ne'] + _ ≤ ε := hsmall + exact hgram _ _ hx hxg hclose + +end ClosedSurfaceR4.RealModes + +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes RealModes WeightedEstimates + +theorem anchored_polynomial_cell_phases {T : Set PhaseMean.Tensor} + (hT : IsCompact T) (hT0 : ∀ H ∈ T, 0 < H 0) + (hTd : ∀ H ∈ T, 0 < H 0*H 2-(H 1)^2) + (R c A b K : ℝ) (hc : 0 < c) (hA : 0 ≤ A) (hb : 0 < b) (hK : 0 ≤ K) : + ∃ stock : Finset PhaseBasis, ∃ ε C δ z₀ : ℝ, + 0 < ε ∧ 1 ≤ C ∧ 0 < δ ∧ 0 < z₀ ∧ z₀ ≤ 1 ∧ + (∀ P ∈ stock, ∀ i, ‖P.ξ i‖ ≤ C ∧ ‖P.Q i‖ ≤ C) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : RField 4, ContDiff ℝ ∞ F → + WeightedBound univ z 3 A F → ∀ (H : Base → PhaseMean.Tensor) (x : Base), + ‖firstJetPair F x‖ ≤ R → c ≤ NormalFrame.gramDet (firstJetPair F x).1 (firstJetPair F x).2 → + b ≤ ‖realSecondTensor F x‖ → H x ∈ T → + (∀ y, ‖H y-H x‖ ≤ K*‖y-x‖) → + ∃ P ∈ stock, ∀ (y : Base) (G : RField 4) (H' : PhaseMean.Tensor), + ‖y-x‖ ≤ 6*z^6 → + ‖firstJetPair F y-firstJetPair G y‖ ≤ z^4 → + ‖secondJetTriple F y-secondJetTriple G y‖ ≤ z^4 → ‖H'-H y‖ ≤ δ → + c/4 ≤ NormalFrame.gramDet (firstJetPair G y).1 (firstJetPair G y).2 ∧ + b/2 ≤ ‖realSecondTensor G y‖ ∧ ∀ i, ε/2 ≤ P.Q i H' ∧ + (ε/4)*‖realSecondTensor G y‖ ≤ ‖secondQuadratic (realSecondTensor G y) (-(P.ξ i).2,(P.ξ i).1)‖ ∧ + ε*b/8 ≤ ‖secondQuadratic (realSecondTensor G y) (-(P.ξ i).2,(P.ξ i).1)‖ ∧ + Good (realSecondTensor G y) (P.ξ i) := by + obtain ⟨η,hη,hη1,hanchor⟩ := firstJet_anchor_neighborhood R c A 7 hc hA (by norm_num) + obtain ⟨stock,ε,C,δ,z₁,hε,hC,hδ,hz₁,hz₁1,hstock,hcell⟩ := + actual_polynomial_cell_phases hT hT0 hTd (R+1) (c/2) A b K 6 + (half_pos hc) hA hb hK (by norm_num) + refine ⟨stock,ε,C,δ,min η z₁,hε,hC,hδ,lt_min hη hz₁, + (min_le_left _ _).trans hη1,hstock,?_⟩ + intro z hz hz0 F hF hbF H x hx hxg hxB hxH hLip + let U : Set Base := Metric.ball x (7*z^6) + have hxU : x ∈ U := Metric.mem_ball_self (by positivity) + have hmetric (y : Base) (hy : y ∈ U) : ‖firstJetPair F y‖ ≤ R+1 ∧ + c/2 ≤ NormalFrame.gramDet (firstJetPair F y).1 (firstJetPair F y).2 := by + apply hanchor z hz (hz0.trans (min_le_left _ _)) F hF hbF x hx hxg y + exact (show ‖y-x‖ < 7*z^6 from by simpa only [U,Metric.mem_ball,dist_eq_norm] using hy).le + obtain ⟨P,hPs,hp⟩ := hcell z hz (hz0.trans (min_le_right _ _)) F U Metric.isOpen_ball + (convex_ball _ _) hF.contDiffOn + (hbF.restrict_open Metric.isOpen_ball) hmetric H x hxU hxH hxB (fun y _ => hLip y) + refine ⟨P,hPs,?_⟩ + intro y G H' hy h1 h2 hHH + have hyU : y ∈ U := by + change dist y x < 7*z^6 + rw [dist_eq_norm] + exact hy.trans_lt (by nlinarith [pow_pos hz 6]) + have hh := hp y G H' hyU hy h1 h2 hHH + simpa only [div_div, show (2:ℝ)*2=4 by norm_num] using hh + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredFixedOrderStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredFixedOrderStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..e699579a1d0a5b32f79163c75447d1b95f65a763 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredFixedOrderStep.lean @@ -0,0 +1,150 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AnchoredActualStep +import OAI.Geometry.SurfaceImmersion.Geometry.GeometricScaleThreshold +import OAI.Geometry.SurfaceImmersion.Geometry.UniformRadiusFixedOrderStep + +namespace OAI + +/-! Polynomial fixed-order thresholds for the actual anchored correction. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry MetricGoodPhaseData +local instance anchoredFixedFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredFixedFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredFixedDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredFixedDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredFixedSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredFixedSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_fixed_order_step (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ a D : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < a ∧ 1 ≤ D ∧ + ∀ k : ℕ, 10 ≤ k → ∀ Budget : ℝ → ℝ, HasPolynomialBound Budget → + ∃ ε : ℝ → ℝ, ∃ P L : ℕ → ℝ → ℝ, + HasPolynomialBound (fun x => (ε x)⁻¹) ∧ + (∀ m, HasPolynomialBound (P m)) ∧ (∀ m, HasPolynomialBound (L m)) ∧ + (∀ x, 1 ≤ x → 0 < ε x ∧ ε x ≤ 1) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε z⁻¹ → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + A.InputBound t (40*(k+1)) (Budget z⁻¹) G (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + A.WeightedBound 1 2 ((z^4/D)/4) (G-F) → + (∀ x, ‖A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x-A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m, A.WeightedBound (t^(6/5 : ℝ)) m (P m z⁻¹*(t^(k : ℝ)*t^(6/5 : ℝ))) U) ∧ + (∀ m ≤ k/2, A.WeightedBound 1 m ((z^4/D)*t) U) ∧ + ∀ m C, 0 ≤ C → A.InputBound t m C G (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + A.TensorWeightedBound (t^(6/5 : ℝ)) m (L m z⁻¹*(1+Budget z⁻¹+C)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)-g.inner) := by + classical + obtain ⟨z₀,a,D,K,hz₀,hz₀1,ha,hD,hK,hall⟩ := A.anchored_actual_step g houter R c B b hc hB hb + refine ⟨z₀,a,D,hz₀,hz₀1,ha,hD,?_⟩ + intro k hk Budget hBudget + let r := 40*(k+1) + obtain ⟨T,hT,hr⟩ := hall r + obtain ⟨e,E,P,Q,Dm,Em,hE,hP,hQ,hDm,hEm,hbuild⟩ := hr r Budget hBudget + let ρ := fun x : ℝ => 1/(D*x^4) + let η := ExactCorrection.geometricScaleThreshold a E e + have hD0 : 0 < D := zero_lt_one.trans_le hD + have hE0 : 0 < E := zero_lt_one.trans_le hE + have hρ (x : ℝ) (hx : 1 ≤ x) : 0 < ρ x := by + have hx0 : 0 < x := zero_lt_one.trans_le hx + dsimp [ρ]; positivity + have hη (x : ℝ) (hx : 1 ≤ x) : 0 < η x := ExactCorrection.geometricScaleThreshold_pos ha hE0 e hx + let ε := fun x => ExactCorrection.fixedOrderThreshold k (ρ x) a (η x) T (Budget x) K (fun m => P m x) + have hε (x : ℝ) (hx : 1 ≤ x) := ExactCorrection.fixedOrderThreshold_spec k hk + (ρ x) a (η x) T (Budget x) K (hρ x hx) ha (hη x hx) hT (hBudget.nonneg hx) hK (fun m => P m x) + have hρinv : HasPolynomialBound (fun x => (ρ x)⁻¹) := by + have hp := (polynomialBound_const hD0.le).mul (polynomialBound_id.pow 4) + simpa only [ρ,one_div,inv_inv] using hp + have hηinv : HasPolynomialBound (fun x => (η x)⁻¹) := + ExactCorrection.geometricScaleThreshold_inverse_polynomial ha hE0 e + have hεpoly : HasPolynomialBound (fun x => (ε x)⁻¹) := + ExactCorrection.fixedOrderThreshold_inverse_polynomial k ρ (fun _ => a) η + (fun _ => T) Budget (fun _ => K) P (fun x => (ρ x)⁻¹) (fun _ => a⁻¹) (fun x => (η x)⁻¹) + (polynomialBound_const hT) hBudget (polynomialBound_const hK) hP hρinv + (polynomialBound_const (inv_nonneg.mpr ha.le)) hηinv hρ (fun _ _ => ha) hη + (fun _ _ => le_rfl) (fun _ _ => le_rfl) (fun _ _ => le_rfl) + let L := fun m x => Dm m*tailConstant r+Em m*P (m+1) x*(Dm m*tailConstant r)+2*Q m x + have hL (m : ℕ) : HasPolynomialBound (L m) := by + exact ((polynomialBound_const (mul_nonneg (hDm m) (tailConstant_nonneg r))).add + (((polynomialBound_const (hEm m)).mul (hP (m+1))).mul + (polynomialBound_const (mul_nonneg (hDm m) (tailConstant_nonneg r))))).add + ((polynomialBound_const (by norm_num : (0:ℝ) ≤ 2)).mul (hQ m)) + refine ⟨ε,P,L,hεpoly,hP,hL,fun x hx => ⟨(hε x hx).1,(hε x hx).2.1⟩,?_⟩ + intro z hz hzsmall F hF hFb hFm G hG t ht htε j hkj hjk hinput hnear hmetric + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + have hρform : ρ z⁻¹ = z^4/D := by + dsimp [ρ] + rw [inv_pow] + field_simp + have ht1 : t ≤ 1 := htε.le.trans (hε z⁻¹ hx).2.1 + obtain ⟨hτη,htail,hratio,hlow,hδ'δ,hmin⟩ := (hε z⁻¹ hx).2.2 t ht htε j hkj hjk + rw [hρform] at htail hlow + 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⟩ := hbuild z hz hzsmall F hF hFb hFm 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 (Budget z⁻¹) (Dm m) (Em m) ((P (m+1) z⁻¹)) ((Q m z⁻¹)) C + (t^(k : ℝ)) (t^((6/5 : ℝ)*(j : ℝ))) + (t^(6/5 : ℝ)) (t^(11/10 : ℝ)) t = + ((t^((6/5 : ℝ)*(j : ℝ)))^2)⁻¹ * + (((t^(k : ℝ))^2 + Em m*(P (m+1) z⁻¹)*t^(k : ℝ)) * (Dm m*tailConstant r) * + ((Budget z⁻¹)*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + (Q m z⁻¹)*(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 := ((hP (m+1)).nonneg hx) + have htm := ((hQ m).nonneg hx) + have htc := tailConstant_nonneg r + have hB₀ := hBudget.nonneg hx + have hnum : 0 ≤ + (((t^(k : ℝ))^2 + Em m*(P (m+1) z⁻¹)*t^(k : ℝ)) * (Dm m*tailConstant r) * + ((Budget z⁻¹)*(t^(11/10 : ℝ)/t)^r+C*(t^(6/5 : ℝ)/t)^r) + + (Q m z⁻¹)*(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 (hBudget.nonneg hx) hC + (mul_nonneg (hDm m) (tailConstant_nonneg r)) (hEm m) (((hP (m+1)).nonneg hx)) (((hQ m).nonneg hx))) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredInputStep.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredInputStep.lean new file mode 100644 index 0000000000000000000000000000000000000000..a83cfd6f93938689830287d901c4d5681882801f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AnchoredInputStep.lean @@ -0,0 +1,120 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AnchoredFixedOrderStep +import OAI.Geometry.SurfaceImmersion.Geometry.ExactInputRecurrence +import OAI.Geometry.SurfaceImmersion.Geometry.InputSize + +namespace OAI + +/-! The full next-input recurrence with polynomial fast-family constants. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation RealModes PhaseGeometry +local instance anchoredInputFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance anchoredInputFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance anchoredInputDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance anchoredInputDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance anchoredInputSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance anchoredInputSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +theorem anchored_input_step (g : SmoothMetric M) + (houter : ∀ i p, p ∈ tsupport (A.weight i) → A.outer i =ᶠ[𝓝 p] (fun _ => 1)) + (R c B b : ℝ) (hc : 0 < c) (hB : 0 ≤ B) (hb : 0 < b) : + ∃ z₀ a D : ℝ, 0 < z₀ ∧ z₀ ≤ 1 ∧ 0 < a ∧ 1 ≤ D ∧ + ∀ Base : ℝ → ℝ, HasPolynomialBound Base → + ∃ A₀ : ℝ → ℝ, HasPolynomialBound A₀ ∧ + ∀ Budget : ℝ → ℝ, HasPolynomialBound Budget → ∀ k : ℕ, 10 ≤ k → + ∃ ε L : ℝ → ℝ, ∃ N : ℕ → ℝ → ℝ, + HasPolynomialBound (fun x => (ε x)⁻¹) ∧ HasPolynomialBound L ∧ + (∀ m, HasPolynomialBound (N m)) ∧ + (∀ x, 1 ≤ x → 0 < ε x ∧ ε x ≤ 1) ∧ + ∀ z : ℝ, 0 < z → z ≤ z₀ → ∀ F : M → Space, + ContMDiff planeModel spaceModel ∞ F → + (∀ i, WeightedEstimates.WeightedBound univ z 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‖) → + A.ShiftedBound 2 0 1 (Base z⁻¹) F → + ∀ G : M → Space, ContMDiff planeModel spaceModel ∞ G → + ∀ t : ℝ, 0 < t → t < ε z⁻¹ → ∀ j : ℕ, k ≤ j → j ≤ k+1 → + A.InputBound t (40*(k+1)) (Budget z⁻¹) G (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + A.WeightedBound 1 2 ((z^4/D)/4) (G-F) → + (∀ x, ‖A.tensorEncode (normalizedTensorDefect g.inner (t^(k : ℝ)) G) x-A.tensorEncode g.inner x‖ ≤ a/8) → + ∃ U : M → Space, ContMDiff planeModel spaceModel ∞ U ∧ + (∀ m ≤ k/2, A.WeightedBound 1 m ((z^4/D)*t) U) ∧ + A.TensorWeightedBound (t^(6/5 : ℝ)) 0 (L z⁻¹*(1+2*Budget z⁻¹)*t^(1/5 : ℝ)) + (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)-g.inner) ∧ + ∀ m C, 0 ≤ C → A.InputBound t m C G (normalizedTensorDefect g.inner (t^(k : ℝ)) G) → + A.InputBound (t^(6/5 : ℝ)) m (A₀ z⁻¹+N m z⁻¹*t^(1/5 : ℝ)*(1+C)) + (G+U) (normalizedTensorDefect g.inner (t^((6/5 : ℝ)*(j : ℝ))) (G+U)) := by + classical + obtain ⟨z₀,a,D,hz₀,hz₀1,ha,hD,hall⟩ := A.anchored_fixed_order_step g houter R c B b hc hB hb + choose Pg hPg hgb using fun m => A.exists_bundle_bound A.tensorTriv A.tensorTriv_domain m g.contMDiff + refine ⟨z₀,a,D,hz₀,hz₀1,ha,hD,?_⟩ + intro Base hBase + let A₀ := fun x => Base x+1+Pg 0 + have hA₀ : HasPolynomialBound A₀ := ((hBase.add (polynomialBound_const zero_le_one)).add + (polynomialBound_const (hPg 0))) + refine ⟨A₀,hA₀,?_⟩ + intro Budget hBudget k hk + obtain ⟨ε,P,L,hε,hP,hL,hεp,hstep⟩ := hall k hk Budget hBudget + let N := fun m x => Pg m+P (m+2) x+L m x*(1+Budget x)+1+L m x + have hN (m : ℕ) : HasPolynomialBound (N m) := + ((((polynomialBound_const (hPg m)).add (hP (m+2))).add + ((hL m).mul ((polynomialBound_const zero_le_one).add hBudget))).add + (polynomialBound_const zero_le_one)).add (hL m) + refine ⟨ε,L 0,N,hε,hL 0,hN,hεp,?_⟩ + intro z hz hzsmall F hF hFb hFm hbase G hG t ht htε j hkj hjk hinput hnear hmetric + have hx : 1 ≤ z⁻¹ := (one_le_inv₀ hz).mpr (hzsmall.trans hz₀1) + have hBaseN := hBase.nonneg hx + have ht1 : t ≤ 1 := htε.le.trans (hεp z⁻¹ hx).2 + obtain ⟨U,hU,hUB,hsmall,herror⟩ := hstep z hz hzsmall F hF hFb hFm G hG t ht htε j hkj hjk hinput hnear hmetric + have hbase' : A.WeightedBound 1 2 (Base z⁻¹) F := by + intro i l hl x _ + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ] using hbase i l (by omega) x + have hsum := A.weightedBound_add hF (hG.sub hF) zero_le_one hbase' hnear + change A.WeightedBound 1 2 (Base z⁻¹+(z^4/D)/4) (F+(G-F)) at hsum + have heG : F+(G-F) = G := by abel + rw [heG] at hsum + have hρ1 : (z^4/D)/4 ≤ 1 := by + have hz1 := hzsmall.trans hz₀1 + have hz4 : z^4 ≤ 1 := pow_le_one₀ hz.le hz1 + have hd0 : 0 < D := zero_lt_one.trans_le hD + have hh : z^4/D ≤ 1 := (div_le_one hd0).mpr (hz4.trans hD) + linarith + have hGbase : A.WeightedBound 1 2 (Base z⁻¹+1) G := + fun i => (hsum i).mono_const (by linarith) + have hbaseline : A.ShiftedBound 2 0 t (Base z⁻¹+1) G := by + intro i l hl x + have hl2 : l ≤ 2 := by omega + have hh := hGbase i l hl2 x (mem_univ x) + simpa only [one_pow,one_mul,iteratedFDerivWithin_univ,Nat.sub_eq_zero_of_le hl2,pow_zero] using hh + refine ⟨U,hU,hsmall,?_,?_⟩ + · have hi0 := A.inputBound_mono_order hinput (show 0 ≤ 40*(k+1) from Nat.zero_le _) + simpa only [show 1+Budget z⁻¹+Budget z⁻¹ = 1+2*Budget z⁻¹ by ring] using + herror 0 (Budget z⁻¹) (hBudget.nonneg hx) hi0 + · intro m C hC hCm + have hUB' : A.WeightedBound (t^(6/5 : ℝ)) (2+m) + (P (m+2) z⁻¹*(t^(k : ℝ)*t^(6/5 : ℝ))) U := by + simpa only [Nat.add_comm] using hUB (m+2) + exact A.exact_scale_input_recurrence hG hU ht ht1 hk + (by positivity) (hPg 0) (hPg m) ((hP (m+2)).nonneg hx) hC ((hL m).nonneg hx) + (hBudget.nonneg hx) hbaseline hCm.1 hUB' (hgb 0) (hgb m) (herror m C hC hCm) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDefectJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDefectJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc8e1bba3e0527c02c656a41eca48b72e45af61d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDefectJet.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.AxisNormalizedDefect + +namespace OAI + +/-! The normalized endpoint jets retain nonzero transverse normal components. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma axisNormalizedDefect_derivative_bijective {d : ℝ → Base} (hd : ContDiff ℝ ∞ d) + {N : Base → Base} {x : Base} (hN : ContDiffAt ℝ ∞ N x) + (hx : d (x 1) ≠ 0) (hz : N x = 0) (hD : Function.Bijective (fderiv ℝ N x)) : + Function.Bijective (fderiv ℝ (axisNormalizedDefect d N) x) := by + rw [axisNormalizedDefect_fderiv_zero hd hN hx hz] + exact (planeComplexFrame_invertible hx).inverse.bijective.comp hD + +lemma normalized_axis_derivative {G : Base → Base} {p q t : ℝ} + (hG : ContDiffAt ℝ ∞ G (crosscapAxis t)) {W : Set ℝ} (hW : IsOpen W) (ht : t ∈ W) + (haxis : ∀ s ∈ W, G (crosscapAxis s) = ![(s-p)*(s-q),0]) : + fderiv ℝ G (crosscapAxis t) (![0,1] : Base) = ![(t-p)+(t-q),0] := by + have he : G ∘ crosscapAxis =ᶠ[𝓝 t] fun s => (![(s-p)*(s-q),0] : Base) := by + filter_upwards [hW.mem_nhds ht] with s hs + exact haxis s hs + have hd := (hG.differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t + crosscapAxis.hasFDerivAt.hasDerivAt + have hp : HasDerivAt (fun s : ℝ => (![(s-p)*(s-q),0] : Base)) + (![(t-p)+(t-q),0] : Base) t := by + apply hasDerivAt_pi.mpr + intro i + fin_cases i + · convert ((hasDerivAt_id t).sub_const p).mul ((hasDerivAt_id t).sub_const q) using 1 <;> simp [add_comm] + rfl + · exact hasDerivAt_const t 0 + have hj := he.deriv_eq.trans hp.deriv + exact (by simpa only [crosscapAxis_apply] using hd.deriv.symm.trans hj) + +lemma normalized_axis_transverse_nonzero {G : Base → Base} {p q t : ℝ} + (hG : ContDiffAt ℝ ∞ G (crosscapAxis t)) {W : Set ℝ} (hW : IsOpen W) (ht : t ∈ W) + (haxis : ∀ s ∈ W, G (crosscapAxis s) = ![(s-p)*(s-q),0]) + (hD : Function.Bijective (fderiv ℝ G (crosscapAxis t))) : + (fderiv ℝ G (crosscapAxis t) (![1,0] : Base)) 1 ≠ 0 := by + apply injective_second_column_nonzero _ hD.2 + rw [normalized_axis_derivative hG hW ht haxis] + rfl + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDirectionJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDirectionJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..55cfd05d5408230f10aa4c7a6df07a230557a9a0 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisDirectionJet.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapSecondDerivative +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceDirectionBlock + +namespace OAI + +/-! The derivative-direction jet with the longitudinal vector in the kernel. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def axisDirectionJet (f : Base → V) (p : Base) : (Base × ℝ) →L[ℝ] V := + (fderiv ℝ f p).comp ((ContinuousLinearMap.snd ℝ Base ℝ).smulRight (![1,0] : Base)) + + ((fderiv ℝ (fderiv ℝ f) p).comp (ContinuousLinearMap.fst ℝ Base ℝ)).flip (![0,1] : Base) + +lemma axisDirectionJet_apply (f : Base → V) (p : Base) (z : Base × ℝ) : + axisDirectionJet f p z = z.2 • fderiv ℝ f p (![1,0] : Base) + + fderiv ℝ (fderiv ℝ f) p z.1 (![0,1] : Base) := by + change fderiv ℝ f p (z.2 • (![1,0] : Base)) + + fderiv ℝ (fderiv ℝ f) p z.1 (![0,1] : Base) = _ + rw [map_smul] + +lemma axisDirectionJet_surfaceDirection {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (p : Base) : + fderiv ℝ (surfaceDirection f true) (p,0) = axisDirectionJet f p := by + rw [(surfaceDirection_hasFDerivAt hf true (p,0)).fderiv] + apply ContinuousLinearMap.ext + intro z + simp [surfaceDirectionLinearization,axisDirectionJet,tangentRay,tangentRayVelocity] + +lemma axisDirectionJet_postcompose {f : Base → V} {W : Type*} [NormedAddCommGroup W] + [NormedSpace ℝ W] {g : V → W} (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) + (p : Base) (hz : fderiv ℝ f p (![0,1] : Base) = 0) : + axisDirectionJet (g ∘ f) p = (fderiv ℝ g (f p)).comp (axisDirectionJet f p) := by + apply ContinuousLinearMap.ext + intro z + rw [axisDirectionJet_apply,ContinuousLinearMap.comp_apply,axisDirectionJet_apply, + kernel_secondDerivative_comp hf isOpen_univ hg.contDiffOn (mem_univ _) _ _ hz, + fderiv_comp p (hg.differentiable (by simp) _) (hf.differentiable (by simp) p)] + simp + +lemma bijective_base_vertical_columns (L : Base →L[ℝ] Base) + (hL : Function.Bijective L) (hz : L (![0,1] : Base) 0 = 0) : + L (![0,1] : Base) 1 ≠ 0 ∧ L (![1,0] : Base) 0 ≠ 0 := by + have hcol : ∀ x : Base, L x = (x 0) • L (![1,0] : Base) + (x 1) • L (![0,1] : Base) := by + intro x + have he : x = (x 0) • (![1,0] : Base) + (x 1) • (![0,1] : Base) := by + ext i; fin_cases i <;> simp + conv_lhs => rw [he] + rw [map_add,map_smul,map_smul] + constructor + · intro hn + have he : L (![0,1] : Base) = L 0 := by + rw [map_zero] + ext i + fin_cases i + · exact hz + · exact hn + have hh := congrFun (hL.1 he) 1 + norm_num at hh + · intro hn + obtain ⟨x,hx⟩ := hL.2 (![1,0] : Base) + have h0 := congrFun hx 0 + rw [hcol] at h0 + simp [hn,hz] at h0 + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..b8c387532edc16bd3cc1f17b9cc6d548ae9afcab --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatBounds.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.TransverseRuledSurface + +namespace OAI + +/-! Quantitative bounds for a remainder vanishing to first order on the axis. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma axis_projection_norm_le (x : Base) : ‖crosscapAxis (x 1)‖ ≤ ‖x‖ := by + apply (pi_norm_le_iff_of_nonneg (norm_nonneg x)).mpr + intro i + fin_cases i + · simp [crosscapAxis_apply] + · simpa [crosscapAxis_apply] using norm_le_pi_norm x (1 : Fin 2) + +lemma norm_axis_difference (x : Base) : ‖x-crosscapAxis (x 1)‖ = |x 0| := by + apply le_antisymm + · apply (pi_norm_le_iff_of_nonneg (abs_nonneg (x 0))).mpr + intro i + fin_cases i <;> simp [crosscapAxis_apply] + · simpa [crosscapAxis_apply] using norm_le_pi_norm (x-crosscapAxis (x 1)) (0 : Fin 2) + +lemma axis_flat_first_bound {R : Base → V} (hR : ContDiff ℝ ∞ R) + (hD0 : ∀ t, fderiv ℝ R (crosscapAxis t) = 0) + {ρ C : ℝ} (hb : ∀ x ∈ closedBall (0 : Base) ρ, ‖fderiv ℝ (fderiv ℝ R) x‖ ≤ C) + {x : Base} (hx : x ∈ closedBall (0 : Base) ρ) : + ‖fderiv ℝ R x‖ ≤ C*|x 0| := by + have ha : crosscapAxis (x 1) ∈ closedBall (0 : Base) ρ := by + rw [mem_closedBall,dist_zero_right] + exact (axis_projection_norm_le x).trans (by simpa only [mem_closedBall,dist_zero_right] using hx) + have h := (convex_closedBall (0 : Base) ρ).norm_image_sub_le_of_norm_fderiv_le + (fun y _ => (hR.fderiv_right (m := ∞) (by simp)).differentiable (by simp) y) hb ha hx + simpa only [hD0,sub_zero,norm_axis_difference] using h + +lemma axis_flat_value_bound {R : Base → V} (hR : ContDiff ℝ ∞ R) + (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) + {x : Base} (hx : x ∈ closedBall (0 : Base) ρ) : ‖R x‖ ≤ C*|x 0|^2 := by + let a := crosscapAxis (x 1) + let S := closedBall (0 : Base) ρ ∩ closedBall a |x 0| + have haρ : a ∈ closedBall (0 : Base) ρ := by + rw [mem_closedBall,dist_zero_right] + exact (axis_projection_norm_le x).trans (by simpa only [mem_closedBall,dist_zero_right] using hx) + have haS : a ∈ S := ⟨haρ,mem_closedBall_self (abs_nonneg _)⟩ + have hxS : x ∈ S := ⟨hx,by rw [mem_closedBall,dist_eq_norm,norm_axis_difference]⟩ + have hDS : ∀ y ∈ S, ‖fderiv ℝ R y‖ ≤ C*|x 0| := by + intro y hy + apply (axis_flat_first_bound hR hD0 hb hy.1).trans + apply mul_le_mul_of_nonneg_left _ hC + have hcoord := norm_le_pi_norm (y-a) (0 : Fin 2) + have ha0 : a 0 = 0 := by simp [a,crosscapAxis_apply] + have hcoord' : |y 0| ≤ ‖y-a‖ := by simpa only [Pi.sub_apply,ha0,sub_zero,Real.norm_eq_abs] using hcoord + exact hcoord'.trans (by simpa only [mem_closedBall,dist_eq_norm] using hy.2) + have h := ((convex_closedBall (0 : Base) ρ).inter (convex_closedBall a |x 0|)).norm_image_sub_le_of_norm_fderiv_le (fun y _ => hR.differentiable (by simp) y) hDS haS hxS + have h' : ‖R x‖ ≤ C*|x 0| * |x 0| := by + simpa only [a,h0,sub_zero,norm_axis_difference] using h + nlinarith only [h'] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatSecondJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatSecondJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..887f450900e085ae6d42f91b7353dbcbb7cd3815 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisFlatSecondJet.lean @@ -0,0 +1,52 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.RulingDirectionJet + +namespace OAI + +/-! Vanishing of the first jet on an axis also fixes every second + derivative with one longitudinal argument. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma axis_flat_second_vertical {q : Base → V} (hq : ContDiff ℝ ∞ q) + (hD : ∀ t, fderiv ℝ q (crosscapAxis t) = 0) (t : ℝ) (v : Base) : + fderiv ℝ (fderiv ℝ q) (crosscapAxis t) v (![0,1] : Base) = 0 := by + have hd := ((hq.fderiv_right (m := ∞) (by simp)).differentiable (by simp) + (crosscapAxis t)).hasFDerivAt.comp_hasDerivAt t crosscapAxis.hasFDerivAt.hasDerivAt + have he : (fderiv ℝ q) ∘ crosscapAxis = 0 := funext hD + change HasDerivAt ((fderiv ℝ q) ∘ crosscapAxis) _ t at hd + rw [he] at hd + have hz := hd.unique (hasDerivAt_const t (0 : Base →L[ℝ] V)) + have hsym := (hq.contDiffAt (x := crosscapAxis t)).isSymmSndFDerivAt (by simp) v (![0,1] : Base) + rw [hsym] + have hz' : fderiv ℝ (fderiv ℝ q) (crosscapAxis t) (![0,1] : Base) = 0 := by + simpa only [crosscapAxis_apply] using hz + rw [hz'] + rfl + +lemma axis_flat_add_first {f q : Base → V} (hf : ContDiff ℝ ∞ f) + (hq : ContDiff ℝ ∞ q) (hD : ∀ t, fderiv ℝ q (crosscapAxis t) = 0) (t : ℝ) : + fderiv ℝ (f+q) (crosscapAxis t) = fderiv ℝ f (crosscapAxis t) := by + rw [fderiv_add (hf.differentiable (by simp) _) (hq.differentiable (by simp) _),hD,add_zero] + +lemma axis_flat_add_direction {f q : Base → V} (hf : ContDiff ℝ ∞ f) + (hq : ContDiff ℝ ∞ q) (hD : ∀ t, fderiv ℝ q (crosscapAxis t) = 0) (t : ℝ) : + axisDirectionJet (f+q) (crosscapAxis t) = axisDirectionJet f (crosscapAxis t) := by + have hfun : fderiv ℝ (f+q) = fderiv ℝ f+fderiv ℝ q := by + funext x + exact fderiv_add (hf.differentiable (by simp) x) (hq.differentiable (by simp) x) + apply ContinuousLinearMap.ext + intro z + rw [axisDirectionJet_apply,axisDirectionJet_apply,axis_flat_add_first hf hq hD,hfun, + fderiv_add ((hf.fderiv_right (m := ∞) (by simp)).differentiable (by simp) _) + ((hq.fderiv_right (m := ∞) (by simp)).differentiable (by simp) _)] + simp only [add_apply,axis_flat_second_vertical hq hD,add_zero] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisNormalizedDefect.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisNormalizedDefect.lean new file mode 100644 index 0000000000000000000000000000000000000000..bc3e1b1c6aa75d2b51a047b2d78cd60472728d00 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/AxisNormalizedDefect.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.NormalAxisFactor + +namespace OAI + +/-! Normal coordinates adapted to the two simple zeros on the axis. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +def axisNormalizedDefect (d : ℝ → Base) (N : Base → Base) (x : Base) : Base := + (planeComplexFrame (d (x 1))).inverse (N x) + +lemma axisNormalizedDefect_smoothAt {d : ℝ → Base} (hd : ContDiff ℝ ∞ d) + {N : Base → Base} {x : Base} (hN : ContDiffAt ℝ ∞ N x) (hx : d (x 1) ≠ 0) : + ContDiffAt ℝ ∞ (axisNormalizedDefect d N) x := by + have hF : ContDiff ℝ ∞ (fun y : Base => planeComplexFrame (d (y 1))) := + planeComplexFrame_smooth.comp (hd.comp (contDiff_apply ℝ ℝ 1)) + exact ((planeComplexFrame_invertible hx).contDiffAt_map_inverse.comp x hF.contDiffAt).clm_apply hN + +lemma axisNormalizedDefect_fderiv_zero {d : ℝ → Base} (hd : ContDiff ℝ ∞ d) + {N : Base → Base} {x : Base} (hN : ContDiffAt ℝ ∞ N x) + (hx : d (x 1) ≠ 0) (hz : N x = 0) : + fderiv ℝ (axisNormalizedDefect d N) x = + ((planeComplexFrame (d (x 1))).inverse).comp (fderiv ℝ N x) := by + have hF : ContDiff ℝ ∞ (fun y : Base => planeComplexFrame (d (y 1))) := + planeComplexFrame_smooth.comp (hd.comp (contDiff_apply ℝ ℝ 1)) + have hJ := (planeComplexFrame_invertible hx).contDiffAt_map_inverse.comp x hF.contDiffAt + have hD := (hJ.differentiableAt (by simp)).hasFDerivAt.clm_apply + (hN.differentiableAt (by simp)).hasFDerivAt + apply ContinuousLinearMap.ext + intro v + have he := congrArg (fun L => L v) hD.fderiv + change (fderiv ℝ (fun y : Base => (planeComplexFrame (d (y 1))).inverse (N y)) x) v = _ + simpa [Function.comp_def,hz] using he + +lemma axisNormalizedDefect_axis {d : ℝ → Base} {N : Base → Base} {p q t : ℝ} + (hd : d t ≠ 0) (he : N (crosscapAxis t) = ((t-p)*(t-q)) • d t) : + axisNormalizedDefect d N (crosscapAxis t) = ![(t-p)*(t-q),0] := by + change (planeComplexFrame (d t)).inverse (N (crosscapAxis t)) = _ + rw [he,planeComplexFrame_inverse_axis hd] + +lemma injective_second_column_nonzero (L : Base →L[ℝ] Base) + (hL : Function.Surjective L) (haxis : (L (![0,1] : Base)) 1 = 0) : + (L (![1,0] : Base)) 1 ≠ 0 := by + intro hz + obtain ⟨v,hv⟩ := hL (![0,1] : Base) + have hsplit : v = v 0 • (![1,0] : Base)+v 1 • (![0,1] : Base) := by + ext i + fin_cases i <;> simp + have he := congrFun hv 1 + rw [hsplit,map_add,map_smul,map_smul] at he + simp only [Pi.add_apply,Pi.smul_apply,smul_eq_mul,hz,haxis,mul_zero,add_zero, + Matrix.cons_val_one,Matrix.cons_val_zero] at he + norm_num at he + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BadPairPatchCover.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BadPairPatchCover.lean new file mode 100644 index 0000000000000000000000000000000000000000..cd7e440f2202a9bbcb1872a971dd2b51d357a403 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BadPairPatchCover.lean @@ -0,0 +1,64 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FinitePairPatchCover +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceRegularPairLocus + +namespace OAI + +/-! Only the compact locus of initially bad pairs needs new perturbation +patches; the compact remainder already has regular coincidences. -/ +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 bad_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) + {f : M → ProjectionTarget 3} (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hAreg : ∀ z ∈ K, (∃ i, z.1 ∈ A i ∧ z.2 ∈ A i) → z ∈ regularSurfacePairs f) : + let D := K \ regularSurfacePairs f + ∃ (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 ⊆ regularSurfacePairs f ∧ K ⊆ J ∪ ⋃ z ∈ s, T z := by + classical + dsimp only + let D := K \ regularSurfacePairs f + have hD : IsCompact D := hK.diff (regularSurfacePairs_open hf) + 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 ⊆ regularSurfacePairs f := 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/BlendedDensityCompact.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BlendedDensityCompact.lean new file mode 100644 index 0000000000000000000000000000000000000000..aaae479c939c3479877cca30840c5f82ff8ce3cf --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BlendedDensityCompact.lean @@ -0,0 +1,73 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CollarDensityMoments +import OAI.Geometry.SurfaceImmersion.Primitive.LoopDensityRelative + +namespace OAI + +/-! Positive densities through the collar, transition, and circle-covering interior. -/ +noncomputable section +open Set +open scoped ContDiff + +namespace ClosedSurfaceR4.CollarVelocity + +variable {B : Type} [NormedAddCommGroup B] [NormedSpace ℝ B] [FiniteDimensional ℝ B] + +theorem blended_density_near_interior + {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} (hs₀ : s b₀ = 1) (hA₀ : 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) • + LoopDensity.augment (blendedPath (a b) (A b) (s b) (h b) t)) = LoopDensity.augment (c b) := by + apply LoopDensity.positive_density_near_of_circle_coverage + (blendedPath_smooth ha hA hs hh) hc hc₀ + intro e he + obtain ⟨t, ht, hpt⟩ := LoopDensity.interiorPath_covers hA₀ he + exact ⟨t, ht, by simpa [blendedPath, blendedAngle, hs₀, LoopDensity.interiorPath] using hpt⟩ + +/-- The density is constructed on a neighborhood of the whole compact parameter set, +and agrees exactly with the prescribed rational density on the closed collar. -/ +theorem blended_density_compact + {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 ∧ ∃ ρ : 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) (h b) t)) = LoopDensity.augment (c b)) ∧ + ∀ b ∈ V ∩ C, ∀ t, ρ (b, t) = unitDensity (a b) t := by + apply LoopDensity.positive_density_compact_preserving (blendedPath_smooth ha hA hs hh) + hU hC hCU hK (fun z => unitDensity (a z.1) z.2) + · exact (unitDensity_smooth.comp ((ha.comp contDiff_fst).prodMk contDiff_snd)).contDiffOn + · intro b _ t + exact unitDensity_pos _ _ + · intro b + exact unitDensity_periodic (a b) + · intro b hb + obtain ⟨hsb, hhb, hcb⟩ := hcollar b hb + simp only [hsb, hhb, hcb] + exact collar_density_moments _ _ + · intro b hb + rcases hrest b hb with ht | hi + · exact blended_positive_density_near ha hA hs hh hc ht.1 ht.2.1 ht.2.2.1 ht.2.2.2.1 ht.2.2.2.2 + · exact blended_density_near_interior ha hA hs hh hc hi.1 hi.2.1 hi.2.2 + +end ClosedSurfaceR4.CollarVelocity + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryDegreeOne.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryDegreeOne.lean new file mode 100644 index 0000000000000000000000000000000000000000..b14e304d1a29238c6817bbec91c92ee41baaf9be --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryDegreeOne.lean @@ -0,0 +1,27 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.HalfLinePuncturedNeighborhood +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryIncidentPiece + +namespace OAI + +/-! Boundary vertices of the actual finite decomposition have exactly +one incident open edge. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] + +theorem boundary_vertex_degree_one (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) {p : X} (hp : p ∈ V) + (c : OpenPartialHomeomorph X (Ici (0:ℝ))) (hc : p ∈ c.source) + (hc0 : c p = ⟨0,by simp⟩) : + ∃ E ∈ P, p ∈ closure E ∧ ∀ F ∈ P, p ∈ closure F → F = E := by + obtain ⟨W,hW,hpW,hS,hSV,hpS⟩ := half_line_punctured_neighborhood c hc hc0 V hV + exact unique_boundary_incident_piece V P hP hdis hcover hp hW hpW hS hSV hpS + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryIncidentPiece.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryIncidentPiece.lean new file mode 100644 index 0000000000000000000000000000000000000000..ef3c5b602518b625b85388fc40f86bf67c919b52 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryIncidentPiece.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactCurvePieces + +namespace OAI + +/-! A connected punctured boundary neighborhood meets exactly one +incident edge of the proved finite curve decomposition. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] + +theorem unique_boundary_incident_piece (V : Set X) (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) {p : X} (hp : p ∈ V) + {W : Set X} (hW : IsOpen W) (hpW : p ∈ W) + (hS : IsConnected (W \ {p})) (hSV : W \ {p} ⊆ Vᶜ) + (hpS : p ∈ closure (W \ {p})) : + ∃ E ∈ P, p ∈ closure E ∧ ∀ F ∈ P, p ∈ closure F → F = E := by + classical + obtain ⟨x,hx⟩ := hS.nonempty + have hxV := hSV hx + rw [hcover] at hxV + obtain ⟨E,hE,hxE⟩ := mem_iUnion₂.mp hxV + have hSE : W \ {p} ⊆ E := + hS.isPreconnected.subset_of_closure_inter_subset (hP E hE).1 ⟨x,hx,hxE⟩ (by + intro y hy + by_contra hn + exact hSV hy.2 ((hP E hE).2.2 ⟨hy.1,hn⟩)) + refine ⟨E,hE,(closure_mono hSE) hpS,?_⟩ + intro F hF hpF + obtain ⟨y,hyW,hyF⟩ := (mem_closure_iff.mp hpF) W hW hpW + have hne : y ≠ p := by + intro he + exact disjoint_left.mp (hP F hF).2.1 hyF (he ▸ hp) + have hyE := hSE ⟨hyW,by simpa only [mem_singleton_iff] using hne⟩ + by_contra hFE + exact disjoint_left.mp (hdis F hF E hE hFE) hyF hyE + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..83e32aadeba82dba116cbf0ed62bf442c8e5a394 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetAvoidance.lean @@ -0,0 +1,83 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetSecondForm +import OAI.Geometry.SurfaceImmersion.Geometry.SecondFormNormalFields + +namespace OAI + +/-! Exterior antipode exclusions are open conditions on the unscaled +second jet and the preferred normal. Compactness makes the tolerance uniform. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def boundaryJetAvoidance : Set (BoundaryProfile × (Vec × Base)) := + {a | NormalFrame.gramDet (a.1 0) (a.1 1) ≠ 0 ∧ + boundaryJetSecond a.1 a.2.2 a.2.2 ≠ 0 ∧ + a.2.1 ≠ -normalize (boundaryJetSecond a.1 a.2.2 a.2.2)} + +lemma isOpen_boundaryJetAvoidance : IsOpen boundaryJetAvoidance := by + apply isOpen_iff_mem_nhds.mpr + intro a ha + let Z := BoundaryProfile × (Vec × Base) + have hd : Continuous (fun a : Z => NormalFrame.gramDet (a.1 0) (a.1 1)) := by + exact 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.2,a.2.2)) := by fun_prop + have hP := (continuousAt_boundaryJetSecond a.2.2 a.2.2 ha.1).comp + (f := fun a : Z => (a.1,a.2.2,a.2.2)) (x := a) hm.continuousAt + have hnorm := (normalize_smoothAt contDiffAt_id ha.2.1).continuousAt.comp + (f := fun a : Z => boundaryJetSecond a.1 a.2.2 a.2.2) (x := a) hP + have hn : Continuous (fun a : Z => a.2.1) := by fun_prop + have hne := (hn.continuousAt.sub hnorm.neg).eventually_ne (sub_ne_zero.mpr ha.2.2) + filter_upwards [hd.continuousAt.eventually_ne ha.1,hP.eventually_ne ha.2.1,hne] with b hbD hbP hbn + exact ⟨hbD,hbP,sub_ne_zero.mp hbn⟩ + +theorem compact_boundary_jet_avoidance {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} {n : X → Vec} {v : X → Base} + (hJ : Continuous J) (hn : Continuous n) (hv : Continuous v) + (hold : ∀ x, (J x,n x,v x) ∈ boundaryJetAvoidance) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ H : BoundaryProfile, ∀ m : Vec, + ‖H-J x‖ < δ → ‖m-n x‖ < δ → (H,m,v x) ∈ boundaryJetAvoidance := by + let f := fun x => (J x,n x,v x) + have hf : Continuous f := hJ.prodMk (hn.prodMk hv) + obtain ⟨δ,hδ,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open + isOpen_boundaryJetAvoidance (by rintro _ ⟨x,rfl⟩; exact hold x) + refine ⟨δ,hδ,?_⟩ + intro x H m hH hm + apply hsub + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (H,(m,v x)) (J x,(n x,v x)) < δ + rw [Prod.dist_eq,dist_prod_same_right,dist_eq_norm,dist_eq_norm] + exact max_lt hH hm + +theorem compact_actual_exterior_avoidance {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {n : X → Vec} {v : X → Base} + (hp : Continuous p) (hn : Continuous n) (hv : Continuous v) + (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) + (havoid : ∀ x, n x ≠ -normalize (realSecondForm F (v x) (v x) (p x))) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ m : Vec, + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + ‖m-n x‖ < δ → realSecondForm G (v x) (v x) (p x) ≠ 0 ∧ + m ≠ -normalize (realSecondForm G (v 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_boundary_jet_avoidance hJ hn hv (by + intro x + refine ⟨hD x,?_,?_⟩ <;> rw [boundaryJetSecond_actual hF] + · exact hP x + · exact havoid x) + refine ⟨δ,hδ,?_⟩ + intro x G hG m hnear hm + have hh := hclose x (realBoundaryProfile G 1 (p x)) m hnear hm + simpa only [boundaryJetSecond_actual hG] using hh.2 + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetCurvature.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetCurvature.lean new file mode 100644 index 0000000000000000000000000000000000000000..bd27566f02706aff6886876ab6dab8c7c3c0f282 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetCurvature.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetSecondForm +import OAI.Geometry.SurfaceImmersion.Geometry.PureRadialGauss + +namespace OAI + +/-! The induced Gaussian curvature is a continuous function of the unscaled +second jet on the immersion locus. This controls the new curvature in exterior estimates. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame + +def boundaryJetCurvature (J : BoundaryProfile) : ℝ := + (boundaryJetSecond J dx dx ⬝ᵥ boundaryJetSecond J dy dy - + boundaryJetSecond J dx dy ⬝ᵥ boundaryJetSecond J dx dy) / gramDet (J 0) (J 1) + +lemma boundaryJetCurvature_actual {F : RField 4} (hF : ContDiff ℝ ∞ F) (p : Base) + (hD : gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) : + boundaryJetCurvature (realBoundaryProfile F 1 p) = + coordinateGaussianCurvature (realMetric F dx dx) (realMetric F dx dy) + (realMetric F dy dy) p := by + unfold boundaryJetCurvature + rw [boundaryJetSecond_actual hF,boundaryJetSecond_actual hF,boundaryJetSecond_actual hF, + gauss_metric_identity hF p hD] + rfl + +lemma continuousAt_boundaryJetCurvature {J : BoundaryProfile} + (hD : gramDet (J 0) (J 1) ≠ 0) : ContinuousAt boundaryJetCurvature J := by + have hB (v w : Base) : ContinuousAt (fun H => boundaryJetSecond H v w) J := + (continuousAt_boundaryJetSecond v w hD).comp + (f := fun H => (H,v,w)) (x := J) (by fun_prop) + have hd : Continuous (fun p : Vec × Vec => p.1 ⬝ᵥ p.2) := by + unfold dotProduct + fun_prop + have hg : Continuous (fun H : BoundaryProfile => gramDet (H 0) (H 1)) := + contDiff_gram_pair.continuous.comp + (show Continuous (fun H : BoundaryProfile => (H 0,H 1)) by fun_prop) + exact ((hd.continuousAt.comp ((hB dx dx).prodMk (hB dy dy))).sub + (hd.continuousAt.comp ((hB dx dy).prodMk (hB dx dy)))).div hg.continuousAt hD + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetPositivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetPositivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..e8891fcc763b49745b5d751e71f5bf7df5ec21ac --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetPositivity.lean @@ -0,0 +1,81 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetAvoidance + +namespace OAI + +/-! Uniform exterior preservation of the positive normal pairings. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def boundaryJetPositivity : Set (BoundaryProfile × (Vec × Base)) := + {a | NormalFrame.gramDet (a.1 0) (a.1 1) ≠ 0 ∧ + 0 < boundaryJetSecond a.1 a.2.2 a.2.2 ⬝ᵥ a.2.1} + +lemma isOpen_boundaryJetPositivity : IsOpen boundaryJetPositivity := by + apply isOpen_iff_mem_nhds.mpr + intro a ha + let Z := BoundaryProfile × (Vec × 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.2,a.2.2)) := by fun_prop + have hP := (continuousAt_boundaryJetSecond a.2.2 a.2.2 ha.1).comp + (f := fun a : Z => (a.1,a.2.2,a.2.2)) (x := a) hm.continuousAt + have hn : Continuous (fun a : Z => a.2.1) := by fun_prop + have hdot : Continuous (fun p : Vec × Vec => p.1 ⬝ᵥ p.2) := by + unfold dotProduct + fun_prop + have hh := hdot.continuousAt.comp (f := fun a : Z => + (boundaryJetSecond a.1 a.2.2 a.2.2,a.2.1)) (x := a) (hP.prodMk hn.continuousAt) + filter_upwards [hd.continuousAt.eventually_ne ha.1,hh.eventually (isOpen_Ioi.mem_nhds ha.2)] with b hb hp + exact ⟨hb,hp⟩ + +theorem compact_boundary_jet_positivity {X : Type*} [TopologicalSpace X] [CompactSpace X] + {J : X → BoundaryProfile} {n : X → Vec} {v : X → Base} + (hJ : Continuous J) (hn : Continuous n) (hv : Continuous v) + (hold : ∀ x, (J x,n x,v x) ∈ boundaryJetPositivity) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ H : BoundaryProfile, ∀ m : Vec, + ‖H-J x‖ < δ → ‖m-n x‖ < δ → 0 < boundaryJetSecond H (v x) (v x) ⬝ᵥ m := by + let f := fun x => (J x,n x,v x) + have hf : Continuous f := hJ.prodMk (hn.prodMk hv) + obtain ⟨δ,hδ,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open + isOpen_boundaryJetPositivity (by rintro _ ⟨x,rfl⟩; exact hold x) + refine ⟨δ,hδ,?_⟩ + intro x H m hH hm + apply And.right (a := NormalFrame.gramDet (H 0) (H 1) ≠ 0) + change (H,m,v x) ∈ boundaryJetPositivity + apply hsub + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (H,(m,v x)) (J x,(n x,v x)) < δ + rw [Prod.dist_eq,dist_prod_same_right,dist_eq_norm,dist_eq_norm] + exact max_lt hH hm + +theorem compact_actual_exterior_pairing {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {n : X → Vec} {v : X → Base} + (hp : Continuous p) (hn : Continuous n) (hv : Continuous v) + (hD : ∀ x, NormalFrame.gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x)) ≠ 0) + (hpositive : ∀ x, 0 < realSecondForm F (v x) (v x) (p x) ⬝ᵥ n x) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ m : Vec, + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + ‖m-n x‖ < δ → 0 < realSecondForm G (v x) (v x) (p x) ⬝ᵥ m := by + have hJ : Continuous (fun x => realBoundaryProfile F 1 (p x)) := + (realBoundaryProfile_smooth hF 1).continuous.comp hp + obtain ⟨δ,hδ,hclose⟩ := compact_boundary_jet_positivity hJ hn hv (by + intro x + refine ⟨hD x,?_⟩ + rw [boundaryJetSecond_actual hF] + exact hpositive x) + refine ⟨δ,hδ,?_⟩ + intro x G hG m hnear hm + simpa only [boundaryJetSecond_actual hG] using hclose x (realBoundaryProfile G 1 (p x)) m hnear hm + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetSecondForm.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetSecondForm.lean new file mode 100644 index 0000000000000000000000000000000000000000..4ed10e0d61815a3ad1830fa9ec54fadd7b308a18 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryJetSecondForm.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileFrame +import OAI.Geometry.SurfaceImmersion.Geometry.OrderedBoundaryInvariant +import OAI.Geometry.Immersion.ClosedSurface.ProjectionBounds + +namespace OAI + +/-! Unscaled five-jets encode the actual second form and ordered crossings. +These expressions are used for exterior C2 stability. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def boundaryJetSecond (J : BoundaryProfile) (v w : Base) : Vec := + realNormalPart (J 0) (J 1) + ((v.1*w.1) • J 4+(v.1*w.2+v.2*w.1) • J 3+(v.2*w.2) • J 2) + +def boundaryJetCrossing (J : BoundaryProfile) (v w : Base) (κ : ℝ) : ℝ := + (boundaryJetSecond J v w ⬝ᵥ normalize (boundaryJetSecond J v v))^2+ + κ*NormalFrame.gramDet (v.1 • J 0+v.2 • J 1) (w.1 • J 0+w.2 • J 1) + +lemma boundaryJetSecond_actual {F : RField 4} (hF : ContDiff ℝ ∞ F) (p v w : Base) : + boundaryJetSecond (realBoundaryProfile F 1 p) v w = realSecondForm F v w p := by + unfold boundaryJetSecond realBoundaryProfile realSecondForm + simp only [Matrix.cons_val_zero,Matrix.cons_val_one,Matrix.cons_val_two, + Matrix.cons_val_three,Matrix.cons_val_four,Matrix.head_cons,Matrix.tail_cons,one_smul] + rw [second_coordDeriv_bilinear hF v w p] + +lemma boundaryJetCrossing_actual {F : RField 4} (hF : ContDiff ℝ ∞ F) (p v w : Base) (κ : ℝ) : + boundaryJetCrossing (realBoundaryProfile F 1 p) v w κ = orderedCrossing F v w p κ := by + unfold boundaryJetCrossing orderedCrossing + rw [boundaryJetSecond_actual hF,boundaryJetSecond_actual hF] + simp only [realBoundaryProfile,Matrix.cons_val_zero,Matrix.cons_val_one] + rw [← coordDeriv_eq_basis F v,← coordDeriv_eq_basis F w] + +lemma continuousAt_boundaryJetSecond {J : BoundaryProfile} (v w : Base) + (hD : NormalFrame.gramDet (J 0) (J 1) ≠ 0) : + ContinuousAt (fun a : BoundaryProfile × (Base × Base) => boundaryJetSecond a.1 a.2.1 a.2.2) + (J,v,w) := by + have h0 : ContDiff ℝ ∞ (fun a : BoundaryProfile × (Base × Base) => a.1 0) := + (ContinuousLinearMap.proj 0 : BoundaryProfile →L[ℝ] Vec).contDiff.comp contDiff_fst + have h1 : ContDiff ℝ ∞ (fun a : BoundaryProfile × (Base × Base) => a.1 1) := + (ContinuousLinearMap.proj 1 : BoundaryProfile →L[ℝ] Vec).contDiff.comp contDiff_fst + have h2 : ContDiff ℝ ∞ (fun a : BoundaryProfile × (Base × Base) => + (a.2.1.1*a.2.2.1) • a.1 4+(a.2.1.1*a.2.2.2+a.2.1.2*a.2.2.1) • a.1 3+ + (a.2.1.2*a.2.2.2) • a.1 2) := by fun_prop + exact (contDiffAt_realNormalPart h0.contDiffAt h1.contDiffAt h2.contDiffAt hD).continuousAt + +lemma continuousAt_boundaryJetCrossing {J : BoundaryProfile} {v w : Base} {κ : ℝ} + (hD : NormalFrame.gramDet (J 0) (J 1) ≠ 0) (hP : boundaryJetSecond J v v ≠ 0) : + ContinuousAt (fun a : BoundaryProfile × (Base × (Base × ℝ)) => + boundaryJetCrossing a.1 a.2.1 a.2.2.1 a.2.2.2) (J,v,w,κ) := by + let Z := BoundaryProfile × (Base × (Base × ℝ)) + have hm : Continuous (fun a : Z => (a.1,a.2.1,a.2.2.1)) := by fun_prop + have hp : Continuous (fun a : Z => (a.1,a.2.1,a.2.1)) := by fun_prop + have hM := (continuousAt_boundaryJetSecond v w hD).comp + (f := fun a : Z => (a.1,a.2.1,a.2.2.1)) (x := (J,v,w,κ)) hm.continuousAt + have hV := (continuousAt_boundaryJetSecond v v hD).comp + (f := fun a : Z => (a.1,a.2.1,a.2.1)) (x := (J,v,w,κ)) hp.continuousAt + have hn := (normalize_smoothAt contDiffAt_id hP).continuousAt.comp + (f := fun a : Z => boundaryJetSecond a.1 a.2.1 a.2.1) (x := (J,v,w,κ)) hV + have hdot : ContinuousAt (fun a : Z => boundaryJetSecond a.1 a.2.1 a.2.2.1 ⬝ᵥ + normalize (boundaryJetSecond a.1 a.2.1 a.2.1)) (J,v,w,κ) := by + have hd : Continuous (fun p : Vec × Vec => p.1 ⬝ᵥ p.2) := by + unfold dotProduct + fun_prop + exact hd.continuousAt.comp (f := fun a : Z => + (boundaryJetSecond a.1 a.2.1 a.2.2.1,normalize (boundaryJetSecond a.1 a.2.1 a.2.1))) + (x := (J,v,w,κ)) (hM.prodMk hn) + have hgram : Continuous (fun a : Z => a.2.2.2* + NormalFrame.gramDet (a.2.1.1 • a.1 0+a.2.1.2 • a.1 1) (a.2.2.1.1 • a.1 0+a.2.2.1.2 • a.1 1)) := by + have hp : Continuous (fun a : Z => + (a.2.1.1 • a.1 0+a.2.1.2 • a.1 1,a.2.2.1.1 • a.1 0+a.2.2.1.2 • a.1 1)) := by + dsimp [Z] + fun_prop + exact (show Continuous (fun a : Z => a.2.2.2) by fun_prop).mul + (contDiff_gram_pair.continuous.comp hp) + exact (hdot.pow 2).add hgram.continuousAt + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryNormalMatch.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryNormalMatch.lean new file mode 100644 index 0000000000000000000000000000000000000000..47522ad26be139b1dbab8207a159ac48981aadb7 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryNormalMatch.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.FrozenCircularData +import OAI.Geometry.SurfaceImmersion.Geometry.LocalFlatExtension + +namespace OAI + +/-! At a boundary where the velocity correction vanishes on the exterior, +the limiting first normal coefficient and normal length are the old ones. -/ +noncomputable section +open Set +open scoped ContDiff Matrix + +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +lemma leadingNormal_at_projection (X Y C : Vec) : + leadingNormal X Y C (realNormalPart Y C X) = realNormalPart X Y C := by + simp only [leadingNormal, leadingTangent, sub_add_cancel] + +variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + +theorem boundary_normal_match {Q X Y C e₁ e₂ : E → Vec} {R α : E → ℝ} {O U : Set E} + (hU : IsOpen U) (hO : IsOpen O) (hOU : O ⊆ U) + (hQ : ContDiffOn ℝ ∞ Q U) (hX : ContDiffOn ℝ ∞ X U) + (hR : ContDiffOn ℝ ∞ R U) (h₁ : ContDiffOn ℝ ∞ e₁ U) + (h₂ : ContDiffOn ℝ ∞ e₂ U) (hα : ContDiffOn ℝ ∞ α U) + (hproj : ∀ x ∈ U, Q x = X x - realNormalPart (Y x) (C x) (X x)) + (hext : ∀ x ∈ O, Q x + R x • direction (e₁ x) (e₂ x) (α x) = X x) + {x : E} (hx : x ∈ closure O ∩ U) (d : E) + (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) : + frozenFirst Q X Y C R e₁ e₂ d (x, α x) = + fderiv ℝ X x d ⬝ᵥ normalize (realNormalPart (X x) (Y x) (C x)) ∧ + frozenSize X Y C R e₁ e₂ (x, α x) = + Real.sqrt (realNormalPart (X x) (Y x) (C x) ⬝ᵥ + realNormalPart (X x) (Y x) (C x)) := by + let T : E → Vec := fun y => Q y + R y • direction (e₁ y) (e₂ y) (α y) + have hT : ContDiffOn ℝ ∞ T U := + hQ.add (hR.smul ((hα.cos.smul h₁).add (hα.sin.smul h₂))) + have hEq : EqOn T X (closure O ∩ U) := + (show EqOn T X O from hext).of_subset_closure + (hT.continuousOn.mono inter_subset_right) (hX.continuousOn.mono inter_subset_right) + (fun y hy => ⟨subset_closure hy, hOU hy⟩) inter_subset_left + have hV : R x • direction (e₁ x) (e₂ x) (α x) = realNormalPart (Y x) (C x) (X x) := by + have he := hEq hx + change Q x + R x • direction (e₁ x) (e₂ x) (α x) = X x at he + rw [hproj x hx.2] at he + have he' := congrArg (fun z => z - (X x - realNormalPart (Y x) (C x) (X x))) he + simpa only [add_sub_cancel_left, sub_sub_cancel] using he' + have hN : frozenNormal X Y C R e₁ e₂ (x, α x) = + 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 hd := actual_first_eq_frozen (X := X) (d := d) + ((hQ.contDiffAt (hU.mem_nhds hx.2)).differentiableAt (by simp)) + ((hR.contDiffAt (hU.mem_nhds hx.2)).differentiableAt (by simp)) + ((h₁.contDiffAt (hU.mem_nhds hx.2)).differentiableAt (by simp)) + ((h₂.contDiffAt (hU.mem_nhds hx.2)).differentiableAt (by simp)) + ((hα.contDiffAt (hU.mem_nhds hx.2)).differentiableAt (by simp)) hframe + rw [← hd, hN] + exact congrArg (fun A : E →L[ℝ] Vec => A d ⬝ᵥ normalize (realNormalPart (X x) (Y x) (C x))) + (fderiv_eq_on_local_closure hU hT hX hO hOU hext hx) + · 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/BoundaryNormalMatching.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryNormalMatching.lean new file mode 100644 index 0000000000000000000000000000000000000000..600b5d4252c0a7197319313f5320aa4b1302a8df --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundaryNormalMatching.lean @@ -0,0 +1,101 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.BoundaryJetPositivity +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingPositivePairing + +namespace OAI + +/-! Uniform strict data for the interior/exterior normal interpolation. +The new canonical yy normal and the exterior normal both pair positively +with every later curve meeting the support boundary. -/ +noncomputable section +open Set Filter +open scoped ContDiff Matrix Topology +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame + +def boundaryPreferredPairing : Set (BoundaryProfile × Base) := + {a | a.1 ∈ regularBoundaryProfiles ∧ 0 < boundaryJetSecond a.1 a.2 a.2 ⬝ᵥ profilePreferred a.1} + +lemma isOpen_boundaryPreferredPairing : IsOpen boundaryPreferredPairing := by + apply isOpen_iff_mem_nhds.mpr + intro a ha + have hr : ContinuousAt (fun b : BoundaryProfile × Base => b.1) a := continuous_fst.continuousAt + have hp := (continuousAt_boundaryJetSecond a.2 a.2 ha.1.1).comp + (f := fun b : BoundaryProfile × Base => (b.1,b.2,b.2)) (x := a) + (by fun_prop : ContinuousAt (fun b : BoundaryProfile × Base => (b.1,b.2,b.2)) a) + have hn := (contDiffAt_profilePreferred ha.1).continuousAt.comp hr + have hdot : Continuous (fun p : Vec × Vec => p.1 ⬝ᵥ p.2) := by + unfold dotProduct + fun_prop + have hh := hdot.continuousAt.comp (f := fun b : BoundaryProfile × Base => + (boundaryJetSecond b.1 b.2 b.2,profilePreferred b.1)) (x := a) (hp.prodMk hn) + exact (hr.eventually (isOpen_regularBoundaryProfiles.mem_nhds ha.1)).and + (hh.eventually (isOpen_Ioi.mem_nhds ha.2)) + +lemma profilePreferred_real (F : RField 4) (z : ℝ) (p : Base) : + profilePreferred (realBoundaryProfile F z p) = normalize (realSecondForm F dy dy p) := rfl + +lemma compact_actual_preferred_pairing {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {v : X → Base} + (hp : Continuous p) (hv : Continuous v) + (hD : ∀ x, NormalFrame.gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x)) ≠ 0) + (hB : ∀ x, realSecondForm F dy dy (p x) ≠ 0) + (hpos : ∀ x, 0 < realSecondForm F (v x) (v x) (p x) ⬝ᵥ normalize (realSecondForm F dy dy (p x))) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + ∀ z : ℝ, 0 < realSecondForm G (v x) (v x) (p x) ⬝ᵥ profilePreferred (realBoundaryProfile G z (p x)) := by + let f := fun x => (realBoundaryProfile F 1 (p x),v x) + have hf : Continuous f := ((realBoundaryProfile_smooth hF 1).continuous.comp hp).prodMk hv + have hmem (x : X) : f x ∈ boundaryPreferredPairing := by + refine ⟨realBoundaryProfile_regular 1 (hD x) (hB x),?_⟩ + simpa only [f,boundaryJetSecond_actual hF,profilePreferred_real] using hpos x + obtain ⟨δ,hδ,hsub⟩ := (isCompact_range hf).exists_cthickening_subset_open + isOpen_boundaryPreferredPairing (by rintro _ ⟨x,rfl⟩; exact hmem x) + refine ⟨δ,hδ,?_⟩ + intro x G hG hclose z + have hm : (realBoundaryProfile G 1 (p x),v x) ∈ boundaryPreferredPairing := by + apply hsub + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + refine ⟨f x,mem_range_self x,?_⟩ + change dist (realBoundaryProfile G 1 (p x),v x) (realBoundaryProfile F 1 (p x),v x) < δ + rwa [dist_prod_same_right,dist_eq_norm] + simpa only [boundaryJetSecond_actual hG,profilePreferred_real] using hm.2 + +theorem compact_actual_boundary_matching {X : Type*} [TopologicalSpace X] [CompactSpace X] + {F : RField 4} (hF : ContDiff ℝ ∞ F) {p : X → Base} {v : X → Base} {n : X → Vec} + (hp : Continuous p) (hv : Continuous v) (hn : Continuous n) + (hD : ∀ x, NormalFrame.gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x)) ≠ 0) + (hB : ∀ x, realSecondForm F dy dy (p x) ≠ 0) + (havoid : ∀ x, n x ≠ -normalize (realSecondForm F dy dy (p x))) + (hpos : ∀ x, 0 < realSecondForm F (v x) (v x) (p x) ⬝ᵥ n x) + (κ : X → ℝ) + (hGauss : ∀ x, coordinateGauss (realMetric F dx dx) (realMetric F dx dy) + (realMetric F dy dy) (p x) = κ x * NormalFrame.gramDet (coordDeriv dx F (p x)) (coordDeriv dy F (p x))) + (hQ : ∀ x, 0 < orderedCrossing F dy (v x) (p x) (κ x)) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x : X, ∀ G : RField 4, ContDiff ℝ ∞ G → ∀ m : Vec, + ‖realBoundaryProfile G 1 (p x)-realBoundaryProfile F 1 (p x)‖ < δ → + ‖m-n x‖ < δ → ∀ z : ℝ, + realSecondForm G dy dy (p x) ≠ 0 ∧ + m ≠ -profilePreferred (realBoundaryProfile G z (p x)) ∧ + 0 < realSecondForm G (v x) (v x) (p x) ⬝ᵥ m ∧ + 0 < realSecondForm G (v x) (v x) (p x) ⬝ᵥ profilePreferred (realBoundaryProfile G z (p x)) := by + obtain ⟨δa,hδa,ha⟩ := compact_actual_exterior_avoidance hF hp hn continuous_const hD hB havoid + obtain ⟨δp,hδp,hpair⟩ := compact_actual_exterior_pairing hF hp hn hv hD hpos + obtain ⟨δn,hδn,hpref⟩ := compact_actual_preferred_pairing hF hp hv hD hB + (fun x => orderedCrossing_pos_pure_pairing hF (p x) dy (v x) (κ x) (hD x) (hB x) (hGauss x) (hQ x)) + let δ := min δa (min δp δn) + have hδa' : δ ≤ δa := min_le_left _ _ + have hδp' : δ ≤ δp := (min_le_right _ _).trans (min_le_left _ _) + have hδn' : δ ≤ δn := (min_le_right _ _).trans (min_le_right _ _) + refine ⟨δ,lt_min hδa (lt_min hδp hδn),?_⟩ + intro x G hG m hGclose hm z + obtain ⟨hB',hanti⟩ := ha x G hG m (hGclose.trans_le hδa') (hm.trans_le hδa') + exact ⟨hB',by simpa only [profilePreferred_real] using hanti, + hpair x G hG m (hGclose.trans_le hδp') (hm.trans_le hδp'), + hpref x G hG (hGclose.trans_le hδn') z⟩ + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedCoefficientRecursion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedCoefficientRecursion.lean new file mode 100644 index 0000000000000000000000000000000000000000..82c2b670de9cd4e32a71bf67e422086cb4fb776b --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedCoefficientRecursion.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialCoefficientRecursion +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteFastBounds + +namespace OAI + +/-! The actual supported metric-cancelling recursion with uniform fast-scale +estimates. All losses are determined by the finite symbolic recursion before +the slow map or its scales are chosen. -/ +noncomputable section +open scoped ContDiff + +namespace ClosedSurfaceR4.JetPolynomial +open LocalPeriodicExpansion CovarianceCorrector WeightedEstimates + +namespace VectorExpression + +def finiteLoss (R : ℕ → VectorExpression) (L : ℕ) : ℕ := + (Finset.range L).sup (fun i => Finset.univ.sup (fun a => (R i a).loss)) + +lemma loss_le_finiteLoss (R : ℕ → VectorExpression) {i L : ℕ} (hi : i < L) (a : Fin 4) : + (R i a).loss ≤ finiteLoss R L := + (Finset.le_sup (f := fun a => (R i a).loss) (Finset.mem_univ a)).trans + (Finset.le_sup (f := fun i => Finset.univ.sup (fun a => (R i a).loss)) (Finset.mem_range.mpr hi)) + +end VectorExpression + +/-- The support and cancellation identities belong to the very same finite +family whose oscillatory ansatz satisfies the quantitative estimate. -/ +theorem exists_bounded_coefficients {S : TopologicalSpace.Opens Base} {O K : Set LowJet} + (hO : IsOpen O) (hK : IsCompact K) (hKO : K ⊆ O) + (dx dy : Fin 2) (n : ℕ) (ℓ : Base →L[ℝ] ℝ) + {Y C X₀ : LowJet → R4} {V : LowJet → C(Period, R4)} {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)) + (hdet : ∀ Q ∈ O, PeriodicCorrector.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) : + ∃ d : ℕ, ∀ (m : ℕ) (B : ℝ), 1 ≤ B → ∃ D : ℝ, 0 ≤ D ∧ + ∀ (G : Base → Space) (g : Geometry (E := R4) S (coordinateVector dy)), + ContDiff ℝ ∞ G → Set.MapsTo (lowJet G) S K → + (∀ p ∈ S, g.Y p = Y (lowJet G p)) → + (∀ p ∈ S, g.C p = C (lowJet G p)) → + (∀ p ∈ S, g.X₀ p = X₀ (lowJet G p)) → + (∀ p ∈ S, g.V.val p = V (lowJet G p)) → + (∀ p ∈ S, g.q p = q (lowJet G p)) → + ∃ U : ℕ → Family S R4, + U 0 = g.initial ∧ (∀ i p, p ∈ S → average ((U i).val p) = 0) ∧ + (g.yyCoefficient U 1).fluct = 0 ∧ + (∀ Z : Set Base, IsOpen Z → Z ⊆ S → (∀ p ∈ Z, g.initial.val p = 0) → + ∀ i p, p ∈ Z → (U i).val p = 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) ∧ + (∀ i, VectorExpression.Represents G + (MetricPolynomial.coefficients Y C X₀ V q dx dy n i) (U i)) ∧ + ∀ (s z : ℝ), 0 < z → z ≤ s → s ≤ 1 → + WeightedBound S s (m + (2 * n + 2)) B (lowJet G) → ∀ F : Base → R4, + WeightedBound S z m (D * z / s ^ d) + (fun p => finiteAnsatz F U ℓ (n + 1) z p - F p) := by + let R := MetricPolynomial.coefficients Y C X₀ V q dx dy n + let d := VectorExpression.finiteLoss R (n + 1) + have hRs : ∀ i, (R i).SmoothCoeffs O := + MetricPolynomial.coefficients_smooth hO hY hC hX hV hdet hq hqp hcircle dx dy n + refine ⟨d, ?_⟩ + intro m B hB + obtain ⟨D, hD, hbound⟩ := VectorExpression.compact_finite_ansatz_bound (S := S) + hO hK hKO R (n + 1) (2 * n + 2) d (fun i _ => hRs i) + (fun i hi a => (MetricPolynomial.coefficients_order Y C X₀ V q dx dy n i a).trans (by omega)) + (fun i hi a => VectorExpression.loss_le_finiteLoss R hi a) ℓ m B hB + refine ⟨D, hD, ?_⟩ + intro G g hG hGK hYg hCg hXg hVg hqg + have hQ : Set.MapsTo (lowJet G) S O := fun _ hp => hKO (hGK hp) + obtain ⟨U, hinit, hmean, hy, hsupport, hcancel, hrep⟩ := + exists_polynomial_coefficients hO dy g hY hC hX hV hdet hq hqp hcircle + hG hQ hYg hCg hXg hVg hqg dx n + refine ⟨U, hinit, hmean, hy, hsupport, hcancel, hrep, ?_⟩ + intro s z hz hzs hs1 hb F + exact hbound G s z hz hzs hs1 hG hGK hb F U (fun i _ => hrep i) + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedProjectionDirections.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedProjectionDirections.lean new file mode 100644 index 0000000000000000000000000000000000000000..178b7ae386e3b12bd3cb029def1bdeef4a47a7cd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/BoundedProjectionDirections.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.ProjectionDirections + +namespace OAI + +/-! Compact direction parameters for kernels of maps on a surface tangent plane. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma exists_bounded_tangentRay {v : Base} (hv : v ≠ 0) : + ∃ (b : Bool) (t c : ℝ), t ∈ Icc (-1 : ℝ) 1 ∧ c ≠ 0 ∧ + v = c • tangentRay b t := by + by_cases h : |v 1| ≤ |v 0| + · have h0 : v 0 ≠ 0 := by + intro h0 + have h1 : v 1 = 0 := abs_nonpos_iff.mp (by simpa only [h0,abs_zero] using h) + apply hv + ext i + fin_cases i <;> simp [h0,h1] + have ht : |v 1 / v 0| ≤ 1 := by + rw [abs_div] + exact (div_le_one (abs_pos.mpr h0)).mpr h + refine ⟨false,v 1 / v 0,v 0,abs_le.mp ht,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 + · have h1 : v 1 ≠ 0 := by + intro h1 + apply h + simpa only [h1,abs_zero] using abs_nonneg (v 0) + have ht : |v 0 / v 1| ≤ 1 := by + rw [abs_div] + exact (div_le_one (abs_pos.mpr h1)).mpr (le_of_lt (lt_of_not_ge h)) + refine ⟨true,v 0 / v 1,v 1,abs_le.mp ht,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] + +lemma exists_bounded_tangentRay_in_kernel {V : Type*} + [NormedAddCommGroup V] [NormedSpace ℝ V] + (L : Base →L[ℝ] V) (hL : ¬ Function.Injective L) : + ∃ (b : Bool) (t : ℝ), t ∈ Icc (-1 : ℝ) 1 ∧ 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 hv : u-v ≠ 0 := sub_ne_zero.mpr hne + have hz : L (u-v) = 0 := by rw [map_sub,he,sub_self] + obtain ⟨b,t,c,ht,hc,hec⟩ := exists_bounded_tangentRay hv + refine ⟨b,t,ht,?_⟩ + rw [hec,map_smul] at hz + exact (smul_eq_zero.mp hz).resolve_left hc + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionApproximation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionApproximation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f3f6178e17525873e23897d6e6dc6cd6e78238b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionApproximation.lean @@ -0,0 +1,165 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! Smoothing a compact C1 immersion while keeping its differential injective. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold BigOperators +namespace ClosedSurfaceR4.FiniteOrderSmoothing +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) + +def coreThreshold : ℝ := 1 / ((Fintype.card A.centers : ℝ)+1) +def weightCore (i : A.centers) : Set M := {p | A.coreThreshold ≤ (A.weight i p)^2} +def coordinateCore (i : A.centers) : Set Base := (chart (i : M)) '' A.weightCore i + +omit [CompactSpace M] in +lemma coreThreshold_pos : 0 < A.coreThreshold := by unfold coreThreshold; positivity + +omit [CompactSpace M] in +lemma weightCore_nonzero (i : A.centers) {p : M} (hp : p ∈ A.weightCore i) : + A.weight i p ≠ 0 := by + intro hz + have h := A.coreThreshold_pos + change A.coreThreshold ≤ (A.weight i p)^2 at hp + rw [hz,zero_pow (by decide : 2 ≠ 0)] at hp + exact (not_lt_of_ge hp) h + +omit [CompactSpace M] in +lemma weightCore_source (i : A.centers) : A.weightCore i ⊆ (chart (i : M)).source := + fun _ hp => A.weight_support i (subset_tsupport _ (A.weightCore_nonzero i hp)) + +lemma weightCore_compact (i : A.centers) : IsCompact (A.weightCore i) := + (isClosed_le continuous_const ((A.weight_smooth i).continuous.pow 2)).isCompact + +lemma coordinateCore_compact (i : A.centers) : IsCompact (A.coordinateCore i) := + (A.weightCore_compact i).image_of_continuousOn + ((chart (i : M)).continuousOn.mono (A.weightCore_source i)) + +omit [CompactSpace M] in +lemma mem_some_weightCore (p : M) : ∃ i : A.centers, p ∈ A.weightCore i := by + classical + by_contra hn + have hi (i : A.centers) : (A.weight i p)^2 ≤ A.coreThreshold := + le_of_lt (lt_of_not_ge (fun h => hn ⟨i,h⟩)) + have hs := Finset.sum_le_sum (s := (Finset.univ : Finset A.centers)) (fun i _ => hi i) + rw [A.partition p] at hs + have hcount : (∑ _i : A.centers, A.coreThreshold) = + (Fintype.card A.centers : ℝ) / ((Fintype.card A.centers : ℝ)+1) := by + simp [coreThreshold,div_eq_mul_inv] + rw [hcount] at hs + have hlt : (Fintype.card A.centers : ℝ) / ((Fintype.card A.centers : ℝ)+1) < 1 := + (div_lt_one (by positivity)).mpr (by linarith) + exact (not_lt_of_ge hs) hlt + +omit [CompactSpace M] in +lemma coordinateCore_target (i : A.centers) : A.coordinateCore i ⊆ (chart (i : M)).target := by + rintro _ ⟨p,hp,rfl⟩ + exact (chart (i : M)).map_source (A.weightCore_source i hp) + +omit [CompactSpace M] in +lemma coordinateCore_weight_nonzero (i : A.centers) {x : Base} + (hx : x ∈ A.coordinateCore i) : A.weight i ((chart (i : M)).symm x) ≠ 0 := by + obtain ⟨p,hp,rfl⟩ := hx + rw [(chart (i : M)).left_inv (A.weightCore_source i hp)] + exact A.weightCore_nonzero i hp + +/-- Every C1 immersion has a positive tolerance in the finite localized C1 +norm within which all C1 maps remain immersions. -/ +theorem immersion_C1_tolerance {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) + (hI : ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) f p)) : + ∃ ε : ℝ, 0 < ε ∧ ∀ g : M → V, ContMDiff planeModel 𝓘(ℝ,V) 1 g → + A.C1Bound ε (g-f) → ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) g p) := by + classical + let w : A.centers → Base → ℝ := fun i => localizedWeight (i : M) (A.weight i) + let l : A.centers → (M → V) → Base → V := fun i h => localize (i : M) (A.weight i) h + have hw (i : A.centers) : ContDiff ℝ 1 (w i) := + (localizedWeight_smooth (i : M) (A.weight_smooth i) (A.weight_support i)).of_le (by simp) + have hl (i : A.centers) : ContDiff ℝ 1 (l i f) := + localize_C1 (i : M) (A.weight_smooth i) (A.weight_support i) hf + have hdata (i : A.centers) : ∃ r D : ℝ, 0 < r ∧ 0 < D ∧ + (∀ x ∈ A.coordinateCore i, ‖w i x‖+‖fderiv ℝ (w i) x‖ ≤ D) ∧ + ∀ x ∈ A.coordinateCore i, ∀ H : Base →L[ℝ] V, + ‖H-weightedJet (w i) (l i f) x‖ < r → Function.Injective H := by + obtain ⟨r,hr,hrb⟩ := compact_injective_stability + ((A.coordinateCore_compact i).image (continuous_weightedJet (hw i) (hl i))) + (by + rintro _ ⟨x,hx,rfl⟩ + exact (localized_weightedJet_injective_iff hf (i : M) (A.weight_smooth i) + (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mpr (hI _)) + obtain ⟨C,hC⟩ := (A.coordinateCore_compact i).exists_bound_of_continuousOn + (((hw i).continuous.norm.add ((hw i).continuous_fderiv one_ne_zero).norm).continuousOn) + refine ⟨r,1+|C|,hr,by positivity,?_,?_⟩ + · intro x hx + exact (le_abs_self _).trans ((hC x hx).trans (by linarith [le_abs_self C])) + · intro x hx H hH + exact hrb _ (mem_image_of_mem _ hx) H hH + choose r D hr hD hDb hrb using hdata + have hev : ∀ᶠ ε in 𝓝 (0 : ℝ), ∀ i : A.centers, ε < r i / D i := + Filter.eventually_all.mpr (fun i => gt_mem_nhds (div_pos (hr i) (hD i))) + obtain ⟨η,hη,hηb⟩ := Metric.eventually_nhds_iff.mp hev + let ε := η/2 + have hε : 0 < ε := half_pos hη + have hεi (i : A.centers) : ε < r i / D i := + hηb (by simpa only [Real.dist_eq,sub_zero,abs_of_pos hε] using half_lt_self hη) i + refine ⟨ε,hε,?_⟩ + intro g hg hb 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 hgl : ContDiff ℝ 1 (l i g) := + localize_C1 (i : M) (A.weight_smooth i) (A.weight_support i) hg + have hclose : ‖weightedJet (w i) (l i g) x-weightedJet (w i) (l i f) x‖ < r i := by + have he : weightedJet (w i) (localize (i : M) (A.weight i) (g-f)) x = + weightedJet (w i) (l i g) x-weightedJet (w i) (l i f) x := by + have hlsub : localize (i : M) (A.weight i) (g-f) = l i g-l i f := by + funext y + by_cases hy : y ∈ (chart (i : M)).target + · simp only [l,localize,indicator_of_mem hy,Pi.sub_apply,smul_sub] + · simp only [l,localize,indicator_of_notMem hy,Pi.sub_apply,sub_self] + rw [hlsub] + exact weightedJet_sub ((hl i).differentiable one_ne_zero x) + (hgl.differentiable one_ne_zero x) + rw [← he] + calc + _ ≤ (‖w i x‖+‖fderiv ℝ (w i) x‖)*ε := norm_weightedJet_le (hb i x).1 (hb i x).2 + _ ≤ D i*ε := mul_le_mul_of_nonneg_right (hDb i x hx) hε.le + _ < r i := by simpa only [mul_comm] using (lt_div_iff₀ (hD i)).mp (hεi i) + have hgi := (localized_weightedJet_injective_iff hg (i : M) (A.weight_smooth i) + (A.weight_support i) (A.coordinateCore_target i hx) + (A.coordinateCore_weight_nonzero i hx)).mp (hrb i x hx _ hclose) + change Function.Injective (mfderiv planeModel 𝓘(ℝ,V) g + ((chart (i : M)).symm (chart (i : M) p))) at hgi + rw [(chart (i : M)).left_inv (A.weightCore_source i hi)] at hgi + exact hgi + +variable [CompleteSpace V] + +include A in +/-- The C1 immersion input is promoted to a smooth immersion by the actual +finite-atlas convolution smoother. -/ +theorem smooth_immersion_of_C1 {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) + (hI : ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) f p)) : + ∃ g : M → V, ContMDiff planeModel 𝓘(ℝ,V) ∞ g ∧ + ∀ p, Function.Injective (mfderiv planeModel 𝓘(ℝ,V) g p) := by + obtain ⟨ε,hε,hstable⟩ := immersion_C1_tolerance A hf hI + obtain ⟨η,hη,happrox⟩ := A.smooth_C1_approximation hf hε + obtain ⟨hs,hb⟩ := happrox (η/2) (half_pos hη) (half_lt_self hη) + exact ⟨A.smooth 1 (η/2) f,hs,hstable _ (hs.of_le (by simp)) hb⟩ + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..2930e148108edf4aea23d09152f95a7df65bc960 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1ImmersionJets.lean @@ -0,0 +1,146 @@ +import OAI.Geometry.SurfaceImmersion.Correction.C1ManifoldSmoothing +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Weighted first jets detect immersion on the region where a partition +weight is nonzero. They depend continuously on the localized C1 data. -/ +noncomputable section +open Set Filter Manifold +open scoped ContDiff Topology Manifold +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +def weightedJet (w : Base → ℝ) (l : Base → V) (x : Base) : Base →L[ℝ] V := + w x • fderiv ℝ l x - (fderiv ℝ w x).smulRight (l x) + +lemma continuous_weightedJet {w : Base → ℝ} {l : Base → V} + (hw : ContDiff ℝ 1 w) (hl : ContDiff ℝ 1 l) : Continuous (weightedJet w l) := by + exact (hw.continuous.smul (hl.continuous_fderiv one_ne_zero)).sub + ((ContinuousLinearMap.smulRightL ℝ Base V).continuous₂.comp + ((hw.continuous_fderiv one_ne_zero).prodMk hl.continuous)) + +lemma weightedJet_eq_smul {w : Base → ℝ} {l h : Base → V} {x : Base} + (hw : DifferentiableAt ℝ w x) (hh : DifferentiableAt ℝ h x) + (he : l =ᶠ[𝓝 x] fun y => w y • h y) : + weightedJet w l x = (w x)^2 • fderiv ℝ h x := by + unfold weightedJet + rw [he.fderiv_eq, fderiv_fun_smul hw hh, he.self_of_nhds] + ext v + simp only [sub_apply,smul_apply,add_apply,ContinuousLinearMap.smulRight_apply] + simp only [smul_add,smul_smul,pow_two,mul_comm (w x) ((fderiv ℝ w x) v)] + abel + +lemma weightedJet_sub {w : Base → ℝ} {f g : Base → V} {x : Base} + (hf : DifferentiableAt ℝ f x) (hg : DifferentiableAt ℝ g x) : + weightedJet w (g-f) x = weightedJet w g x-weightedJet w f x := by + unfold weightedJet + rw [fderiv_sub hg hf] + ext v + simp only [sub_apply,smul_apply, + ContinuousLinearMap.smulRight_apply,Pi.sub_apply,smul_sub] + abel + +lemma norm_weightedJet_le {w : Base → ℝ} {l : Base → V} {x : Base} {C : ℝ} + (hl : ‖l x‖ ≤ C) (hd : ‖fderiv ℝ l x‖ ≤ C) : + ‖weightedJet w l x‖ ≤ (‖w x‖+‖fderiv ℝ w x‖)*C := by + calc + _ ≤ ‖w x • fderiv ℝ l x‖+‖(fderiv ℝ w x).smulRight (l x)‖ := norm_sub_le _ _ + _ = ‖w x‖*‖fderiv ℝ l x‖+‖fderiv ℝ w x‖*‖l x‖ := by + rw [norm_smul,ContinuousLinearMap.norm_smulRight_apply] + _ ≤ ‖w x‖*C+‖fderiv ℝ w x‖*C := by gcongr + _ = _ := by ring + +theorem compact_injective_stability {K : Set (Base →L[ℝ] V)} + (hK : IsCompact K) (hI : ∀ L ∈ K, Function.Injective L) : + ∃ ε : ℝ, 0 < ε ∧ ∀ L ∈ K, ∀ H : Base →L[ℝ] V, + ‖H-L‖ < ε → Function.Injective H := by + obtain ⟨ε,hε,he⟩ := hK.exists_thickening_subset_open + ContinuousLinearMap.isOpen_injective hI + exact ⟨ε,hε,fun L hL H hH => he + (Metric.mem_thickening_iff.mpr ⟨L,hL,by simpa only [dist_eq_norm] using hH⟩)⟩ + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +def localizedWeight (p : M) (ψ : M → ℝ) : Base → ℝ := localize p ψ (fun _ => 1) + +lemma localizedWeight_smooth (p : M) {ψ : M → ℝ} + (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) (hs : tsupport ψ ⊆ (chart p).source) : + ContDiff ℝ ∞ (localizedWeight p ψ) := localize_smooth p hψ hs contMDiff_const + +omit [CompactSpace M] in +lemma chart_mdifferentiable (p : M) : (chart p).MDifferentiable planeModel 𝓘(ℝ,Base) := + ⟨(chart_smooth p).mdifferentiableOn (by simp), + (chart_symm_smooth p).mdifferentiableOn (by simp)⟩ + +omit [CompactSpace M] in +lemma fderiv_comp_chart_symm {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) (p : M) {x : Base} + (hx : x ∈ (chart p).target) : + fderiv ℝ (f ∘ (chart p).symm) x = + (mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)).comp + (mfderiv 𝓘(ℝ,Base) planeModel (chart p).symm x) := by + rw [← mfderiv_eq_fderiv] + exact mfderiv_comp x (hf.mdifferentiable one_ne_zero).mdifferentiableAt + ((chart_mdifferentiable p).mdifferentiableAt_symm hx) + +lemma localized_weightedJet {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) (p : M) {ψ : M → ℝ} + (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) (hs : tsupport ψ ⊆ (chart p).source) + {x : Base} (hx : x ∈ (chart p).target) : + weightedJet (localizedWeight p ψ) (localize p ψ f) x = + (ψ ((chart p).symm x))^4 • + ((mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)).comp + (mfderiv 𝓘(ℝ,Base) planeModel (chart p).symm x)) := by + have hh : DifferentiableAt ℝ (f ∘ (chart p).symm) x := + ((hf.mdifferentiable one_ne_zero).mdifferentiableAt.comp x + ((chart_mdifferentiable p).mdifferentiableAt_symm hx)).differentiableAt + have he : localize p ψ f =ᶠ[𝓝 x] + fun y => localizedWeight p ψ y • (f ∘ (chart p).symm) y := by + filter_upwards [(chart p).open_target.mem_nhds hx] with y hy + simp only [localizedWeight,localize,indicator_of_mem hy,smul_eq_mul,mul_one, + Function.comp_apply] + rw [weightedJet_eq_smul ((localizedWeight_smooth p hψ hs).differentiable (by simp) x) hh he, + fderiv_comp_chart_symm hf p hx] + have hw : localizedWeight p ψ x = (ψ ((chart p).symm x))^2 := by + simp only [localizedWeight,localize,indicator_of_mem hx,smul_eq_mul,mul_one] + rw [hw,← pow_mul] + norm_num + rfl + +/-- The weighted jet loses no immersion information wherever its weight is +nonzero; the chart differential is an isomorphism there. -/ +lemma localized_weightedJet_injective_iff {f : M → V} + (hf : ContMDiff planeModel 𝓘(ℝ,V) 1 f) (p : M) {ψ : M → ℝ} + (hψ : ContMDiff planeModel 𝓘(ℝ) ∞ ψ) (hs : tsupport ψ ⊆ (chart p).source) + {x : Base} (hx : x ∈ (chart p).target) (hw : ψ ((chart p).symm x) ≠ 0) : + Function.Injective (weightedJet (localizedWeight p ψ) (localize p ψ f) x) ↔ + Function.Injective (mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)) := by + rw [localized_weightedJet hf p hψ hs hx] + constructor + · intro hi + have hcomp : Function.Injective + ((mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)).comp + (mfderiv 𝓘(ℝ,Base) planeModel (chart p).symm x)) := by + intro v u h + apply hi + change (ψ ((chart p).symm x))^4 • + ((mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)).comp + (mfderiv 𝓘(ℝ,Base) planeModel (chart p).symm x)) v = _ + exact congrArg ((ψ ((chart p).symm x))^4 • ·) h + change Function.Injective + ((mfderiv planeModel 𝓘(ℝ,V) f ((chart p).symm x)) ∘ + (mfderiv 𝓘(ℝ,Base) planeModel (chart p).symm x)) at hcomp + exact hcomp.of_comp_right ((chart_mdifferentiable p).symm.mfderiv_surjective hx) + · intro hi + exact (smul_right_injective V (pow_ne_zero 4 hw)).comp + (hi.comp ((chart_mdifferentiable p).symm.mfderiv_injective hx)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1LocalizedComposition.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1LocalizedComposition.lean new file mode 100644 index 0000000000000000000000000000000000000000..76a7d54103af485a7030cd72cb3e33298ec95b67 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/C1LocalizedComposition.lean @@ -0,0 +1,93 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LocalizedCompositionBounds + +namespace OAI + +/-! First-derivative bounds for localization of C1 inputs. -/ +noncomputable section +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Filter WeightedEstimates +open JetPolynomial (Base) + +variable {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] + +lemma localizedComposition_C1 {O : Set Base} (hO : IsOpen O) + {χ : Base → ℝ} (hχ : ContDiff ℝ ∞ χ) (hs : tsupport χ ⊆ O) + {T : Base → Base} (hT : ContDiffOn ℝ ∞ T O) + {f : Base → V} (hf : ContDiff ℝ 1 f) : + ContDiff ℝ 1 (fun x => χ x • f (T x)) := by + rw [contDiff_iff_contDiffAt] + intro x + by_cases hx : x ∈ tsupport χ + · have ht : ContDiffAt ℝ 1 T x := + (hT.of_le (by simp)).contDiffAt (hO.mem_nhds (hs hx)) + exact (hχ.of_le (by simp)).contDiffAt.smul (hf.contDiffAt.comp x ht) + · apply contDiffAt_const.congr_of_eventuallyEq + filter_upwards [notMem_tsupport_iff_eventuallyEq.mp hx] with y hy + simp only [Pi.zero_apply] at hy + rw [hy,zero_smul] + +/-- Localization by a fixed chart change is bounded in C1 even when the +input is only C1. This applies to smoothing errors of a Whitney immersion. -/ +theorem compact_localized_C1_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) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ (f : Base → V) (C : ℝ), 0 ≤ C → + ContDiff ℝ 1 f → (∀ x, ‖f x‖ ≤ C ∧ ‖fderiv ℝ f x‖ ≤ C) → + ∀ x, ‖χ x • f (T x)‖ ≤ D*C ∧ + ‖fderiv ℝ (fun y => χ y • f (T y)) x‖ ≤ D*C := by + obtain ⟨A,hA,hAb⟩ := compact_coefficient_bound hO.uniqueDiffOn hK hKO hχ.contDiffOn 1 + obtain ⟨B,hB,hBb⟩ := compact_coefficient_bound hO.uniqueDiffOn hK hKO hT 1 + refine ⟨A+A*B,by positivity,?_⟩ + intro f C hC hf hb x + by_cases hx : x ∈ tsupport χ + · have hxO := hKO (hχK hx) + have hAx : ‖χ x‖ ≤ A := by + simpa only [norm_iteratedFDerivWithin_zero] using hAb 0 (by omega) x (hχK hx) + have hA' : ‖fderiv ℝ χ x‖ ≤ A := by + have hh := hAb 1 le_rfl x (hχK hx) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn + ((hχ.of_le (by simp)).contDiffAt) hxO] at hh + simpa only [norm_iteratedFDeriv_one] using hh + have ht := (hT.of_le (by simp : (1 : ℕ∞ω) ≤ ∞)).contDiffAt (hO.mem_nhds hxO) + have hB' : ‖fderiv ℝ T x‖ ≤ B := by + have hh := hBb 1 le_rfl x (hχK hx) + rw [iteratedFDerivWithin_eq_iteratedFDeriv hO.uniqueDiffOn ht hxO] at hh + simpa only [norm_iteratedFDeriv_one] using hh + refine ⟨?_,?_⟩ + · calc + ‖χ x • f (T x)‖ = ‖χ x‖*‖f (T x)‖ := norm_smul _ _ + _ ≤ A*C := mul_le_mul hAx (hb _).1 (norm_nonneg _) (by linarith) + _ ≤ (A+A*B)*C := by nlinarith [mul_nonneg (mul_nonneg (by linarith : 0 ≤ A) (by linarith : 0 ≤ B)) hC] + · have htc := (hf.differentiable one_ne_zero (T x)).comp x + (ht.differentiableAt one_ne_zero) + rw [fderiv_fun_smul (f := fun y => f (T y)) (hχ.differentiable (by simp) x) htc] + change ‖χ x • fderiv ℝ (f ∘ T) x + (fderiv ℝ χ x).smulRight (f (T x))‖ ≤ _ + rw [fderiv_comp x (hf.differentiable one_ne_zero (T x)) (ht.differentiableAt one_ne_zero)] + calc + _ ≤ ‖χ x • ((fderiv ℝ f (T x)).comp (fderiv ℝ T x))‖+ + ‖(fderiv ℝ χ x).smulRight (f (T x))‖ := norm_add_le _ _ + _ ≤ ‖χ x‖*(‖fderiv ℝ f (T x)‖*‖fderiv ℝ T x‖)+‖fderiv ℝ χ x‖*‖f (T x)‖ := by + rw [norm_smul,ContinuousLinearMap.norm_smulRight_apply] + exact add_le_add (mul_le_mul_of_nonneg_left + (ContinuousLinearMap.opNorm_comp_le _ _) (norm_nonneg _)) le_rfl + _ ≤ A*(C*B)+A*C := by gcongr; exact (hb _).2; exact (hb _).1 + _ = (A+A*B)*C := by ring + · have hz := notMem_tsupport_iff_eventuallyEq.mp hx + have heq : (fun y => χ y • f (T y)) =ᶠ[𝓝 x] (fun _ => (0 : V)) := by + filter_upwards [hz] with y hy + simp only [Pi.zero_apply] at hy + rw [hy,zero_smul] + have hval : χ x • f (T x) = 0 := heq.self_of_nhds + have hd : fderiv ℝ (fun y => χ y • f (T y)) x = 0 := by + rw [heq.fderiv_eq] + exact fderiv_const_apply (0 : V) + rw [hval,hd,norm_zero,norm_zero] + constructor <;> positivity + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CardinalityQuadraticCancellation.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CardinalityQuadraticCancellation.lean new file mode 100644 index 0000000000000000000000000000000000000000..f58d99736fba0c4d788a772c7994e20c3336e572 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CardinalityQuadraticCancellation.lean @@ -0,0 +1,114 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.UniformQuadraticLabelCancellation +import OAI.Geometry.SurfaceImmersion.Geometry.MetricForcedFactorBudgets + +namespace OAI + +/-! Global quadratic cancellation with explicit polynomial dependence on +the number of free phases. Atlas constants precede all finite label types. -/ +noncomputable section +open Set Manifold Bundle +open scoped ContDiff Manifold Topology BigOperators NNReal +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial JetPolynomial.Perturbation PhaseMean + +local instance cardinalityQuadraticFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance cardinalityQuadraticFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance cardinalityQuadraticDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance cardinalityQuadraticDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance cardinalityQuadraticSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance cardinalityQuadraticSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +omit [CompactSpace M] in +lemma quadratic_family_sum_le {ι : Type*} [Fintype ι] [DecidableEq ι] + {n : ℕ} (hn : Fintype.card ι ≤ n) {B : ℝ} (hB : 0 ≤ B) + (f : A.centers → RealModes.QuadraticLabel ι → ℝ) (hf : ∀ k l, f k l ≤ B) : + (∑ k : A.centers, ∑ l, f k l) ≤ + (Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)*B := by + have hc : Fintype.card (RealModes.QuadraticLabel ι) ≤ n+2*n^2 := by + apply (RealModes.card_quadraticLabel_le ι).trans + gcongr + have hcr : (Fintype.card (RealModes.QuadraticLabel ι) : ℝ) ≤ (n : ℝ)+2*(n : ℝ)^2 := by + exact_mod_cast hc + calc + (∑ k : A.centers, ∑ l, f k l) ≤ ∑ _k : A.centers, ∑ _l : RealModes.QuadraticLabel ι, B := + Finset.sum_le_sum (fun k _ => Finset.sum_le_sum (fun l _ => hf k l)) + _ = (Fintype.card A.centers : ℝ)*(Fintype.card (RealModes.QuadraticLabel ι) : ℝ)*B := by simp; ring + _ ≤ _ := by gcongr + +theorem cardinality_quadratic_cancellation : + ∃ Dv Dt : ℕ → ℝ, (∀ m, 0 ≤ Dv m) ∧ (∀ m, 0 ≤ Dt m) ∧ + ∀ {ι : Type*} [Fintype ι] [DecidableEq ι], ∀ n : ℕ, Fintype.card ι ≤ n → + ∀ (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 emptyMetricPolynomial 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 : ℕ, + ∀ Sv St N : ℕ → ℝ, (∀ m, 0 ≤ Sv m) → (∀ m, 0 ≤ St m) → (∀ m, 0 ≤ N m) → + (∀ k l m, (c k l).sizeFactor q m ≤ Sv m) → + (∀ k l m, (c k l).residualFactor q m ≤ St m) → + (∀ k l m, (c k l).norm (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) m + ≤ δ^2*N m) → + ∃ W : M → RealModes.RVec 4, ContMDiff planeModel 𝓘(ℝ,RealModes.RVec 4) ∞ W ∧ + (∀ m, A.WeightedBound τ m + (δ^2*(Dv m*(Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)*Sv m*N (m+q+1))) W) ∧ + (∀ m, A.TensorWeightedBound τ m + (δ^2*(τ/s)^(q+1)*(Dt m*(Fintype.card A.centers : ℝ)*((n : ℝ)+2*(n : ℝ)^2)*St m*N (m+q+1))) + (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_global_quadratic_cancellation_on (fun _ => emptyMetricPolynomial) + refine ⟨Dv,Dt,hDv,hDt,?_⟩ + intro ι inst dec n hn F hF φ Z hφ hZ S hS hSZ τ s c hτ hs hτs hs1 δ q Sv St N hSv hSt hN hcv hct hcn + obtain ⟨W,hW,hsize,hres⟩ := h F hF φ Z hφ hZ S hS hSZ c hτ hs hτs hs1 q + have horder (m : ℕ) : PolynomialSolveData.inputOrder (P := emptyMetricPolynomial) q m = m+q+1 := by + simp only [PolynomialSolveData.inputOrder,tensorOrder_emptyMetricPolynomial] + omega + have hsz (m : ℕ) := A.quadratic_family_sum_le hn + (mul_nonneg (sq_nonneg δ) (mul_nonneg (hSv m) (hN (m+q+1)))) + (fun k l => (c k l).size (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) + (fun k l => ((c k l).size_le_scaled (sq_nonneg δ) _ q m (hcn k l _)).trans (by + rw [horder] + exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right (hcv k l m) (hN _)) (sq_nonneg δ))) + have hr (m : ℕ) := A.quadratic_family_sum_le hn + (mul_nonneg (mul_nonneg (sq_nonneg δ) (pow_nonneg (div_nonneg hτ.le hs.le) _)) + (mul_nonneg (hSt m) (hN (m+q+1)))) + (fun k l => (c k l).residual (A.globalQuadraticTargetRestricted τ φ Z hφ hZ S hS hSZ k l) q m) + (fun k l => ((c k l).residual_le_scaled + (by simpa only [zero_div,add_zero] using div_nonneg hτ.le hs.le) _ q m (hcn k l _)).trans (by + simp only [zero_div,add_zero,horder] + exact mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right (hct k l m) (hN _)) + (mul_nonneg (sq_nonneg δ) (pow_nonneg (div_nonneg hτ.le hs.le) _)))) + refine ⟨W,hW,?_,?_⟩ + · intro m k + apply (hsize m k).mono_const + apply (mul_le_mul_of_nonneg_left (hsz m) (hDv m)).trans + apply le_of_eq + ring + · intro m k + apply (hres m k).mono_const + apply (mul_le_mul_of_nonneg_left (hr m) (hDt m)).trans + apply le_of_eq + ring + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CenteredTaylorJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CenteredTaylorJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..a1ca6b4cc877c3e47ece0777cb846538e36bee28 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CenteredTaylorJets.lean @@ -0,0 +1,65 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CenteredCrosscapPreparation + +namespace OAI + +/-! Centered Taylor preparation retains the complete second jet, hence +also the actual regular zero of the derivative-direction map. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma centeredSurfaceTaylor_smooth (f : Base → ProjectionTarget 3) (a : Base) : + ContDiff ℝ ∞ (centeredSurfaceTaylor f a) := + (surfaceTaylorTwo_smooth _).comp (contDiff_id.sub contDiff_const) + +lemma centeredSurfaceTaylor_fderiv {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (a x : Base) : + fderiv ℝ (centeredSurfaceTaylor f a) x = + fderiv ℝ f a + fderiv ℝ (fderiv ℝ f) a (x-a) := by + have htrans : ContDiff ℝ ∞ (translatedSurface f a) := hf.comp (contDiff_id.add contDiff_const) + change fderiv ℝ (fun y => surfaceTaylorTwo (translatedSurface f a) (y-a)) x = _ + rw [fderiv_comp_sub,surfaceTaylorTwo_fderiv htrans] + have hfirst : fderiv ℝ (translatedSurface f a) = fun y => fderiv ℝ f (y+a) := by + funext y + exact fderiv_comp_add_right a + rw [hfirst,fderiv_comp_add_right] + simp only [zero_add] + +lemma centeredSurfaceTaylor_second {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (a x : Base) : + fderiv ℝ (fderiv ℝ (centeredSurfaceTaylor f a)) x = fderiv ℝ (fderiv ℝ f) a := by + have he : fderiv ℝ (centeredSurfaceTaylor f a) = + fun y => fderiv ℝ f a+fderiv ℝ (fderiv ℝ f) a (y-a) := + funext (centeredSurfaceTaylor_fderiv hf a) + rw [he] + exact ((fderiv ℝ (fderiv ℝ f) a).hasFDerivAt.comp x + ((hasFDerivAt_id x).sub_const a) |>.const_add (fderiv ℝ f a)).fderiv + +lemma surfaceDirection_congr_twoJet {f g : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (hg : ContDiff ℝ ∞ g) (b : Bool) (z : Base × ℝ) + (hfirst : fderiv ℝ f z.1 = fderiv ℝ g z.1) + (hsecond : fderiv ℝ (fderiv ℝ f) z.1 = fderiv ℝ (fderiv ℝ g) z.1) : + surfaceDirection f b z = surfaceDirection g b z ∧ + fderiv ℝ (surfaceDirection f b) z = fderiv ℝ (surfaceDirection g b) z := by + constructor + · simp only [surfaceDirection,hfirst] + · rw [(surfaceDirection_hasFDerivAt hf b z).fderiv, + (surfaceDirection_hasFDerivAt hg b z).fderiv] + simp only [surfaceDirectionLinearization,hfirst,hsecond] + +lemma centeredSurfaceTaylor_direction {f : Base → ProjectionTarget 3} + (hf : ContDiff ℝ ∞ f) (a : Base) (b : Bool) (t : ℝ) : + surfaceDirection (centeredSurfaceTaylor f a) b (a,t) = surfaceDirection f b (a,t) ∧ + fderiv ℝ (surfaceDirection (centeredSurfaceTaylor f a) b) (a,t) = + fderiv ℝ (surfaceDirection f b) (a,t) := by + apply surfaceDirection_congr_twoJet (centeredSurfaceTaylor_smooth f a) hf + · simpa only [Prod.fst,sub_self,map_zero,add_zero] using centeredSurfaceTaylor_fderiv hf a a + · exact centeredSurfaceTaylor_second hf a a + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/ClosedFamilySeparator.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ClosedFamilySeparator.lean new file mode 100644 index 0000000000000000000000000000000000000000..2e383b5742a8eb527f4c84e42c0c97e79370b417 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/ClosedFamilySeparator.lean @@ -0,0 +1,76 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteGermSeparator + +namespace OAI + +/-! Smooth separators constant near each member of a finite disjoint +closed family. This freezes whole quadratic crosscap neighborhoods while +regularizing double pairs outside the corresponding diagonal squares. -/ +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 closed_family_separator {ι : 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)) : + ∃ χ : M → ℝ, ContMDiff planeModel 𝓘(ℝ) ∞ χ ∧ + (∀ x, χ x ∈ Icc 0 1) ∧ χ =ᶠ[𝓝 p] (fun _ => 1) ∧ + χ =ᶠ[𝓝 q] (fun _ => 0) ∧ ∀ i, + (χ =ᶠ[𝓝ˢ (A i)] (fun _ => 0)) ∨ (χ =ᶠ[𝓝ˢ (A i)] (fun _ => 1)) := by + classical + let B₀ : Set M := {q} ∪ ⋃ i, if p ∈ A i then ∅ else A i + let B₁ : Set M := {p} ∪ ⋃ i, if p ∈ A i then A i else ∅ + have hB₀ : IsClosed B₀ := isClosed_singleton.union (isClosed_iUnion_of_finite fun i => by + split_ifs <;> first | exact isClosed_empty | exact hA i) + have hB₁ : IsClosed B₁ := isClosed_singleton.union (isClosed_iUnion_of_finite fun i => by + split_ifs <;> first | exact isClosed_empty | exact hA i) + have hBdis : Disjoint B₀ B₁ := by + apply Set.disjoint_left.mpr + intro x hx₀ hx₁ + rcases hx₀ with hxq | hx₀ + · have hx : x = q := mem_singleton_iff.mp hxq + subst x + rcases hx₁ with hqp | hx₁ + · exact hpq (mem_singleton_iff.mp hqp).symm + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx₁ + split_ifs at hi with hp + · exact hpair i ⟨hp,hi⟩ + · exact hi + · obtain ⟨i,hi⟩ := mem_iUnion.mp hx₀ + split_ifs at hi with hpi + · exact hi + rcases hx₁ with hxp | hx₁ + · exact hpi ((mem_singleton_iff.mp hxp) ▸ hi) + · obtain ⟨j,hj⟩ := mem_iUnion.mp hx₁ + split_ifs at hj with hpj + · by_cases hij : i = j + · subst j; exact hpi hpj + · exact Set.disjoint_left.mp (hdis hij) hi hj + · exact hj + obtain ⟨χ,hχ0,hχ1,hχr⟩ := exists_contMDiffMap_zero_one_nhds_of_isClosed + planeModel hB₀ hB₁ hBdis (n := (⊤ : ℕ∞)) + have hpB : p ∈ B₁ := Or.inl (mem_singleton p) + have hqB : q ∈ B₀ := Or.inl (mem_singleton q) + refine ⟨χ,χ.contMDiff,hχr, + hχ1.filter_mono (nhds_le_nhdsSet hpB), + hχ0.filter_mono (nhds_le_nhdsSet hqB),?_⟩ + intro i + by_cases hp : p ∈ A i + · apply Or.inr + apply hχ1.filter_mono + apply nhdsSet_mono + intro x hx + exact Or.inr (mem_iUnion.mpr ⟨i,by simpa [hp] using hx⟩) + · apply Or.inl + apply hχ0.filter_mono + apply nhdsSet_mono + intro x hx + exact Or.inr (mem_iUnion.mpr ⟨i,by simpa [hp] using hx⟩) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CoefficientJetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CoefficientJetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..b166b2a342a6514c348234891be311a885d55afe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CoefficientJetBounds.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteFastBounds + +namespace OAI + +/-! The finite first and second slow/angular coefficient jets needed by the +primitive's five leading derivative estimates share one fixed scale loss. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.JetPolynomial.VectorExpression +open LocalPeriodicExpansion WeightedEstimates + +def coefficientDerivative (R : VectorExpression) (k : Fin 3) : VectorExpression := + ![R.slow 0,R.slow 1,R.angle] k + +def coefficientFamilyDerivative {S : TopologicalSpace.Opens Base} + (U : Family S R4) (k : Fin 3) : Family S R4 := + ![U.slow (coordinateVector 0),U.slow (coordinateVector 1),U.angle] k + +lemma coefficientDerivative_smooth {O : Set LowJet} (hO : IsOpen O) {R : VectorExpression} + (hR : R.SmoothCoeffs O) (k : Fin 3) : (R.coefficientDerivative k).SmoothCoeffs O := by + fin_cases k + · exact fun a => Expression.smoothCoeffs_slow hO 0 (hR a) + · exact fun a => Expression.smoothCoeffs_slow hO 1 (hR a) + · exact fun a => Expression.smoothCoeffs_angle hO (hR a) + +lemma coefficientDerivative_order {R : VectorExpression} {N : ℕ} (hN : 2 ≤ N) + (hR : ∀ a, (R a).order ≤ N) (k : Fin 3) (a : Fin 4) : + (R.coefficientDerivative k a).order ≤ N+1 := by + fin_cases k + · exact order_slow_le hN hR 0 a + · exact order_slow_le hN hR 1 a + · change (R a).angle.order ≤ N+1 + rw [Expression.order_angle] + exact (hR a).trans (Nat.le_succ N) + +lemma represents_coefficientDerivative {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) + (k : Fin 3) : Represents G (R.coefficientDerivative k) (coefficientFamilyDerivative U k) := by + fin_cases k + · exact represents_slow hO hG hGO hRs hR 0 + · exact represents_slow hO hG hGO hRs hR 1 + · exact represents_angle hO hGO hRs hR + +theorem compact_coefficient_two_jets {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, ∀ k j : Fin 3, ∀ p ∈ S, + ‖(coefficientFamilyDerivative (U i) k).fastValue ℓ z p‖ ≤ D/s^loss ∧ + ‖(coefficientFamilyDerivative (coefficientFamilyDerivative (U i) k) j).fastValue ℓ z p‖ ≤ + D/s^loss := by + classical + let I := Bool × Fin 3 × Fin 3 × Fin L + let R' : I → VectorExpression := fun a => if a.1 then + ((R a.2.2.2).coefficientDerivative a.2.1).coefficientDerivative a.2.2.1 + else (R a.2.2.2).coefficientDerivative a.2.1 + have hR's (a : I) : (R' a).SmoothCoeffs O := by + dsimp only [R'] + split_ifs + · exact coefficientDerivative_smooth hO + (coefficientDerivative_smooth hO (hRs _ a.2.2.2.isLt) _) _ + · exact coefficientDerivative_smooth hO (hRs _ a.2.2.2.isLt) _ + have hR'o (a : I) (v : Fin 4) : (R' a v).order ≤ N+2 := by + dsimp only [R'] + split_ifs + · exact coefficientDerivative_order (by omega) + (coefficientDerivative_order hN (hRo _ a.2.2.2.isLt) _) _ v + · exact (coefficientDerivative_order hN (hRo _ a.2.2.2.isLt) _ v).trans (by omega) + let loss := Finset.univ.sup (fun a : I => Finset.univ.sup (fun v : Fin 4 => (R' a v).loss)) + have hl (a : I) (v : Fin 4) : (R' a v).loss ≤ loss := + (Finset.le_sup (f := fun v : Fin 4 => (R' a v).loss) (Finset.mem_univ v)).trans + (Finset.le_sup (f := fun a : I => Finset.univ.sup (fun v : Fin 4 => (R' a v).loss)) + (Finset.mem_univ a)) + refine ⟨loss,?_⟩ + intro B hB + obtain ⟨D,hD,hd⟩ := compact_finite_fast_bound (S := S) hO hQ hQO R' hR's (N+2) loss hR'o hl ℓ 0 B hB + refine ⟨D,hD,?_⟩ + intro G s z hz hzs hs1 hG hGQ hb U hrep i hi k j p hp + have hGO : MapsTo (lowJet G) S O := fun _ hx => hQO (hGQ hx) + let U' : I → Family S R4 := fun a => if a.1 then + coefficientFamilyDerivative (coefficientFamilyDerivative (U a.2.2.2) a.2.1) a.2.2.1 + else coefficientFamilyDerivative (U a.2.2.2) a.2.1 + have hrep' (a : I) : Represents G (R' a) (U' a) := by + dsimp only [R',U'] + split_ifs + · exact represents_coefficientDerivative hO hG hGO + (coefficientDerivative_smooth hO (hRs _ a.2.2.2.isLt) _) + (represents_coefficientDerivative hO hG hGO (hRs _ a.2.2.2.isLt) (hrep _ a.2.2.2.isLt) _) _ + · exact represents_coefficientDerivative hO hG hGO (hRs _ a.2.2.2.isLt) (hrep _ a.2.2.2.isLt) _ + have hh := hd G s z hz hzs hs1 hG hGQ (by simpa only [zero_add] using hb) U' hrep' + exact ⟨(hh (false,k,j,⟨i,hi⟩)).norm_le hp,(hh (true,k,j,⟨i,hi⟩)).norm_le hp⟩ + +end ClosedSurfaceR4.JetPolynomial.VectorExpression + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticExpansion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticExpansion.lean new file mode 100644 index 0000000000000000000000000000000000000000..e393583b80867c89ca23f6796dfccbfdf4795702 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticExpansion.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.CoordinateQuadraticExpansion + +namespace OAI + +/-! Exact full quadratic expansion: the metric and polynomial remainders +share one finite family of doubled and mixed nonzero phases. -/ +noncomputable section +open scoped ContDiff BigOperators +namespace ClosedSurfaceR4.JetPolynomial.Perturbation + +def combinedQuadraticMean {n : ℕ} {ι : Type*} [Fintype ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) : + SmallModes.Base → PhaseMean.Tensor := + RealModes.zeroPhaseSum τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + coordinateQuadraticMean P ε G φ H τ t + +def combinedQuadraticCoefficient {n : ℕ} {ι : Type*} + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) (τ t : ℝ) + (l : RealModes.QuadraticLabel ι) : SmallModes.Tensor := + RealModes.quadraticAmplitude τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) l + coordinateQuadraticCoefficient P ε G φ H τ t l + +lemma displacement_add (τ : ℝ) (φ : SmallModes.Base → ℝ) (A B : SmallModes.Tensor) : + QuadraticMean.displacement τ φ (A + B) = + QuadraticMean.displacement τ φ A + QuadraticMean.displacement τ φ B := by + funext p i + simp only [QuadraticMean.displacement, QuadraticMean.realMode, QuadraticMean.realPart, + Pi.add_apply, Pi.smul_apply, smul_eq_mul, mul_add, Complex.add_re] + +theorem combined_quadratic_expansion {n : ℕ} {ι : Type*} [Fintype ι] [DecidableEq ι] + (P : Fin 3 → Fin n → Expression) (ε : ℝ) (G : Base → Space) + (φ : ι → Base → ℝ) (H : ι → Base → Fin 4 → ℂ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) (hH : ∀ i, ContDiff ℝ ∞ (H i)) (τ t : ℝ) : + let X := QuadraticMean.sumDisplacement τ (fun i => coordinatePhase (φ i)) + (fun i => coordinateAmplitude (H i)) + RealModes.realMetricTensor X + coordinateQuadraticPolynomial P ε G X t = + combinedQuadraticMean P ε G φ H τ t + + fun p => ∑ l : RealModes.QuadraticLabel ι, + QuadraticMean.displacement τ + (RealModes.quadraticPhase (fun i => coordinatePhase (φ i)) l) + (combinedQuadraticCoefficient P ε G φ H τ t l) p := by + dsimp only + have hp := coordinate_quadratic_polynomial_expansion P ε G φ H hφ hH τ t + dsimp only at hp + rw [hp] + funext p + have hm := RealModes.realMetric_sumDisplacement + (fun i => ((hφ i).comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) p) + (fun i => ((hH i).comp planeCoordinateIsometry.symm.contDiff).differentiable (by simp) p) τ + change RealModes.realMetricTensor _ p + _ = _ + rw [hm, RealModes.nonzeroPhaseSum_eq_quadraticFamily] + simp only [combinedQuadraticMean, combinedQuadraticCoefficient, displacement_add, + Pi.add_apply, Finset.sum_add_distrib] + abel + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticSolverInput.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticSolverInput.lean new file mode 100644 index 0000000000000000000000000000000000000000..6e8eb424445da684c29fc412fe59538c0c0290d3 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticSolverInput.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CombinedQuadraticTargetBounds +import OAI.Geometry.SurfaceImmersion.Correction.PolynomialInputNorm + +namespace OAI + +/-! The actual perturbed quadratic targets in the norm of a phase solver. +The target estimate is made on a fixed compact jet domain. The phase +solver may use its own domain, since its input norm only transports the +supported tensor through its phase chart. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +/-- Changing the auxiliary domains used to prove smoothness does not change +the supported combined quadratic target. -/ +theorem combinedQuadraticTarget_domain_independent {n : ℕ} {ι : Type*} + {D D' : Set Base} {O O' : Set LowJet} (hD : IsOpen D) (hD' : IsOpen D') + (hO : IsOpen O) (hO' : IsOpen O') (P : Fin 3 → Fin n → Expression) + (hP : ∀ k j, (P k j).SmoothCoeffs O) (hP' : ∀ k j, (P k j).SmoothCoeffs O') + {G : Base → Space} (hG : ContDiff ℝ ∞ G) (φ : ι → Base → ℝ) + (hφ : ∀ i, ContDiff ℝ ∞ (φ i)) {K : ι → Compacts Base} + (H : ∀ i, SupportedField (F := Fin 4 → ℂ) (K i)) + (hGO : Set.MapsTo (lowJet G) D O) (hGO' : Set.MapsTo (lowJet G) D' O') + (l : QuadraticLabel ι) (hKD : (quadraticCompacts K l : Set Base) ⊆ D) + (hKD' : (quadraticCompacts K l : Set Base) ⊆ D') (ε τ t : ℝ) : + combinedQuadraticTarget hD hO P hP hG φ hφ H hGO l hKD ε τ t = + combinedQuadraticTarget hD' hO' P hP' hG φ hφ H hGO' l hKD' ε τ t := by + apply DFunLike.ext + intro x + rfl + +/-- A constant chosen before the map and scales bounds the actual perturbed +quadratic target in any corresponding quadratic-phase solver norm. -/ +theorem combined_quadratic_solver_input_bound {n : ℕ} {ι : Type*} + {D : Set Base} {O Q : Set LowJet} (hD : IsOpen D) (hO : IsOpen O) + (hQ : IsCompact Q) (hQO : Q ⊆ O) (P : Fin 3 → Fin n → Expression) + (hP : ∀ k j, (P k j).SmoothCoeffs O) (m : ℕ) (B F M A : ℝ) + (hB : 1 ≤ B) (hF : 0 ≤ F) (hM : 0 ≤ M) (hA : 0 < A) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ {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 → + (hGQ : Set.MapsTo (lowJet G) D Q) → + WeightedBound D s (m + tensorOrder P) B (lowJet G) → + (∀ i, WeightedBound Set.univ s (m + tensorOrder P + 1) (A * (δ * τ)) (H i)) → + (∀ i v, WeightedBound D s (m + tensorOrder P) F + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) → + (∀ i v, ‖v‖ ≤ 1 → WeightedBound Set.univ s m M + (SmallModes.coordDeriv v (coordinatePhase (φ i)))) → + ∀ (l : QuadraticLabel ι) (hKD : (quadraticCompacts K l : Set Base) ⊆ D) + (c : PolynomialSolveData P ε G hG (quadraticFamilyPhase φ l) + (quadraticCompacts 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 (combinedQuadraticTarget hD hO P hP hG φ hφ H + (fun _ hx => hQO (hGQ hx)) l hKD ε τ 0) m ≤ + δ ^ 2 * tensorChartBudget m (I m) (I (m + 1)) * E := by + obtain ⟨E,hE,he⟩ := combinedQuadraticTarget_bounds (ι := ι) + hD hO hQ hQO P hP m B F M A hB hF hM hA + refine ⟨E,hE,?_⟩ + intro G hG φ hφ K H s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall + hGQ hGb hHb hφb hφm l hKD c I hI hcoords + have ht := he hG φ hφ K H s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall + hGQ hGb hHb hφb hφm l hKD + have hn := c.norm_le_of_weightedBound hs hs1 I hI hcoords m + (mul_nonneg (sq_nonneg δ) hE) _ ht + calc + _ ≤ tensorChartBudget m (I m) (I (m + 1)) * (δ ^ 2 * E) := hn + _ = _ := by ring + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticTargetBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticTargetBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..bf3fa41c1e8d652effb92c29e98fc5c24243bb1d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CombinedQuadraticTargetBounds.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SupportedQuadraticFamily +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledQuadraticTargets +import OAI.Geometry.SurfaceImmersion.Geometry.ScaledMetricQuadraticTargets + +namespace OAI + +/-! The actual combined doubled/mixed-phase targets have size delta squared. +The polynomial is evaluated in the original coordinates. -/ +noncomputable section +open TopologicalSpace +open scoped ContDiff NNReal +namespace ClosedSurfaceR4.JetPolynomial.Perturbation +open PhaseMean RealModes WeightedEstimates + +theorem combinedQuadraticTarget_bounds {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 j, (P k j).SmoothCoeffs O) (m : ℕ) (B F M A : ℝ) + (hB : 1 ≤ B) (hF : 0 ≤ F) (hM : 0 ≤ M) (hA : 0 < A) : + ∃ E : ℝ, 0 ≤ E ∧ ∀ {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 → + (hGQ : Set.MapsTo (lowJet G) U Q) → + WeightedBound U s (m + tensorOrder P) B (lowJet G) → + (∀ i, WeightedBound Set.univ s (m + tensorOrder P + 1) (A * (δ * τ)) (H i)) → + (∀ i v, WeightedBound U s (m + tensorOrder P) F + (fun x => fderiv ℝ (φ i) x (coordinateVector v))) → + (∀ i v, ‖v‖ ≤ 1 → WeightedBound Set.univ s m M + (SmallModes.coordDeriv v (coordinatePhase (φ i)))) → + ∀ (l : QuadraticLabel ι) (hKU : (quadraticCompacts K l : Set Base) ⊆ U), + WeightedBound Set.univ s m (δ ^ 2 * E) + (combinedQuadraticTarget hU hO P hP hG φ hφ H + (fun _ hx => hQO (hGQ hx)) l hKU ε τ 0) := by + obtain ⟨E,hE,he⟩ := scaled_quadraticFamilyTensor_bound (ι := ι) hU hO hQ hQO P hP m B F hB hF + let D := (4 : ℝ) * 2 ^ m * ((1 + 2 ^ m * M) * A) ^ 2 + refine ⟨D + E * A ^ 2,by dsimp [D]; positivity,?_⟩ + intro G hG φ hφ K H s δ τ ε hδ hτ hs hτs hs1 hε hε1 hsmall hGQ hGb hHb hφb hφm l hKU + have hmetric := scaled_quadraticAmplitude_bound isOpen_univ + (fun i => ((hφ i).comp planeCoordinateIsometry.symm.contDiff).contDiffOn) + (fun i => ((H i).contDiff.comp planeCoordinateIsometry.symm.contDiff).contDiffOn) + hτ hs hτs hδ.le hA.le hM m + (fun i => weightedBound_comp_isometry planeCoordinateIsometry.symm (H i).contDiff + ((hHb i).mono_order (by omega))) hφm l + let f := polynomialQuadraticTarget hU hO hP hG hφ (fun i => (H i).contDiff) + (fun x hx => hQO (hGQ hx)) (fun i => (K i).isCompact.isClosed) (fun i => (H i).tsupport_subset) + l (quadraticCompacts K l) hKU (quadraticCompacts_coe K l).symm.subset ε τ 0 + have hpol : WeightedBound U s m (δ ^ 2 * (τ / s + ε / τ ^ tensorLoss P) * E * A ^ 2) f := + he G φ (fun i => H i) s δ τ ε A (tensorLoss P) hδ hτ hs hτs hs1 hε hε1 hA le_rfl hG hφ + (fun i => (H i).contDiff) hGQ hGb + (fun i => ((hHb i).mono_order (by omega)).restrict_open hU) hφb l 0 (by simp) + have hp : WeightedBound Set.univ s m (δ ^ 2 * (E * A ^ 2)) f := by + apply (hpol.extend_support hU (f.tsupport_subset.trans hKU) (by positivity)).mono_const + calc + _ = (τ / s + ε / τ ^ tensorLoss P) * (δ ^ 2 * E * A ^ 2) := by ring + _ ≤ 1 * (δ ^ 2 * E * A ^ 2) := mul_le_mul_of_nonneg_right hsmall (by positivity) + _ = _ := by ring + have hpc := weightedBound_comp_isometry planeCoordinateIsometry.symm f.contDiff hp + have hh := hmetric.add isOpen_univ.uniqueDiffOn s.coe_nonneg + (metricQuadraticTarget φ hφ H τ l).contDiff.contDiffOn + (f.contDiff.comp planeCoordinateIsometry.symm.contDiff).contDiffOn hpc + convert hh using 1 + · dsimp [D] + ring + · rfl + +end ClosedSurfaceR4.JetPolynomial.Perturbation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonCurveGraphs.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonCurveGraphs.lean new file mode 100644 index 0000000000000000000000000000000000000000..71435b89aeca453c39ecb86e9fe57a641afd8802 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonCurveGraphs.lean @@ -0,0 +1,43 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.PlaneCommonCoordinate + +namespace OAI + +/-! Two regular plane curves admit actual smooth graph representatives in +one common linear coordinate system. No angle condition is required. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem common_curve_graphs {γ δ : ℝ → Base} (hγ : ContDiff ℝ ∞ γ) + (hδ : ContDiff ℝ ∞ δ) {s t : ℝ} (hs : deriv γ s ≠ 0) (ht : deriv δ t ≠ 0) : + ∃ (e : Base ≃L[ℝ] Base) (g h : ℝ → ℝ) (U V : Set ℝ), + ContDiff ℝ ∞ g ∧ ContDiff ℝ ∞ h ∧ IsOpen U ∧ IsOpen V ∧ s ∈ U ∧ t ∈ V ∧ + (∀ u ∈ U, e (γ u) = ![(e (γ u)) 0,g ((e (γ u)) 0)]) ∧ + (∀ v ∈ V, e (δ v) = ![(e (δ v)) 0,h ((e (δ v)) 0)]) ∧ + deriv (fun u => (e (γ u)) 0) s ≠ 0 ∧ deriv (fun v => (e (δ v)) 0) t ≠ 0 := by + obtain ⟨e,hes,het⟩ := exists_common_plane_coordinate hs ht + have hγe : HasDerivAt (e ∘ γ) (e (deriv γ s)) s := + e.toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt s (hγ.differentiable (by simp) s).hasDerivAt + have hδe : HasDerivAt (e ∘ δ) (e (deriv δ t)) t := + e.toContinuousLinearMap.hasFDerivAt.comp_hasDerivAt t (hδ.differentiable (by simp) t).hasDerivAt + have hs0 : deriv (fun u => (e (γ u)) 0) s ≠ 0 := by + have h := (hasDerivAt_pi.mp hγe 0).deriv + dsimp only [Function.comp_apply] at h + rw [h] + exact hes + have ht0 : deriv (fun v => (e (δ v)) 0) t ≠ 0 := by + have h := (hasDerivAt_pi.mp hδe 0).deriv + dsimp only [Function.comp_apply] at h + rw [h] + exact het + obtain ⟨g,U,hg,hU,hsU,hγgraph⟩ := plane_curve_graph (e.contDiff.comp hγ) s hs0 + obtain ⟨h,V,hh,hV,htV,hδgraph⟩ := plane_curve_graph (e.contDiff.comp hδ) t ht0 + exact ⟨e,g,h,U,V,hg,hh,hU,hV,hsU,htV,hγgraph,hδgraph,hs0,ht0⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonSurfaceCurveGraphs.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonSurfaceCurveGraphs.lean new file mode 100644 index 0000000000000000000000000000000000000000..e2b36dd8993f70d05917c6f2fdbe8cb7e41d659c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CommonSurfaceCurveGraphs.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.SurfaceCurveRepresentative +import OAI.Geometry.SurfaceImmersion.Geometry.CommonCurveGraphs + +namespace OAI + +/-! Actual common smooth surface coordinates and graph representatives +for two regular curve germs meeting at one surface 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 common_surface_curve_graphs {γ δ : ℝ → M} {A B : Set ℝ} + (hA : IsOpen A) (hB : IsOpen B) + (hγ : ContMDiffOn 𝓘(ℝ) planeModel ∞ γ A) (hδ : ContMDiffOn 𝓘(ℝ) planeModel ∞ δ B) + {s t : ℝ} (hs : s ∈ A) (ht : t ∈ B) (hpoint : γ s = δ t) + (hγr : Function.Injective (mfderiv 𝓘(ℝ) planeModel γ s)) + (hδr : Function.Injective (mfderiv 𝓘(ℝ) planeModel δ t)) : + ∃ (c : OpenPartialHomeomorph M Base) (g h : ℝ → ℝ) (U V : Set ℝ), + ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source ∧ + ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target ∧ + ContDiff ℝ ∞ g ∧ ContDiff ℝ ∞ h ∧ IsOpen U ∧ IsOpen V ∧ + s ∈ U ∧ t ∈ V ∧ U ⊆ A ∧ V ⊆ B ∧ + (∀ u ∈ U, γ u ∈ c.source ∧ c (γ u) = ![c (γ u) 0,g (c (γ u) 0)]) ∧ + (∀ v ∈ V, δ v ∈ c.source ∧ c (δ v) = ![c (δ v) 0,h (c (δ v) 0)]) ∧ + deriv (fun u => c (γ u) 0) s ≠ 0 ∧ deriv (fun v => c (δ v) 0) t ≠ 0 := by + let p := γ s + have hp : γ s ∈ (chart p).source := by + simpa only [p,chart_source] using mem_chart_source Plane (γ s) + have hp' : δ t ∈ (chart p).source := hpoint ▸ hp + obtain ⟨F,I,hF,hI,hsI,hIA,hFI,hFr⟩ := surface_curve_chart_representative hA hγ hs p hp hγr + obtain ⟨G,J,hG,hJ,htJ,hJB,hGJ,hGr⟩ := surface_curve_chart_representative hB hδ ht p hp' hδr + obtain ⟨e,g,h,U,V,hg,hh,hU,hV,hsU,htV,hFg,hGh,hFd,hGd⟩ := common_curve_graphs hF hG hFr hGr + let c := (chart p).trans e.toHomeomorph.toOpenPartialHomeomorph + have hcs : ContMDiffOn planeModel 𝓘(ℝ,Base) ∞ c c.source := + e.contDiff.contMDiff.comp_contMDiffOn ((chart_smooth p).mono inter_subset_left) + have hci : ContMDiffOn 𝓘(ℝ,Base) planeModel ∞ c.symm c.target := + (chart_symm_smooth p).comp e.symm.contDiff.contMDiff.contMDiffOn (fun _ hx => hx.2) + refine ⟨c,g,h,I ∩ U,J ∩ V,hcs,hci,hg,hh,hI.inter hU,hJ.inter hV, + ⟨hsI,hsU⟩,⟨htJ,htV⟩,inter_subset_left.trans hIA,inter_subset_left.trans hJB,?_,?_,?_,?_⟩ + · intro u hu + refine ⟨⟨(hFI u hu.1).1,mem_univ _⟩,?_⟩ + have he := hFg u hu.2 + rw [(hFI u hu.1).2] at he + exact he + · intro v hv + refine ⟨⟨(hGJ v hv.1).1,mem_univ _⟩,?_⟩ + have he := hGh v hv.2 + rw [(hGJ v hv.1).2] at he + exact he + · have he : (fun u => c (γ u) 0) =ᶠ[𝓝 s] (fun u => e (F u) 0) := by + filter_upwards [hI.mem_nhds hsI] with u hu + change e (chart p (γ u)) 0 = e (F u) 0 + rw [(hFI u hu).2] + rw [he.deriv_eq] + exact hFd + · have he : (fun v => c (δ v) 0) =ᶠ[𝓝 t] (fun v => e (G v) 0) := by + filter_upwards [hJ.mem_nhds htJ] with v hv + change e (chart p (δ v)) 0 = e (G v) 0 + rw [(hGJ v hv).2] + rw [he.deriv_eq] + exact hGd + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactActualFrame.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactActualFrame.lean new file mode 100644 index 0000000000000000000000000000000000000000..15f4358dd5c640f1c77c2e07c2b9b68c8d2ff012 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactActualFrame.lean @@ -0,0 +1,46 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileCoordinates + +namespace OAI + +/-! Compact five-profile estimates give an actual orthonormal normal frame +with the prescribed limiting coefficients for the exact immersion. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open RealModes SurfaceJetCoordinates JetVelocityCoordinates +open SurfaceVelocityFamily.Loop + +def secondFormFrameGeometry {F : RField 4} {p : SmallModes.Base} {k : ℝ} + (d : SecondFormFrame F p k) (z : ℝ) : (NormalFrame.Vec × NormalFrame.Vec) × (Fin 4 → ℝ) := + ((d.n,d.m),![d.S,d.D,d.N,z*d.L]) + +theorem compact_actual_frame_stability {K : Set EuclideanBoundaryProfile} + (hK : IsCompact K) (hregular : ∀ J ∈ K, boundaryProfileMap J ∈ regularBoundaryProfiles) + (ε : ℝ) (hε : 0 < ε) : + ∃ δ : ℝ, 0 < δ ∧ ∀ J ∈ K, ∀ F : RField 4, ContDiff ℝ ∞ F → + ∀ z : ℝ, ∀ p : JetPolynomial.Base, + ‖primitiveJetProfile (fun q => JetVelocityCoordinates.toEuclidean (F (baseEquiv q))) z p-J‖ ≤ δ → + ∃ d : SecondFormFrame F (baseEquiv p) + (coordinateGauss (realMetric F SmallModes.dx SmallModes.dx) + (realMetric F SmallModes.dx SmallModes.dy) (realMetric F SmallModes.dy SmallModes.dy) + (baseEquiv p)), + ‖secondFormFrameGeometry d z-profileGeometry (boundaryProfileMap J)‖ < ε := by + obtain ⟨δ,hδ,hclose⟩ := compact_euclidean_boundary_stability hK hregular ε hε + refine ⟨δ,hδ,?_⟩ + intro J hJ F hF z p herror + obtain ⟨hreg,hnear⟩ := hclose J hJ _ herror + rw [boundaryProfileMap_chart hF] at hreg hnear + obtain ⟨d,hn,hm,hcoef⟩ := exists_profile_secondFormFrame hF z (baseEquiv p) hreg + refine ⟨d,?_⟩ + have heq : profileGeometry (realBoundaryProfile F z (baseEquiv p)) = + secondFormFrameGeometry d z := by + unfold profileGeometry secondFormFrameGeometry + rw [← hn,← hm,hcoef] + rwa [heq] at hnear + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAnsatzAsymptotics.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAnsatzAsymptotics.lean new file mode 100644 index 0000000000000000000000000000000000000000..eb4dd75d738bf021dd634fe3f156ae50d6c93671 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAnsatzAsymptotics.lean @@ -0,0 +1,365 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactPeriodicAnsatzBounds +import OAI.Geometry.SurfaceImmersion.Primitive.PeriodicFiniteAnsatz + +namespace OAI + +/-! Compact, fixed-coefficient asymptotics of the finite periodic ansatz. -/ + +noncomputable section +open Set +open scoped ContDiff BigOperators + +namespace ClosedSurfaceR4.PeriodicExpansion +open CovarianceCorrector WeightedEstimates + +variable {A E : Type} [NormedAddCommGroup A] [NormedSpace ℝ A] + [NormedAddCommGroup E] [InnerProductSpace ℝ E] + +/-- The finite polynomial before the extra factor of the fast scale. -/ +def phaseSum (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) + (L : ℕ) (z : ℝ) (p : A) : E := + ∑ i ∈ Finset.range L, z^i • (U i).fastValue ℓ z p + +lemma phaseSum_smooth (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) + (L : ℕ) (z : ℝ) : ContDiff ℝ ∞ (phaseSum U ℓ L z) := + ContDiff.sum fun i _ => contDiff_const.smul ((U i).fastValue_smooth ℓ z) + +lemma phaseSum_fderiv (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) + (L : ℕ) (z : ℝ) (p v : A) : + fderiv ℝ (phaseSum U ℓ L z) p v = + phaseSum (fun i => (U i).slow v) ℓ L z p + + (ℓ v/z) • phaseSum (fun i => (U i).angle) ℓ L z p := by + have hd (i : ℕ) := ((U i).fastValue_smooth ℓ z).differentiable (by simp) p + change (fderiv ℝ (fun q : A => ∑ i ∈ Finset.range L, + z^i • (U i).fastValue ℓ z q) p) v = _ + rw [fderiv_fun_sum (A := fun i (q : A) => z^i • (U i).fastValue ℓ z q) + (u := Finset.range L) (fun i _ => (hd i).const_smul (z^i))] + have hterm (i : ℕ) : + fderiv ℝ (fun q : A => z^i • (U i).fastValue ℓ z q) p v = + z^i • (((U i).slow v).fastValue ℓ z p+ + (ℓ v/z) • (U i).angle.fastValue ℓ z p) := by + rw [fderiv_fun_const_smul (f := (U i).fastValue ℓ z) (hd i) (z^i), + smul_apply,Family.fastValue_fderiv] + simp only [Family.fastValue] + simp only [sum_apply,hterm,smul_add,Finset.sum_add_distrib] + congr 1 + rw [phaseSum,Finset.smul_sum] + apply Finset.sum_congr rfl + intro i hi + change z^i • ((ℓ v/z) • (U i).angle.fastValue ℓ z p) = + (ℓ v/z) • (z^i • (U i).angle.fastValue ℓ z p) + exact smul_comm _ _ _ + +lemma finiteAnsatz_eq_phaseSum (F : A → E) (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) : + finiteAnsatz F U ℓ L z = fun p => F p+z • phaseSum U ℓ L z p := by + funext p + simp only [finiteAnsatz,phaseSum,Finset.smul_sum,pow_succ,smul_smul] + congr 1 + apply Finset.sum_congr rfl + intro i hi + rw [mul_comm] + +def directionalMap (F : A → E) (v : A) : A → E := fun p => fderiv ℝ F p v + +lemma directionalMap_smooth {F : A → E} (hF : ContDiff ℝ ∞ F) (v : A) : + ContDiff ℝ ∞ (directionalMap F v) := + (hF.fderiv_right (m := ∞) (by simp)).clm_apply contDiff_const + +/-- The fast angular derivative cancels exactly one power of the scale. -/ +lemma finiteAnsatz_directional {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) + {z : ℝ} (hz : z ≠ 0) (v : A) : + directionalMap (finiteAnsatz F U ℓ L z) v = fun p => + directionalMap F v p + z • phaseSum (fun i => (U i).slow v) ℓ L z p + + ℓ v • phaseSum (fun i => (U i).angle) ℓ L z p := by + funext p + have hS := (phaseSum_smooth U ℓ L z).differentiable (by simp) p + have hderiv : fderiv ℝ (fun q : A => F q+z • phaseSum U ℓ L z q) p = + fderiv ℝ F p+z • fderiv ℝ (phaseSum U ℓ L z) p := by + rw [fderiv_fun_add (f := F) (g := fun q : A => z • phaseSum U ℓ L z q) + (hF.differentiable (by simp) p) (hS.const_smul z), + fderiv_fun_const_smul (f := phaseSum U ℓ L z) hS z] + rw [directionalMap,finiteAnsatz_eq_phaseSum,hderiv] + simp only [add_apply,smul_apply,phaseSum_fderiv,smul_add,smul_smul] + rw [show z*(ℓ v/z) = ℓ v by field_simp] + simp only [directionalMap,add_assoc] + +/-- Differentiation in a direction annihilated by the phase only differentiates +the slow coefficients. -/ +lemma directional_phaseSum_transverse (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) (z : ℝ) {v : A} (hv : ℓ v = 0) : + directionalMap (phaseSum U ℓ L z) v = + phaseSum (fun i => (U i).slow v) ℓ L z := by + funext p + simp only [directionalMap,phaseSum_fderiv,hv,zero_div,zero_smul,add_zero] + +private lemma phaseSum_scale_derivative (U : ℕ → Family A E) + (ℓ : A →L[ℝ] ℝ) (L : ℕ) {z : ℝ} (hz : z ≠ 0) (v p : A) : + z • directionalMap (phaseSum U ℓ L z) v p = + z • phaseSum (fun i => (U i).slow v) ℓ L z p + + ℓ v • phaseSum (fun i => (U i).angle) ℓ L z p := by + simp only [directionalMap,phaseSum_fderiv,smul_add,smul_smul] + rw [show z*(ℓ v/z) = ℓ v by field_simp] + +private lemma directionalMap_add {F G : A → E} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (v : A) : + directionalMap (fun p => F p+G p) v = + fun p => directionalMap F v p+directionalMap G v p := by + funext p + simp only [directionalMap,fderiv_fun_add + (hF.differentiable (by simp) p) (hG.differentiable (by simp) p),add_apply] + +private lemma directionalMap_smul {F : A → E} + (hF : ContDiff ℝ ∞ F) (c : ℝ) (v : A) : + directionalMap (fun p => c • F p) v = + fun p => c • directionalMap F v p := by + funext p + simp only [directionalMap,fderiv_fun_const_smul + (hF.differentiable (by simp) p),smul_apply] + +private lemma directionalMap_three {F G H : A → E} + (hF : ContDiff ℝ ∞ F) (hG : ContDiff ℝ ∞ G) (hH : ContDiff ℝ ∞ H) + (c d : ℝ) (v : A) : + directionalMap (fun p => F p+c • G p+d • H p) v = + fun p => directionalMap F v p+c • directionalMap G v p+ + d • directionalMap H v p := by + have hc : ContDiff ℝ ∞ (fun p : A => c • G p) := contDiff_const.smul hG + have hd : ContDiff ℝ ∞ (fun p : A => d • H p) := contDiff_const.smul hH + rw [directionalMap_add (F := fun p : A => F p+c • G p) + (G := fun p : A => d • H p) (hF.add hc) hd, + directionalMap_add (F := F) (G := fun p : A => c • G p) hF hc, + directionalMap_smul hG c v,directionalMap_smul hH d v] + +/-- Exact transverse and mixed second-derivative identities. -/ +lemma finiteAnsatz_second_transverse {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) + {z : ℝ} (hz : z ≠ 0) (v : A) {w : A} (hw : ℓ w = 0) : + directionalMap (directionalMap (finiteAnsatz F U ℓ L z) v) w = fun p => + directionalMap (directionalMap F v) w p + + z • phaseSum (fun i => ((U i).slow v).slow w) ℓ L z p + + ℓ v • phaseSum (fun i => (U i).angle.slow w) ℓ L z p := by + rw [finiteAnsatz_directional hF U ℓ L hz v, + directionalMap_three (directionalMap_smooth hF v) + (phaseSum_smooth (fun i => (U i).slow v) ℓ L z) + (phaseSum_smooth (fun i => (U i).angle) ℓ L z) z (ℓ v) w, + directional_phaseSum_transverse _ ℓ L z hw, + directional_phaseSum_transverse _ ℓ L z hw] + +/-- After multiplication by the fast scale, the longitudinal second derivative +has a finite limit profile, namely the second angular derivative of `U 0`. -/ +lemma finiteAnsatz_second_longitudinal {F : A → E} (hF : ContDiff ℝ ∞ F) + (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) (L : ℕ) + {z : ℝ} (hz : z ≠ 0) {v : A} (hv : ℓ v = 1) (p : A) : + z • directionalMap (directionalMap (finiteAnsatz F U ℓ L z) v) v p = + z • (directionalMap (directionalMap F v) v p + + z • phaseSum (fun i => ((U i).slow v).slow v) ℓ L z p + + phaseSum (fun i => ((U i).slow v).angle) ℓ L z p + + phaseSum (fun i => (U i).angle.slow v) ℓ L z p) + + phaseSum (fun i => (U i).angle.angle) ℓ L z p := by + rw [finiteAnsatz_directional hF U ℓ L hz v, + directionalMap_three (directionalMap_smooth hF v) + (phaseSum_smooth (fun i => (U i).slow v) ℓ L z) + (phaseSum_smooth (fun i => (U i).angle) ℓ L z) z (ℓ v) v] + simp only [hv,one_smul,smul_add] + rw [phaseSum_scale_derivative _ ℓ L hz v p, + phaseSum_scale_derivative _ ℓ L hz v p,hv,one_smul] + module + +lemma phaseSum_leading (U : ℕ → Family A E) (ℓ : A →L[ℝ] ℝ) + (n : ℕ) (z : ℝ) (p : A) : + phaseSum U ℓ (n+1) z p = + (U 0).fastValue ℓ z p+z • phaseSum (fun i => U (i+1)) ℓ n z p := by + rw [phaseSum,Finset.sum_range_succ'] + simp only [pow_zero,one_smul,phaseSum,Finset.smul_sum,pow_succ,smul_smul] + rw [add_comm] + congr 1 + apply Finset.sum_congr rfl + intro i hi + rw [mul_comm] + +/-- Fixed smooth coefficients are uniformly bounded at all fast phases. -/ +lemma compact_phaseSum_bound (U : ℕ → Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (L : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 ≤ z → z ≤ 1 → ∀ p ∈ Q, + ‖phaseSum U ℓ L z p‖ ≤ C := by + choose D hD hb using fun i => (U i).compact_lift_derivative_bound hQ 0 + refine ⟨∑ i ∈ Finset.range L, D i, + Finset.sum_nonneg (fun i _ => hD i),?_⟩ + intro z hz hz1 p hp + refine (norm_sum_le _ _).trans (Finset.sum_le_sum fun i _ => ?_) + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg (pow_nonneg hz _)] + have hi : ‖(U i).fastValue ℓ z p‖ ≤ D i := by + simpa only [norm_iteratedFDeriv_zero,Family.fastValue] using hb i 0 le_rfl p hp (ℓ p/z) + exact (mul_le_mul_of_nonneg_left hi (pow_nonneg hz _)).trans + ((mul_le_mul_of_nonneg_right (pow_le_one₀ hz hz1) (hD i)).trans_eq (one_mul _)) + +/-- The tail after the leading coefficient is uniformly `O(z)`. -/ +lemma compact_phaseSum_tail_bound (U : ℕ → Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 ≤ z → z ≤ 1 → ∀ p ∈ Q, + ‖phaseSum U ℓ (n+1) z p-(U 0).fastValue ℓ z p‖ ≤ C*z := by + obtain ⟨C,hC,hb⟩ := compact_phaseSum_bound (fun i => U (i+1)) hQ ℓ n + refine ⟨C,hC,?_⟩ + intro z hz hz1 p hp + rw [phaseSum_leading,add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_nonneg hz] + simpa only [mul_comm] using mul_le_mul_of_nonneg_left (hb z hz hz1 p hp) hz + +private lemma compact_directional_bound {F : A → E} (hF : ContDiff ℝ ∞ F) + {Q : Set A} (hQ : IsCompact Q) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ p ∈ Q, ‖F p‖ ≤ C := by + obtain ⟨C,hC,hb⟩ := compact_coefficient_bound uniqueDiffOn_univ hQ + (subset_univ _) hF.contDiffOn 0 + refine ⟨C,zero_le_one.trans hC,?_⟩ + intro p hp + simpa only [iteratedFDerivWithin_univ,norm_iteratedFDeriv_zero] using hb 0 le_rfl p hp + +private lemma compact_scaled_sum_tail_bound (U V : ℕ → Family A E) + {Q : Set A} (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (n : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 ≤ z → z ≤ 1 → ∀ p ∈ Q, + ‖z • phaseSum U ℓ (n+1) z p + + (phaseSum V ℓ (n+1) z p-(V 0).fastValue ℓ z p)‖ ≤ C*z := by + obtain ⟨C,hC,hb⟩ := compact_phaseSum_bound U hQ ℓ (n+1) + obtain ⟨D,hD,hd⟩ := compact_phaseSum_tail_bound V hQ ℓ n + refine ⟨C+D,add_nonneg hC hD,?_⟩ + intro z hz hz1 p hp + calc + _ ≤ ‖z • phaseSum U ℓ (n+1) z p‖+ + ‖phaseSum V ℓ (n+1) z p-(V 0).fastValue ℓ z p‖ := norm_add_le _ _ + _ ≤ z*C+D*z := by + rw [norm_smul,Real.norm_eq_abs,abs_of_nonneg hz] + exact add_le_add (mul_le_mul_of_nonneg_left (hb z hz hz1 p hp) hz) + (hd z hz hz1 p hp) + _ = (C+D)*z := by ring + +/-- The two transverse jets approach the corresponding jets of the baseline +uniformly on a compact set, with an explicit linear rate in the fast scale. -/ +theorem compact_finiteAnsatz_transverse_asymptotics {F : A → E} + (hF : ContDiff ℝ ∞ F) (U : ℕ → Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (L : ℕ) + {dy : A} (hy : ℓ dy = 0) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ p ∈ Q, + ‖directionalMap (finiteAnsatz F U ℓ L z) dy p-directionalMap F dy p‖ ≤ C*z ∧ + ‖directionalMap (directionalMap (finiteAnsatz F U ℓ L z) dy) dy p- + directionalMap (directionalMap F dy) dy p‖ ≤ C*z := by + obtain ⟨C,hC,hc⟩ := compact_phaseSum_bound (fun i => (U i).slow dy) hQ ℓ L + obtain ⟨D,hD,hd⟩ := compact_phaseSum_bound (fun i => ((U i).slow dy).slow dy) hQ ℓ L + refine ⟨C+D,add_nonneg hC hD,?_⟩ + intro z hz hz1 p hp + constructor + · rw [finiteAnsatz_directional hF U ℓ L (ne_of_gt hz) dy] + simp only [hy,zero_smul, + add_zero,add_sub_cancel_left,norm_smul,Real.norm_eq_abs,abs_of_pos hz] + calc + _ ≤ z*C := mul_le_mul_of_nonneg_left (hc z hz.le hz1 p hp) hz.le + _ ≤ (C+D)*z := by nlinarith + · rw [finiteAnsatz_second_transverse hF U ℓ L (ne_of_gt hz) dy hy] + simp only [ + hy,zero_smul,add_zero,add_sub_cancel_left,norm_smul, + Real.norm_eq_abs,abs_of_pos hz] + calc + _ ≤ z*D := mul_le_mul_of_nonneg_left (hd z hz.le hz1 p hp) hz.le + _ ≤ (C+D)*z := by nlinarith + +/-- The longitudinal tangent and its transverse derivative have their expected +oscillating leading terms, uniformly with an `O(z)` remainder. -/ +theorem compact_finiteAnsatz_longitudinal_asymptotics {F : A → E} + (hF : ContDiff ℝ ∞ F) (U : ℕ → Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (n : ℕ) + {dx dy : A} (hx : ℓ dx = 1) (hy : ℓ dy = 0) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ p ∈ Q, + ‖directionalMap (finiteAnsatz F U ℓ (n+1) z) dx p- + (directionalMap F dx p+(U 0).angle.fastValue ℓ z p)‖ ≤ C*z ∧ + ‖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)‖ ≤ C*z := by + obtain ⟨C,hC,hc⟩ := compact_scaled_sum_tail_bound + (fun i => (U i).slow dx) (fun i => (U i).angle) hQ ℓ n + obtain ⟨D,hD,hd⟩ := compact_scaled_sum_tail_bound + (fun i => ((U i).slow dx).slow dy) (fun i => (U i).angle.slow dy) hQ ℓ n + refine ⟨C+D,add_nonneg hC hD,?_⟩ + intro z hz hz1 p hp + constructor + · 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) (ne_of_gt hz) dx] + simp only [hx,one_smul] + abel + rw [he] + exact (hc z hz.le hz1 p hp).trans (by nlinarith) + · 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) (ne_of_gt hz) dx hy] + simp only [hx,one_smul] + abel + rw [he] + exact (hd z hz.le hz1 p hp).trans (by nlinarith) + +/-- The rescaled second longitudinal jet converges uniformly to the second +angular derivative of the leading coefficient. No varying-map estimates enter. -/ +theorem compact_finiteAnsatz_second_longitudinal_asymptotics {F : A → E} + (hF : ContDiff ℝ ∞ F) (U : ℕ → Family A E) {Q : Set A} + (hQ : IsCompact Q) (ℓ : A →L[ℝ] ℝ) (n : ℕ) + {dx : A} (hx : ℓ dx = 1) : + ∃ C : ℝ, 0 ≤ C ∧ ∀ z : ℝ, 0 < z → z ≤ 1 → ∀ p ∈ Q, + ‖z • directionalMap (directionalMap (finiteAnsatz F U ℓ (n+1) z) dx) dx p- + (U 0).angle.angle.fastValue ℓ z p‖ ≤ C*z := by + obtain ⟨B,hB,hb⟩ := compact_directional_bound + (directionalMap_smooth (directionalMap_smooth hF dx) dx) hQ + obtain ⟨C,hC,hc⟩ := compact_phaseSum_bound + (fun i => ((U i).slow dx).slow dx) hQ ℓ (n+1) + obtain ⟨D,hD,hd⟩ := compact_phaseSum_bound + (fun i => ((U i).slow dx).angle) hQ ℓ (n+1) + obtain ⟨E,hE,he⟩ := compact_phaseSum_bound + (fun i => (U i).angle.slow dx) hQ ℓ (n+1) + obtain ⟨T,hT,ht⟩ := compact_phaseSum_tail_bound + (fun i => (U i).angle.angle) hQ ℓ n + refine ⟨B+C+D+E+T,by positivity,?_⟩ + intro z hz hz1 p hp + have hscaled : ‖z • phaseSum (fun i => ((U i).slow dx).slow dx) ℓ (n+1) z p‖ ≤ C := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact (mul_le_mul_of_nonneg_left (hc z hz.le hz1 p hp) hz.le).trans + ((mul_le_mul_of_nonneg_right hz1 hC).trans_eq (one_mul _)) + have hinside : ‖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‖ ≤ B+C+D+E := by + exact (norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add + ((norm_add_le _ _).trans (add_le_add (hb p hp) hscaled)) (hd z hz.le hz1 p hp))) + (he z hz.le hz1 p hp)) + have heq : 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) (ne_of_gt hz) hx] + abel + rw [heq] + 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*(B+C+D+E)+T*z := by + rw [norm_smul,Real.norm_eq_abs,abs_of_pos hz] + exact add_le_add (mul_le_mul_of_nonneg_left hinside hz.le) (ht z hz.le hz1 p hp) + _ = (B+C+D+E+T)*z := by ring + +end ClosedSurfaceR4.PeriodicExpansion + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisGermEquality.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisGermEquality.lean new file mode 100644 index 0000000000000000000000000000000000000000..9a86ea5e980b2ad9af4b439713bbbb4938532a81 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisGermEquality.lean @@ -0,0 +1,37 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAxisRectangle + +namespace OAI + +/-! Pointwise germs along a compact axis interval give one actual closed + rectangle of equality, contained in the specified open domain. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +variable {V : Type*} + +theorem compact_axis_germ_equality {f g : Base → V} {a b : ℝ} (hab : a ≤ b) + {U : Set Base} (hU : IsOpen U) + (haxis : ∀ t ∈ Icc a b, crosscapAxis t ∈ U) + (he : ∀ t ∈ Icc a b, f =ᶠ[𝓝 (crosscapAxis t)] g) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (a-δ) (b+δ), + (![x,t] : Base) ∈ U ∧ f ![x,t] = g ![x,t] := by + let W := U ∩ interior {x | f x = g x} + have hW : IsOpen W := hU.inter isOpen_interior + have hAW : ∀ t ∈ Icc a b, (![0,t] : Base) ∈ W := by + intro t ht + have hm : crosscapAxis t ∈ interior {x | f x = g x} := + mem_interior_iff_mem_nhds.mpr (he t ht) + simpa only [W,mem_inter_iff,crosscapAxis_apply] using And.intro (haxis t ht) hm + obtain ⟨δ,hδ,hrect⟩ := compact_axis_rectangle hab hW hAW + refine ⟨δ,hδ,?_⟩ + intro x hx t ht + have hm := hrect x hx t ht + exact ⟨hm.1,(interior_subset hm.2 : (![x,t] : Base) ∈ {y | f y = g y})⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisRectangle.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisRectangle.lean new file mode 100644 index 0000000000000000000000000000000000000000..a3727f321218721f9bd7f734e27965fa149f64ba --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactAxisRectangle.lean @@ -0,0 +1,69 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CompactArcTimeChart +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! A compact axis segment in an open plane set has a uniform rectangular collar. -/ +noncomputable section +open Set Filter Metric +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma open_interval_collar {a b : ℝ} (hab : a ≤ b) {U : Set ℝ} + (hU : IsOpen U) (hI : Icc a b ⊆ U) : + ∃ δ : ℝ, 0 < δ ∧ Icc (a-δ) (b+δ) ⊆ U := by + obtain ⟨δ,hδ,hsub⟩ := isCompact_Icc.exists_cthickening_subset_open hU hI + refine ⟨δ,hδ,?_⟩ + intro x hx + apply hsub + by_cases hxa : x < a + · apply mem_cthickening_of_dist_le x a δ (Icc a b) ⟨le_rfl,hab⟩ + rw [Real.dist_eq,abs_of_nonpos (sub_nonpos.mpr hxa.le)] + linarith [hx.1] + · by_cases hbx : b < x + · apply mem_cthickening_of_dist_le x b δ (Icc a b) ⟨hab,le_rfl⟩ + rw [Real.dist_eq,abs_of_nonneg (sub_nonneg.mpr hbx.le)] + linarith [hx.2] + · exact mem_cthickening_of_dist_le x x δ (Icc a b) + ⟨le_of_not_gt hxa,le_of_not_gt hbx⟩ (by simpa using hδ.le) + +theorem compact_axis_rectangle {a b : ℝ} (hab : a ≤ b) {U : Set Base} + (hU : IsOpen U) (haxis : ∀ t ∈ Icc a b, (![0,t] : Base) ∈ U) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ Icc (-δ) δ, ∀ t ∈ Icc (a-δ) (b+δ), + (![x,t] : Base) ∈ U := 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 hTU : ({0} : Set ℝ) ×ˢ Icc a b ⊆ T ⁻¹' U := by + rintro ⟨x,t⟩ ⟨hx,ht⟩ + obtain rfl : x = 0 := hx + exact haxis t ht + obtain ⟨V,W,hV,hW,h0V,hIW,hVW⟩ := + generalized_tube_lemma isCompact_singleton isCompact_Icc (hU.preimage hT) hTU + obtain ⟨r,hr,hrV⟩ := Metric.isOpen_iff.mp hV 0 (h0V (by simp)) + obtain ⟨η,hη,hηW⟩ := open_interval_collar hab hW hIW + let δ := min (r/2) η + have hδ : 0 < δ := lt_min (half_pos hr) hη + refine ⟨δ,hδ,?_⟩ + intro x hx t ht + change (x,t) ∈ T ⁻¹' U + apply hVW + constructor + · apply hrV + rw [Metric.mem_ball,Real.dist_eq,sub_zero,abs_lt] + have hδr : δ < r := (min_le_left _ _).trans_lt (half_lt_self hr) + constructor <;> linarith [hx.1,hx.2] + · apply hηW + have hδη : δ ≤ η := min_le_right _ _ + constructor <;> linarith [ht.1,ht.2] + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCoefficientMargins.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCoefficientMargins.lean new file mode 100644 index 0000000000000000000000000000000000000000..7dd2904ad6764a6857e5796490a307e6231497c9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCoefficientMargins.lean @@ -0,0 +1,49 @@ +import OAI.Geometry.SurfaceImmersion.Correction.CompactSmoothCutoffs +import OAI.Geometry.Immersion.ClosedSurface.PhaseMean + +namespace OAI + +/-! Positive phase coefficients admit an actual compact neighborhood and +uniform inner and outer trial-ball margins. -/ +noncomputable section +open Set +open scoped Topology +namespace ClosedSurfaceR4.PhaseMean +open SmallModes (Base) + +theorem compact_coefficient_margins {K Ω : Set Base} (hK : IsCompact K) + (hΩ : IsOpen Ω) (hKΩ : K ⊆ Ω) {reference : Base → Tensor} + (href : ContinuousOn reference Ω) (Q : Tensor →L[ℝ] ℝ) + (hpos : ∀ x ∈ K, 0 < Q (reference x)) : + ∃ U : Set Base, IsOpen U ∧ K ⊆ U ∧ IsCompact (closure U) ∧ closure U ⊆ Ω ∧ + ∃ r ρ R : ℝ, 0 < r ∧ 0 < ρ ∧ 0 < R ∧ + ∀ x ∈ closure U, ρ + ‖Q‖*r ≤ Q (reference x) ∧ + Q (reference x) ≤ R - ‖Q‖*r := by + have hf : ContinuousOn (fun x => Q (reference x)) Ω := Q.continuous.comp_continuousOn href + obtain ⟨a,ha,hab⟩ := hK.exists_forall_le' (hf.mono hKΩ) hpos + let O := Ω ∩ (fun x => Q (reference x)) ⁻¹' Ioi (a/2) + have hO : IsOpen O := hf.isOpen_inter_preimage hΩ isOpen_Ioi + have hKO : K ⊆ O := by + intro x hx + exact ⟨hKΩ hx,lt_of_lt_of_le (by linarith) (hab x hx)⟩ + obtain ⟨U,hU,hKU,hUc,hUO⟩ := CollarVelocity.compact_open_thickening hK hO hKO + have hUΩ : closure U ⊆ Ω := fun x hx => (hUO hx).1 + obtain ⟨C,hC⟩ := hUc.exists_bound_of_continuousOn (hf.mono hUΩ) + let r := (a/8)/(‖Q‖+1) + have hr : 0 < r := div_pos (by linarith) (by positivity) + have heq : (‖Q‖+1)*r = a/8 := by + dsimp [r] + field_simp + have hnr : ‖Q‖*r ≤ a/8 := by nlinarith [norm_nonneg Q] + refine ⟨U,hU,hKU,hUc,hUΩ,r,a/8,|C|+‖Q‖*r+1,hr,by linarith,by positivity,?_⟩ + intro x hx + have hl : a/2 < Q (reference x) := (hUO hx).2 + have hu : Q (reference x) ≤ |C| := + (le_abs_self _).trans ((hC x hx).trans (le_abs_self C)) + constructor <;> linarith + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..002020e55690b96e24b2aa85a27945aea0dc85b8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionBound.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds + +namespace OAI + +/-! Fixed smooth changes of coordinates preserve the second-order +rescaled derivative profile needed by the primitive recursion. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +theorem compact_composition_bound {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + {T : Base → Base} (hT : ContDiff ℝ ∞ T) + {S : Set Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (f : Base → E) (C : ℝ), + 0 ≤ C → ContDiff ℝ ∞ f → WeightedBound univ 1 m C f → + WeightedBound S 1 m (D*C) (f ∘ T) := by + obtain ⟨B,hB,hTb⟩ := compact_local_weighted_bound hS isOpen_univ hSc + subset_closure (subset_univ _) hT.contDiffOn m + let D : ℝ := (m.factorial : ℝ)*B^m + have hD : 1 ≤ D := one_le_mul_of_one_le_of_one_le + (by exact_mod_cast Nat.factorial_pos m) (one_le_pow₀ hB) + refine ⟨D,hD,?_⟩ + intro f C hC hf hb + have hcoord : ∀ k, 1 ≤ k → k ≤ m → ∀ x ∈ S, + ‖iteratedFDerivWithin ℝ k T S x‖ ≤ B := by + intro k _ hk x hx + simpa only [one_pow,one_mul] using hTb 1 zero_le_one le_rfl k hk x hx + have hh := hb.comp_coordinates hS.uniqueDiffOn uniqueDiffOn_univ zero_lt_one le_rfl + hB hC hT.contDiffOn hf.contDiffOn (fun _ _ => mem_univ _) hcoord + convert hh using 1 + dsimp only [D] + ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionPrefix.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionPrefix.lean new file mode 100644 index 0000000000000000000000000000000000000000..27f8a0777d89a3e394c914f2d70a8579fc265d08 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCompositionPrefix.lean @@ -0,0 +1,48 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.LowJetPrefixBounds +import OAI.Geometry.SurfaceImmersion.Geometry.CompactLocalBounds +import OAI.Geometry.Immersion.ClosedSurface.CoordinateBounds + +namespace OAI + +/-! Fixed smooth changes of coordinates preserve the second-order +rescaled derivative profile needed by the primitive recursion. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.JetPolynomial +open WeightedEstimates + +theorem compact_composition_prefix {T : Base → Base} (hT : ContDiff ℝ ∞ T) + {S : Set Base} (hS : IsOpen S) (hSc : IsCompact (closure S)) (m : ℕ) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ (f : Base → Space) (s C : ℝ), + 0 < s → 0 ≤ C → ContDiff ℝ ∞ f → + (∀ j, j ≤ m+2 → WeightedBound univ 1 j (C/s^(j-2)) f) → + ∀ j, j ≤ m+2 → WeightedBound S 1 j (D*C/s^(j-2)) (f ∘ T) := by + obtain ⟨B,hB,hTb⟩ := compact_local_weighted_bound hS isOpen_univ hSc + subset_closure (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.factorial_pos (m+2)) (one_le_pow₀ hB) + refine ⟨D,hD,?_⟩ + intro f s C hs hC hf hb j hj + have hcoord : ∀ k, 1 ≤ k → k ≤ j → ∀ x ∈ S, + ‖iteratedFDerivWithin ℝ k T S x‖ ≤ B := by + intro k _ hk x hx + simpa only [one_pow,one_mul] using hTb 1 zero_le_one le_rfl k (hk.trans hj) x hx + have hh := (hb j hj).comp_coordinates hS.uniqueDiffOn uniqueDiffOn_univ zero_lt_one le_rfl + hB (div_nonneg hC (pow_nonneg hs.le _)) hT.contDiffOn hf.contDiffOn + (fun _ _ => mem_univ _) hcoord + have hc : (j.factorial : ℝ)*B^j ≤ D := mul_le_mul + (by exact_mod_cast Nat.factorial_le hj) + (pow_le_pow_right₀ hB hj) (by positivity) (by positivity) + 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)) := mul_le_mul_of_nonneg_right hc (by positivity) + _ = D*C/s^(j-2) := by ring + +end ClosedSurfaceR4.JetPolynomial + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..8c2ee46bbea08d9f6452e36f18a1fb13eb5bb529 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveAvoidance.lean @@ -0,0 +1,62 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PureRayAvoidance + +namespace OAI + +/-! Uniform nonvanishing and avoidance of the negative preferred normal on +compact curve pieces. The collar case has an independent positive invariant. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.GeometryPreservation + +lemma pure_first_positive_of_collar {S D N L k b c : ℝ} (hS : 0 < S) + (hcollar : 0 < (D*b+S*c)^2+k*b^2) : + 0 < (pureComponents S D N L k b c).1 := by + have hid := pure_first_identity (D := D) (N := N) (L := L) (k := k) + (b := b) (c := c) hS.ne' + nlinarith [mul_nonneg (sq_nonneg N) (sq_nonneg b)] + +theorem compact_curve_avoidance {X : Type*} [TopologicalSpace X] + (sLo K d : ℝ) (hmin : 0 < sLo) (hK : 0 ≤ K) (hd : 0 ≤ d) : + ∃ 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, + ∀ S D N L k b c : ℝ, sLo ≤ S → -K ≤ k → |D| ≤ d → + (b ≠ 0 ∨ c ≠ 0) → |N-N₀ x| < η → |z*L-A x| < η → + 0 < (pureComponents S D N L k b c).1 ∨ + (pureComponents S D N L k b c).2 ≠ 0 := by + let H := K+2 + refine ⟨H,by dsimp [H]; positivity,?_⟩ + 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 _ _) + let J := 2*B₀*((Real.sqrt K+d)/sLo)+1 + have hJ : 0 < J := by dsimp [J]; positivity + obtain ⟨η₀,hη₀,halt⟩ := 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 S D N L k b c hS hk hD hv hN hL + 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] + apply pure_ray_avoidance_of_slopes (hmin.trans_le hS) hv + intro t + rcases halt z hz (hzη.trans_le (min_le_right _ _)) x hx N L hNsmall + (hL.trans_le (min_le_right _ _)) with hlargeN | hlargeL + · apply Or.inl + apply slope_first_positive (hmin.trans_le hS) hk + dsimp [H] at hlargeN + nlinarith [sq_abs N,abs_nonneg N] + · exact slope_ray_avoidance_longitudinal hmin hS hK hk hD hB₀ hNbound + (by dsimp [J] at hlargeL; linarith) + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveEndpoint.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveEndpoint.lean new file mode 100644 index 0000000000000000000000000000000000000000..758131024bc1fc4b5fce1834814ea1df4d886d89 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurveEndpoint.lean @@ -0,0 +1,42 @@ +import Mathlib.Topology.UnitInterval +import Mathlib.Topology.Compactness.Compact + +namespace OAI + +/-! A compact curve with a unique endpoint preimage has no distant +parameter values accumulating at that endpoint, even after a compact +set avoiding the endpoint is added. -/ +noncomputable section +open Set unitInterval +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] [T2Space M] + +theorem compact_curve_endpoint_neighborhood {γ : I → M} (hγ : Continuous γ) + {p : M} (hunique : ∀ t, γ t = p → t = 0) + {K : Set M} (hK : IsCompact K) (hpK : p ∉ K) + {ε : ℝ} (hε : 0 < ε) : + ∃ V : Set M, IsOpen V ∧ p ∈ V ∧ + ∀ x ∈ V, x ∈ range γ ∪ K → ∃ t : I, (t:ℝ) < ε ∧ γ t = x := by + let A : Set I := {t | ε ≤ (t:ℝ)} + have hA : IsCompact A := (isClosed_le continuous_const continuous_subtype_val).isCompact + have hL : IsCompact (γ '' A ∪ K) := (hA.image hγ).union hK + have hpL : p ∉ γ '' A ∪ K := by + rintro (⟨t,ht,he⟩ | ht) + · have hz := hunique t he + subst t + change ε ≤ 0 at ht + exact (not_le_of_gt hε) ht + · exact hpK ht + refine ⟨(γ '' A ∪ K)ᶜ,hL.isClosed.isOpen_compl,hpL,?_⟩ + intro x hx hxi + rcases hxi with ⟨t,rfl⟩ | hxi + · refine ⟨t,?_,rfl⟩ + by_contra hn + exact hx (Or.inl ⟨t,le_of_not_gt hn,rfl⟩) + · exact False.elim (hx (Or.inr hxi)) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurvePieces.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurvePieces.lean new file mode 100644 index 0000000000000000000000000000000000000000..7e776f40c72d82fc126bed1d4d352116a3f9d26d --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactCurvePieces.lean @@ -0,0 +1,40 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteCurveArcCover +import OAI.Geometry.SurfaceImmersion.Whitney.FiniteArcPieces + +namespace OAI + +/-! A compact curve with the proved line/half-line charts admits a finite +partition into open connected pieces and finitely many vertices. -/ +noncomputable section +open Set Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X : Type*} [TopologicalSpace X] [T2Space X] [CompactSpace X] + +theorem compact_curve_pieces (D : Set X) (hD : D.Finite) + (hchart : ∀ x : X, + (∃ c : OpenPartialHomeomorph X ℝ, x ∈ c.source) ∨ + (∃ c : OpenPartialHomeomorph X (Ici (0:ℝ)), x ∈ c.source ∧ c x = ⟨0,by simp⟩)) : + ∃ (V : Set X) (P : Finset (Set X)), V.Finite ∧ D ⊆ 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 + classical + obtain ⟨A,W,s,hW,hs⟩ := finite_curve_arc_cover hchart + let A' : s → CompactCurveArc X := fun i => A i.val + let l : s → X := fun i => (A' i).map ⟨(A' i).left,le_rfl,(A' i).ordered.le⟩ + let r : s → X := fun i => (A' i).map ⟨(A' i).right,(A' i).ordered.le,le_rfl⟩ + let V := D ∪ (range l ∪ range r) + have hV : V.Finite := hD.union ((finite_range l).union (finite_range r)) + have hcover : (univ : Set X) ⊆ ⋃ i : s, range (A' i).map := by + intro x hx + obtain ⟨i,hi,hxi⟩ := mem_iUnion₂.mp (hs hx) + exact mem_iUnion.mpr ⟨⟨i,hi⟩,(hW i).2.2 hxi⟩ + obtain ⟨P,hP,hd,hc,hE⟩ := finite_arc_pieces A' V hV + (fun i => Or.inr (Or.inl (mem_range_self i))) + (fun i => Or.inr (Or.inr (mem_range_self i))) hcover + exact ⟨V,P,hV,subset_union_left,hP,hd,hc,hE⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFamilyRegularLocus.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFamilyRegularLocus.lean new file mode 100644 index 0000000000000000000000000000000000000000..c868ebf99257db9a816512eb6682eee60f1881e5 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFamilyRegularLocus.lean @@ -0,0 +1,36 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactFixedJet + +namespace OAI + +/-! The regular locus common to a compact parameter family is open. -/ +noncomputable section +open Set Filter +open scoped Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma compact_family_regular_locus_open {K : Set ℝ} (hK : IsCompact K) + (D : ℝ → Base → Base →L[ℝ] ProjectionTarget 3) + (hD : Continuous (fun z : ℝ × Base => D z.1 z.2)) : + IsOpen {x | ∀ t ∈ K, Function.Injective (D t x)} := by + let O := {z : ℝ × Base | Function.Injective (D z.1 z.2)} + have hO : IsOpen O := ContinuousLinearMap.isOpen_injective.preimage hD + apply isOpen_iff_mem_nhds.mpr + intro x hx + have hsub : K ×ˢ {x} ⊆ O := by + rintro ⟨t,y⟩ ⟨ht,hy⟩ + have he : y = x := hy + subst y + exact hx t ht + obtain ⟨V,U,hV,hU,hKV,hxU,hVU⟩ := generalized_tube_lemma hK isCompact_singleton hO hsub + apply Filter.mem_of_superset (hU.mem_nhds (hxU (by simp))) + intro y hy + change ∀ t ∈ K, Function.Injective (D t y) + intro t ht + exact hVU (show (t,y) ∈ V ×ˢ U from ⟨hKV ht,hy⟩) + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFixedJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFixedJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..6462d891c0707a7bf245c89fcbca7b3c28a7f766 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactFixedJet.lean @@ -0,0 +1,60 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.CrosscapLinearStability + +namespace OAI + +/-! A compact parameter family sharing a fixed jet has one common +neighborhood of quantitative injectivity. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma compact_fixed_value_neighborhood {E F : Type*} [TopologicalSpace E] + [PseudoMetricSpace F] {K : Set ℝ} (hK : IsCompact K) + {f : ℝ × E → F} (hf : Continuous f) (p : E) (v : F) + (hfix : ∀ t ∈ K, f (t,p) = v) {ε : ℝ} (hε : 0 < ε) : + ∃ U : Set E, IsOpen U ∧ p ∈ U ∧ ∀ t ∈ K, ∀ x ∈ U, dist (f (t,x)) v < ε := by + let O : Set (ℝ × E) := f ⁻¹' ball v ε + have hO : IsOpen O := isOpen_ball.preimage hf + have hsub : K ×ˢ {p} ⊆ O := by + rintro ⟨t,x⟩ ⟨ht,hx⟩ + have he : x = p := hx + subst x + change f (t,p) ∈ ball v ε + simpa [hfix t ht] using hε + obtain ⟨V,U,hV,hU,hKV,hpU,hVU⟩ := generalized_tube_lemma hK isCompact_singleton hO hsub + refine ⟨U,hU,hpU (by simp),?_⟩ + intro t ht x hx + exact hVU ⟨hKV ht,hx⟩ + +theorem compact_fixed_jet_injectivity {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)) + (p : Base × ℝ) (L : (Base × ℝ) ≃L[ℝ] ProjectionTarget 3) + (hfix : ∀ t ∈ K, fderiv ℝ (F t) p = L.toContinuousLinearMap) : + ∃ r : ℝ, 0 < r ∧ ∀ t ∈ K, (ball p r).InjOn (F t) := by + 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] + obtain ⟨U,hU,hpU,hnear⟩ := compact_fixed_value_neighborhood hK hD p + L.toContinuousLinearMap hfix hc + obtain ⟨r,hr,hrU⟩ := Metric.isOpen_iff.mp hU p hpU + refine ⟨r,hr,?_⟩ + intro t ht + apply near_equiv_derivative_injOn L (fun x _ => (hF t ht).differentiable (by simp) x) + (convex_ball p r) hc.le hsmall + intro x hx + exact (show ‖fderiv ℝ (F t) x-L.toContinuousLinearMap‖ < c from by + simpa only [dist_eq_norm] using hnear t ht x (hrU hx)).le + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactGeometrySmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactGeometrySmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..c4b64c3d2504f9499a158aecab5680b701117378 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactGeometrySmallIncrement.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformNearbyAtlasSmallIncrement +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPhaseMeanDomains + +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 compactGeometrySmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance compactGeometrySmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance compactGeometrySmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance compactGeometrySmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance compactGeometrySmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance compactGeometrySmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Compact good phase geometry yields the actual small increment; no +mean data or linear solver is an input. -/ +theorem compact_geometry_small_increment + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hpos : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + 0 < (Q i).Q j (A.tensorPlaneRead i reference x)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + (P : ℕ → ℝ) (hP : ∀ m, 0 ≤ P m) + (hPF : ∀ m, 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ 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 ⟨d⟩ := A.exists_phaseMeanDomains F hF Q hImm hgood + (fun i => A.tensorPlaneRead i reference) + (fun i => (A.tensorPlaneRead_smooth i href).continuous) hpos + apply A.uniform_nearby_atlas_small_increment F hF Q w hw d.Ω d.U d.K + d.openΩ d.openU d.compactK d.UK d.KΩ d.immersion d.good d.support + d.U₀ d.openU₀ d.K₀ d.U₀K₀ d.supportU₀ d.r_pos d.ρ_pos reference href d.margin + ?_ hgoodQ P hP hPF q + intro k l x hx + apply hImm k x + exact Set.image_mono (A.quadraticOverlapCompact_subset + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) hx + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLeadingRegularity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLeadingRegularity.lean new file mode 100644 index 0000000000000000000000000000000000000000..caeeba5fd5dafee5a369b639d2968160f3177778 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLeadingRegularity.lean @@ -0,0 +1,72 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.LeadingProfileStability +import OAI.Geometry.SurfaceImmersion.Primitive.BoundaryProfileGeometry + +namespace OAI + +/-! Uniform regularity of every five-profile perturbation along a compact +set of spatial points and one full oscillation period. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.SurfaceVelocityFamily.Loop +open JetPolynomial GeometryPreservation +variable {O : TopologicalSpace.Opens LowJet} (l : SurfaceVelocityFamily.Loop O) + +lemma geometricProfile_real_continuousOn {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) : + ContinuousOn (fun z : JetPolynomial.Base × ℝ => boundaryProfileMap + (l.geometricLeadingProfile G hG hGO z.1 (z.2 : CovarianceCorrector.Period))) (S ×ˢ univ) := by + have hd : ContDiff ℝ ∞ (lowDerivative G 1) := by + convert ((lowJet_smooth hG).fderiv_right (m := ∞) (by simp)).clm_apply + (contDiff_const (c := coordinateVector 1)) using 1 + funext p + exact (lowJet_derivative hG 1 p).symm + let f : JetPolynomial.Base × ℝ → LeadingProfileInput := + fun z => ((lowJet G z.1,z.2),lowDerivative G 1 z.1) + have hf : Continuous f := + (((lowJet_smooth hG).continuous.comp continuous_fst).prodMk continuous_snd).prodMk + (hd.continuous.comp continuous_fst) + have hmaps : MapsTo f (S ×ˢ univ) ((O ×ˢ univ) ×ˢ univ) := + fun z hz => ⟨⟨hGO hz.1,mem_univ _⟩,mem_univ _⟩ + have hh := boundaryProfileMap.continuous.comp_continuousOn + (l.leadingProfileMap_smooth.continuousOn.comp hf.continuousOn hmaps) + apply hh.congr + intro z hz + exact congrArg boundaryProfileMap (l.leadingProfileMap_geometry hG hGO hz.1 z.2).symm + +theorem compact_regular_profile_family {X : Type*} [TopologicalSpace X] + {K : Set X} (hK : IsCompact K) {J : X → BoundaryProfile} + (hJ : ContinuousOn J K) (hreg : ∀ x ∈ K, J x ∈ regularBoundaryProfiles) : + ∃ δ : ℝ, 0 < δ ∧ ∀ x ∈ K, ∀ H : BoundaryProfile, ‖H-J x‖ < δ → + H ∈ regularBoundaryProfiles := by + have hc : IsCompact (J '' K) := hK.image_of_continuousOn hJ + have hr : J '' K ⊆ regularBoundaryProfiles := by + rintro _ ⟨x,hx,rfl⟩ + exact hreg x hx + obtain ⟨δ,hδ,hnear⟩ := compact_boundary_profile_stability hc hr 1 zero_lt_one + exact ⟨δ,hδ,fun x hx H herr => (hnear _ (mem_image_of_mem J hx) H herr).1⟩ + +theorem compact_leading_regularity {S : TopologicalSpace.Opens JetPolynomial.Base} + {G : JetPolynomial.Base → JetPolynomial.Space} (hG : ContDiff ℝ ∞ G) + (hGO : MapsTo (lowJet G) S O) {C : Set JetPolynomial.Base} + (hC : IsCompact C) (hCS : C ⊆ S) + (hreg : ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, + boundaryProfileMap (l.geometricLeadingProfile G hG hGO p (t : CovarianceCorrector.Period)) ∈ + regularBoundaryProfiles) : + ∃ δ : ℝ, 0 < δ ∧ ∀ p ∈ C, ∀ t ∈ Icc (0 : ℝ) 1, ∀ H : BoundaryProfile, + ‖H-boundaryProfileMap (l.geometricLeadingProfile G hG hGO p (t : CovarianceCorrector.Period))‖ < δ → + H ∈ regularBoundaryProfiles := by + let f : JetPolynomial.Base × ℝ → BoundaryProfile := fun z => + boundaryProfileMap (l.geometricLeadingProfile G hG hGO z.1 (z.2 : CovarianceCorrector.Period)) + have hf : ContinuousOn f (C ×ˢ Icc (0 : ℝ) 1) := + (l.geometricProfile_real_continuousOn hG hGO).mono (fun z hz => ⟨hCS hz.1,mem_univ _⟩) + obtain ⟨δ,hδ,hnear⟩ := compact_regular_profile_family (hC.prod isCompact_Icc) hf + (fun z hz => hreg z.1 hz.1 z.2 hz.2) + exact ⟨δ,hδ,fun p hp t ht H herr => hnear (p,t) ⟨hp,ht⟩ H herr⟩ + +end ClosedSurfaceR4.SurfaceVelocityFamily.Loop + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLinearLowerBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLinearLowerBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..9d143cd20fdda606e2c9df1167118aac8adb40dd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLinearLowerBound.lean @@ -0,0 +1,77 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! A compact family of injective chart differentials has one positive +lower bound, retained by a fixed operator-norm perturbation. -/ +noncomputable section +open Set Metric +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial + +theorem compact_injective_lower_bound {K : Set (Base →L[ℝ] Space)} + (hK : IsCompact K) (hI : ∀ L ∈ K, Function.Injective L) : + ∃ c : ℝ, 0 < c ∧ ∀ L ∈ K, ∀ H : Base →L[ℝ] Space, ‖H-L‖ ≤ c → + ∀ v : Base, c*‖v‖ ≤ ‖H v‖ := by + let S : Set ((Base →L[ℝ] Space) × Base) := K ×ˢ sphere 0 1 + have hS : IsCompact S := hK.prod (isCompact_sphere 0 1) + have hf : Continuous (fun z : (Base →L[ℝ] Space) × Base => ‖z.1 z.2‖) := by fun_prop + have hp : ∀ z ∈ S, 0 < ‖z.1 z.2‖ := by + rintro ⟨L,v⟩ ⟨hL,hv⟩ + apply norm_pos_iff.mpr + intro hz + have hv0 : v = 0 := hI L hL (hz.trans L.map_zero.symm) + have hnorm : ‖v‖ = 1 := by simpa only [mem_sphere,dist_zero_right] using hv + rw [hv0,norm_zero] at hnorm + exact zero_ne_one hnorm + obtain ⟨μ,hμ,hbound⟩ := hS.exists_forall_le' hf.continuousOn hp + have hbase (L : Base →L[ℝ] Space) (hL : L ∈ K) (v : Base) : μ*‖v‖ ≤ ‖L v‖ := by + by_cases hv : v = 0 + · simp [hv] + have hn : 0 < ‖v‖ := norm_pos_iff.mpr hv + let u := ‖v‖⁻¹ • v + have hu : ‖u‖ = 1 := by + simp only [u,norm_smul,Real.norm_eq_abs,abs_inv,abs_norm] + exact inv_mul_cancel₀ hn.ne' + have hh := hbound (L,u) ⟨hL,by simpa only [mem_sphere,dist_zero_right] using hu⟩ + change μ ≤ ‖L u‖ at hh + rw [show L u = ‖v‖⁻¹ • L v from L.map_smul _ _] at hh + rw [norm_smul,Real.norm_eq_abs,abs_inv,abs_norm] at hh + exact (le_div_iff₀ hn).mp (by simpa only [div_eq_inv_mul] using hh) + refine ⟨μ/2,half_pos hμ,?_⟩ + intro L hL H hHL v + have hd : ‖(L-H) v‖ ≤ (μ/2)*‖v‖ := by + exact ((L-H).le_opNorm v).trans (mul_le_mul_of_nonneg_right + (by simpa only [norm_sub_rev] using hHL) (norm_nonneg v)) + have he : L v = H v+(L-H) v := by simp + have ht : ‖L v‖ ≤ ‖H v‖+‖(L-H) v‖ := by rw [he]; exact norm_add_le _ _ + have hb := hbase L hL v + nlinarith + +lemma linear_lower_bound_metric_comparison (L : Base →L[ℝ] Space) + (B : Base →L[ℝ] Base →L[ℝ] ℝ) {a b : ℝ} (ha : 0 < a) (hb : 0 ≤ b) + (hL : ∀ v, a*‖v‖ ≤ ‖L v‖) (hB : ‖B‖ ≤ b) (v : Base) : + a^2/(b+1) * B v v ≤ ‖L v‖^2 := by + have hBv : B v v ≤ b*‖v‖^2 := by + calc + B v v ≤ ‖B v v‖ := le_abs_self _ + _ ≤ ‖B‖*‖v‖*‖v‖ := B.le_opNorm₂ v v + _ ≤ b*‖v‖^2 := by nlinarith [mul_nonneg (sub_nonneg.mpr hB) (sq_nonneg ‖v‖)] + have hLv : a^2*‖v‖^2 ≤ ‖L v‖^2 := by + have hh := hL v + nlinarith [norm_nonneg (L v),mul_nonneg ha.le (norm_nonneg v)] + have hdiv : 0 ≤ a^2/(b+1) := div_nonneg (sq_nonneg a) (by positivity) + calc + a^2/(b+1) * B v v ≤ a^2/(b+1)*(b*‖v‖^2) := + mul_le_mul_of_nonneg_left hBv hdiv + _ = (a^2*(b*‖v‖^2))/(b+1) := by ring + _ ≤ a^2*‖v‖^2 := by + apply (div_le_iff₀ (by positivity : 0 < b+1)).2 + nlinarith [mul_nonneg (sq_nonneg a) (sq_nonneg ‖v‖)] + _ ≤ ‖L v‖^2 := hLv + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..20f7b101df2b899b6fcf35f4e3b082e3d05ddfc4 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalBounds.lean @@ -0,0 +1,30 @@ +import OAI.Geometry.Immersion.ClosedSurface.WeightedBounds + +namespace OAI + +/-! Uniform slow-scale bounds on a relatively compact coordinate domain. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.WeightedEstimates +variable {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] + [NormedAddCommGroup F] [NormedSpace ℝ F] + +theorem compact_local_weighted_bound {V Ω K : Set E} + (hV : IsOpen V) (hΩ : IsOpen Ω) (hK : IsCompact K) + (hVK : V ⊆ K) (hKΩ : K ⊆ Ω) {f : E → F} + (hf : ContDiffOn ℝ ∞ f Ω) (m : ℕ) : + ∃ C : ℝ, 1 ≤ C ∧ ∀ s : ℝ, 0 ≤ s → s ≤ 1 → WeightedBound V s m C f := by + obtain ⟨C,hC,hb⟩ := compact_coefficient_bound hΩ.uniqueDiffOn hK hKΩ hf m + refine ⟨C,hC,?_⟩ + intro s hs hs1 j hj x hx + rw [iteratedFDerivWithin_of_isOpen j hV hx] + have hh := hb j hj x (hVK hx) + rw [iteratedFDerivWithin_of_isOpen j hΩ (hKΩ (hVK hx))] at hh + exact (mul_le_of_le_one_left (norm_nonneg _) (pow_le_one₀ hs hs1)).trans hh + +end ClosedSurfaceR4.WeightedEstimates + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalInjectivity.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalInjectivity.lean new file mode 100644 index 0000000000000000000000000000000000000000..8e93555f71592edef1e2c10bdf5cb850ade29118 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactLocalInjectivity.lean @@ -0,0 +1,44 @@ +import Mathlib.Topology.Separation.Hausdorff +import Mathlib.Topology.Compactness.Compact +import Mathlib.Topology.Maps.Basic + +namespace OAI + +/-! A continuous map injective on a compact set and locally injective +near it is injective on some open neighborhood of the compact set. -/ +noncomputable section +open Set +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y] [T2Space Y] + +theorem compact_local_injectivity {f : X → Y} (hf : Continuous f) + {K : Set X} (hK : IsCompact K) (hi : K.InjOn f) + (hloc : ∀ x ∈ K, ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ U.InjOn f) : + ∃ V : Set X, IsOpen V ∧ K ⊆ V ∧ V.InjOn f := by + classical + let S := {U : Set X // IsOpen U ∧ U.InjOn f} + let A : Set (X × X) := {z | f z.1 ≠ f z.2} ∪ ⋃ U : S, (U: Set X) ×ˢ (U: Set X) + have hA : IsOpen A := (isOpen_ne_fun (hf.comp continuous_fst) + (hf.comp continuous_snd)).union (isOpen_iUnion fun U => U.property.1.prod U.property.1) + have hKA : K ×ˢ K ⊆ A := by + rintro ⟨x,y⟩ ⟨hx,hy⟩ + by_cases hxy : f x = f y + · have heq := hi hx hy hxy + change x = y at heq + subst y + obtain ⟨U,hU,hxU,hUi⟩ := hloc x hx + exact Or.inr (mem_iUnion.mpr ⟨⟨U,hU,hUi⟩,hxU,hxU⟩) + · exact Or.inl hxy + obtain ⟨U,V,hU,hV,hKU,hKV,hUV⟩ := generalized_tube_lemma hK hK hA hKA + refine ⟨U ∩ V,hU.inter hV,subset_inter hKU hKV,?_⟩ + intro x hx y hy hxy + rcases hUV (show (x,y) ∈ U ×ˢ V from ⟨hx.1,hy.2⟩) with hn | hn + · exact False.elim (hn hxy) + · obtain ⟨W,hxW,hyW⟩ := mem_iUnion.mp hn + exact W.property.2 hxW hyW hxy + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactNormalTriple.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactNormalTriple.lean new file mode 100644 index 0000000000000000000000000000000000000000..52e2d931e63ca738d40d6b0bd963f8891bae9317 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactNormalTriple.lean @@ -0,0 +1,106 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.VelocityNormalNonvanishing +import OAI.Geometry.Immersion.ClosedSurface.NormalJets +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Uniform normal nondegeneracy from the three bounded derivatives of a +primitive ansatz. No bound on its rapidly oscillating xx derivative is used. -/ +noncomputable section +open Set Filter +open scoped ContDiff Topology +namespace ClosedSurfaceR4.VelocityFrame +open NormalFrame RealModes + +abbrev NormalTriple := Fin 3 → Vec + +def tripleNormal (J : NormalTriple) : Vec := realNormalPart (J 0) (J 1) (J 2) + +lemma contDiffAt_tripleNormal {J : NormalTriple} + (hJ : gramDet (J 0) (J 1) ≠ 0) : ContDiffAt ℝ ∞ tripleNormal J := by + have hslot (i : Fin 3) : ContDiffAt ℝ ∞ (fun K : NormalTriple => K i) J := + (ContinuousLinearMap.proj i : NormalTriple →L[ℝ] Vec).contDiff.contDiffAt + exact contDiffAt_realNormalPart (hslot 0) (hslot 1) (hslot 2) hJ + +def normalTripleNeighborhood (c : ℝ) : Set NormalTriple := + {J | gramDet (J 0) (J 1) ≠ 0 ∧ c < ‖tripleNormal J‖} + +lemma isOpen_normalTripleNeighborhood (c : ℝ) : IsOpen (normalTripleNeighborhood c) := by + apply isOpen_iff_mem_nhds.mpr + intro J hJ + have hd : Continuous (fun K : NormalTriple => gramDet (K 0) (K 1)) := by + unfold gramDet dotProduct + fun_prop + exact (hd.continuousAt.eventually_ne hJ.1).and + ((contDiffAt_tripleNormal hJ.1).continuousAt.norm.eventually + (lt_mem_nhds hJ.2)) + +/-- Compact leading tangent/second-derivative triples have one positive +normal margin and one perturbation radius, independent of the fast phase. -/ +theorem compact_normal_triple_stability {K : Set NormalTriple} + (hK : IsCompact K) + (hD : ∀ J ∈ K, gramDet (J 0) (J 1) ≠ 0) + (hN : ∀ J ∈ K, tripleNormal J ≠ 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ J ∈ K, ∀ H : NormalTriple, + ‖H-J‖ < ε → gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖tripleNormal H‖ := by + rcases K.eq_empty_or_nonempty with hzero | hne + · refine ⟨1,1,zero_lt_one,zero_lt_one,?_⟩ + simp [hzero] + have hc : ContinuousOn (fun J => ‖tripleNormal J‖) K := + fun J hJ => ((contDiffAt_tripleNormal (hD J hJ)).continuousAt.norm).continuousWithinAt + obtain ⟨J₀,hJ₀,hmin⟩ := hK.exists_isMinOn hne hc + let c := ‖tripleNormal J₀‖/2 + have hcpos : 0 < c := half_pos (norm_pos_iff.mpr (hN J₀ hJ₀)) + have hsub : K ⊆ normalTripleNeighborhood c := by + intro J hJ + exact ⟨hD J hJ,lt_of_lt_of_le (by have hh := hcpos; dsimp [c] at hh ⊢; linarith) (hmin hJ)⟩ + obtain ⟨ε,hε,he⟩ := hK.exists_thickening_subset_open + (isOpen_normalTripleNeighborhood c) hsub + refine ⟨ε,c,hε,hcpos,?_⟩ + intro J hJ H hHJ + apply he + exact Metric.mem_thickening_iff.mpr ⟨J,hJ,by simpa only [dist_eq_norm] using hHJ⟩ + +/-- Apply the three-derivative stability estimate to the leading velocity +geometry. It controls the actual normal component of the yy derivative. -/ +theorem compact_leading_normal_stability {E : Type*} [TopologicalSpace E] + {K : Set E} (hK : IsCompact K) {X Y C V : E → Vec} + (hX : ContinuousOn X K) (hY : ContinuousOn Y K) + (hC : ContinuousOn C K) (hV : ContinuousOn V K) + (hD : ∀ p ∈ K, gramDet (Y p) (C p) ≠ 0) + (hYV : ∀ p ∈ K, Y p ⬝ᵥ V p = 0) + (hCV : ∀ p ∈ K, C p ⬝ᵥ V p = 0) + (hV0 : ∀ p ∈ K, V p ≠ 0) : + ∃ ε c : ℝ, 0 < ε ∧ 0 < c ∧ ∀ p ∈ K, ∀ H : NormalTriple, + ‖H-![leadingTangent (X p) (Y p) (C p) (V p),Y p,C p]‖ < ε → + gramDet (H 0) (H 1) ≠ 0 ∧ c < ‖realNormalPart (H 0) (H 1) (H 2)‖ := by + let J : E → NormalTriple := fun p => + ![leadingTangent (X p) (Y p) (C p) (V p),Y p,C p] + have hT : ContinuousOn (fun p => leadingTangent (X p) (Y p) (C p) (V p)) K := by + intro p hp + have hn : ContinuousAt (fun q : Vec × Vec × Vec => + realNormalPart q.1 q.2.1 q.2.2) (Y p,C p,X p) := + (contDiffAt_realNormalPart (E := Vec × Vec × Vec) + (X := fun q => q.1) (Y := fun q => q.2.1) (W := fun q => q.2.2) + (p := (Y p,C p,X p)) (by fun_prop) (by fun_prop) (by fun_prop) (hD p hp)).continuousAt + exact ((hX p hp).sub + (hn.comp_continuousWithinAt (f := fun q : E => (Y q,C q,X q)) + ((hY p hp).prodMk ((hC p hp).prodMk (hX p hp))))).add (hV p hp) + + have hJ : ContinuousOn J K := by + apply continuousOn_pi.mpr + intro i + fin_cases i + · exact hT + · exact hY + · exact hC + obtain ⟨ε,c,hε,hc,hh⟩ := compact_normal_triple_stability (hK.image_of_continuousOn hJ) + (by rintro _ ⟨p,hp,rfl⟩; exact (leading_normal_nondegenerate (hD p hp) (hYV p hp) (hCV p hp) (hV0 p hp)).1) + (by rintro _ ⟨p,hp,rfl⟩; exact (leading_normal_nondegenerate (hD p hp) (hYV p hp) (hCV p hp) (hV0 p hp)).2) + exact ⟨ε,c,hε,hc,fun p hp H hH => hh (J p) (mem_image_of_mem J hp) H hH⟩ + +end ClosedSurfaceR4.VelocityFrame + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPairAvoidance.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPairAvoidance.lean new file mode 100644 index 0000000000000000000000000000000000000000..11c8f6437179aa815408657089a94802654fe87c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPairAvoidance.lean @@ -0,0 +1,55 @@ +import OAI.Geometry.SurfaceImmersion.Whitney.SurfacePairDerivative + +namespace OAI + +/-! Absence of coincidences on a compact pair set persists under small +translations with a bounded scalar cutoff. -/ +noncomputable section +open Set Filter Manifold Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {M : Type*} [TopologicalSpace M] + +theorem compact_pair_avoidance_stability {f : M → ProjectionTarget 3} (hf : Continuous f) + (χ : M → ℝ) (hχ : ∀ x, χ x ∈ Icc 0 1) + {K : Set (M × M)} (hK : IsCompact K) (havoid : ∀ z ∈ K, f z.1 ≠ f z.2) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ z ∈ K, + surfaceTranslation f χ a z.1 ≠ surfaceTranslation f χ a z.2 := by + rcases K.eq_empty_or_nonempty with rfl | hne + · exact ⟨1,by norm_num,by simp⟩ + have hc : Continuous (fun z : M × M => ‖f z.1-f z.2‖) := + ((hf.comp continuous_fst).sub (hf.comp continuous_snd)).norm + obtain ⟨z,hz,hmin⟩ := hK.exists_isMinOn hne hc.continuousOn + have hpos : 0 < ‖f z.1-f z.2‖ := norm_pos_iff.mpr (sub_ne_zero.mpr (havoid z hz)) + refine ⟨_,hpos,?_⟩ + intro a ha w hw heq + change f w.1+χ w.1 • a = f w.2+χ w.2 • a at heq + have hd : f w.1-f w.2 = (χ w.2-χ w.1) • a := by + calc + f w.1-f w.2 = (f w.1+χ w.1 • a)-(f w.2+χ w.1 • a) := by abel + _ = (f w.2+χ w.2 • a)-(f w.2+χ w.1 • a) := by rw [heq] + _ = (χ w.2-χ w.1) • a := by module + have hb : |χ w.2-χ w.1| ≤ 1 := abs_le.mpr ⟨by linarith [(hχ w.1).2,(hχ w.2).1], + by linarith [(hχ w.1).1,(hχ w.2).2]⟩ + have hnorm : ‖f w.1-f w.2‖ ≤ ‖a‖ := by + rw [hd,norm_smul,Real.norm_eq_abs] + exact (mul_le_mul_of_nonneg_right hb (norm_nonneg a)).trans_eq (one_mul _) + exact (not_lt_of_ge (hmin hw)) (hnorm.trans_lt ha) + +variable [T2Space M] +theorem compact_finite_pair_avoidance_stability {f : M → ProjectionTarget 3} (hf : Continuous f) + (χ : M → ℝ) (hχ : ∀ x, χ x ∈ Icc 0 1) + {K : Set (M × M)} (hK : IsCompact K) {S : Set M} (hS : S.Finite) + (havoid : ∀ z ∈ K, z.1 ∈ S ∨ z.2 ∈ S → f z.1 ≠ f z.2) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ z ∈ K, + z.1 ∈ S ∨ z.2 ∈ S → surfaceTranslation f χ a z.1 ≠ surfaceTranslation f χ a z.2 := by + have hclosed : IsClosed {z : M × M | z.1 ∈ S ∨ z.2 ∈ S} := + (hS.isClosed.preimage continuous_fst).union (hS.isClosed.preimage continuous_snd) + obtain ⟨δ,hδ,hstable⟩ := compact_pair_avoidance_stability hf χ hχ + (hK.inter_right hclosed) (fun z hz => havoid z hz.1 hz.2) + exact ⟨δ,hδ,fun a ha z hz hS => hstable a ha z ⟨hz,hS⟩⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactParameterC1.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactParameterC1.lean new file mode 100644 index 0000000000000000000000000000000000000000..d41afbf8c13e11598bd645c2accbcdb8bcccb515 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactParameterC1.lean @@ -0,0 +1,42 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactSectionBounds + +namespace OAI + +/-! Compact C1 bounds for a smooth parameter family and its spatial slices. -/ +noncomputable section +open Set +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {P X V : Type*} [NormedAddCommGroup P] [NormedSpace ℝ P] + [NormedAddCommGroup X] [NormedSpace ℝ X] [NormedAddCommGroup V] [NormedSpace ℝ V] + +theorem compact_parameter_C1 {A : Set P} {K : Set X} (hA : IsCompact A) (hK : IsCompact K) + {F : P × X → V} (hF : ∀ z ∈ A ×ˢ K, ContDiffAt ℝ ∞ F z) : + ∃ D : ℝ, 1 ≤ D ∧ ∀ a ∈ A, ∀ x ∈ K, + ‖F (a,x)‖ ≤ D ∧ ‖fderiv ℝ (fun y => F (a,y)) x‖ ≤ D := by + have hc : ContinuousOn (fun z => (F z,fderiv ℝ F z)) (A ×ˢ K) := by + intro z hz + exact ((hF z hz).continuousAt.prodMk ((hF z hz).continuousAt_fderiv (by simp))).continuousWithinAt + obtain ⟨C,hC⟩ := (hA.prod hK).exists_bound_of_continuousOn hc + refine ⟨max 1 C,le_max_left _ _,?_⟩ + intro a ha x hx + have hb := (hC (a,x) ⟨ha,hx⟩).trans (le_max_right 1 C) + have hv := (norm_fst_le (F (a,x),fderiv ℝ F (a,x))).trans hb + have hd := (norm_snd_le (F (a,x),fderiv ℝ F (a,x))).trans hb + refine ⟨hv,?_⟩ + have hpair : HasFDerivAt (fun y : X => (a,y)) (ContinuousLinearMap.inr ℝ P X) x := + (hasFDerivAt_const a x).prodMk (hasFDerivAt_id x) + have he := ((hF (a,x) ⟨ha,hx⟩).differentiableAt (by simp)).hasFDerivAt.comp x hpair + change ‖fderiv ℝ (F ∘ Prod.mk a) x‖ ≤ max 1 C + rw [he.fderiv] + calc + _ ≤ ‖fderiv ℝ F (a,x)‖*‖ContinuousLinearMap.inr ℝ P X‖ := ContinuousLinearMap.opNorm_comp_le _ _ + _ ≤ ‖fderiv ℝ F (a,x)‖*1 := mul_le_mul_of_nonneg_left + (ContinuousLinearMap.norm_inr_le_one ℝ P X) (norm_nonneg _) + _ ≤ max 1 C := by simpa only [mul_one] using hd + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneJet.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneJet.lean new file mode 100644 index 0000000000000000000000000000000000000000..02bc64504116186e0fba05427d45b61af8ea479c --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneJet.lean @@ -0,0 +1,68 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.PlaneDerivativeInjectivity + +namespace OAI + +/-! Uniform isolation for a compact family of nondegenerate planar zeros. +The differential may vary with the homotopy parameter. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +theorem compact_plane_jet_injectivity {K : Set ℝ} (hK : IsCompact K) + (F : ℝ → Base → Base) (hF : ∀ t ∈ K, ContDiff ℝ ∞ (F t)) + (hD : Continuous (fun z : ℝ × Base => fderiv ℝ (F z.1) z.2)) (p : Base) + (hI : ∀ t ∈ K, Function.Bijective (fderiv ℝ (F t) p)) : + ∃ r : ℝ, 0 < r ∧ ∀ t ∈ K, (ball p r).InjOn (F t) := by + have hJ : ContinuousOn (fun t => (fderiv ℝ (F t) p).inverse) K := by + intro t ht + let L := ContinuousLinearEquiv.ofBijective (fderiv ℝ (F t) p) + (LinearMap.ker_eq_bot.mpr (hI t ht).1) (LinearMap.range_eq_top.mpr (hI t ht).2) + have hi : (fderiv ℝ (F t) p).IsInvertible := ⟨L,rfl⟩ + have hinv : ContDiffAt ℝ 0 ContinuousLinearMap.inverse (fderiv ℝ (F t) p) := + hi.contDiffAt_map_inverse + have hP : Continuous (fun s : ℝ => fderiv ℝ (F s) p) := + hD.comp (continuous_id.prodMk continuous_const) + have hJt : ContinuousAt (fun s : ℝ => (fderiv ℝ (F s) p).inverse) t := + ContinuousAt.comp (g := ContinuousLinearMap.inverse) + (f := fun s : ℝ => fderiv ℝ (F s) p) hinv.continuousAt hP.continuousAt + exact hJt.continuousWithinAt + obtain ⟨C,hC⟩ := hK.exists_bound_of_continuousOn hJ + let c : ℝ := (2*(|C|+1))⁻¹ + have hc : 0 < c := by dsimp [c]; positivity + have hdiff : Continuous (fun z : ℝ × Base => + fderiv ℝ (F z.1) z.2-fderiv ℝ (F z.1) p) := + hD.sub (hD.comp (continuous_fst.prodMk continuous_const)) + obtain ⟨U,hU,hpU,hnear⟩ := compact_fixed_value_neighborhood hK hdiff p + (0 : Base →L[ℝ] Base) (fun _ _ => sub_self _) hc + obtain ⟨r,hr,hrU⟩ := Metric.isOpen_iff.mp hU p hpU + refine ⟨r,hr,?_⟩ + intro t ht + let L := ContinuousLinearEquiv.ofBijective (fderiv ℝ (F t) p) + (LinearMap.ker_eq_bot.mpr (hI t ht).1) (LinearMap.range_eq_top.mpr (hI t ht).2) + have hLI : (fderiv ℝ (F t) p).inverse = L.symm.toContinuousLinearMap := by + change (L.toContinuousLinearMap).inverse = _ + exact ContinuousLinearMap.inverse_equiv L + have hLn : ‖L.symm.toContinuousLinearMap‖ ≤ |C| := by + rw [←hLI] + exact (hC t ht).trans (le_abs_self C) + apply near_plane_equiv_derivative_injOn L + (fun x _ => (hF t ht).differentiable (by simp) x) (convex_ball p r) (c := c) + · calc + _ ≤ |C| * c := mul_le_mul_of_nonneg_right hLn hc.le + _ < 1 := by + dsimp [c] + rw [←div_eq_mul_inv] + apply (div_lt_iff₀ (by positivity)).mpr + linarith [abs_nonneg C] + · intro x hx + have hh : ‖fderiv ℝ (F t) x-fderiv ℝ (F t) p‖ < c := by + simpa only [dist_zero_right] using hnear t ht x (hrU hx) + exact hh.le + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneZero.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneZero.lean new file mode 100644 index 0000000000000000000000000000000000000000..d46b5954b518ff1c0c0d8785ad687620542fca46 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPlaneZero.lean @@ -0,0 +1,105 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPlaneJet +import OAI.Geometry.SurfaceImmersion.Geometry.CompactAxisRectangle + +namespace OAI + +/-! Uniform zero isolation along the normalized connecting axis. -/ +noncomputable section +open Set Filter Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) + +lemma compact_nonzero_locus_open {K : Set ℝ} (hK : IsCompact K) + {F : ℝ → Base → Base} (hF : Continuous (fun z : ℝ × Base => F z.1 z.2)) : + IsOpen {x | ∀ t ∈ K, F t x ≠ 0} := by + let O := {z : ℝ × Base | F z.1 z.2 ≠ 0} + have hO : IsOpen O := isOpen_ne.preimage hF + apply isOpen_iff_mem_nhds.mpr + intro x hx + have hsub : K ×ˢ {x} ⊆ O := by + rintro ⟨t,y⟩ ⟨ht,hy⟩ + have he : y = x := hy + subst y + exact hx t ht + obtain ⟨V,U,_hV,hU,hKV,hxU,hVU⟩ := generalized_tube_lemma hK isCompact_singleton hO hsub + apply Filter.mem_of_superset (hU.mem_nhds (hxU (by simp))) + intro y hy t ht + exact hVU (show (t,y) ∈ V ×ˢ U from ⟨hKV ht,hy⟩) + +theorem compact_plane_zero_isolation {K : Set ℝ} (hK : IsCompact K) + (F : ℝ → Base → Base) (hF : ∀ t ∈ K, ContDiff ℝ ∞ (F t)) + (hD : Continuous (fun z : ℝ × Base => fderiv ℝ (F z.1) z.2)) (p : Base) + (hI : ∀ t ∈ K, Function.Bijective (fderiv ℝ (F t) p)) + (hz : ∀ t ∈ K, F t p = 0) : + ∃ r : ℝ, 0 < r ∧ ∀ t ∈ K, ∀ x ∈ ball p r, F t x = 0 ↔ x = p := by + obtain ⟨r,hr,hri⟩ := compact_plane_jet_injectivity hK F hF hD p hI + refine ⟨r,hr,?_⟩ + intro t ht x hx + constructor + · intro he + exact hri t ht hx (mem_ball_self hr) (he.trans (hz t ht).symm) + · rintro rfl + exact hz t ht + +theorem compact_two_zero_rectangle {K : Set ℝ} (hK : IsCompact K) + (F : ℝ → Base → Base) (hF : ∀ t ∈ K, ContDiff ℝ ∞ (F t)) + (hFc : Continuous (fun z : ℝ × Base => F z.1 z.2)) + (hD : Continuous (fun z : ℝ × Base => fderiv ℝ (F z.1) z.2)) + {p q : ℝ} (hpq : p < q) + (haxis : ∀ t ∈ K, ∀ s ∈ Icc p q, F t (crosscapAxis s) = ![(s-p)*(s-q),0]) + (hIp : ∀ t ∈ K, Function.Bijective (fderiv ℝ (F t) (crosscapAxis p))) + (hIq : ∀ t ∈ K, Function.Bijective (fderiv ℝ (F t) (crosscapAxis q))) : + ∃ (r : ℝ) (O : Set Base), 0 < r ∧ IsOpen O ∧ + (∀ x ∈ Icc (-r) r, ∀ s ∈ Icc (p-r) (q+r), (![x,s] : Base) ∈ O) ∧ + ∀ t ∈ K, ∀ x ∈ O, F t x = 0 ↔ x = crosscapAxis p ∨ x = crosscapAxis q := by + have hzp : ∀ t ∈ K, F t (crosscapAxis p) = 0 := by + intro t ht + rw [haxis t ht p (left_mem_Icc.mpr hpq.le)] + ext i + fin_cases i <;> simp + have hzq : ∀ t ∈ K, F t (crosscapAxis q) = 0 := by + intro t ht + rw [haxis t ht q (right_mem_Icc.mpr hpq.le)] + ext i + fin_cases i <;> simp + obtain ⟨rp,hrp,hp⟩ := compact_plane_zero_isolation hK F hF hD _ hIp hzp + obtain ⟨rq,hrq,hq⟩ := compact_plane_zero_isolation hK F hF hD _ hIq hzq + let U : Set Base := {x | ∀ t ∈ K, F t x ≠ 0} + let O := (ball (crosscapAxis p) rp ∪ ball (crosscapAxis q) rq) ∪ U + have hO : IsOpen O := (isOpen_ball.union isOpen_ball).union (compact_nonzero_locus_open hK hFc) + have hAO : ∀ s ∈ Icc p q, crosscapAxis s ∈ O := by + intro s hs + by_cases hsp : s = p + · subst s + exact Or.inl (Or.inl (mem_ball_self hrp)) + by_cases hsq : s = q + · subst s + exact Or.inl (Or.inr (mem_ball_self hrq)) + apply Or.inr + intro t ht he + have he0 := congrFun he 0 + rw [haxis t ht s hs] at he0 + have hmul : (s-p)*(s-q) = 0 := he0 + rcases mul_eq_zero.mp hmul with hh | hh + · exact hsp (sub_eq_zero.mp hh) + · exact hsq (sub_eq_zero.mp hh) + obtain ⟨r,hr,hrect⟩ := compact_axis_rectangle hpq.le hO + (by simpa only [crosscapAxis_apply] using hAO) + refine ⟨r,O,hr,hO,hrect,?_⟩ + intro t ht x hx + constructor + · intro hz + rcases hx with (hxp | hxq) | hxU + · exact Or.inl ((hp t ht x hxp).mp hz) + · exact Or.inr ((hq t ht x hxq).mp hz) + · exact False.elim (hxU t ht hz) + · rintro (rfl | rfl) + · exact hzp t ht + · exact hzq t ht + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveMetricJets.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveMetricJets.lean new file mode 100644 index 0000000000000000000000000000000000000000..d280df48d95b0a61f2e1adc3fcbf3d2077bb07bd --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveMetricJets.lean @@ -0,0 +1,54 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactPositiveTensorBound +import OAI.Geometry.SurfaceImmersion.Atlas.ConvexQuadraticPhase + +namespace OAI + +/-! The closed family of first metric jets with a fixed positive lower +bound is compact. It therefore fixes the connection bound before any +finite-point modification or choice of disk centers. -/ +noncomputable section +open Set Metric +open scoped Topology +namespace ClosedSurfaceR4.PhaseGeometry +open SmallModes PhaseMean + +def positiveMetricJetRegion (c B : ℝ) : Set MetricFirstJet := + {j | ‖j‖ ≤ B ∧ ∀ v : Base, c*‖v‖^2 ≤ evaluate j.1 v v} + +lemma positiveMetricJetRegion_compact (c B : ℝ) : + IsCompact (positiveMetricJetRegion c B) := by + have hclosed : IsClosed {j : MetricFirstJet | ∀ v : Base, c*‖v‖^2 ≤ evaluate j.1 v v} := by + simp only [ofPred_forall] + apply isClosed_iInter + intro v + apply isClosed_le continuous_const + unfold evaluate + fun_prop + have heq : positiveMetricJetRegion c B = + closedBall (0 : MetricFirstJet) B ∩ {j | ∀ v : Base, c*‖v‖^2 ≤ evaluate j.1 v v} := by + ext j + simp only [positiveMetricJetRegion,mem_ofPred_eq,mem_inter_iff,mem_closedBall,dist_zero_right] + rw [heq] + exact (isCompact_closedBall _ _).inter_right hclosed + +lemma positiveMetricJetRegion_det {c B : ℝ} (hc : 0 < c) + {j : MetricFirstJet} (hj : j ∈ positiveMetricJetRegion c B) : metricJetDet j ≠ 0 := by + have hp : ∀ v : Base, v ≠ 0 → 0 < evaluate j.1 v v := by + intro v hv + exact (mul_pos hc (sq_pos_of_pos (norm_pos_iff.mpr hv))).trans_le (hj.2 v) + exact ((tensor_positive_iff j.1).mp hp).2.ne' + +theorem uniform_positive_metric_connection {c : ℝ} (hc : 0 < c) (B : ℝ) : + ∃ D : ℝ, 0 ≤ D ∧ ∀ j : MetricFirstJet, + ‖j‖ ≤ B → (∀ v : Base, c*‖v‖^2 ≤ evaluate j.1 v v) → + ∀ i, ‖metricConnectionAt j i‖ ≤ D := by + obtain ⟨D,hD,hb⟩ := compact_metricConnection_bound + (positiveMetricJetRegion_compact c B) + (fun _ hj => positiveMetricJetRegion_det hc hj) + exact ⟨D,hD,fun j hj hpos => hb j ⟨hj,hpos⟩⟩ + +end ClosedSurfaceR4.PhaseGeometry + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveTensorBound.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveTensorBound.lean new file mode 100644 index 0000000000000000000000000000000000000000..e117bc8ef784bba48466b460c24b86bbc9238281 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactPositiveTensorBound.lean @@ -0,0 +1,53 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.MetricReadBounds + +namespace OAI + +/-! A compact family of positive surface tensors has one quadratic lower +bound in the fixed coordinate norm. -/ +noncomputable section +open Set Metric +namespace ClosedSurfaceR4.PhaseMean +open SmallModes + +lemma evaluate_smul_both (H : Tensor) (c : ℝ) (v : Base) : + evaluate H (c • v) (c • v) = c^2*evaluate H v v := by + simp only [evaluate,Prod.smul_fst,Prod.smul_snd,smul_eq_mul] + ring + +theorem compact_positive_tensor_lower_bound {T : Set Tensor} (hT : IsCompact T) + (hpos : ∀ H ∈ T, ∀ v : Base, v ≠ 0 → 0 < evaluate H v v) : + ∃ c : ℝ, 0 < c ∧ ∀ H ∈ T, ∀ v : Base, c*‖v‖^2 ≤ evaluate H v v := by + let K : Set (Tensor × Base) := T ×ˢ sphere 0 1 + have hK : IsCompact K := hT.prod (isCompact_sphere 0 1) + have hf : Continuous (fun z : Tensor × Base => evaluate z.1 z.2 z.2) := by + unfold evaluate + fun_prop + have hp : ∀ z ∈ K, 0 < evaluate z.1 z.2 z.2 := by + rintro ⟨H,v⟩ ⟨hH,hv⟩ + apply hpos H hH v + intro hz + have hn : ‖v‖ = 1 := by simpa only [mem_sphere,dist_zero_right] using hv + rw [hz,norm_zero] at hn + exact zero_ne_one hn + obtain ⟨c,hc,hb⟩ := hK.exists_forall_le' hf.continuousOn hp + refine ⟨c,hc,?_⟩ + intro H hH v + by_cases hv : v = 0 + · simp [hv,evaluate] + have hn : 0 < ‖v‖ := norm_pos_iff.mpr hv + let u := ‖v‖⁻¹ • v + have hu : ‖u‖ = 1 := by + simp only [u,norm_smul,Real.norm_eq_abs,abs_inv,abs_norm] + exact inv_mul_cancel₀ hn.ne' + have hh := hb (H,u) ⟨hH,by simpa only [mem_sphere,dist_zero_right] using hu⟩ + calc + c*‖v‖^2 ≤ evaluate H u u*‖v‖^2 := mul_le_mul_of_nonneg_right hh (sq_nonneg _) + _ = evaluate H v v := by + rw [evaluate_smul_both] + field_simp + +end ClosedSurfaceR4.PhaseMean + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRadiusSmallIncrement.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRadiusSmallIncrement.lean new file mode 100644 index 0000000000000000000000000000000000000000..c67ee987aabe75ff3cd83906be45c84b11c4b9b9 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRadiusSmallIncrement.lean @@ -0,0 +1,85 @@ +import OAI.Geometry.SurfaceImmersion.Atlas.UniformRadiusAtlasIncrement +import OAI.Geometry.SurfaceImmersion.Correction.AtlasPhaseMeanDomains + +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 compactRadiusSmallFiberNormed : NormedAddCommGroup TensorFiber := inferInstance +local instance compactRadiusSmallFiberSpace : NormedSpace ℝ TensorFiber := inferInstance +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] +local instance compactRadiusSmallDualAdd : ∀ p : M, ContinuousAdd (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousAdd (Plane →L[ℝ] ℝ)) +local instance compactRadiusSmallDualSmul : ∀ p : M, ContinuousSMul ℝ (TangentSpace planeModel p →L[ℝ] ℝ) := + fun _ => inferInstanceAs (ContinuousSMul ℝ (Plane →L[ℝ] ℝ)) +local instance compactRadiusSmallSectionNormed (p : M) : NormedAddCommGroup (CovariantTwoTensor p) := + inferInstanceAs (NormedAddCommGroup TensorFiber) +local instance compactRadiusSmallSectionSpace (p : M) : NormedSpace ℝ (CovariantTwoTensor p) := + inferInstanceAs (NormedSpace ℝ TensorFiber) +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Compact good phase geometry yields the actual small increment; no +mean data or linear solver is an input. -/ +theorem compact_radius_small_increment + (F : M → Space) (hF : ContMDiff planeModel spaceModel ∞ F) + (Q : A.centers → PhaseBasis) (w : A.centers → Fin 3 → ℝ) + (hw : ∀ i j, w i j ≠ 0) + (hImm : ∀ i x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Function.Injective (fderiv ℝ (spaceCoordinates ∘ A.vectorPlaneRead i F) x)) + (hgood : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead i F) x) ((Q i).ξ j)) + (reference : ∀ x : M, CovariantTwoTensor x) + (href : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, TensorFiber)) ∞ + (fun x => TotalSpace.mk' TensorFiber x (reference x))) + (hpos : ∀ i j x, x ∈ (modeSupport (A.chartWeightCompact i) : Set SmallModes.Base) → + 0 < (Q i).Q j (A.tensorPlaneRead i reference x)) + (hgoodQ : ∀ 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) → + Good (RealModes.realSecondTensor (spaceCoordinates ∘ A.vectorPlaneRead k F) x) + (phaseDerivative (coordinatePhase (A.globalQuadraticPhase (A.linearAtlasPhase Q w) k l)) x)) + : ∃ 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 < ρ₀ → A.WeightedBound 1 2 b (G-F) → + ∀ (s : ℝ≥0), 0 < (s : ℝ) → s ≤ 1 → + (∀ m, 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, ‖A.tensorEncode H x - A.tensorEncode reference x‖ ≤ r/2) → + (∀ m, A.TensorWeightedBound s m (C m) H) → + ∀ τ δ : ℝ, 0 < τ → τ ≤ s → τ/s ≤ η₀ → 0 < δ → δ ≤ τ → + ∃ 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 ⟨d⟩ := A.exists_phaseMeanDomains F hF Q hImm hgood + (fun i => A.tensorPlaneRead i reference) + (fun i => (A.tensorPlaneRead_smooth i href).continuous) hpos + apply A.uniform_radius_atlas_increment F hF Q w hw d.Ω d.U d.K + d.openΩ d.openU d.compactK d.UK d.KΩ d.immersion d.good d.support + d.U₀ d.openU₀ d.K₀ d.U₀K₀ d.supportU₀ d.r_pos d.ρ_pos reference href d.margin + ?_ hgoodQ + intro k l x hx + apply hImm k x + exact Set.image_mono (A.quadraticOverlapCompact_subset + (fun a : A.centers × Fin 3 => tsupport (A.weight a.1)) + (fun a => isClosed_tsupport (A.weight a.1)) k l) hx + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRealJetNeighborhood.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRealJetNeighborhood.lean new file mode 100644 index 0000000000000000000000000000000000000000..f50b56a5a65227ff98e1c74bf1d69071ac5a1c2f --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRealJetNeighborhood.lean @@ -0,0 +1,71 @@ +import OAI.Geometry.SurfaceImmersion.Correction.UniformRealModeCoefficients +import Mathlib.Topology.MetricSpace.Thickening + +namespace OAI + +/-! Fixed compact admissible jet neighborhoods for nearby immersed maps. -/ +noncomputable section +open Set +open scoped ContDiff +namespace ClosedSurfaceR4.RealModes +open SmallModes WeightedEstimates + +def admissibleRealJets : Set RealTwoJet := + {J | NormalFrame.gramDet (J 0) (J 1) ≠ 0 ∧ realNormalPart (J 0) (J 1) (J 4) ≠ 0} + +lemma admissibleRealJets_domain : RealJetDomain admissibleRealJets := by + refine ⟨?_,fun _ h => h.1,fun _ h => h.2⟩ + apply isOpen_iff_mem_nhds.mpr + intro J hJ + have hs (i : Fin 5) : ContDiffAt ℝ ∞ (fun K : RealTwoJet => K i) J := + (ContinuousLinearMap.proj i : RealTwoJet →L[ℝ] RVec 4).contDiff.contDiffAt + 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_realNormalPart (hs 0) (hs 1) (hs 4) hJ.1).continuousAt.eventually_ne hJ.2) + +theorem compact_real_jet_neighborhood {F : RField 4} (hF : ContDiff ℝ ∞ F) + (K : TopologicalSpace.Compacts Base) + (hD : ∀ p ∈ (K : Set Base), + NormalFrame.gramDet (coordDeriv dx F p) (coordDeriv dy F p) ≠ 0) + (hB : ∀ p ∈ (K : Set Base), realSecond F p ≠ 0) : + ∃ (ε : ℝ) (Q : Set RealTwoJet), 0 < ε ∧ IsCompact Q ∧ Q ⊆ admissibleRealJets ∧ + ∀ G : RField 4, (∀ p ∈ (K : Set Base), ‖realTwoJet G p - realTwoJet F p‖ < ε) → + MapsTo (realTwoJet G) K Q := by + let J := realTwoJet F '' (K : Set Base) + have hJ : IsCompact J := K.isCompact.image (contDiff_realTwoJet hF).continuous + have hJa : J ⊆ admissibleRealJets := by + rintro _ ⟨p,hp,rfl⟩ + exact ⟨hD p hp,hB p hp⟩ + obtain ⟨ε,hε,he⟩ := hJ.exists_cthickening_subset_open admissibleRealJets_domain.isOpen hJa + refine ⟨ε,Metric.cthickening ε J,hε,hJ.cthickening,he,?_⟩ + intro G hGF p hp + apply Metric.thickening_subset_cthickening + apply Metric.mem_thickening_iff.mpr + exact ⟨realTwoJet F p,mem_image_of_mem _ hp,by simpa only [dist_eq_norm] using hGF p hp⟩ + +/-- The coefficient constant is fixed before the nearby map. Only its displayed +weighted two-jet bound enters the estimate. -/ +theorem RealModeDomain.uniform_compact_reconstruction {F : RField 4} + (hF : ContDiff ℝ ∞ F) {Ω U : Set Base} (h : RealModeDomain F Ω) + (hU : IsOpen U) (K : TopologicalSpace.Compacts Base) + (hUK : U ⊆ K) (hKΩ : (K : Set Base) ⊆ Ω) (m : ℕ) : + ∃ ε D : ℝ, 0 < ε ∧ 1 ≤ D ∧ ∀ (G : RField 4) (s C : ℝ), + ContDiff ℝ ∞ G → + (∀ p ∈ (K : Set Base), ‖realTwoJet G p - realTwoJet F p‖ < ε) → + 0 < s → 1 ≤ C → WeightedBound U s m C (realTwoJet G) → + ReconstructionCoefficientBound (fun p => complexify (G p)) U s m + ((m.factorial : ℝ) * D * C^m) := by + obtain ⟨ε,Q,hε,hQ,hQa,hclose⟩ := compact_real_jet_neighborhood hF K + (fun p hp => h.determinant p (hKΩ hp)) (fun p hp => h.good p (hKΩ hp)) + obtain ⟨D,hD,hd⟩ := compact_real_reconstruction_bounds hU admissibleRealJets_domain hQ hQa m + refine ⟨ε,D,hε,hD,?_⟩ + intro G s C hG hGF hs hC hb + exact hd G s C hs hC hG (fun p hp => hclose G hGF (hUK hp)) hb + +end ClosedSurfaceR4.RealModes + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRegularParameters.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRegularParameters.lean new file mode 100644 index 0000000000000000000000000000000000000000..6acd3756789881b95fa010d68919bc04e98519fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactRegularParameters.lean @@ -0,0 +1,50 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.FiniteRegularFibers + +namespace OAI + +/-! Compact-chart regular-value conditions are open as well as dense. +This permits independent radius parameters in a finite product. -/ +noncomputable section +open Set MeasureTheory +open scoped ContDiff +namespace ClosedSurfaceR4.PublishedInputs + +def compactRegularValues (f : Plane → Plane) (K : Set Plane) : Set Plane := + {y | ∀ x ∈ K, f x = y → Function.Surjective (fderiv ℝ f x)} + +theorem compact_regular_values_open_dense (f : Plane → Plane) + (hf : ContDiff ℝ ∞ f) {K : Set Plane} (hK : IsCompact K) : + IsOpen (compactRegularValues f K) ∧ Dense (compactRegularValues f K) := by + let C : Set Plane := {x | ¬ Function.Surjective (fderiv ℝ f x)} + have heq : C = {x | (fderiv ℝ f x).det = 0} := by + ext x + change (¬ Function.Surjective (fderiv ℝ f x)) ↔ + LinearMap.det (fderiv ℝ f x).toLinearMap = 0 + rw [LinearMap.det_eq_zero_iff_ker_ne_bot, ne_eq, LinearMap.ker_eq_bot] + exact not_congr LinearMap.injective_iff_surjective.symm + have hC : IsClosed C := by + rw [heq] + exact isClosed_eq (ContinuousLinearMap.continuous_det.comp + (hf.continuous_fderiv (by simp))) continuous_const + have hbad : IsCompact (f '' (K ∩ C)) := (hK.inter_right hC).image hf.continuous + have hvalues : compactRegularValues f K = (f '' (K ∩ C))ᶜ := by + ext y + simp only [compactRegularValues,mem_ofPred_eq,mem_compl_iff,mem_image,mem_inter_iff,C] + constructor + · intro hy ⟨x,⟨hx,hc⟩,hxy⟩ + exact hc (hy x hx hxy) + · intro hy x hx hxy + by_contra hc + exact hy ⟨x,⟨hx,hc⟩,hxy⟩ + rw [hvalues] + refine ⟨hbad.isClosed.isOpen_compl,?_⟩ + have hnull : volume (f '' (K ∩ C)) = 0 := + measure_mono_null (image_mono inter_subset_right) (sardSurfaceInput 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/CompactSectionBounds.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSectionBounds.lean new file mode 100644 index 0000000000000000000000000000000000000000..60efbae151591c85760178a2ba59545d6a30e732 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSectionBounds.lean @@ -0,0 +1,79 @@ +import OAI.Geometry.SurfaceImmersion.Correction.GlobalBundleSmoothing +import OAI.Geometry.SurfaceImmersion.Correction.GlobalShiftedSmoothing + +namespace OAI + +/-! Every smooth input has finite bounds at each fixed atlas order. -/ +noncomputable section +open scoped ContDiff Manifold Topology + +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open Set Manifold Bundle WeightedEstimates +open JetPolynomial (Base) + +variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F] + +lemma compact_smooth_bound {f : Base → F} (hf : ContDiff ℝ ∞ f) + (hc : HasCompactSupport f) (m : ℕ) : + ∃ C : ℝ, 0 ≤ C ∧ WeightedBound univ 1 m C f := by + classical + have hb (j : ℕ) : ∃ C : ℝ, ∀ x, ‖iteratedFDeriv ℝ j f x‖ ≤ C := + (hc.iteratedFDeriv j).exists_bound_of_continuous (hf.continuous_iteratedFDeriv (by simp)) + choose C hC using hb + refine ⟨∑ j ∈ Finset.range (m + 1), |C j|, Finset.sum_nonneg (fun _ _ => abs_nonneg _), ?_⟩ + intro j hj x _ + simp only [one_pow, one_mul, iteratedFDerivWithin_univ] + exact ((hC j x).trans (le_abs_self _)).trans + (Finset.single_le_sum (s := Finset.range (m + 1)) (a := j) + (fun k _ => abs_nonneg (C k)) (Finset.mem_range.mpr (by omega))) + +variable {M : Type*} [TopologicalSpace M] [ChartedSpace Plane M] + [IsManifold planeModel ∞ M] [CompactSpace M] + +namespace SmoothingAtlas +variable (A : SmoothingAtlas M) + +/-- Arbitrarily high map norms are finite; no uniform high-order input bound +is required for the eventual waiting argument. -/ +theorem exists_shifted_bound (q m : ℕ) {f : M → F} + (hf : ContMDiff planeModel 𝓘(ℝ, F) ∞ f) : + ∃ C : ℝ, 0 ≤ C ∧ A.ShiftedBound q m 1 C f := by + classical + choose C hC hb using fun i : A.centers => compact_smooth_bound + (localize_smooth (i : M) (A.weight_smooth i) (A.weight_support i) hf) + (localize_compact (i : M) (A.weight_support i) f) (q + m) + refine ⟨∑ i : A.centers, C i, Finset.sum_nonneg (fun i _ => hC i), ?_⟩ + intro i j hj x + have h := hb i j hj x (mem_univ x) + simp only [one_pow, one_mul, iteratedFDerivWithin_univ] at h ⊢ + exact h.trans (Finset.single_le_sum (fun i _ => hC i) (Finset.mem_univ i)) + +variable {E : M → Type*} [∀ x, TopologicalSpace (E x)] + [∀ x, AddCommGroup (E x)] [∀ x, Module ℝ (E x)] + [TopologicalSpace (TotalSpace F E)] [FiberBundle F E] [VectorBundle ℝ F E] + [ContMDiffVectorBundle ∞ F E planeModel] +variable (e : A.centers → Trivialization F (TotalSpace.proj : TotalSpace F E → M)) + [∀ i, MemTrivializationAtlas (e i)] +variable (hdomain : ∀ i : A.centers, (chart (i : M)).source ⊆ (e i).baseSet) +include hdomain + +/-- Smooth tensor inputs likewise have finite localized bounds at every +fixed order, even when their high derivatives are large. -/ +theorem exists_bundle_bound (m : ℕ) {u : ∀ x, E x} + (hu : ContMDiff planeModel (planeModel.prod 𝓘(ℝ, F)) ∞ + (fun x => TotalSpace.mk' F x (u x))) : + ∃ C : ℝ, 0 ≤ C ∧ A.BundleWeightedBound e 1 m C u := by + classical + choose C hC hb using fun i : A.centers => compact_smooth_bound + (A.bundleLocalize_smooth e hdomain i hu) + (localize_compact (i : M) (A.weight_support i) _) m + refine ⟨∑ i : A.centers, C i, Finset.sum_nonneg (fun i _ => hC i), ?_⟩ + intro i + exact (hb i).mono_const (Finset.single_le_sum (fun i _ => hC i) (Finset.mem_univ i)) + +end SmoothingAtlas +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSingletonFiber.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSingletonFiber.lean new file mode 100644 index 0000000000000000000000000000000000000000..affa18a6fbf83fc6f9ba1e988a2a680258ae5544 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSingletonFiber.lean @@ -0,0 +1,31 @@ +import Mathlib.Topology.Separation.Hausdorff + +namespace OAI + +/-! A compact map with a singleton fiber detects convergence at that +fiber. This extends lifted double arcs to their diagonal endpoints. -/ +noncomputable section +open Set Filter Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +variable {X Y A : Type*} [TopologicalSpace X] [CompactSpace X] + [TopologicalSpace Y] [T2Space Y] + +theorem tendsto_of_comp_singleton_fiber {f : X → Y} (hf : Continuous f) {x : X} + (hfiber : ∀ z, f z = f x → z = x) {l : Filter A} {g : A → X} + (h : Tendsto (f ∘ g) l (𝓝 (f x))) : Tendsto g l (𝓝 x) := by + apply tendsto_nhds.mpr + intro U hU hxU + have hclosed : IsClosed (f '' Uᶜ) := (hU.isClosed_compl.isCompact.image hf).isClosed + have hx : f x ∈ (f '' Uᶜ)ᶜ := by + rintro ⟨z,hz,he⟩ + exact hz ((hfiber z he) ▸ hxU) + have hevent := h (hclosed.isOpen_compl.mem_nhds hx) + filter_upwards [hevent] with a ha + by_contra hn + exact ha ⟨g a,hn,rfl⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSlopeNormal.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSlopeNormal.lean new file mode 100644 index 0000000000000000000000000000000000000000..e6d227460aab2fbc1bb49c7bab57c81c38912fe8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSlopeNormal.lean @@ -0,0 +1,66 @@ +import OAI.Geometry.SurfaceImmersion.Primitive.CompactCrossingNormal +import OAI.Geometry.SurfaceImmersion.Primitive.CrossingInvariantScaling + +namespace OAI + +/-! Construct the actual preferred normal from the slope-coordinate +estimates, retaining both ordered invariants in the original directions. -/ +noncomputable section +open Set +open scoped ContDiff Matrix +namespace ClosedSurfaceR4.GeometryPreservation +open SmallModes RealModes NormalFrame VelocityFrame +variable {ι κ : Type*} [Fintype ι] [DecidableEq ι] [Fintype κ] + +theorem compact_slope_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)) + (hv : ∀ i, (Y (left i) (x i)).1 ≠ 0 ∧ (Y (right i) (x i)).1 ≠ 0) + (d : ℝ) (hd : ∀ i, |(Y (left i) (x i)).2/(Y (left i) (x i)).1| ≤ d ∧ + |(Y (right i) (x i)).2/(Y (right i) (x i)).1| ≤ d) + (curv : Base → ℝ) + (hcross : ∀ i, ∀ r s : ℝ, |r| ≤ d → |s| ≤ d → + 0 < orderedCrossing F (1,r) (1,s) (x i) (curv (x i)) ∧ + 0 < orderedCrossing F (1,s) (1,r) (x i) (curv (x i)) ∧ + ((0 < realSecondForm F (1,r) (1,r) (x i) ⬝ᵥ profilePreferred (realBoundaryProfile F z (x i)) ∧ + 0 < realSecondForm F (1,s) (1,s) (x i) ⬝ᵥ profilePreferred (realBoundaryProfile F z (x i))) ∨ + (0 < realSecondForm F (1,r) (1,r) (x i) ⬝ᵥ realSecondForm F (1,s) (1,s) (x i) ∧ + ∃ w : Vec, profilePreferred (realBoundaryProfile F z (x i)) ⬝ᵥ w = 0 ∧ + 0 < realSecondForm F (1,r) (1,r) (x i) ⬝ᵥ w ∧ + 0 < realSecondForm F (1,s) (1,s) (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 < orderedCrossing F (Y (left i) (x i)) (Y (right i) (x i)) (x i) (curv (x i)) ∧ + 0 < orderedCrossing F (Y (right i) (x i)) (Y (left i) (x i)) (x i) (curv (x 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 + have hdata (i : ι) := hcross i _ _ (hd i).1 (hd i).2 + obtain ⟨U,hU,hTU,g,hg,hunit,hnormal,hout,havoid',hpos⟩ := compact_actual_crossing_normal + hF z hV hreg Y hY left right x hxinj hxT hxV C hC honly havoid + (fun i => crossing_choice_firstSlope hF (x i) (profilePreferred (realBoundaryProfile F z (x i))) + _ _ (hv i).1 (hv i).2 (hdata i).2.2) + refine ⟨U,hU,hTU,g,hg,hunit,hnormal,hout,havoid',?_⟩ + intro i + have hp := mul_pos (sq_pos_of_ne_zero (hv i).1) (sq_pos_of_ne_zero (hv i).2) + refine ⟨?_,?_,(hpos i).1,(hpos i).2⟩ + · rw [orderedCrossing_firstSlope hF _ _ _ _ (hv i).1 (hv i).2] + exact mul_pos hp (hdata i).1 + · rw [orderedCrossing_firstSlope hF _ _ _ _ (hv i).2 (hv i).1] + exact mul_pos (by simpa [mul_comm] using hp) (hdata i).2.1 + +end ClosedSurfaceR4.GeometryPreservation + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSurfaceImmersionStability.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSurfaceImmersionStability.lean new file mode 100644 index 0000000000000000000000000000000000000000..f23ab84eb9e6e7858a55cd48789efafea6b538c8 --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactSurfaceImmersionStability.lean @@ -0,0 +1,74 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactTranslationImmersion +import OAI.Geometry.SurfaceImmersion.Whitney.CompactSurfacePairStability + +namespace OAI + +/-! Immersion on a compact part of the surface is preserved by small +parameters in a fixed smooth scalar translation family. -/ +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_immersion_stability + {f : M → ProjectionTarget 3} {χ : M → ℝ} + (hf : ContMDiff planeModel 𝓘(ℝ,ProjectionTarget 3) ∞ f) + (hχ : ContMDiff planeModel 𝓘(ℝ) ∞ χ) + {K : Set M} (hK : IsCompact K) + (hI : ∀ x ∈ K, Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) f x)) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ x ∈ K, + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (surfaceTranslation f χ a) x) := by + classical + have hlocal (z : K) : ∃ (V : Set M) (δ : ℝ), IsOpen V ∧ (z : M) ∈ V ∧ + 0 < δ ∧ ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ x ∈ K ∩ V, + Function.Injective (mfderiv planeModel 𝓘(ℝ,ProjectionTarget 3) (surfaceTranslation f χ a) x) := by + obtain ⟨U₁,F,hU₁,hzU₁,hU₁s,hF,heF⟩ := surface_chart_representative hf z.val + obtain ⟨U₂,ρ,hU₂,hzU₂,hU₂s,hρ,heρ⟩ := scalar_surface_chart_representative hχ z.val + let U := U₁ ∩ U₂ + have hU : IsOpen U := hU₁.inter hU₂ + obtain ⟨T,hT,hzT,hTU⟩ := exists_compact_subset hU ⟨hzU₁,hzU₂⟩ + have hKT : IsCompact (K ∩ T) := hK.inter hT + have hs : K ∩ T ⊆ (chart z.val).source := fun x hx => hU₁s (hTU hx.2).1 + have hKc : IsCompact ((chart z.val) '' (K ∩ T)) := + hKT.image_of_continuousOn ((chart z.val).continuousOn.mono hs) + have hIc : ∀ y ∈ (chart z.val) '' (K ∩ T), Function.Injective (fderiv ℝ F y) := by + rintro y ⟨x,hx,rfl⟩ + exact (chart_germ_immersion_iff z.val (hs hx) hF + (heF.eventuallyEq_of_mem (hU₁.mem_nhds (hTU hx.2).1))).mp (hI x hx.1) + obtain ⟨δ,hδ,hstable⟩ := compact_translation_immersion hF hρ hKc hIc + refine ⟨interior T,δ,isOpen_interior,hzT,hδ,?_⟩ + intro a ha x hx + have hxT := interior_subset hx.2 + have hxU := hTU hxT + apply (chart_germ_immersion_iff z.val (hU₁s hxU.1) (hF.add (hρ.smul contDiff_const)) + (surface_translation_chart_germ z.val + (heF.eventuallyEq_of_mem (hU₁.mem_nhds hxU.1)) + (heρ.eventuallyEq_of_mem (hU₂.mem_nhds hxU.2)) a)).mpr + exact hstable a ha (chart z.val x) ⟨x,⟨hx.1,hxT⟩,rfl⟩ + choose V δ hV hzV hδ hδI using hlocal + have hcover : K ⊆ ⋃ z : K, V z := fun z hz => mem_iUnion.mpr ⟨⟨z,hz⟩,hzV ⟨z,hz⟩⟩ + obtain ⟨s,hs⟩ := hK.elim_finite_subcover V hV 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 x hx + obtain ⟨i,hi,hxi⟩ := mem_iUnion₂.mp (hs hx) + exact hδI i a (ha.trans_le (hεs i hi)) x ⟨hx,hxi⟩ + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI diff --git a/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationImmersion.lean b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationImmersion.lean new file mode 100644 index 0000000000000000000000000000000000000000..2fde9c201d6b61d56386170765fd0f43586d04fe --- /dev/null +++ b/lean/OAI/Geometry/SurfaceImmersion/Geometry/CompactTranslationImmersion.lean @@ -0,0 +1,44 @@ +import OAI.Geometry.SurfaceImmersion.Geometry.CompactTranslationStability +import OAI.Geometry.SurfaceImmersion.Geometry.C1ImmersionJets + +namespace OAI + +/-! Small scalar-weighted translations preserve immersion on compact +coordinate domains. -/ +noncomputable section +open Set Metric +open scoped ContDiff Topology +namespace ClosedSurfaceR4.FiniteOrderSmoothing +open JetPolynomial (Base) +local instance injectiveScalarNormed : NormedAddCommGroup (Base →L[ℝ] ℝ) := inferInstance +local instance injectiveScalarSpace : NormedSpace ℝ (Base →L[ℝ] ℝ) := inferInstance + +theorem compact_translation_immersion {f : Base → ProjectionTarget 3} {χ : Base → ℝ} + (hf : ContDiff ℝ ∞ f) (hχ : ContDiff ℝ ∞ χ) + {K : Set Base} (hK : IsCompact K) + (hI : ∀ x ∈ K, Function.Injective (fderiv ℝ f x)) : + ∃ δ > 0, ∀ a : ProjectionTarget 3, ‖a‖ < δ → ∀ x ∈ K, + Function.Injective (fderiv ℝ (fun y => f y+χ y • a) 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) + obtain ⟨M,hM⟩ := hK.exists_bound_of_continuousOn (hχ.continuous_fderiv (by simp)).continuousOn + let B := max M 0+1 + have hB : 0 < B := by dsimp [B]; linarith [le_max_right M 0] + refine ⟨ε/B,div_pos hε hB,?_⟩ + intro a ha x hx + apply hstable (fderiv ℝ f x) ⟨x,hx,rfl⟩ + 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 hbound : ‖fderiv ℝ χ x‖ ≤ B := (hM x hx).trans (by dsimp [B]; linarith [le_max_left M 0]) + calc + _ ≤ B*‖a‖ := mul_le_mul_of_nonneg_right hbound (norm_nonneg a) + _ < ε := by simpa only [mul_comm] using (lt_div_iff₀ hB).mp ha + +end ClosedSurfaceR4.FiniteOrderSmoothing + +end + +end OAI