Metamath Proof Explorer


Theorem nndivdvds

Description: Strong form of dvdsval2 for positive integers. (Contributed by Stefan O'Rear, 13-Sep-2014)

Ref Expression
Assertion nndivdvds
|- ( ( A e. NN /\ B e. NN ) -> ( B || A <-> ( A / B ) e. NN ) )

Proof

Step Hyp Ref Expression
1 nnz
 |-  ( B e. NN -> B e. ZZ )
2 nnne0
 |-  ( B e. NN -> B =/= 0 )
3 nnz
 |-  ( A e. NN -> A e. ZZ )
4 3 adantr
 |-  ( ( A e. NN /\ B e. NN ) -> A e. ZZ )
5 dvdsval2
 |-  ( ( B e. ZZ /\ B =/= 0 /\ A e. ZZ ) -> ( B || A <-> ( A / B ) e. ZZ ) )
6 1 2 4 5 syl2an23an
 |-  ( ( A e. NN /\ B e. NN ) -> ( B || A <-> ( A / B ) e. ZZ ) )
7 6 anbi1d
 |-  ( ( A e. NN /\ B e. NN ) -> ( ( B || A /\ 0 < ( A / B ) ) <-> ( ( A / B ) e. ZZ /\ 0 < ( A / B ) ) ) )
8 nnre
 |-  ( A e. NN -> A e. RR )
9 8 adantr
 |-  ( ( A e. NN /\ B e. NN ) -> A e. RR )
10 nnre
 |-  ( B e. NN -> B e. RR )
11 10 adantl
 |-  ( ( A e. NN /\ B e. NN ) -> B e. RR )
12 nngt0
 |-  ( A e. NN -> 0 < A )
13 12 adantr
 |-  ( ( A e. NN /\ B e. NN ) -> 0 < A )
14 nngt0
 |-  ( B e. NN -> 0 < B )
15 14 adantl
 |-  ( ( A e. NN /\ B e. NN ) -> 0 < B )
16 9 11 13 15 divgt0d
 |-  ( ( A e. NN /\ B e. NN ) -> 0 < ( A / B ) )
17 16 biantrud
 |-  ( ( A e. NN /\ B e. NN ) -> ( B || A <-> ( B || A /\ 0 < ( A / B ) ) ) )
18 elnnz
 |-  ( ( A / B ) e. NN <-> ( ( A / B ) e. ZZ /\ 0 < ( A / B ) ) )
19 18 a1i
 |-  ( ( A e. NN /\ B e. NN ) -> ( ( A / B ) e. NN <-> ( ( A / B ) e. ZZ /\ 0 < ( A / B ) ) ) )
20 7 17 19 3bitr4d
 |-  ( ( A e. NN /\ B e. NN ) -> ( B || A <-> ( A / B ) e. NN ) )