Metamath Proof Explorer


Theorem php

Description: Pigeonhole Principle. A natural number is not equinumerous to a proper subset of itself. Theorem (Pigeonhole Principle) of Enderton p. 134. The theorem is so-called because you can't putn + 1 pigeons inton holes (if each hole holds only one pigeon). The proof consists of phplem1 , phplem2 , nneneq , and this final piece of the proof. (Contributed by NM, 29-May-1998) Avoid ax-pow . (Revised by BTernaryTau, 18-Nov-2024)

Ref Expression
Assertion php
|- ( ( A e. _om /\ B C. A ) -> -. A ~~ B )

Proof

Step Hyp Ref Expression
1 0ss
 |-  (/) C_ B
2 sspsstr
 |-  ( ( (/) C_ B /\ B C. A ) -> (/) C. A )
3 1 2 mpan
 |-  ( B C. A -> (/) C. A )
4 0pss
 |-  ( (/) C. A <-> A =/= (/) )
5 df-ne
 |-  ( A =/= (/) <-> -. A = (/) )
6 4 5 bitri
 |-  ( (/) C. A <-> -. A = (/) )
7 3 6 sylib
 |-  ( B C. A -> -. A = (/) )
8 nn0suc
 |-  ( A e. _om -> ( A = (/) \/ E. x e. _om A = suc x ) )
9 8 orcanai
 |-  ( ( A e. _om /\ -. A = (/) ) -> E. x e. _om A = suc x )
10 7 9 sylan2
 |-  ( ( A e. _om /\ B C. A ) -> E. x e. _om A = suc x )
11 pssnel
 |-  ( B C. suc x -> E. y ( y e. suc x /\ -. y e. B ) )
12 pssss
 |-  ( B C. suc x -> B C_ suc x )
13 ssdif
 |-  ( B C_ suc x -> ( B \ { y } ) C_ ( suc x \ { y } ) )
14 disjsn
 |-  ( ( B i^i { y } ) = (/) <-> -. y e. B )
15 disj3
 |-  ( ( B i^i { y } ) = (/) <-> B = ( B \ { y } ) )
16 14 15 bitr3i
 |-  ( -. y e. B <-> B = ( B \ { y } ) )
17 sseq1
 |-  ( B = ( B \ { y } ) -> ( B C_ ( suc x \ { y } ) <-> ( B \ { y } ) C_ ( suc x \ { y } ) ) )
18 16 17 sylbi
 |-  ( -. y e. B -> ( B C_ ( suc x \ { y } ) <-> ( B \ { y } ) C_ ( suc x \ { y } ) ) )
19 13 18 syl5ibr
 |-  ( -. y e. B -> ( B C_ suc x -> B C_ ( suc x \ { y } ) ) )
20 12 19 syl5
 |-  ( -. y e. B -> ( B C. suc x -> B C_ ( suc x \ { y } ) ) )
21 peano2
 |-  ( x e. _om -> suc x e. _om )
22 nnfi
 |-  ( suc x e. _om -> suc x e. Fin )
23 diffi
 |-  ( suc x e. Fin -> ( suc x \ { y } ) e. Fin )
24 21 22 23 3syl
 |-  ( x e. _om -> ( suc x \ { y } ) e. Fin )
25 ssdomfi
 |-  ( ( suc x \ { y } ) e. Fin -> ( B C_ ( suc x \ { y } ) -> B ~<_ ( suc x \ { y } ) ) )
26 24 25 syl
 |-  ( x e. _om -> ( B C_ ( suc x \ { y } ) -> B ~<_ ( suc x \ { y } ) ) )
27 20 26 sylan9
 |-  ( ( -. y e. B /\ x e. _om ) -> ( B C. suc x -> B ~<_ ( suc x \ { y } ) ) )
28 27 3impia
 |-  ( ( -. y e. B /\ x e. _om /\ B C. suc x ) -> B ~<_ ( suc x \ { y } ) )
29 28 3com23
 |-  ( ( -. y e. B /\ B C. suc x /\ x e. _om ) -> B ~<_ ( suc x \ { y } ) )
30 29 3expa
 |-  ( ( ( -. y e. B /\ B C. suc x ) /\ x e. _om ) -> B ~<_ ( suc x \ { y } ) )
