The Undecidability of System F Typability and Type Checking for Reductionists
Andrej Dudenhefner
Abstract
The undecidability of both typability and type checking for System F (polymorphic lambda-calculus) was established by Wells in the 1990s. For type checking Wells gave an astonishingly simple reduction from semi-unification (first-order unification combined with first-order matching). For typability Wells developed an intricate calculus to control the shape of type assumptions across type derivations via term structure. This calculus of invariant type assumptions allows for a reduction from type checking to typability. Unfortunately, this approach relies on heavy machinery that complicates surveyability of the overall argument.
The present work gives comparatively simple, direct reduction from semi-unification to System F typability. The key observation is as follows: in the existential setting of typability, it suffices to consider some specific (but not all, as for invariant type assumptions) type derivations. Additionally, the particular result requires only to consider closed types without nested quantification.
The undecidability of type checking is obtained via a folklore reduction from typability.
Profiting from its smaller footprint, correctness of the new approach is witnessed by a mechanization in the Coq proof assistant. The mechanization is incorporated into the existing Coq library of undecidability proofs. For free, the library provides constructive, mechanically verified many-one reductions from Turing machine halting to both System F typability and System F type checking.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Related papers
- Qualifying System F<: Some Terms and Conditions May ApplyEdward Lee, Yaoyu Zhao, Ondrej Lhoták, James You et al.OOPSLA 2024 · 2 citations
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao et al.POPL 2024 · 12 citations
- FreezeML: complete and easy type inference for first-class polymorphismFrank Emrich, Sam Lindley, Jan Stolarek, James Cheney et al.PLDI 2020 · 13 citations
- Type Inference LogicsDenis Carnier, François Pottier, Steven KeuchelOOPSLA 2024 · 3 citations
- Recursive Subtyping for AllLitao Zhou, Yaoda Zhou, Bruno C. d. S. OliveiraPOPL 2023 · 8 citations
