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

Theorem dif1en 8754
Description: If a set 𝐴 is equinumerous to the successor of a natural number 𝑀, then 𝐴 with an element removed is equinumerous to 𝑀. (Contributed by Jeff Madsen, 2-Sep-2009.) (Revised by Stefan O'Rear, 16-Aug-2015.) Avoid ax-pow 5229. (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 8557 . . 3 (𝐴 ≈ suc 𝑀 ↔ ∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀)
2 19.41v 1956 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
3 3anass 1096 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
43exbii 1854 . . . . 5 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ ∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
5 3anass 1096 . . . . 5 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀 ∧ (𝑋𝐴𝑀 ∈ ω)))
62, 4, 53bitr4i 306 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) ↔ (∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω))
7 sucidg 6244 . . . . . . . . 9 (𝑀 ∈ ω → 𝑀 ∈ suc 𝑀)
8 f1ocnvdm 7046 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
983adant2 1132 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (𝑓𝑀) ∈ 𝐴)
10 f1ofvswap 7067 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴 ∧ (𝑓𝑀) ∈ 𝐴) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
119, 10syld3an3 1410 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
12 f1ocnvfv2 7039 . . . . . . . . . . . . . . . . 17 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (𝑓‘(𝑓𝑀)) = 𝑀)
1312opeq2d 4765 . . . . . . . . . . . . . . . 16 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ⟨𝑋, (𝑓‘(𝑓𝑀))⟩ = ⟨𝑋, 𝑀⟩)
1413preq1d 4627 . . . . . . . . . . . . . . 15 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} = {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
1514uneq2d 4051 . . . . . . . . . . . . . 14 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) = ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
1615f1oeq1d 6607 . . . . . . . . . . . . 13 ((𝑓:𝐴1-1-onto→suc 𝑀𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
17163adant2 1132 . . . . . . . . . . . 12 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, (𝑓‘(𝑓𝑀))⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 ↔ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀))
1811, 17mpbid 235 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
19 f1ofun 6614 . . . . . . . . . . 11 (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀 → Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
20 opex 5319 . . . . . . . . . . . . . 14 𝑋, 𝑀⟩ ∈ V
2120prid1 4650 . . . . . . . . . . . . 13 𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}
22 elun2 4065 . . . . . . . . . . . . 13 (⟨𝑋, 𝑀⟩ ∈ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} → ⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}))
2321, 22ax-mp 5 . . . . . . . . . . . 12 𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})
24 funopfv 6715 . . . . . . . . . . . 12 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (⟨𝑋, 𝑀⟩ ∈ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀))
2523, 24mpi 20 . . . . . . . . . . 11 (Fun ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
2618, 19, 253syl 18 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀)
27 simp2 1138 . . . . . . . . . . 11 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → 𝑋𝐴)
28 f1ocnvfv 7040 . . . . . . . . . . 11 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀𝑋𝐴) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
2918, 27, 28syl2anc 587 . . . . . . . . . 10 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑋) = 𝑀 → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋))
3026, 29mpd 15 . . . . . . . . 9 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ suc 𝑀) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
317, 30syl3an3 1166 . . . . . . . 8 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀) = 𝑋)
3231sneqd 4525 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)} = {𝑋})
3332difeq2d 4011 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) = (𝐴 ∖ {𝑋}))
34 vex 3401 . . . . . . . . 9 𝑓 ∈ V
3534resex 5867 . . . . . . . 8 (𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∈ V
36 prex 5296 . . . . . . . 8 {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩} ∈ V
3735, 36unex 7481 . . . . . . 7 ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V
38 simp3 1139 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → 𝑀 ∈ ω)
397, 18syl3an3 1166 . . . . . . 7 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀)
40 dif1enlem 8752 . . . . . . 7 ((((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}) ∈ V ∧ 𝑀 ∈ ω ∧ ((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩}):𝐴1-1-onto→suc 𝑀) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4137, 38, 39, 40mp3an2i 1467 . . . . . 6 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {(((𝑓 ↾ (𝐴 ∖ {𝑋, (𝑓𝑀)})) ∪ {⟨𝑋, 𝑀⟩, ⟨(𝑓𝑀), (𝑓𝑋)⟩})‘𝑀)}) ≈ 𝑀)
4233, 41eqbrtrrd 5051 . . . . 5 ((𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
4342exlimiv 1936 . . . 4 (∃𝑓(𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
446, 43sylbir 238 . . 3 ((∃𝑓 𝑓:𝐴1-1-onto→suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
451, 44syl3an1b 1404 . 2 ((𝐴 ≈ suc 𝑀𝑋𝐴𝑀 ∈ ω) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
46453comr 1126 1 ((𝑀 ∈ ω ∧ 𝐴 ≈ suc 𝑀𝑋𝐴) → (𝐴 ∖ {𝑋}) ≈ 𝑀)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399  w3a 1088   = wceq 1542  wex 1786  wcel 2113  Vcvv 3397  cdif 3838  cun 3839  {csn 4513  {cpr 4515  cop 4519   class class class wbr 5027  ccnv 5518  cres 5521  suc csuc 6168  Fun wfun 6327  1-1-ontowf1o 6332  cfv 6333  ωcom 7593  cen 8545
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1916  ax-6 1974  ax-7 2019  ax-8 2115  ax-9 2123  ax-10 2144  ax-11 2161  ax-12 2178  ax-ext 2710  ax-sep 5164  ax-nul 5171  ax-pr 5293  ax-un 7473
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2074  df-mo 2540  df-eu 2570  df-clab 2717  df-cleq 2730  df-clel 2811  df-nfc 2881  df-ne 2935  df-ral 3058  df-rex 3059  df-reu 3060  df-rab 3062  df-v 3399  df-sbc 3680  df-csb 3789  df-dif 3844  df-un 3846  df-in 3848  df-ss 3858  df-nul 4210  df-if 4412  df-sn 4514  df-pr 4516  df-op 4520  df-uni 4794  df-br 5028  df-opab 5090  df-mpt 5108  df-tr 5134  df-id 5425  df-eprel 5430  df-po 5438  df-so 5439  df-fr 5478  df-we 5480  df-xp 5525  df-rel 5526  df-cnv 5527  df-co 5528  df-dm 5529  df-rn 5530  df-res 5531  df-ima 5532  df-ord 6169  df-on 6170  df-suc 6172  df-iota 6291  df-fun 6335  df-fn 6336  df-f 6337  df-f1 6338  df-fo 6339  df-f1o 6340  df-fv 6341  df-om 7594  df-en 8549
This theorem is referenced by:  findcard  8755  enp1i  8823  findcard2OLD  8827  en2eleq  9501  en2other2  9502  mreexexlem4d  17014  f1otrspeq  18686  pmtrf  18694  pmtrmvd  18695  pmtrfinv  18700
  Copyright terms: Public domain W3C validator