Function lambda_calculus::data::num::church::lt

source ·
pub fn lt() -> Term
Expand description

Applied to two Church-encoded numbers it returns a lambda-encoded boolean indicating whether its first argument is less than the second one.

LT ≡ λab.NOT (LEQ b a) ≡ λ λ NOT (LEQ 1 2)

Examples

use lambda_calculus::data::num::church::lt;
use lambda_calculus::*;

assert_eq!(beta(app!(lt(), 0.into_church(), 0.into_church()), NOR, 0), false.into());
assert_eq!(beta(app!(lt(), 1.into_church(), 1.into_church()), NOR, 0), false.into());
assert_eq!(beta(app!(lt(), 0.into_church(), 1.into_church()), NOR, 0), true.into());
assert_eq!(beta(app!(lt(), 1.into_church(), 0.into_church()), NOR, 0), false.into());