Metamath Proof Explorer


Theorem gcdcomd

Description: The gcd operator is commutative, deduction version. (Contributed by SN, 24-Aug-2024)

Ref Expression
Hypotheses gcdcomd.m ( 𝜑𝑀 ∈ ℤ )
gcdcomd.n ( 𝜑𝑁 ∈ ℤ )
Assertion gcdcomd ( 𝜑 → ( 𝑀 gcd 𝑁 ) = ( 𝑁 gcd 𝑀 ) )

Proof

Step Hyp Ref Expression
1 gcdcomd.m ( 𝜑𝑀 ∈ ℤ )
2 gcdcomd.n ( 𝜑𝑁 ∈ ℤ )
3 gcdcom ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀 gcd 𝑁 ) = ( 𝑁 gcd 𝑀 ) )
4 1 2 3 syl2anc ( 𝜑 → ( 𝑀 gcd 𝑁 ) = ( 𝑁 gcd 𝑀 ) )