Metamath Proof Explorer


Theorem gcdabs1

Description: gcd of the absolute value of the first operator. (Contributed by Scott Fenton, 2-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion gcdabs1
|- ( ( N e. ZZ /\ M e. ZZ ) -> ( ( abs ` N ) gcd M ) = ( N gcd M ) )

Proof

Step Hyp Ref Expression
1 oveq1
 |-  ( ( abs ` N ) = N -> ( ( abs ` N ) gcd M ) = ( N gcd M ) )
2 1 a1i
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( ( abs ` N ) = N -> ( ( abs ` N ) gcd M ) = ( N gcd M ) ) )
3 neggcd
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( -u N gcd M ) = ( N gcd M ) )
4 oveq1
 |-  ( ( abs ` N ) = -u N -> ( ( abs ` N ) gcd M ) = ( -u N gcd M ) )
5 4 eqeq1d
 |-  ( ( abs ` N ) = -u N -> ( ( ( abs ` N ) gcd M ) = ( N gcd M ) <-> ( -u N gcd M ) = ( N gcd M ) ) )
6 3 5 syl5ibrcom
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( ( abs ` N ) = -u N -> ( ( abs ` N ) gcd M ) = ( N gcd M ) ) )
7 zre
 |-  ( N e. ZZ -> N e. RR )
8 7 absord
 |-  ( N e. ZZ -> ( ( abs ` N ) = N \/ ( abs ` N ) = -u N ) )
9 8 adantr
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( ( abs ` N ) = N \/ ( abs ` N ) = -u N ) )
10 2 6 9 mpjaod
 |-  ( ( N e. ZZ /\ M e. ZZ ) -> ( ( abs ` N ) gcd M ) = ( N gcd M ) )