Metamath Proof Explorer


Theorem 2pthd

Description: A path of length 2 from one vertex to another vertex via a third vertex. (Contributed by Alexander van der Vekens, 6-Dec-2017) (Revised by AV, 24-Jan-2021) (Revised by AV, 24-Mar-2021)

Ref Expression
Hypotheses 2wlkd.p
|- P = <" A B C ">
2wlkd.f
|- F = <" J K ">
2wlkd.s
|- ( ph -> ( A e. V /\ B e. V /\ C e. V ) )
2wlkd.n
|- ( ph -> ( A =/= B /\ B =/= C ) )
2wlkd.e
|- ( ph -> ( { A , B } C_ ( I ` J ) /\ { B , C } C_ ( I ` K ) ) )
2wlkd.v
|- V = ( Vtx ` G )
2wlkd.i
|- I = ( iEdg ` G )
2trld.n
|- ( ph -> J =/= K )
Assertion 2pthd
|- ( ph -> F ( Paths ` G ) P )

Proof

Step Hyp Ref Expression
1 2wlkd.p
 |-  P = <" A B C ">
2 2wlkd.f
 |-  F = <" J K ">
3 2wlkd.s
 |-  ( ph -> ( A e. V /\ B e. V /\ C e. V ) )
4 2wlkd.n
 |-  ( ph -> ( A =/= B /\ B =/= C ) )
5 2wlkd.e
 |-  ( ph -> ( { A , B } C_ ( I ` J ) /\ { B , C } C_ ( I ` K ) ) )
6 2wlkd.v
 |-  V = ( Vtx ` G )
7 2wlkd.i
 |-  I = ( iEdg ` G )
8 2trld.n
 |-  ( ph -> J =/= K )
9 s3cli
 |-  <" A B C "> e. Word _V
10 1 9 eqeltri
 |-  P e. Word _V
11 10 a1i
 |-  ( ph -> P e. Word _V )
12 2 fveq2i
 |-  ( # ` F ) = ( # ` <" J K "> )
13 s2len
 |-  ( # ` <" J K "> ) = 2
14 12 13 eqtri
 |-  ( # ` F ) = 2
15 3m1e2
 |-  ( 3 - 1 ) = 2
16 1 fveq2i
 |-  ( # ` P ) = ( # ` <" A B C "> )
17 s3len
 |-  ( # ` <" A B C "> ) = 3
18 16 17 eqtr2i
 |-  3 = ( # ` P )
19 18 oveq1i
 |-  ( 3 - 1 ) = ( ( # ` P ) - 1 )
20 14 15 19 3eqtr2i
 |-  ( # ` F ) = ( ( # ` P ) - 1 )
21 1 2 3 4 2pthdlem1
 |-  ( ph -> A. k e. ( 0 ..^ ( # ` P ) ) A. j e. ( 1 ..^ ( # ` F ) ) ( k =/= j -> ( P ` k ) =/= ( P ` j ) ) )
22 eqid
 |-  ( # ` F ) = ( # ` F )
23 1 2 3 4 5 6 7 8 2trld
 |-  ( ph -> F ( Trails ` G ) P )
24 11 20 21 22 23 pthd
 |-  ( ph -> F ( Paths ` G ) P )