import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Finite.CurrentTraces /-! Source derivatives of the genuine finite-regularity current agree with its curve pairings on interior slices. Source: MT Lemma 19.15, pp. 447-449; finite-conormal-variation derivation. -/ noncomputable section set_option autoImplicit false set_option warningAsError true set_option backward.isDefEq.respectTransparency false open Set Filter Bundle open scoped Manifold ContDiff Topology namespace PoincareMT variable {n : โ„•} {M : Type*} [TopologicalSpace M] [ChartedSpace (EuclideanSpace โ„ (Fin n)) M] [IsManifold (๐“ก n) โˆž M] /-- The actual current derivative along a constant source-direction slice is the derivative of its intrinsic curve pairing. All differential hypotheses concern the base map or the current, not spatial second derivatives of the full motion. Source: Morgan--Tian (2007), Lemma 19.15 and Corollary 19.16, pp. 447-449; project derivation `proof-work/tasks/M64/reports/2026-09-27-annulus-energy-and-finite-variation-derivation.md`. -/ theorem m64FiniteAnnulusCurrent_along_slice_hasDerivAt (g : RiemannianMetric n M) {v : โ„ โ†’ LoopPlane โ†’ M} {ell : โ„ โ†’ LoopPlane} {x : โ„} (i : Fin 2) (hJ : DifferentiableAt โ„ (m64FiniteAnnulusCurrent g v i) (ell x)) (hell : โˆ€ y, HasDerivAt ell (EuclideanSpace.basisFun (Fin 2) โ„ i) y) (hinside : โˆ€แถ  y in ๐“ x, ell y โˆˆ interior m64AnnulusDomain) (hbase : โˆ€แถ  y in ๐“ x, MDifferentiableAt (๐“ก 2) (๐“ก n) (v 0) (ell y)) : HasDerivAt (fun y => g.inner (v 0 (ell y)) (curveVelocity (fun s => v s (ell y)) 0) (curveVelocity (fun z => v 0 (ell z)) y)) (fderiv โ„ (m64FiniteAnnulusCurrent g v i) (ell x) (EuclideanSpace.basisFun (Fin 2) โ„ i)) x := by have hd := hJ.hasFDerivAt.comp_hasDerivAt x (hell x) apply hd.congr_of_eventuallyEq filter_upwards [hinside, hbase] with y hy hby have hline : mfderiv ๐“˜(โ„, โ„) (๐“ก 2) ell y 1 = EuclideanSpace.basisFun (Fin 2) โ„ i := by rw [mfderiv_eq_fderiv, (hell y).hasFDerivAt.fderiv] exact ContinuousLinearMap.toSpanSingleton_apply_one โ„ _ have hchain := mfderiv_comp_apply y hby (hell y).differentiableAt.mdifferentiableAt (1 : โ„) rw [hline] at hchain have hvel : curveVelocity (n := n) (fun z => v 0 (ell z)) y = mfderiv (๐“ก 2) (๐“ก n) (v 0) (ell y) (EuclideanSpace.basisFun (Fin 2) โ„ i) := hchain rw [hvel] exact (m64FiniteAnnulusCurrent_eq_pairing g v i hy).symm end PoincareMT