Users' Mathboxes Mathbox for Alexander van der Vekens < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  clwlkisclwwlk Structured version   Unicode version

Theorem clwlkisclwwlk 30449
Description: A closed walk as word corresponds to a closed walk in an undirected graph. (Contributed by Alexander van der Vekens, 22-Jun-2018.)
Assertion
Ref Expression
clwlkisclwwlk  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( E. f 
f ( V ClWalks  E
) P  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. )  e.  ( V ClWWalks  E ) ) ) )
Distinct variable groups:    f, E    P, f    f, V

Proof of Theorem clwlkisclwwlk
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 clwlkisclwwlklem0 30448 . . 3  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( E. f
( ( f  e. Word  dom  E  /\  P :
( 0 ... ( # `
 f ) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) )  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( A. i  e.  ( 0..^ ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) ) { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  (
( # `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E ) ) ) )
2 lencl 12248 . . . . . . . . . . . . . 14  |-  ( P  e. Word  V  ->  ( # `
 P )  e. 
NN0 )
3 ige2m1fz 30204 . . . . . . . . . . . . . 14  |-  ( ( ( # `  P
)  e.  NN0  /\  2  <_  ( # `  P
) )  ->  (
( # `  P )  -  1 )  e.  ( 0 ... ( # `
 P ) ) )
42, 3sylan 471 . . . . . . . . . . . . 13  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( # `  P )  -  1 )  e.  ( 0 ... ( # `
 P ) ) )
5 swrd0len 12317 . . . . . . . . . . . . 13  |-  ( ( P  e. Word  V  /\  ( ( # `  P
)  -  1 )  e.  ( 0 ... ( # `  P
) ) )  -> 
( # `  ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) )  =  ( ( # `  P
)  -  1 ) )
64, 5syldan 470 . . . . . . . . . . . 12  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( # `
 ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  =  ( ( # `  P
)  -  1 ) )
72nn0cnd 10637 . . . . . . . . . . . . . . . 16  |-  ( P  e. Word  V  ->  ( # `
 P )  e.  CC )
8 ax-1cn 9339 . . . . . . . . . . . . . . . . 17  |-  1  e.  CC
98a1i 11 . . . . . . . . . . . . . . . 16  |-  ( P  e. Word  V  ->  1  e.  CC )
107, 9subcld 9718 . . . . . . . . . . . . . . 15  |-  ( P  e. Word  V  ->  (
( # `  P )  -  1 )  e.  CC )
1110subid1d 9707 . . . . . . . . . . . . . 14  |-  ( P  e. Word  V  ->  (
( ( # `  P
)  -  1 )  -  0 )  =  ( ( # `  P
)  -  1 ) )
1211eqcomd 2447 . . . . . . . . . . . . 13  |-  ( P  e. Word  V  ->  (
( # `  P )  -  1 )  =  ( ( ( # `  P )  -  1 )  -  0 ) )
1312adantr 465 . . . . . . . . . . . 12  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( # `  P )  -  1 )  =  ( ( ( # `  P )  -  1 )  -  0 ) )
146, 13eqtrd 2474 . . . . . . . . . . 11  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( # `
 ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  =  ( ( ( # `  P )  -  1 )  -  0 ) )
1514oveq1d 6105 . . . . . . . . . 10  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( # `  ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) )  -  1 )  =  ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) )
1615oveq2d 6106 . . . . . . . . 9  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  - 
1 ) )  =  ( 0..^ ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) ) )
176oveq1d 6105 . . . . . . . . . . . . 13  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( # `  ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) )  -  1 )  =  ( ( ( # `  P
)  -  1 )  -  1 ) )
1817oveq2d 6106 . . . . . . . . . . . 12  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  - 
1 ) )  =  ( 0..^ ( ( ( # `  P
)  -  1 )  -  1 ) ) )
1918eleq2d 2509 . . . . . . . . . . 11  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) )  <->  i  e.  ( 0..^ ( ( (
# `  P )  -  1 )  - 
1 ) ) ) )
20 simpll 753 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  P  e. Word  V )
21 wrdlenge2n0 12260 . . . . . . . . . . . . . . . 16  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  P  =/=  (/) )
2221adantr 465 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  P  =/=  (/) )
232adantr 465 . . . . . . . . . . . . . . . 16  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( # `
 P )  e. 