31 30 adantrr
 |-  ( ( ( -. y e. B /\ B C. suc x ) /\ ( x e. _om /\ y e. suc x ) ) -> B ~<_ ( suc x \ { y } ) )
32 nnfi
 |-  ( x e. _om -> x e. Fin )
33 32 ad2antrl
 |-  ( ( B ~<_ ( suc x \ { y } ) /\ ( x e. _om /\ y e. suc x ) ) -> x e. Fin )
34 simpl
 |-  ( ( B ~<_ ( suc x \ { y } ) /\ ( x e. _om /\ y e. suc x ) ) -> B ~<_ ( suc x \ { y } ) )
35 simpr
 |-  ( ( B ~<_ ( suc x \ { y } ) /\ ( x e. _om /\ y e. suc x ) ) -> ( x e. _om /\ y e. suc x ) )
36 phplem1
 |-  ( ( x e. _om /\ y e. suc x ) -> x ~~ ( suc x \ { y } ) )
37 ensymfib
 |-  ( x e. Fin -> ( x ~~ ( suc x \ { y } ) <-> ( suc x \ { y } ) ~~ x ) )
38 32 37 syl
 |-  ( x e. _om -> ( x ~~ ( suc x \ { y } ) <-> ( suc x \ { y } ) ~~ x ) )
39 38 adantr
 |-  ( ( x e. _om /\ y e. suc x ) -> ( x ~~ ( suc x \ { y } ) <-> ( suc x \ { y } ) ~~ x ) )
40 36 39 mpbid
 |-  ( ( x e. _om /\ y e. suc x ) -> ( suc x \ { y } ) ~~ x )
41 endom
 |-  ( ( suc x \ { y } ) ~~ x -> ( suc x \ { y } ) ~<_ x )
42 40 41 syl
 |-  ( ( x e. _om /\ y e. suc x ) -> ( suc x \ { y } ) ~<_ x )
43 domtrfir
 |-  ( ( x e. Fin /\ B ~<_ ( suc x \ { y } ) /\ ( suc x \ { y } ) ~<_ x ) -> B ~<_ x )
44 42 43 syl3an3
 |-  ( ( x e. Fin /\ B ~<_ ( suc x \ { y } ) /\ ( x e. _om /\ y e. suc x ) ) -> B ~<_ x )
45 33 34 35 44 syl3anc
 |-  ( ( B ~<_ ( suc x \ { y } ) /\ ( x e. _om /\ y e. suc x ) ) -> B ~<_ x )
46 31 45 sylancom
 |-  ( ( ( -. y e. B /\ B C. suc x ) /\ ( x e. _om /\ y e. suc x ) ) -> B ~<_ x )
47 46 exp43
 |-  ( -. y e. B -> ( B C. suc x -> ( x e. _om -> ( y e. suc x -> B ~<_ x ) ) ) )
48 47 com4r
 |-  ( y e. suc x -> ( -. y e. B -> ( B C. suc x -> ( x e. _om -> B ~<_ x ) ) ) )
49 48 imp
 |-  ( ( y e. suc x /\ -. y e. B ) -> ( B C. suc x -> ( x e. _om -> B ~<_ x ) ) )
50 49 exlimiv
 |-  ( E. y ( y e. suc x /\ -. y e. B ) -> ( B C. suc x -> ( x e. _om -> B ~<_ x ) ) )
51 11 50 mpcom
 |-  ( B C. suc x -> ( x e. _om -> B ~<_ x ) )
52 simp1
 |-  ( ( x e. _om /\ suc x ~~ B /\ B ~<_ x ) -> x e. _om )
53 endom
 |-  ( suc x ~~ B -> suc x ~<_ B )
54 domtrfir
 |-  ( ( x e. Fin /\ suc x ~<_ B /\ B ~<_ x ) -> suc x ~<_ x )
55 53 54 syl3an2
 |-  ( ( x e. Fin /\ suc x ~~ B /\ B ~<_ x ) -> suc x ~<_ x )
56 32 55 syl3an1
 |-  ( ( x e. _om /\ suc x ~~ B /\ B ~<_ x ) -> suc x ~<_ x )
