Hostname: page-component-8448b6f56d-jr42d Total loading time: 0 Render date: 2024-04-24T17:38:47.247Z Has data issue: false hasContentIssue false

Formalisation in higher-order logic and code generation to functional languages of the Gauss-Jordan algorithm

Published online by Cambridge University Press:  13 July 2015

JESÚS ARANSAY
Affiliation:
Departamento de Matemáticas y Computación, Universidad de La Rioja, c/ Luis de Ulloa s/n, La Rioja, 26004, Spain (e-mail: http://www.unirioja.es/cu/jearansa; http://www.unirioja.es/cu/jodivaso)
JOSE DIVASÓN
Affiliation:
Departamento de Matemáticas y Computación, Universidad de La Rioja, c/ Luis de Ulloa s/n, La Rioja, 26004, Spain (e-mail: http://www.unirioja.es/cu/jearansa; http://www.unirioja.es/cu/jodivaso)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

In this paper, we present a formalisation in a proof assistant, Isabelle/HOL, of a naive version of the Gauss-Jordan algorithm, with explicit proofs of some of its applications; and, additionally, a process to obtain versions of this algorithm in two different functional languages (SML and Haskell) by means of code generation techniques from the verified algorithm. The aim of this research is not to compete with specialised numerical implementations of Gauss-like algorithms, but to show that formal proofs in this area can be used to generate usable functional programs. The obtained programs show compelling performance in comparison to some other verified and functional versions, and accomplish some challenging tasks, such as the computation of determinants of matrices of big integers and the computation of the homology of matrices representing digital images.

Type
Articles
Copyright
Copyright © Cambridge University Press 2015 

References

Aransay, J. & Divasón, J. (2014a) Formalization and execution of Linear Algebra: From theorems to algorithms. In Post Proceedings of the International Symposium on Logic-Based Program Synthesis and Transformation: LOPSTR 2013, Gupta, G. & Peña, R. (eds), LNCS, vol. 8901. Madrid, Spain: Springer, pp. 01–19.Google Scholar
Aransay, J. & Divasón, J. (2014b) Gauss-Jordan algorithm and its applications. Arch. Formal Proofs. Available at: http://afp.sf.net/entries/Gauss_Jordan.shtml, Formal proof development.Google Scholar
Aransay, J. & Divasón, J. (2014c) Gauss-Jordan elimination in Isabelle/HOL. Available at: http://www.unirioja.es/cu/jodivaso/Isabelle/Gauss-Jordan-2013-2-Generalized/Google Scholar
Aransay, J. & Divasón, J. (2015) Generalizing a Mathematical Analysis Library in Isabelle/HOL. NASA Formal Methods, Havelund, K., Holzmann, G. & Joshi, R. (eds), LNCS, vol. 9058. Pasadena, CA, USA: Springer, pp. 415–421.CrossRefGoogle Scholar
Avigad, J., & Harrison, J. (2014) Formally verified mathematics. Commun. ACM 57 (4), 6675.CrossRefGoogle Scholar
Avigad, J., Hölzl, J. & Serafin, L. (2014) A Formally Verified Proof of the Central Limit Theorem. Available at: http://arxiv.org/abs/1405.7012v1.Google Scholar
Bulwahn, L., Krauss, A., Haftmann, F., Erkök, L. & Matthews, J. (2008) Imperative functional programming with Isabelle/HOL. In TPHOLs '08: Proceedings of the 21st International Conference on Theorem Proving in Higher Order Logics, Mohamed, O., Muñoz, C. & Tahar, S. (eds), LNCS, vol. 5170. Montreal, Canada: Springer, pp. 352–367.CrossRefGoogle Scholar
Dénès, M. (2013) Étude Formelle d'algorithmes Efficaces En Algèbre Linéaire. PhD Thesis, INRIA Sophia Antipolis, France.Google Scholar
Dénès, M., Mörtberg, A. & Siles, V. (2012) A refinement-based approach to computational algebra in COQ. In ITP - 3rd International Conference on Interactive Theorem Proving - 2012, Beringer, L. & Felty, A. (eds), LNCS, vol. 7406. Princeton, NJ, USA: Springer, pp. 83–98.CrossRefGoogle Scholar
Dénès, M., Mörtberg, A. & Siles, V. (2013) Refinements for free!. Certified Programs and Proofs, Gonthier, G. & Norrish, M. (eds), LNCS, vol. 8307. Melbourne, VIC, Australia: Springer, pp. 147162.Google Scholar
Durán, A. J., Pérez, M. & Varona, J. L. (2014) Misfortunes of a mathematicians' trio using computer algebra systems: Can we trust? Notices AMS 61 (10), 12491252.Google Scholar
Esparza, J., Lammich, P., Neumann, R., Nipkow, T., Schimpf, A. & Smaus, J. G. (2013) A fully verified executable LTL model checker, Computer Aided Verification: CAV 2013, Sharygina, N. & Veith, H. (eds), LNCS, vol. 8044. Saint Petersburg, Russia: Springer, pp. 463–478.Google Scholar
Gockenbach, M. S. (2010) Finite-Dimensional Linear Algebra. CRC Press.CrossRefGoogle Scholar
Haftmann, F. (2013) Code generation from Isabelle/HOL theories. Available at: http://isabelle.in.tum.de/dist/Isabelle2013-2/doc/codegen.pdf.Google Scholar
Haftmann, F., Krauss, A., Kuncar, O. & Nipkow, T. (2013) Data refinement in Isabelle/HOL. In Interactive Theorem Proving: ITP 2013, Blazy, S., Paulin-Mohring, C., & Pichardie, D. (eds), LNCS, vol. 7998. Rennes, France: Springer, pp. 100–115.CrossRefGoogle Scholar
Haftmann, F. & Nipkow, T. (2010) Code generation via higher-order rewrite systems. In Functional and Logic Programming: 10th International Symposium: FLOPS 2010, Blume, M., Kobayashi, N. & Vidal, G. (eds), LNCS, vol. 6009. Sendai, Japan: Springer, pp. 103–117.CrossRefGoogle Scholar
Hales, T. C. & Ferguson, S. P. (2011) The Kepler Conjecture. The Hales-Ferguson Proof. New York: Springer.Google Scholar
Harrison, J. (2005) A HOL theory of Euclidean space. In Theorem Proving in Higher Order Logics, Hurd, J. & Melham, T. (eds), LNCS, vol. 3603. Oxford, UK: Springer, pp. 114–129.CrossRefGoogle Scholar
Harrison, J. (2013) The HOL Light theory of Euclidean space. J. Autom. Reason. 50 (2), 173190.CrossRefGoogle Scholar
Haskell. (2014) The Haskell Programming Language. Available at: http://www.haskell.org/.Google Scholar
Heras, J., Dénès, M., Mata, G., Mörtberg, A., Poza, M. & Siles, V. (2012) Towards a certified computation of homology groups for digital images. In Computational Topology in Image Context: CTIC 2012, Ferri, M., Frosini, P., Landi, C., Cerri, A. & Fabio, B. D. (eds), LNCS, vol. 7309. Bertinoro, Italy: Springer, pp. 49–57.CrossRefGoogle Scholar
HMA. (2014) HOL Multivariate Analysis Library. Available at: http://isabelle.in.tum.de/library/HOL/HOL-Multivariate_Analysis/index.html.Google Scholar
Milner, R., Harper, R., MacQueen, D. & Tofte, M. (1997) The Definition of Standard ML, revised edition. MIT Press.CrossRefGoogle Scholar
MLton. (2014) The MLton website. Available at: http://mlton.org/.Google Scholar
Nipkow, T. (2011) Gauss-Jordan elimination for matrices represented as functions. Arch. Formal Proofs. Available at: http://afp.sf.net/entries/Gauss-Jordan-Elim-Fun.shtml, Formal proof development.Google Scholar
Nipkow, T., Paulson, L. C. & Wenzel, M. (2002) Isabelle/HOL: A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer.CrossRefGoogle Scholar
Paulson, L. C. (1990) Logic and Computer Science. Academic Press. Chap. Isabelle: The next 700 theorem provers, pp. 361388.Google Scholar
Poly, M. L. (2014) The Poly/ML website. Available at: http://www.polyml.org/.Google Scholar
Roman, S. (2008) Advanced Linear Algebra. 3rd edn.Springer.CrossRefGoogle Scholar
Sternagel, C. (2013) Proof pearl - a mechanized proof of GHC's mergesort. J. Autom. Reasoning 51 (4), 357370.CrossRefGoogle Scholar
Strang, G. (2009) Introduction to Linear Algebra. 4th edn.Wellesley-Cambridge Press.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.