Function lattices::algebra::inverse

source ยท
pub fn inverse<S: Debug + PartialEq + Clone, const N: usize>(
    items: &[S; N],
    f: impl Fn(S, S) -> S,
    e: S,
    b: impl Fn(S) -> S,
) -> Result<(), &'static str>
Expand description

Defines the inverse property.

An element b is the inverse of a if ab = e and ba = e for some identity element e.