Type Theory and Formal Proof: An Introduction