Zulip Chat Archive

Stream: maths

Topic: Abelian Subgroup


Thomas Browning (Jun 11 2021 at 16:45):

In mathlib, what's the best way to say "H is an abelian subgroup of G"? I don't think that {G : Type*} [group G] {H : subgroup G} [comm_group H] works, since the comm_group H instance won't match the group H instance.

Adam Topaz (Jun 11 2021 at 16:49):

You may have to write out the commutativity condition, unfortunately

Thomas Browning (Jun 11 2021 at 16:51):

I do want a comm_group H instance eventually, so would I then have to manually produce it?

Johan Commelin (Jun 11 2021 at 16:52):

I guess we need a predicate subgroup.is_comm (maybe a def, maybe a class). And then we can have a def/instance of comm_group H under that assumption.

Adam Topaz (Jun 11 2021 at 16:57):

Commutativity should probably just be a mixin anyway

Eric Wieser (Jun 11 2021 at 17:10):

Does docs#subgroup.normal mean commutative?

Johan Commelin (Jun 11 2021 at 17:11):

Nope

Johan Commelin (Jun 11 2021 at 17:11):

Every subgroup of a commutative group is normal, but not every normal subgroup is commutative.

Johan Commelin (Jun 11 2021 at 17:12):

Example: A_n is a normal subgroup of S_n since it is the kernel of the sign map S_n -> Z/2 that maps a permutation to it's sign. But for n > 3, the subgroup A_n is not commutative.

Eric Wieser (Jun 11 2021 at 17:17):

You could probably add a new instance [group G] (S : subgroup G) [h : is_commutative S (*)] : comm_group S := { mul_comm := h.comm, ..S.to_group } instance

Eric Wieser (Jun 11 2021 at 17:17):

Then your lemma would assume docs#is_commutative instead of comm_group S.

Johan Commelin (Jun 11 2021 at 17:19):

Which could be a special case of a def [group G] [is_commutative G (*)] : comm_group G :=

Johan Commelin (Jun 11 2021 at 17:20):

But that one shouldn't be an instance because of loops. For S : subgroup G it's not a problem.

Eric Wieser (Jun 11 2021 at 17:21):

I'm not sure the def is useful since it's basically just one line to implement, and you have to remember to make it reducible if it's a def

Yaël Dillies (Jun 11 2021 at 20:20):

Actually any group is normal to itself, but clearly not all groups are abelian.

Johan Commelin (Jun 11 2021 at 20:21):

ooh lol, that's a lot simpler

Eric Wieser (Jun 21 2021 at 21:49):

Eric Wieser said:

You could probably add a new instance [group G] (S : subgroup G) [h : is_commutative S (*)] : comm_group S := { mul_comm := h.comm, ..S.to_group } instance

This forms a loop, don't do this!

-- deep recursion was detected at 'expression equality test'
instance {R : Type*} [group R] (S : subgroup R) : comm_group S := by apply_instance

Last updated: Dec 20 2023 at 11:08 UTC