Metamath Proof Explorer


Theorem neggcd

Description: Negating one operand of the gcd operator does not alter the result. (Contributed by Paul Chapman, 22-Jun-2011)

Ref Expression
Assertion neggcd
|- ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd N ) = ( M gcd N ) )

Proof

Step Hyp Ref Expression
1 gcdneg
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( N gcd -u M ) = ( N gcd M ) )
2 1 ancoms
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( N gcd -u M ) = ( N gcd M ) )
3 znegcl
 |-  ( M e. ZZ -> -u M e. ZZ )
4 gcdcom
 |-  ( ( -u M e. ZZ /\ N e. ZZ ) -> ( -u M gcd N ) = ( N gcd -u M ) )
5 3 4 sylan
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd N ) = ( N gcd -u M ) )
6 gcdcom
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( M gcd N ) = ( N gcd M ) )
7 2 5 6 3eqtr4d
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd N ) = ( M gcd N ) )