Metamath Proof Explorer


Theorem elwwlks2

Description: A walk of length 2 between two vertices as length 3 string in a pseudograph. (Contributed by Alexander van der Vekens, 21-Feb-2018) (Revised by AV, 17-May-2021) (Proof shortened by AV, 14-Mar-2022)

Ref Expression
Hypothesis elwwlks2.v
|- V = ( Vtx ` G )
Assertion elwwlks2
|- ( G e. UPGraph -> ( W e. ( 2 WWalksN G ) <-> E. a e. V E. b e. V E. c e. V ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )

Proof

Step Hyp Ref Expression
1 elwwlks2.v
 |-  V = ( Vtx ` G )
2 1 wwlksnwwlksnon
 |-  ( W e. ( 2 WWalksN G ) <-> E. a e. V E. c e. V W e. ( a ( 2 WWalksNOn G ) c ) )
3 2 a1i
 |-  ( G e. UPGraph -> ( W e. ( 2 WWalksN G ) <-> E. a e. V E. c e. V W e. ( a ( 2 WWalksNOn G ) c ) ) )
4 1 elwwlks2on
 |-  ( ( G e. UPGraph /\ a e. V /\ c e. V ) -> ( W e. ( a ( 2 WWalksNOn G ) c ) <-> E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) )
5 4 3expb
 |-  ( ( G e. UPGraph /\ ( a e. V /\ c e. V ) ) -> ( W e. ( a ( 2 WWalksNOn G ) c ) <-> E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) )
6 5 2rexbidva
 |-  ( G e. UPGraph -> ( E. a e. V E. c e. V W e. ( a ( 2 WWalksNOn G ) c ) <-> E. a e. V E. c e. V E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) )
7 rexcom
 |-  ( E. c e. V E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) <-> E. b e. V E. c e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) )
8 s3cli
 |-  <" a b c "> e. Word _V
9 8 a1i
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> <" a b c "> e. Word _V )
10 simplr
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> W = <" a b c "> )
11 simpr
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> p = <" a b c "> )
12 10 11 eqtr4d
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> W = p )
13 12 breq2d
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> ( f ( Walks ` G ) W <-> f ( Walks ` G ) p ) )
14 13 biimpd
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> ( f ( Walks ` G ) W -> f ( Walks ` G ) p ) )
15 14 com12
 |-  ( f ( Walks ` G ) W -> ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> f ( Walks ` G ) p ) )
16 15 adantr
 |-  ( ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) -> ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> f ( Walks ` G ) p ) )
17 16 impcom
 |-  ( ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) /\ ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) -> f ( Walks ` G ) p )
18 simprr
 |-  ( ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) /\ ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) -> ( # ` f ) = 2 )
19 vex
 |-  a e. _V
20 s3fv0
 |-  ( a e. _V -> ( <" a b c "> ` 0 ) = a )
21 20 eqcomd
 |-  ( a e. _V -> a = ( <" a b c "> ` 0 ) )
22 19 21 mp1i
 |-  ( p = <" a b c "> -> a = ( <" a b c "> ` 0 ) )
23 fveq1
 |-  ( p = <" a b c "> -> ( p ` 0 ) = ( <" a b c "> ` 0 ) )
24 22 23 eqtr4d
 |-  ( p = <" a b c "> -> a = ( p ` 0 ) )
25 vex
 |-  b e. _V
26 s3fv1
 |-  ( b e. _V -> ( <" a b c "> ` 1 ) = b )
27 26 eqcomd
 |-  ( b e. _V -> b = ( <" a b c "> ` 1 ) )
28 25 27 mp1i
 |-  ( p = <" a b c "> -> b = ( <" a b c "> ` 1 ) )
29 fveq1
 |-  ( p = <" a b c "> -> ( p ` 1 ) = ( <" a b c "> ` 1 ) )
30 28 29 eqtr4d
 |-  ( p = <" a b c "> -> b = ( p ` 1 ) )
31 vex
 |-  c e. _V
32 s3fv2
 |-  ( c e. _V -> ( <" a b c "> ` 2 ) = c )
33 32 eqcomd
 |-  ( c e. _V -> c = ( <" a b c "> ` 2 ) )
34 31 33 mp1i
 |-  ( p = <" a b c "> -> c = ( <" a b c "> ` 2 ) )
35 fveq1
 |-  ( p = <" a b c "> -> ( p ` 2 ) = ( <" a b c "> ` 2 ) )
36 34 35 eqtr4d
 |-  ( p = <" a b c "> -> c = ( p ` 2 ) )
37 24 30 36 3jca
 |-  ( p = <" a b c "> -> ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) )
