Metamath Proof Explorer


Theorem lgseisenlem3

Description: Lemma for lgseisen . (Contributed by Mario Carneiro, 17-Jun-2015) (Proof shortened by AV, 28-Jul-2019)

Ref Expression
Hypotheses lgseisen.1 φ P 2
lgseisen.2 φ Q 2
lgseisen.3 φ P Q
lgseisen.4 R = Q 2 x mod P
lgseisen.5 M = x 1 P 1 2 1 R R mod P 2
lgseisen.6 S = Q 2 y mod P
lgseisen.7 Y = /P
lgseisen.8 G = mulGrp Y
lgseisen.9 L = ℤRHom Y
Assertion lgseisenlem3 φ G x = 1 P 1 2 L 1 R Q = 1 Y

Proof

Step Hyp Ref Expression
1 lgseisen.1 φ P 2
2 lgseisen.2 φ Q 2
3 lgseisen.3 φ P Q
4 lgseisen.4 R = Q 2 x mod P
5 lgseisen.5 M = x 1 P 1 2 1 R R mod P 2
6 lgseisen.6 S = Q 2 y mod P
7 lgseisen.7 Y = /P
8 lgseisen.8 G = mulGrp Y
9 lgseisen.9 L = ℤRHom Y
10 oveq2 k = x 2 k = 2 x
11 10 fveq2d k = x L 2 k = L 2 x
12 11 cbvmptv k 1 P 1 2 L 2 k = x 1 P 1 2 L 2 x
13 12 oveq2i G k = 1 P 1 2 L 2 k = G x = 1 P 1 2 L 2 x
14 eqid Base Y = Base Y
15 8 14 mgpbas Base Y = Base G
16 eqid 0 G = 0 G
17 1 eldifad φ P
18 7 znfld P Y Field
19 17 18 syl φ Y Field
20 isfld Y Field Y DivRing Y CRing
21 20 simprbi Y Field Y CRing
22 19 21 syl φ Y CRing
23 8 crngmgp Y CRing G CMnd
24 22 23 syl φ G CMnd
25 fzfid φ 1 P 1 2 Fin
26 crngring Y CRing Y Ring
27 22 26 syl φ Y Ring
28 9 zrhrhm Y Ring L ring RingHom Y
29 27 28 syl φ L ring RingHom Y
30 zringbas = Base ring
31 30 14 rhmf L ring RingHom Y L : Base Y
32 29 31 syl φ L : Base Y
33 2z 2
34 elfzelz k 1 P 1 2 k
35 zmulcl 2 k 2 k
36 33 34 35 sylancr k 1 P 1 2 2 k
37 ffvelrn L : Base Y 2 k L 2 k Base Y
38 32 36 37 syl2an φ k 1 P 1 2 L 2 k Base Y
39 38 fmpttd φ k 1 P 1 2 L 2 k : 1 P 1 2 Base Y
40 eqid k 1 P 1 2 L 2 k = k 1 P 1 2 L 2 k
41 fvexd φ k 1 P 1 2 L 2 k V
42 fvexd φ 0 G V
43 40 25 41 42 fsuppmptdm φ finSupp 0 G k 1 P 1 2 L 2 k
44 1 2 3 4 5 6 lgseisenlem2 φ M : 1 P 1 2 1-1 onto 1 P 1 2
45 15 16 24 25 39 43 44 gsumf1o φ G k = 1 P 1 2 L 2 k = G k 1 P 1 2 L 2 k M
46 13 45 eqtr3id φ G x = 1 P 1 2 L 2 x = G k 1 P 1 2 L 2 k M
47 1 2 3 4 5 lgseisenlem1 φ M : 1 P 1 2 1 P 1 2
48 5 fmpt x 1 P 1 2 1 R R mod P 2 1 P 1 2 M : 1 P 1 2 1 P 1 2
49 47 48 sylibr φ x 1 P 1 2 1 R R mod P 2 1 P 1 2
50 5 a1i φ M = x 1 P 1 2 1 R R mod P 2
51 eqidd φ k 1 P 1 2 L 2 k = k 1 P 1 2 L 2 k
52 oveq2 k = 1 R R mod P 2 2 k = 2 1 R R mod P 2
53 52 fveq2d k = 1 R R mod P 2 L 2 k = L 2 1 R R mod P 2
54 49 50 51 53 fmptcof φ k 1 P 1 2 L 2 k M = x 1 P 1 2 L 2 1 R R mod P 2
55 54 oveq2d φ G k 1 P 1 2 L 2 k M = G x = 1 P 1 2 L 2 1 R R mod P 2
56 2 eldifad φ Q
57 56 adantr φ x 1 P 1 2 Q
58 prmz Q Q
59 57 58 syl φ x 1 P 1 2 Q
60 2nn 2
61 elfznn x 1 P 1 2 x
62 61 adantl φ x 1 P 1 2 x
63 nnmulcl 2 x 2 x
64 60 62 63 sylancr φ x 1 P 1 2 2 x
65 64 nnzd φ x 1 P 1 2 2 x
66 59 65 zmulcld φ x 1 P 1 2 Q 2 x
67 17 adantr φ x 1 P 1 2 P
68 prmnn P P
69 67 68 syl φ x 1 P 1 2 P
70 66 69 zmodcld φ x 1 P 1 2 Q 2 x mod P 0
71 4 70 eqeltrid φ x 1 P 1 2 R 0
72 71 nn0zd φ x 1 P 1 2 R
73 m1expcl R 1 R
74 72 73 syl φ x 1 P 1 2 1 R
75 74 72 zmulcld φ x 1 P 1 2 1 R R
76 75 69 zmodcld φ x 1 P 1 2 1 R R mod P 0
77 76 nn0cnd φ x 1 P 1 2 1 R R mod P
78 2cnd φ x 1 P 1 2 2
79 2ne0 2 0
80 79 a1i φ x 1 P 1 2 2 0
81 77 78 80 divcan2d φ x 1 P 1 2 2 1 R R mod P 2 = 1 R R mod P
82 81 fveq2d φ x 1 P 1 2 L 2 1 R R mod P 2 = L 1 R R mod P
83 69 nnrpd φ x 1 P 1 2 P +
84 eqidd φ x 1 P 1 2 1 R mod P = 1 R mod P
85 4 oveq1i R mod P = Q 2 x mod P mod P
86 66 zred φ x 1 P 1 2 Q 2 x
87 modabs2 Q 2 x P + Q 2 x mod P mod P = Q 2 x mod P
88 86 83 87 syl2anc φ x 1 P 1 2 Q 2 x mod P mod P = Q 2 x mod P
89 85 88 eqtrid φ x 1 P 1 2 R mod P = Q 2 x mod P
90 74 74 72 66 83 84 89 modmul12d φ x 1 P 1 2 1 R R mod P = 1 R Q 2 x mod P
91 75 zred φ x 1 P 1 2 1 R R
92 modabs2 1 R R P + 1 R R mod P mod P = 1 R R mod P
93 91 83 92 syl2anc φ x 1 P 1 2 1 R R mod P mod P = 1 R R mod P
94 74 zcnd φ x 1 P 1 2 1 R
95 59 zcnd φ x 1 P 1 2 Q
96 65 zcnd φ x 1 P 1 2 2 x
97 94 95 96 mulassd φ x 1 P 1 2 1 R Q 2 x = 1 R Q 2 x
98 97 oveq1d φ x 1 P 1 2 1 R Q 2 x mod P = 1 R Q 2 x mod P
99 90 93 98 3eqtr4d φ x 1 P 1 2 1 R R mod P mod P = 1 R Q 2 x mod P
100 17 68 syl φ P
101 100 adantr φ x 1 P 1 2 P
102 76 nn0zd φ x 1 P 1 2 1 R R mod P
103 74 59 zmulcld φ x 1 P 1 2 1 R Q
104 103 65 zmulcld φ x 1 P 1 2 1 R Q 2 x
105 moddvds P 1 R R mod P 1 R Q 2 x 1 R R mod P mod P = 1 R Q 2 x mod P P 1 R R mod P 1 R Q 2 x
106 101 102 104 105 syl3anc φ x 1 P 1 2 1 R R mod P mod P = 1 R Q 2 x mod P P 1 R R mod P 1 R Q 2 x
107 99 106 mpbid φ x 1 P 1 2 P 1 R R mod P 1 R Q 2 x
108 69 nnnn0d φ x 1 P 1 2 P 0
109 7 9 zndvds P 0 1 R R mod P 1 R Q 2 x L 1 R R mod P = L 1 R Q 2 x P 1 R R mod P 1 R Q 2 x
110 108 102 104 109 syl3anc φ x 1 P 1 2 L 1 R R mod P = L 1 R Q 2 x P 1 R R mod P 1 R Q 2 x
111 107 110 mpbird φ x 1 P 1 2 L 1 R R mod P = L 1 R Q 2 x
112 29 adantr φ x 1 P 1 2 L ring RingHom Y
113 zringmulr × = ring
114 eqid Y = Y
115 30 113 114 rhmmul L ring RingHom Y 1 R Q 2 x L 1 R Q 2 x = L 1 R Q Y L 2 x
116 112 103 65 115 syl3anc φ x 1 P 1 2 L 1 R Q 2 x = L 1 R Q Y L 2 x
117 82 111 116 3eqtrd φ x 1 P 1 2 L 2 1 R R mod P 2 = L 1 R Q Y L 2 x
118 117 mpteq2dva φ x 1 P 1 2 L 2 1 R R mod P 2 = x 1 P 1 2 L 1 R Q Y L 2 x
119 32 adantr φ x 1 P 1 2 L : Base Y
120 119 103 ffvelrnd φ x 1 P 1 2 L 1 R Q Base Y
121 119 65 ffvelrnd φ x 1 P 1 2 L 2 x Base Y
122 eqidd φ x 1 P 1 2 L 1 R Q = x 1 P 1 2 L 1 R Q
123 eqidd φ x 1 P 1 2 L 2 x = x 1 P 1 2 L 2 x
124 25 120 121 122 123 offval2 φ x 1 P 1 2 L 1 R Q Y f x 1 P 1 2 L 2 x = x 1 P 1 2 L 1 R Q Y L 2 x
125 118 124 eqtr4d φ x 1 P 1 2 L 2 1 R R mod P 2 = x 1 P 1 2 L 1 R Q Y f x 1 P 1 2 L 2 x
126 125 oveq2d φ G x = 1 P 1 2 L 2 1 R R mod P 2 = G x 1 P 1 2 L 1 R Q Y f x 1 P 1 2 L 2 x
127 46 55 126 3eqtrd φ G x = 1 P 1 2 L 2 x = G x 1 P 1 2 L 1 R Q Y f x 1 P 1 2 L 2 x
128 8 114 mgpplusg Y = + G
129 eqid x 1 P 1 2 L 1 R Q = x 1 P 1 2 L 1 R Q
130 eqid x 1 P 1 2 L 2 x = x 1 P 1 2 L 2 x
131 15 128 24 25 120 121 129 130 gsummptfidmadd2 φ G x 1 P 1 2 L 1 R Q Y f x 1 P 1 2 L 2 x = G x = 1 P 1 2 L 1 R Q Y G x = 1 P 1 2 L 2 x
132 127 131 eqtrd φ G x = 1 P 1 2 L 2 x = G x = 1 P 1 2 L 1 R Q Y G x = 1 P 1 2 L 2 x
133 132 oveq1d φ G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x = G x = 1 P 1 2 L 1 R Q Y G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x
134 eqid Unit Y = Unit Y
135 134 8 unitsubm Y Ring Unit Y SubMnd G
136 27 135 syl φ Unit Y SubMnd G
137 elfzle2 x 1 P 1 2 x P 1 2
138 137 adantl φ x 1 P 1 2 x P 1 2
139 62 nnred φ x 1 P 1 2 x
140 prmuz2 P P 2
141 uz2m1nn P 2 P 1
142 67 140 141 3syl φ x 1 P 1 2 P 1
143 142 nnred φ x 1 P 1 2 P 1
144 2re 2
145 144 a1i φ x 1 P 1 2 2
146 2pos 0 < 2
147 146 a1i φ x 1 P 1 2 0 < 2
148 lemuldiv2 x P 1 2 0 < 2 2 x P 1 x P 1 2
149 139 143 145 147 148 syl112anc φ x 1 P 1 2 2 x P 1 x P 1 2
150 138 149 mpbird φ x 1 P 1 2 2 x P 1
151 prmz P P
152 67 151 syl φ x 1 P 1 2 P
153 peano2zm P P 1
154 152 153 syl φ x 1 P 1 2 P 1
155 fznn P 1 2 x 1 P 1 2 x 2 x P 1
156 154 155 syl φ x 1 P 1 2 2 x 1 P 1 2 x 2 x P 1
157 64 150 156 mpbir2and φ x 1 P 1 2 2 x 1 P 1
158 fzm1ndvds P 2 x 1 P 1 ¬ P 2 x
159 69 157 158 syl2anc φ x 1 P 1 2 ¬ P 2 x
160 eqid 0 Y = 0 Y
161 7 9 160 zndvds0 P 0 2 x L 2 x = 0 Y P 2 x
162 108 65 161 syl2anc φ x 1 P 1 2 L 2 x = 0 Y P 2 x
163 162 necon3abid φ x 1 P 1 2 L 2 x 0 Y ¬ P 2 x
164 159 163 mpbird φ x 1 P 1 2 L 2 x 0 Y
165 20 simplbi Y Field Y DivRing
166 19 165 syl φ Y DivRing
167 166 adantr φ x 1 P 1 2 Y DivRing
168 14 134 160 drngunit Y DivRing L 2 x Unit Y L 2 x Base Y L 2 x 0 Y
169 167 168 syl φ x 1 P 1 2 L 2 x Unit Y L 2 x Base Y L 2 x 0 Y
170 121 164 169 mpbir2and φ x 1 P 1 2 L 2 x Unit Y
171 170 fmpttd φ x 1 P 1 2 L 2 x : 1 P 1 2 Unit Y
172 fvexd φ x 1 P 1 2 L 2 x V
173 130 25 172 42 fsuppmptdm φ finSupp 0 G x 1 P 1 2 L 2 x
174 16 24 25 136 171 173 gsumsubmcl φ G x = 1 P 1 2 L 2 x Unit Y
175 eqid / r Y = / r Y
176 eqid 1 Y = 1 Y
177 134 175 176 dvrid Y Ring G x = 1 P 1 2 L 2 x Unit Y G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x = 1 Y
178 27 174 177 syl2anc φ G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x = 1 Y
179 120 fmpttd φ x 1 P 1 2 L 1 R Q : 1 P 1 2 Base Y
180 fvexd φ x 1 P 1 2 L 1 R Q V
181 129 25 180 42 fsuppmptdm φ finSupp 0 G x 1 P 1 2 L 1 R Q
182 15 16 24 25 179 181 gsumcl φ G x = 1 P 1 2 L 1 R Q Base Y
183 14 134 175 114 dvrcan3 Y Ring G x = 1 P 1 2 L 1 R Q Base Y G x = 1 P 1 2 L 2 x Unit Y G x = 1 P 1 2 L 1 R Q Y G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x = G x = 1 P 1 2 L 1 R Q
184 27 182 174 183 syl3anc φ G x = 1 P 1 2 L 1 R Q Y G x = 1 P 1 2 L 2 x / r Y G x = 1 P 1 2 L 2 x = G x = 1 P 1 2 L 1 R Q
185 133 178 184 3eqtr3rd φ G x = 1 P 1 2 L 1 R Q = 1 Y