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

Theorem fzennn 11227
Description: The cardinality of a finite set of sequential integers. (See om2uz0i 11207 for a description of the hypothesis.) (Contributed by Mario Carneiro, 12-Feb-2013.) (Revised by Mario Carneiro, 7-Mar-2014.)
Hypothesis
Ref Expression
fzennn.1  |-  G  =  ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om )
Assertion
Ref Expression
fzennn  |-  ( N  e.  NN0  ->  ( 1 ... N )  ~~  ( `' G `  N ) )

Proof of Theorem fzennn
Dummy variables  m  n are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 6021 . . 3  |-  ( n  =  0  ->  (
1 ... n )  =  ( 1 ... 0
) )
2 fveq2 5661 . . 3  |-  ( n  =  0  ->  ( `' G `  n )  =  ( `' G `  0 ) )
31, 2breq12d 4159 . 2  |-  ( n  =  0  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... 0 ) 
~~  ( `' G `  0 ) ) )
4 oveq2 6021 . . 3  |-  ( n  =  m  ->  (
1 ... n )  =  ( 1 ... m
) )
5 fveq2 5661 . . 3  |-  ( n  =  m  ->  ( `' G `  n )  =  ( `' G `  m ) )
64, 5breq12d 4159 . 2  |-  ( n  =  m  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... m ) 
~~  ( `' G `  m ) ) )
7 oveq2 6021 . . 3  |-  ( n  =  ( m  + 
1 )  ->  (
1 ... n )  =  ( 1 ... (
m  +  1 ) ) )
8 fveq2 5661 . . 3  |-  ( n  =  ( m  + 
1 )  ->  ( `' G `  n )  =  ( `' G `  ( m  +  1 ) ) )
97, 8breq12d 4159 . 2  |-  ( n  =  ( m  + 
1 )  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... ( m  +  1 ) ) 
~~  ( `' G `  ( m  +  1 ) ) ) )
10 oveq2 6021 . . 3  |-  ( n  =  N  ->  (
1 ... n )  =  ( 1 ... N
) )
11 fveq2 5661 . . 3  |-  ( n  =  N  ->  ( `' G `  n )  =  ( `' G `  N ) )
1210, 11breq12d 4159 . 2  |-  ( n  =  N  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... N ) 
~~  ( `' G `  N ) ) )
13 0ex 4273 . . . 4  |-  (/)  e.  _V
1413enref 7069 . . 3  |-  (/)  ~~  (/)
15 fz10 11000 . . 3  |-  ( 1 ... 0 )  =  (/)
16 0z 10218 . . . . . 6  |-  0  e.  ZZ
17 fzennn.1 . . . . . 6  |-  G  =  ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om )
1816, 17om2uzf1oi 11213 . . . . 5  |-  G : om
-1-1-onto-> ( ZZ>= `  0 )
19 peano1 4797 . . . . 5  |-  (/)  e.  om
2018, 19pm3.2i 442 . . . 4  |-  ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  (/)  e.  om )
2116, 17om2uz0i 11207 . . . 4  |-  ( G `
 (/) )  =  0
