Information about Type Theory
In mathematics, logic and computer science, type theory is any of several formal systems that can serve as alternatives to naive set theory, or the study of such formalisms in general. In programming language theory, a branch of computer science, type theory can refer to the design, analysis and study of type systems, although some computer scientists limit the term's meaning to the study of abstract formalisms such as typed λ-calculi.
Bertrand Russell invented the first type theory in response to his discovery that Gottlob Frege's version of naive set theory was afflicted with Russell's paradox. This type theory features prominently in Whitehead and Russell's Principia Mathematica. It avoids Russell's paradox by first creating a hierarchy of types, then assigning each mathematical (and possibly other) entity to a type. Objects of a given type are built up from objects of the preceding type.
Alonzo Church, inventor of the lambda calculus, developed a higher-order logic commonly called Church's Theory of Types. Church's type theory is a variant of the lambda calculus in which expressions (also called formulas or λ-terms) are classified into types, and the types of expressions restrict the ways in which they can be combined. In other words, it is a typed lambda calculus. Today many other such calculi are in use, including Per Martin-Löf's Intuitionistic type theory, Jean-Yves Girard's System F and the Calculus of Constructions. In typed lambda calculi, types play a role similar to that of sets in set theory.
There is a lowest type, whose individuals have no members and are members of the second lowest type. Individuals of the lowest type correspond to the urelements of certain set theories. Each type has a next higher type, analogous to the notion of successor in Peano arithmetic. While ST is silent as to whether there is a maximal type, a transfinite number of types poses no difficulty. These facts, reminiscent of the Peano axioms, make it convenient and conventional to assign a natural number to each type, starting with 0 for the lowest type. But type theory does not require a prior definition of the naturals.
The symbols peculiar to ST are primed variables and infix
. In any given formula, unprimed variables all have the same type, while primed variables (
) range over the next higher type. The atomic formulas of ST are of two forms,
(identity) and
. The infix symbol
suggests the intended interpretation, set membership.
All variables appearing in the definition of identity and in the axioms Extensionality and Comprehension, range over individuals of one of two consecutive types. Only unprimed (primed) variables, ranging over the "lower" ("higher") type, can appear to the left (right) of '
'. The first-order formulation of ST rules out quantifying over types. Hence each pair of consecutive types requires its own axiom of Extensionality and of Comprehension, which is possible if Extensionality and Comprehension below are taken as axiom schemata "ranging over" types.
ST reveals how type theory can be made very similar to axiomatic set theory. Moreover, the more elaborate ontology of ST, grounded in what is now called the "iterative conception of set," makes for axiom (schemas) that are far simpler than those of conventional set theories, such as ZFC, with simpler ontologies. Set theories whose point of departure is type theory, but whose axioms, ontology, and terminology differ from the above, include New Foundations and Scott-Potter set theory.
Type theory is also widely in use in theories of semantics of natural language. The most common construction takes the basic types
and
for individuals and truth-values, respectively, and defines the set of types recursively as follows:
is the type of functions from entities of type
to entities of type
. Thus one has types like
which are interpreted as elements of the set of functions from entities to truth-values, i.e. characteristic functions of sets of entities. An expression of type
is a function from sets of entities to truth-values, i.e. a (characteristic function of a) set of sets. This latter type is standardly taken to be the type of natural language quantifiers, like everybody or nobody (Montague 1973, Barwise and Cooper 1981).
Definitions of type system vary, but the following one due to Benjamin C. Pierce roughly corresponds to the current consensus in the programming language theory community:
In other words, a type system divides program values into sets called types — this is called a type assignment — and makes certain program behaviors illegal on the basis of the types that are thus assigned. For example, a type system may classify the value "hello" as a string and the value 5 as a number, and prohibit the programmer from adding "hello" to 5 based on that type assignment. In this type system, the program
would be illegal. Hence, any program permitted by the type system would be provably free from the erroneous behavior of adding strings and numbers.
The design and implementation of type systems is a topic nearly as broad as the topic of programming languages itself. In fact, type theory proponents commonly proclaim that the design of type systems is the very essence of programming language design: "Design the type system correctly, and the language will design itself."
System F, also known as the polymorphic lambda calculus or the second-order lambda calculus, is a typed lambda calculus.
..... Click the link for more information.
Bertrand Russell invented the first type theory in response to his discovery that Gottlob Frege's version of naive set theory was afflicted with Russell's paradox. This type theory features prominently in Whitehead and Russell's Principia Mathematica. It avoids Russell's paradox by first creating a hierarchy of types, then assigning each mathematical (and possibly other) entity to a type. Objects of a given type are built up from objects of the preceding type.
Alonzo Church, inventor of the lambda calculus, developed a higher-order logic commonly called Church's Theory of Types. Church's type theory is a variant of the lambda calculus in which expressions (also called formulas or λ-terms) are classified into types, and the types of expressions restrict the ways in which they can be combined. In other words, it is a typed lambda calculus. Today many other such calculi are in use, including Per Martin-Löf's Intuitionistic type theory, Jean-Yves Girard's System F and the Calculus of Constructions. In typed lambda calculi, types play a role similar to that of sets in set theory.
Simple theory of types
The following system is Mendelson's (1997, 289–293) ST. The domain of quantification is partitioned into an ascending hierarchy of types, with all individuals assigned a type. Quantified variables range over only one type; hence the underlying logic is first-order logic. ST is "simple" (relative to the type theory of Principia Mathematica) primarily because all members of the domain and codomain of any relation must be of the same type.There is a lowest type, whose individuals have no members and are members of the second lowest type. Individuals of the lowest type correspond to the urelements of certain set theories. Each type has a next higher type, analogous to the notion of successor in Peano arithmetic. While ST is silent as to whether there is a maximal type, a transfinite number of types poses no difficulty. These facts, reminiscent of the Peano axioms, make it convenient and conventional to assign a natural number to each type, starting with 0 for the lowest type. But type theory does not require a prior definition of the naturals.
The symbols peculiar to ST are primed variables and infix
. In any given formula, unprimed variables all have the same type, while primed variables (
) range over the next higher type. The atomic formulas of ST are of two forms,
(identity) and
. The infix symbol
suggests the intended interpretation, set membership.
All variables appearing in the definition of identity and in the axioms Extensionality and Comprehension, range over individuals of one of two consecutive types. Only unprimed (primed) variables, ranging over the "lower" ("higher") type, can appear to the left (right) of '
'. The first-order formulation of ST rules out quantifying over types. Hence each pair of consecutive types requires its own axiom of Extensionality and of Comprehension, which is possible if Extensionality and Comprehension below are taken as axiom schemata "ranging over" types.
- Identity, defined by
.
- Extensionality. An axiom schema.
.
- Let
denote any first-order formula containing the free variable
.
- Comprehension. An axiom schema.
.
- Remark. Any collection of elements of the same type may form an object of the next higher type. Comprehension is schematic with respect to
as well as to types.
- Infinity. There exists a nonempty binary relation
over the individuals of the lowest type, that is irreflexive, transitive, and strongly connected:
.
- Remark. Infinity is the only true axiom of ST and is entirely mathematical in nature. It asserts that
is a strict total order, with a domain identical to its codomain. If 0 is assigned to the lowest type, the type of
is 3. Infinity can be satisfied only if the (co)domain of
is infinite, thus forcing the existence of an infinite set. If relations are defined in terms of ordered pairs, this axiom requires a prior definition of ordered pair; the Kuratowski definition, adapted to ST, will do. The literature does not explain why the usual axiom of infinity (there exists an inductive set) of ZFC of other set theories could not be married to ST.
ST reveals how type theory can be made very similar to axiomatic set theory. Moreover, the more elaborate ontology of ST, grounded in what is now called the "iterative conception of set," makes for axiom (schemas) that are far simpler than those of conventional set theories, such as ZFC, with simpler ontologies. Set theories whose point of departure is type theory, but whose axioms, ontology, and terminology differ from the above, include New Foundations and Scott-Potter set theory.
History of type theory
Practical impact of type theory
Computing
The most obvious application of type theory is in constructing type checking algorithms in the semantic analysis phase of compilers for programming languages.Type theory is also widely in use in theories of semantics of natural language. The most common construction takes the basic types
and
for individuals and truth-values, respectively, and defines the set of types recursively as follows:
- if
and
are types, then so is
.
- Nothing except the basic types, and what can be constructed from them by means of the previous clause are types.
is the type of functions from entities of type
to entities of type
. Thus one has types like
which are interpreted as elements of the set of functions from entities to truth-values, i.e. characteristic functions of sets of entities. An expression of type
is a function from sets of entities to truth-values, i.e. a (characteristic function of a) set of sets. This latter type is standardly taken to be the type of natural language quantifiers, like everybody or nobody (Montague 1973, Barwise and Cooper 1981).
Social Sciences
Gregory Bateson introduced a theory of logical types into the social sciences; his notions of double bind and logical levels are based on Russell's theory of types.Connections to constructive logic
Relation to other topics
Type system
Definitions of type system vary, but the following one due to Benjamin C. Pierce roughly corresponds to the current consensus in the programming language theory community:
[A type system is a] tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute. (Pierce 2002).
In other words, a type system divides program values into sets called types — this is called a type assignment — and makes certain program behaviors illegal on the basis of the types that are thus assigned. For example, a type system may classify the value "hello" as a string and the value 5 as a number, and prohibit the programmer from adding "hello" to 5 based on that type assignment. In this type system, the program
"hello" + 5
would be illegal. Hence, any program permitted by the type system would be provably free from the erroneous behavior of adding strings and numbers.
The design and implementation of type systems is a topic nearly as broad as the topic of programming languages itself. In fact, type theory proponents commonly proclaim that the design of type systems is the very essence of programming language design: "Design the type system correctly, and the language will design itself."
See also
- Type system for a more practical discussion of type systems for programming languages
- Data type for concrete types of data in programming
- Domain theory
- Category theory
- Typed lambda calculus
- Bertrand Russell
References
- Alonzo Church (1940), A formulation of the simple theory of types. The Journal of Symbolic Logic 5(2):56-68.
- Nagel, Ernest (1951), "Causal Character of Modern Physical Theory", pp. 244–268 in Freedom and Reason, Salo W. Baron, Ernest Nagel, and Koppel B. Pinson (eds.), The Free Press. Cited on p. 759 of Jefferson Hane Weaver, The World of Physics, ISBN 0-671-49931-9.
- Pierce, Benjamin C. (2002), Types and Programming Languages, MIT Press, Cambridge, MA. ISBN 0-262-16209-1.
Further reading
- Barwise, Jon and Robin Cooper, 1981. Generalized quantifiers in English. Linguistics and Philosophy 4:159-219.
- Andrews, Peter B., 2002. An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof, 2nd ed. Kluwer Academic Publishers.
- Cardelli, Luca, 1997, "Type Systems," in Allen B. Tucker, ed., The Computer Science and Engineering Handbook. CRC Press: 2208-2236.
- Carl A. Gunter, "Semantics of Programming Languages: Structures and Techniques", MIT Press 1992.
- Mendelson, Elliot, 1997. Introduction to Mathematical Logic, 4th ed. Chapman & Hall.
- Montague, Richard,1973. The proper treatment of quantification in English. In Hintikka, K. et al., editor, Approaches to Natural Language, pages 221--242.
- Thompson, Simon, 1991. Type Theory and Functional Programming. Addison-Wesley. ISBN 0-201-41667-0.
- Winskel, Glynn, 1993. The Formal Semantics of Programming Languages, An Introduction. MIT Press. ISBN 0-262-23169-7.
- Wittgenstein, Ludwig, 1922. Tractatus Logico-Philosophicus. New York, NY: Routledge, 2005. ISBN 0-415-25562-7
External links
- Stanford Encyclopedia of Philosophy: Type Theory" -- by Thierry Coquand.
- National Institute of Standards and Technology: Abstract data type
- A summary paper on the formal basis of ADTs, relationship to category theory, and list of good references. Pages 3-4 appear relevant. Reference number [6] looks good, but it may not be available online.
- Constable, Robert L., 2002, "Naïve Computational Type Theory," in H. Schwichtenberg and R. Steinbruggen (eds.), Proof and System-Reliability: 213-259.
- The Nuprl Book: "Introduction to Type Theory."
Mathematics (colloquially, maths or math) is the body of knowledge centered on such concepts as quantity, structure, space, and change, and also the academic discipline that studies them. Benjamin Peirce called it "the science that draws necessary conclusions".
..... Click the link for more information.
..... Click the link for more information.
Logic (from Classical Greek λόγος logos; meaning word, thought, idea, argument, account, reason, or principle) is the study of the principles and criteria of valid inference and demonstration.
..... Click the link for more information.
..... Click the link for more information.
Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.
..... Click the link for more information.
..... Click the link for more information.
This article or section is in need of attention from an expert on the subject.
Please help recruit one or [ improve this article] yourself. See the talk page for details.
..... Click the link for more information.
Please help recruit one or [ improve this article] yourself. See the talk page for details.
..... Click the link for more information.
naive set theory[1] is one. The informal content of this naive set theory supports both the aspects of mathematical sets familiar in discrete mathematics (for example Venn diagrams and symbolic reasoning about their Boolean algebra), and the everyday usage of
..... Click the link for more information.
..... Click the link for more information.
Programming language theory (commonly known as PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and programming language features.
..... Click the link for more information.
..... Click the link for more information.
Computer science, or computing science, is the study of the theoretical foundations of information and computation and their implementation and application in computer systems.
..... Click the link for more information.
..... Click the link for more information.
In computer science, a type system defines how a programming language classifies values and expressions into types, how it can manipulate those types and how they interact.
..... Click the link for more information.
..... Click the link for more information.
A typed lambda calculus is a typed formalism that uses the lambda-symbol () to denote anonymous function abstraction. Typed lambda calculi are foundational programming languages and are the base of typed functional programming languages such as ML and Haskell and, more indirectly,
..... Click the link for more information.
..... Click the link for more information.
Bertrand Arthur William Russell, 3rd Earl Russell, OM, FRS, (18 May 1872 – 2 February 1970), was a British philosopher, historian, logician, mathematician, advocate for social reform, pacifist, and prominent rationalist.
..... Click the link for more information.
..... Click the link for more information.
Friedrich Ludwig Gottlob Frege
Birth: November 8, 1848
Death: 26 July, 1925
School/tradition: Analytic philosophy
Main interests: Philosophy of mathematics, mathematical logic, Philosophy of language
..... Click the link for more information.
Birth: November 8, 1848
Death: 26 July, 1925
School/tradition: Analytic philosophy
Main interests: Philosophy of mathematics, mathematical logic, Philosophy of language
..... Click the link for more information.
naive set theory[1] is one. The informal content of this naive set theory supports both the aspects of mathematical sets familiar in discrete mathematics (for example Venn diagrams and symbolic reasoning about their Boolean algebra), and the everyday usage of
..... Click the link for more information.
..... Click the link for more information.
Part of the foundation of mathematics, Russell's paradox (also known as Russell's antinomy), discovered by Bertrand Russell in 1901, showed that the naive set theory of Frege leads to a contradiction.
..... Click the link for more information.
..... Click the link for more information.
Alfred North Whitehead, OM (February 15 1861, Ramsgate, Kent, England – December 30 1947, Cambridge, Massachusetts, U.S.) was an English-born mathematician who became a philosopher.
..... Click the link for more information.
..... Click the link for more information.
Bertrand Arthur William Russell, 3rd Earl Russell, OM, FRS, (18 May 1872 – 2 February 1970), was a British philosopher, historian, logician, mathematician, advocate for social reform, pacifist, and prominent rationalist.
..... Click the link for more information.
..... Click the link for more information.
Principia Mathematica is a 3-volume work on the foundations of mathematics, written by Alfred North Whitehead and Bertrand Russell and published in 1910–1913. It is an attempt to derive all mathematical truths from a well-defined set of axioms and inference rules in
..... Click the link for more information.
..... Click the link for more information.
Alonzo Church
Alonzo Church (1903–1995)
Born 6/14/1903
Washington, DC, USA
Died 8/11/1995
Residence USA
Nationality USA
Field Mathematics
..... Click the link for more information.
Alonzo Church (1903–1995)
Born 6/14/1903
Washington, DC, USA
Died 8/11/1995
Residence USA
Nationality USA
Field Mathematics
..... Click the link for more information.
In mathematical logic and computer science, lambda calculus, also λ-calculus, is a formal system designed to investigate function definition, function application, and recursion.
..... Click the link for more information.
..... Click the link for more information.
In mathematics, higher-order logic is distinguished from first-order logic in a number of ways.
One of these is the type of variables appearing in quantifications; in first-order logic, roughly speaking, it is forbidden to quantify over predicates.
..... Click the link for more information.
One of these is the type of variables appearing in quantifications; in first-order logic, roughly speaking, it is forbidden to quantify over predicates.
..... Click the link for more information.
A typed lambda calculus is a typed formalism that uses the lambda-symbol () to denote anonymous function abstraction. Typed lambda calculi are foundational programming languages and are the base of typed functional programming languages such as ML and Haskell and, more indirectly,
..... Click the link for more information.
..... Click the link for more information.
Per Martin-Löf (born 1942) is a Swedish logician, philosopher, and mathematician. He is best known for developing intuitionistic type theory as a constructive foundation of mathematics. Per Martin-Löf holds a joint chair for Mathematics and Philosophy at Stockholm University.
..... Click the link for more information.
..... Click the link for more information.
Intuitionistic type theory, or constructive type theory, or Martin-Löf type theory or just Type Theory is a logical system and a set theory based on the principles of mathematical constructivism.
..... Click the link for more information.
..... Click the link for more information.
Jean-Yves Girard is a French logician working in proof theory. His contributions include a proof of strong normalization in a system of second-order logic called system F; the invention of linear logic; the geometry of interaction; and ludics.
..... Click the link for more information.
..... Click the link for more information.
- For the electronic dance music artist, see Ferry Corsten.
System F, also known as the polymorphic lambda calculus or the second-order lambda calculus, is a typed lambda calculus.
..... Click the link for more information.
The calculus of constructions (CoC) is a higher-order typed lambda calculus where types are first-class values. It is thus possible, within the CoC, to define functions from, say, integers to types, types to types as well as functions from integers to integers.
..... Click the link for more information.
..... Click the link for more information.
SET may stand for:
..... Click the link for more information.
- Sanlih Entertainment Television, a television channel in Taiwan
- Secure electronic transaction, a protocol used for credit card processing,
..... Click the link for more information.
Set theory is the mathematical theory of sets, which represent collections of abstract objects. It encompasses the everyday notions, introduced in primary school, often as Venn diagrams, of collections of objects, and the elements of, and membership in, such collections.
..... Click the link for more information.
..... Click the link for more information.
The domain of discourse, sometimes called the universe of discourse, is an analytic tool used in deductive logic, especially predicate logic. It indicates the relevant set of entities that are being dealt with by quantifiers.
..... Click the link for more information.
..... Click the link for more information.
As commonly used, individual refers to a person or to any specific object in a collection. In the 15th century and earlier, and also today within the fields of statistics and metaphysics, individual
..... Click the link for more information.
..... Click the link for more information.
First-order logic (FOL) is a formal deductive system used by mathematicians, philosophers, linguists, and computer scientists. It goes by many names, including: first-order predicate calculus (FOPC), the lower predicate calculus,
..... Click the link for more information.
..... Click the link for more information.
This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus