The areas / V22. Affine, Euclidean and convex geometry
Mathlib.Geometry.Euclidean.Inversion.Basic
30 declarations. Mathlib docs · Source
Inversion in an affine space
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 of the sphere.
In many applications, it is convenient to assume that the inversion 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
EuclideanGeometry.mul_dist_le_mul_dist_add_mul_dist.
Basic properties
In this section we prove that EuclideanGeometry.inversion c R is involutive and preserves the
sphere Metric.sphere c R. We also prove that the distance to the center of the image of x under
this inversion is given by R ^ 2 / dist x c.
Similarity of triangles
If inversion with center O sends A to A' and B to B', then the triangle OB'A' is similar
to the triangle OAB with coefficient R ^ 2 / (|OA|*|OB|) and the triangle OA'B is similar to
the triangle OAB' with coefficient |OB|/|OA|. We formulate these statements in terms of ratios
of the lengths of their sides.
Ptolemy's inequality
Continuity of inversion
def EuclideanGeometry.inversion E1 #
{V : Type u_1} →
{P : Type u_2} →
[inst : NormedAddCommGroup V] →
[InnerProductSpace ℝ V] → [inst_2 : MetricSpace P] → [NormedAddTorsor V P] → P → ℝ → P → P
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.
theorem EuclideanGeometry.inversion_def E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P], EuclideanGeometry.inversion = fun c R x ↦ (R / dist x c) ^ 2 • (x -ᵥ c) +ᵥ c
theorem EuclideanGeometry.inversion_eq_lineMap E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) (R : ℝ) (x : P),
EuclideanGeometry.inversion c R x = (AffineMap.lineMap c x) ((R / dist x c) ^ 2)
theorem EuclideanGeometry.inversion_vsub_center E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) (R : ℝ) (x : P),
EuclideanGeometry.inversion c R x -ᵥ c = (R / dist x c) ^ 2 • (x -ᵥ c)
theorem EuclideanGeometry.inversion_self E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) (R : ℝ), EuclideanGeometry.inversion c R c = c
theorem EuclideanGeometry.inversion_zero_radius E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c x : P), EuclideanGeometry.inversion c 0 x = c
theorem EuclideanGeometry.inversion_mul E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) (a R : ℝ) (x : P),
EuclideanGeometry.inversion c (a * R) x = (AffineMap.homothety c (a ^ 2)) (EuclideanGeometry.inversion c R x)
theorem EuclideanGeometry.inversion_dist_center E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c x : P), EuclideanGeometry.inversion c (dist x c) x = x
theorem EuclideanGeometry.inversion_dist_center' E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c x : P), EuclideanGeometry.inversion c (dist c x) x = x
theorem EuclideanGeometry.inversion_of_mem_sphere E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x : P} {R : ℝ}, x ∈ Metric.sphere c R → EuclideanGeometry.inversion c R x = x
theorem EuclideanGeometry.dist_inversion_center E2 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c x : P) (R : ℝ), dist (EuclideanGeometry.inversion c R x) c = R ^ 2 / dist x c
Distance from the image of a point under inversion to the center. This formula accidentally
works for x = c.
theorem EuclideanGeometry.dist_center_inversion E2 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c x : P) (R : ℝ), dist c (EuclideanGeometry.inversion c R x) = R ^ 2 / dist c x
Distance from the center of an inversion to the image of a point under the inversion. This
formula accidentally works for x = c.
theorem EuclideanGeometry.inversion_inversion E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) {R : ℝ},
R ≠ 0 → ∀ (x : P), EuclideanGeometry.inversion c R (EuclideanGeometry.inversion c R x) = x
theorem EuclideanGeometry.inversion_involutive E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) {R : ℝ}, R ≠ 0 → Function.Involutive (EuclideanGeometry.inversion c R)
theorem EuclideanGeometry.inversion_surjective E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) {R : ℝ}, R ≠ 0 → Function.Surjective (EuclideanGeometry.inversion c R)
theorem EuclideanGeometry.inversion_injective E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) {R : ℝ}, R ≠ 0 → Function.Injective (EuclideanGeometry.inversion c R)
theorem EuclideanGeometry.inversion_bijective E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] (c : P) {R : ℝ}, R ≠ 0 → Function.Bijective (EuclideanGeometry.inversion c R)
theorem EuclideanGeometry.inversion_eq_center E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x : P} {R : ℝ}, R ≠ 0 → (EuclideanGeometry.inversion c R x = c ↔ x = c)
theorem EuclideanGeometry.inversion_eq_center' E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x : P} {R : ℝ}, EuclideanGeometry.inversion c R x = c ↔ x = c ∨ R = 0
theorem EuclideanGeometry.center_eq_inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x : P} {R : ℝ}, R ≠ 0 → (c = EuclideanGeometry.inversion c R x ↔ x = c)
theorem EuclideanGeometry.center_eq_inversion' E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x : P} {R : ℝ}, c = EuclideanGeometry.inversion c R x ↔ x = c ∨ R = 0
theorem EuclideanGeometry.dist_inversion_inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x y : P},
x ≠ c →
y ≠ c →
∀ (R : ℝ),
dist (EuclideanGeometry.inversion c R x) (EuclideanGeometry.inversion c R y) =
R ^ 2 / (dist x c * dist y c) * dist x y
Distance between the images of two points under an inversion.
theorem EuclideanGeometry.dist_inversion_mul_dist_center_eq E0 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c x y : P} {R : ℝ},
x ≠ c →
y ≠ c →
dist (EuclideanGeometry.inversion c R x) y * dist x c = dist x (EuclideanGeometry.inversion c R y) * dist y c
theorem EuclideanGeometry.mul_dist_le_mul_dist_add_mul_dist E2 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[NormedAddTorsor V P] (a b c d : P), dist a c * dist b d ≤ dist a b * dist c d + dist b c * dist a d
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
EuclideanGeometry.mul_dist_add_mul_dist_eq_mul_dist_of_cospherical.
theorem Filter.Tendsto.inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {α : Type u_3} {x c : P} {R : ℝ} {l : Filter α} {fc fx : α → P} {fR : α → ℝ},
Filter.Tendsto fc l (nhds c) →
Filter.Tendsto fR l (nhds R) →
Filter.Tendsto fx l (nhds x) →
x ≠ c →
Filter.Tendsto (fun a ↦ EuclideanGeometry.inversion (fc a) (fR a) (fx a)) l
(nhds (EuclideanGeometry.inversion c R x))
theorem ContinuousWithinAt.inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {X : Type u_3} [inst_4 : TopologicalSpace X] {c x : X → P} {R : X → ℝ} {a₀ : X}
{s : Set X},
ContinuousWithinAt c s a₀ →
ContinuousWithinAt R s a₀ →
ContinuousWithinAt x s a₀ →
x a₀ ≠ c a₀ → ContinuousWithinAt (fun a ↦ EuclideanGeometry.inversion (c a) (R a) (x a)) s a₀
theorem ContinuousAt.inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {X : Type u_3} [inst_4 : TopologicalSpace X] {c x : X → P} {R : X → ℝ} {a₀ : X},
ContinuousAt c a₀ →
ContinuousAt R a₀ →
ContinuousAt x a₀ → x a₀ ≠ c a₀ → ContinuousAt (fun a ↦ EuclideanGeometry.inversion (c a) (R a) (x a)) a₀
theorem ContinuousOn.inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {X : Type u_3} [inst_4 : TopologicalSpace X] {c x : X → P} {R : X → ℝ} {s : Set X},
ContinuousOn c s →
ContinuousOn R s →
ContinuousOn x s → (∀ a ∈ s, x a ≠ c a) → ContinuousOn (fun a ↦ EuclideanGeometry.inversion (c a) (R a) (x a)) s
theorem Continuous.inversion E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {X : Type u_3} [inst_4 : TopologicalSpace X] {c x : X → P} {R : X → ℝ},
Continuous c →
Continuous R →
Continuous x → (∀ (a : X), x a ≠ c a) → Continuous fun a ↦ EuclideanGeometry.inversion (c a) (R a) (x a)
theorem EuclideanGeometry.tendsto_inversion_nhdsNE_center_cobounded E1 #
∀ {V : Type u_1} {P : Type u_2} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace ℝ V] [inst_2 : MetricSpace P]
[inst_3 : NormedAddTorsor V P] {c : P} {R : ℝ},
R ≠ 0 → Filter.Tendsto (EuclideanGeometry.inversion c R) (nhdsWithin c {c}ᶜ) (Bornology.cobounded P)
The inversion of a point tends to infinity as it approaches the center of an inversion.