TL;DR

A blog post demonstrates using quantifier elimination — via the Tarski–Seidenberg theorem and QEPCAD through SageMath — to automate many polynomial (in)equation problems that appear in competition math. The author walks through examples, including rewriting nonpolynomial inequalities into polynomial form, checking truth of claims, and extracting equality or geometric solution sets.

What happened

The author responded to recurring contest-style questions on Math StackExchange by showing how quantifier elimination can offload routine algebraic verification to a computer. They invoke the Tarski–Seidenberg theorem to justify that formulas built from polynomial equalities and inequalities, Boolean connectives, and quantifiers can be transformed into quantifier-free equivalents. Practically, the post uses SageMath's interface to QEPCAD: after installing QEPCAD (sage -i qepcad), the author runs small queries that produce human-readable conditions. Examples include the standard quadratic discriminant equivalence (∃x. ax^2 + bx + c = 0 ⇔ b^2 − 4ac ≥ 0), a more involved quantified implication that QEPCAD reduces to b ≥ 0 ∨ c + a b < 0, and two contest inequalities. For one contest problem with a^4 + b^4 = 17 and a,b ≥ 0 the author rewrites the target as (15(a+b)−17)^2 ≥ 14^2⋅2ab and uses qepcad to confirm the implication is TRUE and to find equality points (a,b) = (2,1) and (1,2). For a second product inequality in positive x,y,z they clear denominators by multiplying by xyz, verify it with qepcad, and request a geometric description of the equality locus. The post closes by suggesting the method for coordinate rephrasings of geometry theorems and noting a few practical quirks of the interface.

Why it matters

  • Quantifier elimination turns certain quantified polynomial statements into quantifier-free conditions one can check mechanically.
  • SageMath’s QEPCAD interface lets users both verify inequalities and extract solution data (specific points or geometric descriptions).
  • This streamlines routine algebraic verification, freeing time for conceptual work or for tackling genuinely hard steps.
  • The approach can be applied beyond contest problems, for example to coordinate formulations of geometry theorems, or automated safety proofs in applied settings (as noted by the author).

Key facts

  • Tarski–Seidenberg theorem: formulas built from polynomial equalities/inequalities plus Boolean connectives and quantifiers admit equivalent quantifier-free formulas.
  • SageMath can call QEPCAD; the author recommends installing it with sage -i qepcad if needed.
  • Simple example: ∃x. a x^2 + b x + c = 0 is reduced to b^2 − 4 a c ≥ 0 by quantifier elimination.
  • A more complex quantified formula returned b >= 0 / c + a b < 0 when processed by QEPCAD via Sage.
  • A contest inequality with constraints a, b ≥ 0 and a^4 + b^4 = 17 was verified by rewriting the target as (15(a+b)−17)^2 ≥ 14^2 * 2 * a * b and checking implication with qepcad (result: TRUE).
  • QEPCAD was used to list all equality points for that example; it returned {'a': 2, 'b': 1} and {'a': 1, 'b': 2}.
  • For a product inequality involving (x + 1/x)(y + 1/y)(z + 1/z), the author multiplied both sides by xyz to obtain a polynomial inequality and verified it with qepcad (result: TRUE).
  • QEPCAD can produce different solution formats; the author used solution='all-points' to list discrete solutions and solution='geometric' to get a geometric description of a locus.
  • The author notes a parsing quirk: in one case typing the formula directly did not work and using constructor functions was required.

What to watch next

  • Ensure QEPCAD is installed and accessible to Sage (the post recommends running sage -i qepcad).
  • Expressions must be converted to polynomial form before quantifier elimination (for example, clear denominators by multiplying both sides by xyz).
  • Sometimes direct string parsing of formulas fails; using the API constructors in Sage can avoid parsing issues.

Quick glossary

  • Quantifier elimination: A procedure that transforms a formula with existential or universal quantifiers into an equivalent formula without quantifiers, when such elimination is possible.
  • Tarski–Seidenberg theorem: A result in real algebraic geometry stating that the projection of a semialgebraic set is semialgebraic, which underlies quantifier elimination for real polynomial formulas.
  • QEPCAD: A software tool for quantifier elimination over the real numbers; it can decide quantified polynomial formulas and return equivalent quantifier-free descriptions.
  • SageMath: An open-source mathematics software system that can interface with many other tools, including QEPCAD, to run algebraic and symbolic computations.

Reader FAQ

How do I get QEPCAD working in Sage?
The author recommends installing it within Sage using sage -i qepcad so Sage can call QEPCAD.

What if the inequality isn’t polynomial (e.g., has 1/x)?
Convert the statement to polynomial form first, for example by multiplying both sides by a positive product like xyz to clear denominators, as shown in the post.

Can QEPCAD give equality cases or geometric descriptions of solution sets?
Yes — the post demonstrates asking for solution='all-points' to list discrete solutions and solution='geometric' to obtain a geometric description.

Should students always use a computer to solve contest problems?
The author observes it’s tempting but notes that relying on a computer may not be appropriate for learning technique; the post treats the approach as a powerful verification and exploration tool.

Slaughtering Competition Problems with Quantifier Elimination 22 DEC 2021 – TAGS: SAGE , FEATURED Anytime I see questions on mse that ask something “simple”, I feel a powerful urge to…

Sources

Related posts

By

Leave a Reply

Your email address will not be published. Required fields are marked *