Metamath Proof Explorer


Theorem numclwwlk5

Description: Statement 13 in Huneke p. 2: "Let p be a prime divisor of k-1; then f(p) = 1 (mod p) [for each vertex v]". (Contributed by Alexander van der Vekens, 7-Oct-2018) (Revised by AV, 2-Jun-2021) (Revised by AV, 7-Mar-2022)

Ref Expression
Hypothesis numclwwlk3.v V = Vtx G
Assertion numclwwlk5 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = 1

Proof

Step Hyp Ref Expression
1 numclwwlk3.v V = Vtx G
2 simpl1 G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 G RegUSGraph K
3 simpr1 G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 X V
4 1 finrusgrfusgr G RegUSGraph K V Fin G FinUSGraph
5 4 3adant2 G RegUSGraph K G FriendGraph V Fin G FinUSGraph
6 5 adantl X V G RegUSGraph K G FriendGraph V Fin G FinUSGraph
7 simpr1 X V G RegUSGraph K G FriendGraph V Fin G RegUSGraph K
8 ne0i X V V
9 8 adantr X V G RegUSGraph K G FriendGraph V Fin V
10 1 frusgrnn0 G FinUSGraph G RegUSGraph K V K 0
11 6 7 9 10 syl3anc X V G RegUSGraph K G FriendGraph V Fin K 0
12 11 ex X V G RegUSGraph K G FriendGraph V Fin K 0
13 12 3ad2ant1 X V 2 2 K 1 G RegUSGraph K G FriendGraph V Fin K 0
14 13 impcom G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 K 0
15 2 3 14 3jca G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 G RegUSGraph K X V K 0
16 simpr3 G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 2 K 1
17 1 numclwwlk5lem G RegUSGraph K X V K 0 2 K 1 X ClWWalksNOn G 2 mod 2 = 1
18 15 16 17 sylc G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 X ClWWalksNOn G 2 mod 2 = 1
19 18 a1i P = 2 G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1 X ClWWalksNOn G 2 mod 2 = 1
20 eleq1 P = 2 P 2
21 breq1 P = 2 P K 1 2 K 1
22 20 21 3anbi23d P = 2 X V P P K 1 X V 2 2 K 1
23 22 anbi2d P = 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 G RegUSGraph K G FriendGraph V Fin X V 2 2 K 1
24 oveq2 P = 2 X ClWWalksNOn G P = X ClWWalksNOn G 2
25 24 fveq2d P = 2 X ClWWalksNOn G P = X ClWWalksNOn G 2
26 id P = 2 P = 2
27 25 26 oveq12d P = 2 X ClWWalksNOn G P mod P = X ClWWalksNOn G 2 mod 2
28 27 eqeq1d P = 2 X ClWWalksNOn G P mod P = 1 X ClWWalksNOn G 2 mod 2 = 1
29 19 23 28 3imtr4d P = 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = 1
30 3simpa G RegUSGraph K G FriendGraph V Fin G RegUSGraph K G FriendGraph
31 30 adantr G RegUSGraph K G FriendGraph V Fin X V P P K 1 G RegUSGraph K G FriendGraph
32 31 adantl P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 G RegUSGraph K G FriendGraph
33 simprl3 P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 V Fin
34 simprr1 P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X V
35 eldifsn P 2 P P 2
36 oddprmge3 P 2 P 3
37 35 36 sylbir P P 2 P 3
38 37 ex P P 2 P 3
39 38 3ad2ant2 X V P P K 1 P 2 P 3
40 39 adantl G RegUSGraph K G FriendGraph V Fin X V P P K 1 P 2 P 3
41 40 impcom P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 P 3
42 1 numclwwlk3 G RegUSGraph K G FriendGraph V Fin X V P 3 X ClWWalksNOn G P = K 1 X ClWWalksNOn G P 2 + K P 2
43 32 33 34 41 42 syl13anc P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P = K 1 X ClWWalksNOn G P 2 + K P 2
44 43 oveq1d P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = K 1 X ClWWalksNOn G P 2 + K P 2 mod P
45 12 3ad2ant1 X V P P K 1 G RegUSGraph K G FriendGraph V Fin K 0
46 45 impcom G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 0
47 46 nn0zd G RegUSGraph K G FriendGraph V Fin X V P P K 1 K
48 peano2zm K K 1
49 zre K 1 K 1
50 47 48 49 3syl G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1
51 simpl3 G RegUSGraph K G FriendGraph V Fin X V P P K 1 V Fin
52 1 clwwlknonfin V Fin X ClWWalksNOn G P 2 Fin
53 hashcl X ClWWalksNOn G P 2 Fin X ClWWalksNOn G P 2 0
54 51 52 53 3syl G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P 2 0
55 54 nn0red G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P 2
56 50 55 remulcld G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2
57 46 nn0red G RegUSGraph K G FriendGraph V Fin X V P P K 1 K
58 prmm2nn0 P P 2 0
59 58 3ad2ant2 X V P P K 1 P 2 0
60 59 adantl G RegUSGraph K G FriendGraph V Fin X V P P K 1 P 2 0
61 57 60 reexpcld G RegUSGraph K G FriendGraph V Fin X V P P K 1 K P 2
62 prmnn P P
63 62 nnrpd P P +
64 63 3ad2ant2 X V P P K 1 P +
65 64 adantl G RegUSGraph K G FriendGraph V Fin X V P P K 1 P +
66 56 61 65 3jca G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 K P 2 P +
67 66 adantl P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 K P 2 P +
68 modaddabs K 1 X ClWWalksNOn G P 2 K P 2 P + K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P = K 1 X ClWWalksNOn G P 2 + K P 2 mod P
69 68 eqcomd K 1 X ClWWalksNOn G P 2 K P 2 P + K 1 X ClWWalksNOn G P 2 + K P 2 mod P = K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P
70 67 69 syl P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 + K P 2 mod P = K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P
71 62 3ad2ant2 X V P P K 1 P
72 71 adantl G RegUSGraph K G FriendGraph V Fin X V P P K 1 P
73 nn0z K 0 K
74 46 73 48 3syl G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1
75 54 nn0zd G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P 2
76 72 74 75 3jca G RegUSGraph K G FriendGraph V Fin X V P P K 1 P K 1 X ClWWalksNOn G P 2
77 simpr3 G RegUSGraph K G FriendGraph V Fin X V P P K 1 P K 1
78 mulmoddvds P K 1 X ClWWalksNOn G P 2 P K 1 K 1 X ClWWalksNOn G P 2 mod P = 0
79 76 77 78 sylc G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 mod P = 0
80 simpr2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 P
81 80 47 jca G RegUSGraph K G FriendGraph V Fin X V P P K 1 P K
82 powm2modprm P K P K 1 K P 2 mod P = 1
83 81 77 82 sylc G RegUSGraph K G FriendGraph V Fin X V P P K 1 K P 2 mod P = 1
84 79 83 oveq12d G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P = 0 + 1
85 84 oveq1d G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P = 0 + 1 mod P
86 0p1e1 0 + 1 = 1
87 86 oveq1i 0 + 1 mod P = 1 mod P
88 62 nnred P P
89 prmgt1 P 1 < P
90 1mod P 1 < P 1 mod P = 1
91 88 89 90 syl2anc P 1 mod P = 1
92 87 91 syl5eq P 0 + 1 mod P = 1
93 92 3ad2ant2 X V P P K 1 0 + 1 mod P = 1
94 93 adantl G RegUSGraph K G FriendGraph V Fin X V P P K 1 0 + 1 mod P = 1
95 85 94 eqtrd G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P = 1
96 95 adantl P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 K 1 X ClWWalksNOn G P 2 mod P + K P 2 mod P mod P = 1
97 44 70 96 3eqtrd P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = 1
98 97 ex P 2 G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = 1
99 29 98 pm2.61ine G RegUSGraph K G FriendGraph V Fin X V P P K 1 X ClWWalksNOn G P mod P = 1