internlm/Lean-Github huggingface dataset:
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this : OneOfThree
b✝ : p ≃ q
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : p < q ∨ p ≃ q := Or.inr ‹p ≃ q›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝ : OneOfThree
b✝ : p ≃ q
this : p < q ∨ p ≃ q
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝ : OneOfThree
b✝ : p ≃ q
this : p < q ∨ p ≃ q
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : p ≤ q := le_cases.mpr this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝¹ : OneOfThree
b✝ : p ≃ q
this✝ : p < q ∨ p ≃ q
this : p ≤ q
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝¹ : OneOfThree
b✝ : p ≃ q
this✝ : p < q ∨ p ≃ q
this : p ≤ q
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : p ≤ q ∨ q ≤ p := Or.inl this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝² : OneOfThree
b✝ : p ≃ q
this✝¹ : p < q ∨ p ≃ q
this✝ : p ≤ q
this : p ≤ q ∨ q ≤ p
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝² : OneOfThree
b✝ : p ≃ q
this✝¹ : p < q ∨ p ≃ q
this✝ : p ≤ q
this : p ≤ q ∨ q ≤ p
⊢ p ≤ q ∨ q ≤ p
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this : OneOfThree
c✝ : p > q
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : q < p ∨ q ≃ p := Or.inl ‹q < p›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝ : OneOfThree
c✝ : p > q
this : q < p ∨ q ≃ p
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝ : OneOfThree
c✝ : p > q
this : q < p ∨ q ≃ p
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : q ≤ p := le_cases.mpr this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝¹ : OneOfThree
c✝ : p > q
this✝ : q < p ∨ q ≃ p
this : q ≤ p
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝¹ : OneOfThree
c✝ : p > q
this✝ : q < p ∨ q ≃ p
this : q ≤ p
⊢ p ≤ q ∨ q ≤ p
Tactic:
have : p ≤ q ∨ q ≤ p := Or.inr this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝² : OneOfThree
c✝ : p > q
this✝¹ : q < p ∨ q ≃ p
this✝ : q ≤ p
this : p ≤ q ∨ q ≤ p
⊢ p ≤ q ∨ q ≤ p
Theorem: Lean4Axiomatic.Rational.le_dichotomy
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q : ℚ
OneOfThree : Prop := AA.OneOfThree (p < q) (p ≃ q) (p > q)
this✝² : OneOfThree
c✝ : p > q
this✝¹ : q < p ∨ q ≃ p
this✝ : q ≤ p
this : p ≤ q ∨ q ≤ p
⊢ p ≤ q ∨ q ≤ p
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_subst_from_integer
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
⊢ a < b → from_integer a < from_integer b
Tactic:
intro (_ : a < b)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
⊢ from_integer a < from_integer b
Theorem: Lean4Axiomatic.Rational.lt_subst_from_integer
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
⊢ from_integer a < from_integer b
Tactic:
have : sgn ((a:ℚ) - (b:ℚ)) ≃ -1 := calc
  _ ≃ sgn ((a:ℚ) - (b:ℚ)) := Rel.refl
  _ ≃ sgn (((a - b):ℤ):ℚ) := sgn_subst (eqv_symm sub_compat_from_integer)
  _ ≃ sgn (a - b)         := sgn_from_integer
  _ ≃ -1                  := Integer.lt_sgn.mp ‹a < b›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
this : sgn (from_integer a - from_integer b) ≃ -1
⊢ from_integer a < from_integer b
Theorem: Lean4Axiomatic.Rational.lt_subst_from_integer
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
this : sgn (from_integer a - from_integer b) ≃ -1
⊢ from_integer a < from_integer b
Tactic:
have : (a:ℚ) < (b:ℚ) := lt_sgn.mpr this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
this✝ : sgn (from_integer a - from_integer b) ≃ -1
this : from_integer a < from_integer b
⊢ from_integer a < from_integer b
Theorem: Lean4Axiomatic.Rational.lt_subst_from_integer
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
a b : ℤ
x✝ : a < b
this✝ : sgn (from_integer a - from_integer b) ≃ -1
this : from_integer a < from_integer b
⊢ from_integer a < from_integer b
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.one_ge_zero
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
⊢ 1 ≥ 0
Tactic:
have : (1:ℤ) > 0 := Integer.zero_lt_one
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this : 1 > 0
⊢ 1 ≥ 0
Theorem: Lean4Axiomatic.Rational.one_ge_zero
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this : 1 > 0
⊢ 1 ≥ 0
Tactic:
have : (1:ℚ) > 0 := lt_subst_from_integer this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this✝ : 1 > 0
this : 1 > 0
⊢ 1 ≥ 0
Theorem: Lean4Axiomatic.Rational.one_ge_zero
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this✝ : 1 > 0
this : 1 > 0
⊢ 1 ≥ 0
Tactic:
have : (1:ℚ) ≥ 0 := ge_cases.mpr (Or.inl this)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this✝¹ : 1 > 0
this✝ : 1 > 0
this : 1 ≥ 0
⊢ 1 ≥ 0
Theorem: Lean4Axiomatic.Rational.one_ge_zero
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
this✝¹ : 1 > 0
this✝ : 1 > 0
this : 1 ≥ 0
⊢ 1 ≥ 0
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
⊢ p < q → q < r → p < r
Tactic:
intro (_ : p < q) (_ : q < r)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
⊢ p < r
Tactic:
have : sgn (p - q) ≃ -1 := lt_sgn.mp ‹p < q›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this : sgn (p - q) ≃ -1
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this : sgn (p - q) ≃ -1
⊢ p < r
Tactic:
have : sgn (q - r) ≃ -1 := lt_sgn.mp ‹q < r›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝ : sgn (p - q) ≃ -1
this : sgn (q - r) ≃ -1
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝ : sgn (p - q) ≃ -1
this : sgn (q - r) ≃ -1
⊢ p < r
Tactic:
have : sgn ((p - q) + (q - r)) ≃ -1 :=
  add_preserves_sign ‹sgn (p - q) ≃ -1› ‹sgn (q - r) ≃ -1›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝¹ : sgn (p - q) ≃ -1
