# mathlibdocumentation

geometry.euclidean.circumcenter

This file proves some lemmas on points equidistant from a set of points, and defines the circumradius and circumcenter of a simplex. There are also some definitions for use in calculations where it is convenient to work with affine combinations of vertices together with the circumcenter.

## Main definitions #

• circumcenter and circumradius are the circumcenter and circumradius of a simplex.

## References #

theorem euclidean_geometry.dist_eq_iff_dist_orthogonal_projection_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} [nonempty s] [complete_space (s.direction)] {p1 p2 : P} (p3 : P) (hp1 : p1 s) (hp2 : p2 s) :
p3 = p3

p is equidistant from two points in s if and only if its orthogonal_projection is.

theorem euclidean_geometry.dist_set_eq_iff_dist_orthogonal_projection_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} [nonempty s] [complete_space (s.direction)] {ps : set P} (hps : ps s) (p : P) :
ps.pairwise (λ (p1 p2 : P), p = p) ps.pairwise (λ (p1 p2 : P),

p is equidistant from a set of points in s if and only if its orthogonal_projection is.

theorem euclidean_geometry.exists_dist_eq_iff_exists_dist_orthogonal_projection_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} [nonempty s] [complete_space (s.direction)] {ps : set P} (hps : ps s) (p : P) :
(∃ (r : ), ∀ (p1 : P), p1 ps p = r) ∃ (r : ), ∀ (p1 : P), p1 ps

There exists r such that p has distance r from all the points of a set of points in s if and only if there exists (possibly different) r such that its orthogonal_projection has that distance from all the points in that set.

theorem euclidean_geometry.exists_unique_dist_eq_of_insert {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} [complete_space (s.direction)] {ps : set P} (hnps : ps.nonempty) {p : P} (hps : ps s) (hp : p s) (hu : ∃! (cccr : P × ), cccr.fst s ∀ (p1 : P), p1 ps cccr.fst = cccr.snd) :
∃! (cccr₂ : P × ), cccr₂.fst ∀ (p1 : P), p1 cccr₂.fst = cccr₂.snd

The induction step for the existence and uniqueness of the circumcenter. Given a nonempty set of points in a nonempty affine subspace whose direction is complete, such that there is a unique (circumcenter, circumradius) pair for those points in that subspace, and a point p not in that subspace, there is a unique (circumcenter, circumradius) pair for the set with p added, in the span of the subspace with p added.

theorem affine_independent.exists_unique_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {ι : Type u_3} [hne : nonempty ι] [fintype ι] {p : ι → P} (ha : p) :
∃! (cccr : P × ), cccr.fst ∀ (i : ι), has_dist.dist (p i) cccr.fst = cccr.snd

Given a finite nonempty affinely independent family of points, there is a unique (circumcenter, circumradius) pair for those points in the affine subspace they span.

