Metamath Proof Explorer


Theorem xpdifid

Description: The set of distinct couples in a Cartesian product. (Contributed by Thierry Arnoux, 25-May-2019)

Ref Expression
Assertion xpdifid x A x × B x = A × B I

Proof

Step Hyp Ref Expression
1 elxp p x × B x i j p = i j i x j B x
2 1 rexbii x A p x × B x x A i j p = i j i x j B x
3 rexcom4 x A i j p = i j i x j B x i x A j p = i j i x j B x
4 rexcom4 x A j p = i j i x j B x j x A p = i j i x j B x
5 4 exbii i x A j p = i j i x j B x i j x A p = i j i x j B x
6 2 3 5 3bitri x A p x × B x i j x A p = i j i x j B x
7 eliun p x A x × B x x A p x × B x
8 eldif i j A × B I i j A × B ¬ i j I
9 opelxp i j A × B i A j B
10 df-br i I j i j I
11 vex j V
12 11 ideq i I j i = j
13 10 12 bitr3i i j I i = j
14 13 necon3bbii ¬ i j I i j
15 9 14 anbi12i i j A × B ¬ i j I i A j B i j
16 8 15 bitri i j A × B I i A j B i j
17 16 anbi2i p = i j i j A × B I p = i j i A j B i j
18 17 2exbii i j p = i j i j A × B I i j p = i j i A j B i j
19 eldifi p A × B I p A × B
20 elxpi p A × B i j p = i j i A j B
21 simpl p = i j i A j B p = i j
22 21 2eximi i j p = i j i A j B i j p = i j
23 19 20 22 3syl p A × B I i j p = i j
24 23 ancli p A × B I p A × B I i j p = i j
25 19.42vv i j p A × B I p = i j p A × B I i j p = i j
26 24 25 sylibr p A × B I i j p A × B I p = i j
27 ancom p A × B I p = i j p = i j p A × B I
28 eleq1 p = i j p A × B I i j A × B I
29 28 adantl p A × B I p = i j p A × B I i j A × B I
30 29 pm5.32da p A × B I p = i j p A × B I p = i j i j A × B I
31 27 30 bitrid p A × B I p A × B I p = i j p = i j i j A × B I
32 31 2exbidv p A × B I i j p A × B I p = i j i j p = i j i j A × B I
33 26 32 mpbid p A × B I i j p = i j i j A × B I
34 28 biimpar p = i j i j A × B I p A × B I
35 34 exlimivv i j p = i j i j A × B I p A × B I
36 33 35 impbii p A × B I i j p = i j i j A × B I
37 r19.42v x A p = i j i x j B x p = i j x A i x j B x
38 simprl y A i y j B y i y
39 velsn i y i = y
40 38 39 sylib y A i y j B y i = y
41 simpl y A i y j B y y A
42 40 41 eqeltrd y A i y j B y i A
43 simprr y A i y j B y j B y
44 43 eldifad y A i y j B y j B
45 43 eldifbd y A i y j B y ¬ j y
46 velsn j y j = y
47 46 necon3bbii ¬ j y j y
48 45 47 sylib y A i y j B y j y
49 48 necomd y A i y j B y y j
50 40 49 eqnetrd y A i y j B y i j
51 42 44 50 jca31 y A i y j B y i A j B i j
52 51 adantll x A i x j B x y A i y j B y i A j B i j
53 sneq x = y x = y
54 53 eleq2d x = y i x i y
55 53 difeq2d x = y B x = B y
56 55 eleq2d x = y j B x j B y
57 54 56 anbi12d x = y i x j B x i y j B y
58 57 cbvrexvw x A i x j B x y A i y j B y
59 58 biimpi x A i x j B x y A i y j B y
60 52 59 r19.29a x A i x j B x i A j B i j
61 simpll i A j B i j i A
62 vsnid i i
63 62 a1i i A j B i j i i
64 simplr i A j B i j j B
65 simpr i A j B i j i j
66 65 necomd i A j B i j j i
67 velsn j i j = i
68 67 necon3bbii ¬ j i j i
69 66 68 sylibr i A j B i j ¬ j i
70 64 69 eldifd i A j B i j j B i
71 sneq x = i x = i
72 71 eleq2d x = i i x i i
73 71 difeq2d x = i B x = B i
74 73 eleq2d x = i j B x j B i
75 72 74 anbi12d x = i i x j B x i i j B i
76 75 rspcev i A i i j B i x A i x j B x
77 61 63 70 76 syl12anc i A j B i j x A i x j B x
78 60 77 impbii x A i x j B x i A j B i j
79 78 anbi2i p = i j x A i x j B x p = i j i A j B i j
80 37 79 bitri x A p = i j i x j B x p = i j i A j B i j
81 80 2exbii i j x A p = i j i x j B x i j p = i j i A j B i j
82 18 36 81 3bitr4i p A × B I i j x A p = i j i x j B x
83 6 7 82 3bitr4i p x A x × B x p A × B I
84 83 eqriv x A x × B x = A × B I