internlm/Lean-Github huggingface dataset:
Theorem: Lean4Axiomatic.Rational.between_min_max
Proof 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
Proof 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
Theorem: Lean4Axiomatic.Rational.between_min_max
Proof 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
Proof 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
Theorem: Lean4Axiomatic.Rational.between_min_max
Proof 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›
Proof 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
Theorem: Lean4Axiomatic.Rational.between_min_max
Proof 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
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.between_from_close
Proof 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 : ℚ
⊢ p ⊢ε⊣ q → p - ε⊣ q ⊢p + ε
Tactic:
intro (_ : p ⊢ε⊣ q)
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
⊢ p - ε⊣ q ⊢p + ε
Theorem: Lean4Axiomatic.Rational.between_from_close
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
⊢ p - ε⊣ q ⊢p + ε
Tactic:
have : p-ε ≤ q ∧ q ≤ p+ε := close_endpoints.mp ‹p ⊢ε⊣ q›
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this : p - ε ≤ q ∧ q ≤ p + ε
⊢ p - ε⊣ q ⊢p + ε
Theorem: Lean4Axiomatic.Rational.between_from_close
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this : p - ε ≤ q ∧ q ≤ p + ε
⊢ p - ε⊣ q ⊢p + ε
Tactic:
have : (p-ε ≤ q ∧ q ≤ p+ε) ∨ (p+ε ≤ q ∧ q ≤ p-ε) := Or.inl this
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this✝ : p - ε ≤ q ∧ q ≤ p + ε
this : p - ε ≤ q ∧ q ≤ p + ε ∨ p + ε ≤ q ∧ q ≤ p - ε
⊢ p - ε⊣ q ⊢p + ε
Theorem: Lean4Axiomatic.Rational.between_from_close
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this✝ : p - ε ≤ q ∧ q ≤ p + ε
this : p - ε ≤ q ∧ q ≤ p + ε ∨ p + ε ≤ q ∧ q ≤ p - ε
⊢ p - ε⊣ q ⊢p + ε
Tactic:
have : p-ε⊣ q ⊢p+ε := between_order.mpr this
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this✝¹ : p - ε ≤ q ∧ q ≤ p + ε
this✝ : p - ε ≤ q ∧ q ≤ p + ε ∨ p + ε ≤ q ∧ q ≤ p - ε
this : p - ε⊣ q ⊢p + ε
⊢ p - ε⊣ q ⊢p + ε
Theorem: Lean4Axiomatic.Rational.between_from_close
Proof 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 : ℚ
x✝ : p ⊢ε⊣ q
this✝¹ : p - ε ≤ q ∧ q ≤ p + ε
this✝ : p - ε ≤ q ∧ q ≤ p + ε ∨ p + ε ≤ q ∧ q ≤ p - ε
this : p - ε⊣ q ⊢p + ε
⊢ p - ε⊣ q ⊢p + ε
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
⊢ ε ≥ 0 → p - ε⊣ q ⊢p + ε → p ⊢ε⊣ q
Tactic:
intro (_ : ε ≥ 0) (_ : p-ε⊣ q ⊢p+ε)
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
⊢ p ⊢ε⊣ q
Tactic:
have : -ε ≤ ε := le_neg_nonneg ‹ε ≥ 0›
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this : -ε ≤ ε
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this : -ε ≤ ε
⊢ p ⊢ε⊣ q
Tactic:
have : p-ε ≤ p+ε := calc
  _ ≃ p - ε    := eqv_refl
  _ ≃ p + (-ε) := sub_add_neg
  _ ≤ p + ε    := le_substR_add ‹-ε ≤ ε›
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝ : -ε ≤ ε
this : p - ε ≤ p + ε
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝ : -ε ≤ ε
this : p - ε ≤ p + ε
⊢ p ⊢ε⊣ q
Tactic:
have : min (p-ε) (p+ε) ≤ q ∧ q ≤ max (p-ε) (p+ε) :=
  between_min_max.mp ‹p-ε⊣ q ⊢p+ε›
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝¹ : -ε ≤ ε
this✝ : p - ε ≤ p + ε
this : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝¹ : -ε ≤ ε
this✝ : p - ε ≤ p + ε
this : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
⊢ p ⊢ε⊣ q
Tactic:
have : p-ε ≤ q ∧ q ≤ p+ε := order_from_min_max this ‹p-ε ≤ p+ε›
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝² : -ε ≤ ε
this✝¹ : p - ε ≤ p + ε
this✝ : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
this : p - ε ≤ q ∧ q ≤ p + ε
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝² : -ε ≤ ε
this✝¹ : p - ε ≤ p + ε
this✝ : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
this : p - ε ≤ q ∧ q ≤ p + ε
⊢ p ⊢ε⊣ q
Tactic:
have : p ⊢ε⊣ q := close_endpoints.mpr this
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝³ : -ε ≤ ε
this✝² : p - ε ≤ p + ε
this✝¹ : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
this✝ : p - ε ≤ q ∧ q ≤ p + ε
this : p ⊢ε⊣ q
⊢ p ⊢ε⊣ q
Theorem: Lean4Axiomatic.Rational.close_from_between
Proof 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 : ℚ
x✝¹ : ε ≥ 0
x✝ : p - ε⊣ q ⊢p + ε
this✝³ : -ε ≤ ε
this✝² : p - ε ≤ p + ε
this✝¹ : Ordered.min (p - ε) (p + ε) ≤ q ∧ q ≤ Ordered.max (p - ε) (p + ε)
this✝ : p - ε ≤ q ∧ q ≤ p + ε
this : p ⊢ε⊣ q
⊢ p ⊢ε⊣ q
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
⊢ p⊣ q ⊢t → p⊣ s ⊢t → q⊣ r ⊢s → p⊣ r ⊢t
Tactic:
intro (_ : p⊣ q ⊢t) (_ : p⊣ s ⊢t) (_ : q⊣ r ⊢s)
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
⊢ p⊣ r ⊢t
Tactic:
have (And.intro (_ : min p t ≤ q) (_ : q ≤ max p t)) :=
  between_min_max.mp ‹p⊣ q ⊢t›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝ : Ordered.min p t ≤ q
