Subtyping by Folding an Inductive Relation into a Coinductive One

  • Vladimir Komendantsky
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7193)

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.

Keywords

Regular Expression Proof Assistant Inductive Relation Inductive Type Type Constructor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    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)MathSciNetMATHCrossRefGoogle Scholar
  2. 2.
    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)CrossRefGoogle Scholar
  3. 3.
    Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)CrossRefGoogle Scholar
  4. 4.
    Bird, R., de Moor, O.: Algebra of programming. Prentice-Hall, Inc., Upper Saddle River (1997)MATHGoogle Scholar
  5. 5.
    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)CrossRefGoogle Scholar
  6. 6.
    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)CrossRefGoogle Scholar
  7. 7.
    Danielsson, N.A., Altenkirch, T.: Mixing induction and coinduction, Draft (2009)Google Scholar
  8. 8.
    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)CrossRefGoogle Scholar
  9. 9.
    Gapeyev, V., Levin, M.Y., Pierce, B.: Recursive subtyping revealed. J. Fun. Prog. 12(6), 511–548 (2002)MathSciNetMATHGoogle Scholar
  10. 10.
    Gonthier, G., Mahboubi, A., Tassi, E.: A Small Scale Reflection Extension for the Coq system. Research Report RR-6455, INRIA (2011)Google Scholar
  11. 11.
    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)Google Scholar
  12. 12.
    Komendantsky, V.: Computable partial derivatives of regular expressions, Draft. Contributed proofs (2011), http://www.cs.standrews.ac.uk/~vk/doc/mir.v
  13. 13.
    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)Google Scholar
  14. 14.
    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)CrossRefGoogle Scholar
  15. 15.
    McBride, C.: Type-preserving renaming and substitution (2005) (manuscript)Google Scholar
  16. 16.
    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)CrossRefGoogle Scholar
  17. 17.
    Miyamoto, T.: RegExp contribution to Coq (2011)Google Scholar
  18. 18.
    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)Google Scholar
  19. 19.
    Coq development team. The Coq proof assistant reference manual, http://coq.inria.fr/refman/

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Vladimir Komendantsky
    • 1
  1. 1.School of Computer ScienceUniversity of St AndrewsSt AndrewsUK

Personalised recommendations