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

Theorem divnumden2 27304
Description: Calculate the reduced form of a quotient using  gcd. This version extends divnumden 14140 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 11189 . . . . . . . 8  |-  ZZ  C_  QQ
2 simp1 996 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
31, 2sseldi 3502 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  QQ )
4 simp2 997 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  ZZ )
51, 4sseldi 3502 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  QQ )
6 nnne0 10568 . . . . . . . . . . . 12  |-  ( -u B  e.  NN  ->  -u B  =/=  0 )
763ad2ant3 1019 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u B  =/=  0 )
8 neg0 9865 . . . . . . . . . . . 12  |-  -u 0  =  0
98neeq2i 2754 . . . . . . . . . . 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 2669 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  -u B  =  -u 0
)
124zcnd 10967 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  CC )
13 0cnd 9589 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  0  e.  CC )
1412, 13neg11ad 9926 . . . . . . . . 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 )
1615neqned 2670 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  =/=  0 )
17 qdivcl 11203 . . . . . . 7  |-  ( ( A  e.  QQ  /\  B  e.  QQ  /\  B  =/=  0 )  ->  ( A  /  B )  e.  QQ )
183, 5, 16, 17syl3anc 1228 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  B )  e.  QQ )
19 qnumcl 14132 . . . . . 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 10967 . . . 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 10967 . . . . . 6  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
24233adant2 1015 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
252, 4gcdcld 14015 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e. 
NN0 )
2625nn0cnd 10854 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e.  CC )
2726negcld 9917 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  e.  CC )
2815intnand 914 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  ( A  =  0  /\  B  =  0
) )
29 gcdeq0 14018 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3029necon3abid 2713 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =/=  0  <->  -.  ( A  =  0  /\  B  =  0
) ) )
31303adant3 1016 . . . . . . 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 9928 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  =/=  0 )
3424, 27, 33divcld 10320 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  -u ( A  gcd  B ) )  e.  CC )
3524, 12, 16divneg2d 10334 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  B )  =  ( A  /  -u B
) )
3635fveq2d 5870 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  (numer `  ( A  /  -u B
) ) )
37 numdenneg 27303 . . . . . . 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 14023 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  gcd  -u B
)  =  ( A  gcd  B ) )
41403adant3 1016 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  -u B )  =  ( A  gcd  B
) )
4241oveq2d 6300 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  ( A  gcd  -u B ) )  =  ( A  /  ( A  gcd  B ) ) )
43 divnumden 14140 . . . . . . . 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 1015 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  ( A  /  ( A  gcd  -u B ) ) )
4624, 27, 33divnegd 10333 . . . . . . 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 10335 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u A  /  -u ( A  gcd  B ) )  =  ( A  / 
( A  gcd  B
) ) )
4846, 47eqtrd 2508 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  -u ( A  gcd  B ) )  =  ( A  /  ( A  gcd  B ) ) )
4942, 45, 483eqtr4d 2518 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5036, 39, 493eqtr3d 2516 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u (numer `  ( A  /  B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5121, 34, 50neg11d 9942 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  ( A  /  -u ( A  gcd  B ) ) )
5224, 26, 32divneg2d 10334 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  ( A  gcd  B ) )  =  ( A  /  -u ( A  gcd  B ) ) )
5351, 52eqtr4d 2511 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  -u ( A  /  ( A  gcd  B ) ) )
5435fveq2d 5870 . . . 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 6300 . . . . 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 1015 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  (
-u B  /  ( A  gcd  -u B ) ) )
6012, 26, 32divneg2d 10334 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  ( B  /  -u ( A  gcd  B ) ) )
6112, 26, 32divnegd 10333 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6260, 61eqtr3d 2510 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( B  /  -u ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6357, 59, 623eqtr4d 2518 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6454, 56, 633eqtr3d 2516 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6564, 60eqtr4d 2511 . 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 973    = wceq 1379    e. wcel 1767    =/= wne 2662   ` cfv 5588  (class class class)co 6284   CCcc 9490   0cc0 9492   -ucneg 9806    / cdiv 10206   NNcn 10536   ZZcz 10864   QQcq 11182    gcd cgcd 14003  numercnumer 14125  denomcdenom 14126
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6576  ax-cnex 9548  ax-resscn 9549  ax-1cn 9550  ax-icn 9551  ax-addcl 9552  ax-addrcl 9553  ax-mulcl 9554  ax-mulrcl 9555  ax-mulcom 9556  ax-addass 9557  ax-mulass 9558  ax-distr 9559  ax-i2m1 9560  ax-1ne0 9561  ax-1rid 9562  ax-rnegex 9563  ax-rrecex 9564  ax-cnre 9565  ax-pre-lttri 9566  ax-pre-lttrn 9567  ax-pre-ltadd 9568  ax-pre-mulgt0 9569  ax-pre-sup 9570
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6245  df-ov 6287  df-oprab 6288  df-mpt2 6289  df-om 6685  df-1st 6784  df-2nd 6785  df-recs 7042  df-rdg 7076  df-er 7311  df-en 7517  df-dom 7518  df-sdom 7519  df-sup 7901  df-pnf 9630  df-mnf 9631  df-xr 9632  df-ltxr 9633  df-le 9634  df-sub 9807  df-neg 9808  df-div 10207  df-nn 10537  df-2 10594  df-3 10595  df-n0 10796  df-z 10865  df-uz 11083  df-q 11183  df-rp 11221  df-fl 11897  df-mod 11965  df-seq 12076  df-exp 12135  df-cj 12895  df-re 12896  df-im 12897  df-sqrt 13031  df-abs 13032  df-dvds 13848  df-gcd 14004  df-numer 14127  df-denom 14128
This theorem is referenced by:  qqhval2lem  27626
  Copyright terms: Public domain W3C validator