Metamath Proof Explorer


Theorem rusgrnumwwlk

Description: In a K-regular graph, the number of walks of a fixed length N from a fixed vertex is K to the power of N . By definition, ( N WWalksN G ) is the set of walks (as words) with length N , and ( P L N ) is the number of walks with length N starting at the vertex P . Because of the K-regularity, a walk can be continued in K different ways at the end vertex of the walk, and this repeated N times.

This theorem even holds for N = 0 : in this case, the walk consists of only one vertex P , so the number of walks of length N = 0 starting with P is ( K ^ 0 ) = 1 . (Contributed by Alexander van der Vekens, 24-Aug-2018) (Revised by AV, 7-May-2021)

Ref Expression
Hypotheses rusgrnumwwlk.v V=VtxG
rusgrnumwwlk.l L=vV,n0wnWWalksNG|w0=v
Assertion rusgrnumwwlk GRegUSGraphKVFinPVN0PLN=KN

Proof

Step Hyp Ref Expression
1 rusgrnumwwlk.v V=VtxG
2 rusgrnumwwlk.l L=vV,n0wnWWalksNG|w0=v
3 oveq2 x=0PLx=PL0
4 oveq2 x=0Kx=K0
5 3 4 eqeq12d x=0PLx=KxPL0=K0
6 5 imbi2d x=0VFinPVGRegUSGraphKPLx=KxVFinPVGRegUSGraphKPL0=K0
7 oveq2 x=yPLx=PLy
8 oveq2 x=yKx=Ky
9 7 8 eqeq12d x=yPLx=KxPLy=Ky
10 9 imbi2d x=yVFinPVGRegUSGraphKPLx=KxVFinPVGRegUSGraphKPLy=Ky
11 oveq2 x=y+1PLx=PLy+1
12 oveq2 x=y+1Kx=Ky+1
13 11 12 eqeq12d x=y+1PLx=KxPLy+1=Ky+1
14 13 imbi2d x=y+1VFinPVGRegUSGraphKPLx=KxVFinPVGRegUSGraphKPLy+1=Ky+1
15 oveq2 x=NPLx=PLN
16 oveq2 x=NKx=KN
17 15 16 eqeq12d x=NPLx=KxPLN=KN
18 17 imbi2d x=NVFinPVGRegUSGraphKPLx=KxVFinPVGRegUSGraphKPLN=KN
19 rusgrusgr GRegUSGraphKGUSGraph
20 usgruspgr GUSGraphGUSHGraph
21 19 20 syl GRegUSGraphKGUSHGraph
22 simpr VFinPVPV
23 1 2 rusgrnumwwlkb0 GUSHGraphPVPL0=1
24 21 22 23 syl2anr VFinPVGRegUSGraphKPL0=1
25 simpl VFinPVVFin
26 25 19 anim12ci VFinPVGRegUSGraphKGUSGraphVFin
27 1 isfusgr GFinUSGraphGUSGraphVFin
28 26 27 sylibr VFinPVGRegUSGraphKGFinUSGraph
29 simpr VFinPVGRegUSGraphKGRegUSGraphK
30 ne0i PVV
31 30 ad2antlr VFinPVGRegUSGraphKV
32 1 frusgrnn0 GFinUSGraphGRegUSGraphKVK0
33 32 nn0cnd GFinUSGraphGRegUSGraphKVK
34 28 29 31 33 syl3anc VFinPVGRegUSGraphKK
35 34 exp0d VFinPVGRegUSGraphKK0=1
36 24 35 eqtr4d VFinPVGRegUSGraphKPL0=K0
37 simpl VFinPVGRegUSGraphKVFinPV
38 37 anim1i VFinPVGRegUSGraphKy0VFinPVy0
39 df-3an VFinPVy0VFinPVy0
40 38 39 sylibr VFinPVGRegUSGraphKy0VFinPVy0
41 1 2 rusgrnumwwlks GRegUSGraphKVFinPVy0PLy=KyPLy+1=Ky+1
42 29 40 41 syl2an2r VFinPVGRegUSGraphKy0PLy=KyPLy+1=Ky+1
43 42 expcom y0VFinPVGRegUSGraphKPLy=KyPLy+1=Ky+1
44 43 a2d y0VFinPVGRegUSGraphKPLy=KyVFinPVGRegUSGraphKPLy+1=Ky+1
45 6 10 14 18 36 44 nn0ind N0VFinPVGRegUSGraphKPLN=KN
46 45 expd N0VFinPVGRegUSGraphKPLN=KN
47 46 com12 VFinPVN0GRegUSGraphKPLN=KN
48 47 3impia VFinPVN0GRegUSGraphKPLN=KN
49 48 impcom GRegUSGraphKVFinPVN0PLN=KN