this✝ : sgn (q - r) ≃ -1
this : sgn (p - q + (q - r)) ≃ -1
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝¹ : sgn (p - q) ≃ -1
this✝ : sgn (q - r) ≃ -1
this : sgn (p - q + (q - r)) ≃ -1
⊢ p < r
Tactic:
have : sgn (p - r) ≃ -1 := calc
  sgn (p - r)             ≃ _ := sgn_subst (eqv_symm add_sub_telescope)
  sgn ((p - q) + (q - r)) ≃ _ := ‹sgn ((p - q) + (q - r)) ≃ -1›
  (-1)                    ≃ _ := Rel.refl
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝² : sgn (p - q) ≃ -1
this✝¹ : sgn (q - r) ≃ -1
this✝ : sgn (p - q + (q - r)) ≃ -1
this : sgn (p - r) ≃ -1
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝² : sgn (p - q) ≃ -1
this✝¹ : sgn (q - r) ≃ -1
this✝ : sgn (p - q + (q - r)) ≃ -1
this : sgn (p - r) ≃ -1
⊢ p < r
Tactic:
have : p < r := lt_sgn.mpr ‹sgn (p - r) ≃ -1›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝³ : sgn (p - q) ≃ -1
this✝² : sgn (q - r) ≃ -1
this✝¹ : sgn (p - q + (q - r)) ≃ -1
this✝ : sgn (p - r) ≃ -1
this : p < r
⊢ p < r
Theorem: Lean4Axiomatic.Rational.lt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : p < q
x✝ : q < r
this✝³ : sgn (p - q) ≃ -1
this✝² : sgn (q - r) ≃ -1
this✝¹ : sgn (p - q + (q - r)) ≃ -1
this✝ : sgn (p - r) ≃ -1
this : p < r
⊢ p < r
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.gt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
⊢ p > q → q > r → p > r
Tactic:
intro (_ : q < p) (_ : r < q)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : q < p
x✝ : r < q
⊢ p > r
Theorem: Lean4Axiomatic.Rational.gt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : q < p
x✝ : r < q
⊢ p > r
Tactic:
show r < p
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : q < p
x✝ : r < q
⊢ r < p
Theorem: Lean4Axiomatic.Rational.gt_trans
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p q r : ℚ
x✝¹ : q < p
x✝ : r < q
⊢ r < p
Tactic:
exact lt_trans ‹r < q› ‹q < p›
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substL_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
⊢ p₁ ≃ p₂ → p₁ < q → p₂ < q
Tactic:
intro (_ : p₁ ≃ p₂) (_ : p₁ < q)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
⊢ p₂ < q
Theorem: Lean4Axiomatic.Rational.lt_substL_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
⊢ p₂ < q
Tactic:
have : sgn (p₁ - q) ≃ -1 := lt_sgn.mp ‹p₁ < q›
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this : sgn (p₁ - q) ≃ -1
⊢ p₂ < q
Theorem: Lean4Axiomatic.Rational.lt_substL_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this : sgn (p₁ - q) ≃ -1
⊢ p₂ < q
Tactic:
have : sgn (p₂ - q) ≃ -1 := calc
  sgn (p₂ - q) ≃ _ := sgn_subst (sub_substL (eqv_symm ‹p₁ ≃ p₂›))
  sgn (p₁ - q) ≃ _ := ‹sgn (p₁ - q) ≃ -1›
  (-1)         ≃ _ := Rel.refl
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this✝ : sgn (p₁ - q) ≃ -1
this : sgn (p₂ - q) ≃ -1
⊢ p₂ < q
Theorem: Lean4Axiomatic.Rational.lt_substL_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this✝ : sgn (p₁ - q) ≃ -1
this : sgn (p₂ - q) ≃ -1
⊢ p₂ < q
Tactic:
have : p₂ < q := lt_sgn.mpr this
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this✝¹ : sgn (p₁ - q) ≃ -1
this✝ : sgn (p₂ - q) ≃ -1
this : p₂ < q
⊢ p₂ < q
Theorem: Lean4Axiomatic.Rational.lt_substL_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : p₁ < q
this✝¹ : sgn (p₁ - q) ≃ -1
this✝ : sgn (p₂ - q) ≃ -1
this : p₂ < q
⊢ p₂ < q
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.trans_eqv_lt_lt
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
⊢ p₂ ≃ p₁ → p₁ < q → p₂ < q
Tactic:
intro (_ : p₂ ≃ p₁) (_ : p₁ < q)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₂ ≃ p₁
x✝ : p₁ < q
⊢ p₂ < q
Theorem: Lean4Axiomatic.Rational.trans_eqv_lt_lt
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₂ ≃ p₁
x✝ : p₁ < q
⊢ p₂ < q
Tactic:
exact lt_substL_eqv (eqv_symm ‹p₂ ≃ p₁›) ‹p₁ < q›
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substR_eqv
Proof state before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
⊢ p₁ ≃ p₂ → q < p₁ → q < p₂
Tactic:
intro (_ : p₁ ≃ p₂) (_ : q < p₁)
Proof state after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
p₁ p₂ q : ℚ
x✝¹ : p₁ ≃ p₂
x✝ : q < p₁
⊢ q < p₂