Function lambda_calculus::arithmetic::lt
[−]
[src]
pub fn lt() -> Term
Applied to two Church-encoded numbers it returns a Church-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::arithmetic::lt; use lambda_calculus::booleans::{tru, fls}; use lambda_calculus::reduction::beta_full; assert_eq!(beta_full(lt().app(0.into()).app(0.into())), fls()); assert_eq!(beta_full(lt().app(1.into()).app(1.into())), fls()); assert_eq!(beta_full(lt().app(0.into()).app(1.into())), tru()); assert_eq!(beta_full(lt().app(1.into()).app(0.into())), fls());