Metamath Proof Explorer


Theorem addcompq

Description: Addition of positive fractions is commutative. (Contributed by NM, 30-Aug-1995) (Revised by Mario Carneiro, 28-Apr-2013) (New usage is discouraged.)

Ref Expression
Assertion addcompq ( 𝐴 +pQ 𝐵 ) = ( 𝐵 +pQ 𝐴 )

Proof

Step Hyp Ref Expression
1 addcompi ( ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) +N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) = ( ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) +N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) )
2 mulcompi ( ( 2nd𝐴 ) ·N ( 2nd𝐵 ) ) = ( ( 2nd𝐵 ) ·N ( 2nd𝐴 ) )
3 1 2 opeq12i ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) +N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐵 ) ) ⟩ = ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) +N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐴 ) ) ⟩
4 addpipq2 ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐴 +pQ 𝐵 ) = ⟨ ( ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) +N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) , ( ( 2nd𝐴 ) ·N ( 2nd𝐵 ) ) ⟩ )
5 addpipq2 ( ( 𝐵 ∈ ( N × N ) ∧ 𝐴 ∈ ( N × N ) ) → ( 𝐵 +pQ 𝐴 ) = ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) +N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐴 ) ) ⟩ )
6 5 ancoms ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐵 +pQ 𝐴 ) = ⟨ ( ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) +N ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) ) , ( ( 2nd𝐵 ) ·N ( 2nd𝐴 ) ) ⟩ )
7 3 4 6 3eqtr4a ( ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐴 +pQ 𝐵 ) = ( 𝐵 +pQ 𝐴 ) )
8 addpqf +pQ : ( ( N × N ) × ( N × N ) ) ⟶ ( N × N )
9 8 fdmi dom +pQ = ( ( N × N ) × ( N × N ) )
10 9 ndmovcom ( ¬ ( 𝐴 ∈ ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → ( 𝐴 +pQ 𝐵 ) = ( 𝐵 +pQ 𝐴 ) )
11 7 10 pm2.61i ( 𝐴 +pQ 𝐵 ) = ( 𝐵 +pQ 𝐴 )