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

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
⊢ a * b ≃ 0 ↔ a ≃ 0 ∨ b ≃ 0
Tactic:
apply Iff.intro
State after:
case mp
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
⊢ a * b ≃ 0 → a ≃ 0 ∨ b ≃ 0

case mpr
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
⊢ a ≃ 0 ∨ b ≃ 0 → a * b ≃ 0

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
⊢ a ≃ 0 ∨ b ≃ 0 → a * b ≃ 0
Tactic:
case mpr =>
  intro (_ : a ≃ 0 ∨ b ≃ 0)
  show a * b ≃ 0
  match ‹a ≃ 0 ∨ b ≃ 0› with
  | Or.inl (_ : a ≃ 0) => calc
    a * b ≃ _ := AA.substL ‹a ≃ 0›
    0 * b ≃ _ := AA.absorbL
    0     ≃ _ := Rel.refl
  | Or.inr (_ : b ≃ 0) => calc
    a * b ≃ _ := AA.substR ‹b ≃ 0›
    a * 0 ≃ _ := AA.absorbR
    0     ≃ _ := Rel.refl
State after:
no goals

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

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
⊢ a ≃ 0 ∨ b ≃ 0
Tactic:
have : a ≃ 0 ∨ Nonzero a := (zero? a).left
State after:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this : a ≃ 0 ∨ Nonzero a
⊢ a ≃ 0 ∨ b ≃ 0

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this : a ≃ 0 ∨ Nonzero a
h✝ : a ≃ 0
⊢ a ≃ 0 ∨ b ≃ 0
Tactic:
exact Or.inl ‹a ≃ 0›
State after:
no goals

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this : a ≃ 0 ∨ Nonzero a
h✝ : Nonzero a
⊢ a ≃ 0 ∨ b ≃ 0
Tactic:
have : b ≃ 0 ∨ Nonzero b := (zero? b).left
State after:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝ : a ≃ 0 ∨ Nonzero a
h✝ : Nonzero a
this : b ≃ 0 ∨ Nonzero b
⊢ a ≃ 0 ∨ b ≃ 0

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this : b ≃ 0 ∨ Nonzero b
h✝ : b ≃ 0
⊢ a ≃ 0 ∨ b ≃ 0
Tactic:
exact Or.inr ‹b ≃ 0›
State after:
no goals

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
⊢ a ≃ 0 ∨ b ≃ 0
Tactic:
apply False.elim
State after:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
⊢ False

State before:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
⊢ False
Tactic:
have : ¬ (a * b ≃ 0 ∧ Nonzero (a * b)) := (zero? (a * b)).right
State after:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ False

State before:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ False
Tactic:
apply this
State after:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ a * b ≃ 0 ∧ Nonzero (a * b)

State before:
case h
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ a * b ≃ 0 ∧ Nonzero (a * b)
Tactic:
apply And.intro
State after:
case h.left
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ a * b ≃ 0

case h.right
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ Nonzero (a * b)

State before:
case h.left
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ a * b ≃ 0
Tactic:
exact ‹a * b ≃ 0›
State after:
no goals

State before:
case h.right
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a * b ≃ 0
this✝¹ : a ≃ 0 ∨ Nonzero a
h✝¹ : Nonzero a
this✝ : b ≃ 0 ∨ Nonzero b
h✝ : Nonzero b
this : ¬(a * b ≃ 0 ∧ Nonzero (a * b))
⊢ Nonzero (a * b)
Tactic:
exact mul_preserves_nonzero ‹Nonzero a› ‹Nonzero b›
State after:
no goals

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

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a ≃ 0 ∨ b ≃ 0
⊢ a * b ≃ 0
Tactic:
match ‹a ≃ 0 ∨ b ≃ 0› with
| Or.inl (_ : a ≃ 0) => calc
  a * b ≃ _ := AA.substL ‹a ≃ 0›
  0 * b ≃ _ := AA.absorbL
  0     ≃ _ := Rel.refl
| Or.inr (_ : b ≃ 0) => calc
  a * b ≃ _ := AA.substR ‹b ≃ 0›
  a * 0 ≃ _ := AA.absorbR
  0     ≃ _ := Rel.refl
State after:
no goals

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a ≃ 0 ∨ b ≃ 0
h✝ : a ≃ 0
⊢ a * b ≃ 0
Tactic:
calc
a * b ≃ _ := AA.substL ‹a ≃ 0›
0 * b ≃ _ := AA.absorbL
0     ≃ _ := Rel.refl
State after:
no goals

State before:
ℕ : Type
inst✝⁵ : Natural ℕ
ℤ : Type
inst✝⁴ : Core ℤ
inst✝³ : Addition ℤ
inst✝² : Multiplication ℤ
inst✝¹ : Negation ℤ
inst✝ : Sign ℤ
a b : ℤ
x✝ : a ≃ 0 ∨ b ≃ 0
h✝ : b ≃ 0
⊢ a * b ≃ 0
Tactic:
calc
a * b ≃ _ := AA.substR ‹b ≃ 0›
a * 0 ≃ _ := AA.absorbR
0     ≃ _ := Rel.refl
State after:
no goals