Theorem: Lean4Axiomatic.Rational.between_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 ⊢r ↔ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
apply Iff.intro
State after:
case mp
ℕ ℤ ℚ : 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 ⊢r → Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

case mpr
ℕ ℤ ℚ : 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 : ℚ
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r → p⊣ q ⊢r

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 ⊢r → Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
case mp =>
  intro (_ : p⊣ q ⊢r)
  show min p r ≤ q ∧ q ≤ max p r
  have : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p := between_order.mp ‹p⊣ q ⊢r›
  match this with
  | Or.inl (_ : p ≤ q ∧ q ≤ r) =>
    have : min p r ≤ q ∧ q ≤ max p r := min_max_from_order ‹p ≤ q ∧ q ≤ r›
    exact this
  | Or.inr (_ : r ≤ q ∧ q ≤ p) =>
    have : min r p ≤ q ∧ q ≤ max r p := min_max_from_order ‹r ≤ q ∧ q ≤ p›
    have : min p r ≤ q ∧ q ≤ max p r := min_max_comm this
    exact this
State after:
no goals

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 : ℚ
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r → p⊣ q ⊢r
Tactic:
case mpr =>
  intro (min_max : min p r ≤ q ∧ q ≤ max p r)
  show p⊣ q ⊢r
  have : p ≤ r ∨ r ≤ p := le_dichotomy
  have : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p :=
    match ‹p ≤ r ∨ r ≤ p› with
    | Or.inl (_ : p ≤ r) =>
      have : p ≤ q ∧ q ≤ r := order_from_min_max min_max ‹p ≤ r›
      Or.inl this
    | Or.inr (_ : r ≤ p) =>
      have : min r p ≤ q ∧ q ≤ max r p := min_max_comm min_max
      have : r ≤ q ∧ q ≤ p := order_from_min_max this ‹r ≤ p›
      Or.inr this
  have : p⊣ q ⊢r := between_order.mpr ‹p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p›
  exact this
State after:
no goals

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 ⊢r → Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
intro (_ : p⊣ q ⊢r)
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 ⊢r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

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 ⊢r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
have : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p := between_order.mp ‹p⊣ q ⊢r›
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 ⊢r
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

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 ⊢r
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
match this with
| Or.inl (_ : p ≤ q ∧ q ≤ r) =>
  have : min p r ≤ q ∧ q ≤ max p r := min_max_from_order ‹p ≤ q ∧ q ≤ r›
  exact this
| Or.inr (_ : r ≤ q ∧ q ≤ p) =>
  have : min r p ≤ q ∧ q ≤ max r p := min_max_from_order ‹r ≤ q ∧ q ≤ p›
  have : min p r ≤ q ∧ q ≤ max p r := min_max_comm this
  exact this
State after:
no goals

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 ⊢r
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : p ≤ q ∧ q ≤ r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
have : min p r ≤ q ∧ q ≤ max p r := min_max_from_order ‹p ≤ q ∧ q ≤ r›
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 ⊢r
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : p ≤ q ∧ q ≤ r
this : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

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 ⊢r
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : p ≤ q ∧ q ≤ r
this : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
exact this
State after:
no goals

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 ⊢r
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : r ≤ q ∧ q ≤ p
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
have : min r p ≤ q ∧ q ≤ max r p := min_max_from_order ‹r ≤ q ∧ q ≤ p›
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 ⊢r
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : r ≤ q ∧ q ≤ p
this : Ordered.min r p ≤ q ∧ q ≤ Ordered.max r p
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

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 ⊢r
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : r ≤ q ∧ q ≤ p
this : Ordered.min r p ≤ q ∧ q ≤ Ordered.max r p
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
have : min p r ≤ q ∧ q ≤ max p r := min_max_comm this
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 ⊢r
this✝¹ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : r ≤ q ∧ q ≤ p
this✝ : Ordered.min r p ≤ q ∧ q ≤ Ordered.max r p
this : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r

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 ⊢r
this✝¹ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
h✝ : r ≤ q ∧ q ≤ p
this✝ : Ordered.min r p ≤ q ∧ q ≤ Ordered.max r p
this : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
Tactic:
exact this
State after:
no goals

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 : ℚ
⊢ Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r → p⊣ q ⊢r
Tactic:
intro (min_max : min p r ≤ q ∧ q ≤ max p r)
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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ p⊣ q ⊢r

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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
⊢ p⊣ q ⊢r
Tactic:
have : p ≤ r ∨ r ≤ p := le_dichotomy
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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this : p ≤ r ∨ r ≤ p
⊢ p⊣ q ⊢r

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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this : p ≤ r ∨ r ≤ p
⊢ p⊣ q ⊢r
Tactic:
have : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p :=
  match ‹p ≤ r ∨ r ≤ p› with
  | Or.inl (_ : p ≤ r) =>
    have : p ≤ q ∧ q ≤ r := order_from_min_max min_max ‹p ≤ r›
    Or.inl this
  | Or.inr (_ : r ≤ p) =>
    have : min r p ≤ q ∧ q ≤ max r p := min_max_comm min_max
    have : r ≤ q ∧ q ≤ p := order_from_min_max this ‹r ≤ p›
    Or.inr this
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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this✝ : p ≤ r ∨ r ≤ p
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
⊢ p⊣ q ⊢r

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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this✝ : p ≤ r ∨ r ≤ p
this : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
⊢ p⊣ q ⊢r
Tactic:
have : p⊣ q ⊢r := between_order.mpr ‹p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p›
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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this✝¹ : p ≤ r ∨ r ≤ p
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
this : p⊣ q ⊢r
⊢ p⊣ q ⊢r

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 : ℚ
min_max : Ordered.min p r ≤ q ∧ q ≤ Ordered.max p r
this✝¹ : p ≤ r ∨ r ≤ p
this✝ : p ≤ q ∧ q ≤ r ∨ r ≤ q ∧ q ≤ p
this : p⊣ q ⊢r
⊢ p⊣ q ⊢r
Tactic:
exact this
State after:
no goals