right✝ : q ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝ : Ordered.min p t ≤ q
right✝ : q ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Tactic:
have (And.intro (_ : min p t ≤ s) (_ : s ≤ max p t)) :=
  between_min_max.mp ‹p⊣ s ⊢t›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝¹ : Ordered.min p t ≤ q
right✝¹ : q ≤ Ordered.max p t
left✝ : Ordered.min p t ≤ s
right✝ : s ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝¹ : Ordered.min p t ≤ q
right✝¹ : q ≤ Ordered.max p t
left✝ : Ordered.min p t ≤ s
right✝ : s ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Tactic:
have (And.intro (_ : min q s ≤ r) (_ : r ≤ max q s)) :=
  between_min_max.mp ‹q⊣ r ⊢s›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
⊢ p⊣ r ⊢t
Tactic:
have : min p t ≤ min q s := min_le_both ‹min p t ≤ q› ‹min p t ≤ s›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this : Ordered.min p t ≤ Ordered.min q s
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this : Ordered.min p t ≤ Ordered.min q s
⊢ p⊣ r ⊢t
Tactic:
have : max q s ≤ max p t := max_le_both ‹q ≤ max p t› ‹s ≤ max p t›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this✝ : Ordered.min p t ≤ Ordered.min q s
this : Ordered.max q s ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this✝ : Ordered.min p t ≤ Ordered.min q s
this : Ordered.max q s ≤ Ordered.max p t
⊢ p⊣ r ⊢t
Tactic:
have : min p t ≤ r := le_trans ‹min p t ≤ min q s› ‹min q s ≤ r›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this✝¹ : Ordered.min p t ≤ Ordered.min q s
this✝ : Ordered.max q s ≤ Ordered.max p t
this : Ordered.min p t ≤ r
⊢ p⊣ r ⊢t
Theorem: Lean4Axiomatic.Rational.between_trans
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this✝¹ : Ordered.min p t ≤ Ordered.min q s
this✝ : Ordered.max q s ≤ Ordered.max p t
this : Ordered.min p t ≤ r
⊢ p⊣ r ⊢t
Tactic:
have : r ≤ max p t := le_trans ‹r ≤ max q s› ‹max q s ≤ max p t›
Proof 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 s t : ℚ
x✝² : p⊣ q ⊢t
x✝¹ : p⊣ s ⊢t
x✝ : q⊣ r ⊢s
left✝² : Ordered.min p t ≤ q
right✝² : q ≤ Ordered.max p t
left✝¹ : Ordered.min p t ≤ s
right✝¹ : s ≤ Ordered.max p t
left✝ : Ordered.min q s ≤ r
right✝ : r ≤ Ordered.max q s
this✝² : Ordered.min p t ≤ Ordered.min q s
this✝¹ : Ordered.max q s ≤ Ordered.max p t
this✝ : Ordered.min p t ≤ r
this : r ≤ Ordered.max p t
⊢ p⊣ r ⊢t