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

Theorem dif1en 8907
Description: If a set 𝐴 is equinumerous to the successor of a natural number 𝑀, then 𝐴 with an element removed is equinumerous to 𝑀. For a proof with fewer symbols using ax-pow 5283, see dif1enALT 8980. (Contributed by Jeff Madsen, 2-Sep-2009.) (Revised by Stefan O'Rear, 16-Aug-2015.) Avoid ax-pow 5283. (Revised by BTernaryTau, 26-Aug-2024.)
Assertion
Ref Expression
dif1en ((𝑀 ∈ ω ∧ 𝐴 ≈ suc 𝑀𝑋𝐴) → (𝐴 ∖ {𝑋}) ≈ 𝑀)

Proof of Theorem dif1en
Dummy variable 𝑓 is distinct from all other variables.
StepHypRef Expression
1 bren 8701 . . 3 (𝐴 ≈ suc 𝑀 ↔ ∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀)
2 19.41v 1954 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
3 3anass 1093 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
43exbii 1851 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ ∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
5 3anass 1093 . . . . 5 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
62, 4, 53bitr4i 302 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω))
7 sucidg 6329 . . . . . . . . 9 (𝑀 ∈ ω → 𝑀 ∈ suc 𝑀)
8 f1ocnvdm 7137 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
983adant2 1129 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
10 f1ofvswap 7158 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴 ∧ (𝑓𝑀) ∈ 𝐴) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
119, 10syld3an3 1407 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
12 f1ocnvfv2 7130 . . . . . . . . . . . . . . . . 17 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓‘(𝑓𝑀)) = 𝑀)
1312opeq2d 4808 . . . . . . . . . . . . . . . 16 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ⟨𝑋, (𝑓‘(𝑓𝑀))⟩ = ⟨𝑋, 𝑀⟩)
1413preq1d 4672 . . . . . . . . . . . . . . 15 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} = {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
1514uneq2d 4093 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) = ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
1615f1oeq1d 6695 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
17163adant2 1129 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
1811, 17mpbid 231 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
19 f1ofun 6702 . . . . . . . . . . 11 (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 → Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
20 opex 5373 . . . . . . . . . . . . . 14 𝑋, 𝑀⟩ ∈ V
2120prid1 4695 . . . . . . . . . . . . 13 𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}
22 elun2 4107 . . . . . . . . . . . . 13 (⟨𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} → ⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
2321, 22ax-mp 5 . . . . . . . . . . . 12 𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
24 funopfv 6803 . . . . . . . . . . . 12 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀))
2523, 24mpi 20 . . . . . . . . . . 11 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
2618, 19, 253syl 18 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
27 simp2 1135 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → 𝑋𝐴)
28 f1ocnvfv 7131 . . . . . . . . . . 11 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀𝑋𝐴) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
2918, 27, 28syl2anc 583 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
3026, 29mpd 15 . . . . . . . . 9 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
317, 30syl3an3 1163 . . . . . . . 8 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
3231sneqd 4570 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)} = {𝑋})
3332difeq2d 4053 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) = (𝐴 ∖ {𝑋}))
34 vex 3426 . . . . . . . . 9 𝑓 ∈ V
3534resex 5928 . . . . . . . 8 (𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∈ V
36 prex 5350 . . . . . . . 8 {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} ∈ V
3735, 36unex 7574 . . . . . . 7 ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V
38 simp3 1136 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → 𝑀 ∈ ω)
397, 18syl3an3 1163 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
40 dif1enlem 8905 . . . . . . 7 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V ∧ 𝑀 ∈ ω ∧ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4137, 38, 39, 40mp3an2i 1464 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4233, 41eqbrtrrd 5094 . . . . 5 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
4342exlimiv 1934 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
446, 43sylbir 234 . . 3 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
451, 44syl3an1b 1401 . 2 ((𝐴 ≈ suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
46453comr 1123 1 ((𝑀 ∈ ω ∧ 𝐴 ≈ suc 𝑀𝑋𝐴) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wex 1783  wcel 2108  Vcvv 3422  cdif 3880  cun 3881  {csn 4558  {cpr 4560  cop 4564   class class class wbr 5070  ccnv 5579  cres 5582  suc csuc 6253  Fun wfun 6412  1-1-ontowf1o 6417  cfv 6418  ωcom 7687  cen 8688
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pr 5347  ax-un 7566
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-op 4565  df-uni 4837  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-ord 6254  df-on 6255  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-om 7688  df-en 8692
This theorem is referenced by:  findcard  8908  enp1i  8982  findcard2OLD  8986  en2eleq  9695  en2other2  9696  mreexexlem4d  17273  f1otrspeq  18970  pmtrf  18978  pmtrmvd  18979  pmtrfinv  18984
  Copyright terms: Public domain W3C validator