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

Theorem clwlkfclwwlk1hash 24615
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 3110 . 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 24537 . . . 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 12529 . . . . . 6  |-  ( A  e. Word  dom  E  ->  (
# `  A )  e.  NN0 )
7 ffn 5731 . . . . . 6  |-  ( B : ( 0 ... ( # `  A
) ) --> V  ->  B  Fn  ( 0 ... ( # `  A
) ) )
8 fz0hash 12466 . . . . . . 7  |-  ( ( ( # `  A
)  e.  NN0  /\  B  Fn  ( 0 ... ( # `  A
) ) )  -> 
( # `  B )  =  ( ( # `  A )  +  1 ) )
9 id 22 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  NN0 )
10 peano2nn0 10837 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 A )  +  1 )  e.  NN0 )
11 nn0re 10805 . . . . . . . . . . 11  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  RR )
1211lep1d 10478 . . . . . . . . . 10  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  <_  ( ( # `
 A )  +  1 ) )
13 elfz2nn0 11769 . . . . . . . . . 10  |-  ( (
# `  A )  e.  ( 0 ... (
( # `  A )  +  1 ) )  <-> 
( ( # `  A
)  e.  NN0  /\  ( ( # `  A
)  +  1 )  e.  NN0  /\  ( # `
 A )  <_ 
( ( # `  A
)  +  1 ) ) )
149, 10, 12, 13syl3anbrc 1180 . . . . . . . . 9  |-  ( (
# `  A )  e.  NN0  ->  ( # `  A
)  e.  ( 0 ... ( ( # `  A )  +  1 ) ) )
15 oveq2 6293 . . . . . . . . . 10  |-  ( (
# `  B )  =  ( ( # `  A )  +  1 )  ->  ( 0 ... ( # `  B
) )  =  ( 0 ... ( (
# `  A )  +  1 ) ) )
1615eleq2d 2537 . . . . . . . . 9  |-  ( (
# `  B )  =  ( ( # `  A )  +  1 )  ->  ( ( # `
 A )  e.  ( 0 ... ( # `
 B ) )  <-> 
( # `  A )  e.  ( 0 ... ( ( # `  A
)  +  1 ) ) ) )
1714, 16syl5ibrcom 222 . . . . . . . 8  |-  ( (
# `  A )  e.  NN0  ->  ( ( # `
 B )  =  ( ( # `  A
)  +  1 )  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) ) )
1817adantr 465 . . . . . . 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 477 . . . . 5  |-  ( ( A  e. Word  dom  E  /\  B : ( 0 ... ( # `  A
) ) --> V )  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) )
2120adantr 465 . . . 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 16 . . 3  |-  ( c  e.  ( V ClWalks  E
)  ->  ( # `  A
)  e.  ( 0 ... ( # `  B
) ) )
2322adantr 465 . 2  |-  ( ( c  e.  ( V ClWalks  E )  /\  ( # `
 A )  =  N )  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
242, 23sylbi 195 1  |-  ( c  e.  C  ->  ( # `
 A )  e.  ( 0 ... ( # `
 B ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1379    e. wcel 1767   A.wral 2814   {crab 2818   {cpr 4029   <.cop 4033   class class class wbr 4447    |-> cmpt 4505   dom cdm 4999    Fn wfn 5583   -->wf 5584   ` cfv 5588  (class class class)co 6285   1stc1st 6783   2ndc2nd 6784   0cc0 9493   1c1 9494    + caddc 9496    <_ cle 9630   NN0cn0 10796   ...cfz 11673  ..^cfzo 11793   #chash 12374  Word cword 12501   substr csubstr 12505   ClWalks cclwlk 24520
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6577  ax-cnex 9549  ax-resscn 9550  ax-1cn 9551  ax-icn 9552  ax-addcl 9553  ax-addrcl 9554  ax-mulcl 9555  ax-mulrcl 9556  ax-mulcom 9557  ax-addass 9558  ax-mulass 9559  ax-distr 9560  ax-i2m1 9561  ax-1ne0 9562  ax-1rid 9563  ax-rnegex 9564  ax-rrecex 9565  ax-cnre 9566  ax-pre-lttri 9567  ax-pre-lttrn 9568  ax-pre-ltadd 9569  ax-pre-mulgt0 9570
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6246  df-ov 6288  df-oprab 6289  df-mpt2 6290  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7043  df-rdg 7077  df-1o 7131  df-oadd 7135  df-er 7312  df-map 7423  df-pm 7424  df-en 7518  df-dom 7519  df-sdom 7520  df-fin 7521  df-card 8321  df-pnf 9631  df-mnf 9632  df-xr 9633  df-ltxr 9634  df-le 9635  df-sub 9808  df-neg 9809  df-nn 10538  df-n0 10797  df-z 10866  df-uz 11084  df-fz 11674  df-fzo 11794  df-hash 12375  df-word 12509  df-wlk 24281  df-clwlk 24523
This theorem is referenced by:  clwlkfclwwlk2sswd  24616  clwlkfclwwlk  24617
  Copyright terms: Public domain W3C validator