Formalisation and execution of Linear Algebra: theorems and algorithms

This thesis studies the formalisation and execution of Linear Algebra algorithms in Isabelle/HOL, an interactive theorem prover. The work is based on the HOL Multivariate Analysis library, whose matrix representation has been refined to datatypes that admit a representation in functional programming languages. This enables the generation of programs from such verified algorithms. In particular, several well-known Linear Algebra algorithms have been formalised involving both the computation of matrix canonical forms and decompositions (such as the Gauss-Jordan algorithm, echelon form, Hermite normal form, and QR decomposition). The formalisation of these algorithms is also accompanied by the formal proofs of their particular applications such as calculation of the rank of a matrix, solution of systems of linear equations, orthogonal matrices, least squares approximations of systems of linear equations, and computation of determinants of matrices over Bezout domains. Some benchmarks of the generated programs are presented as well where matrices of remarkable dimensions are involved, illustrating the fact that they are usable in real-world cases. The formalisation has also given place to side-products that constitute themselves standalone reusable developments: serialisations to SML and Haskell, an implementation of algebraic structures in Isabelle/HOL, and generalisations of well-established Isabelle/HOL libraries. In addition, an experiment involving Isabelle, its logics, and the formalisation of some underlying mathematical concepts presented in Voevodsky's simplicial model for Homotopy Type Theory is presented.

[1]  R. H.,et al.  The Principles of Mathematics , 1903, Nature.

[2]  G. B. M. Principia Mathematica , 1911, Nature.

[3]  M. Lecat Erreurs de mathématiciens des origines à nos jours , 1935 .

[4]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[5]  D. G. Zill A First Course in Differential Equations: With Modeling Applications , 1951 .

[6]  J. G. F. Francis,et al.  The QR Transformation A Unitary Analogue to the LR Transformation - Part 1 , 1961, Comput. J..

[7]  Kurt Gödel,et al.  On Formally Undecidable Propositions of Principia Mathematica and Related Systems , 1966 .

[8]  Frank Harary,et al.  Graph Theory , 2016 .

[9]  V. Strassen Gaussian elimination is not optimal , 1969 .

[10]  Dennis Child,et al.  The essentials of factor analysis , 1970 .

[11]  G. H. Bradley Algorithms for Hermite and Smith normal matrices and linear Diophantine equations , 1971 .

[12]  G. Nemhauser,et al.  Integer Programming , 2020 .

[13]  Ravi Kannan,et al.  Polynomial Algorithms for Computing the Smith and Hermite Normal Forms of an Integer Matrix , 1979, SIAM J. Comput..

[14]  Allan Borodin,et al.  Fast parallel matrix and GCD computations , 1982, 23rd Annual Symposium on Foundations of Computer Science (sfcs 1982).

[15]  H. Cantor Ueber eine Eigenschaft des Inbegriffs aller reellen algebraischen Zahlen. , 1984 .

[16]  K. McCurley,et al.  A rigorous subexponential algorithm for computation of class groups , 1989 .

[17]  M. Hung,et al.  An application of the Hermite normal form in integer programming , 1990 .

[18]  Lawrence C. Paulson,et al.  ML for the working programmer , 1991 .

[19]  John W. Auer,et al.  Linear algebra with applications , 1996 .

[20]  Lawrence C. Paulson,et al.  Isabelle: The Next 700 Theorem Provers , 2000, ArXiv.

[21]  Jon P. May Simplicial objects in algebraic topology , 1993 .

[22]  G. Strang The Fundamental Theorem of Linear Algebra , 1993 .

[23]  Nancy G. Leveson,et al.  An investigation of the Therac-25 accidents , 1993, Computer.

[24]  Henri Cohen,et al.  A course in computational algebraic number theory , 1993, Graduate texts in mathematics.

[25]  S. Axler Linear Algebra Done Right , 1995, Undergraduate Texts in Mathematics.

[26]  G. Mackiw A Note on the Equality of the Column and Row Rank of a Matrix , 1995 .

[27]  J. Navarro-Pedreño Numerical Methods for Least Squares Problems , 1996 .

[28]  Lawrence C. Paulson,et al.  ML for the working programmer (2. ed.) , 1996 .

[29]  Michael J. C. Gordon,et al.  Set Theory, Higher Order Logic or Both? , 1996, TPHOLs.

[30]  David B. MacQueen,et al.  The Definition of Standard ML (Revised) , 1997 .

[31]  T. Hales The Kepler conjecture , 1998, math/9811078.

[32]  P. Cameron Naïve set theory , 1998 .

[33]  G. E. Reeves,et al.  What Really Happened on Mars , 1998 .

[34]  Markus Wenzel,et al.  Isar - A Generic Interpretative Approach to Readable Formal Proof Documents , 1999, TPHOLs.

[35]  L. Fuchs,et al.  Modules over non-Noetherian domains , 2000 .

[36]  A. Storjohann Algorithms for matrix canonical forms , 2000 .

