Metamath Proof Explorer


Theorem fphpd

Description: Pigeonhole principle expressed with implicit substitution. If the range is smaller than the domain, two inputs must be mapped to the same output. (Contributed by Stefan O'Rear, 19-Oct-2014) (Revised by Stefan O'Rear, 6-May-2015)

Ref Expression
Hypotheses fphpd.a φ B A
fphpd.b φ x A C B
fphpd.c x = y C = D
Assertion fphpd φ x A y A x y C = D

Proof

Step Hyp Ref Expression
1 fphpd.a φ B A
2 fphpd.b φ x A C B
3 fphpd.c x = y C = D
4 domnsym A B ¬ B A
5 4 1 nsyl3 φ ¬ A B
6 relsdom Rel
7 6 brrelex1i B A B V
8 1 7 syl φ B V
9 8 adantr φ x A y A C = D x = y B V
10 nfv x φ a A
11 nfcsb1v _ x a / x C
12 11 nfel1 x a / x C B
13 10 12 nfim x φ a A a / x C B
14 eleq1w x = a x A a A
15 14 anbi2d x = a φ x A φ a A
16 csbeq1a x = a C = a / x C
17 16 eleq1d x = a C B a / x C B
18 15 17 imbi12d x = a φ x A C B φ a A a / x C B
19 13 18 2 chvarfv φ a A a / x C B
20 19 ex φ a A a / x C B
21 20 adantr φ x A y A C = D x = y a A a / x C B
22 csbid x / x C = C
23 vex y V
24 23 3 csbie y / x C = D
25 22 24 eqeq12i x / x C = y / x C C = D
26 25 imbi1i x / x C = y / x C x = y C = D x = y
27 26 2ralbii x A y A x / x C = y / x C x = y x A y A C = D x = y
28 nfcsb1v _ x y / x C
29 11 28 nfeq x a / x C = y / x C
30 nfv x a = y
31 29 30 nfim x a / x C = y / x C a = y
32 nfv y a / x C = b / x C a = b
33 csbeq1 x = a x / x C = a / x C
34 33 eqeq1d x = a x / x C = y / x C a / x C = y / x C
35 equequ1 x = a x = y a = y
36 34 35 imbi12d x = a x / x C = y / x C x = y a / x C = y / x C a = y
37 csbeq1 y = b y / x C = b / x C
38 37 eqeq2d y = b a / x C = y / x C a / x C = b / x C
39 equequ2 y = b a = y a = b
40 38 39 imbi12d y = b a / x C = y / x C a = y a / x C = b / x C a = b
41 31 32 36 40 rspc2 a A b A x A y A x / x C = y / x C x = y a / x C = b / x C a = b
42 41 com12 x A y A x / x C = y / x C x = y a A b A a / x C = b / x C a = b
43 27 42 sylbir x A y A C = D x = y a A b A a / x C = b / x C a = b
44 id a / x C = b / x C a = b a / x C = b / x C a = b
45 csbeq1 a = b a / x C = b / x C
46 44 45 impbid1 a / x C = b / x C a = b a / x C = b / x C a = b
47 43 46 syl6 x A y A C = D x = y a A b A a / x C = b / x C a = b
48 47 adantl φ x A y A C = D x = y a A b A a / x C = b / x C a = b
49 21 48 dom2d φ x A y A C = D x = y B V A B
50 9 49 mpd φ x A y A C = D x = y A B
51 5 50 mtand φ ¬ x A y A C = D x = y
52 ancom ¬ x = y C = D C = D ¬ x = y
53 df-ne x y ¬ x = y
54 53 anbi1i x y C = D ¬ x = y C = D
55 pm4.61 ¬ C = D x = y C = D ¬ x = y
56 52 54 55 3bitr4i x y C = D ¬ C = D x = y
57 56 rexbii y A x y C = D y A ¬ C = D x = y
58 rexnal y A ¬ C = D x = y ¬ y A C = D x = y
59 57 58 bitri y A x y C = D ¬ y A C = D x = y
60 59 rexbii x A y A x y C = D x A ¬ y A C = D x = y
61 rexnal x A ¬ y A C = D x = y ¬ x A y A C = D x = y
62 60 61 bitri x A y A x y C = D ¬ x A y A C = D x = y
63 51 62 sylibr φ x A y A x y C = D