[][src]Trait libpuri::Act

pub trait Act<M> {
    pub fn act(&self, m: &M) -> M;
}

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:

This example is not tested
// 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.

Required methods

pub fn act(&self, m: &M) -> M[src]

An action of self on an element of M

Loading content...

Implementors

Loading content...