Skip to main content

Subtyping by Folding an Inductive Relation into a Coinductive One

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNTCS,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.

This is a preview of subscription content, access via your institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   54.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   72.00
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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)

    CrossRef  MathSciNet  MATH  Google Scholar 

  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)

    CrossRef  Google Scholar 

  3. Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)

    CrossRef  Google Scholar 

  4. Bird, R., de Moor, O.: Algebra of programming. Prentice-Hall, Inc., Upper Saddle River (1997)

    MATH  Google Scholar 

  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)

    CrossRef  Google Scholar 

  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)

    CrossRef  Google Scholar 

  7. Danielsson, N.A., Altenkirch, T.: Mixing induction and coinduction, Draft (2009)

    Google Scholar 

  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)

    CrossRef  Google Scholar 

  9. Gapeyev, V., Levin, M.Y., Pierce, B.: Recursive subtyping revealed. J. Fun. Prog. 12(6), 511–548 (2002)

    MathSciNet  MATH  Google Scholar 

  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. 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. Komendantsky, V.: Computable partial derivatives of regular expressions, Draft. Contributed proofs (2011), http://www.cs.standrews.ac.uk/~vk/doc/mir.v

  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. 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)

    CrossRef  Google Scholar 

  15. McBride, C.: Type-preserving renaming and substitution (2005) (manuscript)

    Google Scholar 

  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)

    CrossRef  Google Scholar 

  17. Miyamoto, T.: RegExp contribution to Coq (2011)

    Google Scholar 

  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. Coq development team. The Coq proof assistant reference manual, http://coq.inria.fr/refman/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)