Metamath Proof Explorer


Theorem modaddmod

Description: The sum of a real number modulo a positive real number and another real number equals the sum of the two real numbers modulo the positive real number. (Contributed by Alexander van der Vekens, 13-May-2018)

Ref Expression
Assertion modaddmod ABM+AmodM+BmodM=A+BmodM

Proof

Step Hyp Ref Expression
1 modcl AM+AmodM
2 simpl AM+A
3 1 2 jca AM+AmodMA
4 3 3adant2 ABM+AmodMA
5 3simpc ABM+BM+
6 modabs2 AM+AmodMmodM=AmodM
7 6 3adant2 ABM+AmodMmodM=AmodM
8 modadd1 AmodMABM+AmodMmodM=AmodMAmodM+BmodM=A+BmodM
9 4 5 7 8 syl3anc ABM+AmodM+BmodM=A+BmodM