internlm/Lean-Github huggingface dataset:
Theorem: Lean4Axiomatic.Rational.sgn_max
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 : ℚ
this✝⁴ : AA.OneOfThree (sgn p ≃ 0) (sgn p ≃ 1) (sgn p ≃ -1)
c✝ : sgn p ≃ -1
this✝³ : -1 < 0
this✝² : 0 < 1
this✝¹ : -1 < 1
this✝ : -1 ≤ 1
this : sgn p ≤ 1
⊢ sgn p ≤ 1
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.sgn_min
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 : ℚ
⊢ sgn p ≥ -1
Tactic:
have : sgn (-p) ≤ 1 := sgn_max
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 : ℚ
this : sgn (-p) ≤ 1
⊢ sgn p ≥ -1
Theorem: Lean4Axiomatic.Rational.sgn_min
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 : ℚ
this : sgn (-p) ≤ 1
⊢ sgn p ≥ -1
Tactic:
have : -(sgn (-p)) ≥ -1 := Integer.le_neg_flip.mp 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 : ℚ
this✝ : sgn (-p) ≤ 1
this : -sgn (-p) ≥ -1
⊢ sgn p ≥ -1
Theorem: Lean4Axiomatic.Rational.sgn_min
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 : ℚ
this✝ : sgn (-p) ≤ 1
this : -sgn (-p) ≥ -1
⊢ sgn p ≥ -1
Tactic:
have : -(-(sgn p)) ≥ -1 :=
  Integer.le_substR_eqv (AA.subst₁ sgn_compat_neg) 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 : ℚ
this✝¹ : sgn (-p) ≤ 1
this✝ : -sgn (-p) ≥ -1
this : - -sgn p ≥ -1
⊢ sgn p ≥ -1
Theorem: Lean4Axiomatic.Rational.sgn_min
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 : ℚ
this✝¹ : sgn (-p) ≤ 1
this✝ : -sgn (-p) ≥ -1
this : - -sgn p ≥ -1
⊢ sgn p ≥ -1
Tactic:
have : sgn p ≥ -1 := Integer.le_substR_eqv Integer.neg_involutive 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 : ℚ
this✝² : sgn (-p) ≤ 1
this✝¹ : -sgn (-p) ≥ -1
this✝ : - -sgn p ≥ -1
this : sgn p ≥ -1
⊢ sgn p ≥ -1
Theorem: Lean4Axiomatic.Rational.sgn_min
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 : ℚ
this✝² : sgn (-p) ≤ 1
this✝¹ : -sgn (-p) ≥ -1
this✝ : - -sgn p ≥ -1
this : sgn p ≥ -1
⊢ sgn p ≥ -1
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂)
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₂
⊢ p₁ + q ≤ p₂ + q
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂
⊢ p₁ + q ≤ p₂ + q
Tactic:
have : sgn (p₁ - p₂) ≄ 1 := le_sgn.mp ‹p₁ ≤ 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₂
this : sgn (p₁ - p₂) ≄ 1
⊢ p₁ + q ≤ p₂ + q
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂
this : sgn (p₁ - p₂) ≄ 1
⊢ p₁ + q ≤ p₂ + q
Tactic:
have : sgn ((p₁ + q) - (p₂ + q)) ≃ sgn (p₁ - p₂) := sgn_subst sub_cancelR_add
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₂
this✝ : sgn (p₁ - p₂) ≄ 1
this : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
⊢ p₁ + q ≤ p₂ + q
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂
this✝ : sgn (p₁ - p₂) ≄ 1
this : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
⊢ p₁ + q ≤ p₂ + q
Tactic:
have : sgn ((p₁ + q) - (p₂ + q)) ≄ 1 :=
  AA.neqv_substL (Rel.symm this) ‹sgn (p₁ - p₂) ≄ 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₁ p₂ q : ℚ
