mathlib documentation

geometry.euclidean.circumcenter

Circumcenter and circumradius #

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 #

References #

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

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.

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.

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.

The circumsphere of a simplex.

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

The circumcenter of a simplex.

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

The circumradius of a simplex.

Equations
@[simp]

The center of the circumsphere is the circumcenter.

@[simp]

The radius of the circumsphere is the circumradius.

The circumcenter lies in the affine span.

@[simp]

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

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

All points lie in the circumsphere.

@[simp]

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {n : } (s : affine.simplex P n) {p : P} (hp : p affine_span (set.range s.points)) {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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {n : } (s : affine.simplex P n) {p : P} (hp : p affine_span (set.range s.points)) {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.

The circumradius is non-negative.

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

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

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

The circumcenter of a 1-simplex equals its centroid.

@[simp]
theorem affine.simplex.circumsphere_reindex {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {m n : } (s : affine.simplex P m) (e : fin (m + 1) fin (n + 1)) :

Reindexing a simplex along an equiv of index types does not change the circumsphere.

@[simp]
theorem affine.simplex.circumcenter_reindex {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {m n : } (s : affine.simplex P m) (e : fin (m + 1) fin (n + 1)) :

Reindexing a simplex along an equiv of index types does not change the circumcenter.

@[simp]
theorem affine.simplex.circumradius_reindex {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {m n : } (s : affine.simplex P m) (e : fin (m + 1) fin (n + 1)) :

Reindexing a simplex along an equiv of index types does not change the circumradius.

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

Equations

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.

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.

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.

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

Two simplices with the same points have the same circumcenter.

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
@[simp]

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

@[simp]

points_with_circumcenter, applied to circumcenter_index, equals the circumcenter.

@[simp]

centroid_weights_with_circumcenter sums to 1, if the finset is nonempty.

@[simp]

reflection_circumcenter_weights_with_circumcenter sums to 1.

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {s : affine_subspace P} {ps : set P} (h : ps s) [nonempty s] [complete_space (s.direction)] :
euclidean_geometry.cospherical ps (center : P) (H : center s) (radius : ), (p : P), p ps has_dist.dist p 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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {s : affine_subspace P} {ps : set P} (h : ps s) [nonempty s] [finite_dimensional (s.direction)] :
euclidean_geometry.cospherical ps (center : P) (H : center s) (radius : ), (p : P), p ps has_dist.dist p 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.

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

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

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {ps : set P} {n : } [finite_dimensional V] (hd : finite_dimensional.finrank V = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : affine.simplex P 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.

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

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

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {ps : set P} {n : } [finite_dimensional V] (hd : finite_dimensional.finrank V = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : affine.simplex P 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.

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

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

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

theorem euclidean_geometry.circumsphere_eq_of_cospherical {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {ps : set P} {n : } [finite_dimensional V] (hd : finite_dimensional.finrank V = n) (hc : euclidean_geometry.cospherical ps) {sx₁ sx₂ : affine.simplex P 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 circumsphere.

theorem euclidean_geometry.eq_or_eq_reflection_of_dist_eq {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {n : } {s : affine.simplex P n} {p p₁ p₂ : P} {r : } (hp₁ : p₁ affine_span (has_insert.insert p (set.range s.points))) (hp₂ : p₂ affine_span (has_insert.insert 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) :

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.