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

Theorem addpipq 8561
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 4721 . . 3  |-  ( ( A  e.  N.  /\  B  e.  N. )  -> 
<. A ,  B >.  e.  ( N.  X.  N. ) )
2 opelxpi 4721 . . 3  |-  ( ( C  e.  N.  /\  D  e.  N. )  -> 
<. C ,  D >.  e.  ( N.  X.  N. ) )
3 addpipq2 8560 . . 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 6132 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 1st `  <. A ,  B >. )  =  A )
6 op2ndg 6133 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 2nd `  <. C ,  D >. )  =  D )
75, 6oveqan12d 5877 . . . 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 6132 . . . . 5  |-  ( ( C  e.  N.  /\  D  e.  N. )  ->  ( 1st `  <. C ,  D >. )  =  C )
9 op2ndg 6133 . . . . 5  |-  ( ( A  e.  N.  /\  B  e.  N. )  ->  ( 2nd `  <. A ,  B >. )  =  B )
108, 9oveqan12rd 5878 . . . 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 5876 . . 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 5877 . . 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 3804 . 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 2315 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 1623    e. wcel 1684   <.cop 3643    X. cxp 4687   ` cfv 5255  (class class class)co 5858   1stc1st 6120   2ndc2nd 6121   N.cnpi 8466    +N cpli 8467    .N cmi 8468    +pQ cplpq 8470
This theorem is referenced by:  addassnq  8582  distrnq  8585  1lt2nq  8597  ltexnq  8599  prlem934  8657
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3an 936  df-tru 1310  df-ex 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-rab 2552  df-v 2790  df-sbc 2992  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3456  df-if 3566  df-sn 3646  df-pr 3647  df-op 3649  df-uni 3828  df-br 4024  df-opab 4078  df-mpt 4079  df-id 4309  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-iota 5219  df-fun 5257  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-plpq 8532
  Copyright terms: Public domain W3C validator