Advertisement

Tail recursion from universal invariants

  • C. Barry Jay
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 530)

Abstract

The categorical account of lists is usually given in terms of initial algebras, i.e. head recursion. But it is also possible to define them by interpreting tail recursion by means of the colimit of a loop diagram, i.e. its universal invariant. Parametrised initial algebras always have universal invariants, while the converse holds in the presence of equalisers.

Consequences include categorical descriptions of vectors and matrices, which allow definitions of inner products, transposes and matrix multiplication.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    R. Bird and P. Wadler, Introduction to Functional Programming International Series in Computer Science, ed: C.A.R. Hoare (Prentice Hall, 1988).Google Scholar
  2. [2]
    J.R.B. Cockett, List-arithmetic distributive categories: locoi, J. Pure and Appl. Alg. 66 (1990) 1–29.Google Scholar
  3. [3]
    J.R.B. Cockett, Distributive Theories, in: G. Birtwistle (ed), IV Higher Order Workshop, Banff, 1990, (Springer, 1991).Google Scholar
  4. [4]
    A note on natural numbers objects in monoidal categories, Studia Logica 48(3) (1989) 389–393.Google Scholar
  5. [5]
    C.B. Jay, Fixpoint and loop constructions as colimits, preprint.Google Scholar
  6. [7]
    C.B. Jay, Matrices, monads and the Fast Fourier Transform, in preparation.Google Scholar
  7. [8]
    G. Jones, Calculating the Fast Fourier Transform, in: G. Birtwistle (ed), IV Higher Order Workshop, Banff, 1990, (Springer, 1991).Google Scholar
  8. [9]
    J. Lambek and P. Scott, Introduction to higher order categorical logic, Cambridge studies in advanced mathematics 7, Cam. Univ. Press (1986).Google Scholar
  9. [10]
    S. Mac Lane, Categories for the Working Mathematician (Springer-Verlag, 1971).Google Scholar
  10. [11]
    E. Moggi, Computational lambda-calculus and monads, Proceedings Fourth Annual Symposium on Logic in Computer Science (1989) 14–23.Google Scholar
  11. [12]
    R. Paré and L. Roman, Monoidal categories with natural numbers object, Studia Logica 48(3) (1989).Google Scholar
  12. [13]
    L. Roman, Cartesian categories with natural numbers object, J. of Pure and Appl. Alg. 58 (1989) 267–278.Google Scholar
  13. [14]
    R.F.C. Walters, Datatypes in distributive categories, Bull. Australian Math. Soc. 40 (1989) 79–82.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • C. Barry Jay
    • 1
    • 2
  1. 1.University of EdinburghUK
  2. 2.University of OttawaCanada

Personalised recommendations