Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  divnumden2 Structured version   Unicode version

Theorem divnumden2 26092
Description: Calculate the reduced form of a quotient using  gcd. This version extends divnumden 13831 for the negative integers. (Contributed by Thierry Arnoux, 25-Oct-2017.)
Assertion
Ref Expression
divnumden2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (
(numer `  ( A  /  B ) )  = 
-u ( A  / 
( A  gcd  B
) )  /\  (denom `  ( A  /  B
) )  =  -u ( B  /  ( A  gcd  B ) ) ) )

Proof of Theorem divnumden2
StepHypRef Expression
1 zssq 10965 . . . . . . . 8  |-  ZZ  C_  QQ
2 simp1 988 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
31, 2sseldi 3359 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  QQ )
4 simp2 989 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  ZZ )
51, 4sseldi 3359 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  QQ )
6 nnne0 10359 . . . . . . . . . . . 12  |-  ( -u B  e.  NN  ->  -u B  =/=  0 )
763ad2ant3 1011 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u B  =/=  0 )
8 neg0 9660 . . . . . . . . . . . 12  |-  -u 0  =  0
98neeq2i 2624 . . . . . . . . . . 11  |-  ( -u B  =/=  -u 0  <->  -u B  =/=  0 )
107, 9sylibr 212 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u B  =/=  -u 0 )
1110neneqd 2629 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  -u B  =  -u 0
)
124zcnd 10753 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  CC )
13 0cnd 9384 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  0  e.  CC )
1412, 13neg11ad 9720 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u B  =  -u 0  <->  B  =  0 ) )
1511, 14mtbid 300 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  B  =  0 )
1615neneqad 2686 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  =/=  0 )
17 qdivcl 10979 . . . . . . 7  |-  ( ( A  e.  QQ  /\  B  e.  QQ  /\  B  =/=  0 )  ->  ( A  /  B )  e.  QQ )
183, 5, 16, 17syl3anc 1218 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  B )  e.  QQ )
19 qnumcl 13823 . . . . . 6  |-  ( ( A  /  B )  e.  QQ  ->  (numer `  ( A  /  B
) )  e.  ZZ )
2018, 19syl 16 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  e.  ZZ )
2120zcnd 10753 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  e.  CC )
22 simpl 457 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
2322zcnd 10753 . . . . . 6  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
24233adant2 1007 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
252, 4gcdcld 13707 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e. 
NN0 )
2625nn0cnd 10643 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e.  CC )
2726negcld 9711 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  e.  CC )
2815intnand 907 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  ( A  =  0  /\  B  =  0
) )
29 gcdeq0 13710 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3029necon3abid 2646 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =/=  0  <->  -.  ( A  =  0  /\  B  =  0
) ) )
31303adant3 1008 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (
( A  gcd  B
)  =/=  0  <->  -.  ( A  =  0  /\  B  =  0
) ) )
3228, 31mpbird 232 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  =/=  0 )
3326, 32negne0d 9722 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  =/=  0 )
3424, 27, 33divcld 10112 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  -u ( A  gcd  B ) )  e.  CC )
3524, 12, 16divneg2d 10126 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  B )  =  ( A  /  -u B
) )
3635fveq2d 5700 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  (numer `  ( A  /  -u B
) ) )
37 numdenneg 26091 . . . . . . 7  |-  ( ( A  /  B )  e.  QQ  ->  (
(numer `  -u ( A  /  B ) )  =  -u (numer `  ( A  /  B ) )  /\  (denom `  -u ( A  /  B ) )  =  (denom `  ( A  /  B ) ) ) )
3837simpld 459 . . . . . 6  |-  ( ( A  /  B )  e.  QQ  ->  (numer `  -u ( A  /  B
) )  =  -u (numer `  ( A  /  B ) ) )
3918, 38syl 16 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  -u (numer `  ( A  /  B ) ) )
40 gcdneg 13715 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  gcd  -u B
)  =  ( A  gcd  B ) )
41403adant3 1008 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  -u B )  =  ( A  gcd  B
) )
4241oveq2d 6112 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  ( A  gcd  -u B ) )  =  ( A  /  ( A  gcd  B ) ) )
43 divnumden 13831 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  ( (numer `  ( A  /  -u B
) )  =  ( A  /  ( A  gcd  -u B ) )  /\  (denom `  ( A  /  -u B ) )  =  ( -u B  /  ( A  gcd  -u B ) ) ) )
4443simpld 459 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B ) )  =  ( A  / 
( A  gcd  -u B
) ) )
45443adant2 1007 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  ( A  /  ( A  gcd  -u B ) ) )
4624, 27, 33divnegd 10125 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  -u ( A  gcd  B ) )  =  (
-u A  /  -u ( A  gcd  B ) ) )
4724, 26, 32div2negd 10127 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u A  /  -u ( A  gcd  B ) )  =  ( A  / 
( A  gcd  B
) ) )
4846, 47eqtrd 2475 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  -u ( A  gcd  B ) )  =  ( A  /  ( A  gcd  B ) ) )
4942, 45, 483eqtr4d 2485 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5036, 39, 493eqtr3d 2483 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u (numer `  ( A  /  B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5121, 34, 50neg11d 9736 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  ( A  /  -u ( A  gcd  B ) ) )
5224, 26, 32divneg2d 10126 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  ( A  gcd  B ) )  =  ( A  /  -u ( A  gcd  B ) ) )
5351, 52eqtr4d 2478 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  -u ( A  /  ( A  gcd  B ) ) )
5435fveq2d 5700 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  -u B
) ) )
5537simprd 463 . . . . 5  |-  ( ( A  /  B )  e.  QQ  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  B
) ) )
5618, 55syl 16 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  B
) ) )
5741oveq2d 6112 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u B  /  ( A  gcd  -u B ) )  =  ( -u B  /  ( A  gcd  B ) ) )
5843simprd 463 . . . . . 6  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B ) )  =  ( -u B  /  ( A  gcd  -u B ) ) )
59583adant2 1007 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  (
-u B  /  ( A  gcd  -u B ) ) )
6012, 26, 32divneg2d 10126 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  ( B  /  -u ( A  gcd  B ) ) )
6112, 26, 32divnegd 10125 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6260, 61eqtr3d 2477 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( B  /  -u ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6357, 59, 623eqtr4d 2485 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6454, 56, 633eqtr3d 2483 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6564, 60eqtr4d 2478 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  -u ( B  /  ( A  gcd  B ) ) )
6653, 65jca 532 1  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (
(numer `  ( A  /  B ) )  = 
-u ( A  / 
( A  gcd  B
) )  /\  (denom `  ( A  /  B
) )  =  -u ( B  /  ( A  gcd  B ) ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756    =/= wne 2611   ` cfv 5423  (class class class)co 6096   CCcc 9285   0cc0 9287   -ucneg 9601    / cdiv 9998   NNcn 10327   ZZcz 10651   QQcq 10958    gcd cgcd 13695  numercnumer 13816  denomcdenom 13817
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-sep 4418  ax-nul 4426  ax-pow 4475  ax-pr 4536  ax-un 6377  ax-cnex 9343  ax-resscn 9344  ax-1cn 9345  ax-icn 9346  ax-addcl 9347  ax-addrcl 9348  ax-mulcl 9349  ax-mulrcl 9350  ax-mulcom 9351  ax-addass 9352  ax-mulass 9353  ax-distr 9354  ax-i2m1 9355  ax-1ne0 9356  ax-1rid 9357  ax-rnegex 9358  ax-rrecex 9359  ax-cnre 9360  ax-pre-lttri 9361  ax-pre-lttrn 9362  ax-pre-ltadd 9363  ax-pre-mulgt0 9364  ax-pre-sup 9365
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2573  df-ne 2613  df-nel 2614  df-ral 2725  df-rex 2726  df-reu 2727  df-rmo 2728  df-rab 2729  df-v 2979  df-sbc 3192  df-csb 3294  df-dif 3336  df-un 3338  df-in 3340  df-ss 3347  df-pss 3349  df-nul 3643  df-if 3797  df-pw 3867  df-sn 3883  df-pr 3885  df-tp 3887  df-op 3889  df-uni 4097  df-iun 4178  df-br 4298  df-opab 4356  df-mpt 4357  df-tr 4391  df-eprel 4637  df-id 4641  df-po 4646  df-so 4647  df-fr 4684  df-we 4686  df-ord 4727  df-on 4728  df-lim 4729  df-suc 4730  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-res 4857  df-ima 4858  df-iota 5386  df-fun 5425  df-fn 5426  df-f 5427  df-f1 5428  df-fo 5429  df-f1o 5430  df-fv 5431  df-riota 6057  df-ov 6099  df-oprab 6100  df-mpt2 6101  df-om 6482  df-1st 6582  df-2nd 6583  df-recs 6837  df-rdg 6871  df-er 7106  df-en 7316  df-dom 7317  df-sdom 7318  df-sup 7696  df-pnf 9425  df-mnf 9426  df-xr 9427  df-ltxr 9428  df-le 9429  df-sub 9602  df-neg 9603  df-div 9999  df-nn 10328  df-2 10385  df-3 10386  df-n0 10585  df-z 10652  df-uz 10867  df-q 10959  df-rp 10997  df-fl 11647  df-mod 11714  df-seq 11812  df-exp 11871  df-cj 12593  df-re 12594  df-im 12595  df-sqr 12729  df-abs 12730  df-dvds 13541  df-gcd 13696  df-numer 13818  df-denom 13819
This theorem is referenced by:  qqhval2lem  26415
  Copyright terms: Public domain W3C validator