Metamath Proof Explorer


Theorem mulp1mod1

Description: The product of an integer and an integer greater than 1 increased by 1 is 1 modulo the integer greater than 1. (Contributed by AV, 15-Jul-2021)

Ref Expression
Assertion mulp1mod1 AN2NA+1modN=1

Proof

Step Hyp Ref Expression
1 eluzelcn N2N
2 1 adantl AN2N
3 zcn AA
4 3 adantr AN2A
5 2 4 mulcomd AN2NA=A N
6 5 oveq1d AN2NAmodN=A NmodN
7 eluz2nn N2N
8 7 nnrpd N2N+
9 mulmod0 AN+A NmodN=0
10 8 9 sylan2 AN2A NmodN=0
11 6 10 eqtrd AN2NAmodN=0
12 11 oveq1d AN2NAmodN+1=0+1
13 0p1e1 0+1=1
14 12 13 eqtrdi AN2NAmodN+1=1
15 14 oveq1d AN2NAmodN+1modN=1modN
16 eluzelre N2N
17 16 adantl AN2N
18 zre AA
19 18 adantr AN2A
20 17 19 remulcld AN2NA
21 1red AN21
22 8 adantl AN2N+
23 modaddmod NA1N+NAmodN+1modN=NA+1modN
24 20 21 22 23 syl3anc AN2NAmodN+1modN=NA+1modN
25 eluz2gt1 N21<N
26 16 25 jca N2N1<N
27 26 adantl AN2N1<N
28 1mod N1<N1modN=1
29 27 28 syl AN21modN=1
30 15 24 29 3eqtr3d AN2NA+1modN=1