Description: The sum of an integer modulo a positive integer and another integer equals the sum of the two integers modulo the positive integer if the other integer is in the lower part of the range between 0 and the positive integer. (Contributed by AV, 30-Oct-2018)
Ref | Expression | ||
---|---|---|---|
Assertion | modaddmodlo | |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | elfzoelz | |
|
2 | 1 | zred | |
3 | 2 | adantr | |
4 | zmodcl | |
|
5 | 4 | nn0red | |
6 | 5 | adantl | |
7 | 3 6 | readdcld | |
8 | 7 | ancoms | |
9 | nnrp | |
|
10 | 9 | ad2antlr | |
11 | 2 | adantl | |
12 | 5 | adantr | |
13 | elfzole1 | |
|
14 | 13 | adantl | |
15 | 4 | nn0ge0d | |
16 | 15 | adantr | |
17 | 11 12 14 16 | addge0d | |
18 | elfzolt2 | |
|
19 | 18 | adantl | |
20 | nnre | |
|
21 | 20 | ad2antlr | |
22 | 11 12 21 | ltaddsubd | |
23 | 19 22 | mpbird | |
24 | modid | |
|
25 | 8 10 17 23 24 | syl22anc | |
26 | zre | |
|
27 | 26 | adantr | |
28 | 27 | adantr | |
29 | modadd2mod | |
|
30 | 28 11 10 29 | syl3anc | |
31 | 25 30 | eqtr3d | |
32 | 31 | ex | |