### Abstract

This paper presents a formally verified quantifier elimination (QE) algorithm for first-order real arithmetic by linear and quadratic virtual substitution (VS) in Isabelle/HOL. The Tarski-Seidenberg theorem established that the first-order logic of real arithmetic is decidable by QE. However, in practice, QE algorithms are highly complicated and often combine multiple methods for performance. VS is a practically successful method for QE that targets formulas with low-degree polynomials. To our knowledge, this is the first work to formalize VS for quadratic real arithmetic including inequalities. The proofs necessitate various contributions to the existing multivariate polynomial libraries in Isabelle/HOL. Our framework is modularized and easily expandable (to facilitate integrating future optimizations), and could serve as a basis for developing practical general-purpose QE algorithms. Further, as our formalization is designed with practicality in mind, we export our development to SML and test the resulting code on 378 benchmarks from the literature, comparing to Redlog, Z3, Wolfram Engine, and SMT-RAT. This identified inconsistencies in some tools, underscoring the significance of a verified approach for the intricacies of real arithmetic.

### License

BSD License

### Topics

- Computer science/Algorithms/Mathematical

### Session Virtual_Substitution

- QE
- MPolyExtension
- ExecutiblePolyProps
- PolyAtoms
- Debruijn
- Reindex
- Optimizations
- OptimizationProofs
- VSAlgos
- Heuristic
- PrettyPrinting
- Exports
- LinearCase
- QuadraticCase
- EliminateVariable
- LuckyFind
- EqualityVS
- UniAtoms
- NegInfinity
- NegInfinityUni
- Infinitesimals
- InfinitesimalsUni
- DNFUni
- GeneralVSProofs
- DNF
- VSQuad
- HeuristicProofs
- ExportProofs

### Depends on

- Executable Multivariate Polynomials

### Used by

- A First Complete Algorithm for Real Quantifier Elimination in Isabelle/HOL

## Cite

×

Virtual_Substitution-AFP

    @article{Virtual_Substitution-AFP,
      author  = {Matias Scharager and Katherine Kosaian and Stefan Mitsch and André Platzer},
      title   = {Verified Quadratic Virtual Substitution for Real Arithmetic},
      journal = {Archive of Formal Proofs},
      month   = {October},
      year    = {2021},
      note    = {\url{https://isa-afp.org/entries/Virtual_Substitution.html},
                 Formal proof development},
      ISSN    = {2150-914x},
    }

Download

## Download

× Download latest

Older releases:

- Sep 13, 2023 : Isabelle2023
- Oct 27, 2022 : Isabelle2022
- Dec 14, 2021 : Isabelle2021-1
- Oct 19, 2021 : Isabelle2021