Integer polynomial formulas over the reals #
Expression trees contain integer constants, finite variable indices, addition and
multiplication. Boolean formulas compare expressions with zero. Their semantics is a subset
of real coordinate space; quantification is performed by the problem using the formula.
This is the finite syntax and semantics of edemaine/lean-canny's formal abstract at
970f28a5ecefc1327402ade16c068aa4b1b2c183.
A dedicated expression grammar retains integer coefficients and a concrete input encoding;
Term.toPolynomial connects it to Mathlib's mathematical polynomials.
Main definitions #
Cslib.Logic.RealArithmetic.Term: integer polynomial expression trees.Cslib.Logic.RealArithmetic.Formula: Boolean combinations of polynomial comparisons.Cslib.Logic.RealArithmetic.Formula.solutionSet: the described real set.
Main results #
Cslib.Logic.RealArithmetic.Term.eval_toPolynomial: evaluation agrees with the associated multivariate polynomial.Cslib.Logic.RealArithmetic.Formula.solutionSet_rename: renaming pulls back solution sets.
A Boolean formula compares polynomial expressions with zero, using equality or strict inequality, and combines these assertions by negation, conjunction, and disjunction. ETR existentially quantifies all occurring variables; a free formula describes a subset of real coordinate space.
- false {n : ℕ} : Formula n
- eqZero {n : ℕ} : Term n → Formula n
- ltZero {n : ℕ} : Term n → Formula n
- not {n : ℕ} : Formula n → Formula n
- and {n : ℕ} : Formula n → Formula n → Formula n
- or {n : ℕ} : Formula n → Formula n → Formula n
Instances For
Interpret an expression as a mathematical polynomial with integer coefficients.
A renamed formula holds exactly when the original holds on the selected coordinates.
An injective renaming preserves whether the real solution set is nonempty.
Adding unused universal coordinates preserves every existential solution.