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

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : sgn a ≃ 1 ∨ sgn a ≃ -1 := sqrt1_cases.mp ‹Sqrt1 (sgn a)›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this : sgn a ≃ 1 ∨ sgn a ≃ -1
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this : sgn a ≃ 1 ∨ sgn a ≃ -1
⊢ NonzeroWithSign a (sgn a)
Tactic:
match this with
| Or.inl (_ : sgn a ≃ 1) =>
  have : Positive a := sgn_positive.mpr ‹sgn a ≃ 1›
  have : NonzeroWithSign a 1 := positive_iff_sign_pos1.mp this
  have : NonzeroWithSign a (sgn a) :=
    NonzeroWithSign.subst_sign (Rel.symm ‹sgn a ≃ 1›) this
  exact this
| Or.inr (_ : sgn a ≃ -1) =>
  have : Negative a := sgn_negative.mpr ‹sgn a ≃ -1›
  have : NonzeroWithSign a (-1) := negative_iff_sign_neg1.mp this
  have : NonzeroWithSign a (sgn a) :=
    NonzeroWithSign.subst_sign (Rel.symm ‹sgn a ≃ -1›) this
  exact this
State after:
no goals

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : Positive a := sgn_positive.mpr ‹sgn a ≃ 1›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this : Positive a
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this : Positive a
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : NonzeroWithSign a 1 := positive_iff_sign_pos1.mp this
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝¹ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this✝ : Positive a
this : NonzeroWithSign a 1
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝¹ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this✝ : Positive a
this : NonzeroWithSign a 1
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : NonzeroWithSign a (sgn a) :=
  NonzeroWithSign.subst_sign (Rel.symm ‹sgn a ≃ 1›) this
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝² : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this✝¹ : Positive a
this✝ : NonzeroWithSign a 1
this : NonzeroWithSign a (sgn a)
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝² : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ 1
this✝¹ : Positive a
this✝ : NonzeroWithSign a 1
this : NonzeroWithSign a (sgn a)
⊢ NonzeroWithSign a (sgn a)
Tactic:
exact this
State after:
no goals

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : Negative a := sgn_negative.mpr ‹sgn a ≃ -1›
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this : Negative a
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this : Negative a
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : NonzeroWithSign a (-1) := negative_iff_sign_neg1.mp this
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝¹ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this✝ : Negative a
this : NonzeroWithSign a (-1)
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝¹ : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this✝ : Negative a
this : NonzeroWithSign a (-1)
⊢ NonzeroWithSign a (sgn a)
Tactic:
have : NonzeroWithSign a (sgn a) :=
  NonzeroWithSign.subst_sign (Rel.symm ‹sgn a ≃ -1›) this
State after:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝² : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this✝¹ : Negative a
this✝ : NonzeroWithSign a (-1)
this : NonzeroWithSign a (sgn a)
⊢ NonzeroWithSign a (sgn a)

State before:
ℕ : Type
inst✝⁶ : Natural ℕ
ℤ : Type
inst✝⁵ : Core ℤ
inst✝⁴ : Addition ℤ
inst✝³ : Multiplication ℤ
inst✝² : Negation ℤ
inst✝¹ : Sign ℤ
a : ℤ
inst✝ : Sqrt1 (sgn a)
this✝² : sgn a ≃ 1 ∨ sgn a ≃ -1
h✝ : sgn a ≃ -1
this✝¹ : Negative a
this✝ : NonzeroWithSign a (-1)
this : NonzeroWithSign a (sgn a)
⊢ NonzeroWithSign a (sgn a)
Tactic:
exact this
State after:
no goals