title: Pure Lambda Calculus - and function
body: <p>I am currently learning Haskell and also participating in a rather theoretical lecture about functional programming at university. </p>
  
  <p>I know that this is purely theoretical/academic question, but nevertheless I am interested how to express different simple functions simply with pure lambda calculus (i.e. without any constants defined).</p>
  
  <p>Some lecture materials of mine define the boolean values such as: </p>
  
  <blockquote>
    <p><strong>True</strong> = \xy.x <br>
    <strong>False</strong> = \xy.y <br></p>
  </blockquote>
  
  <p>(\ denoting the lambda symbol)</p>
  
  <p>If they are defined like these selector functions, the if-condition can be easily defined as:<br></p>
  
  <blockquote>
    <p><strong>If</strong> = \x.x</p>
  </blockquote>
  
  <p>Now, I'm trying to come up with some short form for the logical "and"-function. My first guess is:</p>
  
  <blockquote>
    <p><strong>and</strong> = \xy.{(<strong>If</strong> x)[(<strong>If</strong> y) <strong>True</strong> <strong>False</strong>] <strong>False</strong>}</p>
  </blockquote>
  
  <p>So basically this lambda function would receive 2 arguments u v where both have to be typed like True/False. If I do various beta-reductions with all 4 combinations of the logic table I receive the right result.</p>
  
  <p>Nevertheless this function looks a little ugly and I'm thinking about making it more elegant. Any proposals here?</p>