Metamath Proof Explorer


Theorem modabs2

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

Ref Expression
Assertion modabs2
|- ( ( A e. RR /\ B e. RR+ ) -> ( ( A mod B ) mod B ) = ( A mod B ) )

Proof

Step Hyp Ref Expression
1 rpre
 |-  ( B e. RR+ -> B e. RR )
2 1 leidd
 |-  ( B e. RR+ -> B <_ B )
3 2 adantl
 |-  ( ( A e. RR /\ B e. RR+ ) -> B <_ B )
4 modabs
 |-  ( ( ( A e. RR /\ B e. RR+ /\ B e. RR+ ) /\ B <_ B ) -> ( ( A mod B ) mod B ) = ( A mod B ) )
5 4 ex
 |-  ( ( A e. RR /\ B e. RR+ /\ B e. RR+ ) -> ( B <_ B -> ( ( A mod B ) mod B ) = ( A mod B ) ) )
6 5 3anidm23
 |-  ( ( A e. RR /\ B e. RR+ ) -> ( B <_ B -> ( ( A mod B ) mod B ) = ( A mod B ) ) )
7 3 6 mpd
 |-  ( ( A e. RR /\ B e. RR+ ) -> ( ( A mod B ) mod B ) = ( A mod B ) )