In computer science and logic, a dependent type is a type that depends on a value. Dependent types play a central role in intuitionistic type theory and in the design of functional programming languages like ATS, Agda and Epigram.
An example is the type of n-tuples of real numbers. This is a dependent type because the type depends on the value n.
Deciding equality of dependent types in a program may require computations. If arbitrary values are allowed in dependent types, then deciding type equality may involve deciding whether two arbitrary programs produce the same result; hence type checking may become undecidable.
The Curry–Howard correspondence implies that types can be constructed that express arbitrarily complex mathematical properties. If the user can supply a constructive proof that a type is inhabited (i.e., that a value of that type exists) then a compiler can check the proof and convert it into executable computer code that computes the value by carrying out the construction. The proof checking feature makes dependently typed languages closely related to proof assistants. The code-generation aspect provides a powerful approach to formal program verification and proof-carrying code, since the code is derived directly from a mechanically verified mathematical proof.
Read more about Dependent Type: Systems of The Lambda Cube, Comparison
Famous quotes containing the words dependent and/or type:
“Almost everywhere we find . . . the use of various coercive measures, to rid ourselves as quickly as possible of the child within usi.e., the weak, helpless, dependent creaturein order to become an independent competent adult deserving of respect. When we reencounter this creature in our children, we persecute it with the same measures once used in ourselves.”
—Alice Miller (20th century)
“He turned out to belong to the type of publisher who dreams of becoming a male muse to his author, and our brief conjunction ended abruptly upon his suggesting I replace chess by music and make Luzhin a demented violinist.”
—Vladimir Nabokov (18991977)