Metamath Proof Explorer


Theorem modmulmod

Description: The product of a real number modulo a positive real number and an integer equals the product of the real number and the integer modulo the positive real number. (Contributed by Alexander van der Vekens, 17-May-2018)

Ref Expression
Assertion modmulmod A B M + A mod M B mod M = A B mod M

Proof

Step Hyp Ref Expression
1 modcl A M + A mod M
2 simpl A M + A
3 1 2 jca A M + A mod M A
4 3 3adant2 A B M + A mod M A
5 3simpc A B M + B M +
6 modabs2 A M + A mod M mod M = A mod M
7 6 3adant2 A B M + A mod M mod M = A mod M
8 modmul1 A mod M A B M + A mod M mod M = A mod M A mod M B mod M = A B mod M
9 4 5 7 8 syl3anc A B M + A mod M B mod M = A B mod M