Theorem: zero_plus_x_eq_eq (meetings/ex5.lean)

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

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

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

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

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

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

State before:
x : ↑N0
A : Set ↑N0 := {b | plus (z, b) = b}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq :
  (∃ (x_1 : ↑x ∈ N0), plus (z, { val := ↑x, property := (_ : ↑x ∈ N0) }) = { val := ↑x, property := (_ : ↑x ∈ N0) }) ↔
    ↑x ∈ N0
⊢ plus (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 := {b | plus (z, b) = b}
hzmem : z ∈ A
hind : ∀ n ∈ A, S n ∈ A
heq : plus (z, x) = x
⊢ plus (z, x) = x

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

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

State before:
x : ↑N0
A : Set ↑N0 := {b | plus (z, b) = b}
⊢ plus (z, z) = z
Tactic:
exact zplus z
State after:
no goals

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

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

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

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