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

Theorem dif1en 8979
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 5297, see dif1enALT 9090. (Contributed by Jeff Madsen, 2-Sep-2009.) (Revised by Stefan O'Rear, 16-Aug-2015.) Avoid ax-pow 5297. (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 8770 . . 3 (𝐴 ≈ suc 𝑀 ↔ ∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀)
2 19.41v 1951 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
3 3anass 1095 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
43exbii 1848 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ ∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
5 3anass 1095 . . . . 5 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
62, 4, 53bitr4i 304 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω))
7 sucidg 6357 . . . . . . . . 9 (𝑀 ∈ ω → 𝑀 ∈ suc 𝑀)
8 f1ocnvdm 7185 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
983adant2 1131 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
10 f1ofvswap 7206 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴 ∧ (𝑓𝑀) ∈ 𝐴) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
119, 10syld3an3 1409 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
12 f1ocnvfv2 7177 . . . . . . . . . . . . . . . . 17 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓‘(𝑓𝑀)) = 𝑀)
1312opeq2d 4816 . . . . . . . . . . . . . . . 16 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ⟨𝑋, (𝑓‘(𝑓𝑀))⟩ = ⟨𝑋, 𝑀⟩)
1413preq1d 4679 . . . . . . . . . . . . . . 15 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} = {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
1514uneq2d 4103 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) = ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
1615f1oeq1d 6737 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
17163adant2 1131 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
1811, 17mpbid 232 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
19 f1ofun 6744 . . . . . . . . . . 11 (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 → Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
20 opex 5388 . . . . . . . . . . . . . 14 𝑋, 𝑀⟩ ∈ V
2120prid1 4702 . . . . . . . . . . . . 13 𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}
22 elun2 4117 . . . . . . . . . . . . 13 (⟨𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} → ⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
2321, 22ax-mp 5 . . . . . . . . . . . 12 𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
24 funopfv 6849 . . . . . . . . . . . 12 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀))
2523, 24mpi 20 . . . . . . . . . . 11 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
2618, 19, 253syl 18 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
27 simp2 1137 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → 𝑋𝐴)
28 f1ocnvfv 7178 . . . . . . . . . . 11 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀𝑋𝐴) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
2918, 27, 28syl2anc 585 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
3026, 29mpd 15 . . . . . . . . 9 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
317, 30syl3an3 1165 . . . . . . . 8 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
3231sneqd 4577 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)} = {𝑋})
3332difeq2d 4063 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) = (𝐴 ∖ {𝑋}))
34 vex 3441 . . . . . . . . 9 𝑓 ∈ V
3534resex 5947 . . . . . . . 8 (𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∈ V
36 prex 5364 . . . . . . . 8 {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} ∈ V
3735, 36unex 7624 . . . . . . 7 ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V
38 simp3 1138 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → 𝑀 ∈ ω)
397, 18syl3an3 1165 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
40 dif1enlem 8977 . . . . . . 7 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V ∧ 𝑀 ∈ ω ∧ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4137, 38, 39, 40mp3an2i 1466 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4233, 41eqbrtrrd 5105 . . . . 5 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
4342exlimiv 1931 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
446, 43sylbir 235 . . 3 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
451, 44syl3an1b 1403 . 2 ((𝐴 ≈ suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
46453comr 1125 1 ((𝑀 ∈ ω ∧ 𝐴 ≈ suc 𝑀𝑋𝐴) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 397  w3a 1087   = wceq 1539  wex 1779  wcel 2104  Vcvv 3437  cdif 3889  cun 3890  {csn 4565  {cpr 4567  cop 4571   class class class wbr 5081  ccnv 5595  cres 5598  suc csuc 6279  Fun wfun 6448  1-1-ontowf1o 6453  cfv 6454  ωcom 7740  cen 8757
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1911  ax-6 1969  ax-7 2009  ax-8 2106  ax-9 2114  ax-10 2135  ax-11 2152  ax-12 2169  ax-ext 2707  ax-sep 5232  ax-nul 5239  ax-pr 5361  ax-un 7616
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 846  df-3an 1089  df-tru 1542  df-fal 1552  df-ex 1780  df-nf 1784  df-sb 2066  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2887  df-ne 2942  df-ral 3063  df-rex 3072  df-reu 3286  df-rab 3287  df-v 3439  df-sbc 3722  df-csb 3838  df-dif 3895  df-un 3897  df-in 3899  df-ss 3909  df-nul 4263  df-if 4466  df-pw 4541  df-sn 4566  df-pr 4568  df-op 4572  df-uni 4845  df-br 5082  df-opab 5144  df-mpt 5165  df-tr 5199  df-id 5496  df-eprel 5502  df-po 5510  df-so 5511  df-fr 5551  df-we 5553  df-xp 5602  df-rel 5603  df-cnv 5604  df-co 5605  df-dm 5606  df-rn 5607  df-res 5608  df-ima 5609  df-ord 6280  df-on 6281  df-suc 6283  df-iota 6406  df-fun 6456  df-fn 6457  df-f 6458  df-f1 6459  df-fo 6460  df-f1o 6461  df-fv 6462  df-om 7741  df-en 8761
This theorem is referenced by:  findcard  8980  phplem1  9024  enp1i  9092  findcard2OLD  9096  en2eleq  9806  en2other2  9807  mreexexlem4d  17397  f1otrspeq  19096  pmtrf  19104  pmtrmvd  19105  pmtrfinv  19110
  Copyright terms: Public domain W3C validator