Terms of relational expansions of the ring language as polynomials #
Let L be a relational language, such as the language Language.order with the single
relation symbol ≤. The terms of Language.ring.sum L use only the ring operations +, *,
-, 0, 1, so a term with variables in α is an integer polynomial in α. For
L = Language.order, Language.ring.sum L is the first-order language of ordered rings.
This file defines that polynomial, FirstOrder.Language.Term.toMvPolynomial, with its equations
for variables and the ring operations, and proves:
FirstOrder.Language.Term.realize_eq_aeval_toMvPolynomial: in a commutative ring whose ring symbols have their usual meaning (FirstOrder.Ring.CompatibleRing), realizing a term is evaluating its polynomial, andFirstOrder.Language.Term.realize_eq_eval_map_toMvPolynomialstates the same with the polynomial mapped toR;FirstOrder.Language.Term.toMvPolynomial_surjective: every integer polynomial comes from a term;MvPolynomial.exists_term_realize_eq_eval: a polynomial with coefficients inRis realized by a term whose extra variables are assigned the coefficients, that is, by a term with parameters fromR.
For ordered rings, these are the term-level translation laws between formulas and polynomial sign conditions, used to identify semialgebraic sets with quantifier-free definable sets.
Implementation notes #
The construction of a term realizing a given polynomial follows the corresponding construction
for FreeCommRing in Mathlib's Mathlib/ModelTheory/Algebra/Ring/FreeCommRing.lean, by Chris
Hughes.
The integer polynomial computed by a term of the ring language expanded by the relation
symbols of L.
Instances For
The polynomial of a variable is that variable.
The polynomial of a sum of terms is the sum of their polynomials.
The polynomial of a product of terms is the product of their polynomials.
The polynomial of the negation of a term is the negation of its polynomial.
The polynomial of the constant 0 is 0.
The polynomial of the constant 1 is 1.
Renaming the variables of a term renames the variables of its polynomial.
Every integer polynomial is the polynomial of a term of Language.ring.sum L.
In a commutative ring whose ring symbols have their usual meaning, realizing a term of
Language.ring.sum L is evaluating its integer polynomial.
In a commutative ring whose ring symbols have their usual meaning, realizing a term of
Language.ring.sum L is evaluating its integer polynomial mapped to R.
Every polynomial over R is realized by a term of Language.ring.sum L with parameters from
R: the variables Sum.inl r of the term are assigned the values r.