Preface. Contents. Preliminaries. Prospectus. Logic, type theory, and fibred category theory. The logic and type theory of sets. Introduction to fibred category theory. Fibrations. Some concrete examples: sets, &ohgr;-sets and PERs. Some general examples. Cloven and split fibrations. Change-of-base and composition for fibrations. Fibrations of signatures. Categories of fibrations. Fibrewise structure and fibred adjunctions. Fibred products and coproducts. Indexed categories. Simple type theory. The basic calculus of types and terms. Functorial semantics. Exponents, products and coproducts. Semantics of simple type theories. Semantics of the untyped lambda calculus as a corollary. Simple parameters. Equational logic. Logics. Specifications and theories in equational logic. Algebraic specifications. Fibred equality. Fibrations for equational logic. Fibred functorial semantics. First order predicate logic. Signatures, connectives and quantifiers. Fibrations for the first order predicate logic. Functorial interpretation and internal language. Subobject fibrations I: regular categories. Subobject fibrations II: coherent categories and logoses. Subset types. Quotient types. Quotient types, categorically. A logical characterisation of subobject fibrations. Higher order predicate logic. Higher order signatures. Generic objects. Fibrations for higher order logic. Elementary toposes. Colimits, powerobjects and well-poweredness in topos. Nuclei in a topos. Separated objects and sheaves in a topos. A logical description of separated objects and sheaves. The effective topos. Constructing a topos from a higher order fibration. The effective topos and its subcategories of sets, &ohgr;-sets, and PERs. Families of PERs, and &ohgr;-sets over the effective topos. Natural numbers in the effective topos and some associated principles. Internal category theory. Definition and examples of internal categories. Internal functors and natural transformations. Externalisation. Internal diagrams and completeness. Polymorphic type theory. Syntax. Use of polymorphic type theory. Naive set theoretic semantics. Fibrations for polymorphic type theory. Small polymorphic fibrations. Logic over polymorphic type theory. Advanced fibred category theory. Opfibrations and fibred spans. Logical predicates and relations. Quantification. Category theory over a fibration. Locally small fibrations. Definability. First order dependent type theory. A calculus of dependent types. Use of dependent types. A term model. Display maps and comprehension categories. Closed comprehension categories. Domain theoretic models of type dependency. Higher order dependent type theory. Dependent predicate logic. Dependent predicate logic, categorically. Polymorphic dependent type theory. Strong and very strong sum and equality. Full higher order dependent type theory. Full higher order dependent type theory, categorically. Completeness of the category of PERs in the effective topos. References. Notation index. Subject index.