Metamath Proof Explorer


Theorem zmodfzo

Description: An integer mod B lies in the first B nonnegative integers. (Contributed by Stefan O'Rear, 6-Sep-2015)

Ref Expression
Assertion zmodfzo A B A mod B 0 ..^ B

Proof

Step Hyp Ref Expression
1 zmodfz A B A mod B 0 B 1
2 nnz B B
3 fzoval B 0 ..^ B = 0 B 1
4 2 3 syl B 0 ..^ B = 0 B 1
5 4 adantl A B 0 ..^ B = 0 B 1
6 1 5 eleqtrrd A B A mod B 0 ..^ B