Skip to main content

cvlr_implies

Function cvlr_implies 

Source
pub fn cvlr_implies<A, B>(a: A, b: B) -> CvlrImplies<A, B>
where A: CvlrFormula, B: CvlrFormula<Context = A::Context>,
Expand description

Creates a boolean expression representing logical implication (A → B).

Returns a new expression that evaluates to true when either a is false or when both a and b are true.

§Arguments

  • a - The antecedent (left-hand side) of the implication
  • b - The consequent (right-hand side) of the implication

§Examples

use cvlr_spec::{cvlr_implies, cvlr_true, CvlrFormula};

// true → true evaluates to true
let expr = cvlr_implies(cvlr_true::<()>(), cvlr_true::<()>());
assert!(expr.eval(&()));