22 f1ocnvfv 5948 . . . 4  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  (/)  e.  om )  ->  ( ( G `  (/) )  =  0  -> 
( `' G ` 
0 )  =  (/) ) )
2320, 21, 22mp2 9 . . 3  |-  ( `' G `  0 )  =  (/)
2414, 15, 233brtr4i 4174 . 2  |-  ( 1 ... 0 )  ~~  ( `' G `  0 )
25 simpr 448 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... m )  ~~  ( `' G `  m ) )
26 ovex 6038 . . . . . . 7  |-  ( m  +  1 )  e. 
_V
27 fvex 5675 . . . . . . 7  |-  ( `' G `  m )  e.  _V
28 en2sn 7115 . . . . . . 7  |-  ( ( ( m  +  1 )  e.  _V  /\  ( `' G `  m )  e.  _V )  ->  { ( m  + 
1 ) }  ~~  { ( `' G `  m ) } )
2926, 27, 28mp2an 654 . . . . . 6  |-  { ( m  +  1 ) }  ~~  { ( `' G `  m ) }
3029a1i 11 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  { (
m  +  1 ) }  ~~  { ( `' G `  m ) } )
31 fzp1disj 11029 . . . . . 6  |-  ( ( 1 ... m )  i^i  { ( m  +  1 ) } )  =  (/)
3231a1i 11 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( (
1 ... m )  i^i 
{ ( m  + 
1 ) } )  =  (/) )
33 f1ocnvdm 5950 . . . . . . . . . 10  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  m  e.  ( ZZ>=
`  0 ) )  ->  ( `' G `  m )  e.  om )
3418, 33mpan 652 . . . . . . . . 9  |-  ( m  e.  ( ZZ>= `  0
)  ->  ( `' G `  m )  e.  om )
35 nn0uz 10445 . . . . . . . . 9  |-  NN0  =  ( ZZ>= `  0 )
3634, 35eleq2s 2472 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( `' G `  m )  e.  om )
37 nnord 4786 . . . . . . . 8  |-  ( ( `' G `  m )  e.  om  ->  Ord  ( `' G `  m ) )
38 ordirr 4533 . . . . . . . 8  |-  ( Ord  ( `' G `  m )  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
3936, 37, 383syl 19 . . . . . . 7  |-  ( m  e.  NN0  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
4039adantr 452 . . . . . 6  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
41 disjsn 3804 . . . . . 6  |-  ( ( ( `' G `  m )  i^i  {
( `' G `  m ) } )  =  (/)  <->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
4240, 41sylibr 204 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( ( `' G `  m )  i^i  { ( `' G `  m ) } )  =  (/) )
43 unen 7118 . . . . 5  |-  ( ( ( ( 1 ... m )  ~~  ( `' G `  m )  /\  { ( m  +  1 ) } 
~~  { ( `' G `  m ) } )  /\  (
( ( 1 ... m )  i^i  {
( m  +  1 ) } )  =  (/)  /\  ( ( `' G `  m )  i^i  { ( `' G `  m ) } )  =  (/) ) )  ->  (
( 1 ... m
)  u.  { ( m  +  1 ) } )  ~~  (
( `' G `  m )  u.  {
( `' G `  m ) } ) )
4425, 30, 32, 42, 43syl22anc 1185 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( (
1 ... m )  u. 
{ ( m  + 
1 ) } ) 
~~  ( ( `' G `  m )  u.  { ( `' G `  m ) } ) )
45 1z 10236 . . . . . 6  |-  1  e.  ZZ
46 1m1e0 9993 . . . . . . . . . 10  |-  ( 1  -  1 )  =  0
4746fveq2i 5664 . . . . . . . . 9  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
4835, 47eqtr4i 2403 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
4948eleq2i 2444 . . . . . . 7  |-  ( m  e.  NN0  <->  m  e.  ( ZZ>=
`  ( 1  -  1 ) ) )
5049biimpi 187 . . . . . 6  |-  ( m  e.  NN0  ->  m  e.  ( ZZ>= `  ( 1  -  1 ) ) )
51 fzsuc2 11028 . . . . . 6  |-  ( ( 1  e.  ZZ  /\  m  e.  ( ZZ>= `  ( 1  -  1 ) ) )  -> 
( 1 ... (
m  +  1 ) )  =  ( ( 1 ... m )  u.  { ( m  +  1 ) } ) )
5245, 50, 51sylancr 645 . . . . 5  |-  ( m  e.  NN0  ->  ( 1 ... ( m  + 
1 ) )  =  ( ( 1 ... m )  u.  {
( m  +  1 ) } ) )
5352adantr 452 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... ( m  + 
1 ) )  =  ( ( 1 ... m )  u.  {
( m  +  1 ) } ) )
54 peano2 4798 . . . . . . . . 9  |-  ( ( `' G `  m )  e.  om  ->  suc  ( `' G `  m )  e.  om )
5536, 54syl 16 . . . . . . . 8  |-  ( m  e.  NN0  ->  suc  ( `' G `  m )  e.  om )
5655, 18jctil 524 . . . . . . 7  |-  ( m  e.  NN0  ->  ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  suc  ( `' G `  m )  e.  om ) )
5716, 17om2uzsuci 11208 . . . . . . . . 9  |-  ( ( `' G `  m )  e.  om  ->  ( G `  suc  ( `' G `  m ) )  =  ( ( G `  ( `' G `  m ) )  +  1 ) )
5836, 57syl 16 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( G `
 suc  ( `' G `  m )
)  =  ( ( G `  ( `' G `  m ) )  +  1 ) )
5935eleq2i 2444 . . . . . . . . . . 11  |-  ( m  e.  NN0  <->  m  e.  ( ZZ>=
`  0 ) )
6059biimpi 187 . . . . . . . . . 10  |-  ( m  e.  NN0  ->  m  e.  ( ZZ>= `  0 )
)
61 f1ocnvfv2 5947 . . . . . . . . . 10  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  m  e.  ( ZZ>=
`  0 ) )  ->  ( G `  ( `' G `  m ) )  =  m )
6218, 60, 61sylancr 645 . . . . . . . . 9  |-  ( m  e.  NN0  ->  ( G `
 ( `' G `  m ) )  =  m )
6362oveq1d 6028 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( ( G `  ( `' G `  m ) )  +  1 )  =  ( m  + 
1 ) )
6458, 63eqtrd 2412 . . . . . . 7  |-  ( m  e.  NN0  ->  ( G `
 suc  ( `' G `  m )
)  =  ( m  +  1 ) )
65 f1ocnvfv 5948 . . . . . . 7  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  suc  ( `' G `  m )  e.  om )  ->  ( ( G `
 suc  ( `' G `  m )
)  =  ( m  +  1 )  -> 
( `' G `  ( m  +  1
) )  =  suc  ( `' G `  m ) ) )
6656, 64, 65sylc 58 . . . . . 6  |-  ( m  e.  NN0  ->  ( `' G `  ( m  +  1 ) )  =  suc  ( `' G `  m ) )
6766adantr 452 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( `' G `  ( m  +  1 ) )  =  suc  ( `' G `  m ) )
68 df-suc 4521 . . . . 5  |-  suc  ( `' G `  m )  =  ( ( `' G `  m )  u.  { ( `' G `  m ) } )
6967, 68syl6eq 2428 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( `' G `  ( m  +  1 ) )  =  ( ( `' G `  m )  u.  { ( `' G `  m ) } ) )
7044, 53, 693brtr4d 4176 . . 3  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... ( m  + 
1 ) )  ~~  ( `' G `  ( m  +  1 ) ) )
7170ex 424 . 2  |-  ( m  e.  NN0  ->  ( ( 1 ... m ) 
~~  ( `' G `  m )  ->  (
1 ... ( m  + 
1 ) )  ~~  ( `' G `  ( m  +  1 ) ) ) )
723, 6, 9, 12, 24, 71nn0ind 10291 1  |-  ( N  e.  NN0  ->  ( 1 ... N )  ~~  ( `' G `  N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1717   _Vcvv 2892    u. cun 3254    i^i cin 3255   (/)c0 3564   {csn 3750   class class class wbr 4146    e. cmpt 4200   Ord word 4514   suc csuc 4517   omcom 4778   `'ccnv 4810    |` cres 4813   -1-1-onto->wf1o 5386   ` cfv 5387  (class class class)co 6013   reccrdg 6596    ~~ cen 7035   0cc0 8916   1c1 8917    + caddc 8919    - cmin 9216   NN0cn0 10146   ZZcz 10207   ZZ>=cuz 10413   ...cfz 10968
This theorem is referenced by:  fzen2  11228  cardfz  11229
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 1661  ax-8 1682  ax-13 1719  ax-14 1721  ax-6 1736  ax-7 1741  ax-11 1753  ax-12 1939  ax-ext 2361  ax-sep 4264  ax-nul 4272  ax-pow 4311  ax-pr 4337  ax-un 4634  ax-cnex 8972  ax-resscn 8973  ax-1cn 8974  ax-icn 8975  ax-addcl 8976  ax-addrcl 8977  ax-mulcl 8978  ax-mulrcl 8979  ax-mulcom 8980  ax-addass 8981  ax-mulass 8982  ax-distr 8983  ax-i2m1 8984  ax-1ne0 8985  ax-1rid 8986  ax-rnegex 8987  ax-rrecex 8988  ax-cnre 8989  ax-pre-lttri 8990  ax-pre-lttrn 8991  ax-pre-ltadd 8992  ax-pre-mulgt0 8993
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 2235  df-mo 2236  df-clab 2367  df-cleq 2373  df-clel 2376  df-nfc 2505  df-ne 2545  df-nel 2546  df-ral 2647  df-rex 2648  df-reu 2649  df-rab 2651  df-v 2894  df-sbc 3098  df-csb 3188  df-dif 3259  df-un 3261  df-in 3263  df-ss 3270  df-pss 3272  df-nul 3565  df-if 3676  df-pw 3737  df-sn 3756  df-pr 3757  df-tp 3758  df-op 3759  df-uni 3951  df-iun 4030  df-br 4147  df-opab 4201  df-mpt 4202  df-tr 4237  df-eprel 4428  df-id 4432  df-po 4437  df-so 4438  df-fr 4475  df-we 4477  df-ord 4518  df-on 4519  df-lim 4520  df-suc 4521  df-om 4779  df-xp 4817  df-rel 4818  df-cnv 4819  df-co 4820  df-dm 4821  df-rn 4822  df-res 4823  df-ima 4824  df-iota 5351  df-fun 5389  df-fn 5390  df-f 5391  df-f1 5392  df-fo 5393  df-f1o 5394  df-fv 5395  df-ov 6016  df-oprab 6017  df-mpt2 6018  df-1st 6281  df-2nd 6282  df-riota 6478  df-recs 6562  df-rdg 6597  df-1o 6653  df-er 6834  df-en 7039  df-dom 7040  df-sdom 7041  df-pnf 9048  df-mnf 9049  df-xr 9050  df-ltxr 9051  df-le 9052  df-sub 9218  df-neg 9219  df-nn 9926  df-n0 10147  df-z 10208  df-uz 10414  df-fz 10969
  Copyright terms: Public domain W3C validator