Coinductive Correctness of Homographic and Quadratic Algorithms for Exact Real Numbers

  • Milad Niqui
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4502)

Abstract

In this article we present a method for formally proving the correctness of the lazy algorithms for computing homographic and quadratic transformations — of which field operations are special cases— on a representation of real numbers by coinductive streams. The algorithms work on coinductive stream of Möbius maps and form the basis of Edalat–Potts exact real arithmetic. We build upon our earlier work of formalising the homographic and quadratic algorithms in constructive type theory via general corecursion. Based on the notion of cofixed point equations for general corecursive definitions we prove by coinduction the correctness of the algorithms. We use the machinery of the Coq proof assistant for coinductive types to present the formalisation. The material in this article is fully formalised in the Coq proof assistant.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barwise, J., Moss, L.: Vicious Circles: On the Mathematics of Non-Wellfounded Phenomena. CSLI Publications, Stanford (1996)MATHGoogle Scholar
  2. 2.
    Beckmann, A., Berger, U., Löwe, B., Tucker, J.V. (eds.): CiE 2006. LNCS, vol. 3988. Springer, Heidelberg (2006)MATHGoogle Scholar
  3. 3.
    Bertot, Y.: CoInduction in Coq. In: Lecture Notes of TYPES Summer School 2005, August 1526 2005, Göteborg, Sweden. vol II (2005), http://www.cs.chalmers.se/Cs/Research/Logic/TypesSS05/Extra/lectnotes_vol2.pdf [cited 31 January 2007]
  4. 4.
    Bertot, Y.: Filters on coinductive streams, an application to Eratosthenes sieve. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 102–115. Springer, Heidelberg (2005)Google Scholar
  5. 5.
    Bertot, Y.: Affine functions and series with co-inductive real numbers. Math. Structures Comput. Sci. (to appear)Google Scholar
  6. 6.
    Bove, A., Capretta, V.: Nested general recursion and partiality in type theory. In: Boulton, R.J., Jackson, P.B. (eds.) TPHOLs 2001. LNCS, vol. 2152, pp. 121–135. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Ciaffaglione, A., Di Gianantonio, P.: A certified, corecursive implementation of exact real numbers. Theoret. Comput. Sci. 351(1), 39–51 (2006)MATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    The Coq Development Team. The Coq Proof Assistant Reference Manual, Version 8.0. LogiCal Project (April 2004), http://coq.inria.fr/doc/main.html [cited 31 January 2007)
  9. 9.
    Coquand, T.: Infinite objects in type theory. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, pp. 62–78. Springer, Heidelberg (1994)Google Scholar
  10. 10.
    Dubois, C., Donzeau-Gouge, V.V.: A step towards the mechanization of partial functions: domains as inductive predicates. In: Kerber, M. (ed.) Proc. Workshop on Mechanization of Partial Functions, July 5, 1998, Lindau, Germany, pp. 53–62 (1998), available at ftp://ftp.cs.bham.ac.uk/pub/authors/M.Kerber/98-CADE-WS/dubois-donzeau.ps.gz [cited 31 January 2007]
  11. 11.
    Edalat, A., Heckmann, R.: Computing with Real Numbers. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds.) APPSEM 2000. LNCS, vol. 2395, pp. 193–267. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  12. 12.
    Edalat, A., Potts, P.J.: A new representation for exact real numbers. In: Brookes, S., Mislove, M. (eds.) Mathematical Foundations of Programming Semantics, 13th Annual Conference (MFPS XIII), Carnegie Mellon University, Pittsburgh, PA, USA, March 23–26, 1997. Electron. Notes Theor. Comput. Sci, vol. 6, pp. 23–26. Elsevier, Amsterdam (1997)Google Scholar
  13. 13.
    Escardó, M.H., Simpson, A.K.: A universal characterization of the closed Euclidean interval. In: Proceedings of the 16th Annual IEEE Symposium on Logic in Computer Science, pp. 115–128. IEEE Computer Society Press, Los Alamitos (2001)CrossRefGoogle Scholar
  14. 14.
    Ghani, N., Hancock, P., Pattinson, D.: Continuous functions on final coalgebras. In: Ghani and Power [15]Google Scholar
  15. 15.
    Ghani, N., Power, J. (eds.): CMCS 2006. Proceedings of 8th International Workshop on Coalgebraic Methods in Computer Science. Electron. Notes Theor. Comput. Sci, vol. 164(1). Elsevier, Amsterdam (2006)Google Scholar
  16. 16.
    Gibbons, J.: Metamorphisms: Streaming representation-changers. Sci. Comput. Program. (to appear)Google Scholar
  17. 17.
    Giménez, E.: Un Calcul de Constructions Infinies et son Application a la Verification des Systemes Communicants. PhD thesis PhD 96-11, Laboratoire de l’Informatique du Parallélisme, Ecole Normale Supérieure de Lyon (December 1996)Google Scholar
  18. 18.
    Gosper, R.W.: HAKMEM, Item 101 B. February 29, 1972. MIT AI Laboratory Memo No. 239, http://www.inwap.com/pdp10/hbaker/hakmem/cf.html#item101b [cited 31 January 2007]
  19. 19.
    Hou, T.: Coinductive proofs for basic real computation. In: Beckmann, et al. pp. 221–230 [2]Google Scholar
  20. 20.
    Jacobs, B., Rutten, J.: A tutorial on (co)algebras and (co)induction. Bull. Eur. Assoc. Theor. Comput. Sci. EATCS 62, 222–259 (1997)MATHGoogle Scholar
  21. 21.
    Niqui, M.: Formalising Exact Arithmetic: Representations, Algorithms and Proofs. PhD thesis, Radboud Universiteit Nijmegen (September 2004)Google Scholar
  22. 22.
    Niqui, M.: Coinductive field of exact real numbers and general corecursion. In: Ghani and Power, pp. 121–139 [15]Google Scholar
  23. 23.
    Niqui, M.: Files under Coq 8.1gamma (January 2007), http://www.cs.ru.nl/~milad/ETrees/coinductive-field/ [cited 31 January 2007]
  24. 24.
    Niqui, M.: Productivity of Edalat–Potts exact arithmetic in constructive type theory. Theory Comput. Syst. 30 pages (to appear)Google Scholar
  25. 25.
    Pavlović, D., Escardó, M.H.: Calculus in coinductive form. In: Proceedings of the 13th Annual IEEE Symposium on Logic in Computer Science, pp. 408–417 (1998)Google Scholar
  26. 26.
    Pavlović, D., Pratt, V.: On coalgebra of real numbers. In: Jacobs, B., Rutten, J. (eds.) CMCS 1999. Coalgebraic Methods in Computer Science. Electron. Notes Theor. Comput. Sci, vol. 19, pp. 103–117. Elsevier, Amsterdam (2000)Google Scholar
  27. 27.
    Potts, P.J.: Exact Real Arithmetic using Möbius Transformations. PhD thesis, University of London, Imperial College (July 1998)Google Scholar
  28. 28.
    Setzer, A.: Partial recursive functions in Martin-Löf type theory. In: Beckmann, et al. pp. 505–515 [2]Google Scholar
  29. 29.
    Vuillemin, J.E.: Exact real computer arithmetic with continued fractions. IEEE Trans. Comput. 39(8), 1087–1105 (1990)CrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Milad Niqui
    • 1
  1. 1.Institute for Computing and Information Sciences, Radboud University NijmegenThe Netherlands

Personalised recommendations