import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.GeometryImports import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Analysis.Coordinates.MetricEndRayChord import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Angles.Limits.SelectedEndRayChordLimits import PoincareLib.Geometry.RicciFlow.Generalized.BoundedDistance.Cone.Limits.SelectedChordPacking /-! # The actual selected end has a compact completed chord link The missing-end comparison first produces the joint limits and the source-derived pseudometric. Actual selected-sphere packing then proves total boundedness and compactness of its standard completion. All distance-limit and end-germ readouts of the same metric are retained. Source: Morgan--Tian Lemmas 10.21-10.22 and Corollary 10.28, pp. 259-262; M28 derivations 152b and 155. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Filter open scoped Manifold ContDiff Bundle Topology ENNReal universe u namespace PoincareMT.M28 variable {M : Type u} [TopologicalSpace M] [T2Space M] [ChartedSpace (EuclideanSpace ℝ (Fin 3)) M] [IsManifold (𝓑 3) ∞ M] [MeasurableSpace M] [BorelSpace M] [T3Space M] {g : RiemannianMetric 3 M} {X : Set M} /-- The actual original-region geometry produces a chord pseudometric whose completion is compact, retaining all source-distance and germ readouts. No chord limit, sphere crossing, packing or link compactness is an input to this theorem. Source: Corollary 10.28; derivation 155. -/ theorem exists_compact_selected_end_chord_link (T : EpsilonTubeCertificate g X) (A : OpenCylinderModel T.carrier) (U : TopologicalSpace.Opens M) [PreconnectedSpace U] (hU : (U : Set M) = A.tail true (1 / 2)) (hA : SmoothSphereIsotopicIn T.carrier A.middleSphere T.cylinder.middleSphere) (R : M β†’ ℝ) (hR : ContinuousOn R T.carrier) (hratio : βˆ€ i ∈ T.chain.shape.active, βˆ€ y ∈ (T.chain.neck i).carrier, βˆ€ z ∈ (T.chain.neck i).carrier, R y ≀ 2 * R z) (hdiverge : βˆ€ B : ℝ, βˆƒ d : ℝ, 1 / 2 < d ∧ d < 1 ∧ βˆ€ x ∈ T.carrier, d < (A.inverse x).2 β†’ B < R x) (f : M β†’ ℝ) (hfinite : βˆ€ p q : U, intrinsicEDist g (U : Set M) (p : M) (q : M) β‰  ⊀) (D : LeviCivitaData (intrinsicOpenMetric g U)) (hsec : D.NonnegativeSectionalCurvature) : letI := intrinsicOpenMetricSpace g U hfinite βˆ€ (E : UniformSpace.Completion U) (alpha : ℝ), E βˆ‰ range ((↑) : U β†’ UniformSpace.Completion U) β†’ 0 < alpha β†’ (βˆ€ eta : ℝ, 0 < eta β†’ βˆƒ c : ℝ, 1 / 2 < c ∧ c < 1 ∧ βˆ€ x : U, c < (A.inverse x).2 β†’ dist (x : UniformSpace.Completion U) E < eta) β†’ (βˆ€ x : U, dist (x : UniformSpace.Completion U) E < alpha β†’ 0 < f x) β†’ (βˆ€ p q : U, 0 < f p β†’ 0 < f q β†’ βˆƒ mu : ℝ β†’ U, mu 0 = p ∧ mu 1 = q ∧ Continuous mu ∧ (βˆ€ t : ℝ, (3 / 4 : ℝ) ≀ (A.inverse (mu t)).2) ∧ βˆ€ s ∈ Icc (0 : ℝ) 1, βˆ€ t ∈ Icc (0 : ℝ) 1, (intrinsicOpenMetric g U).edist (mu s) (mu t) = ENNReal.ofReal |s - t| * (intrinsicOpenMetric g U).edist p q) β†’ βˆƒ m : PseudoMetricSpace (MetricEndRay E alpha), letI := m TotallyBounded (univ : Set (MetricEndRay E alpha)) ∧ CompactSpace (UniformSpace.Completion (MetricEndRay E alpha)) ∧ (βˆ€ P Q : MetricEndRay E alpha, dist P Q ≀ 2) ∧ (βˆ€ P Q : MetricEndRay E alpha, Tendsto (fun p : ℝ Γ— ℝ => chordDefect (fun s t => dist (P.point s) (Q.point t)) p.1 p.2) ((𝓝[>] (0 : ℝ)) Γ—Λ’ (𝓝[>] (0 : ℝ))) (𝓝 (dist P Q ^ 2))) ∧ (βˆ€ P Q : MetricEndRay E alpha, Tendsto (fun h : ℝ => dist (P.point h) (Q.point h) / h) (𝓝[>] (0 : ℝ)) (𝓝 (dist P Q))) ∧ (βˆ€ P Q : MetricEndRay E alpha, βˆ€ r s : ℝ, 0 < r β†’ 0 < s β†’ Tendsto (fun h : ℝ => dist (P.point (h * r)) (Q.point (h * s)) / h) (𝓝[>] (0 : ℝ)) (𝓝 (Real.sqrt ((r - s) ^ 2 + r * s * dist P Q ^ 2)))) ∧ (βˆ€ P Q : MetricEndRay E alpha, βˆ€ s ∈ Ioo (0 : ℝ) P.length, βˆ€ t ∈ Ioo (0 : ℝ) Q.length, chordDefect (fun u v => dist (P.point u) (Q.point v)) s t ≀ dist P Q ^ 2) ∧ βˆ€ P Q : MetricEndRay E alpha, dist P Q = 0 ↔ MetricEndRay.SameEndGerm P Q := by let := intrinsicOpenMetricSpace g U hfinite intro E alpha houtside halpha htail hbarrier hsegments obtain ⟨K, hK, hupper, hlimit⟩ := exists_selected_end_ray_chord_limits T A U hU f hfinite D hsec E alpha halpha htail hbarrier hsegments obtain ⟨m, hm⟩ := exists_metricEndRay_chord_pseudometric E alpha K hK hupper hlimit refine ⟨m, ?_⟩ let := m obtain ⟨hdiam, hjoint, hequal, hfixed, hstrict, hzero⟩ := hm have htotally := totallyBounded_selected_end_ray_chord T A U hU hA R hR hratio hdiverge f hfinite E alpha houtside halpha htail hbarrier hsegments m hjoint exact ⟨htotally, UniformSpace.Completion.compactSpace_of_totallyBounded_univ htotally, hdiam, hjoint, hequal, hfixed, hstrict, hzero⟩ end PoincareMT.M28