noncomputable def affine.simplex.circumcenter_circumradius {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

The pair (circumcenter, circumradius) of a simplex.

Equations
theorem affine.simplex.circumcenter_circumradius_unique_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :
∀ (i : fin (n + 1)), ∀ (cccr : P × ), (cccr.fst ∀ (i : fin (n + 1)), has_dist.dist (s.points i) cccr.fst = cccr.snd)

The property satisfied by the (circumcenter, circumradius) pair.

noncomputable def affine.simplex.circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :
P

The circumcenter of a simplex.

Equations
noncomputable def affine.simplex.circumradius {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

Equations
theorem affine.simplex.circumcenter_mem_affine_span {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

The circumcenter lies in the affine span.

@[simp]
theorem affine.simplex.dist_circumcenter_eq_circumradius {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) (i : fin (n + 1)) :

All points have distance from the circumcenter equal to the circumradius.

@[simp]
theorem affine.simplex.dist_circumcenter_eq_circumradius' {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) (i : fin (n + 1)) :

All points have distance to the circumcenter equal to the circumradius.

theorem affine.simplex.eq_circumcenter_of_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {p : P} (hp : p ) {r : } (hr : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r) :

Given a point in the affine span from which all the points are equidistant, that point is the circumcenter.

theorem affine.simplex.eq_circumradius_of_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {p : P} (hp : p ) {r : } (hr : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r) :

Given a point in the affine span from which all the points are equidistant, that distance is the circumradius.

theorem affine.simplex.circumradius_nonneg {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

theorem affine.simplex.circumradius_pos {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : (n + 1)) :

The circumradius of a simplex with at least two points is positive.

theorem affine.simplex.circumcenter_eq_point {V : Type u_1} {P : Type u_2} [metric_space P] [ P] (s : 0) (i : fin 1) :

The circumcenter of a 0-simplex equals its unique point.

theorem affine.simplex.circumcenter_eq_centroid {V : Type u_1} {P : Type u_2} [metric_space P] [ P] (s : 1) :

The circumcenter of a 1-simplex equals its centroid.

noncomputable def affine.simplex.orthogonal_projection_span {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

The orthogonal projection of a point p onto the hyperplane spanned by the simplex's points.

Equations
theorem affine.simplex.orthogonal_projection_vadd_smul_vsub_orthogonal_projection {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {p1 : P} (p2 : P) (r : ) (hp : p1 ) :

Adding a vector to a point in the given subspace, then taking the orthogonal projection, produces the original point if the vector is a multiple of the result of subtracting a point's orthogonal projection from that point.

theorem affine.simplex.coe_orthogonal_projection_vadd_smul_vsub_orthogonal_projection {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } {r₁ : } (s : n) {p p₁o : P} (hp₁o : p₁o ) :
theorem affine.simplex.dist_circumcenter_sq_eq_sq_sub_circumradius {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } {r : } (s : n) {p₁ : P} (h₁ : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p₁ = r) (h₁' : ((s.orthogonal_projection_span) p₁) = s.circumcenter) (h : s.points 0 ) :
= r * r -
theorem affine.simplex.orthogonal_projection_eq_circumcenter_of_exists_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {p : P} (hr : ∃ (r : ), ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r) :

If there exists a distance that a point has from all vertices of a simplex, the orthogonal projection of that point onto the subspace spanned by that simplex is its circumcenter.

theorem affine.simplex.orthogonal_projection_eq_circumcenter_of_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {p : P} {r : } (hr : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r) :

If a point has the same distance from all vertices of a simplex, the orthogonal projection of that point onto the subspace spanned by that simplex is its circumcenter.

theorem affine.simplex.orthogonal_projection_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {fs : finset (fin (n + 1))} {m : } (h : fs.card = m + 1) :

The orthogonal projection of the circumcenter onto a face is the circumcenter of that face.

theorem affine.simplex.circumcenter_eq_of_range_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } {s₁ s₂ : n} (h : = ) :

Two simplices with the same points have the same circumcenter.

@[protected, instance]
• point_index : Π {n : },
• circumcenter_index :

An index type for the vertices of a simplex plus its circumcenter. This is for use in calculations where it is convenient to work with affine combinations of vertices together with the circumcenter. (An equivalent form sometimes used in the literature is placing the circumcenter at the origin and working with vectors for the vertices.)

Instances for affine.simplex.points_with_circumcenter_index
@[protected, instance]
Equations

point_index as an embedding.

Equations
theorem affine.simplex.sum_points_with_circumcenter {α : Type u_1} {n : }  :
finset.univ.sum (λ (i : , f i) =

The sum of a function over points_with_circumcenter_index.

noncomputable def affine.simplex.points_with_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

The vertices of a simplex plus its circumcenter.

Equations
@[simp]
theorem affine.simplex.points_with_circumcenter_point {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) (i : fin (n + 1)) :

points_with_circumcenter, applied to a point_index value, equals points applied to that value.

@[simp]
theorem affine.simplex.points_with_circumcenter_eq_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

points_with_circumcenter, applied to circumcenter_index, equals the circumcenter.

The weights for a single vertex of a simplex, in terms of points_with_circumcenter.

Equations
@[simp]

point_weights_with_circumcenter sums to 1.

theorem affine.simplex.point_eq_affine_combination_of_points_with_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) (i : fin (n + 1)) :

A single vertex, in terms of points_with_circumcenter.

noncomputable def affine.simplex.centroid_weights_with_circumcenter {n : } (fs : finset (fin (n + 1))) :

The weights for the centroid of some vertices of a simplex, in terms of points_with_circumcenter.

Equations
@[simp]

centroid_weights_with_circumcenter sums to 1, if the finset is nonempty.

theorem affine.simplex.centroid_eq_affine_combination_of_points_with_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) (fs : finset (fin (n + 1))) :

The centroid of some vertices of a simplex, in terms of points_with_circumcenter.

The weights for the circumcenter of a simplex, in terms of points_with_circumcenter.

Equations
@[simp]

circumcenter_weights_with_circumcenter sums to 1.

theorem affine.simplex.circumcenter_eq_affine_combination_of_points_with_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) :

The circumcenter of a simplex, in terms of points_with_circumcenter.

The weights for the reflection of the circumcenter in an edge of a simplex. This definition is only valid with i₁ ≠ i₂.

Equations
@[simp]
theorem affine.simplex.sum_reflection_circumcenter_weights_with_circumcenter {n : } {i₁ i₂ : fin (n + 1)} (h : i₁ i₂) :

reflection_circumcenter_weights_with_circumcenter sums to 1.

theorem affine.simplex.reflection_circumcenter_eq_affine_combination_of_points_with_circumcenter {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } (s : n) {i₁ i₂ : fin (n + 1)} (h : i₁ i₂) :

The reflection of the circumcenter of a simplex in an edge, in terms of points_with_circumcenter.

theorem euclidean_geometry.cospherical_iff_exists_mem_of_complete {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s] [complete_space (s.direction)] :
∃ (center : P) (H : center s) (radius : ), ∀ (p : P), p ps center = radius

Given a nonempty affine subspace, whose direction is complete, that contains a set of points, those points are cospherical if and only if they are equidistant from some point in that subspace.

theorem euclidean_geometry.cospherical_iff_exists_mem_of_finite_dimensional {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s]  :
∃ (center : P) (H : center s) (radius : ), ∀ (p : P), p ps center = radius

Given a nonempty affine subspace, whose direction is finite-dimensional, that contains a set of points, those points are cospherical if and only if they are equidistant from some point in that subspace.

theorem euclidean_geometry.exists_circumradius_eq_of_cospherical_subset {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s] {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) :
∃ (r : ), ∀ (sx : n), pssx.circumradius = r

All n-simplices among cospherical points in an n-dimensional subspace have the same circumradius.

theorem euclidean_geometry.circumradius_eq_of_cospherical_subset {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s] {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : n} (hsx₁ : set.range sx₁.points ps) (hsx₂ : set.range sx₂.points ps) :

Two n-simplices among cospherical points in an n-dimensional subspace have the same circumradius.

theorem euclidean_geometry.exists_circumradius_eq_of_cospherical {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {ps : set P} {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) :
∃ (r : ), ∀ (sx : n), pssx.circumradius = r

All n-simplices among cospherical points in n-space have the same circumradius.

theorem euclidean_geometry.circumradius_eq_of_cospherical {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {ps : set P} {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : n} (hsx₁ : set.range sx₁.points ps) (hsx₂ : set.range sx₂.points ps) :

Two n-simplices among cospherical points in n-space have the same circumradius.

theorem euclidean_geometry.exists_circumcenter_eq_of_cospherical_subset {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s] {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) :
∃ (c : P), ∀ (sx : n), pssx.circumcenter = c

All n-simplices among cospherical points in an n-dimensional subspace have the same circumcenter.

theorem euclidean_geometry.circumcenter_eq_of_cospherical_subset {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {s : P} {ps : set P} (h : ps s) [nonempty s] {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : n} (hsx₁ : set.range sx₁.points ps) (hsx₂ : set.range sx₂.points ps) :

Two n-simplices among cospherical points in an n-dimensional subspace have the same circumcenter.

theorem euclidean_geometry.exists_circumcenter_eq_of_cospherical {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {ps : set P} {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) :
∃ (c : P), ∀ (sx : n), pssx.circumcenter = c

All n-simplices among cospherical points in n-space have the same circumcenter.

theorem euclidean_geometry.circumcenter_eq_of_cospherical {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {ps : set P} {n : } (hd : = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : n} (hsx₁ : set.range sx₁.points ps) (hsx₂ : set.range sx₂.points ps) :

Two n-simplices among cospherical points in n-space have the same circumcenter.

theorem euclidean_geometry.eq_or_eq_reflection_of_dist_eq {V : Type u_1} {P : Type u_2} [metric_space P] [ P] {n : } {s : n} {p p₁ p₂ : P} {r : } (hp₁ : p₁ (set.range s.points))) (hp₂ : p₂ (set.range s.points))) (h₁ : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p₁ = r) (h₂ : ∀ (i : fin (n + 1)), has_dist.dist (s.points i) p₂ = r) :
p₁ = p₂ p₁ =

Suppose all distances from p₁ and p₂ to the points of a simplex are equal, and that p₁ and p₂ lie in the affine span of p with the vertices of that simplex. Then p₁ and p₂ are equal or reflections of each other in the affine span of the vertices of the simplex.