Metamath Proof Explorer


Theorem zeqzmulgcd

Description: An integer is the product of an integer and the gcd of it and another integer. (Contributed by AV, 11-Jul-2021)

Ref Expression
Assertion zeqzmulgcd A B n A = n A gcd B

Proof

Step Hyp Ref Expression
1 gcddvds A B A gcd B A A gcd B B
2 gcdcl A B A gcd B 0
3 2 nn0zd A B A gcd B
4 simpl A B A
5 divides A gcd B A A gcd B A n n A gcd B = A
6 3 4 5 syl2anc A B A gcd B A n n A gcd B = A
7 eqcom n A gcd B = A A = n A gcd B
8 7 a1i A B n A gcd B = A A = n A gcd B
9 8 rexbidv A B n n A gcd B = A n A = n A gcd B
10 9 biimpd A B n n A gcd B = A n A = n A gcd B
11 6 10 sylbid A B A gcd B A n A = n A gcd B
12 11 adantrd A B A gcd B A A gcd B B n A = n A gcd B
13 1 12 mpd A B n A = n A gcd B