4 #73c The Erdős–Szekeres theorem (from partial orders) forget
If a finite partial order has at least \(rs + 1\) elements, there is 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 a chain of length at least \(r\) can be extended by a maximal element above its greatest element.
#73 above counts \(n^2 + 1\) points by the two "good pairs" of increasing and decreasing (Seidenberg type). Here we peel off the maximal elements of a partial order (Mirsky type). It generalizes to \(rs + 1\) elements and gives a symmetric form of chains and antichains.
4.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\) Lrm ,∖∪1 ,#0 ,Ltot ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+4.2 Maximal elements above
Above a non-maximal \(x\) there is a maximal element: the greatest element of the set of elements above \(x\), \(U\), namely \(y'\), 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\) Lmx ,L⊂# ,#0 ,𝕄0-' ,ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+4.3 Extending a chain
For a chain \(C\) with greatest element \(x\), if \(\langle x, y \rangle \in Q\) holds 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\) L≤anti ,L≤t ,<. ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+4.4 Chains after peeling off the maximal elements
Removing the set \(M\) of maximal elements: a chain in \(P \setminus M\) (of \(k + 1\) elements) becomes, after 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\) LB ,LC1 ,Lmx ,#s ,ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+4.5 One peeling step
Counting: \((r + 1)s + 1 \le n = a + b\); if \(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 ,ℤ+ ,⋅𝕄:D ,⋅0X4.6 One peeling step (removing the set of maximal elements)
For \(P\), the set \(M\) of maximal elements 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, so by the induction hypothesis (\(r\)), if \(P \setminus M\) has a chain of length \(r + 1\), adding an element of \(M\) gives a chain of 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\) LC ,Lar2 ,Lcmp ,L⊂# ,L⊂≤ ,ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅𝕄:D ,⋅0X4.7 Chain or antichain (rs + 1 elements)
Induction on \(r\). Case \(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 ,#0 ,#1 ,∅.' ,set1.' ,L≤0 ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅𝕄:D ,⋅0X4.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 whose chains are the increasing subsequences and whose antichains are the 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\) ESp ,L#.. ,ax_s ,\(\mathbb{W}.\) ,\(0 \in \mathbb{M}\) ,𝕄0 ,INDC ,ℤ+ ,⋅𝕄:D ,⋅0X\(r = s = n\): a sequence of \(n^2 + 1\) distinct elements has an increasing or decreasing subsequence of length \(n + 1\) (the 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 ,ℤ+ ,⋅𝕄:D ,⋅0X5 #71 Lagrange's theorem forget
Lagrange's theorem: in a finite group \(G\), the number of elements of a subgroup \(H\) divides the number of elements of \(G\).
For a group \(G\) (operation \(f\), identity \(e\)) and a subgroup \(H\), if \(G\) has \(n\) elements and \(H\) has \(k\), then \(k\) divides \(n\).
In \(G\), for a subset \(S\) closed under multiplication by \(H\) on the right, we argue by strong induction on the number of elements of \(S\). Taking an element of the set \(S\), say \(a\): the coset \(aH\) is contained in \(S\) and has the same number of elements as \(H\), and \(S \setminus aH\) is also closed.
\(( G , e , [ {i} ] , [ \mathbin{f} ] ) :\underline{2}\mathsf{A}\mathsf{E}\mathsf{Z} , H \subset G , ( H , e , [ {i} ] , [ \mathbin{f} ] ) :\underline{2}\mathsf{A}\mathsf{E}\mathsf{Z} , \operatorname{\#} G , \operatorname{\#} H \in \mathbb{M} \Longrightarrow \exists m \in \mathbb{M} . \operatorname{\#} G = m \cdot \operatorname{\#} H\) \(\blacktriangleleft\) \(\mathbb{W}.\) ,Axℤ ,ax_s ,⋅𝕄:D ,⋅0X