## Typability and Type Checking in System F Are Equivalent and Undecidable (1998)

Venue: | Annals of Pure and Applied Logic |

Citations: | 58 - 4 self |

### BibTeX

@ARTICLE{Wells98typabilityand,

author = {J. B. Wells},

title = {Typability and Type Checking in System F Are Equivalent and Undecidable},

journal = {Annals of Pure and Applied Logic},

year = {1998},

volume = {98},

pages = {111--156}

}

### Years of Citing Articles

### OpenURL

### Abstract

Girard and Reynolds independently invented System F (a.k.a. the second-order polymorphically typed lambda calculus) to handle problems in logic and computer programming language design, respectively. Viewing F in the Curry style, which associates types with untyped lambda terms, raises the questions of typability and type checking . Typability asks for a term whether there exists some type it can be given. Type checking asks, for a particular term and type, whether the term can be given that type. The decidability of these problems has been settled for restrictions and extensions of F and related systems and complexity lower-bounds have been determined for typability in F, but this report is the rst to resolve whether these problems are decidable for System F. This report proves that type checking in F is undecidable, by a reduction from semiuni cation, and that typability in F is undecidable, by a reduction from type checking. Because there is an easy reduction from typability to typ...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...fe or require run-time coercions. Many functional programming languages use type systems which are related to System F. The designers of many strongly typed functional programming languages (e.g., ML =-=[MTH90]-=-, Miranda [Tur85], Haskell [HW88]) have chosen to use the Hindley/Milner type system whose core coincides with a fragment of F. There are also various programming languages using type systems based on... |

518 | Lambda calculi with types
- Barendregt
- 1992
(Show Context)
Citation Context ...tion types and thes-equivalence and approximation rules, it is only for F that the decidability of Typ and TC has remained unknown until now, as depicted by the table insgure 1, whichsrst appeared in =-=[Bar92]. 4 1-=- Typability has been called type reconstruction or type inference. 2 Type checking has been called derivation reconstruction. In the Church style, \type checking" usually means checking that a de... |

364 | Towards a theory of type structure - Reynolds - 1974 |

352 |
Proofs and Types
- Girard, Lafont, et al.
- 1989
(Show Context)
Citation Context ...s more -terms than does the Hindley/Milner type system. In fact, every computable function that is provably total using second-order Peano arithmetic is representable by a -term typable in System F [G=-=LT89-=-]. Another reason for using System F (or some related system) is that all computations on typable -terms are guaranteed to halt. In practice, general-purpose programming languages add features that al... |

238 | Interprétation fonctionnelle et elimination des coupures de l’arithmétique d’ordre supérieur. Thèse d’état, Université de Paris 7 - Girard - 1972 |

160 |
A non-strict functional language with polymorphic types
- Miranda
- 1985
(Show Context)
Citation Context ...-time coercions. Many functional programming languages use type systems which are related to System F. The designers of many strongly typed functional programming languages (e.g., ML [MTH90], Miranda =-=[Tur85]-=-, Haskell [HW88]) have chosen to use the Hindley/Milner type system whose core coincides with a fragment of F. There are also various programming languages using type systems based on variations of F ... |

154 |
The Lambda Calculus: its Syntax and Semantics. NorthHolland, revised edition
- Barendregt
- 1984
(Show Context)
Citation Context ...(X 1 ) f(X n ). For any set S, the expression jSj gives the cardinality of S (written ! if the same as the size of N). 2.2 -Terms Our notation for the -calculus generally follows Barendregt's [Bar84]. The set of all -terms is built from the countably innite set of -term variables V using application and abstraction as specied by this grammar: ::= V j ( ) j (V :) Small Roman letters fr... |

