pub trait Act<M> {
// Required method
fn act(&self, m: &M) -> M;
}
Expand description
Trait for an action of an algebraic structure on a set M
Action requires that the following properties holds when we implement Act<M>
for A
:
ⓘ
// For any f, g in `A`, the map f * g is same as the composition map f ∘ g.
(f * g)(m) == f(g(m))
// If A has an identity, the identity should map an element from `M` to itself.
id(m) == m
This property cannot be checked by the compiler so the implementer should verify it by themself.