title: Looking for a Church-encoding (lambda calculus) to define < , > , !=
body: <p>I have to create some Lambda functions for > , &lt; and !=</p>
  
  <p>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.</p>
  
  <p>Thank you in anticipation !</p>
  
  <p><strong>Edit</strong> - What I meant was <a href="http://en.wikipedia.org/wiki/Lambda_calculus#Arithmetic_in_lambda_calculus" rel="noreferrer">Arithmetic in Lambda Calculus</a></p>
  
  <p><strong>Edit 2</strong> - More accurate : Looking for a Church-encoding (lambda calculus) to define                     <code>&lt; , &gt; , !=</code></p>
  
  <hr>
  
  <p><strong>Editor's Note</strong>: I think this is what the OP is trying to ask:</p>
  
  <p>I am trying to implement the following operations in the untyped lambda calculus using Church encoding:</p>
  
  <ol>
  <li>Greater than (<code>GT</code> or <code>&gt;</code>).</li>
  <li>Lesser than (<code>LT</code> or <code>&lt;</code>).</li>
  <li>Not equal to (<code>NE</code> or <code>!=</code>).</li>
  </ol>
  
  <p>I already know how to implement the following:</p>
  
  <ol>
  <li>Boolean true (<code>TRUE</code> or <code>λx.λy.x</code>).</li>
  <li>Boolean false (<code>FALSE</code> or <code>λx.λy.y</code>).</li>
  <li>Logical and (<code>AND</code> or <code>λp.λq.p q p</code>).</li>
  <li>Logical or (<code>OR</code> or <code>λp.λq.p p q</code>).</li>
  <li>Logical not (<code>NOT</code> or <code>λp.λa.λb.p b a</code>).</li>
  </ol>
  
  <p>How would you write the <code>GT</code>, <code>LT</code> and <code>NE</code> functions in the untyped lambda calculus?</p>