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

Theorem dif1card 7892
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 7339 . . 3  |-  ( A  e.  Fin  ->  ( A  \  { X }
)  e.  Fin )
2 isfi 7131 . . . 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 7186 . . . . . . . . . . . 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 3533 . . . . . . . . . . . . 13  |-  ( ( A  \  { X } )  i^i  { X } )  =  ( { X }  i^i  ( A  \  { X } ) )
7 disjdif 3700 . . . . . . . . . . . . 13  |-  ( { X }  i^i  ( A  \  { X }
) )  =  (/)
86, 7eqtri 2456 . . . . . . . . . . . 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 4853 . . . . . . . . . . . . . 14  |-  ( m  e.  om  ->  Ord  m )
11 ordirr 4599 . . . . . . . . . . . . . 14  |-  ( Ord  m  ->  -.  m  e.  m )
1210, 11syl 16 . . . . . . . . . . . . 13  |-  ( m  e.  om  ->  -.  m  e.  m )
13 disjsn 3868 . . . . . . . . . . . . 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 7189 . . . . . . . . . . 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 3944 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
( A  \  { X } )  u.  { X } )  =  A )
19 df-suc 4587 . . . . . . . . . . . . . 14  |-  suc  m  =  ( m  u. 
{ m } )
2019eqcomi 2440 . . . . . . . . . . . . 13  |-  ( m  u.  { m }
)  =  suc  m
2120a1i 11 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
m  u.  { m } )  =  suc  m )
2218, 21breq12d 4225 . . . . . . . . . . 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 4865 . . . . . . . . . 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 7870 . . . . . . . . 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 7870 . . . . . . . . . . 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 4646 . . . . . . . . 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 2471 . . . . . . 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 2825 . . . 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 1652    e. wcel 1725   E.wrex 2706    \ cdif 3317    u. cun 3318    i^i cin 3319   (/)c0 3628   {csn 3814   class class class wbr 4212   Ord word 4580   suc csuc 4583   omcom 4845   ` cfv 5454    ~~ cen 7106   Fincfn 7109   cardccrd 7822
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-ral 2710  df-rex 2711  df-rab 2714  df-v 2958  df-sbc 3162  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-int 4051  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-1o 6724  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-fin 7113  df-card 7826
  Copyright terms: Public domain W3C validator