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

Theorem is2wlk 23479
Description: Properties of a pair of functions to be a walk of length 2 (in an undirected graph). (Contributed by Alexander van der Vekens, 16-Feb-2018.)
Assertion
Ref Expression
is2wlk  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( F ( V Walks  E ) P  /\  ( # `  F
)  =  2 )  <-> 
( F : ( 0..^ 2 ) --> dom 
E  /\  P :
( 0 ... 2
) --> V  /\  (
( E `  ( F `  0 )
)  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )

Proof of Theorem is2wlk
Dummy variable  k is distinct from all other variables.
StepHypRef Expression
1 iswlk 23441 . . 3  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( F ( V Walks 
E ) P  <->  ( F  e. Word  dom  E  /\  P : ( 0 ... ( # `  F
) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } ) ) )
21anbi1d 704 . 2  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( F ( V Walks  E ) P  /\  ( # `  F
)  =  2 )  <-> 
( ( F  e. Word  dom  E  /\  P :
( 0 ... ( # `
 F ) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F ) ) ( E `  ( F `
 k ) )  =  { ( P `
 k ) ,  ( P `  (
k  +  1 ) ) } )  /\  ( # `  F )  =  2 ) ) )
3 wrdf 12255 . . . . . . . . . 10  |-  ( F  e. Word  dom  E  ->  F : ( 0..^ (
# `  F )
) --> dom  E )
4 oveq2 6114 . . . . . . . . . . 11  |-  ( (
# `  F )  =  2  ->  (
0..^ ( # `  F
) )  =  ( 0..^ 2 ) )
54feq2d 5562 . . . . . . . . . 10  |-  ( (
# `  F )  =  2  ->  ( F : ( 0..^ (
# `  F )
) --> dom  E  <->  F :
( 0..^ 2 ) --> dom  E ) )
63, 5syl5ib 219 . . . . . . . . 9  |-  ( (
# `  F )  =  2  ->  ( F  e. Word  dom  E  ->  F : ( 0..^ 2 ) --> dom  E )
)
7 iswrdi 12254 . . . . . . . . 9  |-  ( F : ( 0..^ 2 ) --> dom  E  ->  F  e. Word  dom  E )
86, 7impbid1 203 . . . . . . . 8  |-  ( (
# `  F )  =  2  ->  ( F  e. Word  dom  E  <->  F :
( 0..^ 2 ) --> dom  E ) )
98adantl 466 . . . . . . 7  |-  ( ( ( ( V  e.  X  /\  E  e.  Y )  /\  ( F  e.  W  /\  P  e.  Z )
)  /\  ( # `  F
)  =  2 )  ->  ( F  e. Word  dom  E  <->  F : ( 0..^ 2 ) --> dom  E
) )
10 oveq2 6114 . . . . . . . . 9  |-  ( (
# `  F )  =  2  ->  (
0 ... ( # `  F
) )  =  ( 0 ... 2 ) )
1110feq2d 5562 . . . . . . . 8  |-  ( (
# `  F )  =  2  ->  ( P : ( 0 ... ( # `  F
) ) --> V  <->  P :
( 0 ... 2
) --> V ) )
1211adantl 466 . . . . . . 7  |-  ( ( ( ( V  e.  X  /\  E  e.  Y )  /\  ( F  e.  W  /\  P  e.  Z )
)  /\  ( # `  F
)  =  2 )  ->  ( P :
( 0 ... ( # `
 F ) ) --> V  <->  P : ( 0 ... 2 ) --> V ) )
