Function diceprop::props::binop::right_distributive[][src]

pub fn right_distributive<S, A, M>(
    vars: Vars<'_, S, 3>,
    add: Fun2<'_, A>,
    mul: Fun2<'_, M>
) where
    S: Debug + Clone + PartialEq,
    A: Fn(S, S) -> S,
    M: Fn(S, S) -> S, 
Expand description

Asserts that the binary operation mul is right distributive over the binary operation add.

For all a, b, c of vars.set it must hold:

  • mul(add(a, b), c) == add(mul(a, c), mul(b, c))