Metamath Proof Explorer


Theorem gcdnn0id

Description: The gcd of a nonnegative integer and itself is the integer. (Contributed by SN, 25-Aug-2024)

Ref Expression
Assertion gcdnn0id ⊢ N ∈ ℕ 0 → N gcd N = N

Proof

Step Hyp Ref Expression
1 nn0z ⊢ N ∈ ℕ 0 → N ∈ ℤ
2 gcdid ⊢ N ∈ ℤ → N gcd N = N
3 1 2 syl ⊢ N ∈ ℕ 0 → N gcd N = N
4 nn0re ⊢ N ∈ ℕ 0 → N ∈ ℝ
5 nn0ge0 ⊢ N ∈ ℕ 0 → 0 ≤ N
6 4 5 absidd ⊢ N ∈ ℕ 0 → N = N
7 3 6 eqtrd ⊢ N ∈ ℕ 0 → N gcd N = N