internlm/Lean-Github huggingface dataset:
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
⊢ Positive (a * b) → sgn a ≃ sgn b
Tactic:
intro (_ : Positive (a * b))
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
⊢ sgn a ≃ sgn b
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
⊢ sgn a ≃ sgn b
Tactic:
have nws_ab_one : NonzeroWithSign (a * b) 1 :=
  positive_iff_sign_pos1.mp ‹Positive (a * b)›
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
⊢ sgn a ≃ sgn b
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
⊢ sgn a ≃ sgn b
Tactic:
have : sgn a * sgn b ≃ 1 :=
  nonzeroWithSign_sign_inject nws_ab_sgn nws_ab_one
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
this : sgn a * sgn b ≃ 1
⊢ sgn a ≃ sgn b
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
this : sgn a * sgn b ≃ 1
⊢ sgn a ≃ sgn b
Tactic:
have (And.intro _ (_ : sgn a ≃ sgn b)) := mul_sqrt1_eqv.mp this
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝¹ : Sqrt1 (sgn a)
right✝¹ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
this : sgn a * sgn b ≃ 1
left✝ : Sqrt1 (sgn b)
right✝ : sgn a ≃ sgn b
⊢ sgn a ≃ sgn b
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝¹ : Sqrt1 (sgn a)
right✝¹ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : Positive (a * b)
nws_ab_one : NonzeroWithSign (a * b) 1
this : sgn a * sgn b ≃ 1
left✝ : Sqrt1 (sgn b)
right✝ : sgn a ≃ sgn b
⊢ sgn a ≃ sgn b
Tactic:
exact ‹sgn a ≃ sgn b›
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
⊢ sgn a ≃ sgn b → Positive (a * b)
Tactic:
intro (_ : sgn a ≃ sgn b)
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
⊢ Positive (a * b)
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
⊢ Positive (a * b)
Tactic:
have : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b :=
  And.intro ‹Sqrt1 (sgn b)› ‹sgn a ≃ sgn b›
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
⊢ Positive (a * b)
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
⊢ Positive (a * b)
Tactic:
have : sgn a * sgn b ≃ 1 := mul_sqrt1_eqv.mpr this
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝ : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this : sgn a * sgn b ≃ 1
⊢ Positive (a * b)
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝ : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this : sgn a * sgn b ≃ 1
⊢ Positive (a * b)
Tactic:
have : NonzeroWithSign (a * b) 1 :=
  NonzeroWithSign.subst_sign ‹sgn a * sgn b ≃ 1› nws_ab_sgn
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝¹ : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this✝ : sgn a * sgn b ≃ 1
this : NonzeroWithSign (a * b) 1
⊢ Positive (a * b)
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝¹ : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this✝ : sgn a * sgn b ≃ 1
this : NonzeroWithSign (a * b) 1
⊢ Positive (a * b)
Tactic:
have : Positive (a * b) := positive_iff_sign_pos1.mpr this
Proof state after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝² : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this✝¹ : sgn a * sgn b ≃ 1
this✝ : NonzeroWithSign (a * b) 1
this : Positive (a * b)
⊢ Positive (a * b)
Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv
Proof state before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a b : ℤ
inst✝ : Nonzero (a * b)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
nws_ab_sgn : NonzeroWithSign (a * b) (sgn a * sgn b)
x✝ : sgn a ≃ sgn b
this✝² : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b
this✝¹ : sgn a * sgn b ≃ 1
this✝ : NonzeroWithSign (a * b) 1
this : Positive (a * b)
⊢ Positive (a * b)
Tactic:
exact this
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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)
Proof 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
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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›
Proof 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
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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)›
Proof 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
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof 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
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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)
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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)›
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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›
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof 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)
Theorem: Lean4Axiomatic.Integer.negative_mul_iff_sgn_neqv
Proof 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
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
have : a * b ≃ 0 ∨ Nonzero (a * b) := (zero? (a * b)).left
Proof state after:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this : a * b ≃ 0 ∨ Nonzero (a * b)
⊢ sgn (a * b) ≃ sgn a * sgn b
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this : a * b ≃ 0 ∨ Nonzero (a * b)
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
match this with
| Or.inl (_ : a * b ≃ 0) =>
  have : a ≃ 0 ∨ b ≃ 0 := mul_split_zero.mp ‹a * b ≃ 0›
  match this with
  | Or.inl (_ : a ≃ 0) =>
    calc
      sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
      0             ≃ _ := Rel.symm AA.absorbL
      0 * sgn b     ≃ _ := AA.substL (Rel.symm (sgn_zero.mp ‹a ≃ 0›))
      sgn a * sgn b ≃ _ := Rel.refl
  | Or.inr (_ : b ≃ 0) =>
    calc
      sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
      0             ≃ _ := Rel.symm AA.absorbR
      sgn a * 0     ≃ _ := AA.substR (Rel.symm (sgn_zero.mp ‹b ≃ 0›))
      sgn a * sgn b ≃ _ := Rel.refl
| Or.inr (_ : Nonzero (a * b)) =>
  have (And.intro (_ : Sqrt1 (sgn a)) (_ : Sqrt1 (sgn b))) :=
    sqrt1_sgn_split_nonzero_mul ‹Nonzero (a * b)›
  have : Positive (a * b) ∨ Negative (a * b) :=
    nonzero_iff_pos_or_neg.mp ‹Nonzero (a * b)›
  match this with
  | Or.inl (_ : Positive (a * b)) =>
    have : sgn a ≃ sgn b := positive_mul_iff_sgn_eqv.mp ‹Positive (a * b)›
    have : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b := And.intro ‹Sqrt1 (sgn b)› this
    calc
      sgn (a * b)   ≃ _ := sgn_positive.mp ‹Positive (a * b)›
      1             ≃ _ := Rel.symm (mul_sqrt1_eqv.mpr this)
      sgn a * sgn b ≃ _ := Rel.refl
  | Or.inr (_ : Negative (a * b)) =>
    have : sgn a ≄ sgn b := negative_mul_iff_sgn_neqv.mp ‹Negative (a * b)›
    calc
      sgn (a * b)   ≃ _ := sgn_negative.mp ‹Negative (a * b)›
      (-1)          ≃ _ := Rel.symm (mul_sqrt1_neqv.mpr ‹sgn a ≄ sgn b›)
      sgn a * sgn b ≃ _ := Rel.refl
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this : a * b ≃ 0 ∨ Nonzero (a * b)
h✝ : a * b ≃ 0
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
have : a ≃ 0 ∨ b ≃ 0 := mul_split_zero.mp ‹a * b ≃ 0›
Proof state after:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this✝ : a * b ≃ 0 ∨ Nonzero (a * b)
h✝ : a * b ≃ 0
this : a ≃ 0 ∨ b ≃ 0
⊢ sgn (a * b) ≃ sgn a * sgn b
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this✝ : a * b ≃ 0 ∨ Nonzero (a * b)
h✝ : a * b ≃ 0
this : a ≃ 0 ∨ b ≃ 0
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
match this with
| Or.inl (_ : a ≃ 0) =>
  calc
    sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
    0             ≃ _ := Rel.symm AA.absorbL
    0 * sgn b     ≃ _ := AA.substL (Rel.symm (sgn_zero.mp ‹a ≃ 0›))
    sgn a * sgn b ≃ _ := Rel.refl
| Or.inr (_ : b ≃ 0) =>
  calc
    sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
    0             ≃ _ := Rel.symm AA.absorbR
    sgn a * 0     ≃ _ := AA.substR (Rel.symm (sgn_zero.mp ‹b ≃ 0›))
    sgn a * sgn b ≃ _ := Rel.refl
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this✝ : a * b ≃ 0 ∨ Nonzero (a * b)
h✝¹ : a * b ≃ 0
this : a ≃ 0 ∨ b ≃ 0
h✝ : a ≃ 0
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
calc
  sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
  0             ≃ _ := Rel.symm AA.absorbL
  0 * sgn b     ≃ _ := AA.substL (Rel.symm (sgn_zero.mp ‹a ≃ 0›))
  sgn a * sgn b ≃ _ := Rel.refl
Proof state after:
no goals
Theorem: Lean4Axiomatic.Integer.sgn_compat_mul
Proof state before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
this✝ : a * b ≃ 0 ∨ Nonzero (a * b)
h✝¹ : a * b ≃ 0
this : a ≃ 0 ∨ b ≃ 0
h✝ : b ≃ 0
⊢ sgn (a * b) ≃ sgn a * sgn b
Tactic:
calc
  sgn (a * b)   ≃ _ := sgn_zero.mp ‹a * b ≃ 0›
  0             ≃ _ := Rel.symm AA.absorbR
  sgn a * 0     ≃ _ := AA.substR (Rel.symm (sgn_zero.mp ‹b ≃ 0›))
  sgn a * sgn b ≃ _ := Rel.refl
Proof state after:
no goals