File: Mathlib/Geometry/Manifold/Instances/Sphere.lean

full_name: stereoToFun
code: /-- Stereographic projection, forward direction. This is a map from an inner product space `E` to
the orthogonal complement of an element `v` of `E`. It is smooth away from the affine hyperplane
through `v` parallel to the orthogonal complement.  It restricts on the sphere to the stereographic
projection. -/
def stereoToFun (x : E) : (ℝ ∙ v)ᗮ 
goal: ↥(Submodule.span ℝ {v})ᗮ

full_name: stereoToFun_apply
code: @[simp]
theorem stereoToFun_apply (x : E) :
    stereoToFun v x = (2 / ((1 : ℝ) - innerSL ℝ v x)) • orthogonalProjection (ℝ ∙ v)ᗮ x 
goal: stereoToFun v x = (2 / (1 - ((innerSL ℝ) v) x)) • (orthogonalProjection (Submodule.span ℝ {v})ᗮ) x

full_name: contDiffOn_stereoToFun
code: theorem contDiffOn_stereoToFun :
    ContDiffOn ℝ ⊤ (stereoToFun v) {x : E | innerSL _ v x ≠ (1 : ℝ)} 
goal: ContDiffOn ℝ ⊤ (stereoToFun v) {x | ((innerSL ℝ) v) x ≠ 1}

full_name: continuousOn_stereoToFun
code: theorem continuousOn_stereoToFun :
    ContinuousOn (stereoToFun v) {x : E | innerSL _ v x ≠ (1 : ℝ)} 
goal: ContinuousOn (stereoToFun v) {x | ((innerSL ℝ) v) x ≠ 1}

full_name: stereoInvFunAux
code: /-- Auxiliary function for the construction of the reverse direction of the stereographic
projection.  This is a map from the orthogonal complement of a unit vector `v` in an inner product
space `E` to `E`; we will later prove that it takes values in the unit sphere.

For most purposes, use `stereoInvFun`, not `stereoInvFunAux`. -/
def stereoInvFunAux (w : E) : E 
goal: E

