Metamath Proof Explorer


Theorem muladdmodid

Description: The sum of a positive real number less than an upper bound and the product of an integer and the upper bound is the positive real number modulo the upper bound. (Contributed by AV, 5-Jul-2020)

Ref Expression
Assertion muladdmodid NM+A0M N M+AmodM=A

Proof

Step Hyp Ref Expression
1 0red M+0
2 rpxr M+M*
3 elico2 0M*A0MA0AA<M
4 1 2 3 syl2anc M+A0MA0AA<M
5 4 adantl NM+A0MA0AA<M
6 zcn NN
7 rpcn M+M
8 mulcl NM N M
9 6 7 8 syl2an NM+ N M
10 9 adantr NM+A0AA<M N M
11 recn AA
12 11 3ad2ant1 A0AA<MA
13 12 adantl NM+A0AA<MA
14 10 13 addcomd NM+A0AA<M N M+A=A+ N M
15 14 oveq1d NM+A0AA<M N M+AmodM=A+ N MmodM
16 simp1 A0AA<MA
17 16 adantl NM+A0AA<MA
18 simpr NM+M+
19 18 adantr NM+A0AA<MM+
20 simpll NM+A0AA<MN
21 modcyc AM+NA+ N MmodM=AmodM
22 17 19 20 21 syl3anc NM+A0AA<MA+ N MmodM=AmodM
23 18 16 anim12ci NM+A0AA<MAM+
24 3simpc A0AA<M0AA<M
25 24 adantl NM+A0AA<M0AA<M
26 modid AM+0AA<MAmodM=A
27 23 25 26 syl2anc NM+A0AA<MAmodM=A
28 15 22 27 3eqtrd NM+A0AA<M N M+AmodM=A
29 28 ex NM+A0AA<M N M+AmodM=A
30 5 29 sylbid NM+A0M N M+AmodM=A
31 30 3impia NM+A0M N M+AmodM=A