Theorem: Lean4Axiomatic.Rational.mul_sgn_self_max (Lean4Axiomatic/Rational/Order.lean)

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 : ℚ
⊢ p * from_integer (sgn q) ≤ p * from_integer (sgn p)
Tactic:
apply le_sgn.mpr
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 : ℚ
⊢ sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≄ 1

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 : ℚ
⊢ sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≄ 1
Tactic:
intro (_ : sgn (p * sgn q - p * sgn p) ≃ 1)
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
⊢ False
Tactic:
have : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * sgn q - p * sgn p) := calc
  sgn (sgn q - sgn p) * sgn p
    ≃ _ := AA.comm
  sgn p * sgn (sgn q - sgn p)
    ≃ _ := AA.substR (Rel.symm sgn_from_integer)
  sgn p * sgn ((sgn q - sgn p : ℤ) : ℚ)
    ≃ _ := Rel.symm sgn_compat_mul
  sgn (p * ((sgn q - sgn p : ℤ) : ℚ))
    ≃ _ := sgn_subst (mul_substR sub_compat_from_integer)
  sgn (p * ((sgn q : ℚ) - (sgn p : ℚ)))
    ≃ _ := sgn_subst mul_distribL_sub
  sgn (p * sgn q - p * sgn p)
    ≃ _ := Rel.refl
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
⊢ False
Tactic:
have : sgn (sgn q - sgn p) * sgn p ≃ 1 :=
  Rel.trans this ‹sgn (p * sgn q - p * sgn p) ≃ 1›
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this : sgn (sgn q - sgn p) * sgn p ≃ 1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this : sgn (sgn q - sgn p) * sgn p ≃ 1
⊢ False
Tactic:
have sqrt1_and_eqv := Integer.mul_sqrt1_eqv.mp this
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
⊢ False
Tactic:
have : Integer.Sqrt1 (sgn p) := sqrt1_and_eqv.left
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝¹ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this : Integer.Sqrt1 (sgn p)
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝¹ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this : Integer.Sqrt1 (sgn p)
⊢ False
Tactic:
have : sgn (sgn q - sgn p) ≃ sgn p := sqrt1_and_eqv.right
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝² : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝¹ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝ : Integer.Sqrt1 (sgn p)
this : sgn (sgn q - sgn p) ≃ sgn p
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝² : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝¹ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝ : Integer.Sqrt1 (sgn p)
this : sgn (sgn q - sgn p) ≃ sgn p
⊢ False
Tactic:
have : sgn p ≃ 1 ∨ sgn p ≃ -1 :=
  Integer.sqrt1_cases.mp ‹Integer.Sqrt1 (sgn p)›
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝² : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : Integer.Sqrt1 (sgn p)
this✝ : sgn (sgn q - sgn p) ≃ sgn p
this : sgn p ≃ 1 ∨ sgn p ≃ -1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝² : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : Integer.Sqrt1 (sgn p)
this✝ : sgn (sgn q - sgn p) ≃ sgn p
this : sgn p ≃ 1 ∨ sgn p ≃ -1
⊢ False
Tactic:
match this with
| Or.inl (_ : sgn p ≃ 1) =>
  have : 1 ≃ sgn p := Rel.symm ‹sgn p ≃ 1›
  have : sgn (sgn q - 1) ≃ 1 := calc
    sgn (sgn q - 1)     ≃ _ := Integer.sgn_subst (Integer.sub_substR this)
    sgn (sgn q - sgn p) ≃ _ := ‹sgn (sgn q - sgn p) ≃ sgn p›
    sgn p               ≃ _ := ‹sgn p ≃ 1›
    1                   ≃ _ := Rel.refl
  have : sgn q > 1 := Integer.gt_sgn.mpr this
  have : sgn q ≤ 1 := sgn_max
  exact Integer.le_gt_false this ‹sgn q > 1›
| Or.inr (_ : sgn p ≃ -1) =>
  have : -1 ≃ sgn p := Rel.symm ‹sgn p ≃ -1›
  have : sgn (sgn q - (-1)) ≃ -1 := calc
    sgn (sgn q - (-1))  ≃ _ := Integer.sgn_subst (Integer.sub_substR this)
    sgn (sgn q - sgn p) ≃ _ := ‹sgn (sgn q - sgn p) ≃ sgn p›
    sgn p               ≃ _ := ‹sgn p ≃ -1›
    (-1)                ≃ _ := Rel.refl
  have : sgn q < -1 := Integer.lt_sgn.mpr this
  have : sgn q ≥ -1 := sgn_min
  exact Integer.lt_ge_false ‹sgn q < -1› this
