Metamath Proof Explorer


Theorem clwwlknclwwlkdifnum

Description: In a K-regular graph, the size of the set A of walks of length N starting with a fixed vertex X and ending not at this vertex is the difference between K to the power of N and the size of the set B of closed walks of length N anchored at this vertex X . (Contributed by Alexander van der Vekens, 30-Sep-2018) (Revised by AV, 7-May-2021) (Revised by AV, 8-Mar-2022) (Proof shortened by AV, 16-Mar-2022)

Ref Expression
Hypotheses clwwlknclwwlkdif.a A=wNWWalksNG|w0=XlastSwX
clwwlknclwwlkdif.b B=XNWWalksNOnGX
clwwlknclwwlkdifnum.v V=VtxG
Assertion clwwlknclwwlkdifnum GRegUSGraphKVFinXVN0A=KNB

Proof

Step Hyp Ref Expression
1 clwwlknclwwlkdif.a A=wNWWalksNG|w0=XlastSwX
2 clwwlknclwwlkdif.b B=XNWWalksNOnGX
3 clwwlknclwwlkdifnum.v V=VtxG
4 eqid wNWWalksNG|w0=X=wNWWalksNG|w0=X
5 1 2 4 clwwlknclwwlkdif A=wNWWalksNG|w0=XB
6 5 fveq2i A=wNWWalksNG|w0=XB
7 6 a1i GRegUSGraphKVFinXVN0A=wNWWalksNG|w0=XB
8 3 eleq1i VFinVtxGFin
9 8 biimpi VFinVtxGFin
10 9 adantl GRegUSGraphKVFinVtxGFin
11 10 adantr GRegUSGraphKVFinXVN0VtxGFin
12 wwlksnfi VtxGFinNWWalksNGFin
13 rabfi NWWalksNGFinwNWWalksNG|w0=XFin
14 11 12 13 3syl GRegUSGraphKVFinXVN0wNWWalksNG|w0=XFin
15 3 iswwlksnon XNWWalksNOnGX=wNWWalksNG|w0=XwN=X
16 ancom w0=XwN=XwN=Xw0=X
17 16 rabbii wNWWalksNG|w0=XwN=X=wNWWalksNG|wN=Xw0=X
18 15 17 eqtri XNWWalksNOnGX=wNWWalksNG|wN=Xw0=X
19 18 a1i XVN0XNWWalksNOnGX=wNWWalksNG|wN=Xw0=X
20 2 19 eqtrid XVN0B=wNWWalksNG|wN=Xw0=X
21 simpr wN=Xw0=Xw0=X
22 21 a1i wNWWalksNGwN=Xw0=Xw0=X
23 22 ss2rabi wNWWalksNG|wN=Xw0=XwNWWalksNG|w0=X
24 20 23 eqsstrdi XVN0BwNWWalksNG|w0=X
25 24 adantl GRegUSGraphKVFinXVN0BwNWWalksNG|w0=X
26 hashssdif wNWWalksNG|w0=XFinBwNWWalksNG|w0=XwNWWalksNG|w0=XB=wNWWalksNG|w0=XB
27 14 25 26 syl2anc GRegUSGraphKVFinXVN0wNWWalksNG|w0=XB=wNWWalksNG|w0=XB
28 simpl GRegUSGraphKVFinGRegUSGraphK
29 28 adantr GRegUSGraphKVFinXVN0GRegUSGraphK
30 simpr GRegUSGraphKVFinVFin
31 30 adantr GRegUSGraphKVFinXVN0VFin
32 simpl XVN0XV
33 32 adantl GRegUSGraphKVFinXVN0XV
34 simpr XVN0N0
35 34 adantl GRegUSGraphKVFinXVN0N0
36 3 rusgrnumwwlkg GRegUSGraphKVFinXVN0wNWWalksNG|w0=X=KN
37 29 31 33 35 36 syl13anc GRegUSGraphKVFinXVN0wNWWalksNG|w0=X=KN
38 37 oveq1d GRegUSGraphKVFinXVN0wNWWalksNG|w0=XB=KNB
39 7 27 38 3eqtrd GRegUSGraphKVFinXVN0A=KNB