Documentation

Mathlib.Geometry.Euclidean.Sphere.Basic

Spheres #

This file defines and proves basic results about spheres and cospherical sets of points in Euclidean affine spaces.

Main definitions #

structure EuclideanGeometry.Sphere (P : Type u_2) [MetricSpace P] :
Type u_2

A Sphere P bundles a center and radius. This definition does not require the radius to be positive; that should be given as a hypothesis to lemmas that require it.

  • center : P

    center of this sphere

  • radius : ℝ

    radius of the sphere; not required to be positive

Instances For
    theorem EuclideanGeometry.Sphere.ext {P : Type u_2} {inst✝ : MetricSpace P} {x y : Sphere P} (center : x.center = y.center) (radius : x.radius = y.radius) :
    x = y
    theorem EuclideanGeometry.Sphere.mk_center {P : Type u_2} [MetricSpace P] (c : P) (r : ℝ) :
    { center := c, radius := r }.center = c
    theorem EuclideanGeometry.Sphere.mk_radius {P : Type u_2} [MetricSpace P] (c : P) (r : ℝ) :
    { center := c, radius := r }.radius = r
    @[simp]
    theorem EuclideanGeometry.Sphere.mk_center_radius {P : Type u_2} [MetricSpace P] (s : Sphere P) :
    { center := s.center, radius := s.radius } = s
    @[simp]
    theorem EuclideanGeometry.Sphere.coe_mk {P : Type u_2} [MetricSpace P] (c : P) (r : ℝ) :
    Metric.sphere { center := c, radius := r }.center { center := c, radius := r }.radius = Metric.sphere c r
    theorem EuclideanGeometry.subset_sphere {P : Type u_2} [MetricSpace P] {ps : Set P} {s : Sphere P} :
    ps βŠ† Metric.sphere s.center s.radius ↔ βˆ€ p ∈ ps, p ∈ s
    theorem EuclideanGeometry.dist_of_mem_subset_sphere {P : Type u_2} [MetricSpace P] {p : P} {ps : Set P} {s : Sphere P} (hp : p ∈ ps) (hps : ps βŠ† Metric.sphere s.center s.radius) :
    theorem EuclideanGeometry.dist_of_mem_subset_mk_sphere {P : Type u_2} [MetricSpace P] {p c : P} {ps : Set P} {r : ℝ} (hp : p ∈ ps) (hps : ps βŠ† Metric.sphere { center := c, radius := r }.center { center := c, radius := r }.radius) :
    dist p c = r
    theorem EuclideanGeometry.Sphere.ne_iff {P : Type u_2} [MetricSpace P] {s₁ sβ‚‚ : Sphere P} :
    s₁ β‰  sβ‚‚ ↔ s₁.center β‰  sβ‚‚.center ∨ s₁.radius β‰  sβ‚‚.radius
    theorem EuclideanGeometry.Sphere.center_eq_iff_eq_of_mem {P : Type u_2} [MetricSpace P] {s₁ sβ‚‚ : Sphere P} {p : P} (hs₁ : p ∈ s₁) (hsβ‚‚ : p ∈ sβ‚‚) :
    s₁.center = sβ‚‚.center ↔ s₁ = sβ‚‚
    theorem EuclideanGeometry.Sphere.center_ne_iff_ne_of_mem {P : Type u_2} [MetricSpace P] {s₁ sβ‚‚ : Sphere P} {p : P} (hs₁ : p ∈ s₁) (hsβ‚‚ : p ∈ sβ‚‚) :
    s₁.center β‰  sβ‚‚.center ↔ s₁ β‰  sβ‚‚
    theorem EuclideanGeometry.dist_center_eq_dist_center_of_mem_sphere {P : Type u_2} [MetricSpace P] {p₁ pβ‚‚ : P} {s : Sphere P} (hp₁ : p₁ ∈ s) (hpβ‚‚ : pβ‚‚ ∈ s) :
    dist p₁ s.center = dist pβ‚‚ s.center
    theorem EuclideanGeometry.dist_center_eq_dist_center_of_mem_sphere' {P : Type u_2} [MetricSpace P] {p₁ pβ‚‚ : P} {s : Sphere P} (hp₁ : p₁ ∈ s) (hpβ‚‚ : pβ‚‚ ∈ s) :
    dist s.center p₁ = dist s.center pβ‚‚

    A set of points is cospherical if they are equidistant from some point. In two dimensions, this is the same thing as being concyclic.

    Equations
      Instances For
        theorem EuclideanGeometry.cospherical_def {P : Type u_2} [MetricSpace P] (ps : Set P) :
        Cospherical ps ↔ βˆƒ (center : P) (radius : ℝ), βˆ€ p ∈ ps, dist p center = radius

        The definition of Cospherical.

        A set of points is cospherical if and only if they lie in some sphere.

        The set of points in a sphere is cospherical.

        theorem EuclideanGeometry.Cospherical.subset {P : Type u_2} [MetricSpace P] {ps₁ psβ‚‚ : Set P} (hs : ps₁ βŠ† psβ‚‚) (hc : Cospherical psβ‚‚) :
        Cospherical ps₁

        A subset of a cospherical set is cospherical.

        A single point is cospherical.

        theorem EuclideanGeometry.cospherical_pair {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] (p₁ pβ‚‚ : P) :
        Cospherical {p₁, pβ‚‚}

        Two points are cospherical.

        A set of points is concyclic if it is cospherical and coplanar. (Most results are stated directly in terms of Cospherical instead of using Concyclic.)

        Instances For
          theorem EuclideanGeometry.Concyclic.subset {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {ps₁ psβ‚‚ : Set P} (hs : ps₁ βŠ† psβ‚‚) (h : Concyclic psβ‚‚) :
          Concyclic ps₁

          A subset of a concyclic set is concyclic.

          A single point is concyclic.

          theorem EuclideanGeometry.concyclic_pair {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] (p₁ pβ‚‚ : P) :
          Concyclic {p₁, pβ‚‚}

          Two points are concyclic.

          structure EuclideanGeometry.Sphere.IsDiameter {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] (s : Sphere P) (p₁ pβ‚‚ : P) :

          s.IsDiameter p₁ pβ‚‚ says that p₁ and pβ‚‚ are the two endpoints of a diameter of s.

          Instances For
            theorem EuclideanGeometry.Sphere.IsDiameter.right_mem {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            pβ‚‚ ∈ s
            theorem EuclideanGeometry.Sphere.IsDiameter.symm {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            s.IsDiameter pβ‚‚ p₁
            theorem EuclideanGeometry.Sphere.isDiameter_comm {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} :
            s.IsDiameter p₁ pβ‚‚ ↔ s.IsDiameter pβ‚‚ p₁
            theorem EuclideanGeometry.Sphere.IsDiameter.pointReflection_center_left {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            (Equiv.pointReflection s.center) p₁ = pβ‚‚
            theorem EuclideanGeometry.Sphere.IsDiameter.pointReflection_center_right {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            (Equiv.pointReflection s.center) pβ‚‚ = p₁
            theorem EuclideanGeometry.Sphere.IsDiameter.right_eq_of_isDiameter {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ p₃ : P} (h₁₂ : s.IsDiameter p₁ pβ‚‚) (h₁₃ : s.IsDiameter p₁ p₃) :
            pβ‚‚ = p₃
            theorem EuclideanGeometry.Sphere.IsDiameter.left_eq_of_isDiameter {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ p₃ : P} (h₁₃ : s.IsDiameter p₁ p₃) (h₂₃ : s.IsDiameter pβ‚‚ p₃) :
            p₁ = pβ‚‚
            theorem EuclideanGeometry.Sphere.IsDiameter.dist_left_right {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            dist p₁ pβ‚‚ = 2 * s.radius
            theorem EuclideanGeometry.Sphere.IsDiameter.dist_left_right_div_two {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            dist p₁ pβ‚‚ / 2 = s.radius
            theorem EuclideanGeometry.Sphere.IsDiameter.left_eq_right_iff {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            p₁ = pβ‚‚ ↔ s.radius = 0
            theorem EuclideanGeometry.Sphere.IsDiameter.left_ne_right_iff_radius_ne_zero {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            p₁ β‰  pβ‚‚ ↔ s.radius β‰  0
            theorem EuclideanGeometry.Sphere.IsDiameter.left_ne_right_iff_radius_pos {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            p₁ β‰  pβ‚‚ ↔ 0 < s.radius
            theorem EuclideanGeometry.Sphere.IsDiameter.wbtw {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
            Wbtw ℝ p₁ s.center pβ‚‚
            theorem EuclideanGeometry.Sphere.IsDiameter.sbtw {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) (hr : s.radius β‰  0) :
            Sbtw ℝ p₁ s.center pβ‚‚
            def EuclideanGeometry.Sphere.ofDiameter {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] (p₁ pβ‚‚ : P) :

            Construct the sphere with the given diameter.

            Equations
              Instances For
                theorem EuclideanGeometry.Sphere.isDiameter_ofDiameter {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] (p₁ pβ‚‚ : P) :
                (Sphere.ofDiameter p₁ pβ‚‚).IsDiameter p₁ pβ‚‚
                theorem EuclideanGeometry.Sphere.IsDiameter.ofDiameter_eq {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (h : s.IsDiameter p₁ pβ‚‚) :
                Sphere.ofDiameter p₁ pβ‚‚ = s
                theorem EuclideanGeometry.Sphere.isDiameter_iff_ofDiameter_eq {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [NormedSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} :
                s.IsDiameter p₁ pβ‚‚ ↔ Sphere.ofDiameter p₁ pβ‚‚ = s

                Any three points in a cospherical set are affinely independent.

                theorem EuclideanGeometry.Cospherical.affineIndependent_of_mem_of_ne {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Set P} (hs : Cospherical s) {p₁ pβ‚‚ p₃ : P} (h₁ : p₁ ∈ s) (hβ‚‚ : pβ‚‚ ∈ s) (h₃ : p₃ ∈ s) (h₁₂ : p₁ β‰  pβ‚‚) (h₁₃ : p₁ β‰  p₃) (h₂₃ : pβ‚‚ β‰  p₃) :
                AffineIndependent ℝ ![p₁, pβ‚‚, p₃]

                Any three points in a cospherical set are affinely independent.

                theorem EuclideanGeometry.Cospherical.affineIndependent_of_ne {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {p₁ pβ‚‚ p₃ : P} (hs : Cospherical {p₁, pβ‚‚, p₃}) (h₁₂ : p₁ β‰  pβ‚‚) (h₁₃ : p₁ β‰  p₃) (h₂₃ : pβ‚‚ β‰  p₃) :
                AffineIndependent ℝ ![p₁, pβ‚‚, p₃]

                The three points of a cospherical set are affinely independent.

                theorem EuclideanGeometry.inner_vsub_vsub_of_mem_sphere_of_mem_sphere {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {p₁ pβ‚‚ : P} {s₁ sβ‚‚ : Sphere P} (hp₁s₁ : p₁ ∈ s₁) (hpβ‚‚s₁ : pβ‚‚ ∈ s₁) (hp₁sβ‚‚ : p₁ ∈ sβ‚‚) (hpβ‚‚sβ‚‚ : pβ‚‚ ∈ sβ‚‚) :
                inner ℝ (sβ‚‚.center -α΅₯ s₁.center) (pβ‚‚ -α΅₯ p₁) = 0

                Suppose that p₁ and pβ‚‚ lie in spheres s₁ and sβ‚‚. Then the vector between the centers of those spheres is orthogonal to that between p₁ and pβ‚‚; this is a version of inner_vsub_vsub_of_dist_eq_of_dist_eq for bundled spheres. (In two dimensions, this says that the diagonals of a kite are orthogonal.)

                theorem EuclideanGeometry.eq_of_mem_sphere_of_mem_sphere_of_mem_of_finrank_eq_two {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ℝ P} [FiniteDimensional ℝ β†₯s.direction] (hd : Module.finrank ℝ β†₯s.direction = 2) {s₁ sβ‚‚ : Sphere P} {p₁ pβ‚‚ p : P} (hs₁ : s₁.center ∈ s) (hsβ‚‚ : sβ‚‚.center ∈ s) (hp₁s : p₁ ∈ s) (hpβ‚‚s : pβ‚‚ ∈ s) (hps : p ∈ s) (hs : s₁ β‰  sβ‚‚) (hp : p₁ β‰  pβ‚‚) (hp₁s₁ : p₁ ∈ s₁) (hpβ‚‚s₁ : pβ‚‚ ∈ s₁) (hps₁ : p ∈ s₁) (hp₁sβ‚‚ : p₁ ∈ sβ‚‚) (hpβ‚‚sβ‚‚ : pβ‚‚ ∈ sβ‚‚) (hpsβ‚‚ : p ∈ sβ‚‚) :
                p = p₁ ∨ p = pβ‚‚

                Two spheres intersect in at most two points in a two-dimensional subspace containing their centers; this is a version of eq_of_dist_eq_of_dist_eq_of_mem_of_finrank_eq_two for bundled spheres.

                theorem EuclideanGeometry.eq_of_mem_sphere_of_mem_sphere_of_finrank_eq_two {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] [FiniteDimensional ℝ V] (hd : Module.finrank ℝ V = 2) {s₁ sβ‚‚ : Sphere P} {p₁ pβ‚‚ p : P} (hs : s₁ β‰  sβ‚‚) (hp : p₁ β‰  pβ‚‚) (hp₁s₁ : p₁ ∈ s₁) (hpβ‚‚s₁ : pβ‚‚ ∈ s₁) (hps₁ : p ∈ s₁) (hp₁sβ‚‚ : p₁ ∈ sβ‚‚) (hpβ‚‚sβ‚‚ : pβ‚‚ ∈ sβ‚‚) (hpsβ‚‚ : p ∈ sβ‚‚) :
                p = p₁ ∨ p = pβ‚‚

                Two spheres intersect in at most two points in two-dimensional space; this is a version of eq_of_dist_eq_of_dist_eq_of_finrank_eq_two for bundled spheres.

                theorem EuclideanGeometry.inner_pos_or_eq_of_dist_le_radius {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (hp₁ : p₁ ∈ s) (hpβ‚‚ : dist pβ‚‚ s.center ≀ s.radius) :
                0 < inner ℝ (p₁ -α΅₯ pβ‚‚) (p₁ -α΅₯ s.center) ∨ p₁ = pβ‚‚

                Given a point on a sphere and a point not outside it, the inner product between the difference of those points and the radius vector is positive unless the points are equal.

                theorem EuclideanGeometry.inner_nonneg_of_dist_le_radius {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (hp₁ : p₁ ∈ s) (hpβ‚‚ : dist pβ‚‚ s.center ≀ s.radius) :
                0 ≀ inner ℝ (p₁ -α΅₯ pβ‚‚) (p₁ -α΅₯ s.center)

                Given a point on a sphere and a point not outside it, the inner product between the difference of those points and the radius vector is nonnegative.

                theorem EuclideanGeometry.inner_pos_of_dist_lt_radius {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} (hp₁ : p₁ ∈ s) (hpβ‚‚ : dist pβ‚‚ s.center < s.radius) :
                0 < inner ℝ (p₁ -α΅₯ pβ‚‚) (p₁ -α΅₯ s.center)

                Given a point on a sphere and a point inside it, the inner product between the difference of those points and the radius vector is positive.

                theorem EuclideanGeometry.wbtw_of_collinear_of_dist_center_le_radius {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ p₃ : P} (h : Collinear ℝ {p₁, pβ‚‚, p₃}) (hp₁ : p₁ ∈ s) (hpβ‚‚ : dist pβ‚‚ s.center ≀ s.radius) (hp₃ : p₃ ∈ s) (hp₁p₃ : p₁ β‰  p₃) :
                Wbtw ℝ p₁ pβ‚‚ p₃

                Given three collinear points, two on a sphere and one not outside it, the one not outside it is weakly between the other two points.

                theorem EuclideanGeometry.sbtw_of_collinear_of_dist_center_lt_radius {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ p₃ : P} (h : Collinear ℝ {p₁, pβ‚‚, p₃}) (hp₁ : p₁ ∈ s) (hpβ‚‚ : dist pβ‚‚ s.center < s.radius) (hp₃ : p₃ ∈ s) (hp₁p₃ : p₁ β‰  p₃) :
                Sbtw ℝ p₁ pβ‚‚ p₃

                Given three collinear points, two on a sphere and one inside it, the one inside it is strictly between the other two points.

                theorem EuclideanGeometry.Sphere.isDiameter_iff_mem_and_mem_and_dist {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} :
                s.IsDiameter p₁ pβ‚‚ ↔ p₁ ∈ s ∧ pβ‚‚ ∈ s ∧ dist p₁ pβ‚‚ = 2 * s.radius
                theorem EuclideanGeometry.Sphere.isDiameter_iff_mem_and_mem_and_wbtw {V : Type u_1} {P : Type u_2} [NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P] {s : Sphere P} {p₁ pβ‚‚ : P} :
                s.IsDiameter p₁ pβ‚‚ ↔ p₁ ∈ s ∧ pβ‚‚ ∈ s ∧ Wbtw ℝ p₁ s.center pβ‚‚