Inversion in an affine space #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
In this file we define inversion in a sphere in an affine space. This map sends each point x
to
the point y
such that y -ᵥ c = (R / dist x c) ^ 2 • (x -ᵥ c)
, where c
and R
are the center
and the radius the sphere.
In many applications, it is convenient to assume that the inversions swaps the center and the point at infinity. In order to stay in the original affine space, we define the map so that it sends center to itself.
Currently, we prove only a few basic lemmas needed to prove Ptolemy's inequality, see
euclidean_geometry.mul_dist_le_mul_dist_add_mul_dist
.
Inversion in a sphere in an affine space. This map sends each point x
to the point y
such
that y -ᵥ c = (R / dist x c) ^ 2 • (x -ᵥ c)
, where c
and R
are the center and the radius the
sphere.
Equations
- euclidean_geometry.inversion c R x = (R / has_dist.dist x c) ^ 2 • (x -ᵥ c) +ᵥ c
Distance from the image of a point under inversion to the center. This formula accidentally
works for x = c
.
Distance from the center of an inversion to the image of a point under the inversion. This
formula accidentally works for x = c
.
Distance between the images of two points under an inversion.
Ptolemy's inequality: in a quadrangle ABCD
, |AC| * |BD| ≤ |AB| * |CD| + |BC| * |AD|
. If
ABCD
is a convex cyclic polygon, then this inequality becomes an equality, see
euclidean_geometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical
.