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::{zero, one, geq}; use lambda_calculus::booleans::{tru, fls}; use lambda_calculus::reduction::normalize; assert_eq!(normalize(geq().app(zero()).app(zero())), tru()); assert_eq!(normalize(geq().app(one()).app(one())), tru()); assert_eq!(normalize(geq().app(zero()).app(one())), fls()); assert_eq!(normalize(geq().app(one()).app(zero())), tru());