Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A subwindow with a uniform sign pattern

Proved
Monotonicity_Theorem.uniform_pattern_window

by Tamas Fulop · Sep 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

On any interval window, some subwindow has the property that every point of it satisfies the same one of the four local sign patterns (above/below on each side). This selects the uniform pattern driving the four cases of Lemma 2.

Preamble
import Definitions.Def_Monotonicity_Theorem_Framework
Formal statement
theorem Monotonicity_Theorem.uniform_pattern_window {R : Type} (D : DenseLinearOrderNoEndpoints R)
    (M : OMinimalStructure D) {I B : Set (Power R 1)}
    (f : DefinableFunction M I B)
    (hinj : forall x y (hx : I x) (hy : I y),
      f.toFun (Subtype.mk x hx) = f.toFun (Subtype.mk y hy) -> x = y)
    {a0 b0 : Endpoint R} (hsub0 : (openInterval D a0 b0).Subset I)
    (hlt0 : Endpoint.lt D a0 b0) :
    exists a b : Endpoint R, Endpoint.lt D a b /\
      (forall x, openInterval D a b x -> openInterval D a0 b0 x) /\
      ((forall x (hxI : I x), openInterval D a b x ->
        exists c1 c2 : Power R 1, openInterval D a b c1 /\ openInterval D a b c2 /\
        Lt1 D c1 x /\ Lt1 D x c2 /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D c1 y -> Lt1 D y x ->
          Lt1 D (f.toFun (Subtype.mk x hxI)).1 (f.toFun (Subtype.mk y hyI)).1) /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D x y -> Lt1 D y c2 ->
          Lt1 D (f.toFun (Subtype.mk x hxI)).1 (f.toFun (Subtype.mk y hyI)).1)) \/
      (forall x (hxI : I x), openInterval D a b x ->
        exists c1 c2 : Power R 1, openInterval D a b c1 /\ openInterval D a b c2 /\
        Lt1 D c1 x /\ Lt1 D x c2 /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D c1 y -> Lt1 D y x ->
          Lt1 D (f.toFun (Subtype.mk x hxI)).1 (f.toFun (Subtype.mk y hyI)).1) /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D x y -> Lt1 D y c2 ->
          Lt1 D (f.toFun (Subtype.mk y hyI)).1 (f.toFun (Subtype.mk x hxI)).1)) \/
      (forall x (hxI : I x), openInterval D a b x ->
        exists c1 c2 : Power R 1, openInterval D a b c1 /\ openInterval D a b c2 /\
        Lt1 D c1 x /\ Lt1 D x c2 /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D c1 y -> Lt1 D y x ->
          Lt1 D (f.toFun (Subtype.mk y hyI)).1 (f.toFun (Subtype.mk x hxI)).1) /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D x y -> Lt1 D y c2 ->
          Lt1 D (f.toFun (Subtype.mk x hxI)).1 (f.toFun (Subtype.mk y hyI)).1)) \/
      (forall x (hxI : I x), openInterval D a b x ->
        exists c1 c2 : Power R 1, openInterval D a b c1 /\ openInterval D a b c2 /\
        Lt1 D c1 x /\ Lt1 D x c2 /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D c1 y -> Lt1 D y x ->
          Lt1 D (f.toFun (Subtype.mk y hyI)).1 (f.toFun (Subtype.mk x hxI)).1) /\
        (forall y (hyI : I y), openInterval D a b y -> Lt1 D x y -> Lt1 D y c2 ->
          Lt1 D (f.toFun (Subtype.mk y hyI)).1 (f.toFun (Subtype.mk x hxI)).1))) := by sorry
Source
monotonicity.tex, Lemma 2; uniform pattern selection
Read-back

What the Lean code literally says, in plain math · muse-spark

