"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 set theory as a foundation for all mathematics. In type theory, every \"term\" has a \"type\" and operations are restricted to terms of a certain type.Type theory is closely related to (and in some cases overlaps with) type systems, which are a programming language feature used to reduce bugs."@en .