import Mathlib.Geometry.Manifold.SmoothEmbedding import Mathlib.Geometry.Manifold.LocalDiffeomorph import Mathlib.Geometry.Manifold.ContMDiff.Atlas /-! # Transport of immersions through local diffeomorphisms For manifolds without boundary, a local diffeomorphism preserves the chart normal form of an immersion. Compact injective immersions therefore descend to smooth embeddings through a local diffeomorphism. -/ set_option autoImplicit false open Set open scoped Manifold ContDiff namespace Manifold variable {π•œ : Type*} [NontriviallyNormedField π•œ] {E G F : Type*} [NormedAddCommGroup E] [NormedSpace π•œ E] [NormedAddCommGroup G] [NormedSpace π•œ G] [NormedAddCommGroup F] [NormedSpace π•œ F] {M N P : Type*} [TopologicalSpace M] [ChartedSpace E M] [TopologicalSpace N] [ChartedSpace G N] [TopologicalSpace P] [ChartedSpace G P] {n : β„•βˆžΟ‰} [IsManifold π“˜(π•œ, G) n P] {f : M β†’ N} {p : N β†’ P} /-- Postcomposition by a local diffeomorphism preserves a fixed immersion complement. -/ theorem IsImmersionOfComplement.comp_localDiffeomorph (hf : IsImmersionOfComplement F π“˜(π•œ, E) π“˜(π•œ, G) n f) (hp : IsLocalDiffeomorph π“˜(π•œ, G) π“˜(π•œ, G) n p) : IsImmersionOfComplement F π“˜(π•œ, E) π“˜(π•œ, G) n (p ∘ f) := by intro x let h := hf x obtain βŸ¨Ο†, hx, heq⟩ := hp (f x) let s := f ⁻¹' Ο†.source have hs : IsOpen s := Ο†.open_source.preimage hf.contMDiff.continuous let d := h.domChart.restr s let b := Ο†.symm.toOpenPartialHomeomorph.trans h.codChart have hdsource : d.source = h.domChart.source ∩ s := h.domChart.restr_source' s hs have hb : b ∈ IsManifold.maximalAtlas π“˜(π•œ, G) n P := by apply b.mem_maximalAtlas_of_contMDiffOn Β· exact (contMDiffOn_of_mem_maximalAtlas h.codChart_mem_maximalAtlas).comp (Ο†.symm.contMDiffOn.mono inter_subset_left) inter_subset_right Β· exact Ο†.contMDiffOn.comp ((contMDiffOn_symm_of_mem_maximalAtlas h.codChart_mem_maximalAtlas).mono inter_subset_left) inter_subset_right have hsource (y : M) (hy : y ∈ d.source) : p (f y) ∈ b.source := by rw [hdsource] at hy have hfy : f y ∈ Ο†.source := hy.2 change p (f y) ∈ Ο†.target ∧ Ο†.symm (p (f y)) ∈ h.codChart.source rw [heq hfy] change Ο† (f y) ∈ Ο†.target ∧ Ο†.toPartialEquiv.symm (Ο†.toPartialEquiv (f y)) ∈ _ rw [Ο†.toPartialEquiv.left_inv hfy] exact βŸ¨Ο†.map_source hfy, h.source_subset_preimage_source hy.1⟩ have hdx : x ∈ d.source := by rw [hdsource]; exact ⟨h.mem_domChart_source, hx⟩ apply IsImmersionAtOfComplement.mk_of_charts h.equiv d b hdx (hsource x hdx) (restr_mem_maximalAtlas _ h.domChart_mem_maximalAtlas hs) hb hsource intro v hv have hv' : v ∈ d.target := by simpa using hv have hdv := d.map_target hv' rw [hdsource] at hdv have hfv : f (d.symm v) ∈ Ο†.source := hdv.2 change h.codChart (Ο†.symm (p (f (d.symm v)))) = h.equiv (v, 0) rw [heq hfv] change h.codChart (Ο†.toPartialEquiv.symm (Ο†.toPartialEquiv (f (d.symm v)))) = _ rw [Ο†.toPartialEquiv.left_inv hfv] apply h.writtenInCharts simpa using hv'.1 /-- A local diffeomorphism preserves immersions between manifolds without boundary. -/ theorem IsImmersion.comp_localDiffeomorph (hf : IsImmersion π“˜(π•œ, E) π“˜(π•œ, G) n f) (hp : IsLocalDiffeomorph π“˜(π•œ, G) π“˜(π•œ, G) n p) : IsImmersion π“˜(π•œ, E) π“˜(π•œ, G) n (p ∘ f) := (hf.isImmersionOfComplement_complement.comp_localDiffeomorph hp).isImmersion /-- An injective projection of a compact smooth embedding through a local diffeomorphism is again a smooth embedding. -/ theorem IsSmoothEmbedding.comp_localDiffeomorph [CompactSpace M] [T2Space P] (hf : IsSmoothEmbedding π“˜(π•œ, E) π“˜(π•œ, G) n f) (hp : IsLocalDiffeomorph π“˜(π•œ, G) π“˜(π•œ, G) n p) (hinj : Function.Injective (p ∘ f)) : IsSmoothEmbedding π“˜(π•œ, E) π“˜(π•œ, G) n (p ∘ f) := by have hi := hf.isImmersion.comp_localDiffeomorph hp exact ⟨hi, (hi.contMDiff.continuous.isClosedEmbedding hinj).isEmbedding⟩ end Manifold