full_name: stereoInvFunAux_apply
code: @[simp]
theorem stereoInvFunAux_apply (w : E) :
    stereoInvFunAux v w = (‖w‖ ^ 2 + 4)⁻¹ • ((4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v) 
goal: stereoInvFunAux v w = (‖w‖ ^ 2 + 4)⁻¹ • (4 • w + (‖w‖ ^ 2 - 4) • v)

full_name: stereoInvFunAux_mem
code: theorem stereoInvFunAux_mem (hv : ‖v‖ = 1) {w : E} (hw : w ∈ (ℝ ∙ v)ᗮ) :
    stereoInvFunAux v w ∈ sphere (0 : E) 1 
goal: stereoInvFunAux v w ∈ Metric.sphere 0 1

full_name: hasFDerivAt_stereoInvFunAux
code: theorem hasFDerivAt_stereoInvFunAux (v : E) :
    HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0 
goal: HasFDerivAt (stereoInvFunAux v) (ContinuousLinearMap.id ℝ E) 0

full_name: hasFDerivAt_stereoInvFunAux_comp_coe
code: theorem hasFDerivAt_stereoInvFunAux_comp_coe (v : E) :
    HasFDerivAt (stereoInvFunAux v ∘ ((↑) : (ℝ ∙ v)ᗮ → E)) (ℝ ∙ v)ᗮ.subtypeL 0 
goal: HasFDerivAt (stereoInvFunAux v ∘ Subtype.val) (Submodule.span ℝ {v})ᗮ.subtypeL 0

full_name: contDiff_stereoInvFunAux
code: theorem contDiff_stereoInvFunAux : ContDiff ℝ ⊤ (stereoInvFunAux v) 
goal: ContDiff ℝ ⊤ (stereoInvFunAux v)

full_name: stereoInvFun
code: /-- Stereographic projection, reverse direction.  This is a map from the orthogonal complement of a
unit vector `v` in an inner product space `E` to the unit sphere in `E`. -/
def stereoInvFun (hv : ‖v‖ = 1) (w : (ℝ ∙ v)ᗮ) : sphere (0 : E) 1 
goal: ↑(Metric.sphere 0 1)

full_name: stereoInvFun_apply
code: @[simp]
theorem stereoInvFun_apply (hv : ‖v‖ = 1) (w : (ℝ ∙ v)ᗮ) :
    (stereoInvFun hv w : E) = (‖w‖ ^ 2 + 4)⁻¹ • ((4 : ℝ) • w + (‖w‖ ^ 2 - 4) • v) 
goal: ↑(stereoInvFun hv w) = (‖w‖ ^ 2 + 4)⁻¹ • (4 • ↑w + (‖w‖ ^ 2 - 4) • v)

full_name: stereoInvFun_ne_north_pole
code: theorem stereoInvFun_ne_north_pole (hv : ‖v‖ = 1) (w : (ℝ ∙ v)ᗮ) :
    stereoInvFun hv w ≠ (⟨v, by simp [hv]⟩ : sphere (0 : E) 1) 
goal: stereoInvFun hv w ≠ ⟨v, ⋯⟩

full_name: continuous_stereoInvFun
code: theorem continuous_stereoInvFun (hv : ‖v‖ = 1) : Continuous (stereoInvFun hv) 
goal: Continuous (stereoInvFun hv)

full_name: stereo_left_inv
code: theorem stereo_left_inv (hv : ‖v‖ = 1) {x : sphere (0 : E) 1} (hx : (x : E) ≠ v) :
    stereoInvFun hv (stereoToFun v x) = x 
goal: stereoInvFun hv (stereoToFun v ↑x) = x

full_name: stereo_right_inv
code: theorem stereo_right_inv (hv : ‖v‖ = 1) (w : (ℝ ∙ v)ᗮ) : stereoToFun v (stereoInvFun hv w) = w 
goal: stereoToFun v ↑(stereoInvFun hv w) = w

full_name: stereographic
code: /-- Stereographic projection from the unit sphere in `E`, centred at a unit vector `v` in `E`;
this is the version as a partial homeomorphism. -/
def stereographic (hv : ‖v‖ = 1) : PartialHomeomorph (sphere (0 : E) 1) (ℝ ∙ v)ᗮ 
goal: PartialHomeomorph ↑(Metric.sphere 0 1) ↥(Submodule.span ℝ {v})ᗮ

full_name: stereographic_apply
code: theorem stereographic_apply (hv : ‖v‖ = 1) (x : sphere (0 : E) 1) :
    stereographic hv x = (2 / ((1 : ℝ) - inner v x)) • orthogonalProjection (ℝ ∙ v)ᗮ x 
goal: ↑(stereographic hv) x = (2 / (1 - ⟪v, ↑x⟫_ℝ)) • (orthogonalProjection (Submodule.span ℝ {v})ᗮ) ↑x

full_name: stereographic_source
code: @[simp]
theorem stereographic_source (hv : ‖v‖ = 1) : (stereographic hv).source = {⟨v, by simp [hv]⟩}ᶜ 
goal: (stereographic hv).source = {⟨v, ⋯⟩}ᶜ

full_name: stereographic_target
code: @[simp]
theorem stereographic_target (hv : ‖v‖ = 1) : (stereographic hv).target = Set.univ 
goal: (stereographic hv).target = Set.univ

full_name: stereographic_apply_neg
code: @[simp]
theorem stereographic_apply_neg (v : sphere (0 : E) 1) :
    stereographic (norm_eq_of_mem_sphere v) (-v) = 0 
goal: ↑(stereographic ⋯) (-v) = 0

full_name: stereographic_neg_apply
code: @[simp]
theorem stereographic_neg_apply (v : sphere (0 : E) 1) :
    stereographic (norm_eq_of_mem_sphere (-v)) v = 0 
goal: ↑(stereographic ⋯) v = 0

full_name: _private.Mathlib.Geometry.Manifold.Instances.Sphere.0.findim
code: private theorem findim (n : ℕ) [Fact (finrank ℝ E = n + 1)] : FiniteDimensional ℝ E 
goal: FiniteDimensional ℝ E

full_name: stereographic'
code: /-- Variant of the stereographic projection, for the sphere in an `n + 1`-dimensional inner product
space `E`.  This version has codomain the Euclidean space of dimension `n`, and is obtained by
composing the original sterographic projection (`stereographic`) with an arbitrary linear isometry
from `(ℝ ∙ v)ᗮ` to the Euclidean space. -/
def stereographic' (n : ℕ) [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    PartialHomeomorph (sphere (0 : E) 1) (EuclideanSpace ℝ (Fin n)) 
goal: PartialHomeomorph (↑(Metric.sphere 0 1)) (EuclideanSpace ℝ (Fin n))

full_name: stereographic'_source
code: @[simp]
theorem stereographic'_source {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    (stereographic' n v).source = {v}ᶜ 
goal: (stereographic' n v).source = {v}ᶜ

full_name: stereographic'_target
code: @[simp]
theorem stereographic'_target {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    (stereographic' n v).target = Set.univ 
goal: (stereographic' n v).target = Set.univ

full_name: EuclideanSpace.instChartedSpaceSphere
code: /-- The unit sphere in an `n + 1`-dimensional inner product space `E` is a charted space
modelled on the Euclidean space of dimension `n`. -/
instance EuclideanSpace.instChartedSpaceSphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] :
    ChartedSpace (EuclideanSpace ℝ (Fin n)) (sphere (0 : E) 1) 