13 fzo0to2pr 11629 . . . . . . . . . . 11  |-  ( 0..^ 2 )  =  {
0 ,  1 }
144, 13syl6eq 2491 . . . . . . . . . 10  |-  ( (
# `  F )  =  2  ->  (
0..^ ( # `  F
) )  =  {
0 ,  1 } )
1514raleqdv 2938 . . . . . . . . 9  |-  ( (
# `  F )  =  2  ->  ( A. k  e.  (
0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) }  <->  A. k  e.  {
0 ,  1 }  ( E `  ( F `  k )
)  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } ) )
16 2wlklem 23478 . . . . . . . . 9  |-  ( A. k  e.  { 0 ,  1 }  ( E `  ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) }  <->  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) )
1715, 16syl6bb 261 . . . . . . . 8  |-  ( (
# `  F )  =  2  ->  ( A. k  e.  (
0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) }  <->  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) )
1817adantl 466 . . . . . . 7  |-  ( ( ( ( V  e.  X  /\  E  e.  Y )  /\  ( F  e.  W  /\  P  e.  Z )
)  /\  ( # `  F
)  =  2 )  ->  ( A. k  e.  ( 0..^ ( # `  F ) ) ( E `  ( F `
 k ) )  =  { ( P `
 k ) ,  ( P `  (
k  +  1 ) ) }  <->  ( ( E `  ( F `  0 ) )  =  { ( P `
 0 ) ,  ( P `  1
) }  /\  ( E `  ( F `  1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) )
199, 12, 183anbi123d 1289 . . . . . 6  |-  ( ( ( ( V  e.  X  /\  E  e.  Y )  /\  ( F  e.  W  /\  P  e.  Z )
)  /\  ( # `  F
)  =  2 )  ->  ( ( F  e. Word  dom  E  /\  P : ( 0 ... ( # `  F
) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } )  <->  ( F : ( 0..^ 2 ) --> dom  E  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `  0 ) )  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )
20 3anass 969 . . . . . 6  |-  ( ( F : ( 0..^ 2 ) --> dom  E  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) )  <->  ( F : ( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) ) )
2119, 20syl6bb 261 . . . . 5  |-  ( ( ( ( V  e.  X  /\  E  e.  Y )  /\  ( F  e.  W  /\  P  e.  Z )
)  /\  ( # `  F
)  =  2 )  ->  ( ( F  e. Word  dom  E  /\  P : ( 0 ... ( # `  F
) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } )  <->  ( F : ( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) ) ) )
2221ex 434 . . . 4  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( # `  F
)  =  2  -> 
( ( F  e. Word  dom  E  /\  P :
( 0 ... ( # `
 F ) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F ) ) ( E `  ( F `
 k ) )  =  { ( P `
 k ) ,  ( P `  (
k  +  1 ) ) } )  <->  ( F : ( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) ) ) ) )
2322pm5.32rd 640 . . 3  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( ( F  e. Word  dom  E  /\  P : ( 0 ... ( # `  F
) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } )  /\  ( # `
 F )  =  2 )  <->  ( ( F : ( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) )  /\  ( # `  F
)  =  2 ) ) )
24 3anass 969 . . . 4  |-  ( ( ( F : ( 0..^ 2 ) --> dom 
E  /\  ( # `  F
)  =  2 )  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `
 0 ) )  =  { ( P `
 0 ) ,  ( P `  1
) }  /\  ( E `  ( F `  1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) )  <-> 
( ( F :
( 0..^ 2 ) --> dom  E  /\  ( # `
 F )  =  2 )  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `  0 ) )  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )
25 an32 796 . . . 4  |-  ( ( ( F : ( 0..^ 2 ) --> dom 
E  /\  ( # `  F
)  =  2 )  /\  ( P :
( 0 ... 2
) --> V  /\  (
( E `  ( F `  0 )
)  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) )  <->  ( ( F : ( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `
 ( F ` 
0 ) )  =  { ( P ` 
0 ) ,  ( P `  1 ) }  /\  ( E `
 ( F ` 
1 ) )  =  { ( P ` 
1 ) ,  ( P `  2 ) } ) ) )  /\  ( # `  F
)  =  2 ) )
2624, 25bitri 249 . . 3  |-  ( ( ( F : ( 0..^ 2 ) --> dom 
E  /\  ( # `  F
)  =  2 )  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `
 0 ) )  =  { ( P `
 0 ) ,  ( P `  1
) }  /\  ( E `  ( F `  1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) )  <-> 
( ( F :
( 0..^ 2 ) --> dom  E  /\  ( P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `  0 ) )  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) )  /\  ( # `  F )  =  2 ) )
2723, 26syl6bbr 263 . 2  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( ( F  e. Word  dom  E  /\  P : ( 0 ... ( # `  F
) ) --> V  /\  A. k  e.  ( 0..^ ( # `  F
) ) ( E `
 ( F `  k ) )  =  { ( P `  k ) ,  ( P `  ( k  +  1 ) ) } )  /\  ( # `
 F )  =  2 )  <->  ( ( F : ( 0..^ 2 ) --> dom  E  /\  ( # `  F )  =  2 )  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `  0 ) )  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )
28 ffn 5574 . . . . . . 7  |-  ( F : ( 0..^ 2 ) --> dom  E  ->  F  Fn  ( 0..^ 2 ) )
29 hashfn 12153 . . . . . . . 8  |-  ( F  Fn  ( 0..^ 2 )  ->  ( # `  F
)  =  ( # `  ( 0..^ 2 ) ) )
30 2nn0 10611 . . . . . . . . 9  |-  2  e.  NN0
31 hashfzo0 12206 . . . . . . . . 9  |-  ( 2  e.  NN0  ->  ( # `  ( 0..^ 2 ) )  =  2 )
3230, 31ax-mp 5 . . . . . . . 8  |-  ( # `  ( 0..^ 2 ) )  =  2
3329, 32syl6eq 2491 . . . . . . 7  |-  ( F  Fn  ( 0..^ 2 )  ->  ( # `  F
)  =  2 )
3428, 33syl 16 . . . . . 6  |-  ( F : ( 0..^ 2 ) --> dom  E  ->  (
# `  F )  =  2 )
3534pm4.71i 632 . . . . 5  |-  ( F : ( 0..^ 2 ) --> dom  E  <->  ( F : ( 0..^ 2 ) --> dom  E  /\  ( # `  F )  =  2 ) )
3635bicomi 202 . . . 4  |-  ( ( F : ( 0..^ 2 ) --> dom  E  /\  ( # `  F
)  =  2 )  <-> 
F : ( 0..^ 2 ) --> dom  E
)
3736a1i 11 . . 3  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( F :
( 0..^ 2 ) --> dom  E  /\  ( # `
 F )  =  2 )  <->  F :
( 0..^ 2 ) --> dom  E ) )
38373anbi1d 1293 . 2  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( ( F : ( 0..^ 2 ) --> dom  E  /\  ( # `  F )  =  2 )  /\  P : ( 0 ... 2 ) --> V  /\  ( ( E `  ( F `  0 ) )  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) )  <-> 
( F : ( 0..^ 2 ) --> dom 
E  /\  P :
( 0 ... 2
) --> V  /\  (
( E `  ( F `  0 )
)  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )
392, 27, 383bitrd 279 1  |-  ( ( ( V  e.  X  /\  E  e.  Y
)  /\  ( F  e.  W  /\  P  e.  Z ) )  -> 
( ( F ( V Walks  E ) P  /\  ( # `  F
)  =  2 )  <-> 
( F : ( 0..^ 2 ) --> dom 
E  /\  P :
( 0 ... 2
) --> V  /\  (
( E `  ( F `  0 )
)  =  { ( P `  0 ) ,  ( P ` 
1 ) }  /\  ( E `  ( F `
 1 ) )  =  { ( P `
 1 ) ,  ( P `  2
) } ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756   A.wral 2730   {cpr 3894   class class class wbr 4307   dom cdm 4855    Fn wfn 5428   -->wf 5429   ` cfv 5433  (class class class)co 6106   0cc0 9297   1c1 9298    + caddc 9300   2c2 10386   NN0cn0 10594   ...cfz 11452  ..^cfzo 11563   #chash 12118  Word cword 12236   Walks cwalk 23420
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 4418  ax-sep 4428  ax-nul 4436  ax-pow 4485  ax-pr 4546  ax-un 6387  ax-cnex 9353  ax-resscn 9354  ax-1cn 9355  ax-icn 9356  ax-addcl 9357  ax-addrcl 9358  ax-mulcl 9359  ax-mulrcl 9360  ax-mulcom 9361  ax-addass 9362  ax-mulass 9363  ax-distr 9364  ax-i2m1 9365  ax-1ne0 9366  ax-1rid 9367  ax-rnegex 9368  ax-rrecex 9369  ax-cnre 9370  ax-pre-lttri 9371  ax-pre-lttrn 9372  ax-pre-ltadd 9373  ax-pre-mulgt0 9374
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 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2622  df-nel 2623  df-ral 2735  df-rex 2736  df-reu 2737  df-rab 2739  df-v 2989  df-sbc 3202  df-csb 3304  df-dif 3346  df-un 3348  df-in 3350  df-ss 3357  df-pss 3359  df-nul 3653  df-if 3807  df-pw 3877  df-sn 3893  df-pr 3895  df-tp 3897  df-op 3899  df-uni 4107  df-int 4144  df-iun 4188  df-br 4308  df-opab 4366  df-mpt 4367  df-tr 4401  df-eprel 4647  df-id 4651  df-po 4656  df-so 4657  df-fr 4694  df-we 4696  df-ord 4737  df-on 4738  df-lim 4739  df-suc 4740  df-xp 4861  df-rel 4862  df-cnv 4863  df-co 4864  df-dm 4865  df-rn 4866  df-res 4867  df-ima 4868  df-iota 5396  df-fun 5435  df-fn 5436  df-f 5437  df-f1 5438  df-fo 5439  df-f1o 5440  df-fv 5441  df-riota 6067  df-ov 6109  df-oprab 6110  df-mpt2 6111  df-om 6492  df-1st 6592  df-2nd 6593  df-recs 6847  df-rdg 6881  df-1o 6935  df-oadd 6939  df-er 7116  df-map 7231  df-pm 7232  df-en 7326  df-dom 7327  df-sdom 7328  df-fin 7329  df-card 8124  df-pnf 9435  df-mnf 9436  df-xr 9437  df-ltxr 9438  df-le 9439  df-sub 9612  df-neg 9613  df-nn 10338  df-2 10395  df-n0 10595  df-z 10662  df-uz 10877  df-fz 11453  df-fzo 11564  df-hash 12119  df-word 12244  df-wlk 23430
This theorem is referenced by:  usg2wlkonot  30421  usg2wotspth  30422
  Copyright terms: Public domain W3C validator