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

Theorem dif1card 7638
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 7089 . . 3  |-  ( A  e.  Fin  ->  ( A  \  { X }
)  e.  Fin )
2 isfi 6885 . . . 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 6940 . . . . . . . . . . . 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 3361 . . . . . . . . . . . . 13  |-  ( ( A  \  { X } )  i^i  { X } )  =  ( { X }  i^i  ( A  \  { X } ) )
7 disjdif 3526 . . . . . . . . . . . . 13  |-  ( { X }  i^i  ( A  \  { X }
) )  =  (/)
86, 7eqtri 2303 . . . . . . . . . . . 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 4664 . . . . . . . . . . . . . 14  |-  ( m  e.  om  ->  Ord  m )
11 ordirr 4410 . . . . . . . . . . . . . 14  |-  ( Ord  m  ->  -.  m  e.  m )
1210, 11syl 15 . . . . . . . . . . . . 13  |-  ( m  e.  om  ->  -.  m  e.  m )
13 disjsn 3693 . . . . . . . . . . . . 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 6943 . . . . . . . . . . 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 3761 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
( A  \  { X } )  u.  { X } )  =  A )
19 df-suc 4398 . . . . . . . . . . . . . 14  |-  suc  m  =  ( m  u. 
{ m } )
2019eqcomi 2287 . . . . . . . . . . . . 13  |-  ( m  u.  { m }
)  =  suc  m
2120a1i 10 . . . . . . . . . . . 12  |-  ( X  e.  A  ->  (
m  u.  { m } )  =  suc  m )
2218, 21breq12d 4036 . . . . . . . . . . 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 4676 . . . . . . . . . 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 7616 . . . . . . . . 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 7616 . . . . . . . . . . 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 4457 . . . . . . . . 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 2318 . . . . . . 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 2662 . . . 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 1623    e. wcel 1684   E.wrex 2544    \ cdif 3149    u. cun 3150    i^i cin 3151   (/)c0 3455   {csn 3640   class class class wbr 4023   Ord word 4391   suc csuc 4394   omcom 4656   ` cfv 5255    ~~ cen 6860   Fincfn 6863   cardccrd 7568
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-1o 6479  df-er 6660  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-card 7572
  Copyright terms: Public domain W3C validator