Metamath Proof Explorer


Theorem fusgreghash2wsp

Description: In a finite k-regular graph with N vertices there are N times "k choose 2" paths with length 2, according to statement 8 in Huneke p. 2: "... giving n * ( k 2 ) total paths of length two.", if the direction of traversing the path is not respected. For simple paths of length 2 represented by length 3 strings, however, we have again n*k*(k-1) such paths. (Contributed by Alexander van der Vekens, 11-Mar-2018) (Revised by AV, 19-May-2021) (Proof shortened by AV, 12-Jan-2022)

Ref Expression
Hypothesis fusgreghash2wsp.v V = Vtx G
Assertion fusgreghash2wsp G FinUSGraph V v V VtxDeg G v = K 2 WSPathsN G = V K K 1

Proof

Step Hyp Ref Expression
1 fusgreghash2wsp.v V = Vtx G
2 fveq1 s = t s 1 = t 1
3 2 eqeq1d s = t s 1 = a t 1 = a
4 3 cbvrabv s 2 WSPathsN G | s 1 = a = t 2 WSPathsN G | t 1 = a
5 4 mpteq2i a V s 2 WSPathsN G | s 1 = a = a V t 2 WSPathsN G | t 1 = a
6 1 5 fusgreg2wsp G FinUSGraph 2 WSPathsN G = y V a V s 2 WSPathsN G | s 1 = a y
7 6 ad2antrr G FinUSGraph V v V VtxDeg G v = K 2 WSPathsN G = y V a V s 2 WSPathsN G | s 1 = a y
8 7 fveq2d G FinUSGraph V v V VtxDeg G v = K 2 WSPathsN G = y V a V s 2 WSPathsN G | s 1 = a y
9 1 fusgrvtxfi G FinUSGraph V Fin
10 eqeq2 a = y s 1 = a s 1 = y
11 10 rabbidv a = y s 2 WSPathsN G | s 1 = a = s 2 WSPathsN G | s 1 = y
12 eqid a V s 2 WSPathsN G | s 1 = a = a V s 2 WSPathsN G | s 1 = a
13 ovex 2 WSPathsN G V
14 13 rabex s 2 WSPathsN G | s 1 = y V
15 11 12 14 fvmpt y V a V s 2 WSPathsN G | s 1 = a y = s 2 WSPathsN G | s 1 = y
16 15 adantl G FinUSGraph y V a V s 2 WSPathsN G | s 1 = a y = s 2 WSPathsN G | s 1 = y
17 eqid Vtx G = Vtx G
18 17 fusgrvtxfi G FinUSGraph Vtx G Fin
19 wspthnfi Vtx G Fin 2 WSPathsN G Fin
20 rabfi 2 WSPathsN G Fin s 2 WSPathsN G | s 1 = y Fin
21 18 19 20 3syl G FinUSGraph s 2 WSPathsN G | s 1 = y Fin
22 21 adantr G FinUSGraph y V s 2 WSPathsN G | s 1 = y Fin
23 16 22 eqeltrd G FinUSGraph y V a V s 2 WSPathsN G | s 1 = a y Fin
24 1 5 2wspmdisj Disj y V a V s 2 WSPathsN G | s 1 = a y
25 24 a1i G FinUSGraph Disj y V a V s 2 WSPathsN G | s 1 = a y
26 9 23 25 hashiun G FinUSGraph y V a V s 2 WSPathsN G | s 1 = a y = y V a V s 2 WSPathsN G | s 1 = a y
27 26 ad2antrr G FinUSGraph V v V VtxDeg G v = K y V a V s 2 WSPathsN G | s 1 = a y = y V a V s 2 WSPathsN G | s 1 = a y
28 1 5 fusgreghash2wspv G FinUSGraph v V VtxDeg G v = K a V s 2 WSPathsN G | s 1 = a v = K K 1
29 ralim v V VtxDeg G v = K a V s 2 WSPathsN G | s 1 = a v = K K 1 v V VtxDeg G v = K v V a V s 2 WSPathsN G | s 1 = a v = K K 1
30 28 29 syl G FinUSGraph v V VtxDeg G v = K v V a V s 2 WSPathsN G | s 1 = a v = K K 1
31 30 adantr G FinUSGraph V v V VtxDeg G v = K v V a V s 2 WSPathsN G | s 1 = a v = K K 1
32 31 imp G FinUSGraph V v V VtxDeg G v = K v V a V s 2 WSPathsN G | s 1 = a v = K K 1
33 2fveq3 v = y a V s 2 WSPathsN G | s 1 = a v = a V s 2 WSPathsN G | s 1 = a y
34 33 eqeq1d v = y a V s 2 WSPathsN G | s 1 = a v = K K 1 a V s 2 WSPathsN G | s 1 = a y = K K 1
35 34 rspccva v V a V s 2 WSPathsN G | s 1 = a v = K K 1 y V a V s 2 WSPathsN G | s 1 = a y = K K 1
36 32 35 sylan G FinUSGraph V v V VtxDeg G v = K y V a V s 2 WSPathsN G | s 1 = a y = K K 1
37 36 sumeq2dv G FinUSGraph V v V VtxDeg G v = K y V a V s 2 WSPathsN G | s 1 = a y = y V K K 1
38 9 adantr G FinUSGraph V V Fin
39 eqid VtxDeg G = VtxDeg G
40 1 39 fusgrregdegfi G FinUSGraph V v V VtxDeg G v = K K 0
41 40 imp G FinUSGraph V v V VtxDeg G v = K K 0
42 41 nn0cnd G FinUSGraph V v V VtxDeg G v = K K
43 kcnktkm1cn K K K 1
44 42 43 syl G FinUSGraph V v V VtxDeg G v = K K K 1
45 fsumconst V Fin K K 1 y V K K 1 = V K K 1
46 38 44 45 syl2an2r G FinUSGraph V v V VtxDeg G v = K y V K K 1 = V K K 1
47 37 46 eqtrd G FinUSGraph V v V VtxDeg G v = K y V a V s 2 WSPathsN G | s 1 = a y = V K K 1
48 8 27 47 3eqtrd G FinUSGraph V v V VtxDeg G v = K 2 WSPathsN G = V K K 1
49 48 ex G FinUSGraph V v V VtxDeg G v = K 2 WSPathsN G = V K K 1