Theorem: Lean4Axiomatic.Integer.positive_mul_iff_sgn_eqv (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)
⊢ Positive (a * b) ↔ sgn a ≃ sgn 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)
left✝ : Sqrt1 (sgn a)
right✝ : Sqrt1 (sgn b)
⊢ Positive (a * b) ↔ sgn a ≃ sgn b

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)
⊢ Positive (a * b) ↔ sgn a ≃ sgn b
Tactic:
have nws_ab_sgn : 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)
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

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:
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)
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

case mpr
ℕ : 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)

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:
case mp =>
  intro (_ : Positive (a * b))
  show sgn a ≃ sgn b
  have nws_ab_one : NonzeroWithSign (a * b) 1 :=
    positive_iff_sign_pos1.mp ‹Positive (a * b)›
  have : sgn a * sgn b ≃ 1 :=
    nonzeroWithSign_sign_inject nws_ab_sgn nws_ab_one
  have (And.intro _ (_ : sgn a ≃ sgn b)) := mul_sqrt1_eqv.mp this
  exact ‹sgn a ≃ sgn b›
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)
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:
case mpr =>
  intro (_ : sgn a ≃ sgn b)
  show Positive (a * b)
  have : Sqrt1 (sgn b) ∧ sgn a ≃ sgn b :=
    And.intro ‹Sqrt1 (sgn b)› ‹sgn a ≃ sgn b›
  have : sgn a * sgn b ≃ 1 := mul_sqrt1_eqv.mpr this
  have : NonzeroWithSign (a * b) 1 :=
    NonzeroWithSign.subst_sign ‹sgn a * sgn b ≃ 1› nws_ab_sgn
  have : Positive (a * b) := positive_iff_sign_pos1.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)
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))
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

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)›
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

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
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

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
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

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›
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)
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)
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)

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›
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)

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
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)

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
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)

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
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)

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
State after:
no goals