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

Theorem dif1card 8177
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  |-  ( ( 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 7543 . . 3  |-  ( A  e.  Fin  ->  ( A  \  { X }
)  e.  Fin )
2 isfi 7333 . . . 4  |-  ( ( A  \  { X } )  e.  Fin  <->  E. m  e.  om  ( A  \  { X }
)  ~~  m )
3 simp3 990 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( A  \  { X } )  ~~  m
)
4 en2sn 7389 . . . . . . . . . . . 12  |-  ( ( X  e.  A  /\  m  e.  om )  ->  { X }  ~~  { m } )
543adant3 1008 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  { X }  ~~  { m } )
6 incom 3543 . . . . . . . . . . . . 13  |-  ( ( A  \  { X } )  i^i  { X } )  =  ( { X }  i^i  ( A  \  { X } ) )
7 disjdif 3751 . . . . . . . . . . . . 13  |-  ( { X }  i^i  ( A  \  { X }
) )  =  (/)
86, 7eqtri 2463 . . . . . . . . . . . 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 6484 . . . . . . . . . . . . . 14  |-  ( m  e.  om  ->  Ord  m )
11 ordirr 4737 . . . . . . . . . . . . . 14  |-  ( Ord  m  ->  -.  m  e.  m )
1210, 11syl 16 . . . . . . . . . . . . 13  |-  ( m  e.  om  ->  -.  m  e.  m )
13 disjsn 3936 . . . . . . . . . . . . 13  |-  ( ( m  i^i  { m } )  =  (/)  <->  -.  m  e.  m )
1412, 13sylibr 212 . . . . . . . . . . . 12  |-  ( m  e.  om  ->  (
m  i^i  { m } )  =  (/) )
15143ad2ant2 1010 . . . . . . . . . . 11  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( m  i^i  {
m } )  =  (/) )
16 unen 7392 . . . . . . . . . . 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 1219 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } ) )
18 difsnid 4019 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
( A  \  { X } )  u.  { X } )  =  A )
19 df-suc 4725 . . . . . . . . . . . . . 14  |-  suc  m  =  ( m  u. 
{ m } )
2019eqcomi 2447 . . . . . . . . . . . . 13  |-  ( m  u.  { m }
)  =  suc  m
2120a1i 11 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
m  u.  { m } )  =  suc  m )
2218, 21breq12d 4305 . . . . . . . . . . 11  |-  ( X  e.  A  ->  (
( ( A  \  { X } )  u. 
{ X } ) 
~~  ( m  u. 
{ m } )  <-> 
A  ~~  suc  m ) )
23223ad2ant1 1009 . . . . . . . . . 10  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( ( ( A 
\  { X }
)  u.  { X } )  ~~  (
m  u.  { m } )  <->  A  ~~  suc  m ) )
2417, 23mpbid 210 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  A  ~~  suc  m
)
25 peano2 6496 . . . . . . . . . 10  |-  ( m  e.  om  ->  suc  m  e.  om )
26253ad2ant2 1010 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  suc  m  e.  om )
27 cardennn 8153 . . . . . . . . 9  |-  ( ( A  ~~  suc  m  /\  suc  m  e.  om )  ->  ( card `  A
)  =  suc  m
)
2824, 26, 27syl2anc 661 . . . . . . . 8  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  m
)
29 cardennn 8153 . . . . . . . . . . 11  |-  ( ( ( A  \  { X } )  ~~  m  /\  m  e.  om )  ->  ( card `  ( A  \  { X }
) )  =  m )
3029ancoms 453 . . . . . . . . . 10  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  ( A  \  { X } ) )  =  m )
31303adant1 1006 . . . . . . . . 9  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  ( A  \  { X }
) )  =  m )
32 suceq 4784 . . . . . . . . 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 2478 . . . . . . 7  |-  ( ( X  e.  A  /\  m  e.  om  /\  ( A  \  { X }
)  ~~  m )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )
35343expib 1190 . . . . . 6  |-  ( X  e.  A  ->  (
( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3635com12 31 . . . . 5  |-  ( ( m  e.  om  /\  ( A  \  { X } )  ~~  m
)  ->  ( X  e.  A  ->  ( card `  A )  =  suc  ( card `  ( A  \  { X } ) ) ) )
3736rexlimiva 2836 . . . 4  |-  ( E. m  e.  om  ( A  \  { X }
)  ~~  m  ->  ( X  e.  A  -> 
( card `  A )  =  suc  ( card `  ( A  \  { X }
) ) ) )
382, 37sylbi 195 . . 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 429 1  |-  ( ( A  e.  Fin  /\  X  e.  A )  ->  ( card `  A
)  =  suc  ( card `  ( A  \  { X } ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756   E.wrex 2716    \ cdif 3325    u. cun 3326    i^i cin 3327   (/)c0 3637   {csn 3877   class class class wbr 4292   Ord word 4718   suc csuc 4721   ` cfv 5418   omcom 6476    ~~ cen 7307   Fincfn 7310   cardccrd 8105
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4413  ax-nul 4421  ax-pow 4470  ax-pr 4531  ax-un 6372
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2568  df-ne 2608  df-ral 2720  df-rex 2721  df-rab 2724  df-v 2974  df-sbc 3187  df-dif 3331  df-un 3333  df-in 3335  df-ss 3342  df-pss 3344  df-nul 3638  df-if 3792  df-pw 3862  df-sn 3878  df-pr 3880  df-tp 3882  df-op 3884  df-uni 4092  df-int 4129  df-br 4293  df-opab 4351  df-mpt 4352  df-tr 4386  df-eprel 4632  df-id 4636  df-po 4641  df-so 4642  df-fr 4679  df-we 4681  df-ord 4722  df-on 4723  df-lim 4724  df-suc 4725  df-xp 4846  df-rel 4847  df-cnv 4848  df-co 4849  df-dm 4850  df-rn 4851  df-res 4852  df-ima 4853  df-iota 5381  df-fun 5420  df-fn 5421  df-f 5422  df-f1 5423  df-fo 5424  df-f1o 5425  df-fv 5426  df-om 6477  df-1o 6920  df-er 7101  df-en 7311  df-dom 7312  df-sdom 7313  df-fin 7314  df-card 8109
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator