Metamath Proof Explorer


Theorem mulgcdr

Description: Reverse distribution law for the gcd operator. (Contributed by Scott Fenton, 2-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion mulgcdr A B C 0 A C gcd B C = A gcd B C

Proof

Step Hyp Ref Expression
1 mulgcd C 0 A B C A gcd C B = C A gcd B
2 1 3coml A B C 0 C A gcd C B = C A gcd B
3 zcn A A
4 3 3ad2ant1 A B C 0 A
5 nn0cn C 0 C
6 5 3ad2ant3 A B C 0 C
7 4 6 mulcomd A B C 0 A C = C A
8 zcn B B
9 8 3ad2ant2 A B C 0 B
10 9 6 mulcomd A B C 0 B C = C B
11 7 10 oveq12d A B C 0 A C gcd B C = C A gcd C B
12 gcdcl A B A gcd B 0
13 12 3adant3 A B C 0 A gcd B 0
14 13 nn0cnd A B C 0 A gcd B
15 14 6 mulcomd A B C 0 A gcd B C = C A gcd B
16 2 11 15 3eqtr4d A B C 0 A C gcd B C = A gcd B C