Imports
/-
Copyright (c) 2026 Shaopeng Zhu. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Shaopeng Zhu
-/
module
public import Mathlib.Analysis.InnerProductSpace.PiL2Euclidean group
This file defines the Euclidean group as translations composed with orthogonal maps, together with the special Euclidean group, translation subgroup, and rotation subgroups.
The affine group, together with the inclusion of the Euclidean group into it, is defined in
Physlib.SpaceAndTime.Space.EuclideanGroup.AffineGroup.
@[expose] public section
An n-dimensional Euclidean group is a group of
rotations, reflections, and translations.
The translation part of a Euclidean transformation.
The orthogonal linear part of a Euclidean transformation.
@[ext]
structure EuclideanGroup (n : ℕ) where translation : EuclideanSpace ℝ (Fin n) linear : Matrix.orthogonalGroup (Fin n) ℝ
One/Mul projection lemmas
These expose the semidirect-product formulas behind the Group instance so that simp can
reduce the translation/linear components of 1 and A * B.
@[simp] lemma one_translation : (1 : EuclideanGroup n).translation = 0 := rfl@[simp] lemma one_linear : (1 : EuclideanGroup n).linear = 1 := rfl@[simp] lemma mul_translation (A B : EuclideanGroup n) :
(A * B).translation = A.translation + A.linear • B.translation := rfl@[simp] lemma mul_linear (A B : EuclideanGroup n) :
(A * B).linear = A.linear * B.linear := rflAll goals completed! 🐙
private lemma coe_inv {n : ℕ} (Q : Matrix.orthogonalGroup (Fin n) ℝ) :
(Q⁻¹).val = (Q.val)⁻¹ := by n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ ↑Q⁻¹ = (↑Q)⁻¹
symm n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ (↑Q)⁻¹ = ↑Q⁻¹
apply Matrix.inv_eq_right_inv n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ ↑Q * ↑Q⁻¹ = 1
rw [← Submonoid.coe_mul, n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ ↑(Q * Q⁻¹) = 1 All goals completed! 🐙 mul_inv_cancel, n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ ↑1 = 1 All goals completed! 🐙 OneMemClass.coe_one n:ℕQ:↥(Matrix.orthogonalGroup (Fin n) ℝ)⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙Special Euclidean Group is the subgroup with det(Q) = 1 where Q ∈ O(n)
def SpecialEuclideanGroup (n : ℕ) : Subgroup (EuclideanGroup n) where
carrier := {g | g.linear.val.det = 1}
mul_mem' {a b} ha hb := by n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ a * b ∈ {g | (↑g.linear).det = 1}
show (a.linear * b.linear).val.det = 1 n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ (↑(a.linear * b.linear)).det = 1
rw [Submonoid.coe_mul, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ (↑a.linear * ↑b.linear).det = 1 All goals completed! 🐙 Matrix.det_mul, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ (↑a.linear).det * (↑b.linear).det = 1 All goals completed! 🐙 ha, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ 1 * (↑b.linear).det = 1 All goals completed! 🐙 hb, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ 1 * 1 = 1 All goals completed! 🐙 one_mul n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}hb:b ∈ {g | (↑g.linear).det = 1}⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙
one_mem' := by n:ℕ⊢ 1 ∈ {g | (↑g.linear).det = 1}
show (1 : ↥(Matrix.orthogonalGroup (Fin n) ℝ)).val.det = 1 n:ℕ⊢ (↑1).det = 1
rw [OneMemClass.coe_one, n:ℕ⊢ Matrix.det 1 = 1 All goals completed! 🐙 Matrix.det_one n:ℕ⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙
inv_mem' {a} ha := by n:ℕa:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}⊢ a⁻¹ ∈ {g | (↑g.linear).det = 1}
show (a.linear⁻¹).val.det = 1 n:ℕa:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}⊢ (↑a.linear⁻¹).det = 1
rw [det_coe_inv, n:ℕa:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}⊢ (↑a.linear).det⁻¹ = 1 All goals completed! 🐙 ha, n:ℕa:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}⊢ 1⁻¹ = 1 All goals completed! 🐙 inv_one n:ℕa:EuclideanGroup nha:a ∈ {g | (↑g.linear).det = 1}⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙Translation is the subgroup with Q = 1.
def TranslationGroup (n : ℕ) : Subgroup (EuclideanGroup n) where
carrier := {g | g.linear.val = 1}
mul_mem' {a b} ha hb := by n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ a * b ∈ {g | ↑g.linear = 1}
show (a.linear * b.linear).val = 1 n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ ↑(a.linear * b.linear) = 1
rw [Submonoid.coe_mul, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ ↑a.linear * ↑b.linear = 1 All goals completed! 🐙 ha, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ 1 * ↑b.linear = 1 All goals completed! 🐙 hb, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ 1 * 1 = 1 All goals completed! 🐙 one_mul n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}hb:b ∈ {g | ↑g.linear = 1}⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙
one_mem' := by n:ℕ⊢ 1 ∈ {g | ↑g.linear = 1}
show (1 : ↥(Matrix.orthogonalGroup (Fin n) ℝ)).val = 1 n:ℕ⊢ ↑1 = 1
rw [OneMemClass.coe_one n:ℕ⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙
inv_mem' {a} ha := by n:ℕa:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}⊢ a⁻¹ ∈ {g | ↑g.linear = 1}
show (a.linear⁻¹).val = 1 n:ℕa:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}⊢ ↑a.linear⁻¹ = 1
rw [coe_inv, n:ℕa:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}⊢ (↑a.linear)⁻¹ = 1 All goals completed! 🐙 ha, n:ℕa:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}⊢ 1⁻¹ = 1 All goals completed! 🐙 inv_one n:ℕa:EuclideanGroup nha:a ∈ {g | ↑g.linear = 1}⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙MonoidHom including a translation vector into the Euclidean Group.
def translationVector.incl (n : ℕ) :
Multiplicative (EuclideanSpace ℝ (Fin n)) →* EuclideanGroup n where
toFun v := ⟨v.toAdd, 1⟩
map_one' := by n:ℕ⊢ { translation := Multiplicative.toAdd 1, linear := 1 } = 1 rfl All goals completed! 🐙
map_mul' x y := by n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ { translation := Multiplicative.toAdd (x * y), linear := 1 } =
{ translation := Multiplicative.toAdd x, linear := 1 } * { translation := Multiplicative.toAdd y, linear := 1 }
refine EuclideanGroup.ext ?_ ?_ refine_1 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ { translation := Multiplicative.toAdd (x * y), linear := 1 }.translation =
({ translation := Multiplicative.toAdd x, linear := 1 } *
{ translation := Multiplicative.toAdd y, linear := 1 }).translationrefine_2 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ { translation := Multiplicative.toAdd (x * y), linear := 1 }.linear =
({ translation := Multiplicative.toAdd x, linear := 1 } *
{ translation := Multiplicative.toAdd y, linear := 1 }).linear
· refine_1 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ { translation := Multiplicative.toAdd (x * y), linear := 1 }.translation =
({ translation := Multiplicative.toAdd x, linear := 1 } *
{ translation := Multiplicative.toAdd y, linear := 1 }).translation show Multiplicative.toAdd (x * y) =
Multiplicative.toAdd x +
(1 : Matrix.orthogonalGroup (Fin n) ℝ) • Multiplicative.toAdd y refine_1 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ Multiplicative.toAdd (x * y) = Multiplicative.toAdd x + 1 • Multiplicative.toAdd y
simp All goals completed! 🐙
· refine_2 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ { translation := Multiplicative.toAdd (x * y), linear := 1 }.linear =
({ translation := Multiplicative.toAdd x, linear := 1 } *
{ translation := Multiplicative.toAdd y, linear := 1 }).linear show 1 = 1 * 1 refine_2 n:ℕx:Multiplicative (EuclideanSpace ℝ (Fin n))y:Multiplicative (EuclideanSpace ℝ (Fin n))⊢ 1 = 1 * 1
simp [mul_one] All goals completed! 🐙
An API feature: the translation vector inclusion image is the TranslationGroup carrier.
lemma translationVector.incl_range :
Set.range (@translationVector.incl n) = (TranslationGroup n : Set (EuclideanGroup n)) := by n:ℕ⊢ Set.range ⇑(incl n) = ↑(TranslationGroup n)
ext g n:ℕg:EuclideanGroup n⊢ g ∈ Set.range ⇑(incl n) ↔ g ∈ ↑(TranslationGroup n)
constructor mp n:ℕg:EuclideanGroup n⊢ g ∈ Set.range ⇑(incl n) → g ∈ ↑(TranslationGroup n)mpr n:ℕg:EuclideanGroup n⊢ g ∈ ↑(TranslationGroup n) → g ∈ Set.range ⇑(incl n)
· mp n:ℕg:EuclideanGroup n⊢ g ∈ Set.range ⇑(incl n) → g ∈ ↑(TranslationGroup n) rintro ⟨v, hv⟩ mp n:ℕg:EuclideanGroup nv:Multiplicative (EuclideanSpace ℝ (Fin n))hv:(incl n) v = g⊢ g ∈ ↑(TranslationGroup n)
show g.linear.val = 1 mp n:ℕg:EuclideanGroup nv:Multiplicative (EuclideanSpace ℝ (Fin n))hv:(incl n) v = g⊢ ↑g.linear = 1
rw [← hv mp n:ℕg:EuclideanGroup nv:Multiplicative (EuclideanSpace ℝ (Fin n))hv:(incl n) v = g⊢ ↑((incl n) v).linear = 1 mp n:ℕg:EuclideanGroup nv:Multiplicative (EuclideanSpace ℝ (Fin n))hv:(incl n) v = g⊢ ↑((incl n) v).linear = 1] mp n:ℕg:EuclideanGroup nv:Multiplicative (EuclideanSpace ℝ (Fin n))hv:(incl n) v = g⊢ ↑((incl n) v).linear = 1
rfl All goals completed! 🐙
· mpr n:ℕg:EuclideanGroup n⊢ g ∈ ↑(TranslationGroup n) → g ∈ Set.range ⇑(incl n) intro h mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ g ∈ Set.range ⇑(incl n)
rw [Set.mem_range mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ ∃ y, (incl n) y = g mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ ∃ y, (incl n) y = g]mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ ∃ y, (incl n) y = g
refine ⟨g.translation, ?_⟩ mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ (incl n) g.translation = g
show (⟨g.translation, 1⟩ : EuclideanGroup n) = g mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ { translation := g.translation, linear := 1 } = g
refine EuclideanGroup.ext rfl ?_ mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ { translation := g.translation, linear := 1 }.linear = g.linear
apply Subtype.ext mpr n:ℕg:EuclideanGroup nh:g ∈ ↑(TranslationGroup n)⊢ ↑{ translation := g.translation, linear := 1 }.linear = ↑g.linear
simp [h.symm] All goals completed! 🐙The translation by the zero vector is the identity of the Euclidean group.
lemma translation_zero : translationVector.incl n
(Multiplicative.ofAdd (0 : EuclideanSpace ℝ (Fin n))) = 1 := by n:ℕ⊢ (translationVector.incl n) (Multiplicative.ofAdd 0) = 1
simp All goals completed! 🐙
The subgroup of EuclideanGroup n whose elements fix the origin
(translation = 0). This is the copy of O(n) sitting inside E(n).
def OriginStabilizer (n : ℕ) : Subgroup (EuclideanGroup n) where
carrier := {g | g.translation = 0}
mul_mem' {a b} ha hb := by n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ a * b ∈ {g | g.translation = 0}
show a.translation + a.linear • b.translation = 0 n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ a.translation + a.linear • b.translation = 0
rw [ha, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ 0 + a.linear • b.translation = 0 All goals completed! 🐙 hb, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ 0 + a.linear • 0 = 0 All goals completed! 🐙 smul_zero, n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ 0 + 0 = 0 All goals completed! 🐙 zero_add n:ℕa:EuclideanGroup nb:EuclideanGroup nha:a ∈ {g | g.translation = 0}hb:b ∈ {g | g.translation = 0}⊢ 0 = 0 All goals completed! 🐙] All goals completed! 🐙
one_mem' := rfl
inv_mem' {a} ha := by n:ℕa:EuclideanGroup nha:a ∈ {g | g.translation = 0}⊢ a⁻¹ ∈ {g | g.translation = 0}
show a.linear⁻¹ • (-a.translation) = 0 n:ℕa:EuclideanGroup nha:a ∈ {g | g.translation = 0}⊢ a.linear⁻¹ • -a.translation = 0
rw [ha, n:ℕa:EuclideanGroup nha:a ∈ {g | g.translation = 0}⊢ a.linear⁻¹ • -0 = 0 All goals completed! 🐙 neg_zero, n:ℕa:EuclideanGroup nha:a ∈ {g | g.translation = 0}⊢ a.linear⁻¹ • 0 = 0 All goals completed! 🐙 smul_zero n:ℕa:EuclideanGroup nha:a ∈ {g | g.translation = 0}⊢ 0 = 0 All goals completed! 🐙] All goals completed! 🐙
RotationsAbout.toOrigin p followed by RotationsAbout.fromOrigin p is the identity; the
forward leg of the isomorphism RotationsAboutEquiv.
lemma RotationsAbout.fromOrigin_comp_toOrigin :
(RotationsAbout.fromOrigin p).comp (RotationsAbout.toOrigin p) =
MonoidHom.id (RotationsAbout p) := by n:ℕp:EuclideanSpace ℝ (Fin n)⊢ (fromOrigin p).comp (toOrigin p) = MonoidHom.id ↥(RotationsAbout p)
apply MonoidHom.ext n:ℕp:EuclideanSpace ℝ (Fin n)⊢ ∀ (x : ↥(RotationsAbout p)), ((fromOrigin p).comp (toOrigin p)) x = (MonoidHom.id ↥(RotationsAbout p)) x
intro x n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationsAbout p)⊢ ((fromOrigin p).comp (toOrigin p)) x = (MonoidHom.id ↥(RotationsAbout p)) x
apply Subtype.ext n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationsAbout p)⊢ ↑(((fromOrigin p).comp (toOrigin p)) x) = ↑((MonoidHom.id ↥(RotationsAbout p)) x)
simp only [MonoidHom.coe_comp, Function.comp_apply, MonoidHom.id_apply, SetLike.coe_eq_coe] n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationsAbout p)⊢ (fromOrigin p) ((toOrigin p) x) = x
unfold RotationsAbout.toOrigin n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationsAbout p)⊢ (fromOrigin p)
({
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd (-p)) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd p),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
x) =
x
unfold RotationsAbout.fromOrigin n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationsAbout p)⊢ {
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd p) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd (-p)),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
({
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd (-p)) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd p),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
x) =
x
simp [mul_assoc] All goals completed! 🐙
RotationsAbout.fromOrigin p followed by RotationsAbout.toOrigin p is the identity; the
backward leg of the isomorphism RotationsAboutEquiv.
lemma RotationsAbout.toOrigin_comp_fromOrigin :
(RotationsAbout.toOrigin p).comp (RotationsAbout.fromOrigin p) =
MonoidHom.id (RotationGroup n) := by n:ℕp:EuclideanSpace ℝ (Fin n)⊢ (toOrigin p).comp (fromOrigin p) = MonoidHom.id ↥(RotationGroup n)
apply MonoidHom.ext n:ℕp:EuclideanSpace ℝ (Fin n)⊢ ∀ (x : ↥(RotationGroup n)), ((toOrigin p).comp (fromOrigin p)) x = (MonoidHom.id ↥(RotationGroup n)) x
intro x n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationGroup n)⊢ ((toOrigin p).comp (fromOrigin p)) x = (MonoidHom.id ↥(RotationGroup n)) x
apply Subtype.ext n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationGroup n)⊢ ↑(((toOrigin p).comp (fromOrigin p)) x) = ↑((MonoidHom.id ↥(RotationGroup n)) x)
simp only [MonoidHom.coe_comp, Function.comp_apply, MonoidHom.id_apply, SetLike.coe_eq_coe] n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationGroup n)⊢ (toOrigin p) ((fromOrigin p) x) = x
unfold RotationsAbout.toOrigin n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationGroup n)⊢ {
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd (-p)) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd p),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
((fromOrigin p) x) =
x
unfold RotationsAbout.fromOrigin n:ℕp:EuclideanSpace ℝ (Fin n)x:↥(RotationGroup n)⊢ {
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd (-p)) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd p),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
({
toFun := fun g =>
⟨(translationVector.incl n) (Multiplicative.ofAdd p) * ↑g *
(translationVector.incl n) (Multiplicative.ofAdd (-p)),
⋯⟩,
map_one' := ⋯, map_mul' := ⋯ }
x) =
x
simp [mul_assoc] All goals completed! 🐙
API feature: the degenerate identity that RotationsAbout 0 = RotationGroup n
lemma RotationsAbout_zero : RotationsAbout (0 : EuclideanSpace ℝ (Fin n)) = RotationGroup n := by n:ℕ⊢ RotationsAbout 0 = RotationGroup n
apply Subgroup.ext n:ℕ⊢ ∀ (x : EuclideanGroup n), x ∈ RotationsAbout 0 ↔ x ∈ RotationGroup n
intro g n:ℕg:EuclideanGroup n⊢ g ∈ RotationsAbout 0 ↔ g ∈ RotationGroup n
constructor mp n:ℕg:EuclideanGroup n⊢ g ∈ RotationsAbout 0 → g ∈ RotationGroup nmpr n:ℕg:EuclideanGroup n⊢ g ∈ RotationGroup n → g ∈ RotationsAbout 0
· mp n:ℕg:EuclideanGroup n⊢ g ∈ RotationsAbout 0 → g ∈ RotationGroup n intro hg mp n:ℕg:EuclideanGroup nhg:g ∈ RotationsAbout 0⊢ g ∈ RotationGroup n
obtain ⟨g1, hg1⟩ := hg mp n:ℕg:EuclideanGroup ng1:↥(RotationGroup n)hg1:g = (translationVector.incl n) (Multiplicative.ofAdd 0) * ↑g1 * (translationVector.incl n) (Multiplicative.ofAdd (-0))⊢ g ∈ RotationGroup n
simp at hg1 mp n:ℕg:EuclideanGroup ng1:↥(RotationGroup n)hg1:g = ↑g1⊢ g ∈ RotationGroup n
rw [hg1 mp n:ℕg:EuclideanGroup ng1:↥(RotationGroup n)hg1:g = ↑g1⊢ ↑g1 ∈ RotationGroup n mp n:ℕg:EuclideanGroup ng1:↥(RotationGroup n)hg1:g = ↑g1⊢ ↑g1 ∈ RotationGroup n] mp n:ℕg:EuclideanGroup ng1:↥(RotationGroup n)hg1:g = ↑g1⊢ ↑g1 ∈ RotationGroup n
simp All goals completed! 🐙
· mpr n:ℕg:EuclideanGroup n⊢ g ∈ RotationGroup n → g ∈ RotationsAbout 0 intro hg mpr n:ℕg:EuclideanGroup nhg:g ∈ RotationGroup n⊢ g ∈ RotationsAbout 0
use ⟨g, hg⟩ h n:ℕg:EuclideanGroup nhg:g ∈ RotationGroup n⊢ g =
(translationVector.incl n) (Multiplicative.ofAdd 0) * ↑⟨g, hg⟩ *
(translationVector.incl n) (Multiplicative.ofAdd (-0))
simp All goals completed! 🐙Rotations are members of special orthogonal groups and can be viewed as members of orthogonal groups.
def specialOrthogonal.incl (n : ℕ) :
Matrix.specialOrthogonalGroup (Fin n) ℝ →* Matrix.orthogonalGroup (Fin n) ℝ :=
Submonoid.inclusion Matrix.specialUnitaryGroup_le_unitaryGroupThe Euclidean group element given by a rotation about the origin (zero translation).
def ofRotation (Q : Matrix.specialOrthogonalGroup (Fin n) ℝ) :
EuclideanGroup n := ⟨0, specialOrthogonal.incl n Q⟩Specialization to a group element from a rotation and a translation.
def ofRotationTranslation (Q : Matrix.specialOrthogonalGroup (Fin n) ℝ)
(t : EuclideanSpace ℝ (Fin n)) : EuclideanGroup n :=
⟨t, specialOrthogonal.incl n Q⟩The specialization projects back to the translation component.
@[simp]
lemma ofRotationTranslation_translation (Q : Matrix.specialOrthogonalGroup (Fin n) ℝ)
(t : EuclideanSpace ℝ (Fin n)) :
(ofRotationTranslation Q t).translation = t := rflThe specialization projects back to the linear (rotation) component.
@[simp]
lemma ofRotationTranslation_linear (Q : Matrix.specialOrthogonalGroup (Fin n) ℝ)
(t : EuclideanSpace ℝ (Fin n)) :
(ofRotationTranslation Q t).linear = specialOrthogonal.incl n Q := rflAPI feature: the inclusion image decomposes as group product.
@[simp]
lemma ofRotationTranslation_decompose (Q : Matrix.specialOrthogonalGroup (Fin n) ℝ)
(t : EuclideanSpace ℝ (Fin n)) :
(ofRotationTranslation Q t) =
(translationVector.incl n (Multiplicative.ofAdd t)) * (ofRotation (Q)) := by n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ ofRotationTranslation Q t = (translationVector.incl n) (Multiplicative.ofAdd t) * ofRotation Q
refine EuclideanGroup.ext ?_ ?_ refine_1 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (ofRotationTranslation Q t).translation =
((translationVector.incl n) (Multiplicative.ofAdd t) * ofRotation Q).translationrefine_2 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (ofRotationTranslation Q t).linear = ((translationVector.incl n) (Multiplicative.ofAdd t) * ofRotation Q).linear
· refine_1 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (ofRotationTranslation Q t).translation =
((translationVector.incl n) (Multiplicative.ofAdd t) * ofRotation Q).translation show t = t + (1 : Matrix.orthogonalGroup (Fin n) ℝ) • 0 refine_1 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ t = t + 1 • 0
rw [smul_zero, refine_1 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ t = t + 0 All goals completed! 🐙 add_zero refine_1 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ t = t All goals completed! 🐙] All goals completed! 🐙
· refine_2 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (ofRotationTranslation Q t).linear = ((translationVector.incl n) (Multiplicative.ofAdd t) * ofRotation Q).linear show specialOrthogonal.incl n Q = 1 * specialOrthogonal.incl n Q refine_2 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (specialOrthogonal.incl n) Q = 1 * (specialOrthogonal.incl n) Q
rw [one_mul refine_2 n:ℕQ:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)t:EuclideanSpace ℝ (Fin n)⊢ (specialOrthogonal.incl n) Q = (specialOrthogonal.incl n) Q All goals completed! 🐙] All goals completed! 🐙
specialOrthogonal.toRotation n followed by specialOrthogonal.fromRotation n is the identity;
the forward leg of the isomorphism specialOrthogonalEquiv.
lemma specialOrthogonal.fromRotation_comp_toRotation :
(specialOrthogonal.fromRotation n).comp (specialOrthogonal.toRotation n) =
MonoidHom.id (Matrix.specialOrthogonalGroup (Fin n) ℝ) := by n:ℕ⊢ (fromRotation n).comp (toRotation n) = MonoidHom.id ↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)
apply MonoidHom.ext n:ℕ⊢ ∀ (x : ↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)),
((fromRotation n).comp (toRotation n)) x = (MonoidHom.id ↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)) x
intro x n:ℕx:↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)⊢ ((fromRotation n).comp (toRotation n)) x = (MonoidHom.id ↥(Matrix.specialOrthogonalGroup (Fin n) ℝ)) x
rfl All goals completed! 🐙
specialOrthogonal.fromRotation n followed by specialOrthogonal.toRotation n is the identity;
the backward leg of the isomorphism specialOrthogonalEquiv.
lemma specialOrthogonal.toRotation_comp_fromRotation :
(specialOrthogonal.toRotation n).comp (specialOrthogonal.fromRotation n) =
MonoidHom.id (RotationGroup n) := by n:ℕ⊢ (toRotation n).comp (fromRotation n) = MonoidHom.id ↥(RotationGroup n)
apply MonoidHom.ext n:ℕ⊢ ∀ (x : ↥(RotationGroup n)), ((toRotation n).comp (fromRotation n)) x = (MonoidHom.id ↥(RotationGroup n)) x
intro x n:ℕx:↥(RotationGroup n)⊢ ((toRotation n).comp (fromRotation n)) x = (MonoidHom.id ↥(RotationGroup n)) x
apply Subtype.ext n:ℕx:↥(RotationGroup n)⊢ ↑(((toRotation n).comp (fromRotation n)) x) = ↑((MonoidHom.id ↥(RotationGroup n)) x)
refine EuclideanGroup.ext ?_ ?_ refine_1 n:ℕx:↥(RotationGroup n)⊢ (↑(((toRotation n).comp (fromRotation n)) x)).translation = (↑((MonoidHom.id ↥(RotationGroup n)) x)).translationrefine_2 n:ℕx:↥(RotationGroup n)⊢ (↑(((toRotation n).comp (fromRotation n)) x)).linear = (↑((MonoidHom.id ↥(RotationGroup n)) x)).linear
· refine_1 n:ℕx:↥(RotationGroup n)⊢ (↑(((toRotation n).comp (fromRotation n)) x)).translation = (↑((MonoidHom.id ↥(RotationGroup n)) x)).translation show (0 : EuclideanSpace ℝ (Fin n)) = x.val.translation refine_1 n:ℕx:↥(RotationGroup n)⊢ 0 = (↑x).translation
have h : x.val.translation = 0 := x.property.right refine_1 n:ℕx:↥(RotationGroup n)h:(↑x).translation = 0⊢ 0 = (↑x).translation
rw [h refine_1 n:ℕx:↥(RotationGroup n)h:(↑x).translation = 0⊢ 0 = 0 All goals completed! 🐙] All goals completed! 🐙
· refine_2 n:ℕx:↥(RotationGroup n)⊢ (↑(((toRotation n).comp (fromRotation n)) x)).linear = (↑((MonoidHom.id ↥(RotationGroup n)) x)).linear rfl All goals completed! 🐙