Semialgebraic sets #
A subset of σ → R, for a commutative ring R with a chosen linear order, is semialgebraic when
it is a finite Boolean combination of polynomial zero sets {x | p(x) = 0} and positivity sets
{x | 0 < p(x)}. We define TauCeti.IsSemialgebraic as membership in the algebra of sets
(MeasureTheory.generateSetAlgebra) generated by these basic sets. This is the intrinsic,
quantifier-free definition. When R is a real closed field, closure under coordinate projection is
the Tarski–Seidenberg theorem, a consequence of cylindrical algebraic decomposition; projection
closure is not built into the definition.
Every closure property proved here follows directly from the definition:
- the Boolean operations, including finite unions and intersections;
- every polynomial sign condition, such as
{x | p(x) ≤ q(x)}or{x | sign p(x) = ε}; - any condition on the signs of finitely many polynomials
(
TauCeti.isSemialgebraic_setOf_sign_eval), in particular a prescribed permanences minus variations of their values (TauCeti.isSemialgebraic_setOf_permanencesMinusVariations_eval); - the vanishing of a prescribed set of coefficients of a polynomial family
P : Polynomial (MvPolynomial σ R)(TauCeti.isSemialgebraic_setOf_forall_coeff_eq_zero); - inverse images under polynomial maps (
TauCeti.IsSemialgebraic.preimage_eval), and hence under changes of coordinates, in particular coordinate permutations; - products, in the form
σ ⊕ τ → Rand in the formFin (m + n) → R; - the sections
{x : Fin n → R | Fin.cons t x ∈ s}and{y : Fin 1 → R | Fin.cons (y 0) x ∈ s}of a subset ofFin (n + 1) → R, which are the horizontal and vertical slices of a cylinder overFin n → Rwith distinguished coordinate0; the vertical slice is a subset ofFin 1 → R, the one-coordinate space of the definition.
Conversely, every semialgebraic set is described by a condition on the signs of finitely many
polynomials (TauCeti.IsSemialgebraic.exists_eq_setOf_sign_eval), and so membership in it depends
on only finitely many coordinates (TauCeti.IsSemialgebraic.exists_finset_mem_iff_of_eqOn).
Closure under projection is recorded as the property TauCeti.HasSemialgebraicProjections R of the
ordered ring R, with field TauCeti.HasSemialgebraicProjections.isSemialgebraic_image_tail.
Its consequences, such as quantifier elimination and the image and composition laws of
semialgebraic functions, are stated under this assumption.
References #
S. Basu, R. Pollack, and M.-F. Roy, Algorithms in Real Algebraic Geometry, second edition, Chapter 2, for semi-algebraic sets.
The generated algebra of sets is Mathlib's MeasureTheory.generateSetAlgebra, from
Mathlib/MeasureTheory/SetAlgebra.lean by Etienne Marion.
A set s ⊆ σ → R is semialgebraic if it belongs to the algebra of sets (closed under
complements and finite unions) generated by the polynomial zero sets {x | p(x) = 0} and the
positivity sets {x | 0 < p(x)}, for p : MvPolynomial σ R.
Instances For
A set is semialgebraic if and only if it belongs to the algebra of sets generated by the polynomial zero sets and the polynomial positivity sets.
The zero set of a polynomial is semialgebraic.
The positivity set of a polynomial is semialgebraic.
The semialgebraic sets form an algebra of sets.
The semialgebraic sets form the smallest algebra of sets containing every polynomial zero set and every polynomial positivity set.
Induction principle for semialgebraic sets: a property of sets that holds for polynomial zero sets and polynomial positivity sets, and is preserved by complements and binary unions, holds for every semialgebraic set.
Boolean operations #
The empty set is semialgebraic.
The whole space is semialgebraic.
The complement of a semialgebraic set is semialgebraic.
A set whose complement is semialgebraic is semialgebraic.
The complement of a set is semialgebraic if and only if the set is.
The union of two semialgebraic sets is semialgebraic.
The intersection of two semialgebraic sets is semialgebraic.
The difference of two semialgebraic sets is semialgebraic.
A finite union of semialgebraic sets is semialgebraic.
A finite intersection of semialgebraic sets is semialgebraic.
A union of finitely many semialgebraic sets is semialgebraic.
An intersection of finitely many semialgebraic sets is semialgebraic.
Polynomial sign conditions #
The set where a polynomial does not vanish is semialgebraic.
The set where two polynomials agree is semialgebraic.
The set where a polynomial is nonpositive is semialgebraic.
The set where a polynomial is negative is semialgebraic.
The set where a polynomial is nonnegative is semialgebraic.
The set where one polynomial is less than another is semialgebraic.
The set where one polynomial is at most another is semialgebraic.
The set where a polynomial has a prescribed sign is semialgebraic.
A sign condition on finitely many polynomials defines a semialgebraic set: membership may depend in any way on the signs of their values.
A condition on the permanences minus variations of the values of finitely many polynomials defines a semialgebraic set, since the statistic depends only on the signs of the values.
The parameters at which the coefficients of P of index in s all vanish form a
semialgebraic set.
Finite sets #
In finitely many coordinates, a point is semialgebraic.
In finitely many coordinates, a finite set is semialgebraic.
Inverse images and products #
The inverse image of a semialgebraic set under a polynomial map is semialgebraic.
The inverse image of a semialgebraic set under a change of coordinates x ↦ x ∘ f is
semialgebraic.
Semialgebraicity is invariant under a bijective change of coordinates, such as a coordinate permutation.
The product of semialgebraic sets, as a subset of σ ⊕ τ → R, is semialgebraic.
The product of semialgebraic sets, as a subset of Fin (m + n) → R, is semialgebraic.
The cylinder Fin.tail ⁻¹' s over a semialgebraic subset s of Fin n → R, with
distinguished coordinate 0, is semialgebraic.
The horizontal section at height t of a semialgebraic subset of Fin (n + 1) → R, whose
distinguished coordinate is 0, is semialgebraic.
The vertical section over a base point x of a semialgebraic subset of Fin (n + 1) → R,
whose distinguished coordinate is 0, is semialgebraic as a subset of Fin 1 → R.
Sign-condition normal form #
Sign-condition normal form. Every semialgebraic set is described by a condition on the signs of finitely many polynomials.
Finitely many coordinates. Membership in a semialgebraic set depends on only finitely many coordinates: those of the variables of the polynomials describing it.
Projection closure #
Semialgebraic subsets of the coordinate spaces over R have semialgebraic projections if,
for every n, forgetting the coordinate 0 (Fin.tail) maps semialgebraic subsets of
Fin (n + 1) → R to semialgebraic subsets of Fin n → R. For R = ℝ this is the
Tarski–Seidenberg theorem, proved by cylindrical algebraic decomposition in
TauCeti.Geometry.RealAlgebraic.CAD.Existence. It fails for some ordered fields: over ℚ,
forgetting t maps the parabola {(t, x) | t ^ 2 = x} to the set of rational squares, which is
dense and codense in the positive rationals and so is not semialgebraic.
- isSemialgebraic_image_tail {n : ℕ} {s : Set (Fin (n + 1) → R)} : IsSemialgebraic s → IsSemialgebraic (Fin.tail '' s)
Forgetting the coordinate
0maps semialgebraic sets to semialgebraic sets.