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

Theorem dif1card 7856
Description: The cardinality of a non-empty 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  |-  ( ( A  e.  Fin  /\  X  e.  A )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )

Proof of Theorem dif1card
Dummy variable  m is distinct from all other variables.
StepHypRef Expression
1 diffi 7306 . . 3  |-  ( A  e.  Fin  ->  ( A  \  { X }
)  e.  Fin )
2 isfi 7098 . . . 4  |-  ( ( A  \  { X } )  e.  Fin  <->  E. m  e.  om  ( A  \  { X }
)  ~~  m )
3 simp3 959 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( A  \  { X } )  ~~  m
)
4 en2sn 7153 . . . . . . . . . . . 12  |-  ( ( X  e.  A  /\  m  e.  om )  ->  { X }  ~~  { m } )
543adant3 977 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  { X }  ~~  { m } )
6 incom 3501 . . . . . . . . . . . . 13  |-  ( ( A  \  { X } )  i^i  { X } )  =  ( { X }  i^i  ( A  \  { X } ) )
7 disjdif 3668 . . . . . . . . . . . . 13  |-  ( { X }  i^i  ( A  \  { X }
) )  =  (/)
86, 7eqtri 2432 . . . . . . . . . . . 12  |-  ( ( A  \  { X } )  i^i  { X } )  =  (/)
98a1i 11 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( A  \  { X } )  i^i 
{ X } )  =  (/) )
10 nnord 4820 . . . . . . . . . . . . . 14  |-  ( m  e.  om  ->  Ord  m )
11 ordirr 4567 . . . . . . . . . . . . . 14  |-  ( Ord  m  ->  -.  m  e.  m )
1210, 11syl 16 . . . . . . . . . . . . 13  |-  ( m  e.  om  ->  -.  m  e.  m )
13 disjsn 3836 . . . . . . . . . . . . 13  |-  ( ( m  i^i  { m } )  =  (/)  <->  -.  m  e.  m )
1412, 13sylibr 204 . . . . . . . . . . . 12  |-  ( m  e.  om  ->  (
m  i^i  { m } )  =  (/) )
15143ad2ant2 979 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( m  i^i  {
m } )  =  (/) )
16 unen 7156 . . . . . . . . . . 11  |-  ( ( ( ( A  \  { X } )  ~~  m  /\  { X }  ~~  { m } )  /\  ( ( ( A  \  { X } )  i^i  { X } )  =  (/)  /\  ( m  i^i  {
m } )  =  (/) ) )  ->  (
( A  \  { X } )  u.  { X } )  ~~  (
m  u.  { m } ) )
173, 5, 9, 15, 16syl22anc 1185 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } ) )
18 difsnid 3912 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
( A  \  { X } )  u.  { X } )  =  A )
19 df-suc 4555 . . . . . . . . . . . . . 14  |-  suc  m  =  ( m  u. 
{ m } )
2019eqcomi 2416 . . . . . . . . . . . . 13  |-  ( m  u.  { m }
)  =  suc  m
2120a1i 11 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
m  u.  { m } )  =  suc  m )
2218, 21breq12d 4193 . . . . . . . . . . 11  |-  ( X  e.  A  ->  (
( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } )  <-> 
A  ~~  suc  m ) )
23223ad2ant1 978 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( ( A 
\  { X }
)  u.  { X } )  ~~  (
m  u.  { m } )  <->  A  ~~  suc  m ) )
2417, 23mpbid 202 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  A  ~~  suc  m
)
25 peano2 4832 . . . . . . . . . 10  |-  ( m  e.  om  ->  suc  m  e.  om )
26253ad2ant2 979 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  suc  m  e.  om )
27 cardennn 7834 . . . . . . . . 9  |-  ( ( A  ~~  suc  m  /\  suc  m  e.  om )  ->  ( card `  A
)  =  suc  m
)
2824, 26, 27syl2anc 643 . . . . . . . 8  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  m
)
29 cardennn 7834 . . . . . . . . . . 11  |-  ( ( ( A  \  { X } )  ~~  m  /\  m  e.  om )  ->  ( card `  ( A  \  { X }
) )  =  m )
3029ancoms 440 . . . . . . . . . 10  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  ( A  \  { X } ) )  =  m )
31303adant1 975 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  ( A  \  { X }
) )  =  m )
32 suceq 4614 . . . . . . . . 9  |-  ( (
card `  ( A  \  { X } ) )  =  m  ->  suc  ( card `  ( A  \  { X }
) )  =  suc  m )
3331, 32syl 16 . . . . . . . 8  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  suc  ( card `  ( A  \  { X }
) )  =  suc  m )
3428, 33eqtr4d 2447 . . . . . . 7  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )
35343expib 1156 . . . . . 6  |-  ( X  e.  A  ->  (
( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3635com12 29 . . . . 5  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( X  e.  A  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3736rexlimiva 2793 . . . 4  |-  ( E. m  e.  om  ( A  \  { X }
)  ~~  m  ->  ( X  e.  A  -> 
( card `  A )  =  suc  ( card `  ( A  \  { X }
) ) ) )
382, 37sylbi 188 . . 3  |-  ( ( A  \  { X } )  e.  Fin  ->  ( X  e.  A  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) ) )
391, 38syl 16 . 2  |-  ( A  e.  Fin  ->  ( X  e.  A  ->  (
card `  A )  =  suc  ( card `  ( A  \  { X }
) ) ) )
4039imp 419 1  |-  ( ( A  e.  Fin  /\  X  e.  A )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359    /\ w3a 936    = wceq 1649    e. wcel 1721   E.wrex 2675    \ cdif 3285    u. cun 3286    i^i cin 3287   (/)c0 3596   {csn 3782   class class class wbr 4180   Ord word 4548   suc csuc 4551   omcom 4812   ` cfv 5421    ~~ cen 7073   Fincfn 7076   cardccrd 7786
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2393  ax-sep 4298  ax-nul 4306  ax-pow 4345  ax-pr 4371  ax-un 4668
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2266  df-mo 2267  df-clab 2399  df-cleq 2405  df-clel 2408  df-nfc 2537  df-ne 2577  df-ral 2679  df-rex 2680  df-rab 2683  df-v 2926  df-sbc 3130  df-dif 3291  df-un 3293  df-in 3295  df-ss 3302  df-pss 3304  df-nul 3597  df-if 3708  df-pw 3769  df-sn 3788  df-pr 3789  df-tp 3790  df-op 3791  df-uni 3984  df-int 4019  df-br 4181  df-opab 4235  df-mpt 4236  df-tr 4271  df-eprel 4462  df-id 4466  df-po 4471  df-so 4472  df-fr 4509  df-we 4511  df-ord 4552  df-on 4553  df-lim 4554  df-suc 4555  df-om 4813  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5385  df-fun 5423  df-fn 5424  df-f 5425  df-f1 5426  df-fo 5427  df-f1o 5428  df-fv 5429  df-1o 6691  df-er 6872  df-en 7077  df-dom 7078  df-sdom 7079  df-fin 7080  df-card 7790
  Copyright terms: Public domain W3C validator