Metamath Proof Explorer


Theorem 2neggcd

Description: Negating both operands of the gcd operator does not alter the result. (Contributed by AV, 7-Nov-2026)

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

Proof

Step Hyp Ref Expression
1 znegcl
 |-  ( M e. ZZ -> -u M e. ZZ )
2 gcdneg
 |-  ( ( -u M e. ZZ /\ N e. ZZ ) -> ( -u M gcd -u N ) = ( -u M gcd N ) )
3 1 2 sylan
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd -u N ) = ( -u M gcd N ) )
4 neggcd
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd N ) = ( M gcd N ) )
5 3 4 eqtrd
 |-  ( ( M e. ZZ /\ N e. ZZ ) -> ( -u M gcd -u N ) = ( M gcd N ) )