Abstract
In this paper we show that a prototypical subtype relation that can neither be defined as a least fixed point nor as a greatest fixed point can nevertheless be defined in a dependently typed language with inductive and coinductive types. The definition proceeds alike a fold in functional programming, although a rather unusual one: that is not applied to any starting object. There has been a related construction of bisimilarity in Coq by Nakata and Uustalu recently, however, our case is not concerned with bisimilarity but a weaker notion of similarity that corresponds to recursive subtyping and has it’s own interesting problems.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abel, A., Matthes, R., Uustalu, T.: Iteration and coiteration schemes for higher-order and nested datatypes. Theoretical Computer Science 333(1-2), 3–66 (2005)
Altenkirch, T., Reus, B.: Monadic Presentations of Lambda Terms Using Generalized Inductive Types. In: Flum, J., Rodríguez-Artalejo, M. (eds.) CSL 1999. LNCS, vol. 1683, pp. 453–468. Springer, Heidelberg (1999)
Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)
Bird, R., de Moor, O.: Algebra of programming. Prentice-Hall, Inc., Upper Saddle River (1997)
Brandt, M., Henglein, F.: Coinductive Axiomatization of Recursive Type Equality and Subtyping. In: de Groote, P., Hindley, J.R. (eds.) TLCA 1997. LNCS, vol. 1210, pp. 63–81. Springer, Heidelberg (1997)
Capretta, V.: Certifying the Fast Fourier Transform with Coq. In: Boulton, R.J., Jackson, P.B. (eds.) TPHOLs 2001. LNCS, vol. 2152, pp. 154–168. Springer, Heidelberg (2001)
Danielsson, N.A., Altenkirch, T.: Mixing induction and coinduction, Draft (2009)
Danielsson, N.A., Altenkirch, T.: Subtyping, Declaratively. In: Bolduc, C., Desharnais, J., Ktari, B. (eds.) MPC 2010. LNCS, vol. 6120, pp. 100–118. Springer, Heidelberg (2010)
Gapeyev, V., Levin, M.Y., Pierce, B.: Recursive subtyping revealed. J. Fun. Prog. 12(6), 511–548 (2002)
Gonthier, G., Mahboubi, A., Tassi, E.: A Small Scale Reflection Extension for the Coq system. Research Report RR-6455, INRIA (2011)
Henglein, F., Nielsen, L.: Declarative coinductive axiomatization of regular expression containment and its computational interpretation (preliminary version). Technical Report 612, Department of Computer Science, University of Copenhagen (DIKU) (February 2010)
Komendantsky, V.: Computable partial derivatives of regular expressions, Draft. Contributed proofs (2011), http://www.cs.standrews.ac.uk/~vk/doc/mir.v
Komendantsky, V.: Regular expression containment as a proof search problem. In: Lengrand, S. (ed.) Pre-proceedings of the International Workshop on Proof-Search in Axiomatic Theories and Type Theories, PSATTT 2011 (2011)
Kozen, D., Palsberg, J., Schwartzbach, M.I.: Efficient recursive subtyping. In: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1993, pp. 419–428. ACM, New York (1993)
McBride, C.: Type-preserving renaming and substitution (2005) (manuscript)
McBride, C.: Let’s See How Things Unfold: Reconciling the Infinite with the Intensional (Extended Abstract). In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 113–126. Springer, Heidelberg (2009)
Miyamoto, T.: RegExp contribution to Coq (2011)
Nakata, K., Uustalu, T.: Resumptions, weak bisimilarity and big-step semantics for While with interactive I/O: An exercise in mixed induction-coinduction. In: Proc. Structural Operational Semantics, SOS 2010 (2010)
Coq development team. The Coq proof assistant reference manual, http://coq.inria.fr/refman/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Komendantsky, V. (2012). Subtyping by Folding an Inductive Relation into a Coinductive One. In: Peña, R., Page, R. (eds) Trends in Functional Programming. TFP 2011. Lecture Notes in Computer Science, vol 7193. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32037-8_2
Download citation
DOI: https://doi.org/10.1007/978-3-642-32037-8_2
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32036-1
Online ISBN: 978-3-642-32037-8
eBook Packages: Computer ScienceComputer Science (R0)