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

Theorem dif1card 8780
Description: The cardinality of a nonempty finite set is one greater than the cardinality of the set with one element removed. (Contributed by Jeff Madsen, 2-Sep-2009.) (Proof shortened by Mario Carneiro, 2-Feb-2013.)
Assertion
Ref Expression
dif1card ((𝐴 ∈ Fin ∧ 𝑋𝐴) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))

Proof of Theorem dif1card
Dummy variable 𝑚 is distinct from all other variables.
StepHypRef Expression
1 diffi 8139 . . 3 (𝐴 ∈ Fin → (𝐴 ∖ {𝑋}) ∈ Fin)
2 isfi 7926 . . . 4 ((𝐴 ∖ {𝑋}) ∈ Fin ↔ ∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚)
3 simp3 1061 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝐴 ∖ {𝑋}) ≈ 𝑚)
4 en2sn 7984 . . . . . . . . . . . 12 ((𝑋𝐴𝑚 ∈ ω) → {𝑋} ≈ {𝑚})
543adant3 1079 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → {𝑋} ≈ {𝑚})
6 incom 3785 . . . . . . . . . . . . 13 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ({𝑋} ∩ (𝐴 ∖ {𝑋}))
7 disjdif 4014 . . . . . . . . . . . . 13 ({𝑋} ∩ (𝐴 ∖ {𝑋})) = ∅
86, 7eqtri 2643 . . . . . . . . . . . 12 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅
98a1i 11 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅)
10 nnord 7023 . . . . . . . . . . . . . 14 (𝑚 ∈ ω → Ord 𝑚)
11 ordirr 5702 . . . . . . . . . . . . . 14 (Ord 𝑚 → ¬ 𝑚𝑚)
1210, 11syl 17 . . . . . . . . . . . . 13 (𝑚 ∈ ω → ¬ 𝑚𝑚)
13 disjsn 4218 . . . . . . . . . . . . 13 ((𝑚 ∩ {𝑚}) = ∅ ↔ ¬ 𝑚𝑚)
1412, 13sylibr 224 . . . . . . . . . . . 12 (𝑚 ∈ ω → (𝑚 ∩ {𝑚}) = ∅)
15143ad2ant2 1081 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑚 ∩ {𝑚}) = ∅)
16 unen 7987 . . . . . . . . . . 11 ((((𝐴 ∖ {𝑋}) ≈ 𝑚 ∧ {𝑋} ≈ {𝑚}) ∧ (((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅ ∧ (𝑚 ∩ {𝑚}) = ∅)) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
173, 5, 9, 15, 16syl22anc 1324 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
18 difsnid 4312 . . . . . . . . . . . 12 (𝑋𝐴 → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) = 𝐴)
19 df-suc 5690 . . . . . . . . . . . . . 14 suc 𝑚 = (𝑚 ∪ {𝑚})
2019eqcomi 2630 . . . . . . . . . . . . 13 (𝑚 ∪ {𝑚}) = suc 𝑚
2120a1i 11 . . . . . . . . . . . 12 (𝑋𝐴 → (𝑚 ∪ {𝑚}) = suc 𝑚)
2218, 21breq12d 4628 . . . . . . . . . . 11 (𝑋𝐴 → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
23223ad2ant1 1080 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
2417, 23mpbid 222 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → 𝐴 ≈ suc 𝑚)
25 peano2 7036 . . . . . . . . . 10 (𝑚 ∈ ω → suc 𝑚 ∈ ω)
26253ad2ant2 1081 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc 𝑚 ∈ ω)
27 cardennn 8756 . . . . . . . . 9 ((𝐴 ≈ suc 𝑚 ∧ suc 𝑚 ∈ ω) → (card‘𝐴) = suc 𝑚)
2824, 26, 27syl2anc 692 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc 𝑚)
29 cardennn 8756 . . . . . . . . . . 11 (((𝐴 ∖ {𝑋}) ≈ 𝑚𝑚 ∈ ω) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
3029ancoms 469 . . . . . . . . . 10 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
31303adant1 1077 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
32 suceq 5751 . . . . . . . . 9 ((card‘(𝐴 ∖ {𝑋})) = 𝑚 → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3331, 32syl 17 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3428, 33eqtr4d 2658 . . . . . . 7 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
35343expib 1265 . . . . . 6 (𝑋𝐴 → ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3635com12 32 . . . . 5 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3736rexlimiva 3021 . . . 4 (∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚 → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
382, 37sylbi 207 . . 3 ((𝐴 ∖ {𝑋}) ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
391, 38syl 17 . 2 (𝐴 ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
4039imp 445 1 ((𝐴 ∈ Fin ∧ 𝑋𝐴) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wcel 1987  wrex 2908  cdif 3553  cun 3554  cin 3555  c0 3893  {csn 4150   class class class wbr 4615  Ord word 5683  suc csuc 5686  cfv 5849  ωcom 7015  cen 7899  Fincfn 7902  cardccrd 8708
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-sep 4743  ax-nul 4751  ax-pow 4805  ax-pr 4869  ax-un 6905
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2912  df-rex 2913  df-rab 2916  df-v 3188  df-sbc 3419  df-dif 3559  df-un 3561  df-in 3563  df-ss 3570  df-pss 3572  df-nul 3894  df-if 4061  df-pw 4134  df-sn 4151  df-pr 4153  df-tp 4155  df-op 4157  df-uni 4405  df-int 4443  df-br 4616  df-opab 4676  df-mpt 4677  df-tr 4715  df-eprel 4987  df-id 4991  df-po 4997  df-so 4998  df-fr 5035  df-we 5037  df-xp 5082  df-rel 5083  df-cnv 5084  df-co 5085  df-dm 5086  df-rn 5087  df-res 5088  df-ima 5089  df-ord 5687  df-on 5688  df-lim 5689  df-suc 5690  df-iota 5812  df-fun 5851  df-fn 5852  df-f 5853  df-f1 5854  df-fo 5855  df-f1o 5856  df-fv 5857  df-om 7016  df-1o 7508  df-er 7690  df-en 7903  df-dom 7904  df-sdom 7905  df-fin 7906  df-card 8712
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator