import PoincareLib.Geometry.CurveShortening.Comparison.Compatibility.SourceNames import PoincareLib.Geometry.CurveShortening.Ramp.Approximation.Two.EndpointMinimizingInterpolator import PoincareLib.Topology.Homotopy.LoopSpace.Contraction.LocalTangentMap import PoincareLib.Geometry.Riemannian.LoopSpace.Area.BundleCompactness /-! # Compact bounds for interpolator endpoint derivatives The smooth interpolator derivative is evaluated on pairs of bounded tangent vectors over a compact pair domain. The compact metric ball-bundle service from M58 yields one horizontal derivative bound before the polygon mesh is chosen. Morgan--Tian context: Section 19.4, Definition 19.18 and Claims 19.19-19.22, printed pp. 450-453. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Bundle open scoped Manifold ContDiff Topology Bundle ENNReal universe u namespace PoincareMT variable {n : β„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓑 n) ∞ M] /-- The pair of endpoint tangent vectors defines a continuous tangent input with zero time component. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ theorem m64_continuous_endpoint_tangent_input : Continuous (fun v : ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M) => (⟨(v.1, v.2.1.proj, v.2.2.proj), (0, v.2.1.2, v.2.2.2)⟩ : TangentBundle (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (ℝ Γ— (M Γ— M)))) := by have ht : Continuous (fun v : ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M) => (⟨v.1, 0⟩ : TangentBundle π“˜(ℝ, ℝ) ℝ)) := (tangentBundleModelSpaceHomeomorph π“˜(ℝ, ℝ)).symm.continuous.comp (continuous_fst.prodMk continuous_const) have hp : Continuous (fun v : ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M) => (⟨(v.2.1.proj, v.2.2.proj), (v.2.1.2, v.2.2.2)⟩ : TangentBundle ((𝓑 n).prod (𝓑 n)) (M Γ— M))) := (contMDiff_equivTangentBundleProd_symm (I := 𝓑 n) (I' := 𝓑 n) (M := M) (M' := M) (n := 0)).continuous.comp continuous_snd exact (contMDiff_equivTangentBundleProd_symm (I := π“˜(ℝ, ℝ)) (I' := (𝓑 n).prod (𝓑 n)) (M := ℝ) (M' := M Γ— M) (n := 0)).continuous.comp (ht.prodMk hp) /-- Bound endpoint derivatives uniformly over a compact pair domain and bounded tangent vectors. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ theorem m64_exists_interpolator_endpoint_bound [T2Space M] (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) (H : ℝ Γ— (M Γ— M) β†’ M) {L : Set (M Γ— M)} (hL : IsCompact L) (hH : βˆ€ x ∈ Icc (0 : ℝ) 1 Γ—Λ’ L, ContMDiffAt (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) 1 H x) (S : ℝ) : βˆƒ B : ℝ, 0 ≀ B ∧ βˆ€ x ∈ Icc (0 : ℝ) 1 Γ—Λ’ L, βˆ€ v : TangentSpace (𝓑 n) x.2.1, g.tangentNorm x.2.1 v ≀ S β†’ βˆ€ w : TangentSpace (𝓑 n) x.2.2, g.tangentNorm x.2.2 w ≀ S β†’ g.tangentNorm (H x) (mfderiv (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) H x (0, v, w)) ≀ B := by let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) M let : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨g.toRiemannianMetric⟩ let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ let D := mfderiv (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) H let Q : Set (TangentBundle (𝓑 n) M) := {v | v.proj ∈ (univ : Set M) ∧ β€–v.2β€– ≀ S} have hQ : IsCompact Q := Proofs.M58.isCompact_bundle_norm_le hcompact S let K : Set (ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M)) := (Icc (0 : ℝ) 1 Γ—Λ’ (Q Γ—Λ’ Q)) ∩ {v | (v.2.1.proj, v.2.2.proj) ∈ L} have hproj : Continuous (fun v : ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M) => (v.2.1.proj, v.2.2.proj)) := ((FiberBundle.continuous_proj (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n))).comp continuous_snd.fst).prodMk ((FiberBundle.continuous_proj (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n))).comp continuous_snd.snd) have hK : IsCompact K := (isCompact_Icc.prod (hQ.prod hQ)).inter_right (hL.isClosed.preimage hproj) have hc : ContinuousOn (fun v : ℝ Γ— (TangentBundle (𝓑 n) M Γ— TangentBundle (𝓑 n) M) => β€–D (v.1, v.2.1.proj, v.2.2.proj) (0, v.2.1.2, v.2.2.2)β€–) K := by intro v hv have hbase : (v.1, v.2.1.proj, v.2.2.proj) ∈ Icc (0 : ℝ) 1 Γ—Λ’ L := ⟨hv.1.1, hv.2⟩ exact (Proofs.M58.continuous_bundle_norm.continuousAt.comp ((Proofs.M58.continuousAt_tangentMap_of_contMDiffAt (hH _ hbase)).comp m64_continuous_endpoint_tangent_input.continuousAt)).continuousWithinAt obtain ⟨B, hB⟩ := hK.exists_bound_of_continuousOn hc refine ⟨max B 0, le_max_right _ _, ?_⟩ intro x hx v hv w hw have hmem : (x.1, (⟨x.2.1, v⟩ : TangentBundle (𝓑 n) M), (⟨x.2.2, w⟩ : TangentBundle (𝓑 n) M)) ∈ K := ⟨⟨hx.1, ⟨mem_univ _, hv⟩, ⟨mem_univ _, hw⟩⟩, hx.2⟩ exact (le_abs_self _).trans ((hB _ hmem).trans (le_max_left _ _)) /-- A compact inner short-pair tube supplies a uniform endpoint derivative bound. Source: Auxiliary step for MT Definition 19.18 and Claims 19.19/19.22, pp. 450-453; project construction in `proof-work/tasks/M64/reports/2026-09-23-static-polygon.md`. -/ theorem m64_interpolator_endpoint_bound_on_short_tube [T2Space M] (g : RiemannianMetric n M) (hcompact : IsCompact (univ : Set M)) {r : ℝ} (hr : 0 < r) (H : ℝ Γ— (M Γ— M) β†’ M) (hH : ContMDiffOn (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) ∞ H (Ioo (-1 : ℝ) 2 Γ—Λ’ {pq : M Γ— M | g.edist pq.1 pq.2 < ENNReal.ofReal r})) (S : ℝ) : βˆƒ B : ℝ, 0 ≀ B ∧ βˆ€ t ∈ Icc (0 : ℝ) 1, βˆ€ p q : M, g.edist p q ≀ ENNReal.ofReal (r / 2) β†’ βˆ€ v : TangentSpace (𝓑 n) p, g.tangentNorm p v ≀ S β†’ βˆ€ w : TangentSpace (𝓑 n) q, g.tangentNorm q w ≀ S β†’ g.tangentNorm (H (t, p, q)) (mfderiv (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) H (t, p, q) (0, v, w)) ≀ B := by let : CompactSpace M := isCompact_univ_iff.mp hcompact let : LocallyCompactSpace M := ChartedSpace.locallyCompactSpace (EuclideanSpace ℝ (Fin n)) M let : Bundle.RiemannianBundle (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨g.toRiemannianMetric⟩ let : IsContinuousRiemannianBundle (EuclideanSpace ℝ (Fin n)) (TangentSpace (𝓑 n) : M β†’ Type _) := ⟨⟨g.inner, g.contMDiff.continuous, fun _ _ _ => rfl⟩⟩ let : EMetricSpace M := EMetricSpace.ofRiemannianMetric (𝓑 n) M let L : Set (M Γ— M) := {pq | g.edist pq.1 pq.2 ≀ ENNReal.ofReal (r / 2)} have hdist : Continuous (fun pq : M Γ— M => g.edist pq.1 pq.2) := continuous_edist have hL : IsCompact L := (isClosed_le hdist continuous_const).isCompact have hU : IsOpen {pq : M Γ— M | g.edist pq.1 pq.2 < ENNReal.ofReal r} := isOpen_lt hdist continuous_const have hHAt : βˆ€ x ∈ Icc (0 : ℝ) 1 Γ—Λ’ L, ContMDiffAt (π“˜(ℝ, ℝ).prod ((𝓑 n).prod (𝓑 n))) (𝓑 n) 1 H x := by intro x hx have ht : x.1 ∈ Ioo (-1 : ℝ) 2 := by constructor <;> linarith [hx.1.1, hx.1.2] have hpq : g.edist x.2.1 x.2.2 < ENNReal.ofReal r := hx.2.trans_lt ((ENNReal.ofReal_lt_ofReal_iff hr).mpr (by linarith)) exact (hH.contMDiffAt ((isOpen_Ioo.prod hU).mem_nhds ⟨ht, hpq⟩)).of_le (m := 1) (by norm_num) obtain ⟨B, hB, hbound⟩ := m64_exists_interpolator_endpoint_bound g hcompact H hL hHAt S refine ⟨B, hB, ?_⟩ intro t ht p q hpq v hv w hw exact hbound (t, p, q) ⟨ht, hpq⟩ v hv w hw end PoincareMT