Metamath Proof Explorer


Theorem m1modnnsub1

Description: Minus one modulo a positive integer is equal to the integer minus one. (Contributed by AV, 14-Jul-2021)

Ref Expression
Assertion m1modnnsub1 M-1modM=M1

Proof

Step Hyp Ref Expression
1 1re 1
2 nnrp MM+
3 negmod 1M+-1modM=M1modM
4 1 2 3 sylancr M-1modM=M1modM
5 nnre MM
6 peano2rem MM1
7 5 6 syl MM1
8 nnm1ge0 M0M1
9 5 ltm1d MM1<M
10 modid M1M+0M1M1<MM1modM=M1
11 7 2 8 9 10 syl22anc MM1modM=M1
12 4 11 eqtrd M-1modM=M1