Metamath Proof Explorer


Theorem numclwwlk1

Description: Statement 9 in Huneke p. 2: "If n > 1, then the number of closed n-walks v(0) ... v(n-2) v(n-1) v(n) from v = v(0) = v(n) with v(n-2) = v is kf(n-2)". Since G is k-regular, the vertex v(n-2) = v has k neighbors v(n-1), so there are k walks from v(n-2) = v to v(n) = v (via each of v's neighbors) completing each of the f(n-2) walks from v=v(0) to v(n-2)=v. This theorem holds even for k=0, but not for n=2, since F = (/) , but ( X C 2 ) , the set of closed walks with length 2 on X , see 2clwwlk2 , needs not be (/) in this case. This is because of the special definition of F and the usage of words to represent (closed) walks, and does not contradict Huneke's statement, which would read "the number of closed 2-walks v(0) v(1) v(2) from v = v(0) = v(2) ... is kf(0)", where f(0)=1 is the number of empty closed walks on v, see numclwlk1lem1 . If the general representation of (closed) walk is used, Huneke's statement can be proven even for n = 2, see numclwlk1 . This case, however, is not required to prove the friendship theorem. (Contributed by Alexander van der Vekens, 26-Sep-2018) (Revised by AV, 29-May-2021) (Revised by AV, 6-Mar-2022) (Proof shortened by AV, 31-Jul-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 numclwwlk1 V Fin G RegUSGraph K X V N 3 X C N = K F

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 rusgrusgr G RegUSGraph K G USGraph
5 4 ad2antlr V Fin G RegUSGraph K X V N 3 G USGraph
6 simprl V Fin G RegUSGraph K X V N 3 X V
7 simprr V Fin G RegUSGraph K X V N 3 N 3
8 1 2 3 numclwwlk1lem2 G USGraph X V N 3 X C N F × G NeighbVtx X
9 5 6 7 8 syl3anc V Fin G RegUSGraph K X V N 3 X C N F × G NeighbVtx X
10 hasheni X C N F × G NeighbVtx X X C N = F × G NeighbVtx X
11 9 10 syl V Fin G RegUSGraph K X V N 3 X C N = F × G NeighbVtx X
12 eqid Vtx G = Vtx G
13 12 clwwlknonfin Vtx G Fin X ClWWalksNOn G N 2 Fin
14 1 eleq1i V Fin Vtx G Fin
15 3 eleq1i F Fin X ClWWalksNOn G N 2 Fin
16 13 14 15 3imtr4i V Fin F Fin
17 16 adantr V Fin G RegUSGraph K F Fin
18 17 adantr V Fin G RegUSGraph K X V N 3 F Fin
19 1 finrusgrfusgr G RegUSGraph K V Fin G FinUSGraph
20 19 ancoms V Fin G RegUSGraph K G FinUSGraph
21 fusgrfis G FinUSGraph Edg G Fin
22 20 21 syl V Fin G RegUSGraph K Edg G Fin
23 22 adantr V Fin G RegUSGraph K X V N 3 Edg G Fin
24 eqid Edg G = Edg G
25 1 24 nbusgrfi G USGraph Edg G Fin X V G NeighbVtx X Fin
26 5 23 6 25 syl3anc V Fin G RegUSGraph K X V N 3 G NeighbVtx X Fin
27 hashxp F Fin G NeighbVtx X Fin F × G NeighbVtx X = F G NeighbVtx X
28 18 26 27 syl2anc V Fin G RegUSGraph K X V N 3 F × G NeighbVtx X = F G NeighbVtx X
29 1 rusgrpropnb G RegUSGraph K G USGraph K 0 * x V G NeighbVtx x = K
30 oveq2 x = X G NeighbVtx x = G NeighbVtx X
31 30 fveqeq2d x = X G NeighbVtx x = K G NeighbVtx X = K
32 31 rspccv x V G NeighbVtx x = K X V G NeighbVtx X = K
33 32 3ad2ant3 G USGraph K 0 * x V G NeighbVtx x = K X V G NeighbVtx X = K
34 29 33 syl G RegUSGraph K X V G NeighbVtx X = K
35 34 adantl V Fin G RegUSGraph K X V G NeighbVtx X = K
36 35 com12 X V V Fin G RegUSGraph K G NeighbVtx X = K
37 36 adantr X V N 3 V Fin G RegUSGraph K G NeighbVtx X = K
38 37 impcom V Fin G RegUSGraph K X V N 3 G NeighbVtx X = K
39 38 oveq2d V Fin G RegUSGraph K X V N 3 F G NeighbVtx X = F K
40 hashcl F Fin F 0
41 nn0cn F 0 F
42 18 40 41 3syl V Fin G RegUSGraph K X V N 3 F
43 20 adantr V Fin G RegUSGraph K X V N 3 G FinUSGraph
44 simplr V Fin G RegUSGraph K X V N 3 G RegUSGraph K
45 ne0i X V V
46 45 adantr X V N 3 V
47 46 adantl V Fin G RegUSGraph K X V N 3 V
48 1 frusgrnn0 G FinUSGraph G RegUSGraph K V K 0
49 43 44 47 48 syl3anc V Fin G RegUSGraph K X V N 3 K 0
50 49 nn0cnd V Fin G RegUSGraph K X V N 3 K
51 42 50 mulcomd V Fin G RegUSGraph K X V N 3 F K = K F
52 39 51 eqtrd V Fin G RegUSGraph K X V N 3 F G NeighbVtx X = K F
53 11 28 52 3eqtrd V Fin G RegUSGraph K X V N 3 X C N = K F