ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  qnumdenbi Unicode version

Theorem qnumdenbi 12083
Description: Two numbers are the canonical representation of a rational iff they are coprime and have the right quotient. (Contributed by Stefan O'Rear, 13-Sep-2014.)
Assertion
Ref Expression
qnumdenbi  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( ( B  gcd  C )  =  1  /\  A  =  ( B  /  C ) )  <-> 
( (numer `  A
)  =  B  /\  (denom `  A )  =  C ) ) )

Proof of Theorem qnumdenbi
Dummy variable  a is distinct from all other variables.
StepHypRef Expression
1 opelxpi 4621 . . . 4  |-  ( ( B  e.  ZZ  /\  C  e.  NN )  -> 
<. B ,  C >.  e.  ( ZZ  X.  NN ) )
213adant1 1000 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  <. B ,  C >.  e.  ( ZZ 
X.  NN ) )
3 qredeu 11990 . . . 4  |-  ( A  e.  QQ  ->  E! a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )
433ad2ant1 1003 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  E! a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )
5 fveq2 5471 . . . . . . 7  |-  ( a  =  <. B ,  C >.  ->  ( 1st `  a
)  =  ( 1st `  <. B ,  C >. ) )
6 fveq2 5471 . . . . . . 7  |-  ( a  =  <. B ,  C >.  ->  ( 2nd `  a
)  =  ( 2nd `  <. B ,  C >. ) )
75, 6oveq12d 5845 . . . . . 6  |-  ( a  =  <. B ,  C >.  ->  ( ( 1st `  a )  gcd  ( 2nd `  a ) )  =  ( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. ) ) )
87eqeq1d 2166 . . . . 5  |-  ( a  =  <. B ,  C >.  ->  ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  <-> 
( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. )
)  =  1 ) )
95, 6oveq12d 5845 . . . . . 6  |-  ( a  =  <. B ,  C >.  ->  ( ( 1st `  a )  /  ( 2nd `  a ) )  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. ) ) )
109eqeq2d 2169 . . . . 5  |-  ( a  =  <. B ,  C >.  ->  ( A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) )  <->  A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. )
) ) )
118, 10anbi12d 465 . . . 4  |-  ( a  =  <. B ,  C >.  ->  ( ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) )  <-> 
( ( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. ) )  =  1  /\  A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. )
) ) ) )
1211riota2 5805 . . 3  |-  ( (
<. B ,  C >.  e.  ( ZZ  X.  NN )  /\  E! a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  ->  ( (
( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. )
)  =  1  /\  A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. ) ) )  <->  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  =  <. B ,  C >. ) )
132, 4, 12syl2anc 409 . 2  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( ( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. ) )  =  1  /\  A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. )
) )  <->  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  =  <. B ,  C >. ) )
14 op1stg 6101 . . . . . 6  |-  ( ( B  e.  ZZ  /\  C  e.  NN )  ->  ( 1st `  <. B ,  C >. )  =  B )
15 op2ndg 6102 . . . . . 6  |-  ( ( B  e.  ZZ  /\  C  e.  NN )  ->  ( 2nd `  <. B ,  C >. )  =  C )
1614, 15oveq12d 5845 . . . . 5  |-  ( ( B  e.  ZZ  /\  C  e.  NN )  ->  ( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. )
)  =  ( B  gcd  C ) )
17163adant1 1000 . . . 4  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. )
)  =  ( B  gcd  C ) )
1817eqeq1d 2166 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. )
)  =  1  <->  ( B  gcd  C )  =  1 ) )
19143adant1 1000 . . . . 5  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( 1st `  <. B ,  C >. )  =  B )
20153adant1 1000 . . . . 5  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( 2nd `  <. B ,  C >. )  =  C )
2119, 20oveq12d 5845 . . . 4  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. )
)  =  ( B  /  C ) )
2221eqeq2d 2169 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. ) )  <->  A  =  ( B  /  C
) ) )
2318, 22anbi12d 465 . 2  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( ( ( 1st `  <. B ,  C >. )  gcd  ( 2nd `  <. B ,  C >. ) )  =  1  /\  A  =  ( ( 1st `  <. B ,  C >. )  /  ( 2nd `  <. B ,  C >. )
) )  <->  ( ( B  gcd  C )  =  1  /\  A  =  ( B  /  C
) ) ) )
24 riotacl 5797 . . . . . . 7  |-  ( E! a  e.  ( ZZ 
X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) )  ->  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  e.  ( ZZ 
X.  NN ) )
25 1st2nd2 6126 . . . . . . 7  |-  ( (
iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  e.  ( ZZ 
X.  NN )  -> 
( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a )  /  ( 2nd `  a ) ) ) )  =  <. ( 1st `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) ,  ( 2nd `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) >. )
263, 24, 253syl 17 . . . . . 6  |-  ( A  e.  QQ  ->  ( iota_ a  e.  ( ZZ 
X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  =  <. ( 1st `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) ,  ( 2nd `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) >. )
27 qnumval 12076 . . . . . . 7  |-  ( A  e.  QQ  ->  (numer `  A )  =  ( 1st `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) )
28 qdenval 12077 . . . . . . 7  |-  ( A  e.  QQ  ->  (denom `  A )  =  ( 2nd `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) )
2927, 28opeq12d 3751 . . . . . 6  |-  ( A  e.  QQ  ->  <. (numer `  A ) ,  (denom `  A ) >.  =  <. ( 1st `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) ,  ( 2nd `  ( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a
) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) ) ) >. )
3026, 29eqtr4d 2193 . . . . 5  |-  ( A  e.  QQ  ->  ( iota_ a  e.  ( ZZ 
X.  NN ) ( ( ( 1st `  a
)  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a
)  /  ( 2nd `  a ) ) ) )  =  <. (numer `  A ) ,  (denom `  A ) >. )
3130eqeq1d 2166 . . . 4  |-  ( A  e.  QQ  ->  (
( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a )  /  ( 2nd `  a ) ) ) )  =  <. B ,  C >.  <->  <. (numer `  A ) ,  (denom `  A ) >.  =  <. B ,  C >. )
)
32313ad2ant1 1003 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a )  /  ( 2nd `  a ) ) ) )  =  <. B ,  C >.  <->  <. (numer `  A ) ,  (denom `  A ) >.  =  <. B ,  C >. )
)
33 qnumcl 12079 . . . . 5  |-  ( A  e.  QQ  ->  (numer `  A )  e.  ZZ )
34 qdencl 12080 . . . . 5  |-  ( A  e.  QQ  ->  (denom `  A )  e.  NN )
35 opthg 4201 . . . . 5  |-  ( ( (numer `  A )  e.  ZZ  /\  (denom `  A )  e.  NN )  ->  ( <. (numer `  A ) ,  (denom `  A ) >.  =  <. B ,  C >.  <->  ( (numer `  A )  =  B  /\  (denom `  A
)  =  C ) ) )
3633, 34, 35syl2anc 409 . . . 4  |-  ( A  e.  QQ  ->  ( <. (numer `  A ) ,  (denom `  A ) >.  =  <. B ,  C >.  <-> 
( (numer `  A
)  =  B  /\  (denom `  A )  =  C ) ) )
37363ad2ant1 1003 . . 3  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  ( <. (numer `  A ) ,  (denom `  A ) >.  =  <. B ,  C >.  <-> 
( (numer `  A
)  =  B  /\  (denom `  A )  =  C ) ) )
3832, 37bitrd 187 . 2  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( iota_ a  e.  ( ZZ  X.  NN ) ( ( ( 1st `  a )  gcd  ( 2nd `  a ) )  =  1  /\  A  =  ( ( 1st `  a )  /  ( 2nd `  a ) ) ) )  =  <. B ,  C >.  <->  ( (numer `  A )  =  B  /\  (denom `  A
)  =  C ) ) )
3913, 23, 383bitr3d 217 1  |-  ( ( A  e.  QQ  /\  B  e.  ZZ  /\  C  e.  NN )  ->  (
( ( B  gcd  C )  =  1  /\  A  =  ( B  /  C ) )  <-> 
( (numer `  A
)  =  B  /\  (denom `  A )  =  C ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    /\ w3a 963    = wceq 1335    e. wcel 2128   E!wreu 2437   <.cop 3564    X. cxp 4587   ` cfv 5173   iota_crio 5782  (class class class)co 5827   1stc1st 6089   2ndc2nd 6090   1c1 7736    / cdiv 8550   NNcn 8839   ZZcz 9173   QQcq 9535    gcd cgcd 11842  numercnumer 12072  denomcdenom 12073
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4082  ax-sep 4085  ax-nul 4093  ax-pow 4138  ax-pr 4172  ax-un 4396  ax-setind 4499  ax-iinf 4550  ax-cnex 7826  ax-resscn 7827  ax-1cn 7828  ax-1re 7829  ax-icn 7830  ax-addcl 7831  ax-addrcl 7832  ax-mulcl 7833  ax-mulrcl 7834  ax-addcom 7835  ax-mulcom 7836  ax-addass 7837  ax-mulass 7838  ax-distr 7839  ax-i2m1 7840  ax-0lt1 7841  ax-1rid 7842  ax-0id 7843  ax-rnegex 7844  ax-precex 7845  ax-cnre 7846  ax-pre-ltirr 7847  ax-pre-ltwlin 7848  ax-pre-lttrn 7849  ax-pre-apti 7850  ax-pre-ltadd 7851  ax-pre-mulgt0 7852  ax-pre-mulext 7853  ax-arch 7854  ax-caucvg 7855
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3396  df-if 3507  df-pw 3546  df-sn 3567  df-pr 3568  df-op 3570  df-uni 3775  df-int 3810  df-iun 3853  df-br 3968  df-opab 4029  df-mpt 4030  df-tr 4066  df-id 4256  df-po 4259  df-iso 4260  df-iord 4329  df-on 4331  df-ilim 4332  df-suc 4334  df-iom 4553  df-xp 4595  df-rel 4596  df-cnv 4597  df-co 4598  df-dm 4599  df-rn 4600  df-res 4601  df-ima 4602  df-iota 5138  df-fun 5175  df-fn 5176  df-f 5177  df-f1 5178  df-fo 5179  df-f1o 5180  df-fv 5181  df-riota 5783  df-ov 5830  df-oprab 5831  df-mpo 5832  df-1st 6091  df-2nd 6092  df-recs 6255  df-frec 6341  df-sup 6931  df-pnf 7917  df-mnf 7918  df-xr 7919  df-ltxr 7920  df-le 7921  df-sub 8053  df-neg 8054  df-reap 8455  df-ap 8462  df-div 8551  df-inn 8840  df-2 8898  df-3 8899  df-4 8900  df-n0 9097  df-z 9174  df-uz 9446  df-q 9536  df-rp 9568  df-fz 9920  df-fzo 10052  df-fl 10179  df-mod 10232  df-seqfrec 10355  df-exp 10429  df-cj 10754  df-re 10755  df-im 10756  df-rsqrt 10910  df-abs 10911  df-dvds 11696  df-gcd 11843  df-numer 12074  df-denom 12075
This theorem is referenced by:  qnumdencoprm  12084  qeqnumdivden  12085  divnumden  12087  numdensq  12093
  Copyright terms: Public domain W3C validator