Commit 2023-11-30 19:19 1b08a550
View on Github →feat: abstract KleinFour into a class IsKleinFour. (#8565)
This removes KleinFour in favor of a class IsKleinFour and proves that any two IsKleinFour groups are isomorphic via any identity-preserving equivalence. In addition, we prove that a group of order 4 is not cyclic if and only if it has exponent two.
There are several advantages:
- this provides a general API accessible by other groups
- we prove some generic facts about groups of exponent two
- it is easy to
@[to_additive]everything If we want, we can always redefine an explicitKleinFourgroup, and give it anIsKleinFourinstance. In that case we probably want to make a bespoke type for it, so that it can beto_additive-ized.