"Type theory" gets its name from the fact that every expression has an associated type.

$\equiv$ means definitional equality, $=_A$ means type equality.

There is also untyped lambda-calculus where the type of the function argument is not specified, while in STLC, we write $\lambda x: \tau .e : A$ instead of $\lambda x.e$.

Tips

You will find more about the detailed implementation of lambda calculus interpreter on course CSCI B521 at IU using racket like this:

(define lambda-exp?
	(lambda (exp)
		(match exp
			[`,y #:when (symbol? y) #t]
			[`(lambda (,x) ,body) #:when (symbol? x)
				(lambda-exp? body))]
			[`(,rator ,rand) (and (lambda-exp? rator) (lambda-exp? rand))])))

Types

Let $\mathcal{B} = \{ \top, \bot, Ans \}$, if $x \in \mathcal{B}$, then $x \space \text{Type}$; we call this basic rule:

$$ \underline{A \in \cal B} \\ A \space \text{Type} $$

Of course, functions are types:

$$ \underline{A \space \text{Type}, B \space \text{Type}} \\ A \to B \space \text{Type} $$

Some conventions:

Contexts