Description: The forward implication of Wilson's theorem wilth (see wilthlem3 ), expressed using the modulo operation: For any prime p we have ( p - 1 ) ! == - 1 (mod p ), see theorem 5.24 in ApostolNT p. 116. (Contributed by AV, 21-Jul-2021)
Ref | Expression | ||
---|---|---|---|
Assertion | wilthimp | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | wilth | |
|
2 | eluz2nn | |
|
3 | nnm1nn0 | |
|
4 | 2 3 | syl | |
5 | 4 | faccld | |
6 | 5 | nnzd | |
7 | 6 | peano2zd | |
8 | dvdsval3 | |
|
9 | 2 7 8 | syl2anc | |
10 | 9 | biimpar | |
11 | 5 | nncnd | |
12 | 1cnd | |
|
13 | 11 12 | jca | |
14 | 13 | adantr | |
15 | subneg | |
|
16 | 14 15 | syl | |
17 | 10 16 | breqtrrd | |
18 | neg1z | |
|
19 | 18 | a1i | |
20 | 2 6 19 | 3jca | |
21 | 20 | adantr | |
22 | moddvds | |
|
23 | 21 22 | syl | |
24 | 17 23 | mpbird | |
25 | 24 | ex | |
26 | 9 25 | sylbid | |
27 | 26 | imp | |
28 | 1 27 | sylbi | |