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

Theorem addpipq 8651
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 4803 . . 3  |-  ( ( A  e.  N.  /\  B  e.  N. )  -> 
<. A ,  B >.  e.  ( N.  X.  N. ) )
2 opelxpi 4803 . . 3  |-  ( ( C  e.  N.  /\  D  e.  N. )  -> 
<. C ,  D >.  e.  ( N.  X.  N. ) )
3 addpipq2 8650 . . 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 463 . 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 6219 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 1st `  <. A ,  B >. )  =  A )
6 op2ndg 6220 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 2nd `  <. C ,  D >. )  =  D )
75, 6oveqan12d 5964 . . . 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 6219 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 1st `  <. C ,  D >. )  =  C )
9 op2ndg 6220 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 2nd `  <. A ,  B >. )  =  B )
108, 9oveqan12rd 5965 . . . 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 5963 . . 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 5964 . . 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 3885 . 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 2390 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 358    = wceq 1642    e. wcel 1710   <.cop 3719    X. cxp 4769   ` cfv 5337  (class class class)co 5945   1stc1st 6207   2ndc2nd 6208   N.cnpi 8556    +N cpli 8557    .N cmi 8558    +pQ cplpq 8560
This theorem is referenced by:  addassnq  8672  distrnq  8675  1lt2nq  8687  ltexnq  8689  prlem934  8747
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-13 1712  ax-14 1714  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1930  ax-ext 2339  ax-sep 4222  ax-nul 4230  ax-pow 4269  ax-pr 4295  ax-un 4594
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-eu 2213  df-mo 2214  df-clab 2345  df-cleq 2351  df-clel 2354  df-nfc 2483  df-ne 2523  df-ral 2624  df-rex 2625  df-rab 2628  df-v 2866  df-sbc 3068  df-dif 3231  df-un 3233  df-in 3235  df-ss 3242  df-nul 3532  df-if 3642  df-sn 3722  df-pr 3723  df-op 3725  df-uni 3909  df-br 4105  df-opab 4159  df-mpt 4160  df-id 4391  df-xp 4777  df-rel 4778  df-cnv 4779  df-co 4780  df-dm 4781  df-rn 4782  df-iota 5301  df-fun 5339  df-fv 5345  df-ov 5948  df-oprab 5949  df-mpt2 5950  df-1st 6209  df-2nd 6210  df-plpq 8622
  Copyright terms: Public domain W3C validator