mathlib documentation

geometry.​euclidean.​circumcenter

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 two points in s if and only if its orthogonal_projection is.

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {s : affine_subspace P} (hn : s.nonempty) (hc : is_complete (s.direction)) {ps : set P} (hps : ps s) (p : P) :
(∃ (r : ), ∀ (p1 : P), p1 pshas_dist.dist p1 p = r) ∃ (r : ), ∀ (p1 : P), p1 pshas_dist.dist p1 ((euclidean_geometry.orthogonal_projection hn hc) p) = r

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} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {s : affine_subspace P} (hn : s.nonempty) (hc : is_complete (s.direction)) {ps : set P} (hnps : ps.nonempty) {p : P} :
ps sp s(∃! (cccr : P × ), cccr.fst s ∀ (p1 : P), p1 pshas_dist.dist p1 cccr.fst = cccr.snd)(∃! (cccr₂ : P × ), cccr₂.fst affine_span (has_insert.insert p s) ∀ (p1 : P), p1 has_insert.insert p pshas_dist.dist 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 euclidean_geometry.​exists_unique_dist_eq_of_affine_independent {V : Type u_1} {P : Type u_2} [inner_product_space V] [metric_space P] [normed_add_torsor V P] {ι : Type u_3} [hne : nonempty ι] [fintype ι] {p : ι → P} :
affine_independent p(∃! (cccr : P × ), cccr.fst affine_span (set.range p) ∀ (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.

The pair (circumcenter, circumradius) of a simplex.

Equations

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

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 : } :

The circumcenter of a simplex.

Equations
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 : } :

The circumradius of a simplex.

Equations

The circumcenter lies in the affine span.

@[simp]

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

@[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 : } :
(∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r)p = s.circumcenter

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 : } :
(∀ (i : fin (n + 1)), has_dist.dist (s.points i) p = r)r = s.circumradius

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

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.)

@[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.

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