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

Theorem clwwlkn2 30606
Description: In an undirected simple graph, a closed walk of length 2 represented as word is a word consisting of 2 symbols representing vertices connected by an edge. (Contributed by Alexander van der Vekens, 19-Sep-2018.)
Assertion
Ref Expression
clwwlkn2  |-  ( V USGrph  E  ->  ( W  e.  ( ( V ClWWalksN  E ) `
 2 )  <->  ( ( # `
 W )  =  2  /\  W  e. Word  V  /\  { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E ) ) )

Proof of Theorem clwwlkn2
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 usgrav 23442 . . 3  |-  ( V USGrph  E  ->  ( V  e. 
_V  /\  E  e.  _V ) )
2 2nn0 10710 . . . . 5  |-  2  e.  NN0
3 isclwwlkn 30600 . . . . 5  |-  ( ( V  e.  _V  /\  E  e.  _V  /\  2  e.  NN0 )  ->  ( W  e.  ( ( V ClWWalksN  E ) `  2
)  <->  ( W  e.  ( V ClWWalks  E )  /\  ( # `  W
)  =  2 ) ) )
42, 3mp3an3 1304 . . . 4  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( W  e.  ( ( V ClWWalksN  E ) `  2 )  <->  ( W  e.  ( V ClWWalks  E )  /\  ( # `  W
)  =  2 ) ) )
5 isclwwlk 30599 . . . . 5  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( W  e.  ( V ClWWalks  E )  <->  ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) ) )
65anbi1d 704 . . . 4  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( ( W  e.  ( V ClWWalks  E )  /\  ( # `  W
)  =  2 )  <-> 
( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 ) ) )
74, 6bitrd 253 . . 3  |-  ( ( V  e.  _V  /\  E  e.  _V )  ->  ( W  e.  ( ( V ClWWalksN  E ) `  2 )  <->  ( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 ) ) )
81, 7syl 16 . 2  |-  ( V USGrph  E  ->  ( W  e.  ( ( V ClWWalksN  E ) `
 2 )  <->  ( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 ) ) )
