Trait AbstractQuasigroup

Source
pub trait AbstractQuasigroup<O: Operator>:
    PartialEq
    + AbstractMagma<O>
    + TwoSidedInverse<O> {
    // Provided methods
    fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool
       where Self: RelativeEq { ... }
    fn prop_inv_is_latin_square(args: (Self, Self)) -> bool
       where Self: Eq { ... }
}
Expand description

A quasigroup is a magma which that has the divisibility property (or Latin square property). A set with a closed binary operation with the divisibility property.

Divisibility is a weak form of right and left invertibility.

§Divisibility or Latin square property

∀ a, b ∈ Self, ∃! r, l ∈ Self such that l ∘ a = b and a ∘ r = b

The solution to these equations can be written as

r = a \ b and l = b / a

where “" and “/” are respectively the left and right division.

Provided Methods§

Source

fn prop_inv_is_latin_square_approx(args: (Self, Self)) -> bool
where Self: RelativeEq,

Returns true if latin squareness holds for the given arguments. Approximate equality is used for verifications.

a ~= a / b ∘ b && a ~= a ∘ b / b
Source

fn prop_inv_is_latin_square(args: (Self, Self)) -> bool
where Self: Eq,

Returns true if latin squareness holds for the given arguments.

a == a / b * b && a == a * b / b

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AbstractQuasigroup<Additive> for f32

Source§

impl AbstractQuasigroup<Additive> for f64

Source§

impl AbstractQuasigroup<Additive> for i8

Source§

impl AbstractQuasigroup<Additive> for i16

Source§

impl AbstractQuasigroup<Additive> for i32

Source§

impl AbstractQuasigroup<Additive> for i64

Source§

impl AbstractQuasigroup<Additive> for i128

Source§

impl AbstractQuasigroup<Additive> for isize

Source§

impl AbstractQuasigroup<Multiplicative> for f32

Source§

impl AbstractQuasigroup<Multiplicative> for f64

Source§

impl<N> AbstractQuasigroup<Additive> for Complex<N>

Source§

impl<N> AbstractQuasigroup<Multiplicative> for Complex<N>
where N: Num + Clone + ClosedNeg,

Implementors§