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

Theorem clwlkfclwwlk1hash 25456
Description: The size of the first component of a closed walk is an integer in the range between 0 and the size of the second component. (Contributed by Alexander van der Vekens, 25-Jun-2018.)
Hypotheses
Ref Expression
clwlkfclwwlk.1  |-  A  =  ( 1st `  c
)
clwlkfclwwlk.2  |-  B  =  ( 2nd `  c
)
clwlkfclwwlk.c  |-  C  =  { c  e.  ( V ClWalks  E )  |  (
# `  A )  =  N }
clwlkfclwwlk.f  |-  F  =  ( c  e.  C  |->  ( B substr  <. 0 ,  ( # `  A
) >. ) )
Assertion
Ref Expression
clwlkfclwwlk1hash  |-  ( c  e.  C  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
Distinct variable groups:    E, c    N, c    V, c
Allowed substitution hints:    A( c)    B( c)    C( c)    F( c)

Proof of Theorem clwlkfclwwlk1hash
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 clwlkfclwwlk.c . . 3  |-  C  =  { c  e.  ( V ClWalks  E )  |  (
# `  A )  =  N }
21rabeq2i 3075 . 2  |-  ( c  e.  C  <->  ( c  e.  ( V ClWalks  E )  /\  ( # `  A
)  =  N ) )
3 clwlkfclwwlk.1 . . . . 5  |-  A  =  ( 1st `  c
)
4 clwlkfclwwlk.2 . . . . 5  |-  B  =  ( 2nd `  c
)
53, 4clwlkcompim 25378 . . . 4  |-  ( c  e.  ( V ClWalks  E
)  ->  ( ( A  e. Word  dom  E  /\  B : ( 0 ... ( # `  A
) ) --> V )  /\  ( A. i  e.  ( 0..^ ( # `  A ) ) ( E `  ( A `
 i ) )  =  { ( B `
 i ) ,  ( B `  (
i  +  1 ) ) }  /\  ( B `  0 )  =  ( B `  ( # `  A ) ) ) ) )
6 lencl 12663 . . . . . 6  |-  ( A  e. Word  dom  E  ->  (
# `  A )  e.  NN0 )
7 ffn 5737 . . . . . 6  |-  ( B : ( 0 ... ( # `  A
) ) --> V  ->  B  Fn  ( 0 ... ( # `  A
) ) )
8 fz0hash 12597 . . . . . . 7  |-  ( ( ( # `  A
)  e.  NN0  /\  B  Fn  ( 0 ... ( # `  A
) ) )  -> 
( # `  B )  =  ( ( # `  A )  +  1 ) )
9 id 23 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  NN0 )
10 peano2nn0 10899 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 A )  +  1 )  e.  NN0 )
11 nn0re 10867 . . . . . . . . . . 11  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  RR )
1211lep1d 10527 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  <_  ( ( # `
 A )  +  1 ) )
13 elfz2nn0 11872 . . . . . . . . . 10  |-  ( (
# `  A )  e.  ( 0 ... (
( # `  A )  +  1 ) )  <-> 
( ( # `  A
)  e.  NN0  /\  ( ( # `  A
)  +  1 )  e.  NN0  /\  ( # `
 A )  <_ 
( ( # `  A
)  +  1 ) ) )
149, 10, 12, 13syl3anbrc 1189 . . . . . . . . 9  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  ( 0 ... ( ( # `  A )  +  1 ) ) )
15 oveq2 6304 . . . . . . . . . 10  |-  ( (
# `  B )  =  ( ( # `  A )  +  1 )  ->  ( 0 ... ( # `  B
) )  =  ( 0 ... ( (
# `  A )  +  1 ) ) )
1615eleq2d 2490 . . . . . . . . 9  |-  ( (
# `  B )  =  ( ( # `  A )  +  1 )  ->  ( ( # `
 A )  e.  ( 0 ... ( # `
 B ) )  <-> 
( # `  A )  e.  ( 0 ... ( ( # `  A
)  +  1 ) ) ) )
1714, 16syl5ibrcom 225 . . . . . . . 8  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 B )  =  ( ( # `  A
)  +  1 )  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) ) )
1817adantr 466 . . . . . . 7  |-  ( ( ( # `  A
)  e.  NN0  /\  B  Fn  ( 0 ... ( # `  A
) ) )  -> 
( ( # `  B
)  =  ( (
# `  A )  +  1 )  -> 
( # `  A )  e.  ( 0 ... ( # `  B
) ) ) )
198, 18mpd 15 . . . . . 6  |-  ( ( ( # `  A
)  e.  NN0  /\  B  Fn  ( 0 ... ( # `  A
) ) )  -> 
( # `  A )  e.  ( 0 ... ( # `  B
) ) )
206, 7, 19syl2an 479 . . . . 5  |-  ( ( A  e. Word  dom  E  /\  B : ( 0 ... ( # `  A
) ) --> V )  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) )
2120adantr 466 . . . 4  |-  ( ( ( A  e. Word  dom  E  /\  B : ( 0 ... ( # `  A ) ) --> V )  /\  ( A. i  e.  ( 0..^ ( # `  A
) ) ( E `
 ( A `  i ) )  =  { ( B `  i ) ,  ( B `  ( i  +  1 ) ) }  /\  ( B `
 0 )  =  ( B `  ( # `
 A ) ) ) )  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
225, 21syl 17 . . 3  |-  ( c  e.  ( V ClWalks  E
)  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) )
2322adantr 466 . 2  |-  ( ( c  e.  ( V ClWalks  E )  /\  ( # `
 A )  =  N )  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
242, 23sylbi 198 1  |-  ( c  e.  C  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 370    = wceq 1437    e. wcel 1867   A.wral 2773   {crab 2777   {cpr 3995   <.cop 3999   class class class wbr 4417    |-> cmpt 4475   dom cdm 4845    Fn wfn 5587   -->wf 5588   ` cfv 5592  (class class class)co 6296   1stc1st 6796   2ndc2nd 6797   0cc0 9528   1c1 9529    + caddc 9531    <_ cle 9665   NN0cn0 10858   ...cfz 11771  ..^cfzo 11902   #chash 12501  Word cword 12632   substr csubstr 12636   ClWalks cclwlk 25361
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 1838  ax-8 1869  ax-9 1871  ax-10 1886  ax-11 1891  ax-12 1904  ax-13 2052  ax-ext 2398  ax-rep 4529  ax-sep 4539  ax-nul 4547  ax-pow 4594  ax-pr 4652  ax-un 6588  ax-cnex 9584  ax-resscn 9585  ax-1cn 9586  ax-icn 9587  ax-addcl 9588  ax-addrcl 9589  ax-mulcl 9590  ax-mulrcl 9591  ax-mulcom 9592  ax-addass 9593  ax-mulass 9594  ax-distr 9595  ax-i2m1 9596  ax-1ne0 9597  ax-1rid 9598  ax-rnegex 9599  ax-rrecex 9600  ax-cnre 9601  ax-pre-lttri 9602  ax-pre-lttrn 9603  ax-pre-ltadd 9604  ax-pre-mulgt0 9605
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 2267  df-mo 2268  df-clab 2406  df-cleq 2412  df-clel 2415  df-nfc 2570  df-ne 2618  df-nel 2619  df-ral 2778  df-rex 2779  df-reu 2780  df-rmo 2781  df-rab 2782  df-v 3080  df-sbc 3297  df-csb 3393  df-dif 3436  df-un 3438  df-in 3440  df-ss 3447  df-pss 3449  df-nul 3759  df-if 3907  df-pw 3978  df-sn 3994  df-pr 3996  df-tp 3998  df-op 4000  df-uni 4214  df-int 4250  df-iun 4295  df-br 4418  df-opab 4476  df-mpt 4477  df-tr 4512  df-eprel 4756  df-id 4760  df-po 4766  df-so 4767  df-fr 4804  df-we 4806  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-pred 5390  df-ord 5436  df-on 5437  df-lim 5438  df-suc 5439  df-iota 5556  df-fun 5594  df-fn 5595  df-f 5596  df-f1 5597  df-fo 5598  df-f1o 5599  df-fv 5600  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6698  df-1st 6798  df-2nd 6799  df-wrecs 7027  df-recs 7089  df-rdg 7127  df-1o 7181  df-oadd 7185  df-er 7362  df-map 7473  df-pm 7474  df-en 7569  df-dom 7570  df-sdom 7571  df-fin 7572  df-card 8363  df-cda 8587  df-pnf 9666  df-mnf 9667  df-xr 9668  df-ltxr 9669  df-le 9670  df-sub 9851  df-neg 9852  df-nn 10599  df-2 10657  df-n0 10859  df-z 10927  df-uz 11149  df-fz 11772  df-fzo 11903  df-hash 12502  df-word 12640  df-wlk 25122  df-clwlk 25364
This theorem is referenced by:  clwlkfclwwlk2sswd  25457  clwlkfclwwlk  25458
  Copyright terms: Public domain W3C validator