Metamath Proof Explorer


Theorem modmulconst

Description: Constant multiplication in a modulo operation, see theorem 5.3 in ApostolNT p. 108. (Contributed by AV, 21-Jul-2021)

Ref Expression
Assertion modmulconst A B C M A mod M = B mod M C A mod C M = C B mod C M

Proof

Step Hyp Ref Expression
1 nnz M M
2 1 adantl A B C M M
3 zsubcl A B A B
4 3 3adant3 A B C A B
5 4 adantr A B C M A B
6 nnz C C
7 nnne0 C C 0
8 6 7 jca C C C 0
9 8 3ad2ant3 A B C C C 0
10 9 adantr A B C M C C 0
11 dvdscmulr M A B C C 0 C M C A B M A B
12 11 bicomd M A B C C 0 M A B C M C A B
13 2 5 10 12 syl3anc A B C M M A B C M C A B
14 zcn A A
15 zcn B B
16 nncn C C
17 14 15 16 3anim123i A B C A B C
18 3anrot C A B A B C
19 17 18 sylibr A B C C A B
20 subdi C A B C A B = C A C B
21 19 20 syl A B C C A B = C A C B
22 21 adantr A B C M C A B = C A C B
23 22 breq2d A B C M C M C A B C M C A C B
24 13 23 bitrd A B C M M A B C M C A C B
25 simpr A B C M M
26 simp1 A B C A
27 26 adantr A B C M A
28 simp2 A B C B
29 28 adantr A B C M B
30 moddvds M A B A mod M = B mod M M A B
31 25 27 29 30 syl3anc A B C M A mod M = B mod M M A B
32 simpl3 A B C M C
33 32 25 nnmulcld A B C M C M
34 6 3ad2ant3 A B C C
35 34 26 zmulcld A B C C A
36 35 adantr A B C M C A
37 34 28 zmulcld A B C C B
38 37 adantr A B C M C B
39 moddvds C M C A C B C A mod C M = C B mod C M C M C A C B
40 33 36 38 39 syl3anc A B C M C A mod C M = C B mod C M C M C A C B
41 24 31 40 3bitr4d A B C M A mod M = B mod M C A mod C M = C B mod C M