goal: ChartedSpace (EuclideanSpace ℝ (Fin n)) ↑(Metric.sphere 0 1)

full_name: instChartedSpaceEuclideanSpaceRealFinElemHAddNatOfNatSphere
code: instance (n : ℕ) :
    ChartedSpace (EuclideanSpace ℝ (Fin n)) (sphere (0 : EuclideanSpace ℝ (Fin (n + 1))) 1) 
goal: ChartedSpace (EuclideanSpace ℝ (Fin n)) ↑(Metric.sphere 0 1)

full_name: sphere_ext_iff
code: theorem sphere_ext_iff (u v : sphere (0 : E) 1) : u = v ↔ ⟪(u : E), v⟫_ℝ = 1 
goal: u = v ↔ ⟪↑u, ↑v⟫_ℝ = 1

full_name: stereographic'_symm_apply
code: theorem stereographic'_symm_apply {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1)
    (x : EuclideanSpace ℝ (Fin n)) :
    ((stereographic' n v).symm x : E) =
      let U : (ℝ ∙ (v : E))ᗮ ≃ₗᵢ[ℝ] EuclideanSpace ℝ (Fin n) :=
        (OrthonormalBasis.fromOrthogonalSpanSingleton n (ne_zero_of_mem_unit_sphere v)).repr
      (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (4 : ℝ) • (U.symm x : E) +
        (‖(U.symm x : E)‖ ^ 2 + 4)⁻¹ • (‖(U.symm x : E)‖ ^ 2 - 4) • v.val 
goal: ↑(↑(stereographic' n v).symm x) =
  let U := (OrthonormalBasis.fromOrthogonalSpanSingleton n ⋯).repr;
  (‖↑(U.symm x)‖ ^ 2 + 4)⁻¹ • 4 • ↑(U.symm x) + (‖↑(U.symm x)‖ ^ 2 + 4)⁻¹ • (‖↑(U.symm x)‖ ^ 2 - 4) • ↑v

full_name: EuclideanSpace.instSmoothManifoldWithCornersSphere
code: /-- The unit sphere in an `n + 1`-dimensional inner product space `E` is a smooth manifold,
modelled on the Euclidean space of dimension `n`. -/
instance EuclideanSpace.instSmoothManifoldWithCornersSphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] :
    SmoothManifoldWithCorners (𝓡 n) (sphere (0 : E) 1) 
goal: SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(Metric.sphere 0 1)

full_name: instSmoothManifoldWithCornersRealEuclideanSpaceFinModelWithCornersSelfElemHAddNatOfNatSphere
code: instance (n : ℕ) :
    SmoothManifoldWithCorners (𝓡 n) (sphere (0 :  EuclideanSpace ℝ (Fin (n + 1))) 1) 
goal: SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ↑(Metric.sphere 0 1)

full_name: contMDiff_coe_sphere
code: /-- The inclusion map (i.e., `coe`) from the sphere in `E` to `E` is smooth.  -/
theorem contMDiff_coe_sphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] :
    ContMDiff (𝓡 n) 𝓘(ℝ, E) ∞ ((↑) : sphere (0 : E) 1 → E) 
goal: ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) ⊤ Subtype.val

full_name: ContMDiff.codRestrict_sphere
code: /-- If a `ContMDiff` function `f : M → E`, where `M` is some manifold, takes values in the
sphere, then it restricts to a `ContMDiff` function from `M` to the sphere. -/
theorem ContMDiff.codRestrict_sphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] {m : ℕ∞} {f : M → E}
    (hf : ContMDiff I 𝓘(ℝ, E) m f) (hf' : ∀ x, f x ∈ sphere (0 : E) 1) :
    ContMDiff I (𝓡 n) m (Set.codRestrict _ _ hf' : M → sphere (0 : E) 1) 
goal: ContMDiff I 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) m (Set.codRestrict f (Metric.sphere 0 1) hf')

full_name: contMDiff_neg_sphere
code: /-- The antipodal map is smooth. -/
theorem contMDiff_neg_sphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] :
    ContMDiff (𝓡 n) (𝓡 n) ∞ fun x : sphere (0 : E) 1 => -x 
goal: ContMDiff 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) ⊤ fun x => -x

full_name: range_mfderiv_coe_sphere
code: /-- Consider the differential of the inclusion of the sphere in `E` at the point `v` as a continuous
linear map from `TangentSpace (𝓡 n) v` to `E`.  The range of this map is the orthogonal complement
of `v` in `E`.

Note that there is an abuse here of the defeq between `E` and the tangent space to `E` at `(v:E`).
In general this defeq is not canonical, but in this case (the tangent space of a vector space) it is
canonical. -/
theorem range_mfderiv_coe_sphere {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    LinearMap.range (mfderiv (𝓡 n) 𝓘(ℝ, E) ((↑) : sphere (0 : E) 1 → E) v :
    TangentSpace (𝓡 n) v →L[ℝ] E) = (ℝ ∙ (v : E))ᗮ 
goal: LinearMap.range (mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) Subtype.val v) = (Submodule.span ℝ {↑v})ᗮ

