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

Theorem dfsup2 8506
Description: Quantifier free definition of supremum. (Contributed by Scott Fenton, 19-Feb-2013.)
Assertion
Ref Expression
dfsup2 sup(𝐵, 𝐴, 𝑅) = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))

Proof of Theorem dfsup2
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-sup 8504 . 2 sup(𝐵, 𝐴, 𝑅) = {𝑥𝐴 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))}
2 dfrab3 4050 . . . 4 {𝑥𝐴 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))} = (𝐴 ∩ {𝑥 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))})
3 abeq1 2882 . . . . . . 7 ({𝑥 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))} = (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))) ↔ ∀𝑥((∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧)) ↔ 𝑥 ∈ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))))
4 vex 3354 . . . . . . . . 9 𝑥 ∈ V
5 eldif 3733 . . . . . . . . 9 (𝑥 ∈ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))) ↔ (𝑥 ∈ V ∧ ¬ 𝑥 ∈ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))))
64, 5mpbiran 688 . . . . . . . 8 (𝑥 ∈ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))) ↔ ¬ 𝑥 ∈ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
74elima 5612 . . . . . . . . . . . 12 (𝑥 ∈ (𝑅𝐵) ↔ ∃𝑦𝐵 𝑦𝑅𝑥)
8 dfrex2 3144 . . . . . . . . . . . 12 (∃𝑦𝐵 𝑦𝑅𝑥 ↔ ¬ ∀𝑦𝐵 ¬ 𝑦𝑅𝑥)
97, 8bitri 264 . . . . . . . . . . 11 (𝑥 ∈ (𝑅𝐵) ↔ ¬ ∀𝑦𝐵 ¬ 𝑦𝑅𝑥)
104elima 5612 . . . . . . . . . . . 12 (𝑥 ∈ (𝑅 “ (𝐴 ∖ (𝑅𝐵))) ↔ ∃𝑦 ∈ (𝐴 ∖ (𝑅𝐵))𝑦𝑅𝑥)
11 dfrex2 3144 . . . . . . . . . . . 12 (∃𝑦 ∈ (𝐴 ∖ (𝑅𝐵))𝑦𝑅𝑥 ↔ ¬ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥)
1210, 11bitri 264 . . . . . . . . . . 11 (𝑥 ∈ (𝑅 “ (𝐴 ∖ (𝑅𝐵))) ↔ ¬ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥)
139, 12orbi12i 898 . . . . . . . . . 10 ((𝑥 ∈ (𝑅𝐵) ∨ 𝑥 ∈ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))) ↔ (¬ ∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∨ ¬ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥))
14 elun 3904 . . . . . . . . . 10 (𝑥 ∈ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))) ↔ (𝑥 ∈ (𝑅𝐵) ∨ 𝑥 ∈ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
15 ianor 962 . . . . . . . . . 10 (¬ (∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∧ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥) ↔ (¬ ∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∨ ¬ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥))
1613, 14, 153bitr4i 292 . . . . . . . . 9 (𝑥 ∈ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))) ↔ ¬ (∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∧ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥))
1716con2bii 346 . . . . . . . 8 ((∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∧ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥) ↔ ¬ 𝑥 ∈ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
18 vex 3354 . . . . . . . . . . . 12 𝑦 ∈ V
1918, 4brcnv 5443 . . . . . . . . . . 11 (𝑦𝑅𝑥𝑥𝑅𝑦)
2019notbii 309 . . . . . . . . . 10 𝑦𝑅𝑥 ↔ ¬ 𝑥𝑅𝑦)
2120ralbii 3129 . . . . . . . . 9 (∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ↔ ∀𝑦𝐵 ¬ 𝑥𝑅𝑦)
22 impexp 437 . . . . . . . . . . 11 (((𝑦𝐴 ∧ ¬ 𝑦 ∈ (𝑅𝐵)) → ¬ 𝑦𝑅𝑥) ↔ (𝑦𝐴 → (¬ 𝑦 ∈ (𝑅𝐵) → ¬ 𝑦𝑅𝑥)))
23 eldif 3733 . . . . . . . . . . . 12 (𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ↔ (𝑦𝐴 ∧ ¬ 𝑦 ∈ (𝑅𝐵)))
2423imbi1i 338 . . . . . . . . . . 11 ((𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) → ¬ 𝑦𝑅𝑥) ↔ ((𝑦𝐴 ∧ ¬ 𝑦 ∈ (𝑅𝐵)) → ¬ 𝑦𝑅𝑥))
2518elima 5612 . . . . . . . . . . . . . . 15 (𝑦 ∈ (𝑅𝐵) ↔ ∃𝑧𝐵 𝑧𝑅𝑦)
26 vex 3354 . . . . . . . . . . . . . . . . 17 𝑧 ∈ V
2726, 18brcnv 5443 . . . . . . . . . . . . . . . 16 (𝑧𝑅𝑦𝑦𝑅𝑧)
2827rexbii 3189 . . . . . . . . . . . . . . 15 (∃𝑧𝐵 𝑧𝑅𝑦 ↔ ∃𝑧𝐵 𝑦𝑅𝑧)
2925, 28bitri 264 . . . . . . . . . . . . . 14 (𝑦 ∈ (𝑅𝐵) ↔ ∃𝑧𝐵 𝑦𝑅𝑧)
3029imbi2i 325 . . . . . . . . . . . . 13 ((𝑦𝑅𝑥𝑦 ∈ (𝑅𝐵)) ↔ (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))
31 con34b 305 . . . . . . . . . . . . 13 ((𝑦𝑅𝑥𝑦 ∈ (𝑅𝐵)) ↔ (¬ 𝑦 ∈ (𝑅𝐵) → ¬ 𝑦𝑅𝑥))
3230, 31bitr3i 266 . . . . . . . . . . . 12 ((𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧) ↔ (¬ 𝑦 ∈ (𝑅𝐵) → ¬ 𝑦𝑅𝑥))
3332imbi2i 325 . . . . . . . . . . 11 ((𝑦𝐴 → (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧)) ↔ (𝑦𝐴 → (¬ 𝑦 ∈ (𝑅𝐵) → ¬ 𝑦𝑅𝑥)))
3422, 24, 333bitr4i 292 . . . . . . . . . 10 ((𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) → ¬ 𝑦𝑅𝑥) ↔ (𝑦𝐴 → (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧)))
3534ralbii2 3127 . . . . . . . . 9 (∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥 ↔ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))
3621, 35anbi12i 612 . . . . . . . 8 ((∀𝑦𝐵 ¬ 𝑦𝑅𝑥 ∧ ∀𝑦 ∈ (𝐴 ∖ (𝑅𝐵)) ¬ 𝑦𝑅𝑥) ↔ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧)))
376, 17, 363bitr2ri 289 . . . . . . 7 ((∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧)) ↔ 𝑥 ∈ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))))
383, 37mpgbir 1874 . . . . . 6 {𝑥 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))} = (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
3938ineq2i 3962 . . . . 5 (𝐴 ∩ {𝑥 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))}) = (𝐴 ∩ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵))))))
40 invdif 4017 . . . . 5 (𝐴 ∩ (V ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))) = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
4139, 40eqtri 2793 . . . 4 (𝐴 ∩ {𝑥 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))}) = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
422, 41eqtri 2793 . . 3 {𝑥𝐴 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))} = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
4342unieqi 4583 . 2 {𝑥𝐴 ∣ (∀𝑦𝐵 ¬ 𝑥𝑅𝑦 ∧ ∀𝑦𝐴 (𝑦𝑅𝑥 → ∃𝑧𝐵 𝑦𝑅𝑧))} = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
441, 43eqtri 2793 1 sup(𝐵, 𝐴, 𝑅) = (𝐴 ∖ ((𝑅𝐵) ∪ (𝑅 “ (𝐴 ∖ (𝑅𝐵)))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 382  wo 834   = wceq 1631  wcel 2145  {cab 2757  wral 3061  wrex 3062  {crab 3065  Vcvv 3351  cdif 3720  cun 3721  cin 3722   cuni 4574   class class class wbr 4786  ccnv 5248  cima 5252  supcsup 8502
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-sep 4915  ax-nul 4923  ax-pr 5034
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 835  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ral 3066  df-rex 3067  df-rab 3070  df-v 3353  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-nul 4064  df-if 4226  df-sn 4317  df-pr 4319  df-op 4323  df-uni 4575  df-br 4787  df-opab 4847  df-xp 5255  df-cnv 5257  df-dm 5259  df-rn 5260  df-res 5261  df-ima 5262  df-sup 8504
This theorem is referenced by:  nfsup  8513
  Copyright terms: Public domain W3C validator