Skip to main content
QUICK REVIEW

[Paper Review] Connecting Gröbner Bases Programs with Coq to do Proofs in Algebra, Geometry and Arithmetics

Loïc Pottier|arXiv (Cornell University)|Jul 21, 2010
Polynomial and algebraic computationComputer Science6 references3 citations
TL;DR

This paper presents a Coq tactic, gb, that integrates external Gröbner basis tools (F4, GB, gbcoq) to automate proofs in algebra, geometry, and arithmetic. By leveraging Hilbert's Nullstellensatz and certificate-based proof generation, it enables efficient, formally verified reasoning over polynomial equalities and inequalities, significantly outperforming hol-light in key benchmarks while ensuring correctness through certified computation.

ABSTRACT

We describe how we connected three programs that compute Groebner bases to Coq, to do automated proofs on algebraic, geometrical and arithmetical expressions. The result is a set of Coq tactics and a certificate mechanism (downloadable at http://www-sop.inria.fr/marelle/Loic.Pottier/gb-keappa.tgz). The programs are: F4, GB \, and gbcoq. F4 and GB are the fastest (up to our knowledge) available programs that compute Groebner bases. Gbcoq is slow in general but is proved to be correct (in Coq), and we adapted it to our specific problem to be efficient. The automated proofs concern equalities and non-equalities on polynomials with coefficients and indeterminates in R or Z, and are done by reducing to Groebner computation, via Hilbert's Nullstellensatz. We adapted also the results of Harrison, to allow to prove some theorems about modular arithmetics. The connection between Coq and the programs that compute Groebner bases is done using the "external" tactic of Coq that allows to call arbitrary programs accepting xml inputs and outputs. We also produce certificates in order to make the proof scripts independant from the external programs.

Motivation & Objective

  • To enable automated, formally verified proofs of polynomial equalities and inequalities in Coq using high-performance Gröbner basis computations.
  • To overcome the performance limitations of native Coq-based Gröbner basis tools (like gbcoq) by interfacing with faster external programs (F4, GB).
  • To develop a certificate mechanism that decouples proof scripts from external computations, ensuring trust and reusability.
  • To extend Coq's reasoning capabilities to include modular arithmetic and number-theoretic statements via ideal membership and Gröbner basis techniques.
  • To demonstrate the practical efficiency and correctness of the approach through benchmarks in algebra, geometry, and arithmetic.

Proposed method

  • Uses Coq's external tactic to invoke XML-accepting programs (F4, GB, gbcoq) for Gröbner basis computation.
  • Applies Hilbert's Nullstellensatz to reduce polynomial equality and inequality proofs to ideal membership problems.
  • Employs two key methods: (1) computing a Gröbner basis of the ideal generated by $ tP_i - e_i, e_ie_j, e_it $ to prove $ \sum Q_iP_i = 1 $, and (2) using a new variable $ z $ to prove $ P^r = \sum Q_iP_i $ via $ 1 = \sum h_iP_i + h(1 - zP) $.
  • Adapts the gbcoq program to be efficient for the specific proof tasks, ensuring correctness within Coq.
  • Generates proof certificates in XML format that are embedded in Coq scripts to allow independent proof re-verification.
  • Supports both real and integer domains via specialized tactics: gbR for real polynomials and gbZ for integer arithmetic.

Experimental results

Research questions

  • RQ1Can high-performance Gröbner basis tools be effectively and safely integrated into Coq for automated proof generation?
  • RQ2How can the correctness of computationally intensive Gröbner basis computations be preserved within a proof assistant like Coq?
  • RQ3Can certificate-based proof generation reduce dependency on external programs during proof replay and verification?
  • RQ4To what extent can the integration of external tools improve performance in algebraic and arithmetic reasoning compared to native Coq-based solvers?
  • RQ5How do the performance characteristics of F4, GB, and gbcoq compare in practice when solving real-world mathematical problems in Coq?

Key findings

  • The gb tactic, powered by F4 and GB, proves complex algebraic identities (e.g., symmetric polynomial identities in degrees 3, 4, and 5) in under 1 second, outperforming hol-light in the same task.
  • For Pappus' theorem in geometry, F4 failed, GB took 9 seconds, gbcoq took 3 seconds, while hol-light required 77 seconds, demonstrating the efficiency of the certified approach.
  • The use of certificates allows proof scripts to be independent of external programs, enabling fast and reliable proof re-verification.
  • The gbZ tactic successfully proves number-theoretic statements involving divisibility, GCD, and coprimality using ideal membership and Gröbner basis computation.
  • The integration of external tools via Coq's external tactic enables scalable, correct, and efficient proofs in algebra, geometry, and arithmetic, with performance competitive with or superior to existing systems like hol-light.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.