Metamath Proof Explorer


Theorem ply1fermltl

Description: Fermat's little theorem for polynomials. If P is prime, Then ( X + A ) ^ P = ( ( X ^ P ) + A ) modulo P . (Contributed by Thierry Arnoux, 24-Jul-2024)

Ref Expression
Hypotheses ply1fermltl.z Z = /P
ply1fermltl.w W = Poly 1 Z
ply1fermltl.x X = var 1 Z
ply1fermltl.l + ˙ = + W
ply1fermltl.n N = mulGrp W
ply1fermltl.t × ˙ = N
ply1fermltl.c C = algSc W
ply1fermltl.a A = C ℤRHom Z E
ply1fermltl.p φ P
ply1fermltl.1 φ E
Assertion ply1fermltl φ P × ˙ X + ˙ A = P × ˙ X + ˙ A

Proof

Step Hyp Ref Expression
1 ply1fermltl.z Z = /P
2 ply1fermltl.w W = Poly 1 Z
3 ply1fermltl.x X = var 1 Z
4 ply1fermltl.l + ˙ = + W
5 ply1fermltl.n N = mulGrp W
6 ply1fermltl.t × ˙ = N
7 ply1fermltl.c C = algSc W
8 ply1fermltl.a A = C ℤRHom Z E
9 ply1fermltl.p φ P
10 ply1fermltl.1 φ E
11 eqid Base W = Base W
12 5 fveq2i N = mulGrp W
13 6 12 eqtri × ˙ = mulGrp W
14 eqid chr W = chr W
15 prmnn P P
16 nnnn0 P P 0
17 1 zncrng P 0 Z CRing
18 9 15 16 17 4syl φ Z CRing
19 2 ply1crng Z CRing W CRing
20 18 19 syl φ W CRing
21 2 ply1chr Z CRing chr W = chr Z
22 18 21 syl φ chr W = chr Z
23 1 znchr P 0 chr Z = P
24 9 15 16 23 4syl φ chr Z = P
25 22 24 eqtrd φ chr W = P
26 25 9 eqeltrd φ chr W
27 18 crngringd φ Z Ring
28 3 2 11 vr1cl Z Ring X Base W
29 27 28 syl φ X Base W
30 eqid ℤRHom Z = ℤRHom Z
31 30 zrhrhm Z Ring ℤRHom Z ring RingHom Z
32 zringbas = Base ring
33 eqid Base Z = Base Z
34 32 33 rhmf ℤRHom Z ring RingHom Z ℤRHom Z : Base Z
35 27 31 34 3syl φ ℤRHom Z : Base Z
36 35 10 ffvelrnd φ ℤRHom Z E Base Z
37 2 7 33 11 ply1sclcl Z Ring ℤRHom Z E Base Z C ℤRHom Z E Base W
38 27 36 37 syl2anc φ C ℤRHom Z E Base W
39 8 38 eqeltrid φ A Base W
40 11 4 13 14 20 26 29 39 freshmansdream φ chr W × ˙ X + ˙ A = chr W × ˙ X + ˙ chr W × ˙ A
41 25 oveq1d φ chr W × ˙ X + ˙ A = P × ˙ X + ˙ A
42 25 oveq1d φ chr W × ˙ X = P × ˙ X
43 25 oveq1d φ chr W × ˙ A = P × ˙ A
44 2 ply1assa Z CRing W AssAlg
45 eqid Scalar W = Scalar W
46 7 45 asclrhm W AssAlg C Scalar W RingHom W
47 18 44 46 3syl φ C Scalar W RingHom W
48 18 crnggrpd φ Z Grp
49 2 ply1sca Z Grp Z = Scalar W
50 48 49 syl φ Z = Scalar W
51 50 oveq1d φ Z RingHom W = Scalar W RingHom W
52 47 51 eleqtrrd φ C Z RingHom W
53 eqid mulGrp Z = mulGrp Z
54 53 5 rhmmhm C Z RingHom W C mulGrp Z MndHom N
55 52 54 syl φ C mulGrp Z MndHom N
56 9 15 16 3syl φ P 0
57 53 33 mgpbas Base Z = Base mulGrp Z
58 eqid mulGrp Z = mulGrp Z
59 57 58 6 mhmmulg C mulGrp Z MndHom N P 0 ℤRHom Z E Base Z C P mulGrp Z ℤRHom Z E = P × ˙ C ℤRHom Z E
60 55 56 36 59 syl3anc φ C P mulGrp Z ℤRHom Z E = P × ˙ C ℤRHom Z E
61 8 a1i φ A = C ℤRHom Z E
62 61 oveq2d φ P × ˙ A = P × ˙ C ℤRHom Z E
63 60 62 eqtr4d φ C P mulGrp Z ℤRHom Z E = P × ˙ A
64 1 33 58 znfermltl P ℤRHom Z E Base Z P mulGrp Z ℤRHom Z E = ℤRHom Z E
65 9 36 64 syl2anc φ P mulGrp Z ℤRHom Z E = ℤRHom Z E
66 65 fveq2d φ C P mulGrp Z ℤRHom Z E = C ℤRHom Z E
67 66 8 eqtr4di φ C P mulGrp Z ℤRHom Z E = A
68 43 63 67 3eqtr2d φ chr W × ˙ A = A
69 42 68 oveq12d φ chr W × ˙ X + ˙ chr W × ˙ A = P × ˙ X + ˙ A
70 40 41 69 3eqtr3d φ P × ˙ X + ˙ A = P × ˙ X + ˙ A