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

Theorem fzennn 12181
Description: The cardinality of a finite set of sequential integers. (See om2uz0i 12161 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 6310 . . 3  |-  ( n  =  0  ->  (
1 ... n )  =  ( 1 ... 0
) )
2 fveq2 5878 . . 3  |-  ( n  =  0  ->  ( `' G `  n )  =  ( `' G `  0 ) )
31, 2breq12d 4433 . 2  |-  ( n  =  0  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... 0 ) 
~~  ( `' G `  0 ) ) )
4 oveq2 6310 . . 3  |-  ( n  =  m  ->  (
1 ... n )  =  ( 1 ... m
) )
5 fveq2 5878 . . 3  |-  ( n  =  m  ->  ( `' G `  n )  =  ( `' G `  m ) )
64, 5breq12d 4433 . 2  |-  ( n  =  m  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... m ) 
~~  ( `' G `  m ) ) )
7 oveq2 6310 . . 3  |-  ( n  =  ( m  + 
1 )  ->  (
1 ... n )  =  ( 1 ... (
m  +  1 ) ) )
8 fveq2 5878 . . 3  |-  ( n  =  ( m  + 
1 )  ->  ( `' G `  n )  =  ( `' G `  ( m  +  1 ) ) )
97, 8breq12d 4433 . 2  |-  ( n  =  ( m  + 
1 )  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... ( m  +  1 ) ) 
~~  ( `' G `  ( m  +  1 ) ) ) )
10 oveq2 6310 . . 3  |-  ( n  =  N  ->  (
1 ... n )  =  ( 1 ... N
) )
11 fveq2 5878 . . 3  |-  ( n  =  N  ->  ( `' G `  n )  =  ( `' G `  N ) )
1210, 11breq12d 4433 . 2  |-  ( n  =  N  ->  (
( 1 ... n
)  ~~  ( `' G `  n )  <->  ( 1 ... N ) 
~~  ( `' G `  N ) ) )
13 0ex 4553 . . . 4  |-  (/)  e.  _V
1413enref 7606 . . 3  |-  (/)  ~~  (/)
15 fz10 11821 . . 3  |-  ( 1 ... 0 )  =  (/)
16 0z 10949 . . . . . 6  |-  0  e.  ZZ
17 fzennn.1 . . . . . 6  |-  G  =  ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om )
1816, 17om2uzf1oi 12167 . . . . 5  |-  G : om
-1-1-onto-> ( ZZ>= `  0 )
19 peano1 6723 . . . . 5  |-  (/)  e.  om
2018, 19pm3.2i 456 . . . 4  |-  ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  (/)  e.  om )
2116, 17om2uz0i 12161 . . . 4  |-  ( G `
 (/) )  =  0
