Metamath Proof Explorer


Theorem divnumden

Description: Calculate the reduced form of a quotient using gcd . (Contributed by Stefan O'Rear, 13-Sep-2014)

Ref Expression
Assertion divnumden A B numer A B = A A gcd B denom A B = B A gcd B

Proof

Step Hyp Ref Expression
1 simpl A B A
2 nnz B B
3 2 adantl A B B
4 nnne0 B B 0
5 4 neneqd B ¬ B = 0
6 5 adantl A B ¬ B = 0
7 6 intnand A B ¬ A = 0 B = 0
8 gcdn0cl A B ¬ A = 0 B = 0 A gcd B
9 1 3 7 8 syl21anc A B A gcd B
10 gcddvds A B A gcd B A A gcd B B
11 2 10 sylan2 A B A gcd B A A gcd B B
12 gcddiv A B A gcd B A gcd B A A gcd B B A gcd B A gcd B = A A gcd B gcd B A gcd B
13 1 3 9 11 12 syl31anc A B A gcd B A gcd B = A A gcd B gcd B A gcd B
14 9 nncnd A B A gcd B
15 9 nnne0d A B A gcd B 0
16 14 15 dividd A B A gcd B A gcd B = 1
17 13 16 eqtr3d A B A A gcd B gcd B A gcd B = 1
18 zcn A A
19 18 adantr A B A
20 nncn B B
21 20 adantl A B B
22 4 adantl A B B 0
23 divcan7 A B B 0 A gcd B A gcd B 0 A A gcd B B A gcd B = A B
24 23 eqcomd A B B 0 A gcd B A gcd B 0 A B = A A gcd B B A gcd B
25 19 21 22 14 15 24 syl122anc A B A B = A A gcd B B A gcd B
26 znq A B A B
27 11 simpld A B A gcd B A
28 gcdcl A B A gcd B 0
29 28 nn0zd A B A gcd B
30 2 29 sylan2 A B A gcd B
31 dvdsval2 A gcd B A gcd B 0 A A gcd B A A A gcd B
32 30 15 1 31 syl3anc A B A gcd B A A A gcd B
33 27 32 mpbid A B A A gcd B
34 11 simprd A B A gcd B B
35 simpr A B B
36 nndivdvds B A gcd B A gcd B B B A gcd B
37 35 9 36 syl2anc A B A gcd B B B A gcd B
38 34 37 mpbid A B B A gcd B
39 qnumdenbi A B A A gcd B B A gcd B A A gcd B gcd B A gcd B = 1 A B = A A gcd B B A gcd B numer A B = A A gcd B denom A B = B A gcd B
40 26 33 38 39 syl3anc A B A A gcd B gcd B A gcd B = 1 A B = A A gcd B B A gcd B numer A B = A A gcd B denom A B = B A gcd B
41 17 25 40 mpbi2and A B numer A B = A A gcd B denom A B = B A gcd B