Function lambda_calculus::arithmetic::geq
[−]
[src]
pub fn geq() -> Term
Applied to two Church-encoded numbers it returns a Church-encoded boolean indicating whether its first argument is greater than or egual to the second one.
GEQ := λab.LEQ b a = λ λ LEQ 1 2
Examples
use lambda_calculus::arithmetic::geq; use lambda_calculus::booleans::{tru, fls}; use lambda_calculus::reduction::beta_full; assert_eq!(beta_full(geq().app(0.into()).app(0.into())), tru()); assert_eq!(beta_full(geq().app(1.into()).app(1.into())), tru()); assert_eq!(beta_full(geq().app(0.into()).app(1.into())), fls()); assert_eq!(beta_full(geq().app(1.into()).app(0.into())), tru());