9 3anass 969 . . . . 5  |-  ( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  <-> 
( W  e. Word  V  /\  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) ) )
10 oveq1 6210 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  2  ->  (
( # `  W )  -  1 )  =  ( 2  -  1 ) )
1110oveq2d 6219 . . . . . . . . . . 11  |-  ( (
# `  W )  =  2  ->  (
0..^ ( ( # `  W )  -  1 ) )  =  ( 0..^ ( 2  -  1 ) ) )
1211raleqdv 3029 . . . . . . . . . 10  |-  ( (
# `  W )  =  2  ->  ( A. i  e.  (
0..^ ( ( # `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  <->  A. i  e.  ( 0..^ ( 2  -  1 ) ) { ( W `  i
) ,  ( W `
 ( i  +  1 ) ) }  e.  ran  E ) )
1312ad2antlr 726 . . . . . . . . 9  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  <->  A. i  e.  ( 0..^ ( 2  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E ) )
14 2m1e1 10550 . . . . . . . . . . . . 13  |-  ( 2  -  1 )  =  1
1514oveq2i 6214 . . . . . . . . . . . 12  |-  ( 0..^ ( 2  -  1 ) )  =  ( 0..^ 1 )
16 fzo01 11732 . . . . . . . . . . . 12  |-  ( 0..^ 1 )  =  {
0 }
1715, 16eqtri 2483 . . . . . . . . . . 11  |-  ( 0..^ ( 2  -  1 ) )  =  {
0 }
1817a1i 11 . . . . . . . . . 10  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( 0..^ ( 2  -  1 ) )  =  { 0 } )
1918raleqdv 3029 . . . . . . . . 9  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( A. i  e.  ( 0..^ ( 2  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  <->  A. i  e.  { 0 }  { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E ) )
20 c0ex 9494 . . . . . . . . . 10  |-  0  e.  _V
21 fveq2 5802 . . . . . . . . . . . . 13  |-  ( i  =  0  ->  ( W `  i )  =  ( W ` 
0 ) )
22 oveq1 6210 . . . . . . . . . . . . . . 15  |-  ( i  =  0  ->  (
i  +  1 )  =  ( 0  +  1 ) )
23 0p1e1 10547 . . . . . . . . . . . . . . 15  |-  ( 0  +  1 )  =  1
2422, 23syl6eq 2511 . . . . . . . . . . . . . 14  |-  ( i  =  0  ->  (
i  +  1 )  =  1 )
2524fveq2d 5806 . . . . . . . . . . . . 13  |-  ( i  =  0  ->  ( W `  ( i  +  1 ) )  =  ( W ` 
1 ) )
2621, 25preq12d 4073 . . . . . . . . . . . 12  |-  ( i  =  0  ->  { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  =  { ( W ` 
0 ) ,  ( W `  1 ) } )
2726eleq1d 2523 . . . . . . . . . . 11  |-  ( i  =  0  ->  ( { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E ) )
2827ralsng 4023 . . . . . . . . . 10  |-  ( 0  e.  _V  ->  ( A. i  e.  { 0 }  { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  <->  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
) )
2920, 28mp1i 12 . . . . . . . . 9  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( A. i  e. 
{ 0 }  {
( W `  i
) ,  ( W `
 ( i  +  1 ) ) }  e.  ran  E  <->  { ( W `  0 ) ,  ( W ` 
1 ) }  e.  ran  E ) )
3013, 19, 293bitrd 279 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  <->  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E ) )
3130anbi1d 704 . . . . . . 7  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  <-> 
( { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) ) )
32 lsw 12387 . . . . . . . . . . . . . 14  |-  ( W  e. Word  V  ->  ( lastS  `  W )  =  ( W `  ( (
# `  W )  -  1 ) ) )
3332adantl 466 . . . . . . . . . . . . 13  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( lastS  `  W )  =  ( W `  ( ( # `  W
)  -  1 ) ) )
3410ad2antlr 726 . . . . . . . . . . . . . . 15  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( ( # `  W
)  -  1 )  =  ( 2  -  1 ) )
3534, 14syl6eq 2511 . . . . . . . . . . . . . 14  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( ( # `  W
)  -  1 )  =  1 )
3635fveq2d 5806 . . . . . . . . . . . . 13  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( W `  (
( # `  W )  -  1 ) )  =  ( W ` 
1 ) )
3733, 36eqtr2d 2496 . . . . . . . . . . . 12  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( W `  1
)  =  ( lastS  `  W
) )
3837preq2d 4072 . . . . . . . . . . 11  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  { ( W ` 
0 ) ,  ( W `  1 ) }  =  { ( W `  0 ) ,  ( lastS  `  W
) } )
39 prcom 4064 . . . . . . . . . . 11  |-  { ( W `  0 ) ,  ( lastS  `  W
) }  =  {
( lastS  `  W ) ,  ( W `  0
) }
4038, 39syl6eq 2511 . . . . . . . . . 10  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  { ( W ` 
0 ) ,  ( W `  1 ) }  =  { ( lastS  `  W ) ,  ( W `  0 ) } )
4140eleq1d 2523 . . . . . . . . 9  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( W ` 
0 ) }  e.  ran  E ) )
4241biimpd 207 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E  ->  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) )
4342pm4.71d 634 . . . . . . 7  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E  <-> 
( { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) ) )
4431, 43bitr4d 256 . . . . . 6  |-  ( ( ( V USGrph  E  /\  ( # `  W )  =  2 )  /\  W  e. Word  V )  ->  ( ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  <->  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
) )
4544pm5.32da 641 . . . . 5  |-  ( ( V USGrph  E  /\  ( # `
 W )  =  2 )  ->  (
( W  e. Word  V  /\  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E ) )  <->  ( W  e. Word  V  /\  { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E ) ) )
469, 45syl5bb 257 . . . 4  |-  ( ( V USGrph  E  /\  ( # `
 W )  =  2 )  ->  (
( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W )  -  1 ) ) { ( W `  i ) ,  ( W `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W ) ,  ( W `  0 ) }  e.  ran  E
)  <->  ( W  e. Word  V  /\  { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E ) ) )
4746ex 434 . . 3  |-  ( V USGrph  E  ->  ( ( # `  W )  =  2  ->  ( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  <-> 
( W  e. Word  V  /\  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
) ) ) )
4847pm5.32rd 640 . 2  |-  ( V USGrph  E  ->  ( ( ( W  e. Word  V  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) { ( W `
 i ) ,  ( W `  (
i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  W
) ,  ( W `
 0 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 )  <-> 
( ( W  e. Word  V  /\  { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E )  /\  ( # `  W )  =  2 ) ) )
49 3anass 969 . . . 4  |-  ( ( ( # `  W
)  =  2  /\  W  e. Word  V  /\  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E )  <-> 
( ( # `  W
)  =  2  /\  ( W  e. Word  V  /\  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
) ) )
50 ancom 450 . . . 4  |-  ( ( ( # `  W
)  =  2  /\  ( W  e. Word  V  /\  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
) )  <->  ( ( W  e. Word  V  /\  {
( W `  0
) ,  ( W `
 1 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 ) )
5149, 50bitr2i 250 . . 3  |-  ( ( ( W  e. Word  V  /\  { ( W ` 
0 ) ,  ( W `  1 ) }  e.  ran  E
)  /\  ( # `  W
)  =  2 )  <-> 
( ( # `  W
)  =  2  /\  W  e. Word  V  /\  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E ) )
5251a1i 11 . 2  |-  ( V USGrph  E  ->  ( ( ( W  e. Word  V  /\  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E )  /\  ( # `  W
)  =  2 )  <-> 
( ( # `  W
)  =  2  /\  W  e. Word  V  /\  { ( W `  0
) ,  ( W `
 1 ) }  e.  ran  E ) ) )
538, 48, 523bitrd 279 1  |-  ( V USGrph  E  ->  ( W  e.  ( ( V ClWWalksN  E ) `
 2 )  <->  ( ( # `
 W )  =  2  /\  W  e. Word  V  /\  { ( W `
 0 ) ,  ( W `  1
) }  e.  ran  E ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758   A.wral 2799   _Vcvv 3078   {csn 3988   {cpr 3990   class class class wbr 4403   ran crn 4952   ` cfv 5529  (class class class)co 6203   0cc0 9396   1c1 9397    + caddc 9399    - cmin 9709   2c2 10485   NN0cn0 10693  ..^cfzo 11668   #chash 12223  Word cword 12342   lastS clsw 12343   USGrph cusg 23436   ClWWalks cclwwlk 30581   ClWWalksN cclwwlkn 30582
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1955  ax-ext 2432  ax-rep 4514  ax-sep 4524  ax-nul 4532  ax-pow 4581  ax-pr 4642  ax-un 6485  ax-cnex 9452  ax-resscn 9453  ax-1cn 9454  ax-icn 9455  ax-addcl 9456  ax-addrcl 9457  ax-mulcl 9458  ax-mulrcl 9459  ax-mulcom 9460  ax-addass 9461  ax-mulass 9462  ax-distr 9463  ax-i2m1 9464  ax-1ne0 9465  ax-1rid 9466  ax-rnegex 9467  ax-rrecex 9468  ax-cnre 9469  ax-pre-lttri 9470  ax-pre-lttrn 9471  ax-pre-ltadd 9472  ax-pre-mulgt0 9473
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2266  df-mo 2267  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2604  df-ne 2650  df-nel 2651  df-ral 2804  df-rex 2805  df-reu 2806  df-rab 2808  df-v 3080  df-sbc 3295  df-csb 3399  df-dif 3442  df-un 3444  df-in 3446  df-ss 3453  df-pss 3455  df-nul 3749  df-if 3903  df-pw 3973  df-sn 3989  df-pr 3991  df-tp 3993  df-op 3995  df-uni 4203  df-int 4240  df-iun 4284  df-br 4404  df-opab 4462  df-mpt 4463  df-tr 4497  df-eprel 4743  df-id 4747  df-po 4752  df-so 4753  df-fr 4790  df-we 4792  df-ord 4833  df-on 4834  df-lim 4835  df-suc 4836  df-xp 4957  df-rel 4958  df-cnv 4959  df-co 4960  df-dm 4961  df-rn 4962  df-res 4963  df-ima 4964  df-iota 5492  df-fun 5531  df-fn 5532  df-f 5533  df-f1 5534  df-fo 5535  df-f1o 5536  df-fv 5537  df-riota 6164  df-ov 6206  df-oprab 6207  df-mpt2 6208  df-om 6590  df-1st 6690  df-2nd 6691  df-recs 6945  df-rdg 6979  df-1o 7033  df-oadd 7037  df-er 7214  df-map 7329  df-pm 7330  df-en 7424  df-dom 7425  df-sdom 7426  df-fin 7427  df-pnf 9534  df-mnf 9535  df-xr 9536  df-ltxr 9537  df-le 9538  df-sub 9711  df-neg 9712  df-nn 10437  df-2 10494  df-n0 10694  df-z 10761  df-uz 10976  df-fz 11558  df-fzo 11669  df-word 12350  df-lsw 12351  df-usgra 23438  df-clwwlk 30584  df-clwwlkn 30585
This theorem is referenced by:  numclwwlkovf2  30845
  Copyright terms: Public domain W3C validator