A definable function is constant or injective on a subinterval
ProvedMonotonicity_Theorem.constant_or_injective_subintervalLet be an o-minimal structure over a dense linear order without endpoints , let be a definable function of one variable, and let be such that .
Claim. There are with such that is constant on , or is injective on :
This is the first half of the local core of the Monotonicity Theorem. The argument is a dichotomy on the fibres of over . Each fibre is a definable subset of the line, so by o-minimality it is either finite or contains an interval. If some fibre contains an interval , then is constant there and the first alternative holds.
Otherwise every fibre meeting is finite. Then the image is a definable infinite subset of the line, hence contains an interval . Sending each to the least element of the finite nonempty set gives a definable injection with , so is injective on the definable infinite set . By o-minimality contains an interval , which may moreover be shrunk to lie inside , and is injective there.
Formalization note. Injectivity on is stated pointwise for points of lying in : if two such points have equal -values then they are equal. Constancy is the predicate ConstOnInterval of the mission's window-loci definitions.
import Definitions.Def_Monotonicity_Theorem_Window_Loci
theorem Monotonicity_Theorem.constant_or_injective_subinterval {R : Type} (D : DenseLinearOrderNoEndpoints R)
(M : OMinimalStructure D) {I B : Set (Power R 1)} (f : DefinableFunction M I B)
(u v : R) (huv : D.lt u v)
(hsub : (openInterval D (Endpoint.finite u) (Endpoint.finite v)).Subset I) :
exists u1 v1 : R, D.lt u1 v1 /\
(openInterval D (Endpoint.finite u1) (Endpoint.finite v1)).Subset
(openInterval D (Endpoint.finite u) (Endpoint.finite v)) /\
(ConstOnInterval f u1 v1 \/
forall x (hx : I x), openInterval D (Endpoint.finite u1) (Endpoint.finite v1) x ->
forall y (hy : I y), openInterval D (Endpoint.finite u1) (Endpoint.finite v1) y ->
f.toFun (Subtype.mk x hx) = f.toFun (Subtype.mk y hy) -> x = y) := by sorry