Pure type system

Short description: Form of typed lambda calculus

| Unsolved problem in computer science:

Is every weakly normalizing pure type system also strongly normalizing?

(more unsolved problems in computer science)

|

In the branches of mathematical logic known as proof theory and type theory, a pure type system (PTS), previously known as a generalized type system (GTS), is a form of typed lambda calculus that allows an arbitrary number of sorts and dependencies between any of these. The framework can be seen as a generalisation of Barendregt's lambda cube, in the sense that all corners of the cube can be represented as instances of a PTS with just two sorts.[1][2] In fact, Barendregt (1991) framed his cube in this setting.[3] Pure type systems may obscure the distinction between types and terms and collapse the type hierarchy, as is the case with the calculus of constructions, but this is not generally the case, e.g. the simply typed lambda calculus allows only terms to depend on terms.

Pure type systems were independently introduced by Stefano Berardi (1988) and Jan Terlouw (1989).[1][2] Barendregt discussed them at length in his subsequent papers.[4] In his PhD thesis,[5] Berardi defined a cube of constructive logics akin to the lambda cube (these specifications are non-dependent). A modification of this cube was later called the L-cube by Herman Geuvers, who in his PhD thesis extended the Curry–Howard correspondence to this setting.[6] Based on these ideas, G. Barthe and others defined classical pure type systems (CPTS) by adding a double negation operator.[7] Similarly, in 1998, Tijn Borghuis introduced modal pure type systems (MPTS).[8] Roorda has discussed the application of pure type systems to functional programming; and Roorda and Jeuring have proposed a programming language based on pure type systems.[9]

The systems from the lambda cube are all known to be strongly normalizing. Pure type systems in general need not be, for example System U from Girard's paradox is not. (Roughly speaking, Girard found pure systems in which one can express the sentence "the types form a type".) Furthermore, all known examples of pure type systems that are not strongly normalizing are not even (weakly) normalizing: they contain expressions that do not have normal forms, just like the untyped lambda calculus . It is a major open problem in the field whether this is always the case, i.e. whether a (weakly) normalizing PTS always has the strong normalization property. This is known as the Barendregt–Geuvers–Klop conjecture (named after Henk Barendregt, Herman Geuvers, and Jan Willem Klop).[10]

## Contents

* 1 Definition
* 2 Implementations
* 3 See also
* 4 Notes
* 5 References
* 6 Further reading
* 7 External links

## Definition

A pure type system is defined by a triple (𝒮,𝒜,ℛ) where 𝒮 is the set of sorts, 𝒜⊆𝒮2 is the set of axioms, and ℛ⊆𝒮3 is the set of rules. Typing in pure type systems is determined by the following rules, where s is any sort:[4]

(s1,s2)∈𝒜⊢s1:s2(axiom)

Γ⊢A:sx∉dom(Γ)Γ,x:A⊢x:A(start)

Γ⊢A:BΓ⊢C:sx∉dom(Γ)Γ,x:C⊢A:B(weakening)

Γ⊢A:s1Γ,x:A⊢B:s2(s1,s2,s3)∈ℛΓ⊢Πx:A.B:s3(product)

Γ⊢C:Πx:A.BΓ⊢a:AΓ⊢Ca:B[x:=a](application)

Γ,x:A⊢b:BΓ⊢Πx:A.B:sΓ⊢λx:A.b:Πx:A.B(abstraction)

Γ⊢A:BB=βB′Γ⊢B′:sΓ⊢A:B′(conversion)

## Implementations

* SAGE[11]
* Yarrow[12]
* Henk 2000[13]
* Haskell since GHC version 8.[14][15]

## See also

* System U – an example of an inconsistent PTS
* λμ-calculus uses a different approach to control than CPTS

## Notes

1. ↑ 1.0 1.1 Pierce, Benjamin (2002). Types and Programming Languages. MIT Press. p. 466. ISBN 0-262-16209-1. https://archive.org/details/typesprogramming00pier_639.
2. ↑ 2.0 2.1 Kamareddine, Fairouz D.; Laan, Twan; Nederpelt, Rob P. (2004). "Section 4c: Pure type systems". A modern perspective on type theory: from its origins until today. Springer. p. 116. ISBN 1-4020-2334-0.
3. ↑ Barendregt, H. P. (1991). "Introduction to generalized type systems". Journal of Functional Programming 1 (2): 125–154. doi:10.1017/s0956796800020025. https://www.researchgate.net/publication/216300104.
4. ↑ 4.0 4.1 Barendregt, H. (1992). "Lambda calculi with types". in Abramsky, S.; Gabbay, D.; Maibaum, T.. Handbook of Logic in Computer Science. Oxford Science Publications. ftp://ftp.cs.ru.nl/pub/CompMath.Found/HBK.ps.
5. ↑ Berardi, S. (1990). Type dependence and Constructive Mathematics (PhD thesis). University of Torino.
6. ↑ Geuvers, H. (1993). Logics and Type Systems (PhD thesis). University of Nijmegen. CiteSeerX 10.1.1.56.7045.
7. ↑ Barthe, G.; Hatcliff, J.; Sørensen, M. H. (1997). "A Notion of Classical Pure Type System". Electronic Notes in Theoretical Computer Science 6: 4–59. doi:10.1016/S1571-0661(05)80170-7.
8. ↑ Borghuis, Tijn (1998). "Modal Pure Type Systems". Journal of Logic, Language and Information 7 (3): 265–296. doi:10.1023/A:1008254612284.
9. ↑ Jan-Willem Roorda; Johan Jeuring. "Pure Type Systems for Functional Programming". http://people.cs.uu.nl/johanj/MSc/jwroorda/. Roorda's masters' thesis (linked from the cited page) also contains a general introduction to pure type systems.
10. ↑ Sørensen, Morten Heine; Urzyczyn, Paweł (2006). "Pure type systems and the lambda cube § 14.7". Lectures on the Curry–Howard isomorphism. Elsevier. p. 358. ISBN 0-444-52077-5. https://books.google.com/books?id=_mtnm-9KtbEC&pg=PA358.
11. ↑ SAGE
12. ↑ Yarrow
13. ↑ Henk 2000
14. ↑ "6.4.14. Kind polymorphism — Glasgow Haskell Compiler 9.15.20260123 User's Guide". https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/poly_kinds.html#overview-of-type-in-type.
15. ↑ Weirich et al., System FC with Explicit Kind Equality, ICFP '13: "Therefore, we follow pure type systems (Barendregt 1992) and unify the syntax of types and kinds, allowing us to reuse type coercions as kind coercions. [...] Furthermore, our rules include the *:* axiom which means that there is no real distinction between types and kinds."

## References

* Berardi, Stefano (1988). Towards a mathematical analysis of the Coquand–Huet calculus of constructions and the other systems in Barendregt's cube (Technical report). Department of Computer Science, CMU, and Dipartimento Matematica, Universita di Torino. CMU-CS-88-131.
* Terlouw, J. (1989) (in nl). Een nadere bewijstheoretische analyse van GSTTs. Netherlands: University of Nijmegen.

## Further reading

* Schmidt, David A. (1994). "§ 8.3 Generalized Type Systems". The structure of typed programming languages. MIT Press. pp. 255–8. ISBN 0-262-19349-3. https://books.google.com/books?id=Ax2QXEwXhzQC&pg=PA255.

## External links

* Pure type system in nLab
* Jones, Roger Bishop (1999). "Pure Type Systems overview". http://www.rbjones.com/rbjpub/logic/cl/tlc004.htm.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Pure type system. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Pure_type_system&oldid=4350662"