Skip to main content
    • Aa
    • Aa

Finiteness and rational sequences, constructively*


Rational sequences are possibly infinite sequences with a finite number of distinct suffixes. In this paper, we present different implementations of rational sequences in Martin–Löf type theory. First, we literally translate the above definition of rational sequence into the language of type theory, i.e., we construct predicates on possibly infinite sequences expressing the finiteness of the set of suffixes. In type theory, there exist several inequivalent notions of finiteness. We consider two of them, listability and Noetherianness, and show that in the implementation of rational sequences the two notions are interchangeable. Then we introduce the type of lists with backpointers, which is an inductive implementation of rational sequences. Lists with backpointers can be unwound into rational sequences, and rational sequences can be truncated into lists with backpointers. As an example, we see how to convert the fractional representation of a rational number into its decimal representation and vice versa.

Hide All

This work was supported by the ERDF funded project Coinduction, the Estonian Ministry of Education and Research institutional research grant no. IUT33-13 and the Estonian Science Foundation grant no. 9475.

Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

J. Adámek , S. Milius & J. Velebil (2003) Free iterative theories: A coalgebraic view. Math. Struct. Comput. Sci. 13 (2), 259320.

M. Bezem , K. Nakata & T. Uustalu (2012) On streams that are finitely red. Log. Meth. Comput. Sci. 8 (4), article 4.

S. L. Bloom & C. C. Elgot (1976) The existence and construction of free iterative theories. J. Comput. Syst. Sci. 12 (3), 305318.

B. Courcelle (1983) Fundamental properties of infinite trees. Theor. Comput. Sci. 25, 95169.

C. C. Elgot , S. L. Bloom & R. Tindell (1978) On the algebraic structure of rooted trees. J. Comput. Syst. Sci. 16 (3), 361399.

S. Ginali (1979) Regular trees and the free iterative theory. J. Comput. Syst. Sci. 18 (3), 228242.

G. Huet (1997) The zipper. J. Funct.Program. 7 (5), 549554.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 25 *
Loading metrics...

Abstract views

Total abstract views: 178 *
Loading metrics...

* Views captured on Cambridge Core between 5th April 2017 - 25th July 2017. This data will be updated every 24 hours.