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

Theorem dif1card 9084
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 8399 . . 3 (𝐴 ∈ Fin → (𝐴 ∖ {𝑋}) ∈ Fin)
2 isfi 8184 . . . 4 ((𝐴 ∖ {𝑋}) ∈ Fin ↔ ∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚)
3 simp3 1168 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝐴 ∖ {𝑋}) ≈ 𝑚)
4 en2sn 8244 . . . . . . . . . . . 12 ((𝑋𝐴𝑚 ∈ ω) → {𝑋} ≈ {𝑚})
543adant3 1162 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → {𝑋} ≈ {𝑚})
6 incom 3967 . . . . . . . . . . . . 13 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ({𝑋} ∩ (𝐴 ∖ {𝑋}))
7 disjdif 4200 . . . . . . . . . . . . 13 ({𝑋} ∩ (𝐴 ∖ {𝑋})) = ∅
86, 7eqtri 2787 . . . . . . . . . . . 12 ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅
98a1i 11 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅)
10 nnord 7271 . . . . . . . . . . . . . 14 (𝑚 ∈ ω → Ord 𝑚)
11 ordirr 5926 . . . . . . . . . . . . . 14 (Ord 𝑚 → ¬ 𝑚𝑚)
1210, 11syl 17 . . . . . . . . . . . . 13 (𝑚 ∈ ω → ¬ 𝑚𝑚)
13 disjsn 4402 . . . . . . . . . . . . 13 ((𝑚 ∩ {𝑚}) = ∅ ↔ ¬ 𝑚𝑚)
1412, 13sylibr 225 . . . . . . . . . . . 12 (𝑚 ∈ ω → (𝑚 ∩ {𝑚}) = ∅)
15143ad2ant2 1164 . . . . . . . . . . 11 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑚 ∩ {𝑚}) = ∅)
16 unen 8247 . . . . . . . . . . 11 ((((𝐴 ∖ {𝑋}) ≈ 𝑚 ∧ {𝑋} ≈ {𝑚}) ∧ (((𝐴 ∖ {𝑋}) ∩ {𝑋}) = ∅ ∧ (𝑚 ∩ {𝑚}) = ∅)) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
173, 5, 9, 15, 16syl22anc 867 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}))
18 difsnid 4495 . . . . . . . . . . . 12 (𝑋𝐴 → ((𝐴 ∖ {𝑋}) ∪ {𝑋}) = 𝐴)
19 df-suc 5914 . . . . . . . . . . . . . 14 suc 𝑚 = (𝑚 ∪ {𝑚})
2019eqcomi 2774 . . . . . . . . . . . . 13 (𝑚 ∪ {𝑚}) = suc 𝑚
2120a1i 11 . . . . . . . . . . . 12 (𝑋𝐴 → (𝑚 ∪ {𝑚}) = suc 𝑚)
2218, 21breq12d 4822 . . . . . . . . . . 11 (𝑋𝐴 → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
23223ad2ant1 1163 . . . . . . . . . 10 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (((𝐴 ∖ {𝑋}) ∪ {𝑋}) ≈ (𝑚 ∪ {𝑚}) ↔ 𝐴 ≈ suc 𝑚))
2417, 23mpbid 223 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → 𝐴 ≈ suc 𝑚)
25 peano2 7284 . . . . . . . . . 10 (𝑚 ∈ ω → suc 𝑚 ∈ ω)
26253ad2ant2 1164 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc 𝑚 ∈ ω)
27 cardennn 9060 . . . . . . . . 9 ((𝐴 ≈ suc 𝑚 ∧ suc 𝑚 ∈ ω) → (card‘𝐴) = suc 𝑚)
2824, 26, 27syl2anc 579 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc 𝑚)
29 cardennn 9060 . . . . . . . . . . 11 (((𝐴 ∖ {𝑋}) ≈ 𝑚𝑚 ∈ ω) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
3029ancoms 450 . . . . . . . . . 10 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
31303adant1 1160 . . . . . . . . 9 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘(𝐴 ∖ {𝑋})) = 𝑚)
32 suceq 5973 . . . . . . . . 9 ((card‘(𝐴 ∖ {𝑋})) = 𝑚 → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3331, 32syl 17 . . . . . . . 8 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → suc (card‘(𝐴 ∖ {𝑋})) = suc 𝑚)
3428, 33eqtr4d 2802 . . . . . . 7 ((𝑋𝐴𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
35343expib 1152 . . . . . 6 (𝑋𝐴 → ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3635com12 32 . . . . 5 ((𝑚 ∈ ω ∧ (𝐴 ∖ {𝑋}) ≈ 𝑚) → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
3736rexlimiva 3175 . . . 4 (∃𝑚 ∈ ω (𝐴 ∖ {𝑋}) ≈ 𝑚 → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
382, 37sylbi 208 . . 3 ((𝐴 ∖ {𝑋}) ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
391, 38syl 17 . 2 (𝐴 ∈ Fin → (𝑋𝐴 → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋}))))
4039imp 395 1 ((𝐴 ∈ Fin ∧ 𝑋𝐴) → (card‘𝐴) = suc (card‘(𝐴 ∖ {𝑋})))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 197  wa 384  w3a 1107   = wceq 1652  wcel 2155  wrex 3056  cdif 3729  cun 3730  cin 3731  c0 4079  {csn 4334   class class class wbr 4809  Ord word 5907  suc csuc 5910  cfv 6068  ωcom 7263  cen 8157  Fincfn 8160  cardccrd 9012
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2069  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-sep 4941  ax-nul 4949  ax-pow 5001  ax-pr 5062  ax-un 7147
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2062  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-ral 3060  df-rex 3061  df-rab 3064  df-v 3352  df-sbc 3597  df-dif 3735  df-un 3737  df-in 3739  df-ss 3746  df-pss 3748  df-nul 4080  df-if 4244  df-pw 4317  df-sn 4335  df-pr 4337  df-tp 4339  df-op 4341  df-uni 4595  df-int 4634  df-br 4810  df-opab 4872  df-mpt 4889  df-tr 4912  df-id 5185  df-eprel 5190  df-po 5198  df-so 5199  df-fr 5236  df-we 5238  df-xp 5283  df-rel 5284  df-cnv 5285  df-co 5286  df-dm 5287  df-rn 5288  df-res 5289  df-ima 5290  df-ord 5911  df-on 5912  df-lim 5913  df-suc 5914  df-iota 6031  df-fun 6070  df-fn 6071  df-f 6072  df-f1 6073  df-fo 6074  df-f1o 6075  df-fv 6076  df-om 7264  df-1o 7764  df-er 7947  df-en 8161  df-dom 8162  df-sdom 8163  df-fin 8164  df-card 9016
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator