Theorem: succ_zero_mul_eq_self (meetings/ex5.lean)

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

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

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (S z, x) = x}
hzmem : z ∈ A
⊢ mul (S z, x) = x
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, splus, zplus]
State after:
x : ↑N0
A : Set ↑N0 := {x | mul (S z, x) = x}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
⊢ mul (S z, x) = x

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

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

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

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

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

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

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

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

State before:
x : ↑N0
A : Set ↑N0 := {x | mul (S z, x) = x}
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 (S z, x) = x}
hzmem : z ∈ A
n : ↑N0
hel : n ∈ A
⊢ mul (S z, S n) = S n

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

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