Metamath Proof Explorer


Theorem modm1div

Description: An integer greater than one divides another integer minus one iff the second integer modulo the first integer is one. (Contributed by AV, 30-May-2023)

Ref Expression
Assertion modm1div N2AAmodN=1NA1

Proof

Step Hyp Ref Expression
1 eluzelre N2N
2 eluz2gt1 N21<N
3 2 adantr N2A1<N
4 1mod N1<N1modN=1
5 4 eqcomd N1<N1=1modN
6 1 3 5 syl2an2r N2A1=1modN
7 6 eqeq2d N2AAmodN=1AmodN=1modN
8 eluz2nn N2N
9 8 adantr N2AN
10 simpr N2AA
11 1zzd N2A1
12 moddvds NA1AmodN=1modNNA1
13 9 10 11 12 syl3anc N2AAmodN=1modNNA1
14 7 13 bitrd N2AAmodN=1NA1