Theorem: Lean4Axiomatic.Rational.order_iff_min_max (Lean4Axiomatic/Rational/Metric.lean)

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
⊢ p ≤ q → (p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q)
Tactic:
intro (_ : p ≤ q)
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q
Tactic:
have : p ≃ min p q := eqv_symm (min_le.mpr ‹p ≤ q›)
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this : p ≃ Ordered.min p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this : p ≃ Ordered.min p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q
Tactic:
have : q ≃ max p q := eqv_symm (max_le.mpr ‹p ≤ q›)
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q
Tactic:
have p_min : p ≤ r ↔ min p q ≤ r := iff_subst_eqv le_substL_eqv ‹p ≃ min p q›
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
p_min : p ≤ r ↔ Ordered.min p q ≤ r
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
p_min : p ≤ r ↔ Ordered.min p q ≤ r
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q
Tactic:
have q_max : r ≤ q ↔ r ≤ max p q := iff_subst_eqv le_substR_eqv ‹q ≃ max p q›
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
p_min : p ≤ r ↔ Ordered.min p q ≤ r
q_max : r ≤ q ↔ r ≤ Ordered.max p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p q r : ℚ
x✝ : p ≤ q
this✝ : p ≃ Ordered.min p q
this : q ≃ Ordered.max p q
p_min : p ≤ r ↔ Ordered.min p q ≤ r
q_max : r ≤ q ↔ r ≤ Ordered.max p q
⊢ p ≤ r ∧ r ≤ q ↔ Ordered.min p q ≤ r ∧ r ≤ Ordered.max p q
Tactic:
calc
  _ ↔ p ≤ r ∧ r ≤ q             := Iff.rfl
  _ ↔ min p q ≤ r ∧ r ≤ q       := iff_subst_covar and_mapL p_min
  _ ↔ min p q ≤ r ∧ r ≤ max p q := iff_subst_covar and_mapR q_max
State after:
no goals