import PoincareLib.Geometry.Manifold.RegularFiber.ChartedSpace import Mathlib.Geometry.Manifold.MFDeriv.Atlas /-! # The inclusion of a simultaneous regular fiber The subtype inclusion is smooth and its differential is injective. Smooth slice coordinates provide a local left inverse to its differential. -/ noncomputable section set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Function open scoped Manifold ContDiff Topology namespace Poincare.Geometry.Manifold.RegularFiber variable {m k : โ„•} {E : Type*} [NormedAddCommGroup E] [NormedSpace โ„ E] [FiniteDimensional โ„ E] [Fact (Module.finrank โ„ E = m + k)] {M : Type*} [TopologicalSpace M] [ChartedSpace E M] [IsManifold ๐“˜(โ„, E) โˆž M] {f : M โ†’ Fin k โ†’ โ„} (hf : ContMDiff ๐“˜(โ„, E) ๐“˜(โ„, Fin k โ†’ โ„) โˆž f) (c : Fin k โ†’ โ„) (hreg : โˆ€ x : M, f x = c โ†’ Surjective (mfderiv ๐“˜(โ„, E) ๐“˜(โ„, Fin k โ†’ โ„) f x)) /-- The actual subtype inclusion of a simultaneous regular fiber is smooth. -/ theorem contMDiff_fiber_val : let := fiberChartedSpace (m := m) hf c hreg ContMDiff (๐“ก m) ๐“˜(โ„, E) โˆž ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) := by let := fiberChartedSpace (m := m) hf c hreg change ContMDiff (๐“ก m) ๐“˜(โ„, E) โˆž ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) intro z let e := adaptedChart (m := m) hf z (hreg z z.2) let y := extChartAt (๐“ก m) z z have hy : y โˆˆ (fiberChart (m := m) hf c hreg z).target := (fiberChart (m := m) hf c hreg z).map_source (mem_fiberChart_source hf c hreg z) have hp : ContMDiffAt (๐“ก m) ๐“˜(โ„, (Fin k โ†’ โ„) ร— EuclideanSpace โ„ (Fin m)) โˆž (fun v => (c, v)) y := (contDiff_const.prodMk contDiff_id).contDiffAt.contMDiffAt have hi := (contMDiffOn_adaptedChart_symm hf z (hreg z z.2)).contMDiffAt (e.open_target.mem_nhds hy) have hev : ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) โˆ˜ (extChartAt (๐“ก m) z).symm =แถ [๐“ y] fun v => e.symm (c, v) := by filter_upwards [(fiberChart (m := m) hf c hreg z).open_target.mem_nhds hy] with v hv exact fiberChart_symm_val hf c hreg z hv rw [contMDiffAt_iff_source] exact ((hi.comp y hp).congr_of_eventuallyEq hev).contMDiffWithinAt /-- The differential of the fiber inclusion is injective. -/ theorem injective_mfderiv_fiber_val (z : (f โปยน' {c} : Set M)) : let := fiberChartedSpace (m := m) hf c hreg Injective (mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z) := by let := fiberChartedSpace (m := m) hf c hreg let : IsManifold (๐“ก m) โˆž (f โปยน' {c} : Set M) := isManifold_fiber (m := m) hf c hreg change Injective (mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z) let e := adaptedChart (m := m) hf z (hreg z z.2) have he := (contMDiffOn_adaptedChart hf z (hreg z z.2)).contMDiffAt (e.open_source.mem_nhds (mem_adaptedChart_source hf z (hreg z z.2))) have hp : ContMDiffAt ๐“˜(โ„, E) (๐“ก m) โˆž (fun x => (e x).2) (z : M) := contDiff_snd.contDiffAt.contMDiffAt.comp (z : M) he have hv := (contMDiff_fiber_val (m := m) hf c hreg z).mdifferentiableAt (by simp) have hcomp := mfderiv_comp z (hp.mdifferentiableAt (by simp)) hv have heq : (fun x => (e x).2) โˆ˜ ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) = extChartAt (๐“ก m) z := rfl rw [heq, mfderiv_extChartAt_self] at hcomp intro u v huv have h := congrArg (mfderiv ๐“˜(โ„, E) (๐“ก m) (fun x => (e x).2) (z : M)) huv change (mfderiv ๐“˜(โ„, E) (๐“ก m) (fun x => (e x).2) (z : M) โˆ˜L mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z) u = (mfderiv ๐“˜(โ„, E) (๐“ก m) (fun x => (e x).2) (z : M) โˆ˜L mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z) v at h rwa [โ† hcomp] at h /-- The tangent space of the constructed fiber is exactly the kernel of the joint differential, via the differential of its actual inclusion. -/ theorem range_mfderiv_fiber_val (z : (f โปยน' {c} : Set M)) : let := fiberChartedSpace (m := m) hf c hreg (mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z : EuclideanSpace โ„ (Fin m) โ†’L[โ„] E).range = (mfderiv ๐“˜(โ„, E) ๐“˜(โ„, Fin k โ†’ โ„) f (z : M) : E โ†’L[โ„] (Fin k โ†’ โ„)).ker := by let := fiberChartedSpace (m := m) hf c hreg let A : EuclideanSpace โ„ (Fin m) โ†’L[โ„] E := mfderiv (๐“ก m) ๐“˜(โ„, E) ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) z let L : E โ†’L[โ„] (Fin k โ†’ โ„) := mfderiv ๐“˜(โ„, E) ๐“˜(โ„, Fin k โ†’ โ„) f (z : M) change A.range = L.ker have hA : Injective A := injective_mfderiv_fiber_val hf c hreg z have hchain := mfderiv_comp z ((hf (z : M)).mdifferentiableAt (by simp)) ((contMDiff_fiber_val (m := m) hf c hreg z).mdifferentiableAt (by simp)) have hc : f โˆ˜ ((โ†‘) : (f โปยน' {c} : Set M) โ†’ M) = fun _ => c := funext fun y => y.2 rw [hc, mfderiv_const] at hchain have hLA : L.comp A = 0 := hchain.symm apply Submodule.eq_of_le_of_finrank_eq ยท rintro v โŸจu, rflโŸฉ change L (A u) = 0 exact DFunLike.congr_fun hLA u ยท have hdim := (L : E โ†’โ‚—[โ„] (Fin k โ†’ โ„)).finrank_range_add_finrank_ker rw [LinearMap.range_eq_top.mpr (hreg z z.2), finrank_top, Module.finrank_pi, Fintype.card_fin, Fact.out (p := Module.finrank โ„ E = m + k)] at hdim rw [LinearMap.finrank_range_of_inj hA, finrank_euclideanSpace_fin] omega end Poincare.Geometry.Manifold.RegularFiber