A definable subset of the line has finitely many boundary points
ProvedMonotonicity_Theorem.definable_interval_dichotomyLet be a dense linear order without endpoints and let be a subset of the line which is a finite union of points and open intervals — that is, a definable subset in the sense of the o-minimality axiom.
Claim. There is a finite set such that
In words: away from finitely many exceptional points, every open interval is either entirely inside or entirely outside it. The set plays the role of the boundary of , and the statement is the form in which tameness of definable sets is used when a partition into finitely many pieces has to be produced: cutting at the points of separates the part of the line covered by from its complement.
This is a general fact about finite unions of points and intervals and involves no function and no o-minimal structure beyond the description of .
import Definitions.Def_Monotonicity_Theorem_Window_Loci
theorem Monotonicity_Theorem.definable_interval_dichotomy {R : Type} (D : DenseLinearOrderNoEndpoints R)
{S : Set (Power R 1)} (hS : FiniteUnionOfPointsAndIntervals D S) :
exists F : Set (Power R 1), IsFinite1 F /\
forall u v : R, D.lt u v ->
(forall x : Power R 1, openInterval D (Endpoint.finite u) (Endpoint.finite v) x -> Not (F x)) ->
((openInterval D (Endpoint.finite u) (Endpoint.finite v)).Subset S \/
forall x : Power R 1, openInterval D (Endpoint.finite u) (Endpoint.finite v) x -> Not (S x)) := by sorry