[37]  S. Chapman,et al.  Non-Noetherian commutative ring theory , 2000 .

[38]  Bolian Liu,et al.  Matrices in Combinatorics and Graph Theory , 2000, Network Theory and Applications.

[39]  Victor Y. Pan,et al.  Computation of Approximate Polynomial GCDs and an Extension , 2001, Inf. Comput..

[40]  Lawrence Charles Paulson,et al.  Isabelle/HOL: A Proof Assistant for Higher-Order Logic , 2002 .

[41]  Markus Wenzel,et al.  Isabelle, Isar - a versatile environment for human readable formal proof documents , 2002 .

[42]  R. Y. Sharp,et al.  MODULES OVER NON-NOETHERIAN DOMAINS (Mathematical Surveys and Monographs 84) By LÁSZLÓ FUCHS and LUIGI SALCE: 613 pp., US$109.00, ISBN 0-8218-1963-1 (American Mathematical Society, Providence, RI, 2001) , 2002 .

[43]  Greg O'Keefe Towards a Readable Formalisation of Category Theory , 2004, Electron. Notes Theor. Comput. Sci..

[44]  Lawrence C. Paulson,et al.  Set theory for verification: I. From foundations to functions , 1993, Journal of Automated Reasoning.

[45]  L. Beineke,et al.  Topics in algebraic graph theory , 2004 .

[46]  D. A. Edwards The mathematical foundations of quantum mechanics , 1979, Synthese.

[47]  Lawrence C. Paulson,et al.  Set theory for verification. II: Induction and recursion , 1995, Journal of Automated Reasoning.

[48]  John Harrison,et al.  A HOL Theory of Euclidean Space , 2005, TPHOLs.

[49]  Greg O'Keefe Category Theory to Yoneda's Lemma , 2005, Arch. Formal Proofs.

[50]  J. Ramanujam,et al.  Beyond unimodular transformations , 1995, The Journal of Supercomputing.

[51]  Pavel Pudil,et al.  Introduction to Statistical Pattern Recognition , 2006 .

[52]  Steven Obua Partizan Games in Isabelle/HOLZF , 2006, ICTAC.

[53]  Fred J. Vermolen,et al.  Numerical Methods in Scientific Computing , 2006 .

[54]  M. Anthony,et al.  Advanced linear algebra , 2006 .

[55]  L. Hogben Handbook of Linear Algebra , 2006 .

[56]  Nathaniel E. Helwig,et al.  An Introduction to Linear Algebra , 2006 .

[57]  Amy Nicole Langville,et al.  Google's PageRank and beyond - the science of search engine rankings , 2006 .

[58]  Georges Gonthier,et al.  Formal Proof—The Four- Color Theorem , 2008 .

[59]  Christel Baier,et al.  Principles of model checking , 2008 .

[60]  John Matthews,et al.  Imperative Functional Programming with Isabelle/HOL , 2008, TPHOLs.

[61]  Michael Meyling,et al.  Axiomatic Set Theory , 2008 .

[62]  Michael Norrish,et al.  seL4: formal verification of an OS kernel , 2009, SOSP '09.

[63]  René Thiemann,et al.  Certification of Termination Proofs Using CeTA , 2009, TPHOLs.

[64]  Assia Mahboubi,et al.  An introduction to small scale reflection in Coq , 2010, J. Formaliz. Reason..

[65]  Tobias Nipkow,et al.  Code Generation via Higher-Order Rewrite Systems , 2010, FLOPS.

[66]  René Thiemann,et al.  Abstract Rewriting , 2010, Arch. Formal Proofs.

[67]  René Thiemann,et al.  Executable Matrix Operations on Matrices of Arbitrary Dimensions , 2010, Arch. Formal Proofs.

[68]  M. Gockenbach Finite-Dimensional Linear Algebra , 2010 .

[69]  Georges Gonthier Point-Free, Set-Free Concrete Linear Algebra , 2011, ITP.

[70]  Tobias Nipkow,et al.  Gauss-Jordan Elimination for Matrices Represented as Functions , 2011, Arch. Formal Proofs.

[71]  Samuel P. Ferguson,et al.  The Kepler conjecture : the Hales-Ferguson proof by Thomas Hales, Samuel Ferguson , 2011 .

[72]  Álgebra Aritmética Gauss–Jordan Elimination , 2011 .

[73]  Jónathan Heras,et al.  Towards a Certified Computation of Homology Groups for Digital Images , 2012, CTIC.

[74]  Christian Sternagel Proof Pearl—A Mechanized Proof of GHC’s Mergesort , 2012, Journal of Automated Reasoning.

[75]  John Harrison,et al.  The HOL Light Theory of Euclidean Space , 2012, Journal of Automated Reasoning.

[76]  Jesús María Aransay Azofra,et al.  Formalizing an abstract algebra textbook in Isabelle/HOL , 2012 .

[77]  Chris Kapulkin,et al.  Univalence in Simplicial Sets , 2012, 1203.2553.

