1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Group theory abstractions and implementations.
//!
//! This module provides traits and implementations for group theory concepts,
//! including both Abelian (commutative) and non-Abelian groups.
use *;
/// A trait representing a mathematical group.
///
/// A group is a set equipped with an operation that combines any two of its elements
/// to form a third element, satisfying four conditions called the group axioms:
/// closure, associativity, identity, and invertibility.
/// A trait representing an Abelian (commutative) group.
///
/// An Abelian group is a group where the group operation is commutative.
/// This trait combines the requirements for a group with additional operations
/// that are natural for commutative groups. We mark this as an [`Additive`] structure since this is
/// typical notation for Abelian groups.
/// A trait representing a non-Abelian group.
///
/// A non-Abelian group is a group where the group operation is not necessarily commutative.
/// This trait combines the requirements for a group with additional operations
/// that are natural for non-commutative groups. We mark this as a [`Multiplicative`] structure
/// since this is typical notation for non-Abelian groups. However, it should be noted that a
/// [`NonAbelianGroup`] group cannot be an [`AbelianGroup`]