x✝ : p₁ ≤ p₂
this✝¹ : sgn (p₁ - p₂) ≄ 1
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this : sgn (p₁ + q - (p₂ + q)) ≄ 1
⊢ p₁ + q ≤ p₂ + q
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂
this✝¹ : sgn (p₁ - p₂) ≄ 1
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this : sgn (p₁ + q - (p₂ + q)) ≄ 1
⊢ p₁ + q ≤ p₂ + q
Tactic:
have : p₁ + q ≤ p₂ + q := le_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₂
this✝² : sgn (p₁ - p₂) ≄ 1
this✝¹ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this✝ : sgn (p₁ + q - (p₂ + q)) ≄ 1
this : p₁ + q ≤ p₂ + q
⊢ p₁ + q ≤ p₂ + q
Theorem: Lean4Axiomatic.Rational.le_substL_add
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₂
this✝² : sgn (p₁ - p₂) ≄ 1
this✝¹ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this✝ : sgn (p₁ + q - (p₂ + q)) ≄ 1
this : p₁ + q ≤ p₂ + q
⊢ p₁ + q ≤ p₂ + q
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.le_substR_add
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₂)
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₂
⊢ q + p₁ ≤ q + p₂
Theorem: Lean4Axiomatic.Rational.le_substR_add
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₂
⊢ q + p₁ ≤ q + p₂
Tactic:
calc
  _ ≃ q + p₁ := eqv_refl
  _ ≃ p₁ + q := add_comm
  _ ≤ p₂ + q := le_substL_add ‹p₁ ≤ p₂›
  _ ≃ q + p₂ := add_comm
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂)
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₂
⊢ p₁ + q < p₂ + q
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂
⊢ p₁ + q < p₂ + q
Tactic:
have : sgn (p₁ - p₂) ≃ -1 := lt_sgn.mp ‹p₁ < 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₂
this : sgn (p₁ - p₂) ≃ -1
⊢ p₁ + q < p₂ + q
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂
this : sgn (p₁ - p₂) ≃ -1
⊢ p₁ + q < p₂ + q
Tactic:
have : sgn ((p₁ + q) - (p₂ + q)) ≃ sgn (p₁ - p₂) := sgn_subst sub_cancelR_add
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₂
this✝ : sgn (p₁ - p₂) ≃ -1
this : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
⊢ p₁ + q < p₂ + q
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂
this✝ : sgn (p₁ - p₂) ≃ -1
this : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
⊢ p₁ + q < p₂ + q
Tactic:
have : sgn ((p₁ + q) - (p₂ + q)) ≃ -1 :=
  AA.eqv_substL (Rel.symm this) ‹sgn (p₁ - p₂) ≃ -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₁ p₂ q : ℚ
