Metamath Proof Explorer


Theorem divgcdz

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

Ref Expression
Assertion divgcdz
|- ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( A / ( A gcd B ) ) e. ZZ )

Proof

Step Hyp Ref Expression
1 gcddvds
 |-  ( ( A e. ZZ /\ B e. ZZ ) -> ( ( A gcd B ) || A /\ ( A gcd B ) || B ) )
2 1 3adant3
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( ( A gcd B ) || A /\ ( A gcd B ) || B ) )
3 2 simpld
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( A gcd B ) || A )
4 gcd2n0cl
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( A gcd B ) e. NN )
5 nnz
 |-  ( ( A gcd B ) e. NN -> ( A gcd B ) e. ZZ )
6 nnne0
 |-  ( ( A gcd B ) e. NN -> ( A gcd B ) =/= 0 )
7 5 6 jca
 |-  ( ( A gcd B ) e. NN -> ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 ) )
8 4 7 syl
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 ) )
9 simp1
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> A e. ZZ )
10 df-3an
 |-  ( ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 /\ A e. ZZ ) <-> ( ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 ) /\ A e. ZZ ) )
11 8 9 10 sylanbrc
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 /\ A e. ZZ ) )
12 dvdsval2
 |-  ( ( ( A gcd B ) e. ZZ /\ ( A gcd B ) =/= 0 /\ A e. ZZ ) -> ( ( A gcd B ) || A <-> ( A / ( A gcd B ) ) e. ZZ ) )
13 11 12 syl
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( ( A gcd B ) || A <-> ( A / ( A gcd B ) ) e. ZZ ) )
14 3 13 mpbid
 |-  ( ( A e. ZZ /\ B e. ZZ /\ B =/= 0 ) -> ( A / ( A gcd B ) ) e. ZZ )