In mathematics, logic, and computer science, a type theory is any of a class of formal systems, some of which can serve as alternatives to settheory as a foundation for all mathematics. In type theory, every ‘term’ has a ‘type’ and operations are restricted to terms of a certain type.