Metamath Proof Explorer


Theorem flpmodeq

Description: Partition of a division into its integer part and the remainder. (Contributed by Alexander van der Vekens, 14-Apr-2018)

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

Proof

Step Hyp Ref Expression
1 modvalr A B + A mod B = A A B B
2 1 eqcomd A B + A A B B = A mod B
3 recn A A
4 3 adantr A B + A
5 rerpdivcl A B + A B
6 flcl A B A B
7 6 zcnd A B A B
8 5 7 syl A B + A B
9 rpcn B + B
10 9 adantl A B + B
11 8 10 mulcld A B + A B B
12 modcl A B + A mod B
13 12 recnd A B + A mod B
14 4 11 13 subaddd A B + A A B B = A mod B A B B + A mod B = A
15 2 14 mpbid A B + A B B + A mod B = A