Metamath Proof Explorer


Theorem numclwwlk2lem1

Description: In a friendship graph, for each walk of length n starting at a fixed vertex v and ending not at this vertex, there is a unique vertex so that the walk extended by an edge to this vertex and an edge from this vertex to the first vertex of the walk is a value of operation H . If the walk is represented as a word, it is sufficient to add one vertex to the word to obtain the closed walk contained in the value of operation H , since in a word representing a closed walk the starting vertex is not repeated at the end. This theorem generally holds only for friendship graphs, because these guarantee that for the first and last vertex there is a (unique) third vertex "in between". (Contributed by Alexander van der Vekens, 3-Oct-2018) (Revised by AV, 30-May-2021) (Revised by AV, 1-May-2022)

Ref Expression
Hypotheses numclwwlk.v V = Vtx G
numclwwlk.q Q = v V , n w n WWalksN G | w 0 = v lastS w v
numclwwlk.h H = v V , n 2 w v ClWWalksNOn G n | w n 2 v
Assertion numclwwlk2lem1 G FriendGraph X V N W X Q N ∃! v V W ++ ⟨“ v ”⟩ X H N + 2

Proof

Step Hyp Ref Expression
1 numclwwlk.v V = Vtx G
2 numclwwlk.q Q = v V , n w n WWalksN G | w 0 = v lastS w v
3 numclwwlk.h H = v V , n 2 w v ClWWalksNOn G n | w n 2 v
4 1 2 numclwwlkovq X V N X Q N = w N WWalksN G | w 0 = X lastS w X
5 4 3adant1 G FriendGraph X V N X Q N = w N WWalksN G | w 0 = X lastS w X
6 5 eleq2d G FriendGraph X V N W X Q N W w N WWalksN G | w 0 = X lastS w X
7 fveq1 w = W w 0 = W 0
8 7 eqeq1d w = W w 0 = X W 0 = X
9 fveq2 w = W lastS w = lastS W
10 9 neeq1d w = W lastS w X lastS W X
11 8 10 anbi12d w = W w 0 = X lastS w X W 0 = X lastS W X
12 11 elrab W w N WWalksN G | w 0 = X lastS w X W N WWalksN G W 0 = X lastS W X
13 6 12 bitrdi G FriendGraph X V N W X Q N W N WWalksN G W 0 = X lastS W X
14 simpl1 G FriendGraph X V N W N WWalksN G W 0 = X lastS W X G FriendGraph
15 eqid Edg G = Edg G
16 1 15 wwlknp W N WWalksN G W Word V W = N + 1 i 0 ..^ N W i W i + 1 Edg G
17 peano2nn N N + 1
18 17 adantl W Word V W = N + 1 N N + 1
19 simpl W Word V W = N + 1 N W Word V W = N + 1
20 18 19 jca W Word V W = N + 1 N N + 1 W Word V W = N + 1
21 20 ex W Word V W = N + 1 N N + 1 W Word V W = N + 1
22 21 3adant3 W Word V W = N + 1 i 0 ..^ N W i W i + 1 Edg G N N + 1 W Word V W = N + 1
23 16 22 syl W N WWalksN G N N + 1 W Word V W = N + 1
24 lswlgt0cl N + 1 W Word V W = N + 1 lastS W V
25 23 24 syl6 W N WWalksN G N lastS W V
26 25 adantr W N WWalksN G W 0 = X lastS W X N lastS W V
27 26 com12 N W N WWalksN G W 0 = X lastS W X lastS W V
28 27 3ad2ant3 G FriendGraph X V N W N WWalksN G W 0 = X lastS W X lastS W V
29 28 imp G FriendGraph X V N W N WWalksN G W 0 = X lastS W X lastS W V
30 eleq1 W 0 = X W 0 V X V
31 30 biimprd W 0 = X X V W 0 V
32 31 ad2antrl W N WWalksN G W 0 = X lastS W X X V W 0 V
33 32 com12 X V W N WWalksN G W 0 = X lastS W X W 0 V
34 33 3ad2ant2 G FriendGraph X V N W N WWalksN G W 0 = X lastS W X W 0 V
35 34 imp G FriendGraph X V N W N WWalksN G W 0 = X lastS W X W 0 V
36 neeq2 X = W 0 lastS W X lastS W W 0
37 36 eqcoms W 0 = X lastS W X lastS W W 0
38 37 biimpa W 0 = X lastS W X lastS W W 0
39 38 adantl W N WWalksN G W 0 = X lastS W X lastS W W 0
40 39 adantl G FriendGraph X V N W N WWalksN G W 0 = X lastS W X lastS W W 0
41 29 35 40 3jca G FriendGraph X V N W N WWalksN G W 0 = X lastS W X lastS W V W 0 V lastS W W 0
42 1 15 frcond2 G FriendGraph lastS W V W 0 V lastS W W 0 ∃! v V lastS W v Edg G v W 0 Edg G
43 14 41 42 sylc G FriendGraph X V N W N WWalksN G W 0 = X lastS W X ∃! v V lastS W v Edg G v W 0 Edg G
44 simpl W N WWalksN G W 0 = X lastS W X W N WWalksN G
45 44 ad2antlr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W N WWalksN G
46 simpr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V v V
47 nnnn0 N N 0
48 47 3ad2ant3 G FriendGraph X V N N 0
49 48 ad2antrr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V N 0
50 45 46 49 3jca G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W N WWalksN G v V N 0
51 1 15 wwlksext2clwwlk W N WWalksN G v V lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
52 51 3adant3 W N WWalksN G v V N 0 lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
53 52 imp W N WWalksN G v V N 0 lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
54 50 53 sylan G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
55 1 wwlknbp W N WWalksN G G V N 0 W Word V
56 55 simp3d W N WWalksN G W Word V
57 56 ad2antrl G FriendGraph X V N W N WWalksN G W 0 = X lastS W X W Word V
58 57 ad2antrr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W Word V
59 46 adantr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G v V
60 2z 2
61 nn0pzuz N 0 2 N + 2 2
62 47 60 61 sylancl N N + 2 2
63 62 3ad2ant3 G FriendGraph X V N N + 2 2
64 63 ad3antrrr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G N + 2 2
65 simpr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
66 1 15 clwwlkext2edg W Word V v V N + 2 2 W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G lastS W v Edg G v W 0 Edg G
67 58 59 64 65 66 syl31anc G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G lastS W v Edg G v W 0 Edg G
68 54 67 impbida G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G
69 46 1 eleqtrdi G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V v Vtx G
70 38 anim2i W N WWalksN G W 0 = X lastS W X W N WWalksN G lastS W W 0
71 70 ad2antlr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W N WWalksN G lastS W W 0
72 71 simprd G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V lastS W W 0
73 numclwwlk2lem1lem v Vtx G W N WWalksN G lastS W W 0 W ++ ⟨“ v ”⟩ 0 = W 0 W ++ ⟨“ v ”⟩ N W 0
74 69 45 72 73 syl3anc G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = W 0 W ++ ⟨“ v ”⟩ N W 0
75 eqeq2 X = W 0 W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ 0 = W 0
76 75 eqcoms W 0 = X W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ 0 = W 0
77 76 ad2antrl W N WWalksN G W 0 = X lastS W X W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ 0 = W 0
78 77 ad2antlr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ 0 = W 0
79 74 simpld G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = W 0
80 79 neeq2d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N W ++ ⟨“ v ”⟩ 0 W ++ ⟨“ v ”⟩ N W 0
81 78 80 anbi12d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N W ++ ⟨“ v ”⟩ 0 W ++ ⟨“ v ”⟩ 0 = W 0 W ++ ⟨“ v ”⟩ N W 0
82 74 81 mpbird G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N W ++ ⟨“ v ”⟩ 0
83 nncn N N
84 2cnd N 2
85 83 84 pncand N N + 2 - 2 = N
86 85 3ad2ant3 G FriendGraph X V N N + 2 - 2 = N
87 86 ad2antrr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V N + 2 - 2 = N
88 87 fveq2d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 - 2 = W ++ ⟨“ v ”⟩ N
89 88 neeq1d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0 W ++ ⟨“ v ”⟩ N W ++ ⟨“ v ”⟩ 0
90 89 anbi2d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0 W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N W ++ ⟨“ v ”⟩ 0
91 82 90 mpbird G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0
92 91 biantrud G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0
93 62 anim2i X V N X V N + 2 2
94 93 3adant1 G FriendGraph X V N X V N + 2 2
95 94 ad2antrr G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V X V N + 2 2
96 3 numclwwlkovh X V N + 2 2 X H N + 2 = w N + 2 ClWWalksN G | w 0 = X w N + 2 - 2 w 0
97 95 96 syl G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V X H N + 2 = w N + 2 ClWWalksN G | w 0 = X w N + 2 - 2 w 0
98 97 eleq2d G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ X H N + 2 W ++ ⟨“ v ”⟩ w N + 2 ClWWalksN G | w 0 = X w N + 2 - 2 w 0
99 fveq1 w = W ++ ⟨“ v ”⟩ w 0 = W ++ ⟨“ v ”⟩ 0
100 99 eqeq1d w = W ++ ⟨“ v ”⟩ w 0 = X W ++ ⟨“ v ”⟩ 0 = X
101 fveq1 w = W ++ ⟨“ v ”⟩ w N + 2 - 2 = W ++ ⟨“ v ”⟩ N + 2 - 2
102 101 99 neeq12d w = W ++ ⟨“ v ”⟩ w N + 2 - 2 w 0 W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0
103 100 102 anbi12d w = W ++ ⟨“ v ”⟩ w 0 = X w N + 2 - 2 w 0 W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0
104 103 elrab W ++ ⟨“ v ”⟩ w N + 2 ClWWalksN G | w 0 = X w N + 2 - 2 w 0 W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0
105 98 104 bitr2di G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V W ++ ⟨“ v ”⟩ N + 2 ClWWalksN G W ++ ⟨“ v ”⟩ 0 = X W ++ ⟨“ v ”⟩ N + 2 - 2 W ++ ⟨“ v ”⟩ 0 W ++ ⟨“ v ”⟩ X H N + 2
106 68 92 105 3bitrd G FriendGraph X V N W N WWalksN G W 0 = X lastS W X v V lastS W v Edg G v W 0 Edg G W ++ ⟨“ v ”⟩ X H N + 2
107 106 reubidva G FriendGraph X V N W N WWalksN G W 0 = X lastS W X ∃! v V lastS W v Edg G v W 0 Edg G ∃! v V W ++ ⟨“ v ”⟩ X H N + 2
108 43 107 mpbid G FriendGraph X V N W N WWalksN G W 0 = X lastS W X ∃! v V W ++ ⟨“ v ”⟩ X H N + 2
109 108 ex G FriendGraph X V N W N WWalksN G W 0 = X lastS W X ∃! v V W ++ ⟨“ v ”⟩ X H N + 2
110 13 109 sylbid G FriendGraph X V N W X Q N ∃! v V W ++ ⟨“ v ”⟩ X H N + 2