/- Copyright 2026 The Formal Conjectures Authors. Released under Apache 2.0 license as described in the file LICENSE. This file has been modified. -/ import Mathlib.Analysis.Calculus.InverseFunctionTheorem.FDeriv import Mathlib.Analysis.Calculus.FDeriv.Add import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.Normed.Module.FiniteDimension /-! # Split Derivative Normal Chart -/ namespace OAI.Analysis.Foundations.SplitDerivativeNormalChart noncomputable section open _root_.ContinuousLinearMap open _root_.HasStrictFDerivAt /-! # Normal coordinates from a split derivative A map with a split injective strict derivative extends to a local coordinate map by adding vectors in the kernel of a left inverse. This is an application of the inverse function theorem, not an assumed flattening equivalence. The zero-normal slice is exactly the original parametrization on the coordinate domain. Identifying that slice with an entire geometric support additionally requires a local embedding assertion. -/ open _root_.Topology namespace ContinuousLinearMap variable {๐•œ E F : Type*} [NontriviallyNormedField ๐•œ] [CompleteSpace ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] [FiniteDimensional ๐•œ E] [FiniteDimensional ๐•œ F] /-- Let `E,F` be finite-dimensional normed vector spaces over a complete nontrivially normed field `๐•œ`. If continuous linear maps `A: E โ†’ F` and `P: F โ†’ E` satisfy `P โˆ˜ A = id`, this continuous linear equivalence `E ร— ker(P) โ‰… F` sends `(v,n)` to `A(v)+n`. Its inverse sends `y` to `(P(y),y-A(P(y)))`. -/ def splitKernelEquiv (A : E โ†’L[๐•œ] F) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) : (E ร— P.ker) โ‰ƒL[๐•œ] F := LinearEquiv.toContinuousLinearEquiv { toFun := fun z => A z.1 + z.2 invFun := fun y => (P y, โŸจy - A (P y), by have hPA : P (A (P y)) = P y := DFunLike.congr_fun h (P y) change P (y - A (P y)) = 0 rw [map_sub, hPA, sub_self]โŸฉ) left_inv := by intro z have hPA : P (A z.1) = z.1 := DFunLike.congr_fun h z.1 have hz : P (z.2 : F) = 0 := z.2.property ext <;> simp [hPA, hz] right_inv := by intro y; dsimp; abel map_add' := by intros; simp only [Prod.fst_add, Prod.snd_add, map_add, Submodule.coe_add]; abel map_smul' := by intros; simp } @[simp] theorem splitKernelEquiv_apply (A : E โ†’L[๐•œ] F) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) (z : E ร— P.ker) : (splitKernelEquiv A) P h z = A z.1 + z.2 := rfl @[simp] theorem splitKernelEquiv_symm_fst (A : E โ†’L[๐•œ] F) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) (y : F) : (((splitKernelEquiv A) P h).symm y).1 = P y := rfl end ContinuousLinearMap namespace HasStrictFDerivAt variable {๐•œ E F : Type*} [NontriviallyNormedField ๐•œ] [CompleteSpace ๐•œ] [NormedAddCommGroup E] [NormedSpace ๐•œ E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace ๐•œ F] [FiniteDimensional ๐•œ E] [FiniteDimensional ๐•œ F] {f : E โ†’ F} {A : E โ†’L[๐•œ] F} {a : E} local instance splitNormalKernelComplete (P : F โ†’L[๐•œ] E) : CompleteSpace P.ker := FiniteDimensional.complete ๐•œ P.ker omit [CompleteSpace E] in /-- Adding normal vectors makes the split injective derivative invertible. -/ theorem add_kernel (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) : HasStrictFDerivAt (fun z : E ร— P.ker => f z.1 + z.2) ((SplitDerivativeNormalChart.ContinuousLinearMap.splitKernelEquiv A) P h).toContinuousLinearMap (a, 0) := by have h1 := hf.comp (a, (0 : P.ker)) (ContinuousLinearMap.fst ๐•œ E P.ker).hasStrictFDerivAt have h2 := P.ker.subtypeL.hasStrictFDerivAt.comp (a, (0 : P.ker)) (ContinuousLinearMap.snd ๐•œ E P.ker).hasStrictFDerivAt convert h1.add h2 using 1 <;> rfl /-- Let `E,F` be finite-dimensional normed vector spaces over a complete nontrivially normed field `๐•œ`. Suppose `f: E โ†’ F` has strict derivative `A` at `a`, with continuous linear left inverse `P`. This local homeomorphism from `E ร— ker(P)` to `F` is given near `(a,0)` by `(v,n) โ†ฆ f(v)+n`. Its local inverse is supplied by the inverse function theorem. -/ def normalChart (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) : OpenPartialHomeomorph (E ร— P.ker) F := ((add_kernel hf) P h).toOpenPartialHomeomorph _ @[simp] theorem normalChart_apply (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) (z : E ร— P.ker) : (normalChart hf) P h z = f z.1 + z.2 := rfl /-- The selected point belongs to the coordinate domain. -/ theorem normalChart_mem_source (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) : (a, 0) โˆˆ ((normalChart hf) P h).source := ((add_kernel hf) P h).mem_toOpenPartialHomeomorph_source /-- The selected image point belongs to the ambient coordinate neighborhood. -/ theorem normalChart_mem_target (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) : f a โˆˆ ((normalChart hf) P h).target := by simpa using ((normalChart hf) P h).map_source ((normalChart_mem_source hf) P h) /-- Inverse normal coordinates send every parametrized point in the coordinate domain to precisely its tangent parameter and zero normal coordinate. -/ theorem normalChart_symm_apply (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) (v : E) (hv : (v, 0) โˆˆ ((normalChart hf) P h).source) : ((normalChart hf) P h).symm (f v) = (v, 0) := by simpa using ((normalChart hf) P h).left_inv hv /-- On its ambient target, zero normal coordinate is equivalent to membership in the image of the zero-normal part of the coordinate domain. -/ theorem normalChart_normal_eq_zero_iff (hf : HasStrictFDerivAt f A a) (P : F โ†’L[๐•œ] E) (h : P.comp A = ContinuousLinearMap.id ๐•œ E) (y : F) (hy : y โˆˆ ((normalChart hf) P h).target) : (((normalChart hf) P h).symm y).2 = 0 โ†” โˆƒ v : E, (v, 0) โˆˆ ((normalChart hf) P h).source โˆง f v = y := by let e := (normalChart hf) P h constructor ยท intro hn change (e.symm y).2 = 0 at hn refine โŸจ(e.symm y).1, ?_, ?_โŸฉ ยท simpa only [โ† hn] using e.map_target hy ยท have hright := e.right_inv hy change f (e.symm y).1 + (e.symm y).2 = y at hright rw [hn] at hright simpa only [Submodule.coe_zero, add_zero] using hright ยท rintro โŸจv, hv, rflโŸฉ rw [(normalChart_symm_apply hf) P h v hv] end HasStrictFDerivAt end end OAI.Analysis.Foundations.SplitDerivativeNormalChart