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

Theorem divnumden2 29564
Description: Calculate the reduced form of a quotient using  gcd. This version extends divnumden 15456 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 11795 . . . . . . . 8  |-  ZZ  C_  QQ
2 simp1 1061 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
31, 2sseldi 3601 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  QQ )
4 simp2 1062 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  ZZ )
51, 4sseldi 3601 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  QQ )
6 nnne0 11053 . . . . . . . . . . . 12  |-  ( -u B  e.  NN  ->  -u B  =/=  0 )
763ad2ant3 1084 . . . . . . . . . . 11  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u B  =/=  0 )
8 neg0 10327 . . . . . . . . . . . 12  |-  -u 0  =  0
98neeq2i 2859 . . . . . . . . . . 11  |-  ( -u B  =/=  -u 0  <->  -u B  =/=  0 )
107, 9sylibr 224 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u B  =/=  -u 0 )
1110neneqd 2799 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  -u B  =  -u 0
)
124zcnd 11483 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  e.  CC )
13 0cnd 10033 . . . . . . . . . 10  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  0  e.  CC )
1412, 13neg11ad 10388 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u B  =  -u 0  <->  B  =  0 ) )
1511, 14mtbid 314 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  B  =  0 )
1615neqned 2801 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  B  =/=  0 )
17 qdivcl 11809 . . . . . . 7  |-  ( ( A  e.  QQ  /\  B  e.  QQ  /\  B  =/=  0 )  ->  ( A  /  B )  e.  QQ )
183, 5, 16, 17syl3anc 1326 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  B )  e.  QQ )
19 qnumcl 15448 . . . . . 6  |-  ( ( A  /  B )  e.  QQ  ->  (numer `  ( A  /  B
) )  e.  ZZ )
2018, 19syl 17 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  e.  ZZ )
2120zcnd 11483 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  e.  CC )
22 simpl 473 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  ZZ )
2322zcnd 11483 . . . . . 6  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
24233adant2 1080 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  A  e.  CC )
252, 4gcdcld 15230 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e. 
NN0 )
2625nn0cnd 11353 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  e.  CC )
2726negcld 10379 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  e.  CC )
2815intnand 962 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -.  ( A  =  0  /\  B  =  0
) )
29 gcdeq0 15238 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =  0  <->  ( A  =  0  /\  B  =  0 ) ) )
3029necon3abid 2830 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  gcd  B )  =/=  0  <->  -.  ( A  =  0  /\  B  =  0
) ) )
31303adant3 1081 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (
( A  gcd  B
)  =/=  0  <->  -.  ( A  =  0  /\  B  =  0
) ) )
3228, 31mpbird 247 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  B )  =/=  0 )
3326, 32negne0d 10390 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  gcd  B )  =/=  0 )
3424, 27, 33divcld 10801 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  -u ( A  gcd  B ) )  e.  CC )
3524, 12, 16divneg2d 10815 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  B )  =  ( A  /  -u B
) )
3635fveq2d 6195 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  (numer `  ( A  /  -u B
) ) )
37 numdenneg 29563 . . . . . . 7  |-  ( ( A  /  B )  e.  QQ  ->  (
(numer `  -u ( A  /  B ) )  =  -u (numer `  ( A  /  B ) )  /\  (denom `  -u ( A  /  B ) )  =  (denom `  ( A  /  B ) ) ) )
3837simpld 475 . . . . . 6  |-  ( ( A  /  B )  e.  QQ  ->  (numer `  -u ( A  /  B
) )  =  -u (numer `  ( A  /  B ) ) )
3918, 38syl 17 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  -u ( A  /  B
) )  =  -u (numer `  ( A  /  B ) ) )
40 gcdneg 15243 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  gcd  -u B
)  =  ( A  gcd  B ) )
41403adant3 1081 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  gcd  -u B )  =  ( A  gcd  B
) )
4241oveq2d 6666 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( A  /  ( A  gcd  -u B ) )  =  ( A  /  ( A  gcd  B ) ) )
43 divnumden 15456 . . . . . . . 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 475 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B ) )  =  ( A  / 
( A  gcd  -u B
) ) )
45443adant2 1080 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  ( A  /  ( A  gcd  -u B ) ) )
4624, 27, 33divnegd 10814 . . . . . . 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 10816 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u A  /  -u ( A  gcd  B ) )  =  ( A  / 
( A  gcd  B
) ) )
4846, 47eqtrd 2656 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  -u ( A  gcd  B ) )  =  ( A  /  ( A  gcd  B ) ) )
4942, 45, 483eqtr4d 2666 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  -u B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5036, 39, 493eqtr3d 2664 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u (numer `  ( A  /  B
) )  =  -u ( A  /  -u ( A  gcd  B ) ) )
5121, 34, 50neg11d 10404 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  ( A  /  -u ( A  gcd  B ) ) )
5224, 26, 32divneg2d 10815 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( A  /  ( A  gcd  B ) )  =  ( A  /  -u ( A  gcd  B ) ) )
5351, 52eqtr4d 2659 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (numer `  ( A  /  B
) )  =  -u ( A  /  ( A  gcd  B ) ) )
5435fveq2d 6195 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  -u B
) ) )
5537simprd 479 . . . . 5  |-  ( ( A  /  B )  e.  QQ  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  B
) ) )
5618, 55syl 17 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  -u ( A  /  B
) )  =  (denom `  ( A  /  B
) ) )
5741oveq2d 6666 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( -u B  /  ( A  gcd  -u B ) )  =  ( -u B  /  ( A  gcd  B ) ) )
5843simprd 479 . . . . . 6  |-  ( ( A  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B ) )  =  ( -u B  /  ( A  gcd  -u B ) ) )
59583adant2 1080 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  (
-u B  /  ( A  gcd  -u B ) ) )
6012, 26, 32divneg2d 10815 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  ( B  /  -u ( A  gcd  B ) ) )
6112, 26, 32divnegd 10814 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  -u ( B  /  ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6260, 61eqtr3d 2658 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  ( B  /  -u ( A  gcd  B ) )  =  (
-u B  /  ( A  gcd  B ) ) )
6357, 59, 623eqtr4d 2666 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  -u B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6454, 56, 633eqtr3d 2664 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  ( B  /  -u ( A  gcd  B ) ) )
6564, 60eqtr4d 2659 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  -u B  e.  NN )  ->  (denom `  ( A  /  B
) )  =  -u ( B  /  ( A  gcd  B ) ) )
6653, 65jca 554 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 196    /\ wa 384    /\ w3a 1037    = wceq 1483    e. wcel 1990    =/= wne 2794   ` cfv 5888  (class class class)co 6650   CCcc 9934   0cc0 9936   -ucneg 10267    / cdiv 10684   NNcn 11020   ZZcz 11377   QQcq 11788    gcd cgcd 15216  numercnumer 15441  denomcdenom 15442
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949  ax-cnex 9992  ax-resscn 9993  ax-1cn 9994  ax-icn 9995  ax-addcl 9996  ax-addrcl 9997  ax-mulcl 9998  ax-mulrcl 9999  ax-mulcom 10000  ax-addass 10001  ax-mulass 10002  ax-distr 10003  ax-i2m1 10004  ax-1ne0 10005  ax-1rid 10006  ax-rnegex 10007  ax-rrecex 10008  ax-cnre 10009  ax-pre-lttri 10010  ax-pre-lttrn 10011  ax-pre-ltadd 10012  ax-pre-mulgt0 10013  ax-pre-sup 10014
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1038  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ne 2795  df-nel 2898  df-ral 2917  df-rex 2918  df-reu 2919  df-rmo 2920  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-pss 3590  df-nul 3916  df-if 4087  df-pw 4160  df-sn 4178  df-pr 4180  df-tp 4182  df-op 4184  df-uni 4437  df-iun 4522  df-br 4654  df-opab 4713  df-mpt 4730  df-tr 4753  df-id 5024  df-eprel 5029  df-po 5035  df-so 5036  df-fr 5073  df-we 5075  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-rn 5125  df-res 5126  df-ima 5127  df-pred 5680  df-ord 5726  df-on 5727  df-lim 5728  df-suc 5729  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-riota 6611  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-om 7066  df-1st 7168  df-2nd 7169  df-wrecs 7407  df-recs 7468  df-rdg 7506  df-er 7742  df-en 7956  df-dom 7957  df-sdom 7958  df-sup 8348  df-inf 8349  df-pnf 10076  df-mnf 10077  df-xr 10078  df-ltxr 10079  df-le 10080  df-sub 10268  df-neg 10269  df-div 10685  df-nn 11021  df-2 11079  df-3 11080  df-n0 11293  df-z 11378  df-uz 11688  df-q 11789  df-rp 11833  df-fl 12593  df-mod 12669  df-seq 12802  df-exp 12861  df-cj 13839  df-re 13840  df-im 13841  df-sqrt 13975  df-abs 13976  df-dvds 14984  df-gcd 15217  df-numer 15443  df-denom 15444
This theorem is referenced by:  qqhval2lem  30025
  Copyright terms: Public domain W3C validator