Function lattices::algebra::commutative_ring

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

Defines a commutative ring structure.

A commutative ring is a ring where the multiplication operation g is commutative.