full_name: mfderiv_coe_sphere_injective
code: /-- Consider the differential of the inclusion of the sphere in `E` at the point `v` as a continuous
linear map from `TangentSpace (𝓡 n) v` to `E`.  This map is injective. -/
theorem mfderiv_coe_sphere_injective {n : ℕ} [Fact (finrank ℝ E = n + 1)] (v : sphere (0 : E) 1) :
    Injective (mfderiv (𝓡 n) 𝓘(ℝ, E) ((↑) : sphere (0 : E) 1 → E) v) 
goal: Function.Injective ⇑(mfderiv 𝓘(ℝ, EuclideanSpace ℝ (Fin n)) 𝓘(ℝ, E) Subtype.val v)

full_name: finrank_real_complex_fact'
code: theorem finrank_real_complex_fact' : Fact (finrank ℝ ℂ = 1 + 1) 
goal: Fact (FiniteDimensional.finrank ℝ ℂ = 1 + 1)

full_name: instChartedSpaceEuclideanSpaceRealFinOfNatNatSubtypeComplexMemSubmonoidCircle
code: /-- The unit circle in `ℂ` is a charted space modelled on `EuclideanSpace ℝ (Fin 1)`.  This
follows by definition from the corresponding result for `Metric.Sphere`. -/
instance : ChartedSpace (EuclideanSpace ℝ (Fin 1)) circle 
goal: ChartedSpace (EuclideanSpace ℝ (Fin 1)) ↥circle

full_name: instSmoothManifoldWithCornersRealEuclideanSpaceFinOfNatNatModelWithCornersSelfSubtypeComplexMemSubmonoidCircle
code: instance : SmoothManifoldWithCorners (𝓡 1) circle 
goal: SmoothManifoldWithCorners 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) ↥circle

full_name: instLieGroupRealEuclideanSpaceFinOfNatNatModelWithCornersSelfSubtypeComplexMemSubmonoidCircle
code: /-- The unit circle in `ℂ` is a Lie group. -/
instance : LieGroup (𝓡 1) circle 
goal: LieGroup 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) ↥circle

full_name: contMDiff_expMapCircle
code: /-- The map `fun t ↦ exp (t * I)` from `ℝ` to the unit circle in `ℂ` is smooth. -/
theorem contMDiff_expMapCircle : ContMDiff 𝓘(ℝ, ℝ) (𝓡 1) ∞ expMapCircle 
goal: ContMDiff 𝓘(ℝ, ℝ) 𝓘(ℝ, EuclideanSpace ℝ (Fin 1)) ⊤ ⇑expMapCircle