NN0 )
24 elfzom1elfzo 30215 . . . . . . . . . . . . . . . 16  |-  ( ( ( # `  P
)  e.  NN0  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  i  e.  ( 0..^ ( (
# `  P )  -  1 ) ) )
2523, 24sylan 471 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  i  e.  ( 0..^ ( (
# `  P )  -  1 ) ) )
26 swrdtrcfv 12336 . . . . . . . . . . . . . . 15  |-  ( ( P  e. Word  V  /\  P  =/=  (/)  /\  i  e.  ( 0..^ ( (
# `  P )  -  1 ) ) )  ->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  i )  =  ( P `  i ) )
2720, 22, 25, 26syl3anc 1218 . . . . . . . . . . . . . 14  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  (
( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  i )  =  ( P `  i ) )
28 nn0z 10668 . . . . . . . . . . . . . . . . . 18  |-  ( (
# `  P )  e.  NN0  ->  ( # `  P
)  e.  ZZ )
29 peano2zm 10687 . . . . . . . . . . . . . . . . . 18  |-  ( (
# `  P )  e.  ZZ  ->  ( ( # `
 P )  - 
1 )  e.  ZZ )
3028, 29syl 16 . . . . . . . . . . . . . . . . 17  |-  ( (
# `  P )  e.  NN0  ->  ( ( # `
 P )  - 
1 )  e.  ZZ )
31 elfzom1elp1fzo 30216 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ( # `  P
)  -  1 )  e.  ZZ  /\  i  e.  ( 0..^ ( ( ( # `  P
)  -  1 )  -  1 ) ) )  ->  ( i  +  1 )  e.  ( 0..^ ( (
# `  P )  -  1 ) ) )
3230, 31sylan 471 . . . . . . . . . . . . . . . 16  |-  ( ( ( # `  P
)  e.  NN0  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  (
i  +  1 )  e.  ( 0..^ ( ( # `  P
)  -  1 ) ) )
3323, 32sylan 471 . . . . . . . . . . . . . . 15  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  (
i  +  1 )  e.  ( 0..^ ( ( # `  P
)  -  1 ) ) )
34 swrdtrcfv 12336 . . . . . . . . . . . . . . 15  |-  ( ( P  e. Word  V  /\  P  =/=  (/)  /\  ( i  +  1 )  e.  ( 0..^ ( (
# `  P )  -  1 ) ) )  ->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) )  =  ( P `  ( i  +  1 ) ) )
3520, 22, 33, 34syl3anc 1218 . . . . . . . . . . . . . 14  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  (
( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) )  =  ( P `  ( i  +  1 ) ) )
3627, 35preq12d 3961 . . . . . . . . . . . . 13  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  =  { ( P `  i ) ,  ( P `  ( i  +  1 ) ) } )
3736eleq1d 2508 . . . . . . . . . . . 12  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) ) )  ->  ( { ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) `  i ) ,  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E ) )
3837ex 434 . . . . . . . . . . 11  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
i  e.  ( 0..^ ( ( ( # `  P )  -  1 )  -  1 ) )  ->  ( {
( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E ) ) )
3919, 38sylbid 215 . . . . . . . . . 10  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) )  ->  ( { ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) `  i ) ,  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E ) ) )
4039imp 429 . . . . . . . . 9  |-  ( ( ( P  e. Word  V  /\  2  <_  ( # `  P ) )  /\  i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) )  -> 
( { ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  i ) ,  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E ) )
4116, 40raleqbidva 2932 . . . . . . . 8  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( A. i  e.  (
0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  - 
1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  <->  A. i  e.  ( 0..^ ( ( ( (
# `  P )  -  1 )  - 
0 )  -  1 ) ) { ( P `  i ) ,  ( P `  ( i  +  1 ) ) }  e.  ran  E ) )
42 swrdtrcfvl 12343 . . . . . . . . . 10  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) )  =  ( P `  (
( # `  P )  -  2 ) ) )
43 swrdtrcfv0 12337 . . . . . . . . . 10  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  0 )  =  ( P ` 
0 ) )
4442, 43preq12d 3961 . . . . . . . . 9  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  =  {
( P `  (
( # `  P )  -  2 ) ) ,  ( P ` 
0 ) } )
4544eleq1d 2508 . . . . . . . 8  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  ( { ( lastS  `  ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E  <->  { ( P `  ( ( # `  P
)  -  2 ) ) ,  ( P `
 0 ) }  e.  ran  E ) )
4641, 45anbi12d 710 . . . . . . 7  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( A. i  e.  ( 0..^ ( (
# `  ( P substr  <.
0 ,  ( (
# `  P )  -  1 ) >.
) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E )  <->  ( A. i  e.  ( 0..^ ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) ) { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  (
( # `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E ) ) )
4746bicomd 201 . . . . . 6  |-  ( ( P  e. Word  V  /\  2  <_  ( # `  P
) )  ->  (
( A. i  e.  ( 0..^ ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) ) { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  (
( # `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E )  <->  ( A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
48473adant1 1006 . . . . 5  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( A. i  e.  ( 0..^ ( ( ( (
# `  P )  -  1 )  - 
0 )  -  1 ) ) { ( P `  i ) ,  ( P `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  ( (
# `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E )  <->  ( A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
49 swrdcl 12314 . . . . . . 7  |-  ( P  e. Word  V  ->  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. )  e. Word  V )
50493ad2ant2 1010 . . . . . 6  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. )  e. Word  V
)
51503biant1d 1327 . . . . 5  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E )  <->  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
5248, 51bitrd 253 . . . 4  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( A. i  e.  ( 0..^ ( ( ( (
# `  P )  -  1 )  - 
0 )  -  1 ) ) { ( P `  i ) ,  ( P `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  ( (
# `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E )  <->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. )  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
5352anbi2d 703 . . 3  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( ( lastS  `  P )  =  ( P `  0 )  /\  ( A. i  e.  ( 0..^ ( ( ( ( # `  P
)  -  1 )  -  0 )  - 
1 ) ) { ( P `  i
) ,  ( P `
 ( i  +  1 ) ) }  e.  ran  E  /\  { ( P `  (
( # `  P )  -  2 ) ) ,  ( P ` 
0 ) }  e.  ran  E ) )  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) ) )
541, 53bitrd 253 . 2  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( E. f
( ( f  e. Word  dom  E  /\  P :
( 0 ... ( # `
 f ) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) )  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) ) )
55 usgrav 23269 . . . . . 6  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
56 isclwlk 30419 . . . . . . 7  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( f ( V ClWalks  E ) P  <->  ( (
f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f
) ) --> V )  /\  ( A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) }  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) ) )
57 3an4anass 30113 . . . . . . 7  |-  ( ( ( f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f ) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) )  <->  ( (
f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f
) ) --> V )  /\  ( A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) }  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
5856, 57syl6bbr 263 . . . . . 6  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( f ( V ClWalks  E ) P  <->  ( (
f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f
) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f
) ) ( E `
 ( f `  i ) )  =  { ( P `  i ) ,  ( P `  ( i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
5955, 58syl 16 . . . . 5  |-  ( V USGrph  E  ->  ( f ( V ClWalks  E ) P  <->  ( (
f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f
) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f
) ) ( E `
 ( f `  i ) )  =  { ( P `  i ) ,  ( P `  ( i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
6059adantr 465 . . . 4  |-  ( ( V USGrph  E  /\  P  e. Word  V )  ->  (
f ( V ClWalks  E
) P  <->  ( (
f  e. Word  dom  E  /\  P : ( 0 ... ( # `  f
) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f
) ) ( E `
 ( f `  i ) )  =  { ( P `  i ) ,  ( P `  ( i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
6160exbidv 1680 . . 3  |-  ( ( V USGrph  E  /\  P  e. Word  V )  ->  ( E. f  f ( V ClWalks  E ) P  <->  E. f
( ( f  e. Word  dom  E  /\  P :
( 0 ... ( # `
 f ) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
62613adant3 1008 . 2  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( E. f 
f ( V ClWalks  E
) P  <->  E. f
( ( f  e. Word  dom  E  /\  P :
( 0 ... ( # `
 f ) ) --> V  /\  A. i  e.  ( 0..^ ( # `  f ) ) ( E `  ( f `
 i ) )  =  { ( P `
 i ) ,  ( P `  (
i  +  1 ) ) } )  /\  ( P `  0 )  =  ( P `  ( # `  f ) ) ) ) )
63 isclwwlk 30429 . . . . 5  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. )  e.  ( V ClWWalks  E )  <->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. )  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
6455, 63syl 16 . . . 4  |-  ( V USGrph  E  ->  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e.  ( V ClWWalks  E )  <->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. )  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
65643ad2ant1 1009 . . 3  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e.  ( V ClWWalks  E )  <->  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. )  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) )
6665anbi2d 703 . 2  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( ( ( lastS  `  P )  =  ( P `  0 )  /\  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. )  e.  ( V ClWWalks  E ) )  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( ( P substr  <. 0 ,  ( (
# `  P )  -  1 ) >.
)  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) )  -  1 ) ) { ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  i
) ,  ( ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  ( P substr  <. 0 ,  ( ( # `  P
)  -  1 )
>. ) ) ,  ( ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. ) `  0
) }  e.  ran  E ) ) ) )
6754, 62, 663bitr4d 285 1  |-  ( ( V USGrph  E  /\  P  e. Word  V  /\  2  <_  ( # `
 P ) )  ->  ( E. f 
f ( V ClWalks  E
) P  <->  ( ( lastS  `  P )  =  ( P `  0 )  /\  ( P substr  <. 0 ,  ( ( # `  P )  -  1 ) >. )  e.  ( V ClWWalks  E ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369   E.wex 1586    e. wcel 1756    =/= wne 2605   A.wral 2714   _Vcvv 2971   (/)c0 3636   {cpr 3878   <.cop 3882   class class class wbr 4291   dom cdm 4839   ran crn 4840   -->wf 5413   ` cfv 5417  (class class class)co 6090   CCcc 9279   0cc0 9281   1c1 9282    + caddc 9284    <_ cle 9418    - cmin 9594   2c2 10370   NN0cn0 10578   ZZcz 10645   ...cfz 11436  ..^cfzo 11547   #chash 12102  Word cword 12220   lastS clsw 12221   substr csubstr 12224   USGrph cusg 23263   ClWalks cclwlk 30410   ClWWalks cclwwlk 30411
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4402  ax-sep 4412  ax-nul 4420  ax-pow 4469  ax-pr 4530  ax-un 6371  ax-cnex 9337  ax-resscn 9338  ax-1cn 9339  ax-icn 9340  ax-addcl 9341  ax-addrcl 9342  ax-mulcl 9343  ax-mulrcl 9344  ax-mulcom 9345  ax-addass 9346  ax-mulass 9347  ax-distr 9348  ax-i2m1 9349  ax-1ne0 9350  ax-1rid 9351  ax-rnegex 9352  ax-rrecex 9353  ax-cnre 9354  ax-pre-lttri 9355  ax-pre-lttrn 9356  ax-pre-ltadd 9357  ax-pre-mulgt0 9358
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-nel 2608  df-ral 2719  df-rex 2720  df-reu 2721  df-rmo 2722  df-rab 2723  df-v 2973  df-sbc 3186  df-csb 3288  df-dif 3330  df-un 3332  df-in 3334  df-ss 3341  df-pss 3343  df-nul 3637  df-if 3791  df-pw 3861  df-sn 3877  df-pr 3879  df-tp 3881  df-op 3883  df-uni 4091  df-int 4128  df-iun 4172  df-br 4292  df-opab 4350  df-mpt 4351  df-tr 4385  df-eprel 4631  df-id 4635  df-po 4640  df-so 4641  df-fr 4678  df-we 4680  df-ord 4721  df-on 4722  df-lim 4723  df-suc 4724  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-iota 5380  df-fun 5419  df-fn 5420  df-f 5421  df-f1 5422  df-fo 5423  df-f1o 5424  df-fv 5425  df-riota 6051  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-recs 6831  df-rdg 6865  df-1o 6919  df-oadd 6923  df-er 7100  df-map 7215  df-pm 7216  df-en 7310  df-dom 7311  df-sdom 7312  df-fin 7313  df-card 8108  df-cda 8336  df-pnf 9419  df-mnf 9420  df-xr 9421  df-ltxr 9422  df-le 9423  df-sub 9596  df-neg 9597  df-nn 10322  df-2 10379  df-n0 10579  df-z 10646  df-uz 10861  df-fz 11437  df-fzo 11548  df-hash 12103  df-word 12228  df-lsw 12229  df-substr 12232  df-usgra 23265  df-wlk 23414  df-clwlk 30413  df-clwwlk 30414
This theorem is referenced by:  clwlkisclwwlk2  30450
  Copyright terms: Public domain W3C validator