Metamath Proof Explorer


Theorem ordpinq

Description: Ordering of positive fractions in terms of positive integers. (Contributed by NM, 13-Feb-1996) (Revised by Mario Carneiro, 28-Apr-2013) (New usage is discouraged.)

Ref Expression
Assertion ordpinq ( ( 𝐴Q𝐵Q ) → ( 𝐴 <Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) <N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )

Proof

Step Hyp Ref Expression
1 brinxp ( ( 𝐴Q𝐵Q ) → ( 𝐴 <pQ 𝐵𝐴 ( <pQ ∩ ( Q × Q ) ) 𝐵 ) )
2 df-ltnq <Q = ( <pQ ∩ ( Q × Q ) )
3 2 breqi ( 𝐴 <Q 𝐵𝐴 ( <pQ ∩ ( Q × Q ) ) 𝐵 )
4 1 3 bitr4di ( ( 𝐴Q𝐵Q ) → ( 𝐴 <pQ 𝐵𝐴 <Q 𝐵 ) )
5 relxp Rel ( N × N )
6 elpqn ( 𝐴Q𝐴 ∈ ( N × N ) )
7 1st2nd ( ( Rel ( N × N ) ∧ 𝐴 ∈ ( N × N ) ) → 𝐴 = ⟨ ( 1st𝐴 ) , ( 2nd𝐴 ) ⟩ )
8 5 6 7 sylancr ( 𝐴Q𝐴 = ⟨ ( 1st𝐴 ) , ( 2nd𝐴 ) ⟩ )
9 elpqn ( 𝐵Q𝐵 ∈ ( N × N ) )
10 1st2nd ( ( Rel ( N × N ) ∧ 𝐵 ∈ ( N × N ) ) → 𝐵 = ⟨ ( 1st𝐵 ) , ( 2nd𝐵 ) ⟩ )
11 5 9 10 sylancr ( 𝐵Q𝐵 = ⟨ ( 1st𝐵 ) , ( 2nd𝐵 ) ⟩ )
12 8 11 breqan12d ( ( 𝐴Q𝐵Q ) → ( 𝐴 <pQ 𝐵 ↔ ⟨ ( 1st𝐴 ) , ( 2nd𝐴 ) ⟩ <pQ ⟨ ( 1st𝐵 ) , ( 2nd𝐵 ) ⟩ ) )
13 ordpipq ( ⟨ ( 1st𝐴 ) , ( 2nd𝐴 ) ⟩ <pQ ⟨ ( 1st𝐵 ) , ( 2nd𝐵 ) ⟩ ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) <N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) )
14 12 13 bitrdi ( ( 𝐴Q𝐵Q ) → ( 𝐴 <pQ 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) <N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )
15 4 14 bitr3d ( ( 𝐴Q𝐵Q ) → ( 𝐴 <Q 𝐵 ↔ ( ( 1st𝐴 ) ·N ( 2nd𝐵 ) ) <N ( ( 1st𝐵 ) ·N ( 2nd𝐴 ) ) ) )