Implementing a normalizer using sized heterogeneous types

In the simply typed λ-calculus, a hereditary substitution replaces a free variable in a normal form r by another normal form s of type a, removing freshly created redexes on the fly. It can be defined by lexicographic induction on a and r, thus giving rise to a structurally recursive normalizer for the simply typed λ-calculus. We implement hereditary substitutions in a functional programming language with sized heterogeneous inductive types $\Fhat$ , arriving at an interpreter whose termination can be tracked by the type system of its host programming language.

[1]  Andreas Abel,et al.  Type-based termination: a polymorphic lambda-calculus with sized higher-order types , 2006 .

[2]  Andreas Abel Semi-continuous Sized Types and Termination , 2006, CSL.

[3]  S. Maclane,et al.  Categories for the Working Mathematician , 1971 .

[4]  Roberto M. Amadio,et al.  Analysis of a Guard Condition in Type Theory (Extended Abstract) , 1998, FoSSaCS.

[5]  D. Walker,et al.  A concurrent logical framework I: Judgments and properties , 2003 .

[6]  Andreas Abel Termination checking with types , 2004, RAIRO Theor. Informatics Appl..

[7]  Thorsten Altenkirch,et al.  Monadic Presentations of Lambda Terms Using Generalized Inductive Types , 1999, CSL.

[8]  Robert Harper,et al.  Mechanizing metatheory in a logical framework , 2007, Journal of Functional Programming.

[9]  Luís Pinto,et al.  Type-based termination of recursive definitions , 2004, Mathematical Structures in Computer Science.

[10]  Andreas Abel,et al.  Normalization for the Simply-Typed Lambda-Calculus in Twelf , 2008, LFM@IJCAR.

[11]  Eduardo Giménez,et al.  Structural Recursive Definitions in Type Theory , 1998, ICALP.

[12]  Amr Sabry,et al.  Proving the correctness of reactive systems using sized types , 1996, POPL '96.

[13]  Benjamin Grégoire,et al.  CIC[^( )]: Type-Based Termination of Recursive Definitions in the Calculus of Inductive Constructions , 2006, LPAR.

[14]  Richard S. Bird,et al.  de Bruijn notation as a nested datatype , 1999, Journal of Functional Programming.

[15]  Robin Adams Formalized Metatheory with Terms Represented by an Indexed Family of Types , 2004, TYPES.

[16]  W. V. Quine,et al.  Natural deduction , 2021, An Introduction to Proof Theory.

[17]  N. P. Mendler,et al.  Inductive Types and Type Constraints in the Second-Order lambda Calculus , 1991, Ann. Pure Appl. Log..

[18]  Frédéric Blanqui,et al.  Decidability of Type-Checking in the Calculus of Algebraic Constructions with Size Annotations , 2005, CSL.

[19]  Stefan Berghofer Extracting a Normalization Algorithm in Isabelle/HOL , 2004, TYPES.

[20]  René David,et al.  Arithmetical Proofs of Strong Normalization Results for the Symmetric lambda-µ-Calculus , 2007, TLCA.

[21]  Ralph Matthes,et al.  Short proofs of normalization for the simply- typed λ-calculus, permutative conversions and Gödel's T , 2003, Arch. Math. Log..

[22]  William W. Tait,et al.  Intensional interpretations of functionals of finite type I , 1967, Journal of Symbolic Logic.

[23]  Benjamin Grégoire,et al.  Practical Inference for Type-Based Termination in a Polymorphic Setting , 2005, TLCA.

[24]  Andreas Abel Implementing a normalizer using sized heterogeneous types , 2006 .

[25]  Ralph Matthes,et al.  Short Proofs of Normalization , 2002 .

[26]  David Walker,et al.  A Concurrent Logical Framework: The Propositional Fragment , 2003, TYPES.

[27]  Ralph Matthes,et al.  Iteration and coiteration schemes for higher-order and nested datatypes , 2005, Theor. Comput. Sci..

[28]  Thorsten Altenkirch A Formalization of the Strong Normalization Proof for System F in LEGO , 1993, TLCA.

[29]  Frédéric Blanqui A Type-Based Termination Criterion for Dependently-Typed Higher-Order Rewrite Systems , 2004, RTA.

[30]  Christine Paulin-Mohring,et al.  Types for Proofs and Programs , 2008, Lecture Notes in Computer Science.

[31]  N. P. Mendler,et al.  Recursive Types and Type Constraints in Second-Order Lambda Calculus , 1987, LICS.

[32]  Julio Herrera,et al.  Type-based termination of recursive denitions , 2004 .

[33]  James Hook,et al.  Substitution: A Formal Methods Case Study Using Monads and Transformations , 1994, Sci. Comput. Program..

[34]  Andreas Abel Polarized Subtyping for Sized Types , 2006, CSR.

[35]  S. Lane Categories for the Working Mathematician , 1971 .