Theorem: zero_mul_eq_zero (meetings/ex5.lean)

State before:
x : ↑N0
⊢ mul (z, x) = z
Tactic:
let A := {x : N0 | mul (z, x) = z}
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
⊢ mul (z, x) = z
Tactic:
have hzmem : z ∈ A := by
  simp only [Set.mem_setOf_eq]
  rw [zmul]
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
⊢ mul (z, x) = z
Tactic:
have hind : (∀ n : N0, n ∈ A → (S n) ∈ A) := by
  intros n hel
  simp only [Set.mem_setOf_eq]
  simp only [Set.mem_setOf_eq] at hel
  rw [smul, hel, zero_plus_x_eq_eq]
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
⊢ mul (z, x) = z
Tactic:
have heq := p3 A ⟨hzmem, hind⟩
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : Subtype.val '' A = N0
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : Subtype.val '' A = N0
⊢ mul (z, x) = z
Tactic:
simp [A, Set.ext_iff] at heq
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : ∀ (x : α), (∃ (x_1 : x ∈ N0), mul (z, { val := x, property := (_ : x ∈ N0) }) = z) ↔ x ∈ N0
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : ∀ (x : α), (∃ (x_1 : x ∈ N0), mul (z, { val := x, property := (_ : x ∈ N0) }) = z) ↔ x ∈ N0
⊢ mul (z, x) = z
Tactic:
specialize heq x
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : (∃ (x_1 : ↑x ∈ N0), mul (z, { val := ↑x, property := (_ : ↑x ∈ N0) }) = z) ↔ ↑x ∈ N0
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : (∃ (x_1 : ↑x ∈ N0), mul (z, { val := ↑x, property := (_ : ↑x ∈ N0) }) = z) ↔ ↑x ∈ N0
⊢ mul (z, x) = z
Tactic:
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : mul (z, x) = z
⊢ mul (z, x) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : mul (z, x) = z
⊢ mul (z, x) = z
Tactic:
exact heq
State after:
no goals

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
⊢ z ∈ A
Tactic:
simp only [Set.mem_setOf_eq]
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
⊢ mul (z, z) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
⊢ mul (z, z) = z
Tactic:
rw [zmul]
State after:
no goals

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
⊢ ∀ n ∈ A, S n ∈ A
Tactic:
intros n hel
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : n ∈ A
⊢ S n ∈ A

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : n ∈ A
⊢ S n ∈ A
Tactic:
simp only [Set.mem_setOf_eq]
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : n ∈ A
⊢ mul (z, S n) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : n ∈ A
⊢ mul (z, S n) = z
Tactic:
simp only [Set.mem_setOf_eq] at hel
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : mul (z, n) = z
⊢ mul (z, S n) = z

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (z, x) = z}
hzmem : z ∈ A
n : ↑N0
hel : mul (z, n) = z
⊢ mul (z, S n) = z
Tactic:
rw [smul, hel, zero_plus_x_eq_eq]
State after:
no goals