Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  prel12g Structured version   Visualization version   GIF version

Theorem prel12g 4360
 Description: Closed form of prel12 4356. (Contributed by AV, 9-Dec-2018.)
Assertion
Ref Expression
prel12g (((𝐴𝑉𝐵𝑊) ∧ (𝐶𝑋𝐷𝑌)) → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷}))))

Proof of Theorem prel12g
Dummy variables 𝑥 𝑦 𝑧 𝑤 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 eqeq1 2625 . . . . . . 7 (𝑥 = 𝐴 → (𝑥 = 𝑦𝐴 = 𝑦))
21notbid 308 . . . . . 6 (𝑥 = 𝐴 → (¬ 𝑥 = 𝑦 ↔ ¬ 𝐴 = 𝑦))
3 preq1 4243 . . . . . . . 8 (𝑥 = 𝐴 → {𝑥, 𝑦} = {𝐴, 𝑦})
43eqeq1d 2623 . . . . . . 7 (𝑥 = 𝐴 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ {𝐴, 𝑦} = {𝑧, 𝐷}))
5 eleq1 2686 . . . . . . . 8 (𝑥 = 𝐴 → (𝑥 ∈ {𝑧, 𝐷} ↔ 𝐴 ∈ {𝑧, 𝐷}))
65anbi1d 740 . . . . . . 7 (𝑥 = 𝐴 → ((𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}) ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))
74, 6bibi12d 335 . . . . . 6 (𝑥 = 𝐴 → (({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})) ↔ ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))))
82, 7imbi12d 334 . . . . 5 (𝑥 = 𝐴 → ((¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))) ↔ (¬ 𝐴 = 𝑦 → ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))))
98imbi2d 330 . . . 4 (𝑥 = 𝐴 → ((𝐷𝑌 → (¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))) ↔ (𝐷𝑌 → (¬ 𝐴 = 𝑦 → ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))))))
10 eqeq2 2632 . . . . . . 7 (𝑦 = 𝐵 → (𝐴 = 𝑦𝐴 = 𝐵))
1110notbid 308 . . . . . 6 (𝑦 = 𝐵 → (¬ 𝐴 = 𝑦 ↔ ¬ 𝐴 = 𝐵))
12 preq2 4244 . . . . . . . 8 (𝑦 = 𝐵 → {𝐴, 𝑦} = {𝐴, 𝐵})
1312eqeq1d 2623 . . . . . . 7 (𝑦 = 𝐵 → ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ {𝐴, 𝐵} = {𝑧, 𝐷}))
14 eleq1 2686 . . . . . . . 8 (𝑦 = 𝐵 → (𝑦 ∈ {𝑧, 𝐷} ↔ 𝐵 ∈ {𝑧, 𝐷}))
1514anbi2d 739 . . . . . . 7 (𝑦 = 𝐵 → ((𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}) ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷})))
1613, 15bibi12d 335 . . . . . 6 (𝑦 = 𝐵 → (({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})) ↔ ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷}))))
1711, 16imbi12d 334 . . . . 5 (𝑦 = 𝐵 → ((¬ 𝐴 = 𝑦 → ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))) ↔ (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷})))))
1817imbi2d 330 . . . 4 (𝑦 = 𝐵 → ((𝐷𝑌 → (¬ 𝐴 = 𝑦 → ({𝐴, 𝑦} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))) ↔ (𝐷𝑌 → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷}))))))
19 preq1 4243 . . . . . . . 8 (𝑧 = 𝐶 → {𝑧, 𝐷} = {𝐶, 𝐷})
2019eqeq2d 2631 . . . . . . 7 (𝑧 = 𝐶 → ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ {𝐴, 𝐵} = {𝐶, 𝐷}))
2119eleq2d 2684 . . . . . . . 8 (𝑧 = 𝐶 → (𝐴 ∈ {𝑧, 𝐷} ↔ 𝐴 ∈ {𝐶, 𝐷}))
2219eleq2d 2684 . . . . . . . 8 (𝑧 = 𝐶 → (𝐵 ∈ {𝑧, 𝐷} ↔ 𝐵 ∈ {𝐶, 𝐷}))
2321, 22anbi12d 746 . . . . . . 7 (𝑧 = 𝐶 → ((𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷}) ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷})))
2420, 23bibi12d 335 . . . . . 6 (𝑧 = 𝐶 → (({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷})) ↔ ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷}))))
2524imbi2d 330 . . . . 5 (𝑧 = 𝐶 → ((¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷}))) ↔ (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷})))))
2625imbi2d 330 . . . 4 (𝑧 = 𝐶 → ((𝐷𝑌 → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝑧, 𝐷} ↔ (𝐴 ∈ {𝑧, 𝐷} ∧ 𝐵 ∈ {𝑧, 𝐷})))) ↔ (𝐷𝑌 → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷}))))))
27 preq2 4244 . . . . . . . . 9 (𝑤 = 𝐷 → {𝑧, 𝑤} = {𝑧, 𝐷})
2827eqeq2d 2631 . . . . . . . 8 (𝑤 = 𝐷 → ({𝑥, 𝑦} = {𝑧, 𝑤} ↔ {𝑥, 𝑦} = {𝑧, 𝐷}))
2927eleq2d 2684 . . . . . . . . 9 (𝑤 = 𝐷 → (𝑥 ∈ {𝑧, 𝑤} ↔ 𝑥 ∈ {𝑧, 𝐷}))
3027eleq2d 2684 . . . . . . . . 9 (𝑤 = 𝐷 → (𝑦 ∈ {𝑧, 𝑤} ↔ 𝑦 ∈ {𝑧, 𝐷}))
3129, 30anbi12d 746 . . . . . . . 8 (𝑤 = 𝐷 → ((𝑥 ∈ {𝑧, 𝑤} ∧ 𝑦 ∈ {𝑧, 𝑤}) ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))
3228, 31bibi12d 335 . . . . . . 7 (𝑤 = 𝐷 → (({𝑥, 𝑦} = {𝑧, 𝑤} ↔ (𝑥 ∈ {𝑧, 𝑤} ∧ 𝑦 ∈ {𝑧, 𝑤})) ↔ ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))))
3332imbi2d 330 . . . . . 6 (𝑤 = 𝐷 → ((¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝑤} ↔ (𝑥 ∈ {𝑧, 𝑤} ∧ 𝑦 ∈ {𝑧, 𝑤}))) ↔ (¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))))
34 vex 3192 . . . . . . 7 𝑥 ∈ V
35 vex 3192 . . . . . . 7 𝑦 ∈ V
36 vex 3192 . . . . . . 7 𝑧 ∈ V
37 vex 3192 . . . . . . 7 𝑤 ∈ V
3834, 35, 36, 37prel12 4356 . . . . . 6 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝑤} ↔ (𝑥 ∈ {𝑧, 𝑤} ∧ 𝑦 ∈ {𝑧, 𝑤})))
3933, 38vtoclg 3255 . . . . 5 (𝐷𝑌 → (¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷}))))
4039a1i 11 . . . 4 ((𝑥𝑉𝑦𝑊𝑧𝑋) → (𝐷𝑌 → (¬ 𝑥 = 𝑦 → ({𝑥, 𝑦} = {𝑧, 𝐷} ↔ (𝑥 ∈ {𝑧, 𝐷} ∧ 𝑦 ∈ {𝑧, 𝐷})))))
419, 18, 26, 40vtocl3ga 3265 . . 3 ((𝐴𝑉𝐵𝑊𝐶𝑋) → (𝐷𝑌 → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷})))))
42413expa 1262 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐶𝑋) → (𝐷𝑌 → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷})))))
4342impr 648 1 (((𝐴𝑉𝐵𝑊) ∧ (𝐶𝑋𝐷𝑌)) → (¬ 𝐴 = 𝐵 → ({𝐴, 𝐵} = {𝐶, 𝐷} ↔ (𝐴 ∈ {𝐶, 𝐷} ∧ 𝐵 ∈ {𝐶, 𝐷}))))
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ↔ wb 196   ∧ wa 384   ∧ w3a 1036   = wceq 1480   ∈ wcel 1987  {cpr 4155 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601 This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-v 3191  df-un 3564  df-sn 4154  df-pr 4156 This theorem is referenced by:  hash2prd  13203
 Copyright terms: Public domain W3C validator