Description: The square of an integer which is -1 modulo a number greater than 1 is 1 modulo the same modulus. (Contributed by AV, 5-Jul-2020)
Ref | Expression | ||
---|---|---|---|
Hypotheses | modexp2m1d.a | |
|
modexp2m1d.e | |
||
modexp2m1d.g | |
||
modexp2m1d.m | |
||
Assertion | modexp2m1d | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | modexp2m1d.a | |
|
2 | modexp2m1d.e | |
|
3 | modexp2m1d.g | |
|
4 | modexp2m1d.m | |
|
5 | 1 | zcnd | |
6 | 5 | sqvald | |
7 | 6 | oveq1d | |
8 | neg1z | |
|
9 | 8 | a1i | |
10 | 1 9 1 9 2 4 4 | modmul12d | |
11 | 7 10 | eqtrd | |
12 | neg1mulneg1e1 | |
|
13 | 12 | a1i | |
14 | 13 | oveq1d | |
15 | 2 | rpred | |
16 | 1mod | |
|
17 | 15 3 16 | syl2anc | |
18 | 14 17 | eqtrd | |
19 | 11 18 | eqtrd | |