Metamath Proof Explorer


Theorem clwwlknon

Description: The set of closed walks on vertex X of length N in a graph G as words over the set of vertices. (Contributed by Alexander van der Vekens, 14-Sep-2018) (Revised by AV, 28-May-2021) (Revised by AV, 24-Mar-2022)

Ref Expression
Assertion clwwlknon X ClWWalksNOn G N = w N ClWWalksN G | w 0 = X

Proof

Step Hyp Ref Expression
1 eqeq2 v = X w 0 = v w 0 = X
2 1 rabbidv v = X w n ClWWalksN G | w 0 = v = w n ClWWalksN G | w 0 = X
3 oveq1 n = N n ClWWalksN G = N ClWWalksN G
4 3 rabeqdv n = N w n ClWWalksN G | w 0 = X = w N ClWWalksN G | w 0 = X
5 clwwlknonmpo ClWWalksNOn G = v Vtx G , n 0 w n ClWWalksN G | w 0 = v
6 ovex N ClWWalksN G V
7 6 rabex w N ClWWalksN G | w 0 = X V
8 2 4 5 7 ovmpo X Vtx G N 0 X ClWWalksNOn G N = w N ClWWalksN G | w 0 = X
9 5 mpondm0 ¬ X Vtx G N 0 X ClWWalksNOn G N =
10 isclwwlkn w N ClWWalksN G w ClWWalks G w = N
11 eqid Vtx G = Vtx G
12 11 clwwlkbp w ClWWalks G G V w Word Vtx G w
13 fstwrdne w Word Vtx G w w 0 Vtx G
14 13 3adant1 G V w Word Vtx G w w 0 Vtx G
15 12 14 syl w ClWWalks G w 0 Vtx G
16 15 adantr w ClWWalks G w = N w 0 Vtx G
17 10 16 sylbi w N ClWWalksN G w 0 Vtx G
18 17 adantr w N ClWWalksN G w 0 = X w 0 Vtx G
19 eleq1 w 0 = X w 0 Vtx G X Vtx G
20 19 adantl w N ClWWalksN G w 0 = X w 0 Vtx G X Vtx G
21 18 20 mpbid w N ClWWalksN G w 0 = X X Vtx G
22 clwwlknnn w N ClWWalksN G N
23 22 nnnn0d w N ClWWalksN G N 0
24 23 adantr w N ClWWalksN G w 0 = X N 0
25 21 24 jca w N ClWWalksN G w 0 = X X Vtx G N 0
26 25 ex w N ClWWalksN G w 0 = X X Vtx G N 0
27 26 con3rr3 ¬ X Vtx G N 0 w N ClWWalksN G ¬ w 0 = X
28 27 ralrimiv ¬ X Vtx G N 0 w N ClWWalksN G ¬ w 0 = X
29 rabeq0 w N ClWWalksN G | w 0 = X = w N ClWWalksN G ¬ w 0 = X
30 28 29 sylibr ¬ X Vtx G N 0 w N ClWWalksN G | w 0 = X =
31 9 30 eqtr4d ¬ X Vtx G N 0 X ClWWalksNOn G N = w N ClWWalksN G | w 0 = X
32 8 31 pm2.61i X ClWWalksNOn G N = w N ClWWalksN G | w 0 = X