import Mathlib.Geometry.Manifold.ContMDiffMFDeriv /-! # Smooth within derivatives applied to a fixed source vector The velocity-regularity step in Morgan-Tian Lemma 6.8, pp. 108-109. Unique derivatives on the source set suffice; no open-domain extension is used to prove smoothness of the bundled tangent derivative. -/ set_option autoImplicit false open scoped Manifold ContDiff Bundle variable {š•œ E E' H M : Type*} [NontriviallyNormedField š•œ] [NormedAddCommGroup E] [NormedSpace š•œ E] [NormedAddCommGroup E'] [NormedSpace š•œ E'] [TopologicalSpace H] {I : ModelWithCorners š•œ E' H} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I 1 M] {U : Set E} {α : E → M} {m k : ā„•āˆžĻ‰} /-- Applying the within derivative to a constant source vector preserves smoothness with one derivative lost, as used in Lemma 6.8, pp. 108-109. -/ theorem ContMDiffOn.contMDiffOn_mfderivWithin_const_apply (hα : ContMDiffOn (š“˜(š•œ, E)) I m α U) (hU : UniqueDiffOn š•œ U) (v : E) (hkm : k + 1 ≤ m) : ContMDiffOn (š“˜(š•œ, E)) I.tangent k (fun s => Bundle.TotalSpace.mk' E' (α s) (mfderivWithin (š“˜(š•œ, E)) I α U s v)) U := by have hv : ContMDiff (š“˜(š•œ, E)) (š“˜(š•œ, E)).tangent k (fun s : E => (⟨s, v⟩ : TangentBundle (š“˜(š•œ, E)) E)) := by apply contMDiff_vectorSpace_iff_contDiff.mpr exact contDiff_const exact (hα.contMDiffOn_tangentMapWithin hkm hU.uniqueMDiffOn).comp hv.contMDiffOn (fun _ hs => hs)