Metamath Proof Explorer


Theorem numclwwlk1lem2foa

Description: Going forth and back from the end of a (closed) walk: W represents the closed walk p_0, ..., p_(n-2), p_0 = p_(n-2). With X = p_(n-2) = p_0 and Y = p_(n-1), ( ( W ++ <" X "> ) ++ <" Y "> ) represents the closed walk p_0, ..., p_(n-2), p_(n-1), p_n = p_0 which is a double loop of length N on vertex X . (Contributed by Alexander van der Vekens, 22-Sep-2018) (Revised by AV, 29-May-2021) (Revised by AV, 5-Mar-2022) (Proof shortened by AV, 2-Nov-2022)

Ref Expression
Hypotheses extwwlkfab.v V = Vtx G
extwwlkfab.c C = v V , n 2 w v ClWWalksNOn G n | w n 2 = v
extwwlkfab.f F = X ClWWalksNOn G N 2
Assertion numclwwlk1lem2foa G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ X C N

Proof

Step Hyp Ref Expression
1 extwwlkfab.v V = Vtx G
2 extwwlkfab.c C = v V , n 2 w v ClWWalksNOn G n | w n 2 = v
3 extwwlkfab.f F = X ClWWalksNOn G N 2
4 simpl2 G USGraph X V N 3 W F Y G NeighbVtx X X V
5 1 nbgrisvtx Y G NeighbVtx X Y V
6 5 ad2antll G USGraph X V N 3 W F Y G NeighbVtx X Y V
7 simpl3 G USGraph X V N 3 W F Y G NeighbVtx X N 3
8 nbgrsym Y G NeighbVtx X X G NeighbVtx Y
9 eqid Edg G = Edg G
10 9 nbusgreledg G USGraph X G NeighbVtx Y X Y Edg G
11 10 biimpd G USGraph X G NeighbVtx Y X Y Edg G
12 8 11 syl5bi G USGraph Y G NeighbVtx X X Y Edg G
13 12 adantld G USGraph W F Y G NeighbVtx X X Y Edg G
14 13 3ad2ant1 G USGraph X V N 3 W F Y G NeighbVtx X X Y Edg G
15 14 imp G USGraph X V N 3 W F Y G NeighbVtx X X Y Edg G
16 simprl G USGraph X V N 3 W F Y G NeighbVtx X W F
17 16 3 eleqtrdi G USGraph X V N 3 W F Y G NeighbVtx X W X ClWWalksNOn G N 2
18 1 9 clwwlknonex2 X V Y V N 3 X Y Edg G W X ClWWalksNOn G N 2 W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N ClWWalksN G
19 4 6 7 15 17 18 syl311anc G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N ClWWalksN G
20 3 eleq2i W F W X ClWWalksNOn G N 2
21 uz3m2nn N 3 N 2
22 21 nnne0d N 3 N 2 0
23 1 9 clwwlknonel N 2 0 W X ClWWalksNOn G N 2 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X
24 22 23 syl N 3 W X ClWWalksNOn G N 2 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X
25 24 3ad2ant3 G USGraph X V N 3 W X ClWWalksNOn G N 2 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X
26 20 25 syl5bb G USGraph X V N 3 W F W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X
27 3simpa W Word V W = N 2 G USGraph X V N 3 W Word V W = N 2
28 27 adantr W Word V W = N 2 G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2
29 simp32 W Word V W = N 2 G USGraph X V N 3 X V
30 29 5 anim12i W Word V W = N 2 G USGraph X V N 3 Y G NeighbVtx X X V Y V
31 simpl33 W Word V W = N 2 G USGraph X V N 3 Y G NeighbVtx X N 3
32 28 30 31 3jca W Word V W = N 2 G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
33 32 3exp1 W Word V W = N 2 G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
34 33 3ad2ant1 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
35 34 imp W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
36 35 3adant3 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X G USGraph X V N 3 Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
37 36 com12 G USGraph X V N 3 W Word V i 0 ..^ W 1 W i W i + 1 Edg G lastS W W 0 Edg G W = N 2 W 0 = X Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
38 26 37 sylbid G USGraph X V N 3 W F Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
39 38 imp32 G USGraph X V N 3 W F Y G NeighbVtx X W Word V W = N 2 X V Y V N 3
40 numclwwlk1lem2foalem W Word V W = N 2 X V Y V N 3 W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 = W W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 = Y W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
41 39 40 syl G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 = W W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 = Y W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
42 eleq1a W F W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 = W W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F
43 16 42 syl G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 = W W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F
44 eleq1a Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 = Y W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X
45 44 ad2antll G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 = Y W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X
46 idd G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
47 43 45 46 3anim123d G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 = W W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 = Y W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
48 41 47 mpd G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
49 1 2 3 extwwlkfabel G USGraph X V N 3 W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ X C N W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N ClWWalksN G W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
50 49 adantr G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ X C N W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N ClWWalksN G W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ prefix N 2 F W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 1 G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ N 2 = X
51 19 48 50 mpbir2and G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ X C N
52 51 ex G USGraph X V N 3 W F Y G NeighbVtx X W ++ ⟨“ X ”⟩ ++ ⟨“ Y ”⟩ X C N