Metamath Proof Explorer


Theorem gcdadd

Description: The GCD of two numbers is the same as the GCD of the left and their sum. (Contributed by Scott Fenton, 20-Apr-2014)

Ref Expression
Assertion gcdadd M N M gcd N = M gcd N + M

Proof

Step Hyp Ref Expression
1 1z 1
2 gcdaddm 1 M N M gcd N = M gcd N + 1 M
3 1 2 mp3an1 M N M gcd N = M gcd N + 1 M
4 zcn M M
5 mulid2 M 1 M = M
6 5 oveq2d M N + 1 M = N + M
7 6 oveq2d M M gcd N + 1 M = M gcd N + M
8 4 7 syl M M gcd N + 1 M = M gcd N + M
9 8 adantr M N M gcd N + 1 M = M gcd N + M
10 3 9 eqtrd M N M gcd N = M gcd N + M