Metamath Proof Explorer


Theorem gcdeq

Description: A is equal to its gcd with B if and only if A divides B . (Contributed by Mario Carneiro, 23-Feb-2014) (Proof shortened by AV, 8-Aug-2021)

Ref Expression
Assertion gcdeq A B A gcd B = A A B

Proof

Step Hyp Ref Expression
1 nnz B B
2 gcdzeq A B A gcd B = A A B
3 1 2 sylan2 A B A gcd B = A A B