This textbook explains the basic principles of categorical type theory and the techniques used to derive categorical semantics for specific type theories. It introduces the reader to ordered set theory lattices and domains and this material provides plenty of examples for an introduction to category theory. which covers categories functors natural transformations the Yoneda lemma cartesian closed categories limits adjunctions and indexed categories. Four kinds of formal system are considered in