Function lattices::algebra::field

source ยท
pub fn field<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,
    inverse_g: &impl Fn(S) -> S,
) -> Result<(), &'static str>
Expand description

Defines a field structure.

A field is a commutative ring where every element has a multiplicative inverse.