Metamath Proof Explorer


Theorem neggcdnni

Description: Negation invariance for gcd. (Contributed by metakunt, 25-Apr-2024)

Ref Expression
Hypotheses neggcdnni.1 ⊢ M ∈ ℕ
neggcdnni.2 ⊢ N ∈ ℕ
Assertion neggcdnni ⊢ -M gcd N = M gcd N

Proof

Step Hyp Ref Expression
1 neggcdnni.1 ⊢ M ∈ ℕ
2 neggcdnni.2 ⊢ N ∈ ℕ
3 1 nnzi ⊢ M ∈ ℤ
4 2 nnzi ⊢ N ∈ ℤ
5 3 4 pm3.2i ⊢ M ∈ ℤ ∧ N ∈ ℤ
6 neggcd ⊢ M ∈ ℤ ∧ N ∈ ℤ → -M gcd N = M gcd N
7 5 6 ax-mp ⊢ -M gcd N = M gcd N