title: Well typed and ill typed lambda terms
body: <p>I have been trying to understand the applied lambda calculus. Up till now, I have understood how type inference works. But I am not able to follow what is the meaning of saying that a term is well-typed or ill-typed and then how can I determine whether a given term is well-typed or ill-typed.
  For example, consider a lambda term <code>tw</code> defined as <code>λx[(x x)]</code> . How to conclude whether it is a well-typed or ill-typed term?</p>