import PoincareLib.Geometry.RicciFlow.Surgery.StandardCap.Existence.InitialMetric.SmoothInnerProduct import Mathlib.Analysis.LocallyConvex.Bounded import Mathlib.Geometry.Manifold.VectorBundle.Hom /-! # A smooth Riemannian metric from the cap profile The positive smooth bilinear field of Morgan-Tian Lemma 12.2, printed pp. 294-295, is packaged in the frozen `RiemannianMetric` type. This construction does not yet assert completeness, the curvature conditions or the cylindrical-end certificate of `StandardInitialMetric`. -/ set_option autoImplicit false open Bundle Bornology open scoped Manifold ContDiff Topology namespace PoincareMT.M34 /-- The Cartesian bilinear form viewed on the actual tangent fibers of the standard cap (Lemma 12.2, pp. 294-295). -/ noncomputable def capMetricInnerTangent (a : ℝ) (x : StandardCapSpace) : TangentSpace (𝓑 3) x β†’L[ℝ] TangentSpace (𝓑 3) x β†’L[ℝ] ℝ := capMetricInner a x /-- The unit ball of the cap's positive form is bounded in the given tangent topology (Lemma 12.2, pp. 294-295). -/ theorem capMetricInner_isVonNBounded {a : ℝ} (ha : 0 ≀ a) (hapi : a ≀ Real.pi / 2) (x : StandardCapSpace) : IsVonNBounded ℝ {v : StandardCapSpace | capMetricInner a x v v < 1} := by let c := capAngularCoefficient a β€–xβ€– have hc : 0 < c := capAngularCoefficient_pos ha hapi (norm_nonneg x) apply (NormedSpace.isVonNBounded_ball ℝ StandardCapSpace (Real.sqrt (1 / c) + 1)).subset intro v hv have hnonneg := mul_nonneg (capRadialCoefficient_nonneg ha hapi (norm_nonneg x)) (mul_self_nonneg (inner ℝ x v)) have hbound : c * β€–vβ€– ^ 2 < 1 := by change capMetricInner a x v v < 1 at hv rw [capMetricInner_apply, real_inner_self_eq_norm_sq] at hv linarith have hsq : β€–vβ€– ^ 2 < 1 / c := (lt_div_iffβ‚€ hc).mpr (by linarith) have hroot := Real.sq_sqrt (show 0 ≀ 1 / c by positivity) have hrootnonneg := Real.sqrt_nonneg (1 / c) rw [Metric.mem_ball, dist_zero_right] nlinarith [norm_nonneg v] /-- Smoothness as a section of the actual tangent bilinear-form bundle, using the identity model-space trivializations (Lemma 12.2, pp. 294-295). -/ theorem capMetricInner_contMDiff {a : ℝ} (ha : 0 < a) : ContMDiff (𝓑 3) ((𝓑 3).prod π“˜(ℝ, StandardCapSpace β†’L[ℝ] StandardCapSpace β†’L[ℝ] ℝ)) ∞ (fun x => TotalSpace.mk' (StandardCapSpace β†’L[ℝ] StandardCapSpace β†’L[ℝ] ℝ) x (E := fun x => TangentSpace (𝓑 3) x β†’L[ℝ] TangentSpace (𝓑 3) x β†’L[ℝ] ℝ) (capMetricInnerTangent a x)) := by intro x refine Bundle.contMDiffAt_totalSpace.mpr ⟨contMDiffAt_id, ?_⟩ have h := (contMDiff_iff_contDiff.mpr (capMetricInner_contDiff ha)).contMDiffAt (x := x) convert! h using 1 ext y u v simp only [hom_trivializationAt_apply, ContinuousLinearMap.inCoordinates, TangentBundle.symmL_model_space, ContinuousLinearMap.comp_apply] have hy : y ∈ (trivializationAt (StandardCapSpace β†’L[ℝ] ℝ) (fun z => TangentSpace (𝓑 3) z β†’L[ℝ] ℝ) x).baseSet := by rw [hom_trivializationAt_baseSet, TangentBundle.trivializationAt_baseSet] exact ⟨Set.mem_univ y, Set.mem_univ y⟩ rw [Trivialization.continuousLinearMapAt_apply_of_mem ℝ _ hy] have ht : trivializationAt ℝ (Bundle.Trivial StandardCapSpace ℝ) x = Bundle.Trivial.trivialization StandardCapSpace ℝ := Bundle.Trivial.eq_trivialization _ _ _ simp only [hom_trivializationAt_apply, ContinuousLinearMap.inCoordinates, ht, Bundle.Trivial.continuousLinearMapAt_trivialization, TangentBundle.symmL_model_space, ContinuousLinearMap.comp_apply, ContinuousLinearMap.id_apply, capMetricInnerTangent] rfl /-- The smooth positive cap metric built from a positive cutoff parameter before `pi/2` (Lemma 12.2, pp. 294-295). Its geometric certificates are proved separately against the frozen contract. -/ noncomputable def capRiemannianMetric (a : ℝ) (ha : 0 < a) (hapi : a ≀ Real.pi / 2) : RiemannianMetric 3 StandardCapSpace where inner := capMetricInnerTangent a symm := capMetricInner_symm a pos := capMetricInner_pos ha.le hapi isVonNBounded := capMetricInner_isVonNBounded ha.le hapi contMDiff := capMetricInner_contMDiff ha end PoincareMT.M34