|
|
|
|
Quelle Isometry.lean
Sprache: Lean
|
|
/-
Copyright (c) 2021 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
module
public import Mathlib.Algebra.CharP.Invertible
public import Mathlib.Analysis.Normed.Group.AddTorsor
public import Mathlib.Analysis.Normed.Module.Basic
public import Mathlib.Analysis.Normed.Operator.LinearIsometry
public import Mathlib.Topology.Algebra.AffineSubspace
/-!
# Affine isometries
In this file we define `AffineIsometry P P₂` to be an affine isometric embedding of normed
add-torsors `P` into `P₂` over normed ``-spaces and `AffineIsometryEquiv` to be an affine
isometric equivalence between `P` and `P₂`.
We also prove basic lemmas and provide convenience constructors. The choice of these lemmas and
constructors is closely modelled on those for the `LinearIsometry` and `AffineMap` theories.
Since many elementary properties don't require `‖x‖ = 0 → x = 0` we initially set up the theory for
`SeminormedAddCommGroup` and specialize to `NormedAddCommGroup` only when needed.
## Notation
We introduce the notation `P →ᵃⁱ[] P₂` for `AffineIsometry P P₂`, and `P ≃ᵃⁱ[] P₂` for
`AffineIsometryEquiv P P₂`. In contrast with the notation `→ₗᵢ` for linear isometries, `≃ᵢ`
for isometric equivalences, etc., the "i" here is a superscript. This is for aesthetic reasons to
match the superscript "a" (note that in mathlib `→ᵃ` is an affine map, since `→ₐ` has been taken by
algebra-homomorphisms.)
-/
@[expose] public section
open Function Set Metric
variable ( : Type*) {V V₁ V₂ V₃ : Type*} {P₁ : Type*} (P P₂ : Type*) {P₃ : Type*}
[NormedField ]
[SeminormedAddCommGroup V] [NormedSpace V] [PseudoMetricSpace P] [NormedAddTorsor V P]
[SeminormedAddCommGroup V₁] [NormedSpace V₁] [PseudoMetricSpace P₁] [NormedAddTorsor V₁ P₁]
[SeminormedAddCommGroup V₂] [NormedSpace V₂] [PseudoMetricSpace P₂] [NormedAddTorsor V₂ P₂]
[SeminormedAddCommGroup V₃] [NormedSpace V₃] [PseudoMetricSpace P₃] [NormedAddTorsor V₃ P₃]
/-- A ``-affine isometric embedding of one normed add-torsor over a normed ``-space into
another, denoted as `f : P →ᵃⁱ[] P₂`. -/
structure AffineIsometry extends P →ᵃ[] P₂ where
norm_map : ∀ x : V, ‖linear x‖ = ‖x‖
variable { P P₂}
@[inherit_doc]
notation:25 -- `→ᵃᵢ` would be more consistent with the linear isometry notation, but it is uglier
P " →ᵃⁱ[" :25 "] " P₂:0 => AffineIsometry P P₂
namespace AffineIsometry
variable (f : P →ᵃⁱ[] P₂)
/-- The underlying linear map of an affine isometry is in fact a linear isometry. -/
protected def linearIsometry : V →ₗᵢ[] V₂ :=
{ f.linear with norm_map' := f.norm_map }
@[simp]
theorem linear_eq_linearIsometry : f.linear = f.linearIsometry.toLinearMap := by
ext
rfl
@[macro_inline]
instance : FunLike (P →ᵃⁱ[] P₂) P P₂ where
coe f := f.toFun
coe_injective f g := by cases f; cases g; simp
@[simp]
theorem coe_toAffineMap : ⇑f.toAffineMap = f := by
rfl
theorem toAffineMap_injective : Injective (toAffineMap : (P →ᵃⁱ[] P₂) → P →ᵃ[] P₂) := by
rintro ⟨f, _⟩ ⟨g, _⟩ rfl
rfl
theorem coeFn_injective : @Injective (P →ᵃⁱ[] P₂) (P → P₂) (↑) :=
AffineMap.coeFn_injective.comp toAffineMap_injective
@[ext]
theorem ext {f g : P →ᵃⁱ[] P₂} (h : ∀ x, f x = g x) : f = g :=
coeFn_injective <| funext h
end AffineIsometry
namespace LinearIsometry
variable (f : V →ₗᵢ[] V₂)
/-- Reinterpret a linear isometry as an affine isometry. -/
def toAffineIsometry : V →ᵃⁱ[] V₂ :=
{ f.toLinearMap.toAffineMap with norm_map := f.norm_map }
@[simp]
theorem coe_toAffineIsometry : ⇑(f.toAffineIsometry : V →ᵃⁱ[] V₂) = f :=
rfl
@[simp]
theorem toAffineIsometry_linearIsometry : f.toAffineIsometry.linearIsometry = f := by
ext
rfl
-- somewhat arbitrary choice of simp direction
@[simp]
theorem toAffineIsometry_toAffineMap : f.toAffineIsometry.toAffineMap = f.toLinearMap.toAffineMap :=
rfl
end LinearIsometry
namespace AffineIsometry
variable (f : P →ᵃⁱ[] P₂)
@[simp]
theorem map_vadd (p : P) (v : V) : f (v +ᵥ p) = f.linearIsometry v +ᵥ f p :=
f.toAffineMap.map_vadd p v
@[simp]
theorem map_vsub (p1 p2 : P) : f.linearIsometry (p1 -ᵥ p2) = f p1 -ᵥ f p2 :=
f.toAffineMap.linear_apply_vsub p1 p2
@[simp]
theorem dist_map (x y : P) : dist (f x) (f y) = dist x y := by
rw [dist_eq_norm_vsub V₂, dist_eq_norm_vsub V, ← map_vsub, f.linearIsometry.norm_map]
@[simp]
theorem nndist_map (x y : P) : nndist (f x) (f y) = nndist x y := by simp [nndist_dist]
@[simp]
theorem edist_map (x y : P) : edist (f x) (f y) = edist x y := by simp [edist_dist]
protected theorem isometry : Isometry f :=
f.edist_map
section injective
variable {V₁' P₁' : Type*} [SeminormedAddCommGroup V₁'] [NormedSpace V₁'] [MetricSpace P₁']
[NormedAddTorsor V₁' P₁'] (f₁ : P₁' →ᵃⁱ[] P₂)
protected theorem injective : Injective f₁ :=
f₁.isometry.injective
@[simp]
theorem map_eq_iff {x y : P₁'} : f₁ x = f₁ y ↔ x = y :=
f₁.injective.eq_iff
theorem map_ne {x y : P₁'} (h : x ≠ y) : f₁ x ≠ f₁ y :=
f₁.injective.ne h
end injective
protected theorem lipschitzWith : LipschitzWith 1 f :=
f.isometry.lipschitzWith
protected theorem antilipschitzWith : AntilipschitzWith 1 f :=
f.isometry.antilipschitzWith
@[deprecated (since := "2026-09-20")] alias lipschitz := AffineIsometry.lipschitzWith
@[deprecated (since := "2026-09-20")] alias antilipschitz := AffineIsometry.antilipschitzWith
@[continuity]
protected theorem continuous : Continuous f :=
f.isometry.continuous
theorem ediam_image (s : Set P) : ediam (f '' s) = ediam s :=
f.isometry.ediam_image s
theorem ediam_range : ediam (range f) = ediam (univ : Set P) :=
f.isometry.ediam_range
theorem diam_image (s : Set P) : Metric.diam (f '' s) = Metric.diam s :=
f.isometry.diam_image s
theorem diam_range : Metric.diam (range f) = Metric.diam (univ : Set P) :=
f.isometry.diam_range
/-- Interpret an affine isometry as a continuous affine map. -/
def toContinuousAffineMap : P →ᴬ[] P₂ := { f with cont := f.continuous }
theorem toContinuousAffineMap_injective :
Function.Injective (toContinuousAffineMap : _ → P →ᴬ[] P₂) := fun x _ h =>
coeFn_injective (congr_arg _ h : ⇑x.toContinuousAffineMap = _)
@[simp]
theorem toContinuousAffineMap_inj {f g : P →ᵃⁱ[] P₂} :
f.toContinuousAffineMap = g.toContinuousAffineMap ↔ f = g :=
toContinuousAffineMap_injective.eq_iff
@[simp]
theorem coe_toContinuousAffineMap : ⇑f.toContinuousAffineMap = f := rfl
@[simp]
theorem comp_continuous_iff {α : Type*} [TopologicalSpace α] {g : α → P} :
Continuous (f ∘ g) ↔ Continuous g :=
f.isometry.comp_continuous_iff
/-- The identity affine isometry. -/
def id : P →ᵃⁱ[] P :=
⟨AffineMap.id P, fun _ => rfl⟩
@[simp, norm_cast]
theorem coe_id : ⇑(id : P →ᵃⁱ[] P) = _root_.id :=
rfl
@[simp]
theorem id_apply (x : P) : (AffineIsometry.id : P →ᵃⁱ[] P) x = x :=
rfl
@[simp]
theorem id_toAffineMap : (id.toAffineMap : P →ᵃ[] P) = AffineMap.id P :=
rfl
@[simp]
theorem toContinuousAffineMap_id : id.toContinuousAffineMap = ContinuousAffineMap.id P :=
rfl
instance : Inhabited (P →ᵃⁱ[] P) :=
⟨id⟩
/-- Composition of affine isometries. -/
def comp (g : P₂ →ᵃⁱ[] P₃) (f : P →ᵃⁱ[] P₂) : P →ᵃⁱ[] P₃ :=
⟨g.toAffineMap.comp f.toAffineMap, fun _ => (g.norm_map _).trans (f.norm_map _)⟩
@[simp]
theorem coe_comp (g : P₂ →ᵃⁱ[] P₃) (f : P →ᵃⁱ[] P₂) : ⇑(g.comp f) = g ∘ f :=
rfl
@[simp]
theorem id_comp : (id : P₂ →ᵃⁱ[] P₂).comp f = f :=
ext fun _ => rfl
@[simp]
theorem comp_id : f.comp id = f :=
ext fun _ => rfl
theorem comp_assoc {V₄ P₄ : Type*} [SeminormedAddCommGroup V₄] [NormedSpace V₄]
[PseudoMetricSpace P₄] [NormedAddTorsor V₄ P₄]
(f : P₃ →ᵃⁱ[] P₄) (g : P₂ →ᵃⁱ[] P₃) (h : P →ᵃⁱ[] P₂) :
(f.comp g).comp h = f.comp (g.comp h) :=
rfl
instance : One (P →ᵃⁱ[] P) where
one := id
instance : IsOneApplyEqSelf (P →ᵃⁱ[] P) where
@[simp]
theorem toAffineMap_one : (1 : P →ᵃⁱ[] P).toAffineMap = 1 := rfl
instance : Mul (P →ᵃⁱ[] P) where
mul := comp
instance : IsMulApplyEqComp (P →ᵃⁱ[] P) where
@[simp]
theorem toAffineMap_mul (f g : P →ᵃⁱ[] P) : (f * g).toAffineMap = f.toAffineMap * g.toAffineMap :=
rfl
instance : Pow (P →ᵃⁱ[] P) ℕ where
pow f n :=
{ toAffineMap := f.toAffineMap ^ n
norm_map x := by
induction n with
| zero => rfl
| succ n hn => simp [pow_succ', hn, -AffineMap.pow_linear] }
instance : IsNPowApplyEqIterate (P →ᵃⁱ[] P) where
@[simp]
theorem toAffineMap_pow (f : P →ᵃⁱ[] P) (n : ℕ) : (f ^ n).toAffineMap = f.toAffineMap ^ n := rfl
instance : Monoid (P →ᵃⁱ[] P) := fast_instance% FunLike.compMonoid
@[deprecated FunLike.coe_one_eq_id +typeChanged (since := "2026-11-02")]
theorem coe_one : ⇑(1 : P →ᵃⁱ[] P) = _root_.id :=
rfl
@[deprecated FunLike.coe_mul_eq_comp +typeChanged (since := "2026-11-02")]
theorem coe_mul (f g : P →ᵃⁱ[] P) : ⇑(f * g) = f ∘ g :=
rfl
end AffineIsometry
namespace AffineSubspace
/-- `AffineSubspace.subtype` as an `AffineIsometry`. -/
def subtypeₐᵢ (s : AffineSubspace P) [Nonempty s] : s →ᵃⁱ[] P :=
{ s.subtype with norm_map := s.direction.subtypeₗᵢ.norm_map }
theorem subtypeₐᵢ_linear (s : AffineSubspace P) [Nonempty s] :
s.subtypeₐᵢ.linear = s.direction.subtype :=
rfl
@[simp]
theorem subtypeₐᵢ_linearIsometry (s : AffineSubspace P) [Nonempty s] :
s.subtypeₐᵢ.linearIsometry = s.direction.subtypeₗᵢ :=
rfl
@[simp]
theorem coe_subtypeₐᵢ (s : AffineSubspace P) [Nonempty s] : ⇑s.subtypeₐᵢ = s.subtype :=
rfl
@[simp]
theorem subtypeₐᵢ_toAffineMap (s : AffineSubspace P) [Nonempty s] :
s.subtypeₐᵢ.toAffineMap = s.subtype :=
rfl
@[simp]
theorem toContinuousAffineMap_subtypeₐᵢ (s : AffineSubspace P) [Nonempty s] :
s.subtypeₐᵢ.toContinuousAffineMap = s.subtypeA :=
rfl
end AffineSubspace
variable ( P P₂)
/-- An affine isometric equivalence between two normed vector spaces,
denoted `f : P ≃ᵃⁱ[] P₂`. -/
structure AffineIsometryEquiv extends P ≃ᵃ[] P₂ where
norm_map : ∀ x, ‖linear x‖ = ‖x‖
variable { P P₂}
-- `≃ᵃᵢ` would be more consistent with the linear isometry equiv notation, but it is uglier
@[inherit_doc] notation:25 P " ≃ᵃⁱ[" :25 "] " P₂:0 => AffineIsometryEquiv P P₂
namespace AffineIsometryEquiv
variable (e : P ≃ᵃⁱ[] P₂)
/-- The underlying linear equiv of an affine isometry equiv is in fact a linear isometry equiv. -/
protected def linearIsometryEquiv : V ≃ₗᵢ[] V₂ :=
{ e.linear with norm_map' := e.norm_map }
@[simp]
theorem linear_eq_linear_isometry : e.linear = e.linearIsometryEquiv.toLinearEquiv := by
ext
rfl
@[macro_inline]
instance : EquivLike (P ≃ᵃⁱ[] P₂) P P₂ where
coe f := f.toFun
inv f := f.invFun
left_inv f := f.left_inv
right_inv f := f.right_inv
coe_injective' f g h _ := by
cases f
cases g
congr
simpa [DFunLike.coe_injective.eq_iff] using h
@[simp]
theorem coe_mk (e : P ≃ᵃ[] P₂) (he : ∀ x, ‖e.linear x‖ = ‖x‖) : ⇑(mk e he) = e :=
rfl
@[simp]
theorem coe_toAffineEquiv (e : P ≃ᵃⁱ[] P₂) : ⇑e.toAffineEquiv = e :=
rfl
theorem toAffineEquiv_injective : Injective (toAffineEquiv : (P ≃ᵃⁱ[] P₂) → P ≃ᵃ[] P₂)
| ⟨_, _⟩, ⟨_, _⟩, rfl => rfl
@[ext]
theorem ext {e e' : P ≃ᵃⁱ[] P₂} (h : ∀ x, e x = e' x) : e = e' :=
toAffineEquiv_injective <| AffineEquiv.ext h
theorem coeFn_injective : @Injective (P ≃ᵃⁱ[] P₂) (P → P₂) (fun f => f) :=
DFunLike.coe_injective
/-- Reinterpret an `AffineIsometryEquiv` as an `AffineIsometry`. -/
def toAffineIsometry : P →ᵃⁱ[] P₂ :=
⟨e.1.toAffineMap, e.2⟩
@[simp]
theorem coe_toAffineIsometry : ⇑e.toAffineIsometry = e :=
rfl
/-- Construct an affine isometry equivalence by verifying the relation between the map and its
linear part at one base point. Namely, this function takes a map `e : P₁ → P₂`, a linear isometry
equivalence `e' : V₁ ≃ᵢₗ[k] V₂`, and a point `p` such that for any other point `p'` we have
`e p' = e' (p' -ᵥ p) +ᵥ e p`. -/
def mk' (e : P₁ → P₂) (e' : V₁ ≃ₗᵢ[] V₂) (p : P₁) (h : ∀ p' : P₁, e p' = e' (p' -ᵥ p) +ᵥ e p) :
P₁ ≃ᵃⁱ[] P₂ :=
{ AffineEquiv.mk' e e'.toLinearEquiv p h with norm_map := e'.norm_map }
@[simp]
theorem coe_mk' (e : P₁ → P₂) (e' : V₁ ≃ₗᵢ[] V₂) (p h) : ⇑(mk' e e' p h) = e :=
rfl
@[simp]
theorem linearIsometryEquiv_mk' (e : P₁ → P₂) (e' : V₁ ≃ₗᵢ[] V₂) (p h) :
(mk' e e' p h).linearIsometryEquiv = e' := by
ext
rfl
end AffineIsometryEquiv
namespace LinearIsometryEquiv
variable (e : V ≃ₗᵢ[] V₂)
/-- Reinterpret a linear isometry equiv as an affine isometry equiv. -/
def toAffineIsometryEquiv : V ≃ᵃⁱ[] V₂ :=
{ e.toLinearEquiv.toAffineEquiv with norm_map := e.norm_map }
@[simp]
theorem coe_toAffineIsometryEquiv : ⇑(e.toAffineIsometryEquiv : V ≃ᵃⁱ[] V₂) = e := by
rfl
@[simp]
theorem toAffineIsometryEquiv_linearIsometryEquiv :
e.toAffineIsometryEquiv.linearIsometryEquiv = e := by
ext
rfl
-- somewhat arbitrary choice of simp direction
@[simp]
theorem toAffineIsometryEquiv_toAffineEquiv :
e.toAffineIsometryEquiv.toAffineEquiv = e.toLinearEquiv.toAffineEquiv :=
rfl
-- somewhat arbitrary choice of simp direction
@[simp]
theorem toAffineIsometryEquiv_toAffineIsometry :
e.toAffineIsometryEquiv.toAffineIsometry = e.toLinearIsometry.toAffineIsometry :=
rfl
end LinearIsometryEquiv
namespace AffineIsometryEquiv
variable (e : P ≃ᵃⁱ[] P₂)
protected theorem isometry : Isometry e :=
e.toAffineIsometry.isometry
/-- Reinterpret an `AffineIsometryEquiv` as an `IsometryEquiv`. -/
def toIsometryEquiv : P ≃ᵢ P₂ :=
⟨e.toAffineEquiv.toEquiv, e.isometry⟩
@[simp]
theorem coe_toIsometryEquiv : ⇑e.toIsometryEquiv = e :=
rfl
theorem range_eq_univ (e : P ≃ᵃⁱ[] P₂) : Set.range e = Set.univ := by
rw [← coe_toIsometryEquiv]
exact IsometryEquiv.range_eq_univ _
/-- Reinterpret an `AffineIsometryEquiv` as a `Homeomorph`. -/
def toHomeomorph : P ≃ₜ P₂ :=
e.toIsometryEquiv.toHomeomorph
@[simp]
theorem coe_toHomeomorph : ⇑e.toHomeomorph = e :=
rfl
protected theorem continuous : Continuous e :=
e.isometry.continuous
protected theorem continuousAt {x} : ContinuousAt e x :=
e.continuous.continuousAt
protected theorem continuousOn {s} : ContinuousOn e s :=
e.continuous.continuousOn
protected theorem continuousWithinAt {s x} : ContinuousWithinAt e s x :=
e.continuous.continuousWithinAt
/-- Interpret a `AffineIsometryEquiv` as a `ContinuousAffineEquiv`. -/
def toContinuousAffineEquiv : P ≃ᴬ[] P₂ :=
{ e.toAffineEquiv, e.toHomeomorph with }
theorem toContinuousAffineEquiv_injective :
Function.Injective (toContinuousAffineEquiv : _ → P ≃ᴬ[] P₂) := fun x _ h =>
coeFn_injective (congr_arg _ h : ⇑x.toContinuousAffineEquiv = _)
@[simp]
theorem toContinuousAffineEquiv_inj {f g : P ≃ᵃⁱ[] P₂} :
f.toContinuousAffineEquiv = g.toContinuousAffineEquiv ↔ f = g :=
toContinuousAffineEquiv_injective.eq_iff
@[simp]
theorem coe_toContinuousAffineEquiv : ⇑e.toContinuousAffineEquiv = e :=
rfl
/-- Reinterpret a `AffineIsometryEquiv` as a `ContinuousAffineEquiv`. -/
instance : Coe (P ≃ᵃⁱ[] P₂) (P ≃ᴬ[] P₂) :=
⟨fun e => e.toContinuousAffineEquiv⟩
variable ( P)
/-- Identity map as an `AffineIsometryEquiv`. -/
def refl : P ≃ᵃⁱ[] P :=
⟨AffineEquiv.refl P, fun _ => rfl⟩
variable { P}
instance : Inhabited (P ≃ᵃⁱ[] P) :=
⟨refl P⟩
@[simp]
theorem coe_refl : ⇑(refl P) = id :=
rfl
@[simp]
theorem toAffineEquiv_refl : (refl P).toAffineEquiv = AffineEquiv.refl P :=
rfl
@[simp]
theorem toContinuousAffineEquiv_refl : (refl P).toContinuousAffineEquiv = .refl P := rfl
@[simp]
theorem toIsometryEquiv_refl : (refl P).toIsometryEquiv = IsometryEquiv.refl P :=
rfl
@[simp]
theorem toHomeomorph_refl : (refl P).toHomeomorph = Homeomorph.refl P :=
rfl
/-- The inverse `AffineIsometryEquiv`. -/
def symm : P₂ ≃ᵃⁱ[] P :=
{ e.toAffineEquiv.symm with norm_map := e.linearIsometryEquiv.symm.norm_map }
@[simp]
theorem apply_symm_apply (x : P₂) : e (e.symm x) = x :=
e.toAffineEquiv.apply_symm_apply x
@[simp]
theorem symm_apply_apply (x : P) : e.symm (e x) = x :=
e.toAffineEquiv.symm_apply_apply x
@[simp]
theorem symm_symm : e.symm.symm = e := rfl
theorem symm_apply_eq {x y} : e.symm x = y ↔ x = e y :=
e.toAffineEquiv.symm_apply_eq
theorem eq_symm_apply {x y} : y = e.symm x ↔ e y = x :=
e.toAffineEquiv.eq_symm_apply
theorem symm_bijective : Bijective (AffineIsometryEquiv.symm : (P₂ ≃ᵃⁱ[] P) → _) :=
Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
@[simp]
theorem toAffineEquiv_symm : e.symm.toAffineEquiv = e.toAffineEquiv.symm :=
rfl
@[simp]
theorem coe_symm_toAffineEquiv : ⇑e.toAffineEquiv.symm = e.symm :=
rfl
@[simp]
theorem toContinuousAffineEquiv_symm :
e.symm.toContinuousAffineEquiv = e.toContinuousAffineEquiv.symm := rfl
@[simp]
theorem coe_symm_toContinuousAffineEquiv : ⇑e.toContinuousAffineEquiv.symm = e.symm :=
rfl
@[simp]
theorem toIsometryEquiv_symm : e.symm.toIsometryEquiv = e.toIsometryEquiv.symm :=
rfl
@[simp]
theorem coe_symm_toIsometryEquiv : ⇑e.toIsometryEquiv.symm = e.symm :=
rfl
@[simp]
theorem toHomeomorph_symm : e.symm.toHomeomorph = e.toHomeomorph.symm :=
rfl
@[simp]
theorem coe_symm_toHomeomorph : ⇑e.toHomeomorph.symm = e.symm :=
rfl
/-- Composition of `AffineIsometryEquiv`s as an `AffineIsometryEquiv`. -/
def trans (e' : P₂ ≃ᵃⁱ[] P₃) : P ≃ᵃⁱ[] P₃ :=
⟨e.toAffineEquiv.trans e'.toAffineEquiv, fun _ => (e'.norm_map _).trans (e.norm_map _)⟩
@[simp]
theorem coe_trans (e₁ : P ≃ᵃⁱ[] P₂) (e₂ : P₂ ≃ᵃⁱ[] P₃) : ⇑(e₁.trans e₂) = e₂ ∘ e₁ :=
rfl
@[simp]
theorem trans_refl : e.trans (refl P₂) = e :=
ext fun _ => rfl
@[simp]
theorem refl_trans : (refl P).trans e = e :=
ext fun _ => rfl
@[simp]
theorem self_trans_symm : e.trans e.symm = refl P :=
ext e.symm_apply_apply
@[simp]
theorem symm_trans_self : e.symm.trans e = refl P₂ :=
ext e.apply_symm_apply
@[simp]
theorem coe_symm_trans (e₁ : P ≃ᵃⁱ[] P₂) (e₂ : P₂ ≃ᵃⁱ[] P₃) :
⇑(e₁.trans e₂).symm = e₁.symm ∘ e₂.symm :=
rfl
theorem trans_assoc {V₄ P₄ : Type*} [SeminormedAddCommGroup V₄] [NormedSpace V₄]
[PseudoMetricSpace P₄] [NormedAddTorsor V₄ P₄]
(ePP₂ : P ≃ᵃⁱ[] P₂) (eP₂G : P₂ ≃ᵃⁱ[] P₃) (eGG' : P₃ ≃ᵃⁱ[] P₄) :
ePP₂.trans (eP₂G.trans eGG') = (ePP₂.trans eP₂G).trans eGG' :=
rfl
/-- The group of affine isometries of a `NormedAddTorsor`, `P`. -/
instance instGroup : Group (P ≃ᵃⁱ[] P) where
mul e₁ e₂ := e₂.trans e₁
one := refl _ _
inv := symm
one_mul := trans_refl
mul_one := refl_trans
mul_assoc _ _ _ := trans_assoc _ _ _
inv_mul_cancel := self_trans_symm
@[simp]
theorem coe_one : ⇑(1 : P ≃ᵃⁱ[] P) = id :=
rfl
@[simp]
theorem coe_mul (e e' : P ≃ᵃⁱ[] P) : ⇑(e * e') = e ∘ e' :=
rfl
@[simp]
theorem coe_inv (e : P ≃ᵃⁱ[] P) : ⇑e⁻¹ = e.symm :=
rfl
@[simp]
theorem map_vadd (p : P) (v : V) : e (v +ᵥ p) = e.linearIsometryEquiv v +ᵥ e p :=
e.toAffineIsometry.map_vadd p v
@[simp]
theorem map_vsub (p1 p2 : P) : e.linearIsometryEquiv (p1 -ᵥ p2) = e p1 -ᵥ e p2 :=
e.toAffineIsometry.map_vsub p1 p2
@[simp]
theorem dist_map (x y : P) : dist (e x) (e y) = dist x y :=
e.toAffineIsometry.dist_map x y
@[simp]
theorem edist_map (x y : P) : edist (e x) (e y) = edist x y :=
e.toAffineIsometry.edist_map x y
protected theorem bijective : Bijective e :=
e.1.bijective
protected theorem injective : Injective e :=
e.1.injective
protected theorem surjective : Surjective e :=
e.1.surjective
theorem map_eq_iff {x y : P} : e x = e y ↔ x = y :=
e.injective.eq_iff
theorem map_ne {x y : P} (h : x ≠ y) : e x ≠ e y :=
e.injective.ne h
protected theorem lipschitzWith : LipschitzWith 1 e :=
e.isometry.lipschitzWith
protected theorem antilipschitzWith : AntilipschitzWith 1 e :=
e.isometry.antilipschitzWith
@[deprecated (since := "2026-09-20")] alias lipschitz := AffineIsometryEquiv.lipschitzWith
@[deprecated (since := "2026-09-20")] alias antilipschitz := AffineIsometryEquiv.antilipschitzWith
@[simp]
theorem ediam_image (s : Set P) : ediam (e '' s) = ediam s :=
e.isometry.ediam_image s
@[simp]
theorem diam_image (s : Set P) : Metric.diam (e '' s) = Metric.diam s :=
e.isometry.diam_image s
variable {α : Type*} [TopologicalSpace α]
@[simp]
theorem comp_continuousOn_iff {f : α → P} {s : Set α} : ContinuousOn (e ∘ f) s ↔ ContinuousOn f s :=
e.isometry.comp_continuousOn_iff
@[simp]
theorem comp_continuous_iff {f : α → P} : Continuous (e ∘ f) ↔ Continuous f :=
e.isometry.comp_continuous_iff
section Constructions
variable (s₁ s₂ : AffineSubspace P) [Nonempty s₁] [Nonempty s₂]
/-- The identity equivalence of an affine subspace equal to `⊤` to the whole space. -/
def ofTop (h : s₁ = ⊤) : s₁ ≃ᵃⁱ[] P :=
{ (AffineEquiv.ofEq s₁ ⊤ h).trans (AffineSubspace.topEquiv V P) with norm_map := fun _ ↦ rfl }
variable {s₁}
@[simp]
lemma ofTop_apply (h : s₁ = ⊤) (x : s₁) : (ofTop s₁ h x : P) = x :=
rfl
@[simp]
lemma ofTop_symm_apply_coe (h : s₁ = ⊤) (x : P) : (ofTop s₁ h).symm x = x :=
rfl
variable (s₁)
/-- `AffineEquiv.ofEq` as an `AffineIsometryEquiv`. -/
def ofEq (h : s₁ = s₂) : s₁ ≃ᵃⁱ[] s₂ :=
{ AffineEquiv.ofEq s₁ s₂ h with norm_map := fun _ ↦ rfl }
variable {s₁ s₂}
@[simp]
lemma coe_ofEq_apply (h : s₁ = s₂) (x : s₁) : (ofEq s₁ s₂ h x : P) = x :=
rfl
@[simp]
lemma ofEq_symm (h : s₁ = s₂) : (ofEq s₁ s₂ h).symm = ofEq s₂ s₁ h.symm :=
rfl
@[simp]
lemma ofEq_rfl : ofEq s₁ s₁ rfl = refl s₁ :=
rfl
variable () in
/-- The map `v ↦ v +ᵥ p` as an affine isometric equivalence between `V` and `P`. -/
def vaddConst (p : P) : V ≃ᵃⁱ[] P :=
{ AffineEquiv.vaddConst p with norm_map := fun _ => rfl }
@[simp]
theorem coe_vaddConst (p : P) : ⇑(vaddConst p) = fun v => v +ᵥ p :=
rfl
@[simp]
theorem coe_vaddConst' (p : P) : ↑(AffineEquiv.vaddConst p) = fun v => v +ᵥ p :=
rfl
@[simp]
theorem coe_vaddConst_symm (p : P) : ⇑(vaddConst p).symm = fun p' => p' -ᵥ p :=
rfl
@[simp]
theorem vaddConst_toAffineEquiv (p : P) :
(vaddConst p).toAffineEquiv = AffineEquiv.vaddConst p :=
rfl
variable () in
/-- `p' ↦ p -ᵥ p'` as an affine isometric equivalence. -/
def constVSub (p : P) : P ≃ᵃⁱ[] V :=
{ AffineEquiv.constVSub p with norm_map := norm_neg }
@[simp]
theorem coe_constVSub (p : P) : ⇑(constVSub p) = (p -ᵥ ·) :=
rfl
@[simp]
theorem symm_constVSub (p : P) :
(constVSub p).symm =
(LinearIsometryEquiv.neg ).toAffineIsometryEquiv.trans (vaddConst p) := by
ext
rfl
variable ( P) in
/-- Translation by `v` (that is, the map `p ↦ v +ᵥ p`) as an affine isometric automorphism of `P`.
-/
def constVAdd (v : V) : P ≃ᵃⁱ[] P :=
{ AffineEquiv.constVAdd P v with norm_map := fun _ => rfl }
@[simp]
theorem coe_constVAdd (v : V) : ⇑(constVAdd P v : P ≃ᵃⁱ[] P) = (v +ᵥ ·) :=
rfl
@[simp]
theorem constVAdd_zero : constVAdd P (0 : V) = refl P :=
ext <| zero_vadd V
include in
/-- The map `g` from `V` to `V₂` corresponding to a map `f` from `P` to `P₂`, at a base point `p`,
is an isometry if `f` is one. -/
theorem vadd_vsub {f : P → P₂} (hf : Isometry f) {p : P} {g : V → V₂}
(hg : ∀ v, g v = f (v +ᵥ p) -ᵥ f p) : Isometry g := by
convert (vaddConst (f p)).symm.isometry.comp (hf.comp (vaddConst p).isometry)
exact funext hg
variable () in
/-- Point reflection in `x` as an affine isometric automorphism. -/
def pointReflection (x : P) : P ≃ᵃⁱ[] P :=
(constVSub x).trans (vaddConst x)
theorem pointReflection_apply (x y : P) : (pointReflection x) y = (x -ᵥ y) +ᵥ x :=
rfl
@[simp]
theorem pointReflection_toAffineEquiv (x : P) :
(pointReflection x).toAffineEquiv = AffineEquiv.pointReflection x :=
rfl
@[simp]
theorem pointReflection_self (x : P) : pointReflection x x = x :=
AffineEquiv.pointReflection_self x
theorem pointReflection_involutive (x : P) : Function.Involutive (pointReflection x) :=
Equiv.pointReflection_involutive x
@[simp]
theorem pointReflection_symm (x : P) : (pointReflection x).symm = pointReflection x :=
toAffineEquiv_injective <| AffineEquiv.pointReflection_symm x
@[simp]
theorem dist_pointReflection_fixed (x y : P) : dist (pointReflection x y) x = dist y x := by
rw [← (pointReflection x).dist_map y x, pointReflection_self]
theorem dist_pointReflection_self' (x y : P) :
dist (pointReflection x y) y = ‖2 • (x -ᵥ y)‖ := by
rw [pointReflection_apply, dist_eq_norm_vsub V, vadd_vsub_assoc, two_nsmul]
theorem dist_pointReflection_self (x y : P) :
dist (pointReflection x y) y = ‖(2 : )‖ * dist x y := by
rw [dist_pointReflection_self', two_nsmul, ← two_smul , norm_smul, ← dist_eq_norm_vsub V]
theorem pointReflection_fixed_iff [Invertible (2 : )] {x y : P} :
pointReflection x y = y ↔ y = x :=
AffineEquiv.pointReflection_fixed_iff_of_module
variable [NormedSpace ℝ V]
theorem dist_pointReflection_self_real (x y : P) :
dist (pointReflection ℝ x y) y = 2 * dist x y := by
rw [dist_pointReflection_self, Real.norm_two]
@[simp]
theorem pointReflection_midpoint_left (x y : P) : pointReflection ℝ (midpoint ℝ x y) x = y :=
AffineEquiv.pointReflection_midpoint_left x y
@[simp]
theorem pointReflection_midpoint_right (x y : P) : pointReflection ℝ (midpoint ℝ x y) y = x :=
AffineEquiv.pointReflection_midpoint_right x y
end Constructions
end AffineIsometryEquiv
namespace AffineSubspace
/-- An affine subspace is isomorphic to its image under an injective affine map.
This is the affine version of `Submodule.equivMapOfInjective`.
-/
@[simps linear, simps! toFun]
noncomputable def equivMapOfInjective (E : AffineSubspace P₁) [Nonempty E] (φ : P₁ →ᵃ[] P₂)
(hφ : Function.Injective φ) : E ≃ᵃ[] E.map φ :=
{ Equiv.Set.image _ (E : Set P₁) hφ with
linear :=
(E.direction.equivMapOfInjective φ.linear (φ.linear_injective_iff.mpr hφ)).trans
(LinearEquiv.ofEq _ _ (AffineSubspace.map_direction _ _).symm)
map_vadd' := fun p v => Subtype.ext <| φ.map_vadd p v }
section isometryEquivMap
variable {V₁' P₁' : Type*} [SeminormedAddCommGroup V₁'] [NormedSpace V₁'] [MetricSpace P₁']
[NormedAddTorsor V₁' P₁']
/-- Restricts an affine isometry to an affine isometry equivalence between a nonempty affine
subspace `E` and its image.
This is an isometry version of `AffineSubspace.equivMap`, having a stronger premise and a stronger
conclusion.
-/
noncomputable def isometryEquivMap (φ : P₁' →ᵃⁱ[] P₂) (E : AffineSubspace P₁') [Nonempty E] :
E ≃ᵃⁱ[] E.map φ.toAffineMap :=
⟨E.equivMapOfInjective φ.toAffineMap φ.injective, fun _ => φ.norm_map _⟩
@[simp]
theorem isometryEquivMap.apply_symm_apply {E : AffineSubspace P₁'} [Nonempty E]
{φ : P₁' →ᵃⁱ[] P₂} (x : E.map φ.toAffineMap) : φ ((E.isometryEquivMap φ).symm x) = x :=
congr($((E.isometryEquivMap φ).apply_symm_apply _).val)
@[simp]
theorem isometryEquivMap.coe_apply (φ : P₁' →ᵃⁱ[] P₂) (E : AffineSubspace P₁') [Nonempty E]
(g : E) : ↑(E.isometryEquivMap φ g) = φ g :=
rfl
@[simp]
theorem isometryEquivMap.toAffineMap_eq (φ : P₁' →ᵃⁱ[] P₂) (E : AffineSubspace P₁')
[Nonempty E] :
(E.isometryEquivMap φ).toAffineMap = E.equivMapOfInjective φ.toAffineMap φ.injective :=
rfl
end isometryEquivMap
end AffineSubspace
¤ Dauer der Verarbeitung: 0.22 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|
|
|
|
|