import PoincareLib.Geometry.Spacetime.Realization.Interval.Charts import Mathlib.Geometry.Manifold.VectorField.Pullback import Mathlib.Topology.Algebra.Module.FiniteDimension /-! # The actual positive interval tangent The real inclusion has the same local derivative as the corresponding closed segment inclusion. Its inverse applied to 1 is smooth by smooth pullback of the constant vector field on the real line. -/ set_option autoImplicit false set_option backward.isDefEq.respectTransparency false open Set open scoped Manifold ContDiff Bundle Topology open PoincareMT namespace Poincare.Spacetime.Realization theorem interval_inclusion_mfderiv_eq (I : SpacetimeInterval) (t : I.domain) : letI := intervalChartedSpace I let D := intervalSegmentAt I t letI : Fact (D.left < D.right) := ⟨D.lt⟩ mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t = mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : Icc D.left D.right β†’ ℝ) (D.toSegment t) := by let := intervalChartedSpace I let D := intervalSegmentAt I t let : Fact (D.left < D.right) := ⟨D.lt⟩ dsimp only rw [((interval_inclusion_smooth I t).mdifferentiableAt (by simp)).mfderiv, ((contMDiff_subtypeVal_Icc (n := ∞) (D.toSegment t)).mdifferentiableAt (by simp)).mfderiv] rfl theorem interval_inclusion_surjective (I : SpacetimeInterval) (t : I.domain) : letI := intervalChartedSpace I Function.Surjective (mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t) := by let := intervalChartedSpace I let D := intervalSegmentAt I t let : Fact (D.left < D.right) := ⟨D.lt⟩ change Function.Surjective (show EuclideanSpace ℝ (Fin 1) β†’ ℝ from mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t) intro r refine ⟨r β€’ (1 : TangentSpace (π“‘βˆ‚ 1) (D.toSegment t)), ?_⟩ rw [interval_inclusion_mfderiv_eq] change mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : Icc D.left D.right β†’ ℝ) (D.toSegment t) (r β€’ (1 : TangentSpace (π“‘βˆ‚ 1) (D.toSegment t))) = r rw [map_smul, mfderiv_subtypeVal_Icc_one (D.toSegment t)] exact mul_one r theorem interval_inclusion_bijective (I : SpacetimeInterval) (t : I.domain) : letI := intervalChartedSpace I Function.Bijective (mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t) := by let := intervalChartedSpace I let f : EuclideanSpace ℝ (Fin 1) β†’L[ℝ] ℝ := mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t change Function.Bijective f have hdim : Module.finrank ℝ (EuclideanSpace ℝ (Fin 1)) = Module.finrank ℝ ℝ := by simp exact ⟨(LinearMap.injective_iff_surjective_of_finrank_eq_finrank (f := f.toLinearMap) hdim).mpr (interval_inclusion_surjective I t), interval_inclusion_surjective I t⟩ noncomputable def intervalInclusionDerivative (I : SpacetimeInterval) : letI := intervalChartedSpace I βˆ€ t : I.domain, TangentSpace (π“‘βˆ‚ 1) t ≃L[ℝ] ℝ := by letI := intervalChartedSpace I intro t change EuclideanSpace ℝ (Fin 1) ≃L[ℝ] ℝ exact (LinearEquiv.ofBijective (show EuclideanSpace ℝ (Fin 1) β†’β‚—[ℝ] ℝ from (mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t).toLinearMap) (interval_inclusion_bijective I t)).toContinuousLinearEquiv theorem intervalInclusionDerivative_eq (I : SpacetimeInterval) : letI := intervalChartedSpace I βˆ€ t : I.domain, (intervalInclusionDerivative I t).toContinuousLinearMap = mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t := by intro t rfl theorem interval_positive_tangent_smooth (I : SpacetimeInterval) : letI := intervalChartedSpace I letI : IsManifold (π“‘βˆ‚ 1) ∞ I.domain := interval_isManifold I ContMDiff (π“‘βˆ‚ 1) ((π“‘βˆ‚ 1).prod π“˜(ℝ, EuclideanSpace ℝ (Fin 1))) ∞ (fun t : I.domain ↦ Bundle.TotalSpace.mk' (EuclideanSpace ℝ (Fin 1)) (E := (TangentSpace (π“‘βˆ‚ 1) : I.domain β†’ Type _)) t ((intervalInclusionDerivative I t).symm 1)) := by let := intervalChartedSpace I let : IsManifold (π“‘βˆ‚ 1) ∞ I.domain := interval_isManifold I have hconst : ContMDiff π“˜(ℝ) (π“˜(ℝ).prod π“˜(ℝ)) ∞ (fun x : ℝ ↦ Bundle.TotalSpace.mk' ℝ (E := (TangentSpace π“˜(ℝ) : ℝ β†’ Type _)) x (1 : ℝ)) := contMDiff_vectorSpace_iff_contDiff.mpr contDiff_const have hinv : βˆ€ t : I.domain, (mfderiv (π“‘βˆ‚ 1) π“˜(ℝ) (Subtype.val : I.domain β†’ ℝ) t).IsInvertible := fun t ↦ ⟨intervalInclusionDerivative I t, intervalInclusionDerivative_eq I t⟩ have hpull := hconst.mpullback_vectorField (interval_inclusion_smooth I) hinv (by simp) simp only [VectorField.mpullback, ← intervalInclusionDerivative_eq, ContinuousLinearMap.inverse_equiv] at hpull convert! hpull /-- All smooth interval data concern exactly the supplied interval subtype. -/ noncomputable def smoothInterval (I : SpacetimeInterval) : SmoothSpacetimeInterval I where chartedSpace := intervalChartedSpace I isManifold := interval_isManifold I inclusion_smooth := interval_inclusion_smooth I boundary_eq := interval_boundary_eq I inclusionDerivative := intervalInclusionDerivative I inclusionDerivative_eq := intervalInclusionDerivative_eq I positive_tangent_smooth := interval_positive_tangent_smooth I end Poincare.Spacetime.Realization