Metamath Proof Explorer


Theorem modabs2

Description: Absorption law for modulo. (Contributed by NM, 29-Dec-2008)

Ref Expression
Assertion modabs2 A B + A mod B mod B = A mod B

Proof

Step Hyp Ref Expression
1 rpre B + B
2 1 leidd B + B B
3 2 adantl A B + B B
4 modabs A B + B + B B A mod B mod B = A mod B
5 4 ex A B + B + B B A mod B mod B = A mod B
6 5 3anidm23 A B + B B A mod B mod B = A mod B
7 3 6 mpd A B + A mod B mod B = A mod B