118 |
Report on the functional programming language Haskell (v1.1
- Hudak, Wadler
- 1991
(Show Context)
Citation Context ...Many functional programming languages use type systems which are related to System F. The designers of many strongly typed functional programming languages (e.g., ML [MTH90], Miranda [Tur85], Haskell =-=[HW88]-=-) have chosen to use the Hindley/Milner type system whose core coincides with a fragment of F. There are also various programming languages using type systems based on variations of F ! (e.g., Quest [... |

108 |
The principal type scheme of an object in combinatory logic
- Hindley
- 1969
(Show Context)
Citation Context ...e, pure, closed -terms corresponding to the simply typed -calculus, F, and F ! [GHRDR93]. This is depicted insgure 2. Because it has been known that Typ is decidable for the simply typed -calculus [Hi=-=n69]-=- and (recently) undecidable for F ! [Urz93b, Urz97], it is once again only for F that the answer has been unknown. Thus, determining the decidability of Typ and TC for F completes our knowledge of the... |

102 | Polymorphic type inference and containment - Mitchell - 1988 |

93 |
Recursive unsolvability of Post’s problem of ‘tag’ and other topics in the theory of Turing machines
- Minsky
- 1961
(Show Context)
Citation Context ...the diagram, the problems H-TM, I-TM, H-2CA, 2UP, SUP, and Sub are respectively, the halting problem, the immortality problem for Turing machines [Hoo66], the halting problem for two-counter automata =-=[Min6-=-1], the second-order unication problem [Gol81], the semi-unication problem, and Mitchell's subtyping relation [Mit88, TU96, Wel95, Jim95]. In the diagram, the system FCh is the Church-style presentati... |

85 |
Polymorphic Type Inference
- Leivant
- 1983
(Show Context)
Citation Context ...and related systems. Some of this research has focused directly on System F. Leivantsrst presented F in the Curry style in 1983 and made thesrst attempt to answer the question of decidability for Typ =-=[Lei83]-=-. Thesrst interesting lower-bound for the computational complexity of Typ was given by Henglein [HM91, HM94] who showed that Typ is DEXPTIME-hard (where DEXPTIME means DTIME(2 n O(1) )). This was done... |

78 | A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus
- Kfoury, Wells
- 1994
(Show Context)
Citation Context ...ystem that results from restricting System F to types ofsnite \rank" k, a notion introduced by Leivant [Lei83]. Our methods have been used to show the undecidability of Typ and TC for k where k =-= 3 [KW9-=-4]. These methods have also been extended to show the undecidability of Typ for System F+, the result of extending F with a rule for subject -reduction (equivalent to extending F with Mitchell's subty... |

28 | The complexity of type inference for higher-order typed lambda calculi - Henglein, Mairson - 1994 |

27 |
The Undecidability of the Turing Machine Immortality Problem
- Hooper
- 1966
(Show Context)
Citation Context ...problem is reduced, enough to show undecidability. In the diagram, the problems H-TM, I-TM, H-2CA, 2UP, SUP, and Sub are respectively, the halting problem, the immortality problem for Turing machines =-=[Hoo6-=-6], the halting problem for two-counter automata [Min61], the second-order unication problem [Gol81], the semi-unication problem, and Mitchell's subtyping relation [Mit88, TU96, Wel95, Jim95]. In the ... |

27 | On the undecidability of partial polymorphic type reconstruction. Fundarnenta Informaticae - Pfenning - 1993 |

27 |
A Language with Eval and Polymorphism
- Pfenning, Lee
- 1989
(Show Context)
Citation Context ... use the Hindley/Milner type system whose core coincides with a fragment of F. There are also various programming languages using type systems based on variations of F ! (e.g., Quest [Car91] and LEAP =-=[PL89]-=-). The choice to use a type system similar to F or some portion of F in real-world programming languages has many reasons. The minimal requirement is that the type system rules out nonsense computatio... |

25 | Typability and Type Checking in the Second-Order - Calculus Are Equivalent and Undecidable. submitted to APAP - Wells - 1996 |

24 | The typechecking of programs with implicit type structure - McCracken - 1984 |

21 | Partial polymorphic type inference is undecidable - Boehm - 1985 |

20 | The subtyping problem for second-order types is undecidable - Tiuryn, Urzyczyn - 1996 |

15 |
Characterization of typings in polymorphic type discipline
- Giannini, Rocca, et al.
- 1988
(Show Context)
Citation Context ...he sequent A ` M : , then there is a derivation D 0 ending with the same sequent that satises the INST-before-GEN property. Proof. This is an immediate consequence (or restatement) of theorem 3 in [G=-=RDR88] whi-=-ch is itself a direct consequence of \the normalization property for second-order deductions given in [Pra65]". Denition 3.3 (GEN-Distinct Derivations). A derivation D is GEN-distinct if for ever... |

13 |
Typeful Programming. Formal Descriptions of Programming Concepts, E.J.Neuhold, M.Paul Eds., Springer-Verlag
- Cardelli
- 1991
(Show Context)
Citation Context ...]) have chosen to use the Hindley/Milner type system whose core coincides with a fragment of F. There are also various programming languages using type systems based on variations of F ! (e.g., Quest =-=[Car91]-=- and LEAP [PL89]). The choice to use a type system similar to F or some portion of F in real-world programming languages has many reasons. The minimal requirement is that the type system rules out non... |

13 |
The undecidability of the second-order uni problem
- Goldfarb
- 1981
(Show Context)
Citation Context ...2UP, SUP, and Sub are respectively, the halting problem, the immortality problem for Turing machines [Hoo66], the halting problem for two-counter automata [Min61], the second-order unication problem [=-=Gol81-=-], the semi-unication problem, and Mitchell's subtyping relation [Mit88, TU96, Wel95, Jim95]. In the diagram, the system FCh is the Church-style presentation of System F where only binding occurrences... |

13 | The undecidability of Mitchell’s subtyping relation - Wells - 1995 |

11 | The emptiness problem for intersection types - Urzyczyn - 1999 |

10 | On a Unification Problem related to Kreisel’s Conjecture - Pudlák - 1988 |

9 | Typability is undecidable for F+eta - Wells - 1996 |

7 |
S.R.D.: Type inference: Some results, some problems
- Giannini, Honsell, et al.
- 1993
(Show Context)
Citation Context ...of undecidability have been given for both the problem of partial polymorphic type inference in the Church style [Boe85, Pfe93], which is related to Typ, and the problem of conditional type inference =-=[GHRDR93]-=-, which is related to TC. Only a fraction of the research over the years is mentioned here. Despite this intensive research program, until now the decidability of Typ and TC have remained \embarrassin... |

7 | Type Inference for System F with and without the Eta Rule - Wells - 1996 |

6 |
The undecidability of the semi-uni cation problem
- Kfoury, Tiuryn, et al.
- 1993
(Show Context)
Citation Context ...port is proving the undecidability of Typ and TC for System F. 1. Wesrst prove that the problem of semi-unication can be reduced to TC using a simple encoding. Because semi-unication is undecidable [K=-=TU9-=-3], so is TC. 2. We then reduce TC to Typ using a novel method of building -terms which simulate arbitrarily chosen type environments. The proof begins by showing that there exists a typable -term J s... |

5 | Type reconstruction in F - Urzyczyn - 1997 |

4 |
Type inference in polymorphic type discipline
- Giannini, Rocca
- 1991
(Show Context)
Citation Context ...ated problems for F itself. Multiple stratications of F have been proposed which restrict some parameter of derivations in F tosnite values, e.g., depth of bound type variable from binding quantier [G=-=RDR91], th-=-e number of generations of instantiation of quantiers themselves introduced by instantiation [Lei91], and the \rank" of polymorphic types (introduced in [Lei83], further studied in [McC84, KT92, ... |

4 |
Finitely strati polymorphism
- Leivant
- 1991
(Show Context)
Citation Context ...of derivations in F tosnite values, e.g., depth of bound type variable from binding quantier [GRDR91], the number of generations of instantiation of quantiers themselves introduced by instantiation [L=-=ei91], and-=- the \rank" of polymorphic types (introduced in [Lei83], further studied in [McC84, KT92, KW94]). Urzyczyn recently showed Typ to be undecidable for F's powerful extension, the system F ! [Urz93b... |

4 | Type Reconstruction in F ! is undecidable - Urzyczyn - 1993 |

3 |
Natural Deduction: a Proof-Theoretical Study. Number 3
- Prawitz
- 1965
(Show Context)
Citation Context ...EN property. Proof. This is an immediate consequence (or restatement) of theorem 3 in [GRDR88] which is itself a direct consequence of \the normalization property for second-order deductions given in =-=[Pra65-=-]". Denition 3.3 (GEN-Distinct Derivations). A derivation D is GEN-distinct if for every subderivation ending with A ` M : GEN A ` M : 8: it is the case that the type variable does not appear ... |

2 |
A strongly normalizable term having no type in the System F (second order -calculus). Rapporto interno, Univ. di
- Giannini, Honsell, et al.
- 1987
(Show Context)
Citation Context ... a larger set of terms than the previous level. As asnal example, the following slight modication of the -term J is stronglys-normalizing but not typable in System F (thesrst such term was given in [G=-=H-=-RDR87]): v:(y:z:v(yy)(yz))(x:Kx(x(xv)v))(w:ww) Figure 3 diagrams the relationships between various undecidable problems both for F as well as for the related systems F ! and F+, with each arrow indica... |

2 | Type inference in System F plus subtyping - Jim - 1995 |

2 | Type reconstruction in fragments of the second-order -calculus - Kfoury, Tiuryn - 1992 |

1 |
Second-order uni and type inference for Church-style polymorphism
- Schubert
- 1998
(Show Context)
Citation Context ...h-style presentation of System F where only binding occurrences of variables are annotated with types. Schubert recently discovered the surprising result that typability in that system is undecidable =-=[Sch9-=-8]. Note that the reduction from H-2CA to Sub [TU96] does not prove undecidable a fragment of Sub that matches with the partial reduction from F+-TC to 6 F+-Typ [Wel96a, Wel96b], so it does not contri... |