I have to create some Lambda functions for > , < and !=
I don't have an idea how to , could anyone help me please ? PS: We just started with Lambda Calculus, so please do not assume any previous knowledge.
Thank you in anticipation !
Edit - What I meant was Arithmetic in Lambda Calculus
Edit 2 - More accurate : Looking for a Church-encoding (lambda calculus) to define < , > , !=
Editor's Note: I think this is what the OP is trying to ask:
I am trying to implement the following operations in the untyped lambda calculus using Church encoding:
- Greater than (
GTor>). - Lesser than (
LTor<). - Not equal to (
NEor!=).
I already know how to implement the following:
- Boolean true (
TRUEorλx.λy.x). - Boolean false (
FALSEorλx.λy.y). - Logical and (
ANDorλp.λq.p q p). - Logical or (
ORorλp.λq.p p q). - Logical not (
NOTorλp.λa.λb.p b a).
How would you write the GT, LT and NE functions in the untyped lambda calculus?