Fix a type RRR with a dense linear order without endpoints DDD, an o-minimal structure MMM over DDD, sets I,BI,BI,B of 111-tuples over RRR, and a definable function fff from III to BBB with respect to MMM; assume fff is injective in the sense that for all x,yx,yx,y with x∈Ix\in Ix∈I and y∈Iy\in Iy∈I, if the underlying function of fff takes the same value at xxx (viewed in III) and at yyy (viewed in III) then x=yx=yx=y as 111-tuples; assume endpoints a0,b0a_{0},b_{0}a0​,b0​ satisfy a0<b0a_{0}<b_{0}a0​<b0​ in the endpoint order for DDD and (a0,b0)⊆I(a_{0},b_{0})\subseteq I(a0​,b0​)⊆I as sets, where (a0,b0)(a_{0},b_{0})(a0​,b0​) denotes the DDD-open interval. Then there exist endpoints a,ba,ba,b such that a<ba<ba<b in the endpoint order for DDD and (a,b)⊆(a0,b0)(a,b)\subseteq (a_{0},b_{0})(a,b)⊆(a0​,b0​) as sets, i.e. every xxx with x∈(a,b)x\in(a,b)x∈(a,b) satisfies x∈(a0,b0)x\in(a_{0},b_{0})x∈(a0​,b0​), and at least one of the following four uniform local patterns holds on (a,b)∩I(a,b)\cap I(a,b)∩I: (1) for every xxx with x∈Ix\in Ix∈I and x∈(a,b)x\in(a,b)x∈(a,b) there exist c1,c2c_{1},c_{2}c1​,c2​ with c1∈(a,b)c_{1}\in(a,b)c1​∈(a,b), c2∈(a,b)c_{2}\in(a,b)c2​∈(a,b), c1<xc_{1}<xc1​<x and x<c2x<c_{2}x<c2​ in the 111-dimensional strict order for DDD, such that for every yyy with y∈Iy\in Iy∈I and y∈(a,b)y\in(a,b)y∈(a,b), if c1<yc_{1}<yc1​<y and y<xy<xy<x then the first coordinate of f(x)f(x)f(x) is strictly less than the first coordinate of f(y)f(y)f(y), and if x<yx<yx<y and y<c2y<c_{2}y<c2​ then the first coordinate of f(x)f(x)f(x) is strictly less than the first coordinate of f(y)f(y)f(y); (2) same with the same left-hand clause f(x)1<f(y)1f(x)_{1}<f(y)_{1}f(x)1​<f(y)1​ for c1<y<xc_{1}<y<xc1​<y<x but f(y)1<f(x)1f(y)_{1}<f(x)_{1}f(y)1​<f(x)1​ for x<y<c2x<y<c_{2}x<y<c2​; (3) same with f(y)1<f(x)1f(y)_{1}<f(x)_{1}f(y)1​<f(x)1​ for c1<y<xc_{1}<y<xc1​<y<x and f(x)1<f(y)1f(x)_{1}<f(y)_{1}f(x)1​<f(y)1​ for x<y<c2x<y<c_{2}x<y<c2​; (4) same with f(y)1<f(x)1f(y)_{1}<f(x)_{1}f(y)1​<f(x)1​ for c1<y<xc_{1}<y<xc1​<y<x and f(y)1<f(x)1f(y)_{1}<f(x)_{1}f(y)1​<f(x)1​ for x<y<c2x<y<c_{2}x<y<c2​, where in each case xxx and yyy denote 111-tuples viewed in III when applying fff, c1<y<xc_{1}<y<xc1​<y<x abbreviates c1<yc_{1}<yc1​<y and y<xy<xy<x, and x<y<c2x<y<c_{2}x<y<c2​ abbreviates x<yx<yx<y and y<c2y<c_{2}y<c2​. If there is no x∈I∩(a,b)x\in I\cap(a,b)x∈I∩(a,b) then each universal pattern holds vacuously, and likewise each inner universal over yyy holds vacuously when there is no y∈I∩(a,b)y\in I\cap(a,b)y∈I∩(a,b) with c1<y<xc_{1}<y<xc1​<y<x respectively x<y<c2x<y<c_{2}x<y<c2​.

Human review
  • Endorsed by Shuze Chen · Sep 11, 2026

  • Endorsed by Tamas Fulop · Sep 11, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me