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

Theorem addpipq 8798
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 4896 . . 3  |-  ( ( A  e.  N.  /\  B  e.  N. )  -> 
<. A ,  B >.  e.  ( N.  X.  N. ) )
2 opelxpi 4896 . . 3  |-  ( ( C  e.  N.  /\  D  e.  N. )  -> 
<. C ,  D >.  e.  ( N.  X.  N. ) )
3 addpipq2 8797 . . 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 6345 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 1st `  <. A ,  B >. )  =  A )
6 op2ndg 6346 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 2nd `  <. C ,  D >. )  =  D )
75, 6oveqan12d 6086 . . . 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 6345 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 1st `  <. C ,  D >. )  =  C )
9 op2ndg 6346 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 2nd `  <. A ,  B >. )  =  B )
108, 9oveqan12rd 6087 . . . 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 6085 . . 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 6086 . . 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 3979 . 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 2462 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 1652    e. wcel 1725   <.cop 3804    X. cxp 4862   ` cfv 5440  (class class class)co 6067   1stc1st 6333   2ndc2nd 6334   N.cnpi 8703    +N cpli 8704    .N cmi 8705    +pQ cplpq 8707
This theorem is referenced by:  addassnq  8819  distrnq  8822  1lt2nq  8834  ltexnq  8836  prlem934  8894
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2411  ax-sep 4317  ax-nul 4325  ax-pow 4364  ax-pr 4390  ax-un 4687
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2284  df-mo 2285  df-clab 2417  df-cleq 2423  df-clel 2426  df-nfc 2555  df-ne 2595  df-ral 2697  df-rex 2698  df-rab 2701  df-v 2945  df-sbc 3149  df-dif 3310  df-un 3312  df-in 3314  df-ss 3321  df-nul 3616  df-if 3727  df-sn 3807  df-pr 3808  df-op 3810  df-uni 4003  df-br 4200  df-opab 4254  df-mpt 4255  df-id 4485  df-xp 4870  df-rel 4871  df-cnv 4872  df-co 4873  df-dm 4874  df-rn 4875  df-iota 5404  df-fun 5442  df-fv 5448  df-ov 6070  df-oprab 6071  df-mpt2 6072  df-1st 6335  df-2nd 6336  df-plpq 8769
  Copyright terms: Public domain W3C validator