import PoincareLib.Geometry.CurveShortening.Comparison.PolygonApproximation.Lipschitz.AnnulusAdapter /-! # Local polygon-cell agreement At an interior point of a polygon cell, the concatenated polygon agrees on a whole neighbourhood with the corresponding translated minimizing side. The neighbourhood form is the interface needed to transport derivatives of the smooth interpolator extension to the assembled annulus map. 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 Filter MeasureTheory Bundle open scoped Manifold ContDiff Topology Bundle ENNReal NNReal universe u namespace PoincareMT variable {n : โ„•} {M : Type u} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] /-- Inside a polygon cell the actual map agrees on a neighborhood with its translated side. 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_polygon_map_eventuallyEq_side_of_cell_interior {g : RiemannianMetric n M} {D : LeviCivitaData g} {N : โ„•} (polygon : M63GeodesicPolygon g D N) (j : Fin N) {x : LoopPlane} (hx : x โˆˆ interior (m64PolygonCellSet j)) : โˆ€แถ  p in ๐“ x, polygon.map (p 0) = (polygon.side j).map (p 0 - m63CellLeft N j) := by have hnhds : โˆ€แถ  p in ๐“ x, p โˆˆ interior (m64PolygonCellSet j) := isOpen_interior.mem_nhds hx filter_upwards [hnhds] with p hp have hpcell : p โˆˆ m64PolygonCellSet j := interior_subset hp have hs : p 0 - m63CellLeft N j โˆˆ Icc (0 : โ„) (m63CellLength N) := by change m63CellLeft N j โ‰ค p 0 โˆง p 0 โ‰ค m63CellLeft N j + m63CellLength N โˆง 0 โ‰ค p 1 โˆง p 1 โ‰ค 1 at hpcell constructor ยท exact sub_nonneg.mpr hpcell.1 ยท linarith [hpcell.2.1] have hc := polygon.cell_agreement j (p 0 - m63CellLeft N j) hs convert hc using 1 ring_nf /-- Inside a cell the actual interpolator agrees on a neighborhood with its smooth side extension. 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_map_eventuallyEq_cell_extension {g : RiemannianMetric n M} {D : LeviCivitaData g} {N : โ„•} (polygon : M63GeodesicPolygon g D N) {gamma : โ„ โ†’ M} {H : โ„ ร— (M ร— M) โ†’ M} (j : Fin N) {x : LoopPlane} (hx : x โˆˆ interior (m64PolygonCellSet j)) : (fun p : LoopPlane => H (p 1, gamma (p 0), polygon.map (p 0))) =แถ [๐“ x] (fun p : LoopPlane => H (p 1, gamma (p 0), (polygon.side j).map (p 0 - m63CellLeft N j))) := by filter_upwards [m64_polygon_map_eventuallyEq_side_of_cell_interior polygon j hx] with p hp rw [hp] end PoincareMT