This paper presents a case study of formalizing a normalization proof for Leivant's Predicative System F using the Equations package. Leivant's Predicative System F is a stratified version of System F, where type quantification is annotated with kinds representing universe levels. A weaker variant of this system was studied by Stump & Eades, employing the hereditary substitution method to show normalization. We improve on this result by showing normalization for Leivant's original system using hereditary substitutions and a novel multiset ordering on types. Our development is done in the Coq proof assistant using the Equations package, which provides an interface to define dependently-typed programs with well-founded recursion and full dependent pattern-matching. Equations allows us to define explicitly the hereditary substitution function, clarifying its algorithmic behavior in presence of term and type substitutions. From this definition, consistency can easily be derived. The algorithmic nature of our development is crucial to reflect languages with type quantification, enlarging the class of languages on which reflection methods can be used in the proof assistant.
[1]
Sébastien Hinderer,et al.
CoLoR : a Coq library on rewriting and termination
,
2006
.
[2]
Adam Chlipala,et al.
Compositional Computational Reflection
,
2014,
ITP.
[3]
Harley D. Eades,et al.
The semantic analysis of advanced programming languages
,
2014
.
[4]
Conor McBride,et al.
Eliminating Dependent Pattern Matching
,
2006,
Essays Dedicated to Joseph A. Goguen.
[5]
Conor McBride,et al.
Epigram: Practical Programming with Dependent Types
,
2004,
Advanced Functional Programming.
[7]
U. Norell,et al.
Towards a practical programming language based on dependent type theory
,
2007
.
[8]
Daniel Leivant,et al.
Finitely Stratified Polymorphism
,
1991,
Inf. Comput..
[9]
Matthieu Sozeau.
Equations: A Dependent Pattern-Matching Compiler
,
2010,
ITP.