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

Theorem hashle2pr 14417
Description: A nonempty set of size less than or equal to two is an unordered pair of sets. (Contributed by AV, 24-Nov-2021.)
Assertion
Ref Expression
hashle2pr ((𝑃𝑉𝑃 ≠ ∅) → ((♯‘𝑃) ≤ 2 ↔ ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
Distinct variable group:   𝑃,𝑎,𝑏
Allowed substitution hints:   𝑉(𝑎,𝑏)

Proof of Theorem hashle2pr
Dummy variable 𝑐 is distinct from all other variables.
StepHypRef Expression
1 hashxnn0 14278 . . . . . . 7 (𝑃𝑉 → (♯‘𝑃) ∈ ℕ0*)
2 xnn0le2is012 13204 . . . . . . 7 (((♯‘𝑃) ∈ ℕ0* ∧ (♯‘𝑃) ≤ 2) → ((♯‘𝑃) = 0 ∨ (♯‘𝑃) = 1 ∨ (♯‘𝑃) = 2))
31, 2sylan 580 . . . . . 6 ((𝑃𝑉 ∧ (♯‘𝑃) ≤ 2) → ((♯‘𝑃) = 0 ∨ (♯‘𝑃) = 1 ∨ (♯‘𝑃) = 2))
43ex 413 . . . . 5 (𝑃𝑉 → ((♯‘𝑃) ≤ 2 → ((♯‘𝑃) = 0 ∨ (♯‘𝑃) = 1 ∨ (♯‘𝑃) = 2)))
5 hasheq0 14302 . . . . . . . . 9 (𝑃𝑉 → ((♯‘𝑃) = 0 ↔ 𝑃 = ∅))
6 eqneqall 2950 . . . . . . . . 9 (𝑃 = ∅ → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
75, 6syl6bi 252 . . . . . . . 8 (𝑃𝑉 → ((♯‘𝑃) = 0 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
87com12 32 . . . . . . 7 ((♯‘𝑃) = 0 → (𝑃𝑉 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
9 hash1snb 14358 . . . . . . . . . . 11 (𝑃𝑉 → ((♯‘𝑃) = 1 ↔ ∃𝑐 𝑃 = {𝑐}))
10 vex 3474 . . . . . . . . . . . . 13 𝑐 ∈ V
11 preq12 4729 . . . . . . . . . . . . . . 15 ((𝑎 = 𝑐𝑏 = 𝑐) → {𝑎, 𝑏} = {𝑐, 𝑐})
12 dfsn2 4632 . . . . . . . . . . . . . . 15 {𝑐} = {𝑐, 𝑐}
1311, 12eqtr4di 2789 . . . . . . . . . . . . . 14 ((𝑎 = 𝑐𝑏 = 𝑐) → {𝑎, 𝑏} = {𝑐})
1413eqeq2d 2742 . . . . . . . . . . . . 13 ((𝑎 = 𝑐𝑏 = 𝑐) → (𝑃 = {𝑎, 𝑏} ↔ 𝑃 = {𝑐}))
1510, 10, 14spc2ev 3591 . . . . . . . . . . . 12 (𝑃 = {𝑐} → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})
1615exlimiv 1933 . . . . . . . . . . 11 (∃𝑐 𝑃 = {𝑐} → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})
179, 16syl6bi 252 . . . . . . . . . 10 (𝑃𝑉 → ((♯‘𝑃) = 1 → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
1817imp 407 . . . . . . . . 9 ((𝑃𝑉 ∧ (♯‘𝑃) = 1) → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})
1918a1d 25 . . . . . . . 8 ((𝑃𝑉 ∧ (♯‘𝑃) = 1) → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
2019expcom 414 . . . . . . 7 ((♯‘𝑃) = 1 → (𝑃𝑉 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
21 hash2pr 14409 . . . . . . . . 9 ((𝑃𝑉 ∧ (♯‘𝑃) = 2) → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})
2221a1d 25 . . . . . . . 8 ((𝑃𝑉 ∧ (♯‘𝑃) = 2) → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
2322expcom 414 . . . . . . 7 ((♯‘𝑃) = 2 → (𝑃𝑉 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
248, 20, 233jaoi 1427 . . . . . 6 (((♯‘𝑃) = 0 ∨ (♯‘𝑃) = 1 ∨ (♯‘𝑃) = 2) → (𝑃𝑉 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
2524com12 32 . . . . 5 (𝑃𝑉 → (((♯‘𝑃) = 0 ∨ (♯‘𝑃) = 1 ∨ (♯‘𝑃) = 2) → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
264, 25syld 47 . . . 4 (𝑃𝑉 → ((♯‘𝑃) ≤ 2 → (𝑃 ≠ ∅ → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
2726com23 86 . . 3 (𝑃𝑉 → (𝑃 ≠ ∅ → ((♯‘𝑃) ≤ 2 → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏})))
2827imp 407 . 2 ((𝑃𝑉𝑃 ≠ ∅) → ((♯‘𝑃) ≤ 2 → ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
29 fveq2 6875 . . . 4 (𝑃 = {𝑎, 𝑏} → (♯‘𝑃) = (♯‘{𝑎, 𝑏}))
30 hashprlei 14408 . . . . 5 ({𝑎, 𝑏} ∈ Fin ∧ (♯‘{𝑎, 𝑏}) ≤ 2)
3130simpri 486 . . . 4 (♯‘{𝑎, 𝑏}) ≤ 2
3229, 31eqbrtrdi 5177 . . 3 (𝑃 = {𝑎, 𝑏} → (♯‘𝑃) ≤ 2)
3332exlimivv 1935 . 2 (∃𝑎𝑏 𝑃 = {𝑎, 𝑏} → (♯‘𝑃) ≤ 2)
3428, 33impbid1 224 1 ((𝑃𝑉𝑃 ≠ ∅) → ((♯‘𝑃) ≤ 2 ↔ ∃𝑎𝑏 𝑃 = {𝑎, 𝑏}))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396  w3o 1086   = wceq 1541  wex 1781  wcel 2106  wne 2939  c0 4315  {csn 4619  {cpr 4621   class class class wbr 5138  cfv 6529  Fincfn 8919  0cc0 11089  1c1 11090  cle 11228  2c2 12246  0*cxnn0 12523  chash 14269
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2702  ax-sep 5289  ax-nul 5296  ax-pow 5353  ax-pr 5417  ax-un 7705  ax-cnex 11145  ax-resscn 11146  ax-1cn 11147  ax-icn 11148  ax-addcl 11149  ax-addrcl 11150  ax-mulcl 11151  ax-mulrcl 11152  ax-mulcom 11153  ax-addass 11154  ax-mulass 11155  ax-distr 11156  ax-i2m1 11157  ax-1ne0 11158  ax-1rid 11159  ax-rnegex 11160  ax-rrecex 11161  ax-cnre 11162  ax-pre-lttri 11163  ax-pre-lttrn 11164  ax-pre-ltadd 11165  ax-pre-mulgt0 11166
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-reu 3376  df-rab 3430  df-v 3472  df-sbc 3771  df-csb 3887  df-dif 3944  df-un 3946  df-in 3948  df-ss 3958  df-pss 3960  df-nul 4316  df-if 4520  df-pw 4595  df-sn 4620  df-pr 4622  df-op 4626  df-uni 4899  df-int 4941  df-iun 4989  df-br 5139  df-opab 5201  df-mpt 5222  df-tr 5256  df-id 5564  df-eprel 5570  df-po 5578  df-so 5579  df-fr 5621  df-we 5623  df-xp 5672  df-rel 5673  df-cnv 5674  df-co 5675  df-dm 5676  df-rn 5677  df-res 5678  df-ima 5679  df-pred 6286  df-ord 6353  df-on 6354  df-lim 6355  df-suc 6356  df-iota 6481  df-fun 6531  df-fn 6532  df-f 6533  df-f1 6534  df-fo 6535  df-f1o 6536  df-fv 6537  df-riota 7346  df-ov 7393  df-oprab 7394  df-mpo 7395  df-om 7836  df-1st 7954  df-2nd 7955  df-frecs 8245  df-wrecs 8276  df-recs 8350  df-rdg 8389  df-1o 8445  df-2o 8446  df-oadd 8449  df-er 8683  df-en 8920  df-dom 8921  df-sdom 8922  df-fin 8923  df-dju 9875  df-card 9913  df-pnf 11229  df-mnf 11230  df-xr 11231  df-ltxr 11232  df-le 11233  df-sub 11425  df-neg 11426  df-nn 12192  df-2 12254  df-n0 12452  df-xnn0 12524  df-z 12538  df-uz 12802  df-fz 13464  df-hash 14270
This theorem is referenced by:  hashle2prv  14418
  Copyright terms: Public domain W3C validator