The dual of substitution is redecoration
Trends in functional programming
Structural Recursive Definitions in Type Theory
ICALP '98 Proceedings of the 25th International Colloquium on Automata, Languages and Programming
Generic Programming within Dependently Typed Programming
Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming
MPC '98 Proceedings of the Mathematics of Program Construction
Type-based termination of recursive definitions
Mathematical Structures in Computer Science
Journal of Functional Programming
de Bruijn notation as a nested datatype
Journal of Functional Programming
Distinguishing data structures and functions: the constructor calculus and functorial types
TLCA'01 Proceedings of the 5th international conference on Typed lambda calculi and applications
(Co-) iteration for higher-order nested datatypes
TYPES'02 Proceedings of the 2002 international conference on Types for proofs and programs
Substitution in non-wellfounded syntax with variable binding
Theoretical Computer Science - Selected papers of CMCS'03
Iteration and coiteration schemes for higher-order and nested datatypes
Theoretical Computer Science - Foundations of software science and computation structures
Verification of the redecoration algorithm for triangular matrices
TYPES'07 Proceedings of the 2007 international conference on Types for proofs and programs
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
A datastructure for iterated powers
MPC'06 Proceedings of the 8th international conference on Mathematics of Program Construction
Hi-index | 0.00 |
We solve the problem of extending Bird and Paterson's generalized folds for nested datatypes and its dual to inductive and coinductive constructors of arbitrarily high ranks by appropriately generalizing Mendler-style (co)iteration. Characteristically to Mendler-style schemes of disciplined (co)recursion, the schemes we propose do not rest on notions like positivity or monotonicity of a constructor and facilitate programming in a natural and elegant style close to programming with the customary letrec construct, where the typings of the schemes, however, guarantee termination. For rank 2, a smoothened version of Bird and Paterson's generalized folds and its dual are achieved; for rank 1, the schemes instantiate to Mendler's original (re)formulation of iteration and coiteration. Several examples demonstrate the power of the approach. Strong normalization of our proposed extension of system Fω of higher-order parametric polymorphism is proven by a reduction-preserving embedding into pure Fω.