Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv (Lean4Axiomatic/Integer/Sign.lean)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ Negative (a * b) ↔ sgn a ≄ sgn b
Tactic:
apply Iff.intro
State after:
case mp
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ Negative (a * b) → sgn a ≄ sgn b

case mpr
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ sgn a ≄ sgn b → Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ Negative (a * b) → sgn a ≄ sgn b
Tactic:
case mp =>
  intro (_ : Negative (a * b)) (_ : sgn a ≃ sgn b)
  show False
  have : Positive (a * b) := positive_mul_iff_sgn_eqv.mpr ‹sgn a ≃ sgn b›
  have both : Positive (a * b) ∧ Negative (a * b) :=
    And.intro this ‹Negative (a * b)›
  have not_both : ¬(Positive (a * b) ∧ Negative (a * b)) :=
    not_positive_and_negative
  exact absurd both not_both
State after:
no goals

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ sgn a ≄ sgn b → Negative (a * b)
Tactic:
case mpr =>
  intro (_ : sgn a ≄ sgn b)
  show Negative (a * b)
  have (And.intro (_ : Sqrt1 (sgn a)) (_ : Sqrt1 (sgn b))) :=
    sqrt1_sgn_split_nonzero_mul ‹Nonzero (a * b)›
  have nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b) :=
    nonzeroWithSign_mul_from_sqrt1_sgn
  have : sgn a * sgn b ≃ -1 := mul_sqrt1_neqv.mpr ‹sgn a ≄ sgn b›
  have : NonzeroWithSign (a * b) (-1) :=
    NonzeroWithSign.subst_sign this nws_ab
  have : Negative (a * b) := negative_iff_sign_neg1.mpr this
  exact this
State after:
no goals

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ Negative (a * b) → sgn a ≄ sgn b
Tactic:
intro (_ : Negative (a * b)) (_ : sgn a ≃ sgn b)
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
⊢ False

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
⊢ False
Tactic:
have : Positive (a * b) := positive_mul_iff_sgn_eqv.mpr ‹sgn a ≃ sgn b›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
⊢ False

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
⊢ False
Tactic:
have both : Positive (a * b) ∧ Negative (a * b) :=
  And.intro this ‹Negative (a * b)›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
both : Positive (a * b) ∧ Negative (a * b)
⊢ False

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
both : Positive (a * b) ∧ Negative (a * b)
⊢ False
Tactic:
have not_both : ¬(Positive (a * b) ∧ Negative (a * b)) :=
  not_positive_and_negative
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
both : Positive (a * b) ∧ Negative (a * b)
not_both : ¬(Positive (a * b) ∧ Negative (a * b))
⊢ False

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝¹ : Negative (a * b)
x✝ : sgn a ≃ sgn b
this : Positive (a * b)
both : Positive (a * b) ∧ Negative (a * b)
not_both : ¬(Positive (a * b) ∧ Negative (a * b))
⊢ False
Tactic:
exact absurd both not_both
State after:
no goals

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
⊢ sgn a ≄ sgn b → Negative (a * b)
Tactic:
intro (_ : sgn a ≄ sgn b)
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
⊢ Negative (a * b)
Tactic:
have (And.intro (_ : Sqrt1 (sgn a)) (_ : Sqrt1 (sgn b))) :=
  sqrt1_sgn_split_nonzero_mul ‹Nonzero (a * b)›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
⊢ Negative (a * b)
Tactic:
have nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b) :=
  nonzeroWithSign_mul_from_sqrt1_sgn
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
⊢ Negative (a * b)
Tactic:
have : sgn a * sgn b ≃ -1 := mul_sqrt1_neqv.mpr ‹sgn a ≄ sgn b›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this : sgn a * sgn b ≃ -1
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this : sgn a * sgn b ≃ -1
⊢ Negative (a * b)
Tactic:
have : NonzeroWithSign (a * b) (-1) :=
  NonzeroWithSign.subst_sign this nws_ab
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this✝ : sgn a * sgn b ≃ -1
this : NonzeroWithSign (a * b) (-1)
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this✝ : sgn a * sgn b ≃ -1
this : NonzeroWithSign (a * b) (-1)
⊢ Negative (a * b)
Tactic:
have : Negative (a * b) := negative_iff_sign_neg1.mpr this
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this✝¹ : sgn a * sgn b ≃ -1
this✝ : NonzeroWithSign (a * b) (-1)
this : Negative (a * b)
⊢ Negative (a * b)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
x✝ : sgn a ≄ sgn b
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab : NonzeroWithSign (a * b) (sgn a * sgn b)
this✝¹ : sgn a * sgn b ≃ -1
this✝ : NonzeroWithSign (a * b) (-1)
this : Negative (a * b)
⊢ Negative (a * b)
Tactic:
exact this
State after:
no goals