Metamath Proof Explorer


Theorem addpipq2

Description: Addition of positive fractions in terms of positive integers. (Contributed by Mario Carneiro, 8-May-2013) (New usage is discouraged.)

Ref Expression
Assertion addpipq2 A 𝑵 × 𝑵 B 𝑵 × 𝑵 A + 𝑝𝑸 B = 1 st A 𝑵 2 nd B + 𝑵 1 st B 𝑵 2 nd A 2 nd A 𝑵 2 nd B

Proof

Step Hyp Ref Expression
1 fveq2 x = A 1 st x = 1 st A
2 1 oveq1d x = A 1 st x 𝑵 2 nd y = 1 st A 𝑵 2 nd y
3 fveq2 x = A 2 nd x = 2 nd A
4 3 oveq2d x = A 1 st y 𝑵 2 nd x = 1 st y 𝑵 2 nd A
5 2 4 oveq12d x = A 1 st x 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd x = 1 st A 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd A
6 3 oveq1d x = A 2 nd x 𝑵 2 nd y = 2 nd A 𝑵 2 nd y
7 5 6 opeq12d x = A 1 st x 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd x 2 nd x 𝑵 2 nd y = 1 st A 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd A 2 nd A 𝑵 2 nd y
8 fveq2 y = B 2 nd y = 2 nd B
9 8 oveq2d y = B 1 st A 𝑵 2 nd y = 1 st A 𝑵 2 nd B
10 fveq2 y = B 1 st y = 1 st B
11 10 oveq1d y = B 1 st y 𝑵 2 nd A = 1 st B 𝑵 2 nd A
12 9 11 oveq12d y = B 1 st A 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd A = 1 st A 𝑵 2 nd B + 𝑵 1 st B 𝑵 2 nd A
13 8 oveq2d y = B 2 nd A 𝑵 2 nd y = 2 nd A 𝑵 2 nd B
14 12 13 opeq12d y = B 1 st A 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd A 2 nd A 𝑵 2 nd y = 1 st A 𝑵 2 nd B + 𝑵 1 st B 𝑵 2 nd A 2 nd A 𝑵 2 nd B
15 df-plpq + 𝑝𝑸 = x 𝑵 × 𝑵 , y 𝑵 × 𝑵 1 st x 𝑵 2 nd y + 𝑵 1 st y 𝑵 2 nd x 2 nd x 𝑵 2 nd y
16 opex 1 st A 𝑵 2 nd B + 𝑵 1 st B 𝑵 2 nd A 2 nd A 𝑵 2 nd B V
17 7 14 15 16 ovmpo A 𝑵 × 𝑵 B 𝑵 × 𝑵 A + 𝑝𝑸 B = 1 st A 𝑵 2 nd B + 𝑵 1 st B 𝑵 2 nd A 2 nd A 𝑵 2 nd B