Martin Hofmann’s Case for Non-Strictly Positive Data Types

Authors Ulrich Berger , Ralph Matthes , Anton Setzer

Thumbnail PDF


  • Filesize: 0.55 MB
  • 22 pages

Document Identifiers

Author Details

Ulrich Berger
  • Dept. of Computer Science, Swansea University, United Kingdom
Ralph Matthes
  • IRIT (CNRS and University of Toulouse), France
Anton Setzer
  • Dept. of Computer Science, Swansea University, United Kingdom


This paper is dedicated to the memory of the late Martin Hofmann. Martin was one of the leading researchers in the field of functional programming and type theory. This article is based on his notes [Martin Hofmann, 1993; Martin Hofmann, 1995], which is only one example of the inspiration he has given to many researchers. His tragic unexpected death was a deep loss for the community.

Cite AsGet BibTex

Ulrich Berger, Ralph Matthes, and Anton Setzer. Martin Hofmann’s Case for Non-Strictly Positive Data Types. In 24th International Conference on Types for Proofs and Programs (TYPES 2018). Leibniz International Proceedings in Informatics (LIPIcs), Volume 130, pp. 1:1-1:22, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


We describe the breadth-first traversal algorithm by Martin Hofmann that uses a non-strictly positive data type and carry out a simple verification in an extensional setting. Termination is shown by implementing the algorithm in the strongly normalising extension of system F by Mendler-style recursion. We then analyze the same algorithm by alternative verifications first in an intensional setting using a non-strictly positive inductive definition (not just a non-strictly positive data type), and subsequently by two different algebraic reductions. The verification approaches are compared in terms of notions of simulation and should elucidate the somewhat mysterious algorithm and thus make a case for other uses of non-strictly positive data types. Except for the termination proof, which cannot be formalised in Coq, all proofs were formalised in Coq and some of the algorithms were implemented in Agda and Haskell.

Subject Classification

ACM Subject Classification
  • Theory of computation → Logic and verification
  • Theory of computation → Type theory
  • Software and its engineering → Abstract data types
  • Software and its engineering → Recursion
  • Software and its engineering → Software verification
  • Software and its engineering → Coroutines
  • non strictly-positive data types
  • breadth-first traversal
  • program verification
  • Mendler-style recursion
  • System F
  • theorem proving
  • Coq
  • Agda
  • Haskell


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Andreas Abel and Ralph Matthes. Fixed Points of Type Constructors and Primitive Recursion. In Jerzy Marcinkowski and Andrzej Tarlecki, editors, Computer Science Logic, 18th International Workshop, CSL 2004, Karpacz, Poland, Proceedings, volume 3210 of Lecture Notes in Computer Science, pages 190-204. Springer, 2004. URL:
  2. Ulrich Berger, Ralph Matthes, and Anton Setzer. Git repository of code supplementing the present paper., 2018-2019.
  3. Jean-Yves Girard. Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur. Thèse de Doctorat d'État, Université de Paris VII, 1972. Google Scholar
  4. Jean-Yves Girard. Proofs and types. Cambridge Tracts in Theoretical Computer Science 7. Cambridge University Press, Cambridge, 1989. Google Scholar
  5. Robert Harper and John C. Mitchell. Parametricity and variants of Girard’s J operator. Information Processing Letters, 70:1-5, 1999. Google Scholar
  6. Martin Hofmann. Non Strictly Positive Datatypes in System F, February 1993. Email on types mailing list, URL:
  7. Martin Hofmann. Approaches to Recursive Datatypes - a Case Study, April 1995. LaTeX draft, 5 pages. Circulated by email. Google Scholar
  8. Geraint Jones and Jeremy Gibbons. Linear-time Breadth-first Tree Algorithms: An Exercise in the Arithmetic of Folds and Zips. Technical Report No. 71, Dept of Computer Science, University of Auckland, 1993. IFIP Working Group 2.1 working paper 705 WIN-2. URL:
  9. Ralph Matthes. Extensions of System F by Iteration and Primitive Recursion on Monotone Inductive Types. Doktorarbeit (PhD thesis), LMU München, 1998. Available via the homepage URL:
  10. Ralph Matthes. Tarski’s fixed-point theorem and lambda calculi with monotone inductive types. Synthese, 133(1):107-129, 2002. Google Scholar
  11. Paul F. Mendler. Inductive Definition in Type Theory. Technical Report 87-870, Cornell University, Ithaca, N.Y., September 1987. PhD. Thesis (Paul F. Mendler = Nax P. Mendler). Google Scholar
  12. Chris Okasaki. Simple and Efficient Purely Functional Queues and Deques. J. Funct. Program., 5(4):583-592, 1995. URL:
  13. Chris Okasaki. Breadth-first numbering: lessons from a small exercise in algorithm design. In Martin Odersky and Philip Wadler, editors, Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP '00), Montreal, Canada, September 18-21, 2000., ICFP '00, pages 131-136, New York, NY, USA, 2000. ACM. URL:
  14. John C. Reynolds. Towards a Theory of Type Structure. In B. Robinet, editor, Programming Symposium, volume 19 of Lecture Notes in Computer Science, pages 408-425. Springer, 1974. Google Scholar
  15. John C. Reynolds. Polymorphism is not Set-Theoretic. In Gilles Kahn, David B. MacQueen, and Gordon D. Plotkin, editors, Semantics of Data Types, International Symposium, Sophia-Antipolis, France, June 27-29, 1984, Proceedings, volume 173 of Lecture Notes in Computer Science, pages 145-156. Springer, 1984. URL:
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail