Journal of Automated Reasoning

, Volume 58, Issue 4, pp 509–535

A Formalisation in HOL of the Fundamental Theorem of Linear Algebra and Its Application to the Solution of the Least Squares Problem


DOI: 10.1007/s10817-016-9379-z

Cite this article as:
Aransay, J. & Divasón, J. J Autom Reasoning (2017) 58: 509. doi:10.1007/s10817-016-9379-z


In this paper we show how a thoughtful reusing of libraries can provide concise proofs of non-trivial mathematical results. Concretely, we formalise in Isabelle/HOL a proof of the Fundamental Theorem of Linear Algebra for vector spaces over inner product spaces, the Gram–Schmidt process of orthogonalising vectors over \(\mathbb {R}\), its application to get the \({ QR}\) decomposition of a matrix, and the least squares approximation of systems of linear equations without solution, in a modest number of lines (ca. 2700). This work intensively reuses previous results, such as the Rank–Nullity theorem and various applications of the Gauss–Jordan algorithm. The formalisation is also accompanied by code generation and refinements that enable the execution of the presented algorithms in Isabelle and SML.


Least squares problem \({ QR}\) decomposition Interactive theorem proving Linear algebra Code generation Symbolic computation 

Copyright information

© Springer Science+Business Media Dordrecht 2016

Authors and Affiliations

  1. 1.Departamento de Matemáticas y ComputaciónUniversidad de La RiojaLogroñoSpain