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

Theorem dif1card 7654
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 7105 . . 3  |-  ( A  e.  Fin  ->  ( A  \  { X }
)  e.  Fin )
2 isfi 6901 . . . 4  |-  ( ( A  \  { X } )  e.  Fin  <->  E. m  e.  om  ( A  \  { X }
)  ~~  m )
3 simp3 957 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( A  \  { X } )  ~~  m
)
4 en2sn 6956 . . . . . . . . . . . 12  |-  ( ( X  e.  A  /\  m  e.  om )  ->  { X }  ~~  { m } )
543adant3 975 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  { X }  ~~  { m } )
6 incom 3374 . . . . . . . . . . . . 13  |-  ( ( A  \  { X } )  i^i  { X } )  =  ( { X }  i^i  ( A  \  { X } ) )
7 disjdif 3539 . . . . . . . . . . . . 13  |-  ( { X }  i^i  ( A  \  { X }
) )  =  (/)
86, 7eqtri 2316 . . . . . . . . . . . 12  |-  ( ( A  \  { X } )  i^i  { X } )  =  (/)
98a1i 10 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( A  \  { X } )  i^i 
{ X } )  =  (/) )
10 nnord 4680 . . . . . . . . . . . . . 14  |-  ( m  e.  om  ->  Ord  m )
11 ordirr 4426 . . . . . . . . . . . . . 14  |-  ( Ord  m  ->  -.  m  e.  m )
1210, 11syl 15 . . . . . . . . . . . . 13  |-  ( m  e.  om  ->  -.  m  e.  m )
13 disjsn 3706 . . . . . . . . . . . . 13  |-  ( ( m  i^i  { m } )  =  (/)  <->  -.  m  e.  m )
1412, 13sylibr 203 . . . . . . . . . . . 12  |-  ( m  e.  om  ->  (
m  i^i  { m } )  =  (/) )
15143ad2ant2 977 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( m  i^i  {
m } )  =  (/) )
16 unen 6959 . . . . . . . . . . 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 1183 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } ) )
18 difsnid 3777 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
( A  \  { X } )  u.  { X } )  =  A )
19 df-suc 4414 . . . . . . . . . . . . . 14  |-  suc  m  =  ( m  u. 
{ m } )
2019eqcomi 2300 . . . . . . . . . . . . 13  |-  ( m  u.  { m }
)  =  suc  m
2120a1i 10 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
m  u.  { m } )  =  suc  m )
2218, 21breq12d 4052 . . . . . . . . . . 11  |-  ( X  e.  A  ->  (
( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } )  <-> 
A  ~~  suc  m ) )
23223ad2ant1 976 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( ( A 
\  { X }
)  u.  { X } )  ~~  (
m  u.  { m } )  <->  A  ~~  suc  m ) )
2417, 23mpbid 201 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  A  ~~  suc  m
)
25 peano2 4692 . . . . . . . . . 10  |-  ( m  e.  om  ->  suc  m  e.  om )
26253ad2ant2 977 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  suc  m  e.  om )
27 cardennn 7632 . . . . . . . . 9  |-  ( ( A  ~~  suc  m  /\  suc  m  e.  om )  ->  ( card `  A
)  =  suc  m
)
2824, 26, 27syl2anc 642 . . . . . . . 8  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  m
)
29 cardennn 7632 . . . . . . . . . . 11  |-  ( ( ( A  \  { X } )  ~~  m  /\  m  e.  om )  ->  ( card `  ( A  \  { X }
) )  =  m )
3029ancoms 439 . . . . . . . . . 10  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  ( A  \  { X } ) )  =  m )
31303adant1 973 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  ( A  \  { X }
) )  =  m )
32 suceq 4473 . . . . . . . . 9  |-  ( (
card `  ( A  \  { X } ) )  =  m  ->  suc  ( card `  ( A  \  { X }
) )  =  suc  m )
3331, 32syl 15 . . . . . . . 8  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  suc  ( card `  ( A  \  { X }
) )  =  suc  m )
3428, 33eqtr4d 2331 . . . . . . 7  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )
35343expib 1154 . . . . . 6  |-  ( X  e.  A  ->  (
( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3635com12 27 . . . . 5  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( X  e.  A  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3736rexlimiva 2675 . . . 4  |-  ( E. m  e.  om  ( A  \  { X }
)  ~~  m  ->  ( X  e.  A  -> 
( card `  A )  =  suc  ( card `  ( A  \  { X }
) ) ) )
382, 37sylbi 187 . . 3  |-  ( ( A  \  { X } )  e.  Fin  ->  ( X  e.  A  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) ) )
391, 38syl 15 . 2  |-  ( A  e.  Fin  ->  ( X  e.  A  ->  (
card `  A )  =  suc  ( card `  ( A  \  { X }
) ) ) )
4039imp 418 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 176    /\ wa 358    /\ w3a 934    = wceq 1632    e. wcel 1696   E.wrex 2557    \ cdif 3162    u. cun 3163    i^i cin 3164   (/)c0 3468   {csn 3653   class class class wbr 4039   Ord word 4407   suc csuc 4410   omcom 4672   ` cfv 5271    ~~ cen 6876   Fincfn 6879   cardccrd 7584
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-rab 2565  df-v 2803  df-sbc 3005  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-int 3879  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-1o 6495  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-card 7588
  Copyright terms: Public domain W3C validator