Zulip Chat Archive
Stream: Is there code for X?
Topic: Stating that a group has a specific presentation
Stepan Nesterov (Oct 23 2025 at 18:05):
I am trying to state a theorem that the dihedral group has the presentation <r,s | r^n=s^2=1, rsr^(-1)=s^(-1)>. One way this could be done is that I can construct a particular isomorphism, and then state a theorem that the particular elements map to the generators. This is what I have so far, but it is a bit unwieldy:
import Mathlib.GroupTheory.SpecificGroups.Dihedral
import Mathlib.GroupTheory.PresentedGroup
inductive DGen : Type
| r | s
deriving DecidableEq, Repr
open DGen
namespace DPres
/-- In the free group, the formal generators `r` and `s`. -/
def rF : FreeGroup DGen := FreeGroup.of r
def sF : FreeGroup DGen := FreeGroup.of s
/-- The relators for the dihedral presentation:
`r^n = 1`, `s^2 = 1`, and `s r s r = 1` (equivalent to `s r s = r⁻¹`). -/
def rels (n : ℕ) : Set (FreeGroup DGen) :=
{ rF ^ n, sF ^ 2, sF * rF * sF * rF }
/-- The group presented by `⟨ r, s | r^n = 1, s^2 = 1, s r s = r⁻¹ ⟩`. -/
abbrev PresentedDihedralGroup (n : ℕ) : Type := PresentedGroup (rels n)
def DihedralPresentation (n : ℕ) : DihedralGroup n ≃* PresentedDihedralGroup n where
toFun := sorry
invFun := sorry
left_inv := sorry
right_inv := sorry
map_mul' := sorry
/-- Stating that the isomorphism maps r and sr to the generators--/
theorem DihedralPresentation_r_to_rF (n : ℕ) : DihedralPresentation n (DihedralGroup.r 1) = PresentedGroup.mk (rels n) rF := by
sorry
theorem DihedralPresentation_sr_to_sF (n : ℕ) : DihedralPresentation n (DihedralGroup.sr 1) = PresentedGroup.mk (rels n) sF := by
sorry
Is there a good way to package this information in one statement?
Kenny Lau (Oct 23 2025 at 18:09):
you can define the type Presentation in general (to be a (maybe ordered) subset of a free group, for example)
Vlad Tsyrklevich (Oct 23 2025 at 18:44):
I have a proof of this specific statement here, no promises it's the best way to write it though
Vlad Tsyrklevich (Oct 23 2025 at 18:46):
I think using .of r is easy enough that it makes the rF/sF vars unnecessary. Otherwise basically the same as what you have written.
Vlad Tsyrklevich (Oct 23 2025 at 19:01):
Regarding the original question, there is not currently a way to package it into one statement.
Kevin Buzzard (Oct 23 2025 at 19:06):
Isn't "the dihedral group has the presentation <r,s | r^n=s^2=1, rsr^(-1)=s^(-1)>." just this theorem
example (n : ℕ) : Nonempty (DihedralGroup n ≃* PresentedDihedralGroup n)
?
Vlad Tsyrklevich (Oct 23 2025 at 19:13):
I think the "packaging" is of the isomorphism as well the facts that the individual generators map onto specific elements in the target group.
Thomas Browning (Oct 23 2025 at 19:17):
You could state it as the kernel of the map from the free group being the closure of a specific finite set.
Stepan Nesterov (Oct 23 2025 at 19:22):
Kevin Buzzard said:
Isn't "the dihedral group has the presentation <r,s | r^n=s^2=1, rsr^(-1)=s^(-1)>." just this theorem
example (n : ℕ) : Nonempty (DihedralGroup n ≃* PresentedDihedralGroup n)?
Not quite, because I would like the statement to include the fact that these r and s are specific elements of the dihedral group, not just that there exist elements which generate the group and have these relations
Kevin Buzzard (Oct 23 2025 at 20:26):
Then how about
example (n : ℕ) : ∃ e : DihedralGroup n ≃* PresentedDihedralGroup n,
e (DihedralGroup.r 1) = PresentedGroup.mk (rels n) rF ∧
e (DihedralGroup.sr 1) = PresentedGroup.mk (rels n) sF :=
sorry
Aaron Liu (Oct 23 2025 at 20:31):
at this point why not just make it a definition
Aaron Liu (Oct 23 2025 at 20:32):
since it's uniquely determined by its action on r and sr
Kevin Buzzard (Oct 23 2025 at 20:33):
right -- this not particularly idiomatic, but I'm just trying to answer the question.
By the way, my mental model of what sr i means is so I would have chosen DihedralGroup.sr 0
Aaron Liu (Oct 23 2025 at 20:34):
they're all equivalent
Kevin Buzzard (Oct 23 2025 at 20:35):
I guess so, but I'm talking about semantics. The stuff like r_mul_sr : r i * sr j = sr (j - i) is supposed to be interpreted as .
Aaron Liu (Oct 23 2025 at 20:35):
(I would've chosen sr 0 too)
Last updated: Dec 20 2025 at 21:32 UTC