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

Theorem dif1card 8871
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 8233 . . 3 (𝐴 ∈ Fin → (𝐴 ∖ {𝑋}) ∈ Fin)
2 isfi 8021 . . . 4 ((𝐴 ∖ {𝑋}) ∈ Fin ↔ ∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚)
3 simp3 1083 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝐴 ∖ {𝑋}) ≈ 𝑚)
4 en2sn 8078 . . . . . . . . . . . 12 ((𝑋𝐴𝑚 ∈ ω) → {𝑋} ≈ {𝑚})
543adant3 1101 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → {𝑋} ≈ {𝑚})
6 incom 3838 . . . . . . . . . . . . 13 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ({𝑋} ∩ (𝐴 ∖ {𝑋}))
7 disjdif 4073 . . . . . . . . . . . . 13 ({𝑋} ∩ (𝐴 ∖ {𝑋})) = ∅
86, 7eqtri 2673 . . . . . . . . . . . 12 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅
98a1i 11 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅)
10 nnord 7115 . . . . . . . . . . . . . 14 (𝑚 ∈ ω → Ord 𝑚)
11 ordirr 5779 . . . . . . . . . . . . . 14 (Ord 𝑚 → ¬ 𝑚𝑚)
1210, 11syl 17 . . . . . . . . . . . . 13 (𝑚 ∈ ω → ¬ 𝑚𝑚)
13 disjsn 4278 . . . . . . . . . . . . 13 ((𝑚 ∩ {𝑚}) = ∅ ↔ ¬ 𝑚𝑚)
1412, 13sylibr 224 . . . . . . . . . . . 12 (𝑚 ∈ ω → (𝑚 ∩ {𝑚}) = ∅)
15143ad2ant2 1103 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑚 ∩ {𝑚}) = ∅)
16 unen 8081 . . . . . . . . . . 11 ((((𝐴 ∖ {𝑋}) ≈ 𝑚 ∧ {𝑋} ≈ {𝑚}) ∧ (((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅ ∧ (𝑚 ∩ {𝑚}) = ∅)) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
173, 5, 9, 15, 16syl22anc 1367 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
18 difsnid 4373 . . . . . . . . . . . 12 (𝑋𝐴 → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) = 𝐴)
19 df-suc 5767 . . . . . . . . . . . . . 14 suc 𝑚 = (𝑚 ∪ {𝑚})
2019eqcomi 2660 . . . . . . . . . . . . 13 (𝑚 ∪ {𝑚}) = suc 𝑚
2120a1i 11 . . . . . . . . . . . 12 (𝑋𝐴 → (𝑚 ∪ {𝑚}) = suc 𝑚)
2218, 21breq12d 4698 . . . . . . . . . . 11 (𝑋𝐴 → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
23223ad2ant1 1102 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
2417, 23mpbid 222 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → 𝐴 ≈ suc 𝑚)
25 peano2 7128 . . . . . . . . . 10 (𝑚 ∈ ω → suc 𝑚 ∈ ω)
26253ad2ant2 1103 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc 𝑚 ∈ ω)
27 cardennn 8847 . . . . . . . . 9 ((𝐴 ≈ suc 𝑚 ∧ suc 𝑚 ∈ ω) → (card‘𝐴) = suc 𝑚)
2824, 26, 27syl2anc 694 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc 𝑚)
29 cardennn 8847 . . . . . . . . . . 11 (((𝐴 ∖ {𝑋}) ≈ 𝑚𝑚 ∈ ω) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
3029ancoms 468 . . . . . . . . . 10 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
31303adant1 1099 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
32 suceq 5828 . . . . . . . . 9 ((card‘(𝐴 ∖ {𝑋})) = 𝑚 → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3331, 32syl 17 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3428, 33eqtr4d 2688 . . . . . . 7 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
35343expib 1287 . . . . . 6 (𝑋𝐴 → ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3635com12 32 . . . . 5 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3736rexlimiva 3057 . . . 4 (∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚 → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
382, 37sylbi 207 . . 3 ((𝐴 ∖ {𝑋}) ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
391, 38syl 17 . 2 (𝐴 ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
4039imp 444 1 ((𝐴 ∈ Fin ∧ 𝑋𝐴) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wa 383  w3a 1054   = wceq 1523  wcel 2030  wrex 2942  cdif 3604  cun 3605  cin 3606  c0 3948  {csn 4210   class class class wbr 4685  Ord word 5760  suc csuc 5763  cfv 5926  ωcom 7107  cen 7994  Fincfn 7997  cardccrd 8799
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-ral 2946  df-rex 2947  df-rab 2950  df-v 3233  df-sbc 3469  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-om 7108  df-1o 7605  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator