A Verified Decision Procedure for Univariate Real Arithmetic with the BKR Algorithm

We formalize the univariate fragment of Ben-Or, Kozen, and Reif’s (BKR) decision procedure for first-order real arithmetic in Isabelle/HOL. BKR’s algorithm has good potential for parallelism and was designed to be used in practice. Its key insight is a clever recursive procedure that computes the set of all consistent sign assignments for an input set of univariate polynomials while carefully managing intermediate steps to avoid exponential blowup from naively enumerating all possible sign assignments (this insight is fundamental for both the univariate case and the general case). Our proof combines ideas from BKR and a follow-up work by Renegar that are well-suited for formalization. The resulting proof outline allows us to build substantially on Isabelle/HOL’s libraries for algebra, analysis, and matrices. Our main extensions to existing libraries are also detailed.

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

[2]  Assia Mahboubi,et al.  Formal proofs in real algebraic geometry: from ordered fields to quantifier elimination , 2012, Log. Methods Comput. Sci..

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

[4]  Scott McCallum Solving Polynomial Strict Inequalities Using Cylindrical Algebraic Decomposition , 1993, Comput. J..

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

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

[7]  André Platzer,et al.  Logical Foundations of Cyber-Physical Systems , 2018, Springer International Publishing.

[8]  Lawrence C. Paulson,et al.  Counting polynomial roots in Isabelle/HOL: a formal proof of the Budan-Fourier theorem , 2018, CPP.

[9]  Cyril Cohen,et al.  Formalized algebraic numbers: construction and first-order theory. (Formalisation des nombres algébriques : construction et théorie du premier ordre) , 2012 .

[10]  Lawrence C. Paulson Three Years of Experience with Sledgehammer, a Practical Link between Automatic and Interactive Theorem Provers , 2012 .

[11]  John F. Canny Improved Algorithms for Sign Determination and Existential Quantifier Elimination , 1993, Comput. J..

[12]  Joachim von zur Gathen Parallel algorithms for algebraic problems , 1983, STOC '83.

[13]  George E. Collins,et al.  Quantifier elimination for real closed fields by cylindrical algebraic decomposition , 1975 .

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

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

[16]  André Platzer,et al.  Real World Verification , 2009, CADE.

[17]  D. S. Arnon,et al.  Algorithms in real algebraic geometry , 1988 .

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

[19]  John Harrison,et al.  Floating-Point Verification Using Theorem Proving , 2006, SFM.

[20]  A. Tarski A Decision Method for Elementary Algebra and Geometry , 2023 .

[21]  César A. Muñoz,et al.  A Decision Procedure for Univariate Polynomial Systems Based on Root Counting and Interval Subdivision , 2018, J. Formaliz. Reason..

[22]  René Thiemann,et al.  Formalizing Jordan normal forms in Isabelle/HOL , 2016, CPP.

[23]  Thomas C. Hales,et al.  Formal computations and methods , 2012 .

[24]  Jose Divasón,et al.  A formalization of the Berlekamp-Zassenhaus factorization algorithm , 2017, CPP.

[25]  Tobias Nipkow Linear Quantifier Elimination , 2008, IJCAR.

[26]  Lawrence C. Paulson,et al.  The foundation of a generic theorem prover , 1989, Journal of Automated Reasoning.

[27]  Lawrence C. Paulson,et al.  Deciding Univariate Polynomial Problems Using Untrusted Certificates in Isabelle/HOL , 2017, Journal of Automated Reasoning.

[28]  Jasmin Christian Blanchette,et al.  Three years of experience with Sledgehammer, a Practical Link Between Automatic and Interactive Theorem Provers , 2012, IWIL@LPAR.

[29]  James Renegar,et al.  On the Computational Complexity and Geometry of the First-Order Theory of the Reals, Part III: Quantifier Elimination , 1992, J. Symb. Comput..

[30]  John Harrison,et al.  Verifying Nonlinear Real Formulas Via Sums of Squares , 2007, TPHOLs.

[31]  Lionel Ducos Optimizations of the subresultant algorithm , 2000 .

[32]  Thomas Sturm,et al.  A Survey of Some Methods for Real Quantifier Elimination, Decision, and Satisfiability and Their Applications , 2017, Math. Comput. Sci..

[33]  André Platzer,et al.  The BKR Decision Procedure for Univariate Real Arithmetic , 2021, Arch. Formal Proofs.

[34]  Assia Mahboubi,et al.  Formal proofs in real algebraic geometry: from ordered fields to quantifier elimination , 2012 .

[35]  César A. Muñoz,et al.  Formally-Verified Decision Procedures for Univariate Polynomial Computation Based on Sturm’s and Tarski’s Theorems , 2015, Journal of Automated Reasoning.

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

[37]  John Harrison,et al.  A Proof-Producing Decision Procedure for Real Arithmetic , 2005, CADE.

[38]  John H. Reif,et al.  The complexity of elementary algebra and geometry , 1984, STOC '84.

[39]  Wenda Li The Sturm-Tarski Theorem , 2014, Arch. Formal Proofs.