x✝ : p₁ < p₂
this✝¹ : sgn (p₁ - p₂) ≃ -1
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this : sgn (p₁ + q - (p₂ + q)) ≃ -1
⊢ p₁ + q < p₂ + q
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂
this✝¹ : sgn (p₁ - p₂) ≃ -1
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this : sgn (p₁ + q - (p₂ + q)) ≃ -1
⊢ p₁ + q < p₂ + q
Tactic:
have : p₁ + q < 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₂
this✝² : sgn (p₁ - p₂) ≃ -1
this✝¹ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ -1
this : p₁ + q < p₂ + q
⊢ p₁ + q < p₂ + q
Theorem: Lean4Axiomatic.Rational.lt_substL_add
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₂
this✝² : sgn (p₁ - p₂) ≃ -1
this✝¹ : sgn (p₁ + q - (p₂ + q)) ≃ sgn (p₁ - p₂)
this✝ : sgn (p₁ + q - (p₂ + q)) ≃ -1
this : p₁ + q < p₂ + q
⊢ p₁ + q < p₂ + q
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substR_add
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₂)
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₂
⊢ q + p₁ < q + p₂
Theorem: Lean4Axiomatic.Rational.lt_substR_add
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₂
⊢ q + p₁ < q + p₂
Tactic:
calc
  _ ≃ q + p₁ := eqv_refl
  _ ≃ p₁ + q := add_comm
  _ < p₂ + q := lt_substL_add ‹p₁ < p₂›
  _ ≃ q + p₂ := add_comm
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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 : ℚ
⊢ r > 0 → p < q → p * r < q * r
Tactic:
intro (_ : r > 0) (_ : 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✝¹ : r > 0
x✝ : p < q
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
⊢ p * r < q * r
Tactic:
have : sgn r ≃ 1 := gt_zero_sgn.mp ‹r > 0›
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✝¹ : r > 0
x✝ : p < q
this : sgn r ≃ 1
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
this : sgn r ≃ 1
⊢ p * r < q * 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✝¹ : r > 0
x✝ : p < q
this✝ : sgn r ≃ 1
this : sgn (p - q) ≃ -1
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
this✝ : sgn r ≃ 1
this : sgn (p - q) ≃ -1
⊢ p * r < q * r
Tactic:
have : sgn (p * r - q * r) ≃ sgn (p - q) :=
  sgn_sub_cancelR_mul_pos ‹sgn 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✝¹ : r > 0
x✝ : p < q
this✝¹ : sgn r ≃ 1
this✝ : sgn (p - q) ≃ -1
this : sgn (p * r - q * r) ≃ sgn (p - q)
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
this✝¹ : sgn r ≃ 1
this✝ : sgn (p - q) ≃ -1
this : sgn (p * r - q * r) ≃ sgn (p - q)
⊢ p * r < q * r
Tactic:
have : sgn (p * r - q * r) ≃ -1 :=
  AA.eqv_substL (Rel.symm this) ‹sgn (p - q) ≃ -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✝¹ : r > 0
x✝ : p < q
this✝² : sgn r ≃ 1
this✝¹ : sgn (p - q) ≃ -1
this✝ : sgn (p * r - q * r) ≃ sgn (p - q)
this : sgn (p * r - q * r) ≃ -1
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
this✝² : sgn r ≃ 1
this✝¹ : sgn (p - q) ≃ -1
this✝ : sgn (p * r - q * r) ≃ sgn (p - q)
this : sgn (p * r - q * r) ≃ -1
⊢ p * r < q * r
Tactic:
have : p * r < q * r := 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 q r : ℚ
x✝¹ : r > 0
x✝ : p < q
this✝³ : sgn r ≃ 1
this✝² : sgn (p - q) ≃ -1
this✝¹ : sgn (p * r - q * r) ≃ sgn (p - q)
this✝ : sgn (p * r - q * r) ≃ -1
this : p * r < q * r
⊢ p * r < q * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_pos
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✝¹ : r > 0
x✝ : p < q
this✝³ : sgn r ≃ 1
this✝² : sgn (p - q) ≃ -1
this✝¹ : sgn (p * r - q * r) ≃ sgn (p - q)
this✝ : sgn (p * r - q * r) ≃ -1
this : p * r < q * r
⊢ p * r < q * r
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substR_mul_pos
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 : ℚ
⊢ r > 0 → p < q → r * p < r * q
Tactic:
intro (_ : r > 0) (_ : 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✝¹ : r > 0
x✝ : p < q
⊢ r * p < r * q
Theorem: Lean4Axiomatic.Rational.lt_substR_mul_pos
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✝¹ : r > 0
x✝ : p < q
⊢ r * p < r * q
Tactic:
calc
  _ ≃ r * p := eqv_refl
  _ ≃ p * r := mul_comm
  _ < q * r := lt_substL_mul_pos ‹r > 0› ‹p < q›
  _ ≃ r * q := mul_comm
Proof state after:
no goals
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_neg
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 : ℚ
⊢ r < 0 → p < q → q * r < p * r
Tactic:
intro (_ : r < 0) (_ : 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✝¹ : r < 0
x✝ : p < q
⊢ q * r < p * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_neg
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✝¹ : r < 0
x✝ : p < q
⊢ q * r < p * r
Tactic:
have : sgn r ≃ -1 := lt_zero_sgn.mp ‹r < 0›
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✝¹ : r < 0
x✝ : p < q
this : sgn r ≃ -1
⊢ q * r < p * r
Theorem: Lean4Axiomatic.Rational.lt_substL_mul_neg
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✝¹ : r < 0
x✝ : p < q
this : sgn r ≃ -1
⊢ 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✝¹ : r < 0
x✝ : p < q
this✝ : sgn r ≃ -1
this : sgn (p - q) ≃ -1
⊢ q * r < p * r