Metamath Proof Explorer


Theorem djuunxp

Description: The union of a disjoint union and its inversion is the Cartesian product of an unordered pair and the union of the left and right classes of the disjoint unions. (Proposed by GL, 4-Jul-2022.) (Contributed by AV, 4-Jul-2022)

Ref Expression
Assertion djuunxp ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = ( { ∅ , 1o } × ( 𝐴𝐵 ) )

Proof

Step Hyp Ref Expression
1 djuss ( 𝐴𝐵 ) ⊆ ( { ∅ , 1o } × ( 𝐴𝐵 ) )
2 djuss ( 𝐵𝐴 ) ⊆ ( { ∅ , 1o } × ( 𝐵𝐴 ) )
3 uncom ( 𝐴𝐵 ) = ( 𝐵𝐴 )
4 3 xpeq2i ( { ∅ , 1o } × ( 𝐴𝐵 ) ) = ( { ∅ , 1o } × ( 𝐵𝐴 ) )
5 2 4 sseqtrri ( 𝐵𝐴 ) ⊆ ( { ∅ , 1o } × ( 𝐴𝐵 ) )
6 1 5 unssi ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ⊆ ( { ∅ , 1o } × ( 𝐴𝐵 ) )
7 elxpi ( 𝑥 ∈ ( { ∅ , 1o } × ( 𝐴𝐵 ) ) → ∃ 𝑦𝑧 ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ ∧ ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) ) )
8 vex 𝑦 ∈ V
9 8 elpr ( 𝑦 ∈ { ∅ , 1o } ↔ ( 𝑦 = ∅ ∨ 𝑦 = 1o ) )
10 elun ( 𝑧 ∈ ( 𝐴𝐵 ) ↔ ( 𝑧𝐴𝑧𝐵 ) )
11 velsn ( 𝑦 ∈ { ∅ } ↔ 𝑦 = ∅ )
12 11 biimpri ( 𝑦 = ∅ → 𝑦 ∈ { ∅ } )
13 12 anim1i ( ( 𝑦 = ∅ ∧ 𝑧𝐴 ) → ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐴 ) )
14 13 ancoms ( ( 𝑧𝐴𝑦 = ∅ ) → ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐴 ) )
15 opelxp ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐴 ) ↔ ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐴 ) )
16 14 15 sylibr ( ( 𝑧𝐴𝑦 = ∅ ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐴 ) )
17 16 orcd ( ( 𝑧𝐴𝑦 = ∅ ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐴 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐵 ) ) )
18 elun ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐴 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐵 ) ) )
19 17 18 sylibr ( ( 𝑧𝐴𝑦 = ∅ ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) )
20 19 orcd ( ( 𝑧𝐴𝑦 = ∅ ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
21 20 ex ( 𝑧𝐴 → ( 𝑦 = ∅ → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
22 12 anim1i ( ( 𝑦 = ∅ ∧ 𝑧𝐵 ) → ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐵 ) )
23 22 ancoms ( ( 𝑧𝐵𝑦 = ∅ ) → ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐵 ) )
24 opelxp ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ↔ ( 𝑦 ∈ { ∅ } ∧ 𝑧𝐵 ) )
25 23 24 sylibr ( ( 𝑧𝐵𝑦 = ∅ ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) )
26 25 orcd ( ( 𝑧𝐵𝑦 = ∅ ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) )
27 26 olcd ( ( 𝑧𝐵𝑦 = ∅ ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
28 27 ex ( 𝑧𝐵 → ( 𝑦 = ∅ → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
29 21 28 jaoi ( ( 𝑧𝐴𝑧𝐵 ) → ( 𝑦 = ∅ → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
30 29 com12 ( 𝑦 = ∅ → ( ( 𝑧𝐴𝑧𝐵 ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
31 velsn ( 𝑦 ∈ { 1o } ↔ 𝑦 = 1o )
32 31 biimpri ( 𝑦 = 1o𝑦 ∈ { 1o } )
33 32 anim1i ( ( 𝑦 = 1o𝑧𝐴 ) → ( 𝑦 ∈ { 1o } ∧ 𝑧𝐴 ) )
34 33 ancoms ( ( 𝑧𝐴𝑦 = 1o ) → ( 𝑦 ∈ { 1o } ∧ 𝑧𝐴 ) )
35 opelxp ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ↔ ( 𝑦 ∈ { 1o } ∧ 𝑧𝐴 ) )
36 34 35 sylibr ( ( 𝑧𝐴𝑦 = 1o ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) )
37 36 olcd ( ( 𝑧𝐴𝑦 = 1o ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) )
38 37 olcd ( ( 𝑧𝐴𝑦 = 1o ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
39 38 ex ( 𝑧𝐴 → ( 𝑦 = 1o → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
40 32 anim1i ( ( 𝑦 = 1o𝑧𝐵 ) → ( 𝑦 ∈ { 1o } ∧ 𝑧𝐵 ) )
41 40 ancoms ( ( 𝑧𝐵𝑦 = 1o ) → ( 𝑦 ∈ { 1o } ∧ 𝑧𝐵 ) )
42 opelxp ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐵 ) ↔ ( 𝑦 ∈ { 1o } ∧ 𝑧𝐵 ) )
43 41 42 sylibr ( ( 𝑧𝐵𝑦 = 1o ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐵 ) )
44 43 olcd ( ( 𝑧𝐵𝑦 = 1o ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐴 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐵 ) ) )
45 44 18 sylibr ( ( 𝑧𝐵𝑦 = 1o ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) )
46 45 orcd ( ( 𝑧𝐵𝑦 = 1o ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
47 46 ex ( 𝑧𝐵 → ( 𝑦 = 1o → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
48 39 47 jaoi ( ( 𝑧𝐴𝑧𝐵 ) → ( 𝑦 = 1o → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
49 48 com12 ( 𝑦 = 1o → ( ( 𝑧𝐴𝑧𝐵 ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
50 30 49 jaoi ( ( 𝑦 = ∅ ∨ 𝑦 = 1o ) → ( ( 𝑧𝐴𝑧𝐵 ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) ) )
51 50 imp ( ( ( 𝑦 = ∅ ∨ 𝑦 = 1o ) ∧ ( 𝑧𝐴𝑧𝐵 ) ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
52 9 10 51 syl2anb ( ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) → ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
53 elun ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐵𝐴 ) ) )
54 df-dju ( 𝐴𝐵 ) = ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) )
55 54 eleq2i ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ↔ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) )
56 df-dju ( 𝐵𝐴 ) = ( ( { ∅ } × 𝐵 ) ∪ ( { 1o } × 𝐴 ) )
57 56 eleq2i ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐵𝐴 ) ↔ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐵 ) ∪ ( { 1o } × 𝐴 ) ) )
58 elun ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐵 ) ∪ ( { 1o } × 𝐴 ) ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) )
59 57 58 bitri ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐵𝐴 ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) )
60 55 59 orbi12i ( ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐴𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( 𝐵𝐴 ) ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
61 53 60 bitri ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ↔ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( { ∅ } × 𝐴 ) ∪ ( { 1o } × 𝐵 ) ) ∨ ( ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { ∅ } × 𝐵 ) ∨ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( { 1o } × 𝐴 ) ) ) )
62 52 61 sylibr ( ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
63 62 adantl ( ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ ∧ ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) ) → ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
64 eleq1 ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ → ( 𝑥 ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ↔ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) )
65 64 adantr ( ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ ∧ ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) ) → ( 𝑥 ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ↔ ⟨ 𝑦 , 𝑧 ⟩ ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) ) )
66 63 65 mpbird ( ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ ∧ ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) ) → 𝑥 ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
67 66 exlimivv ( ∃ 𝑦𝑧 ( 𝑥 = ⟨ 𝑦 , 𝑧 ⟩ ∧ ( 𝑦 ∈ { ∅ , 1o } ∧ 𝑧 ∈ ( 𝐴𝐵 ) ) ) → 𝑥 ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
68 7 67 syl ( 𝑥 ∈ ( { ∅ , 1o } × ( 𝐴𝐵 ) ) → 𝑥 ∈ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) )
69 68 ssriv ( { ∅ , 1o } × ( 𝐴𝐵 ) ) ⊆ ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) )
70 6 69 eqssi ( ( 𝐴𝐵 ) ∪ ( 𝐵𝐴 ) ) = ( { ∅ , 1o } × ( 𝐴𝐵 ) )