[78]  Vincent Siles,et al.  A Refinement-Based Approach to Computational Algebra in Coq , 2012, ITP.

[79]  Thierry Coquand,et al.  A formal proof of Sasaki-Murao algorithm , 2012, J. Formaliz. Reason..

[80]  Andreas Lochbihler,et al.  Light-Weight Containers for Isabelle: Efficient, Extensible, Nestable , 2013, ITP.

[81]  Maxime Dénès,et al.  Étude formelle d'algorithmes efficaces en algèbre linéaire. (Formal study of efficient algorithms in linear algebra) , 2013 .

[82]  Tobias Nipkow,et al.  Data Refinement in Isabelle/HOL , 2013, ITP.

[83]  Clemens Ballarin Locales: A Module System for Mathematical Theories , 2013, Journal of Automated Reasoning.

[84]  Brian Huffman,et al.  Lifting and Transfer: A Modular Design for Quotients in Isabelle/HOL , 2013, CPP.

[85]  Thierry Coquand,et al.  A Model of Type Theory in Cubical Sets , 2013, TYPES.

[86]  Jeremy Avigad,et al.  A Machine-Checked Proof of the Odd Order Theorem , 2013, ITP.

[87]  Jose Divasón,et al.  Formalization and Execution of Linear Algebra: From Theorems to Algorithms , 2013, LOPSTR.

[88]  Jose Divasón,et al.  Rank-Nullity Theorem in Linear Algebra , 2013, Arch. Formal Proofs.

[89]  Johannes Hölzl,et al.  Type Classes and Filters for Mathematical Analysis in Isabelle/HOL , 2013, ITP.

[90]  Antonio J. Durán Guardeño,et al.  Misfortunes of a mathematicians' trio using Computer Algebra Systems: Can we trust? , 2013, ArXiv.

[91]  Vasilios Evangelos Tourloupis Hermite normal forms and its cryptographic applications , 2013 .

[92]  Cyril Cohen,et al.  Refinements for Free! , 2013, CPP.

[93]  Tobias Nipkow,et al.  A Fully Verified Executable LTL Model Checker , 2013, CAV.

[94]  Jose Divasón,et al.  Obtaining an ACL2 Specification from an Isabelle/HOL Theory , 2014, AISC.

[95]  Jose Divasón,et al.  Gauss-Jordan Algorithm and Its Applications , 2014, Arch. Formal Proofs.

[96]  Ondrej Kuncar,et al.  From Types to Sets in Isabelle / HOL Extented Abstract , 2014 .

[97]  Jeremy Avigad,et al.  Formally verified mathematics , 2014, Commun. ACM.

[98]  René Thiemann,et al.  Matrices, Jordan Normal Forms, and Spectral Radius Theory , 2015, Arch. Formal Proofs.

[99]  Lawrence C. Paulson A Mechanised Proof of Gödel’s Incompleteness Theorems Using Nominal Isabelle , 2015, Journal of Automated Reasoning.

[100]  Jose Divasón,et al.  QR Decomposition , 2015, Arch. Formal Proofs.

[101]  Manuel Eberl,et al.  A Decision Procedure for Univariate Real Polynomials in Isabelle/HOL , 2015, CPP.

[102]  Echelon Form , 2015, Arch. Formal Proofs.

[103]  René Thiemann Implementing field extensions of the form Q [ √ b ] ∗ , 2015 .

[104]  Tobias Nipkow,et al.  Mining the Archive of Formal Proofs , 2015, CICM.

[105]  Jose Divasón,et al.  Hermite Normal Form , 2015, Arch. Formal Proofs.

[106]  Jose Divasón,et al.  Formalisation in higher-order logic and code generation to functional languages of the Gauss-Jordan algorithm , 2015, J. Funct. Program..

[107]  Jose Divasón,et al.  Generalizing a Mathematical Analysis Library in Isabelle/HOL , 2015, NFM.

[108]  René Thiemann,et al.  Algebraic Numbers in Isabelle/HOL , 2016, ITP.

[109]  Lawrence C. Paulson,et al.  A modular, efficient formalisation of real algebraic numbers , 2016, CPP.

[110]  Vincent Siles,et al.  Formalized linear algebra over Elementary Divisor Rings in Coq , 2016, Log. Methods Comput. Sci..

[111]  José Divasón Mallagaray,et al.  Verified Computer Linear Algebra , 2016 .

[112]  Cayley-Hamilton Theorem , 2016 .

[113]  Jose Divasón,et al.  Formalisation of the computation of the echelon form of a matrix in Isabelle/HOL , 2016, Formal Aspects of Computing.

[114]  Johannes Hölzl,et al.  A Formally Verified Proof of the Central Limit Theorem , 2014, Journal of Automated Reasoning.

[115]  Tobias Nipkow,et al.  A FORMAL PROOF OF THE KEPLER CONJECTURE , 2015, Forum of Mathematics, Pi.

[116]  Dominic R. Verity,et al.  ∞-Categories for the Working Mathematician , 2018 .