Metamath Proof Explorer


Theorem gcdid0

Description: The gcd of an integer and 0 is the integer's absolute value. Theorem 1.4(d)2 in ApostolNT p. 16. (Contributed by Paul Chapman, 31-Mar-2011)

Ref Expression
Assertion gcdid0
|- ( N e. ZZ -> ( N gcd 0 ) = ( abs ` N ) )

Proof

Step Hyp Ref Expression
1 0z
 |-  0 e. ZZ
2 gcdcom
 |-  ( ( 0 e. ZZ /\ N e. ZZ ) -> ( 0 gcd N ) = ( N gcd 0 ) )
3 1 2 mpan
 |-  ( N e. ZZ -> ( 0 gcd N ) = ( N gcd 0 ) )
4 gcd0id
 |-  ( N e. ZZ -> ( 0 gcd N ) = ( abs ` N ) )
5 3 4 eqtr3d
 |-  ( N e. ZZ -> ( N gcd 0 ) = ( abs ` N ) )