Metamath Proof Explorer


Theorem usgr2wlkspth

Description: In a simple graph, any walk of length 2 between two different vertices is a simple path. (Contributed by Alexander van der Vekens, 2-Mar-2018) (Revised by AV, 27-Jan-2021) (Proof shortened by AV, 31-Oct-2021)

Ref Expression
Assertion usgr2wlkspth G USGraph F = 2 A B F A WalksOn G B P F A SPathsOn G B P

Proof

Step Hyp Ref Expression
1 simpl31 A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F Walks G P
2 simp2 F Walks G P P 0 = A P F = B P 0 = A
3 simp3 F Walks G P P 0 = A P F = B P F = B
4 2 3 neeq12d F Walks G P P 0 = A P F = B P 0 P F A B
5 4 bicomd F Walks G P P 0 = A P F = B A B P 0 P F
6 5 3anbi3d F Walks G P P 0 = A P F = B G USGraph F = 2 A B G USGraph F = 2 P 0 P F
7 usgr2wlkspthlem1 F Walks G P G USGraph F = 2 P 0 P F Fun F -1
8 7 ex F Walks G P G USGraph F = 2 P 0 P F Fun F -1
9 8 3ad2ant1 F Walks G P P 0 = A P F = B G USGraph F = 2 P 0 P F Fun F -1
10 6 9 sylbid F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun F -1
11 10 3ad2ant3 A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun F -1
12 11 imp A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun F -1
13 istrl F Trails G P F Walks G P Fun F -1
14 1 12 13 sylanbrc A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F Trails G P
15 usgr2wlkspthlem2 F Walks G P G USGraph F = 2 P 0 P F Fun P -1
16 15 ex F Walks G P G USGraph F = 2 P 0 P F Fun P -1
17 16 3ad2ant1 F Walks G P P 0 = A P F = B G USGraph F = 2 P 0 P F Fun P -1
18 6 17 sylbid F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun P -1
19 18 3ad2ant3 A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun P -1
20 19 imp A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B Fun P -1
21 isspth F SPaths G P F Trails G P Fun P -1
22 14 20 21 sylanbrc A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F SPaths G P
23 3simpc F Walks G P P 0 = A P F = B P 0 = A P F = B
24 23 3ad2ant3 A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B P 0 = A P F = B
25 24 adantr A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B P 0 = A P F = B
26 3anass F SPaths G P P 0 = A P F = B F SPaths G P P 0 = A P F = B
27 22 25 26 sylanbrc A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F SPaths G P P 0 = A P F = B
28 3simpa A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B A Vtx G B Vtx G F V P V
29 28 adantr A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B A Vtx G B Vtx G F V P V
30 eqid Vtx G = Vtx G
31 30 isspthonpth A Vtx G B Vtx G F V P V F A SPathsOn G B P F SPaths G P P 0 = A P F = B
32 29 31 syl A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F A SPathsOn G B P F SPaths G P P 0 = A P F = B
33 27 32 mpbird A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F A SPathsOn G B P
34 33 ex A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B G USGraph F = 2 A B F A SPathsOn G B P
35 30 wlkonprop F A WalksOn G B P G V A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B
36 3simpc G V A Vtx G B Vtx G A Vtx G B Vtx G
37 36 3anim1i G V A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B
38 35 37 syl F A WalksOn G B P A Vtx G B Vtx G F V P V F Walks G P P 0 = A P F = B
39 34 38 syl11 G USGraph F = 2 A B F A WalksOn G B P F A SPathsOn G B P
40 spthonpthon F A SPathsOn G B P F A PathsOn G B P
41 pthontrlon F A PathsOn G B P F A TrailsOn G B P
42 trlsonwlkon F A TrailsOn G B P F A WalksOn G B P
43 40 41 42 3syl F A SPathsOn G B P F A WalksOn G B P
44 39 43 impbid1 G USGraph F = 2 A B F A WalksOn G B P F A SPathsOn G B P