Metamath Proof Explorer


Theorem gcdeq0

Description: The gcd of two integers is zero iff they are both zero. (Contributed by Paul Chapman, 21-Mar-2011)

Ref Expression
Assertion gcdeq0 MNMgcdN=0M=0N=0

Proof

Step Hyp Ref Expression
1 gcdn0cl MN¬M=0N=0MgcdN
2 1 nnne0d MN¬M=0N=0MgcdN0
3 2 ex MN¬M=0N=0MgcdN0
4 3 necon4bd MNMgcdN=0M=0N=0
5 oveq12 M=0N=0MgcdN=0gcd0
6 gcd0val 0gcd0=0
7 5 6 eqtrdi M=0N=0MgcdN=0
8 4 7 impbid1 MNMgcdN=0M=0N=0