Permutations in Coinductive Graph Representation

  • Celia Picard
  • Ralph Matthes
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7399)


In the proof assistant Coq, one can model certain classes of graphs by coinductive types. The coinductive aspects account for infinite navigability already in finite but cyclic graphs, as in rational trees. Coq’s static checks exclude simple-minded definitions with lists of successors of a node. In previous work, we have shown how to mimic lists by a type of functions and built a Coq theory for such graphs. Naturally, these coinductive structures have to be compared by a bisimulation relation, and we defined it in a generic way.

However, there are many cases in which we would not like to distinguish between graphs that are constructed differently and that are thus not bisimilar, in particular if only the order of elements in the lists of successors is not the same. We offer a wider bisimulation relation that allows permutations. Technical problems arise with their specification since (1) elements have to be compared by a not necessarily decidable relation and (2) coinductive types are mixed with inductive ones. Still, a formal development has been carried out in Coq, by using its built-in language for proof automation.

Another extension of the original bisimulation relation based on cycle analysis provides indifference concerning the root node of the term graphs.


Base Relation Inductive Tree Proof Assistant Pigeonhole Principle Bisimulation Relation 
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.


  1. 1.
    Altenkirch, T.: A Formalization of the Strong Normalization Proof for System F in LEGO. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664, pp. 13–28. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  2. 2.
    Berardi, S., Damiani, F., de’Liguoro, U. (eds.): TYPES 2008. LNCS, vol. 5497. Springer, Heidelberg (2009)zbMATHGoogle Scholar
  3. 3.
    Berger, U.: From coinductive proofs to exact real arithmetic: theory and applications. Logical Methods in Computer Science 7(1) (2011)Google Scholar
  4. 4.
    Bertot, Y., Komendantskaya, E.: Using structural recursion for corecursion. In: Berardi et al. [2], pp. 220–236Google Scholar
  5. 5.
    Chlipala, A.: In Coq club thread “is Coq being too conservative?” (January 2010),
  6. 6.
    Contejean, E.: Modeling Permutations in Coq for Coccinelle. In: Comon-Lundh, H., Kirchner, C., Kirchner, H. (eds.) Jouannaud Festschrift. LNCS, vol. 4600, pp. 259–269. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Coquand, T.: Infinite Objects in Type Theory. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, pp. 62–78. Springer, Heidelberg (1994)CrossRefGoogle Scholar
  8. 8.
    Dams, C.: In Coq club thread “is Coq being too conservative?” (January 2010),
  9. 9.
    Danielsson, N.A.: Beating the productivity checker using embedded languages. In: Bove, A., Komendantskaya, E., Niqui, M. (eds.) Proceedings Workshop on Partiality and Recursion in Interactive Theorem Provers. EPTCS, vol. 43, pp. 29–48 (2010)Google Scholar
  10. 10.
    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
  11. 11.
    Giménez, E., Castéran, P.: A tutorial on [co-]inductive types in Coq (2007),
  12. 12.
    McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1), 69–111 (2004)MathSciNetzbMATHCrossRefGoogle Scholar
  13. 13.
    Nakata, K., Uustalu, T.: Resumptions, weak bisimilarity and big-step semantics for while with interactive I/O: An exercise in mixed induction-coinduction. In: Aceto, L., Sobocinski, P. (eds.) SOS. EPTCS, vol. 32, pp. 57–75 (2010)Google Scholar
  14. 14.
    Nakata, K., Uustalu, T., Bezem, M.: A Proof Pearl with the Fan Theorem and Bar Induction - Walking through Infinite Trees with Mixed Induction and Coinduction. In: Yang, H. (ed.) APLAS 2011. LNCS, vol. 7078, pp. 353–368. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  15. 15.
    Niqui, M.: Coalgebraic reasoning in Coq: Bisimulation and the lambda-coiteration scheme. In: Berardi et al. [2], pp. 272–288Google Scholar
  16. 16.
    Picard, C., Matthes, R.: Coinductive graph representation: the problem of embedded lists. Electronic Communications of the EASST 39, 24 pages (2011)Google Scholar
  17. 17.
    Picard, C., Matthes, R.: Formalization in Coq for this article (2012),
  18. 18.
    Prince, R., Ghani, N., McBride, C.: Proving Properties about Lists Using Containers. In: Garrigue, J., Hermenegildo, M.V. (eds.) FLOPS 2008. LNCS, vol. 4989, pp. 97–112. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  19. 19.
    The Coq Development Team: The Coq Proof Assistant Reference Manual,
  20. 20.
    The Coq Development Team: The Coq Proof Assistant Standard Library,
  21. 21.
    The Coq Development Team: The Coq Proof Assistant Standard Library,
  22. 22.
    Uustalu, T., Vene, V.: Least and greatest fixed points in intuitionistic natural deduction. Theoretical Computer Science 272, 315–339 (2002)MathSciNetzbMATHCrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2012

Authors and Affiliations

  • Celia Picard
    • 1
  • Ralph Matthes
    • 1
  1. 1.Institut de Recherche en Informatique de Toulouse (IRIT)University of Toulouse and C.N.R.S.France

Personalised recommendations