Metamath Proof Explorer


Theorem relop

Description: A necessary and sufficient condition for a Kuratowski ordered pair to be a relation. (Contributed by NM, 3-Jun-2008) A relation is a class of ordered pairs, so the fact that an ordered pair may sometimes be itself a relation is an "accident" depending on the specific encoding of ordered pairs as classes (in set.mm, the Kuratowski encoding). A more meaningful statement is relsnopg , as funsng is to funop . (New usage is discouraged.)

Ref Expression
Hypotheses relop.1 A V
relop.2 B V
Assertion relop Rel A B x y A = x B = x y

Proof

Step Hyp Ref Expression
1 relop.1 A V
2 relop.2 B V
3 df-rel Rel A B A B V × V
4 dfss2 A B V × V z z A B z V × V
5 1 2 elop z A B z = A z = A B
6 elvv z V × V x y z = x y
7 5 6 imbi12i z A B z V × V z = A z = A B x y z = x y
8 jaob z = A z = A B x y z = x y z = A x y z = x y z = A B x y z = x y
9 7 8 bitri z A B z V × V z = A x y z = x y z = A B x y z = x y
10 9 albii z z A B z V × V z z = A x y z = x y z = A B x y z = x y
11 19.26 z z = A x y z = x y z = A B x y z = x y z z = A x y z = x y z z = A B x y z = x y
12 10 11 bitri z z A B z V × V z z = A x y z = x y z z = A B x y z = x y
13 4 12 bitri A B V × V z z = A x y z = x y z z = A B x y z = x y
14 snex A V
15 eqeq1 z = A z = A A = A
16 eqeq1 z = A z = x y A = x y
17 eqcom A = x y x y = A
18 vex x V
19 vex y V
20 18 19 opeqsn x y = A x = y A = x
21 17 20 bitri A = x y x = y A = x
22 16 21 bitrdi z = A z = x y x = y A = x
23 22 2exbidv z = A x y z = x y x y x = y A = x
24 15 23 imbi12d z = A z = A x y z = x y A = A x y x = y A = x
25 14 24 spcv z z = A x y z = x y A = A x y x = y A = x
26 sneq w = x w = x
27 26 eqeq2d w = x A = w A = x
28 27 cbvexvw w A = w x A = x
29 ax6evr y x = y
30 19.41v y x = y A = x y x = y A = x
31 29 30 mpbiran y x = y A = x A = x
32 31 exbii x y x = y A = x x A = x
33 eqid A = A
34 33 a1bi x y x = y A = x A = A x y x = y A = x
35 28 32 34 3bitr2ri A = A x y x = y A = x w A = w
36 25 35 sylib z z = A x y z = x y w A = w
37 eqid A B = A B
38 prex A B V
39 eqeq1 z = A B z = A B A B = A B
40 eqeq1 z = A B z = x y A B = x y
41 40 2exbidv z = A B x y z = x y x y A B = x y
42 39 41 imbi12d z = A B z = A B x y z = x y A B = A B x y A B = x y
43 38 42 spcv z z = A B x y z = x y A B = A B x y A B = x y
44 37 43 mpi z z = A B x y z = x y x y A B = x y
45 eqcom A B = x y x y = A B
46 18 19 1 2 opeqpr x y = A B A = x B = x y A = x y B = x
47 45 46 bitri A B = x y A = x B = x y A = x y B = x
48 idd A = w A = x B = x y A = x B = x y
49 eqtr2 A = x y A = w x y = w
50 18 19 preqsn x y = w x = y y = w
51 50 simplbi x y = w x = y
52 49 51 syl A = x y A = w x = y
53 dfsn2 x = x x
54 preq2 x = y x x = x y
55 53 54 eqtr2id x = y x y = x
56 55 eqeq2d x = y A = x y A = x
57 53 54 eqtrid x = y x = x y
58 57 eqeq2d x = y B = x B = x y
59 56 58 anbi12d x = y A = x y B = x A = x B = x y
60 59 biimpd x = y A = x y B = x A = x B = x y
61 60 expd x = y A = x y B = x A = x B = x y
62 61 com12 A = x y x = y B = x A = x B = x y
63 62 adantr A = x y A = w x = y B = x A = x B = x y
64 52 63 mpd A = x y A = w B = x A = x B = x y
65 64 expcom A = w A = x y B = x A = x B = x y
66 65 impd A = w A = x y B = x A = x B = x y
67 48 66 jaod A = w A = x B = x y A = x y B = x A = x B = x y
68 47 67 syl5bi A = w A B = x y A = x B = x y
69 68 2eximdv A = w x y A B = x y x y A = x B = x y
70 69 exlimiv w A = w x y A B = x y x y A = x B = x y
71 70 imp w A = w x y A B = x y x y A = x B = x y
72 36 44 71 syl2an z z = A x y z = x y z z = A B x y z = x y x y A = x B = x y
73 13 72 sylbi A B V × V x y A = x B = x y
74 simpr A = x z = A z = A
75 equid x = x
76 75 jctl A = x x = x A = x
77 18 18 opeqsn x x = A x = x A = x
78 76 77 sylibr A = x x x = A
79 78 adantr A = x z = A x x = A
80 74 79 eqtr4d A = x z = A z = x x
81 opeq12 w = x v = x w v = x x
82 81 eqeq2d w = x v = x z = w v z = x x
83 18 18 82 spc2ev z = x x w v z = w v
84 80 83 syl A = x z = A w v z = w v
85 84 adantlr A = x B = x y z = A w v z = w v
86 preq12 A = x B = x y A B = x x y
87 86 eqeq2d A = x B = x y z = A B z = x x y
88 87 biimpa A = x B = x y z = A B z = x x y
89 18 19 dfop x y = x x y
90 88 89 eqtr4di A = x B = x y z = A B z = x y
91 opeq12 w = x v = y w v = x y
92 91 eqeq2d w = x v = y z = w v z = x y
93 18 19 92 spc2ev z = x y w v z = w v
94 90 93 syl A = x B = x y z = A B w v z = w v
95 85 94 jaodan A = x B = x y z = A z = A B w v z = w v
96 95 ex A = x B = x y z = A z = A B w v z = w v
97 elvv z V × V w v z = w v
98 96 5 97 3imtr4g A = x B = x y z A B z V × V
99 98 ssrdv A = x B = x y A B V × V
100 99 exlimivv x y A = x B = x y A B V × V
101 73 100 impbii A B V × V x y A = x B = x y
102 3 101 bitri Rel A B x y A = x B = x y