Metamath Proof Explorer


Theorem ltord1

Description: Infer an ordering relation from a proof in only one direction. (Contributed by Mario Carneiro, 14-Jun-2014)

Ref Expression
Hypotheses ltord.1 ( 𝑥 = 𝑦𝐴 = 𝐵 )
ltord.2 ( 𝑥 = 𝐶𝐴 = 𝑀 )
ltord.3 ( 𝑥 = 𝐷𝐴 = 𝑁 )
ltord.4 𝑆 ⊆ ℝ
ltord.5 ( ( 𝜑𝑥𝑆 ) → 𝐴 ∈ ℝ )
ltord.6 ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 < 𝑦𝐴 < 𝐵 ) )
Assertion ltord1 ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐶 < 𝐷𝑀 < 𝑁 ) )

Proof

Step Hyp Ref Expression
1 ltord.1 ( 𝑥 = 𝑦𝐴 = 𝐵 )
2 ltord.2 ( 𝑥 = 𝐶𝐴 = 𝑀 )
3 ltord.3 ( 𝑥 = 𝐷𝐴 = 𝑁 )
4 ltord.4 𝑆 ⊆ ℝ
5 ltord.5 ( ( 𝜑𝑥𝑆 ) → 𝐴 ∈ ℝ )
6 ltord.6 ( ( 𝜑 ∧ ( 𝑥𝑆𝑦𝑆 ) ) → ( 𝑥 < 𝑦𝐴 < 𝐵 ) )
7 1 2 3 4 5 6 ltordlem ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐶 < 𝐷𝑀 < 𝑁 ) )
8 eqeq1 ( 𝑥 = 𝐶 → ( 𝑥 = 𝐷𝐶 = 𝐷 ) )
9 2 eqeq1d ( 𝑥 = 𝐶 → ( 𝐴 = 𝑁𝑀 = 𝑁 ) )
10 8 9 imbi12d ( 𝑥 = 𝐶 → ( ( 𝑥 = 𝐷𝐴 = 𝑁 ) ↔ ( 𝐶 = 𝐷𝑀 = 𝑁 ) ) )
11 10 3 vtoclg ( 𝐶𝑆 → ( 𝐶 = 𝐷𝑀 = 𝑁 ) )
12 11 ad2antrl ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐶 = 𝐷𝑀 = 𝑁 ) )
13 1 3 2 4 5 6 ltordlem ( ( 𝜑 ∧ ( 𝐷𝑆𝐶𝑆 ) ) → ( 𝐷 < 𝐶𝑁 < 𝑀 ) )
14 13 ancom2s ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐷 < 𝐶𝑁 < 𝑀 ) )
15 12 14 orim12d ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( ( 𝐶 = 𝐷𝐷 < 𝐶 ) → ( 𝑀 = 𝑁𝑁 < 𝑀 ) ) )
16 15 con3d ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( ¬ ( 𝑀 = 𝑁𝑁 < 𝑀 ) → ¬ ( 𝐶 = 𝐷𝐷 < 𝐶 ) ) )
17 5 ralrimiva ( 𝜑 → ∀ 𝑥𝑆 𝐴 ∈ ℝ )
18 2 eleq1d ( 𝑥 = 𝐶 → ( 𝐴 ∈ ℝ ↔ 𝑀 ∈ ℝ ) )
19 18 rspccva ( ( ∀ 𝑥𝑆 𝐴 ∈ ℝ ∧ 𝐶𝑆 ) → 𝑀 ∈ ℝ )
20 17 19 sylan ( ( 𝜑𝐶𝑆 ) → 𝑀 ∈ ℝ )
21 3 eleq1d ( 𝑥 = 𝐷 → ( 𝐴 ∈ ℝ ↔ 𝑁 ∈ ℝ ) )
22 21 rspccva ( ( ∀ 𝑥𝑆 𝐴 ∈ ℝ ∧ 𝐷𝑆 ) → 𝑁 ∈ ℝ )
23 17 22 sylan ( ( 𝜑𝐷𝑆 ) → 𝑁 ∈ ℝ )
24 20 23 anim12dan ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ ) )
25 axlttri ( ( 𝑀 ∈ ℝ ∧ 𝑁 ∈ ℝ ) → ( 𝑀 < 𝑁 ↔ ¬ ( 𝑀 = 𝑁𝑁 < 𝑀 ) ) )
26 24 25 syl ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝑀 < 𝑁 ↔ ¬ ( 𝑀 = 𝑁𝑁 < 𝑀 ) ) )
27 4 sseli ( 𝐶𝑆𝐶 ∈ ℝ )
28 4 sseli ( 𝐷𝑆𝐷 ∈ ℝ )
29 axlttri ( ( 𝐶 ∈ ℝ ∧ 𝐷 ∈ ℝ ) → ( 𝐶 < 𝐷 ↔ ¬ ( 𝐶 = 𝐷𝐷 < 𝐶 ) ) )
30 27 28 29 syl2an ( ( 𝐶𝑆𝐷𝑆 ) → ( 𝐶 < 𝐷 ↔ ¬ ( 𝐶 = 𝐷𝐷 < 𝐶 ) ) )
31 30 adantl ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐶 < 𝐷 ↔ ¬ ( 𝐶 = 𝐷𝐷 < 𝐶 ) ) )
32 16 26 31 3imtr4d ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝑀 < 𝑁𝐶 < 𝐷 ) )
33 7 32 impbid ( ( 𝜑 ∧ ( 𝐶𝑆𝐷𝑆 ) ) → ( 𝐶 < 𝐷𝑀 < 𝑁 ) )