Metamath Proof Explorer


Theorem cxpeq

Description: Solve an equation involving an N -th power. The expression -u 1 ^c ( 2 / N ) = exp ( 2pi i / N ) is a way to write the primitive N -th root of unity with the smallest positive argument. (Contributed by Mario Carneiro, 23-Apr-2015)

Ref Expression
Assertion cxpeq A N B A N = B n 0 N 1 A = B 1 N -1 2 N n

Proof

Step Hyp Ref Expression
1 simpl2 A N B A = 0 A N = B N
2 nnm1nn0 N N 1 0
3 1 2 syl A N B A = 0 A N = B N 1 0
4 nn0uz 0 = 0
5 3 4 eleqtrdi A N B A = 0 A N = B N 1 0
6 eluzfz1 N 1 0 0 0 N 1
7 5 6 syl A N B A = 0 A N = B 0 0 N 1
8 neg1cn 1
9 2re 2
10 simp2 A N B N
11 nndivre 2 N 2 N
12 9 10 11 sylancr A N B 2 N
13 12 recnd A N B 2 N
14 cxpcl 1 2 N 1 2 N
15 8 13 14 sylancr A N B 1 2 N
16 15 adantr A N B A = 0 A N = B 1 2 N
17 0nn0 0 0
18 expcl 1 2 N 0 0 -1 2 N 0
19 16 17 18 sylancl A N B A = 0 A N = B -1 2 N 0
20 19 mul02d A N B A = 0 A N = B 0 -1 2 N 0 = 0
21 simprl A N B A = 0 A N = B A = 0
22 21 oveq1d A N B A = 0 A N = B A N = 0 N
23 simprr A N B A = 0 A N = B A N = B
24 1 0expd A N B A = 0 A N = B 0 N = 0
25 22 23 24 3eqtr3d A N B A = 0 A N = B B = 0
26 25 oveq1d A N B A = 0 A N = B B 1 N = 0 1 N
27 nncn N N
28 nnne0 N N 0
29 reccl N N 0 1 N
30 recne0 N N 0 1 N 0
31 29 30 0cxpd N N 0 0 1 N = 0
32 27 28 31 syl2anc N 0 1 N = 0
33 1 32 syl A N B A = 0 A N = B 0 1 N = 0
34 26 33 eqtrd A N B A = 0 A N = B B 1 N = 0
35 34 oveq1d A N B A = 0 A N = B B 1 N -1 2 N 0 = 0 -1 2 N 0
36 20 35 21 3eqtr4rd A N B A = 0 A N = B A = B 1 N -1 2 N 0
37 oveq2 n = 0 -1 2 N n = -1 2 N 0
38 37 oveq2d n = 0 B 1 N -1 2 N n = B 1 N -1 2 N 0
39 38 rspceeqv 0 0 N 1 A = B 1 N -1 2 N 0 n 0 N 1 A = B 1 N -1 2 N n
40 7 36 39 syl2anc A N B A = 0 A N = B n 0 N 1 A = B 1 N -1 2 N n
41 40 expr A N B A = 0 A N = B n 0 N 1 A = B 1 N -1 2 N n
42 simpl1 A N B A 0 A
43 simpr A N B A 0 A 0
44 simpl2 A N B A 0 N
45 44 nnzd A N B A 0 N
46 explog A A 0 N A N = e N log A
47 42 43 45 46 syl3anc A N B A 0 A N = e N log A
48 47 eqcomd A N B A 0 e N log A = A N
49 10 nncnd A N B N
50 49 adantr A N B A 0 N
51 42 43 logcld A N B A 0 log A
52 50 51 mulcld A N B A 0 N log A
53 44 nnnn0d A N B A 0 N 0
54 42 53 expcld A N B A 0 A N
55 42 43 45 expne0d A N B A 0 A N 0
56 eflogeq N log A A N A N 0 e N log A = A N m N log A = log A N + i 2 π m
57 52 54 55 56 syl3anc A N B A 0 e N log A = A N m N log A = log A N + i 2 π m
58 48 57 mpbid A N B A 0 m N log A = log A N + i 2 π m
59 54 55 logcld A N B A 0 log A N
60 59 adantr A N B A 0 m log A N
61 ax-icn i
62 2cn 2
63 picn π
64 62 63 mulcli 2 π
65 61 64 mulcli i 2 π
66 zcn m m
67 66 adantl A N B A 0 m m
68 mulcl i 2 π m i 2 π m
69 65 67 68 sylancr A N B A 0 m i 2 π m
70 60 69 addcld A N B A 0 m log A N + i 2 π m
71 50 adantr A N B A 0 m N
72 51 adantr A N B A 0 m log A
73 10 nnne0d A N B N 0
74 73 ad2antrr A N B A 0 m N 0
75 70 71 72 74 divmuld A N B A 0 m log A N + i 2 π m N = log A N log A = log A N + i 2 π m
76 fveq2 log A N + i 2 π m N = log A e log A N + i 2 π m N = e log A
77 71 74 reccld A N B A 0 m 1 N
78 77 60 mulcld A N B A 0 m 1 N log A N
79 13 ad2antrr A N B A 0 m 2 N
80 79 67 mulcld A N B A 0 m 2 N m
81 61 63 mulcli i π
82 mulcl 2 N m i π 2 N m i π
83 80 81 82 sylancl A N B A 0 m 2 N m i π
84 efadd 1 N log A N 2 N m i π e 1 N log A N + 2 N m i π = e 1 N log A N e 2 N m i π
85 78 83 84 syl2anc A N B A 0 m e 1 N log A N + 2 N m i π = e 1 N log A N e 2 N m i π
86 60 69 71 74 divdird A N B A 0 m log A N + i 2 π m N = log A N N + i 2 π m N
87 60 71 74 divrec2d A N B A 0 m log A N N = 1 N log A N
88 65 a1i A N B A 0 m i 2 π
89 88 67 71 74 div23d A N B A 0 m i 2 π m N = i 2 π N m
90 61 62 63 mul12i i 2 π = 2 i π
91 90 oveq1i i 2 π N = 2 i π N
92 62 a1i A N B A 0 m 2
93 81 a1i A N B A 0 m i π
94 92 93 71 74 div23d A N B A 0 m 2 i π N = 2 N i π
95 91 94 syl5eq A N B A 0 m i 2 π N = 2 N i π
96 95 oveq1d A N B A 0 m i 2 π N m = 2 N i π m
97 79 93 67 mul32d A N B A 0 m 2 N i π m = 2 N m i π
98 89 96 97 3eqtrd A N B A 0 m i 2 π m N = 2 N m i π
99 87 98 oveq12d A N B A 0 m log A N N + i 2 π m N = 1 N log A N + 2 N m i π
100 86 99 eqtrd A N B A 0 m log A N + i 2 π m N = 1 N log A N + 2 N m i π
101 100 fveq2d A N B A 0 m e log A N + i 2 π m N = e 1 N log A N + 2 N m i π
102 54 adantr A N B A 0 m A N
103 55 adantr A N B A 0 m A N 0
104 102 103 77 cxpefd A N B A 0 m A N 1 N = e 1 N log A N
105 8 a1i A N B A 0 m 1
106 neg1ne0 1 0
107 106 a1i A N B A 0 m 1 0
108 simpr A N B A 0 m m
109 105 107 79 108 cxpmul2zd A N B A 0 m 1 2 N m = -1 2 N m
110 105 107 80 cxpefd A N B A 0 m 1 2 N m = e 2 N m log -1
111 logm1 log -1 = i π
112 111 oveq2i 2 N m log -1 = 2 N m i π
113 112 fveq2i e 2 N m log -1 = e 2 N m i π
114 110 113 eqtrdi A N B A 0 m 1 2 N m = e 2 N m i π
115 105 79 cxpcld A N B A 0 m 1 2 N
116 8 a1i A N B 1
117 106 a1i A N B 1 0
118 116 117 13 cxpne0d A N B 1 2 N 0
119 118 ad2antrr A N B A 0 m 1 2 N 0
120 115 119 108 expclzd A N B A 0 m -1 2 N m
121 44 adantr A N B A 0 m N
122 108 121 zmodcld A N B A 0 m m mod N 0
123 115 122 expcld A N B A 0 m -1 2 N m mod N
124 122 nn0zd A N B A 0 m m mod N
125 115 119 124 expne0d A N B A 0 m -1 2 N m mod N 0
126 115 119 124 108 expsubd A N B A 0 m -1 2 N m m mod N = -1 2 N m -1 2 N m mod N
127 121 nnzd A N B A 0 m N
128 zre m m
129 121 nnrpd A N B A 0 m N +
130 moddifz m N + m m mod N N
131 128 129 130 syl2an2 A N B A 0 m m m mod N N
132 expmulz 1 2 N 1 2 N 0 N m m mod N N -1 2 N N m m mod N N = 1 2 N N m m mod N N
133 115 119 127 131 132 syl22anc A N B A 0 m -1 2 N N m m mod N N = 1 2 N N m m mod N N
134 122 nn0cnd A N B A 0 m m mod N
135 67 134 subcld A N B A 0 m m m mod N
136 135 71 74 divcan2d A N B A 0 m N m m mod N N = m m mod N
137 136 oveq2d A N B A 0 m -1 2 N N m m mod N N = -1 2 N m m mod N
138 root1id N -1 2 N N = 1
139 121 138 syl A N B A 0 m -1 2 N N = 1
140 139 oveq1d A N B A 0 m 1 2 N N m m mod N N = 1 m m mod N N
141 1exp m m mod N N 1 m m mod N N = 1
142 131 141 syl A N B A 0 m 1 m m mod N N = 1
143 140 142 eqtrd A N B A 0 m 1 2 N N m m mod N N = 1
144 133 137 143 3eqtr3d A N B A 0 m -1 2 N m m mod N = 1
145 126 144 eqtr3d A N B A 0 m -1 2 N m -1 2 N m mod N = 1
146 120 123 125 145 diveq1d A N B A 0 m -1 2 N m = -1 2 N m mod N
147 109 114 146 3eqtr3rd A N B A 0 m -1 2 N m mod N = e 2 N m i π
148 104 147 oveq12d A N B A 0 m A N 1 N -1 2 N m mod N = e 1 N log A N e 2 N m i π
149 85 101 148 3eqtr4d A N B A 0 m e log A N + i 2 π m N = A N 1 N -1 2 N m mod N
150 eflog A A 0 e log A = A
151 42 43 150 syl2anc A N B A 0 e log A = A
152 151 adantr A N B A 0 m e log A = A
153 149 152 eqeq12d A N B A 0 m e log A N + i 2 π m N = e log A A N 1 N -1 2 N m mod N = A
154 zmodfz m N m mod N 0 N 1
155 108 121 154 syl2anc A N B A 0 m m mod N 0 N 1
156 eqcom A = A N 1 N -1 2 N n A N 1 N -1 2 N n = A
157 oveq2 n = m mod N -1 2 N n = -1 2 N m mod N
158 157 oveq2d n = m mod N A N 1 N -1 2 N n = A N 1 N -1 2 N m mod N
159 158 eqeq1d n = m mod N A N 1 N -1 2 N n = A A N 1 N -1 2 N m mod N = A
160 156 159 syl5bb n = m mod N A = A N 1 N -1 2 N n A N 1 N -1 2 N m mod N = A
161 160 rspcev m mod N 0 N 1 A N 1 N -1 2 N m mod N = A n 0 N 1 A = A N 1 N -1 2 N n
162 161 ex m mod N 0 N 1 A N 1 N -1 2 N m mod N = A n 0 N 1 A = A N 1 N -1 2 N n
163 155 162 syl A N B A 0 m A N 1 N -1 2 N m mod N = A n 0 N 1 A = A N 1 N -1 2 N n
164 153 163 sylbid A N B A 0 m e log A N + i 2 π m N = e log A n 0 N 1 A = A N 1 N -1 2 N n
165 76 164 syl5 A N B A 0 m log A N + i 2 π m N = log A n 0 N 1 A = A N 1 N -1 2 N n
166 75 165 sylbird A N B A 0 m N log A = log A N + i 2 π m n 0 N 1 A = A N 1 N -1 2 N n
167 166 rexlimdva A N B A 0 m N log A = log A N + i 2 π m n 0 N 1 A = A N 1 N -1 2 N n
168 58 167 mpd A N B A 0 n 0 N 1 A = A N 1 N -1 2 N n
169 oveq1 A N = B A N 1 N = B 1 N
170 169 oveq1d A N = B A N 1 N -1 2 N n = B 1 N -1 2 N n
171 170 eqeq2d A N = B A = A N 1 N -1 2 N n A = B 1 N -1 2 N n
172 171 rexbidv A N = B n 0 N 1 A = A N 1 N -1 2 N n n 0 N 1 A = B 1 N -1 2 N n
173 168 172 syl5ibcom A N B A 0 A N = B n 0 N 1 A = B 1 N -1 2 N n
174 41 173 pm2.61dane A N B A N = B n 0 N 1 A = B 1 N -1 2 N n
175 simp3 A N B B
176 nnrecre N 1 N
177 176 3ad2ant2 A N B 1 N
178 177 recnd A N B 1 N
179 175 178 cxpcld A N B B 1 N
180 179 adantr A N B n 0 N 1 B 1 N
181 elfznn0 n 0 N 1 n 0
182 expcl 1 2 N n 0 -1 2 N n
183 15 181 182 syl2an A N B n 0 N 1 -1 2 N n
184 10 adantr A N B n 0 N 1 N
185 184 nnnn0d A N B n 0 N 1 N 0
186 180 183 185 mulexpd A N B n 0 N 1 B 1 N -1 2 N n N = B 1 N N 1 2 N n N
187 175 adantr A N B n 0 N 1 B
188 cxproot B N B 1 N N = B
189 187 184 188 syl2anc A N B n 0 N 1 B 1 N N = B
190 181 adantl A N B n 0 N 1 n 0
191 190 nn0cnd A N B n 0 N 1 n
192 184 nncnd A N B n 0 N 1 N
193 191 192 mulcomd A N B n 0 N 1 n N = N n
194 193 oveq2d A N B n 0 N 1 -1 2 N n N = -1 2 N N n
195 15 adantr A N B n 0 N 1 1 2 N
196 195 185 190 expmuld A N B n 0 N 1 -1 2 N n N = 1 2 N n N
197 195 190 185 expmuld A N B n 0 N 1 -1 2 N N n = 1 2 N N n
198 194 196 197 3eqtr3d A N B n 0 N 1 1 2 N n N = 1 2 N N n
199 184 138 syl A N B n 0 N 1 -1 2 N N = 1
200 199 oveq1d A N B n 0 N 1 1 2 N N n = 1 n
201 elfzelz n 0 N 1 n
202 201 adantl A N B n 0 N 1 n
203 1exp n 1 n = 1
204 202 203 syl A N B n 0 N 1 1 n = 1
205 198 200 204 3eqtrd A N B n 0 N 1 1 2 N n N = 1
206 189 205 oveq12d A N B n 0 N 1 B 1 N N 1 2 N n N = B 1
207 187 mulid1d A N B n 0 N 1 B 1 = B
208 186 206 207 3eqtrd A N B n 0 N 1 B 1 N -1 2 N n N = B
209 oveq1 A = B 1 N -1 2 N n A N = B 1 N -1 2 N n N
210 209 eqeq1d A = B 1 N -1 2 N n A N = B B 1 N -1 2 N n N = B
211 208 210 syl5ibrcom A N B n 0 N 1 A = B 1 N -1 2 N n A N = B
212 211 rexlimdva A N B n 0 N 1 A = B 1 N -1 2 N n A N = B
213 174 212 impbid A N B A N = B n 0 N 1 A = B 1 N -1 2 N n