import Mathlib.Geometry.Manifold.Diffeomorph import Mathlib.Geometry.Manifold.LocalInvariantProperties /-! # Transport a charted space through a linear coordinate equivalence This is the generic atlas transport used for the standard Euclidean charts on the spacetime product. The construction changes the chart codomain while retaining the underlying topology and both identity smoothness maps. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set Topology open scoped Manifold ContDiff noncomputable section /-- Linear change of the chart codomain, preserving the smooth structure. This is the atlas construction for the spacetime product in the 2015 Section 19.2 correction, p. 2. -/ theorem ContinuousLinearEquiv.exists_compatibleChartedSpace {K E F : Type*} [NontriviallyNormedField K] [NormedAddCommGroup E] [NormedSpace K E] [NormedAddCommGroup F] [NormedSpace K F] (e : E ≃L[K] F) (M : Type*) [TopologicalSpace M] [ChartedSpace E M] {r : β„•βˆžΟ‰} [IsManifold π“˜(K, E) r M] : βˆƒ C : ChartedSpace F M, letI := C IsManifold π“˜(K, F) r M ∧ ContMDiff π“˜(K, E) π“˜(K, F) r (id : M β†’ M) ∧ ContMDiff π“˜(K, F) π“˜(K, E) r (id : M β†’ M) := by let f : OpenPartialHomeomorph E F := e.toHomeomorph.toOpenPartialHomeomorph have hf : f.source = (Set.univ : Set E) := by simp [f] let : ChartedSpace F E := f.singletonChartedSpace hf let C : ChartedSpace F M := ChartedSpace.comp F E M let : ChartedSpace F M := C let G₁ : StructureGroupoid F := contDiffGroupoid r (π“˜(K, F)) let Gβ‚‚ : StructureGroupoid E := contDiffGroupoid r (π“˜(K, E)) have hsingleton : @HasGroupoid F _ E _ (f.singletonChartedSpace hf) G₁ := f.singleton_hasGroupoid hf G₁ let : @HasGroupoid F _ E _ (f.singletonChartedSpace hf) G₁ := hsingleton have hconj : βˆ€ g ∈ Gβ‚‚, ChartedSpace.LiftPropOn (StructureGroupoid.IsLocalStructomorphWithinAt G₁) (g : E β†’ E) g.source := by intro g hg x hx rw [ChartedSpace.liftPropWithinAt_iff'] refine ⟨g.continuousOn.continuousWithinAt hx, ?_⟩ intro hy let q : OpenPartialHomeomorph F F := f.symm.trans (g.trans f) have hqmem : q ∈ G₁ := by change q ∈ contDiffGroupoid r (π“˜(K, F)) rw [contDiffGroupoid, mem_groupoid_of_pregroupoid] have hg' := (show g ∈ contDiffGroupoid r (π“˜(K, E)) from hg) rw [contDiffGroupoid, mem_groupoid_of_pregroupoid] at hg' have hgin : ContDiffOn K r (g : E β†’ E) g.source := by simpa [contDiffPregroupoid] using hg'.1 have hginv : ContDiffOn K r (g.symm : E β†’ E) g.symm.source := by simpa [contDiffPregroupoid] using hg'.2 have hqcont : ContDiffOn K r (q : F β†’ F) q.source := by simpa [q, f, Function.comp_def] using e.contDiff.comp_contDiffOn (hgin.comp_continuousLinearMap (e.symm : F β†’L[K] E)) have hqinvcont : ContDiffOn K r (q.symm : F β†’ F) q.symm.source := by simpa [q, f, Function.comp_def] using e.contDiff.comp_contDiffOn (hginv.comp_continuousLinearMap (e.symm : F β†’L[K] E)) exact ⟨by simpa [contDiffPregroupoid] using hqcont, by simpa [contDiffPregroupoid] using hqinvcont⟩ refine ⟨q, hqmem, ?_, ?_⟩ Β· intro y hy' simp [q, f] Β· simpa [q, f, hf] using hx have hcomp : @HasGroupoid F _ M _ C G₁ := by let : @HasGroupoid F _ E _ (f.singletonChartedSpace hf) G₁ := hsingleton exact StructureGroupoid.HasGroupoid.comp Gβ‚‚ hconj let : @HasGroupoid F _ M _ C G₁ := hcomp have hM : IsManifold π“˜(K, F) r M := IsManifold.mk' (π“˜(K, F)) r M let : IsManifold π“˜(K, F) r M := hM refine ⟨C, hM, ?_, ?_⟩ Β· rw [contMDiff_iff] refine ⟨continuous_id, ?_⟩ intro x y have hxy := (contDiffGroupoid r (π“˜(K, E))).compatible (chart_mem_atlas E x) (chart_mem_atlas E y) rw [contDiffGroupoid, mem_groupoid_of_pregroupoid] at hxy have htrans : ContDiffOn K r ((chartAt E x).symm.trans (chartAt E y) : E β†’ E) ((chartAt E x).symm.trans (chartAt E y)).source := by simpa [contDiffPregroupoid] using hxy.1 rw [extChartAt_comp] simpa [extChartAt, f, Function.comp_def] using e.contDiff.comp_contDiffOn htrans Β· rw [contMDiff_iff] refine ⟨continuous_id, ?_⟩ intro x y have hxy := (contDiffGroupoid r (π“˜(K, E))).compatible (chart_mem_atlas E x) (chart_mem_atlas E y) rw [contDiffGroupoid, mem_groupoid_of_pregroupoid] at hxy have htrans : ContDiffOn K r ((chartAt E x).symm.trans (chartAt E y) : E β†’ E) ((chartAt E x).symm.trans (chartAt E y)).source := by simpa [contDiffPregroupoid] using hxy.1 rw [extChartAt_comp] simpa [extChartAt, f, Function.comp_def, Set.preimage, Set.inter_def] using htrans.comp_continuousLinearMap (e.symm : F β†’L[K] E)