State after:
no goals

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝² : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : Integer.Sqrt1 (sgn p)
this✝ : sgn (sgn q - sgn p) ≃ sgn p
this : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
⊢ False
Tactic:
have : 1 ≃ sgn p := Rel.symm ‹sgn p ≃ 1›
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝² : Integer.Sqrt1 (sgn p)
this✝¹ : sgn (sgn q - sgn p) ≃ sgn p
this✝ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this : 1 ≃ sgn p
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝² : Integer.Sqrt1 (sgn p)
this✝¹ : sgn (sgn q - sgn p) ≃ sgn p
this✝ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this : 1 ≃ sgn p
⊢ False
Tactic:
have : sgn (sgn q - 1) ≃ 1 := calc
  sgn (sgn q - 1)     ≃ _ := Integer.sgn_subst (Integer.sub_substR this)
  sgn (sgn q - sgn p) ≃ _ := ‹sgn (sgn q - sgn p) ≃ sgn p›
  sgn p               ≃ _ := ‹sgn p ≃ 1›
  1                   ≃ _ := Rel.refl
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝³ : Integer.Sqrt1 (sgn p)
this✝² : sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝ : 1 ≃ sgn p
this : sgn (sgn q - 1) ≃ 1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝³ : Integer.Sqrt1 (sgn p)
this✝² : sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝ : 1 ≃ sgn p
this : sgn (sgn q - 1) ≃ 1
⊢ False
Tactic:
have : sgn q > 1 := Integer.gt_sgn.mpr this
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁴ : Integer.Sqrt1 (sgn p)
this✝³ : sgn (sgn q - sgn p) ≃ sgn p
this✝² : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝¹ : 1 ≃ sgn p
this✝ : sgn (sgn q - 1) ≃ 1
this : sgn q > 1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁴ : Integer.Sqrt1 (sgn p)
this✝³ : sgn (sgn q - sgn p) ≃ sgn p
this✝² : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝¹ : 1 ≃ sgn p
this✝ : sgn (sgn q - 1) ≃ 1
this : sgn q > 1
⊢ False
Tactic:
have : sgn q ≤ 1 := sgn_max
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁷ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁵ : Integer.Sqrt1 (sgn p)
this✝⁴ : sgn (sgn q - sgn p) ≃ sgn p
this✝³ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝² : 1 ≃ sgn p
this✝¹ : sgn (sgn q - 1) ≃ 1
this✝ : sgn q > 1
this : sgn q ≤ 1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁷ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁵ : Integer.Sqrt1 (sgn p)
this✝⁴ : sgn (sgn q - sgn p) ≃ sgn p
this✝³ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ 1
this✝² : 1 ≃ sgn p
this✝¹ : sgn (sgn q - 1) ≃ 1
this✝ : sgn q > 1
this : sgn q ≤ 1
⊢ False
Tactic:
exact Integer.le_gt_false this ‹sgn q > 1›
State after:
no goals

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝² : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : Integer.Sqrt1 (sgn p)
this✝ : sgn (sgn q - sgn p) ≃ sgn p
this : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
⊢ False
Tactic:
have : -1 ≃ sgn p := Rel.symm ‹sgn p ≃ -1›
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝² : Integer.Sqrt1 (sgn p)
this✝¹ : sgn (sgn q - sgn p) ≃ sgn p
this✝ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this : -1 ≃ sgn p
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝³ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝² : Integer.Sqrt1 (sgn p)
this✝¹ : sgn (sgn q - sgn p) ≃ sgn p
this✝ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this : -1 ≃ sgn p
⊢ False
Tactic:
have : sgn (sgn q - (-1)) ≃ -1 := calc
  sgn (sgn q - (-1))  ≃ _ := Integer.sgn_subst (Integer.sub_substR this)
  sgn (sgn q - sgn p) ≃ _ := ‹sgn (sgn q - sgn p) ≃ sgn p›
  sgn p               ≃ _ := ‹sgn p ≃ -1›
  (-1)                ≃ _ := Rel.refl
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝³ : Integer.Sqrt1 (sgn p)
this✝² : sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝ : -1 ≃ sgn p
this : sgn (sgn q - -1) ≃ -1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁴ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝³ : Integer.Sqrt1 (sgn p)
this✝² : sgn (sgn q - sgn p) ≃ sgn p
this✝¹ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝ : -1 ≃ sgn p
this : sgn (sgn q - -1) ≃ -1
⊢ False
Tactic:
have : sgn q < -1 := Integer.lt_sgn.mpr this
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁴ : Integer.Sqrt1 (sgn p)
this✝³ : sgn (sgn q - sgn p) ≃ sgn p
this✝² : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝¹ : -1 ≃ sgn p
this✝ : sgn (sgn q - -1) ≃ -1
this : sgn q < -1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁵ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁴ : Integer.Sqrt1 (sgn p)
this✝³ : sgn (sgn q - sgn p) ≃ sgn p
this✝² : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝¹ : -1 ≃ sgn p
this✝ : sgn (sgn q - -1) ≃ -1
this : sgn q < -1
⊢ False
Tactic:
have : sgn q ≥ -1 := sgn_min
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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁷ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁵ : Integer.Sqrt1 (sgn p)
this✝⁴ : sgn (sgn q - sgn p) ≃ sgn p
this✝³ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝² : -1 ≃ sgn p
this✝¹ : sgn (sgn q - -1) ≃ -1
this✝ : sgn q < -1
this : sgn q ≥ -1
⊢ False

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 : ℚ
x✝ : sgn (p * from_integer (sgn q) - p * from_integer (sgn p)) ≃ 1
this✝⁷ : sgn (sgn q - sgn p) * sgn p ≃ sgn (p * from_integer (sgn q) - p * from_integer (sgn p))
this✝⁶ : sgn (sgn q - sgn p) * sgn p ≃ 1
sqrt1_and_eqv : Integer.Sqrt1 (sgn p) ∧ sgn (sgn q - sgn p) ≃ sgn p
this✝⁵ : Integer.Sqrt1 (sgn p)
this✝⁴ : sgn (sgn q - sgn p) ≃ sgn p
this✝³ : sgn p ≃ 1 ∨ sgn p ≃ -1
h✝ : sgn p ≃ -1
this✝² : -1 ≃ sgn p
this✝¹ : sgn (sgn q - -1) ≃ -1
this✝ : sgn q < -1
this : sgn q ≥ -1
⊢ False
Tactic:
exact Integer.lt_ge_false ‹sgn q < -1› this
State after:
no goals