2 #73c Erdős–Szekeres theorem (from partial orders) forget
From #73c of 11.book. Another route proving the same theorem as #73, from the form of chains and antichains of a partial order.
If a finite partially ordered set has at least \(rs + 1\) elements, then it has a chain of length \(r + 1\) or an antichain of size \(s + 1\). Peel off maximal elements: the set \(M\) of maximal elements is an antichain. If \(|M| \le s\), the remainder \(P \setminus M\) has at least \(r s - s + 1\) elements, and if there is a chain of length at least \(r\), it can be extended by a maximal element above its greatest element.
#73 above counts \(n^2 + 1\) elements by two 'good pairs', increasing and decreasing (Seidenberg type). Here we peel off maximal elements of a partial order (Mirsky type). It generalizes to \(rs + 1\) elements and takes a symmetric form in chains and antichains.
2.1 Greatest element
A finite set of natural numbers has a greatest element (induction on the number of elements).
Lmx …
\(n \in \mathbb{M} \Longrightarrow \forall S \, ( S \subset \mathbb{M} , \operatorname{\#} S = n + 1 \Longrightarrow \exists m \in S . \forall x \in S . x \le m )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+2.2 Maximal elements above
If \(x\) is not maximal, there is a maximal element above it: the set of elements above \(x\), \(U\), has a greatest element \(y'\), which is maximal.
LB …
\(\forall x , y , z \, ( \langle x , y \rangle \in Q , \langle y , z \rangle \in Q \Longrightarrow \langle x , z \rangle \in Q ) , \forall x , y \in \mathbb{M} . ( \langle x , y \rangle \in Q \Longrightarrow x < y ) , P \subset \mathbb{M} , \operatorname{\#} P \in \mathbb{M} , M = \{ x \in P \mid \forall y \in P . \neg \langle x , y \rangle \in Q \} , x \in P , x \notin M \Longrightarrow \exists y \in M . \langle x , y \rangle \in Q\) \(\blacktriangleleft\) ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+2.3 Extending a chain
Given a chain \(C\) with greatest element \(x\), if \(\langle x, y \rangle \in Q\) for some \(y\), then \(C \cup \{y\}\) is also a chain (\(Q\) is transitive).
LC1 …
\(\forall x , y , z \, ( \langle x , y \rangle \in Q , \langle y , z \rangle \in Q \Longrightarrow \langle x , z \rangle \in Q ) , \forall x , y \in \mathbb{M} . ( \langle x , y \rangle \in Q \Longrightarrow x < y ) , C \subset \mathbb{M} , \forall u , v \in C . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) , x \in C , \forall c \in C . c \le x , \langle x , y \rangle \in Q , y \in \mathbb{M} \Longrightarrow \forall u , v \in C \cup \{ y \} . ( u < v \Longrightarrow \langle u , v \rangle \in Q )\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+2.4 Chains after peeling off maximal elements
Removing the set \(M\) of maximal elements, a chain in \(P \setminus M\) (\(k + 1\) elements) becomes, by adding one element of \(M\), a chain of \(k + 2\) elements.
LC …
\(\forall x , y , z \, ( \langle x , y \rangle \in Q , \langle y , z \rangle \in Q \Longrightarrow \langle x , z \rangle \in Q ) , \forall x , y \in \mathbb{M} . ( \langle x , y \rangle \in Q \Longrightarrow x < y ) , P \subset \mathbb{M} , \operatorname{\#} P \in \mathbb{M} , M = \{ x \in P \mid \forall y \in P . \neg \langle x , y \rangle \in Q \} , C \subset P \mathop\setminus M , \forall u , v \in C . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) , k \in \mathbb{M} , \operatorname{\#} C = k + 1 \Longrightarrow \exists D \, ( D \subset P , \operatorname{\#} D = ( k + 1 ) + 1 , \forall u , v \in D . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) )\) \(\blacktriangleleft\) ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+2.5 One step of peeling
Counting: if \((r + 1)s + 1 \le n = a + b\) and \(a \le s\), then \(rs + 1 \le b\).
Lar2 …
\(r , s , a , b , n \in \mathbb{M} , ( r + 1 ) \cdot s + 1 \le n , a + b = n , a \le s \Longrightarrow r \cdot s + 1 \le b\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅0X2.6 One step of peeling (removing the set of maximal elements)
The set of maximal elements of \(P\), \(M\), is an antichain. If \(|M| \ge s + 1\), it is the answer. If \(|M| \le s\), then \(P \setminus M\) has at least \(rs + 1\) elements, and by the induction hypothesis (\(r\)), if \(P \setminus M\) has a chain of length \(r + 1\), adding an element of \(M\) gives length \(r + 2\); if it has an antichain, that is the answer.
LS …
\(\forall x , y , z \, ( \langle x , y \rangle \in Q , \langle y , z \rangle \in Q \Longrightarrow \langle x , z \rangle \in Q ) , \forall x , y \in \mathbb{M} . ( \langle x , y \rangle \in Q \Longrightarrow x < y ) , r , s \in \mathbb{M} , \forall X \, ( X \subset \mathbb{M} , \operatorname{\#} X \in \mathbb{M} , r \cdot s + 1 \le \operatorname{\#} X \Longrightarrow \exists C \, ( C \subset X , r + 1 \le \operatorname{\#} C , \forall u , v \in C . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) ) \mathbin{\rm o\!r} \exists A \, ( A \subset X , s + 1 \le \operatorname{\#} A , \forall u , v \in A . ( u < v \Longrightarrow \neg \langle u , v \rangle \in Q ) ) ) , P \subset \mathbb{M} , \operatorname{\#} P \in \mathbb{M} , ( r + 1 ) \cdot s + 1 \le \operatorname{\#} P \Longrightarrow \exists C \, ( C \subset P , ( r + 1 ) + 1 \le \operatorname{\#} C , \forall u , v \in C . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) ) \mathbin{\rm o\!r} \exists A \, ( A \subset P , s + 1 \le \operatorname{\#} A , \forall u , v \in A . ( u < v \Longrightarrow \neg \langle u , v \rangle \in Q ) )\) \(\blacktriangleleft\) ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅0X2.7 Chain or antichain (rs + 1 elements)
Induction on \(r\). \(r = 0\): if there is at least one element, there is a chain of length 1 (one point).
ESp …
\(\forall x , y , z \, ( \langle x , y \rangle \in Q , \langle y , z \rangle \in Q \Longrightarrow \langle x , z \rangle \in Q ) , \forall x , y \in \mathbb{M} . ( \langle x , y \rangle \in Q \Longrightarrow x < y ) , r , s \in \mathbb{M} \Longrightarrow \forall X \, ( X \subset \mathbb{M} , \operatorname{\#} X \in \mathbb{M} , r \cdot s + 1 \le \operatorname{\#} X \Longrightarrow \exists C \, ( C \subset X , r + 1 \le \operatorname{\#} C , \forall u , v \in C . ( u < v \Longrightarrow \langle u , v \rangle \in Q ) ) \mathbin{\rm o\!r} \exists A \, ( A \subset X , s + 1 \le \operatorname{\#} A , \forall u , v \in A . ( u < v \Longrightarrow \neg \langle u , v \rangle \in Q ) ) )\) \(\blacktriangleleft\) LS ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅0X2.8 Increasing and decreasing subsequences of a sequence
A sequence of \(rs + 1\) distinct natural numbers, \(a_0, \dots, a_{rs}\), has an increasing subsequence of length \(r + 1\) or a decreasing subsequence of length \(s + 1\) (\(r = s = n\) is the Erdős–Szekeres theorem). \(Q = \{(i, j) \mid i < j,\ a_i < a_j\}\) is a partial order; chains are increasing subsequences and antichains are decreasing subsequences.
ESa …
\(r , s \in \mathbb{M} , \forall i \in 0 \mathinner{\ldotp\ldotp} r \cdot s . {a} ( i ) \in \mathbb{M} , \forall i , j \in 0 \mathinner{\ldotp\ldotp} r \cdot s . ( {a} ( i ) = {a} ( j ) \Longrightarrow i = j ) \Longrightarrow \exists S \, ( S \subset 0 \mathinner{\ldotp\ldotp} r \cdot s , ( ( r + 1 \le \operatorname{\#} S , \forall x , y \in S . ( x < y \Longrightarrow {a} ( x ) < {a} ( y ) ) ) \mathbin{\rm o\!r} ( s + 1 \le \operatorname{\#} S , \forall x , y \in S . ( x < y \Longrightarrow {a} ( y ) < {a} ( x ) ) ) ) )\) \(\blacktriangleleft\) ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅0X\(r = s = n\): a sequence of \(n^2 + 1\) distinct numbers has an increasing or decreasing subsequence of length \(n + 1\) (Erdős–Szekeres theorem).
ESn …
\(n \in \mathbb{M} , \forall i \in 0 \mathinner{\ldotp\ldotp} n \cdot n . {a} ( i ) \in \mathbb{M} , \forall i , j \in 0 \mathinner{\ldotp\ldotp} n \cdot n . ( {a} ( i ) = {a} ( j ) \Longrightarrow i = j ) \Longrightarrow \exists S \, ( S \subset 0 \mathinner{\ldotp\ldotp} n \cdot n , n + 1 \le \operatorname{\#} S , ( \forall x , y \in S . ( x < y \Longrightarrow {a} ( x ) < {a} ( y ) ) \mathbin{\rm o\!r} \forall x , y \in S . ( x < y \Longrightarrow {a} ( y ) < {a} ( x ) ) ) )\) \(\blacktriangleleft\) ESa ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅0X