38 37 adantl
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) )
39 38 adantr
 |-  ( ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) /\ ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) -> ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) )
40 17 18 39 3jca
 |-  ( ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) /\ ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) -> ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) )
41 40 ex
 |-  ( ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) /\ p = <" a b c "> ) -> ( ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) -> ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) )
42 9 41 spcimedv
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) -> E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) )
43 wlklenvp1
 |-  ( f ( Walks ` G ) p -> ( # ` p ) = ( ( # ` f ) + 1 ) )
44 simpl
 |-  ( ( ( # ` p ) = ( ( # ` f ) + 1 ) /\ ( # ` f ) = 2 ) -> ( # ` p ) = ( ( # ` f ) + 1 ) )
45 oveq1
 |-  ( ( # ` f ) = 2 -> ( ( # ` f ) + 1 ) = ( 2 + 1 ) )
46 45 adantl
 |-  ( ( ( # ` p ) = ( ( # ` f ) + 1 ) /\ ( # ` f ) = 2 ) -> ( ( # ` f ) + 1 ) = ( 2 + 1 ) )
47 44 46 eqtrd
 |-  ( ( ( # ` p ) = ( ( # ` f ) + 1 ) /\ ( # ` f ) = 2 ) -> ( # ` p ) = ( 2 + 1 ) )
48 47 adantl
 |-  ( ( f ( Walks ` G ) p /\ ( ( # ` p ) = ( ( # ` f ) + 1 ) /\ ( # ` f ) = 2 ) ) -> ( # ` p ) = ( 2 + 1 ) )
49 2p1e3
 |-  ( 2 + 1 ) = 3
50 48 49 eqtrdi
 |-  ( ( f ( Walks ` G ) p /\ ( ( # ` p ) = ( ( # ` f ) + 1 ) /\ ( # ` f ) = 2 ) ) -> ( # ` p ) = 3 )
51 50 exp32
 |-  ( f ( Walks ` G ) p -> ( ( # ` p ) = ( ( # ` f ) + 1 ) -> ( ( # ` f ) = 2 -> ( # ` p ) = 3 ) ) )
52 43 51 mpd
 |-  ( f ( Walks ` G ) p -> ( ( # ` f ) = 2 -> ( # ` p ) = 3 ) )
53 52 adantr
 |-  ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) -> ( ( # ` f ) = 2 -> ( # ` p ) = 3 ) )
54 53 imp
 |-  ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) -> ( # ` p ) = 3 )
55 eqcom
 |-  ( a = ( p ` 0 ) <-> ( p ` 0 ) = a )
56 55 biimpi
 |-  ( a = ( p ` 0 ) -> ( p ` 0 ) = a )
57 eqcom
 |-  ( b = ( p ` 1 ) <-> ( p ` 1 ) = b )
58 57 biimpi
 |-  ( b = ( p ` 1 ) -> ( p ` 1 ) = b )
59 eqcom
 |-  ( c = ( p ` 2 ) <-> ( p ` 2 ) = c )
60 59 biimpi
 |-  ( c = ( p ` 2 ) -> ( p ` 2 ) = c )
61 56 58 60 3anim123i
 |-  ( ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) -> ( ( p ` 0 ) = a /\ ( p ` 1 ) = b /\ ( p ` 2 ) = c ) )
62 54 61 anim12i
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( ( # ` p ) = 3 /\ ( ( p ` 0 ) = a /\ ( p ` 1 ) = b /\ ( p ` 2 ) = c ) ) )
63 1 wlkpwrd
 |-  ( f ( Walks ` G ) p -> p e. Word V )
64 simpr
 |-  ( ( G e. UPGraph /\ a e. V ) -> a e. V )
65 64 anim1i
 |-  ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) -> ( a e. V /\ ( b e. V /\ c e. V ) ) )
66 3anass
 |-  ( ( a e. V /\ b e. V /\ c e. V ) <-> ( a e. V /\ ( b e. V /\ c e. V ) ) )
67 65 66 sylibr
 |-  ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) -> ( a e. V /\ b e. V /\ c e. V ) )
68 67 adantr
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( a e. V /\ b e. V /\ c e. V ) )
69 63 68 anim12i
 |-  ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) -> ( p e. Word V /\ ( a e. V /\ b e. V /\ c e. V ) ) )
70 69 ad2antrr
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( p e. Word V /\ ( a e. V /\ b e. V /\ c e. V ) ) )
71 eqwrds3
 |-  ( ( p e. Word V /\ ( a e. V /\ b e. V /\ c e. V ) ) -> ( p = <" a b c "> <-> ( ( # ` p ) = 3 /\ ( ( p ` 0 ) = a /\ ( p ` 1 ) = b /\ ( p ` 2 ) = c ) ) ) )
72 70 71 syl
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( p = <" a b c "> <-> ( ( # ` p ) = 3 /\ ( ( p ` 0 ) = a /\ ( p ` 1 ) = b /\ ( p ` 2 ) = c ) ) ) )
73 62 72 mpbird
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> p = <" a b c "> )
74 simprr
 |-  ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) -> W = <" a b c "> )
75 74 ad2antrr
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> W = <" a b c "> )
76 73 75 eqtr4d
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> p = W )
77 76 breq2d
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( f ( Walks ` G ) p <-> f ( Walks ` G ) W ) )
78 77 biimpd
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( f ( Walks ` G ) p -> f ( Walks ` G ) W ) )
79 simplr
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( # ` f ) = 2 )
80 78 79 jctird
 |-  ( ( ( ( f ( Walks ` G ) p /\ ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) ) /\ ( # ` f ) = 2 ) /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( f ( Walks ` G ) p -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) )
81 80 exp41
 |-  ( f ( Walks ` G ) p -> ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( ( # ` f ) = 2 -> ( ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) -> ( f ( Walks ` G ) p -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) ) ) )
82 81 com25
 |-  ( f ( Walks ` G ) p -> ( f ( Walks ` G ) p -> ( ( # ` f ) = 2 -> ( ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) -> ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) ) ) )
83 82 pm2.43i
 |-  ( f ( Walks ` G ) p -> ( ( # ` f ) = 2 -> ( ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) -> ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) ) ) )
84 83 3imp
 |-  ( ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) )
85 84 com12
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) )
86 85 exlimdv
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) -> ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) )
87 42 86 impbid
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) <-> E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) )
88 87 exbidv
 |-  ( ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) /\ W = <" a b c "> ) -> ( E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) <-> E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) )
89 88 pm5.32da
 |-  ( ( ( G e. UPGraph /\ a e. V ) /\ ( b e. V /\ c e. V ) ) -> ( ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) <-> ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )
90 89 2rexbidva
 |-  ( ( G e. UPGraph /\ a e. V ) -> ( E. b e. V E. c e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) <-> E. b e. V E. c e. V ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )
91 7 90 syl5bb
 |-  ( ( G e. UPGraph /\ a e. V ) -> ( E. c e. V E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) <-> E. b e. V E. c e. V ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )
92 91 rexbidva
 |-  ( G e. UPGraph -> ( E. a e. V E. c e. V E. b e. V ( W = <" a b c "> /\ E. f ( f ( Walks ` G ) W /\ ( # ` f ) = 2 ) ) <-> E. a e. V E. b e. V E. c e. V ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )
93 3 6 92 3bitrd
 |-  ( G e. UPGraph -> ( W e. ( 2 WWalksN G ) <-> E. a e. V E. b e. V E. c e. V ( W = <" a b c "> /\ E. f E. p ( f ( Walks ` G ) p /\ ( # ` f ) = 2 /\ ( a = ( p ` 0 ) /\ b = ( p ` 1 ) /\ c = ( p ` 2 ) ) ) ) ) )