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

Theorem divnumden2 27769
Description: Calculate the reduced form of a quotient using  gcd. This version extends divnumden 14293 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 11214 . . . . . . . 8  |-  ZZ  C_  QQ
2 simp1 996 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
31, 2sseldi 3497 . . . . . . 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 3497 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  QQ )
6 nnne0 10589 . . . . . . . . . . . 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 9884 . . . . . . . . . . . 12  |-  -u 0  =  0
98neeq2i 2744 . . . . . . . . . . 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 2659 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  -u B  =  -u 0
)
124zcnd 10991 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  CC )
13 0cnd 9606 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  0  e.  CC )
1412, 13neg11ad 9946 . . . . . . . . 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 2660 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  =/=  0 )
17 qdivcl 11228 . . . . . . 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 14285 . . . . . 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 10991 . . . 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 10991 . . . . . 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 14168 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e. 
NN0 )
2625nn0cnd 10875 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e.  CC )
2726negcld 9937 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  e.  CC )
2815intnand 916 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  ( A  =  0  /\  B  =  0
) )
29 gcdeq0 14171 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3029necon3abid 2703 . . . . . . . 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 9948 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  =/=  0 )
3424, 27, 33divcld 10341 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  -u ( A  gcd  B ) )  e.  CC )
3524, 12, 16divneg2d 10355 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  B )  =  ( A  /  -u B
) )
3635fveq2d 5876 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  (numer `  ( A  /  -u B
) ) )
37 numdenneg 27768 . . . . . . 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 14176 . . . . . . . 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 6312 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  ( A  gcd  -u B ) )  =  ( A  /  ( A  gcd  B ) ) )
43 divnumden 14293 . . . . . . . 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 10354 . . . . . . 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 10356 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u A  /  -u ( A  gcd  B ) )  =  ( A  / 
( A  gcd  B
) ) )
4846, 47eqtrd 2498 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  -u ( A  gcd  B ) )  =  ( A  /  ( A  gcd  B ) ) )
4942, 45, 483eqtr4d 2508 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5036, 39, 493eqtr3d 2506 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u (numer `  ( A  /  B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5121, 34, 50neg11d 9962 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  ( A  /  -u ( A  gcd  B ) ) )
5224, 26, 32divneg2d 10355 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  ( A  gcd  B ) )  =  ( A  /  -u ( A  gcd  B ) ) )
5351, 52eqtr4d 2501 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  -u ( A  /  ( A  gcd  B ) ) )
5435fveq2d 5876 . . . 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 6312 . . . . 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 10355 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  ( B  /  -u ( A  gcd  B ) ) )
6112, 26, 32divnegd 10354 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6260, 61eqtr3d 2500 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( B  /  -u ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6357, 59, 623eqtr4d 2508 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6454, 56, 633eqtr3d 2506 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6564, 60eqtr4d 2501 . 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 1395    e. wcel 1819    =/= wne 2652   ` cfv 5594  (class class class)co 6296   CCcc 9507   0cc0 9509   -ucneg 9825    / cdiv 10227   NNcn 10556   ZZcz 10885   QQcq 11207    gcd cgcd 14156  numercnumer 14278  denomcdenom 14279
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586  ax-pre-sup 9587
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-er 7329  df-en 7536  df-dom 7537  df-sdom 7538  df-sup 7919  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-div 10228  df-nn 10557  df-2 10615  df-3 10616  df-n0 10817  df-z 10886  df-uz 11107  df-q 11208  df-rp 11246  df-fl 11932  df-mod 12000  df-seq 12111  df-exp 12170  df-cj 12944  df-re 12945  df-im 12946  df-sqrt 13080  df-abs 13081  df-dvds 13999  df-gcd 14157  df-numer 14280  df-denom 14281
This theorem is referenced by:  qqhval2lem  28123
  Copyright terms: Public domain W3C validator