Metamath Proof Explorer


Theorem zmodfz

Description: An integer mod B lies in the first B nonnegative integers. (Contributed by Jeff Madsen, 17-Jun-2010)

Ref Expression
Assertion zmodfz A B A mod B 0 B 1

Proof

Step Hyp Ref Expression
1 zmodcl A B A mod B 0
2 1 nn0zd A B A mod B
3 1 nn0ge0d A B 0 A mod B
4 zre A A
5 nnrp B B +
6 modlt A B + A mod B < B
7 4 5 6 syl2an A B A mod B < B
8 0z 0
9 nnz B B
10 9 adantl A B B
11 elfzm11 0 B A mod B 0 B 1 A mod B 0 A mod B A mod B < B
12 8 10 11 sylancr A B A mod B 0 B 1 A mod B 0 A mod B A mod B < B
13 2 3 7 12 mpbir3and A B A mod B 0 B 1