57 sssucid
 |-  x C_ suc x
58 ssdomfi
 |-  ( suc x e. Fin -> ( x C_ suc x -> x ~<_ suc x ) )
59 22 57 58 mpisyl
 |-  ( suc x e. _om -> x ~<_ suc x )
60 21 59 syl
 |-  ( x e. _om -> x ~<_ suc x )
61 60 adantr
 |-  ( ( x e. _om /\ suc x ~<_ x ) -> x ~<_ suc x )
62 sbthfi
 |-  ( ( x e. Fin /\ suc x ~<_ x /\ x ~<_ suc x ) -> suc x ~~ x )
63 32 62 syl3an1
 |-  ( ( x e. _om /\ suc x ~<_ x /\ x ~<_ suc x ) -> suc x ~~ x )
64 61 63 mpd3an3
 |-  ( ( x e. _om /\ suc x ~<_ x ) -> suc x ~~ x )
65 52 56 64 syl2anc
 |-  ( ( x e. _om /\ suc x ~~ B /\ B ~<_ x ) -> suc x ~~ x )
66 65 3com23
 |-  ( ( x e. _om /\ B ~<_ x /\ suc x ~~ B ) -> suc x ~~ x )
67 66 3expia
 |-  ( ( x e. _om /\ B ~<_ x ) -> ( suc x ~~ B -> suc x ~~ x ) )
68 peano2b
 |-  ( x e. _om <-> suc x e. _om )
69 nnord
 |-  ( suc x e. _om -> Ord suc x )
70 68 69 sylbi
 |-  ( x e. _om -> Ord suc x )
71 vex
 |-  x e. _V
72 71 sucid
 |-  x e. suc x
73 nordeq
 |-  ( ( Ord suc x /\ x e. suc x ) -> suc x =/= x )
74 70 72 73 sylancl
 |-  ( x e. _om -> suc x =/= x )
75 nneneq
 |-  ( ( suc x e. _om /\ x e. _om ) -> ( suc x ~~ x <-> suc x = x ) )
76 68 75 sylanb
 |-  ( ( x e. _om /\ x e. _om ) -> ( suc x ~~ x <-> suc x = x ) )
77 76 anidms
 |-  ( x e. _om -> ( suc x ~~ x <-> suc x = x ) )
78 77 necon3bbid
 |-  ( x e. _om -> ( -. suc x ~~ x <-> suc x =/= x ) )
79 74 78 mpbird
 |-  ( x e. _om -> -. suc x ~~ x )
80 67 79 nsyli
 |-  ( ( x e. _om /\ B ~<_ x ) -> ( x e. _om -> -. suc x ~~ B ) )
81 80 expcom
 |-  ( B ~<_ x -> ( x e. _om -> ( x e. _om -> -. suc x ~~ B ) ) )
82 81 pm2.43d
 |-  ( B ~<_ x -> ( x e. _om -> -. suc x ~~ B ) )
83 51 82 syli
 |-  ( B C. suc x -> ( x e. _om -> -. suc x ~~ B ) )
84 83 com12
 |-  ( x e. _om -> ( B C. suc x -> -. suc x ~~ B ) )
85 psseq2
 |-  ( A = suc x -> ( B C. A <-> B C. suc x ) )
86 breq1
 |-  ( A = suc x -> ( A ~~ B <-> suc x ~~ B ) )
87 86 notbid
 |-  ( A = suc x -> ( -. A ~~ B <-> -. suc x ~~ B ) )
88 85 87 imbi12d
 |-  ( A = suc x -> ( ( B C. A -> -. A ~~ B ) <-> ( B C. suc x -> -. suc x ~~ B ) ) )
89 84 88 syl5ibrcom
 |-  ( x e. _om -> ( A = suc x -> ( B C. A -> -. A ~~ B ) ) )
90 89 rexlimiv
 |-  ( E. x e. _om A = suc x -> ( B C. A -> -. A ~~ B ) )
91 10 90 syl
 |-  ( ( A e. _om /\ B C. A ) -> ( B C. A -> -. A ~~ B ) )
92 91 syldbl2
 |-  ( ( A e. _om /\ B C. A ) -> -. A ~~ B )