MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  addpipq Unicode version

Theorem addpipq 8778
Description: Addition of positive fractions in terms of positive integers. (Contributed by Mario Carneiro, 8-May-2013.) (New usage is discouraged.)
Assertion
Ref Expression
addpipq  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( <. A ,  B >.  +pQ  <. C ,  D >. )  =  <. ( ( A  .N  D
)  +N  ( C  .N  B ) ) ,  ( B  .N  D ) >. )

Proof of Theorem addpipq
StepHypRef Expression
1 opelxpi 4877 . . 3  |-  ( ( A  e.  N.  /\  B  e.  N. )  -> 
<. A ,  B >.  e.  ( N.  X.  N. ) )
2 opelxpi 4877 . . 3  |-  ( ( C  e.  N.  /\  D  e.  N. )  -> 
<. C ,  D >.  e.  ( N.  X.  N. ) )
3 addpipq2 8777 . . 3  |-  ( (
<. A ,  B >.  e.  ( N.  X.  N. )  /\  <. C ,  D >.  e.  ( N.  X.  N. ) )  ->  ( <. A ,  B >.  +pQ 
<. C ,  D >. )  =  <. ( ( ( 1st `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. ) )  +N  (
( 1st `  <. C ,  D >. )  .N  ( 2nd `  <. A ,  B >. )
) ) ,  ( ( 2nd `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
) >. )
41, 2, 3syl2an 464 . 2  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( <. A ,  B >.  +pQ  <. C ,  D >. )  =  <. ( ( ( 1st `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
)  +N  ( ( 1st `  <. C ,  D >. )  .N  ( 2nd `  <. A ,  B >. ) ) ) ,  ( ( 2nd `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
) >. )
5 op1stg 6326 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 1st `  <. A ,  B >. )  =  A )
6 op2ndg 6327 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 2nd `  <. C ,  D >. )  =  D )
75, 6oveqan12d 6067 . . . 4  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( ( 1st `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. ) )  =  ( A  .N  D ) )
8 op1stg 6326 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 1st `  <. C ,  D >. )  =  C )
9 op2ndg 6327 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 2nd `  <. A ,  B >. )  =  B )
108, 9oveqan12rd 6068 . . . 4  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( ( 1st `  <. C ,  D >. )  .N  ( 2nd `  <. A ,  B >. ) )  =  ( C  .N  B ) )
117, 10oveq12d 6066 . . 3  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( (
( 1st `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
)  +N  ( ( 1st `  <. C ,  D >. )  .N  ( 2nd `  <. A ,  B >. ) ) )  =  ( ( A  .N  D )  +N  ( C  .N  B ) ) )
129, 6oveqan12d 6067 . . 3  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( ( 2nd `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. ) )  =  ( B  .N  D ) )
1311, 12opeq12d 3960 . 2  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  <. ( ( ( 1st `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
)  +N  ( ( 1st `  <. C ,  D >. )  .N  ( 2nd `  <. A ,  B >. ) ) ) ,  ( ( 2nd `  <. A ,  B >. )  .N  ( 2nd `  <. C ,  D >. )
) >.  =  <. (
( A  .N  D
)  +N  ( C  .N  B ) ) ,  ( B  .N  D ) >. )
144, 13eqtrd 2444 1  |-  ( ( ( A  e.  N.  /\  B  e.  N. )  /\  ( C  e.  N.  /\  D  e.  N. )
)  ->  ( <. A ,  B >.  +pQ  <. C ,  D >. )  =  <. ( ( A  .N  D
)  +N  ( C  .N  B ) ) ,  ( B  .N  D ) >. )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 359    = wceq 1649    e. wcel 1721   <.cop 3785    X. cxp 4843   ` cfv 5421  (class class class)co 6048   1stc1st 6314   2ndc2nd 6315   N.cnpi 8683    +N cpli 8684    .N cmi 8685    +pQ cplpq 8687
This theorem is referenced by:  addassnq  8799  distrnq  8802  1lt2nq  8814  ltexnq  8816  prlem934  8874
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2393  ax-sep 4298  ax-nul 4306  ax-pow 4345  ax-pr 4371  ax-un 4668
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2266  df-mo 2267  df-clab 2399  df-cleq 2405  df-clel 2408  df-nfc 2537  df-ne 2577  df-ral 2679  df-rex 2680  df-rab 2683  df-v 2926  df-sbc 3130  df-dif 3291  df-un 3293  df-in 3295  df-ss 3302  df-nul 3597  df-if 3708  df-sn 3788  df-pr 3789  df-op 3791  df-uni 3984  df-br 4181  df-opab 4235  df-mpt 4236  df-id 4466  df-xp 4851  df-rel 4852  df-cnv 4853  df-co 4854  df-dm 4855  df-rn 4856  df-iota 5385  df-fun 5423  df-fv 5429  df-ov 6051  df-oprab 6052  df-mpt2 6053  df-1st 6316  df-2nd 6317  df-plpq 8749
  Copyright terms: Public domain W3C validator