22 f1ocnvfv 6189 . . . 4  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  (/)  e.  om )  ->  ( ( G `  (/) )  =  0  -> 
( `' G ` 
0 )  =  (/) ) )
2320, 21, 22mp2 9 . . 3  |-  ( `' G `  0 )  =  (/)
2414, 15, 233brtr4i 4449 . 2  |-  ( 1 ... 0 )  ~~  ( `' G `  0 )
25 simpr 462 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... m )  ~~  ( `' G `  m ) )
26 ovex 6330 . . . . . . 7  |-  ( m  +  1 )  e. 
_V
27 fvex 5888 . . . . . . 7  |-  ( `' G `  m )  e.  _V
28 en2sn 7653 . . . . . . 7  |-  ( ( ( m  +  1 )  e.  _V  /\  ( `' G `  m )  e.  _V )  ->  { ( m  + 
1 ) }  ~~  { ( `' G `  m ) } )
2926, 27, 28mp2an 676 . . . . . 6  |-  { ( m  +  1 ) }  ~~  { ( `' G `  m ) }
3029a1i 11 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  { (
m  +  1 ) }  ~~  { ( `' G `  m ) } )
31 fzp1disj 11855 . . . . . 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 6195 . . . . . . . . . 10  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  m  e.  ( ZZ>=
`  0 ) )  ->  ( `' G `  m )  e.  om )
3418, 33mpan 674 . . . . . . . . 9  |-  ( m  e.  ( ZZ>= `  0
)  ->  ( `' G `  m )  e.  om )
35 nn0uz 11194 . . . . . . . . 9  |-  NN0  =  ( ZZ>= `  0 )
3634, 35eleq2s 2530 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( `' G `  m )  e.  om )
37 nnord 6711 . . . . . . . 8  |-  ( ( `' G `  m )  e.  om  ->  Ord  ( `' G `  m ) )
38 ordirr 5457 . . . . . . . 8  |-  ( Ord  ( `' G `  m )  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
3936, 37, 383syl 18 . . . . . . 7  |-  ( m  e.  NN0  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
4039adantr 466 . . . . . 6  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
41 disjsn 4057 . . . . . 6  |-  ( ( ( `' G `  m )  i^i  {
( `' G `  m ) } )  =  (/)  <->  -.  ( `' G `  m )  e.  ( `' G `  m ) )
4240, 41sylibr 215 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( ( `' G `  m )  i^i  { ( `' G `  m ) } )  =  (/) )
43 unen 7656 . . . . 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 1265 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( (
1 ... m )  u. 
{ ( m  + 
1 ) } ) 
~~  ( ( `' G `  m )  u.  { ( `' G `  m ) } ) )
45 1z 10968 . . . . . 6  |-  1  e.  ZZ
46 1m1e0 10679 . . . . . . . . . 10  |-  ( 1  -  1 )  =  0
4746fveq2i 5881 . . . . . . . . 9  |-  ( ZZ>= `  ( 1  -  1 ) )  =  (
ZZ>= `  0 )
4835, 47eqtr4i 2454 . . . . . . . 8  |-  NN0  =  ( ZZ>= `  ( 1  -  1 ) )
4948eleq2i 2500 . . . . . . 7  |-  ( m  e.  NN0  <->  m  e.  ( ZZ>=
`  ( 1  -  1 ) ) )
5049biimpi 197 . . . . . 6  |-  ( m  e.  NN0  ->  m  e.  ( ZZ>= `  ( 1  -  1 ) ) )
51 fzsuc2 11854 . . . . . 6  |-  ( ( 1  e.  ZZ  /\  m  e.  ( ZZ>= `  ( 1  -  1 ) ) )  -> 
( 1 ... (
m  +  1 ) )  =  ( ( 1 ... m )  u.  { ( m  +  1 ) } ) )
5245, 50, 51sylancr 667 . . . . 5  |-  ( m  e.  NN0  ->  ( 1 ... ( m  + 
1 ) )  =  ( ( 1 ... m )  u.  {
( m  +  1 ) } ) )
5352adantr 466 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... ( m  + 
1 ) )  =  ( ( 1 ... m )  u.  {
( m  +  1 ) } ) )
54 peano2 6724 . . . . . . . . 9  |-  ( ( `' G `  m )  e.  om  ->  suc  ( `' G `  m )  e.  om )
5536, 54syl 17 . . . . . . . 8  |-  ( m  e.  NN0  ->  suc  ( `' G `  m )  e.  om )
5655, 18jctil 539 . . . . . . 7  |-  ( m  e.  NN0  ->  ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  suc  ( `' G `  m )  e.  om ) )
5716, 17om2uzsuci 12162 . . . . . . . . 9  |-  ( ( `' G `  m )  e.  om  ->  ( G `  suc  ( `' G `  m ) )  =  ( ( G `  ( `' G `  m ) )  +  1 ) )
5836, 57syl 17 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( G `
 suc  ( `' G `  m )
)  =  ( ( G `  ( `' G `  m ) )  +  1 ) )
5935eleq2i 2500 . . . . . . . . . . 11  |-  ( m  e.  NN0  <->  m  e.  ( ZZ>=
`  0 ) )
6059biimpi 197 . . . . . . . . . 10  |-  ( m  e.  NN0  ->  m  e.  ( ZZ>= `  0 )
)
61 f1ocnvfv2 6188 . . . . . . . . . 10  |-  ( ( G : om -1-1-onto-> ( ZZ>= `  0 )  /\  m  e.  ( ZZ>=
`  0 ) )  ->  ( G `  ( `' G `  m ) )  =  m )
6218, 60, 61sylancr 667 . . . . . . . . 9  |-  ( m  e.  NN0  ->  ( G `
 ( `' G `  m ) )  =  m )
6362oveq1d 6317 . . . . . . . 8  |-  ( m  e.  NN0  ->  ( ( G `  ( `' G `  m ) )  +  1 )  =  ( m  + 
1 ) )
6458, 63eqtrd 2463 . . . . . . 7  |-  ( m  e.  NN0  ->  ( G `
 suc  ( `' G `  m )
)  =  ( m  +  1 ) )
65 f1ocnvfv 6189 . . . . . . 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 62 . . . . . 6  |-  ( m  e.  NN0  ->  ( `' G `  ( m  +  1 ) )  =  suc  ( `' G `  m ) )
6766adantr 466 . . . . 5  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( `' G `  ( m  +  1 ) )  =  suc  ( `' G `  m ) )
68 df-suc 5445 . . . . 5  |-  suc  ( `' G `  m )  =  ( ( `' G `  m )  u.  { ( `' G `  m ) } )
6967, 68syl6eq 2479 . . . 4  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( `' G `  ( m  +  1 ) )  =  ( ( `' G `  m )  u.  { ( `' G `  m ) } ) )
7044, 53, 693brtr4d 4451 . . 3  |-  ( ( m  e.  NN0  /\  ( 1 ... m
)  ~~  ( `' G `  m )
)  ->  ( 1 ... ( m  + 
1 ) )  ~~  ( `' G `  ( m  +  1 ) ) )
7170ex 435 . 2  |-  ( m  e.  NN0  ->  ( ( 1 ... m ) 
~~  ( `' G `  m )  ->  (
1 ... ( m  + 
1 ) )  ~~  ( `' G `  ( m  +  1 ) ) ) )
723, 6, 9, 12, 24, 71nn0ind 11031 1  |-  ( N  e.  NN0  ->  ( 1 ... N )  ~~  ( `' G `  N ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 370    = wceq 1437    e. wcel 1868   _Vcvv 3081    u. cun 3434    i^i cin 3435   (/)c0 3761   {csn 3996   class class class wbr 4420    |-> cmpt 4479   `'ccnv 4849    |` cres 4852   Ord word 5438   suc csuc 5441   -1-1-onto->wf1o 5597   ` cfv 5598  (class class class)co 6302   omcom 6703   reccrdg 7132    ~~ cen 7571   0cc0 9540   1c1 9541    + caddc 9543    - cmin 9861   NN0cn0 10870   ZZcz 10938   ZZ>=cuz 11160   ...cfz 11785
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1748  ax-6 1794  ax-7 1839  ax-8 1870  ax-9 1872  ax-10 1887  ax-11 1892  ax-12 1905  ax-13 2053  ax-ext 2400  ax-sep 4543  ax-nul 4552  ax-pow 4599  ax-pr 4657  ax-un 6594  ax-cnex 9596  ax-resscn 9597  ax-1cn 9598  ax-icn 9599  ax-addcl 9600  ax-addrcl 9601  ax-mulcl 9602  ax-mulrcl 9603  ax-mulcom 9604  ax-addass 9605  ax-mulass 9606  ax-distr 9607  ax-i2m1 9608  ax-1ne0 9609  ax-1rid 9610  ax-rnegex 9611  ax-rrecex 9612  ax-cnre 9613  ax-pre-lttri 9614  ax-pre-lttrn 9615  ax-pre-ltadd 9616  ax-pre-mulgt0 9617
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1787  df-eu 2269  df-mo 2270  df-clab 2408  df-cleq 2414  df-clel 2417  df-nfc 2572  df-ne 2620  df-nel 2621  df-ral 2780  df-rex 2781  df-reu 2782  df-rab 2784  df-v 3083  df-sbc 3300  df-csb 3396  df-dif 3439  df-un 3441  df-in 3443  df-ss 3450  df-pss 3452  df-nul 3762  df-if 3910  df-pw 3981  df-sn 3997  df-pr 3999  df-tp 4001  df-op 4003  df-uni 4217  df-iun 4298  df-br 4421  df-opab 4480  df-mpt 4481  df-tr 4516  df-eprel 4761  df-id 4765  df-po 4771  df-so 4772  df-fr 4809  df-we 4811  df-xp 4856  df-rel 4857  df-cnv 4858  df-co 4859  df-dm 4860  df-rn 4861  df-res 4862  df-ima 4863  df-pred 5396  df-ord 5442  df-on 5443  df-lim 5444  df-suc 5445  df-iota 5562  df-fun 5600  df-fn 5601  df-f 5602  df-f1 5603  df-fo 5604  df-f1o 5605  df-fv 5606  df-riota 6264  df-ov 6305  df-oprab 6306  df-mpt2 6307  df-om 6704  df-1st 6804  df-2nd 6805  df-wrecs 7033  df-recs 7095  df-rdg 7133  df-1o 7187  df-er 7368  df-en 7575  df-dom 7576  df-sdom 7577  df-pnf 9678  df-mnf 9679  df-xr 9680  df-ltxr 9681  df-le 9682  df-sub 9863  df-neg 9864  df-nn 10611  df-n0 10871  df-z 10939  df-uz 11161  df-fz 11786
This theorem is referenced by:  fzen2  12182  cardfz  12183
  Copyright terms: Public domain W3C validator