url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_plus_x_eq_eq
[300, 1]
[317, 12]
simp only [Set.mem_setOf_eq] at hel
x : ↑N0 A : Set ↑N0 := {b | plus (z, b) = b} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ plus (z, S n) = S n
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_plus_x_eq_eq
[300, 1]
[317, 12]
rw [splus, hel]
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
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
let A := {y : N0 | plus ((S x), y) = S (plus (x, y))}
x y : ↑N0 ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] simp [zplus]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
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, ←splus]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
have heq := p3 A ⟨hzmem, hind⟩
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp [A, Set.ext_iff] at heq
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x_1 : Ξ±), (βˆƒ (x_2 : x_1 ∈ N0), plus (S x, { val := x_1, property := (_ : x_1 ∈ N0) }) = S (plus (x, { val := x_1, property := (_ : x_1 ∈ N0) }))) ↔ x_1 ∈ N0 ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
specialize heq y
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x_1 : Ξ±), (βˆƒ (x_2 : x_1 ∈ N0), plus (S x, { val := x_1, property := (_ : x_1 ∈ N0) }) = S (plus (x, { val := x_1, property := (_ : x_1 ∈ N0) }))) ↔ x_1 ∈ N0 ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑y ∈ N0), plus (S x, { val := ↑y, property := (_ : ↑y ∈ N0) }) = S (plus (x, { val := ↑y, property := (_ : ↑y ∈ N0) }))) ↔ ↑y ∈ N0 ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑y ∈ N0), plus (S x, { val := ↑y, property := (_ : ↑y ∈ N0) }) = S (plus (x, { val := ↑y, property := (_ : ↑y ∈ N0) }))) ↔ ↑y ∈ N0 ⊒ plus (S x, y) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : plus (S x, y) = S (plus (x, y)) ⊒ plus (S x, y) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
exact heq
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : plus (S x, y) = S (plus (x, y)) ⊒ plus (S x, y) = S (plus (x, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp only [Set.mem_setOf_eq]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} ⊒ z ∈ A
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} ⊒ plus (S x, z) = S (plus (x, z))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp [zplus]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} ⊒ plus (S x, z) = S (plus (x, z))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
intros n hel
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp only [Set.mem_setOf_eq]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ plus (S x, S n) = S (plus (x, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
simp only [Set.mem_setOf_eq] at hel
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ plus (S x, S n) = S (plus (x, S n))
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : plus (S x, n) = S (plus (x, n)) ⊒ plus (S x, S n) = S (plus (x, S n))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_eq_succ_plus
[321, 1]
[338, 12]
rw [splus, hel, ←splus]
x y : ↑N0 A : Set ↑N0 := {y | plus (S x, y) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : plus (S x, n) = S (plus (x, n)) ⊒ plus (S x, S n) = S (plus (x, S n))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
let A := {x : N0 | plus ((S y), x) = S (plus (x, y))}
x y : ↑N0 ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] rw [zplus, zero_plus_x_eq_eq]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
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, succ_plus_eq_succ_plus]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
have heq := p3 A ⟨hzmem, hind⟩
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
simp [A, Set.ext_iff] at heq
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), plus (S y, { val := x, property := (_ : x ∈ N0) }) = S (plus ({ val := x, property := (_ : x ∈ N0) }, y))) ↔ x ∈ N0 ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
specialize heq x
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), plus (S y, { val := x, property := (_ : x ∈ N0) }) = S (plus ({ val := x, property := (_ : x ∈ N0) }, y))) ↔ x ∈ N0 ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), plus (S y, { val := ↑x, property := (_ : ↑x ∈ N0) }) = S (plus ({ val := ↑x, property := (_ : ↑x ∈ N0) }, y))) ↔ ↑x ∈ N0 ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), plus (S y, { val := ↑x, property := (_ : ↑x ∈ N0) }) = S (plus ({ val := ↑x, property := (_ : ↑x ∈ N0) }, y))) ↔ ↑x ∈ N0 ⊒ plus (S y, x) = S (plus (x, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : plus (S y, x) = S (plus (x, y)) ⊒ plus (S y, x) = S (plus (x, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
exact heq
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : plus (S y, x) = S (plus (x, y)) ⊒ plus (S y, x) = S (plus (x, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
simp only [Set.mem_setOf_eq]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} ⊒ z ∈ A
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} ⊒ plus (S y, z) = S (plus (z, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
rw [zplus, zero_plus_x_eq_eq]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} ⊒ plus (S y, z) = S (plus (z, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
intros n hel
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
simp only [Set.mem_setOf_eq]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ plus (S y, S n) = S (plus (S n, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
simp only [Set.mem_setOf_eq] at hel
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ plus (S y, S n) = S (plus (S n, y))
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : plus (S y, n) = S (plus (n, y)) ⊒ plus (S y, S n) = S (plus (S n, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus
[340, 1]
[357, 12]
rw [splus, hel, succ_plus_eq_succ_plus]
x y : ↑N0 A : Set ↑N0 := {x | plus (S y, x) = S (plus (x, y))} hzmem : z ∈ A n : ↑N0 hel : plus (S y, n) = S (plus (n, y)) ⊒ plus (S y, S n) = S (plus (S n, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
let A := {x : N0 | mul (z, x) = z}
x : ↑N0 ⊒ mul (z, x) = z
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} ⊒ mul (z, x) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] rw [zmul]
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} ⊒ mul (z, x) = z
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A ⊒ mul (z, x) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
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]
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A ⊒ mul (z, x) = z
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ mul (z, x) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
have heq := p3 A ⟨hzmem, hind⟩
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ mul (z, x) = z
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
simp [A, Set.ext_iff] at heq
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
specialize heq x
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
exact heq
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
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
simp only [Set.mem_setOf_eq]
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} ⊒ z ∈ A
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} ⊒ mul (z, z) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
rw [zmul]
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} ⊒ mul (z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
intros n hel
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
simp only [Set.mem_setOf_eq]
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ mul (z, S n) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
simp only [Set.mem_setOf_eq] at hel
x : ↑N0 A : Set ↑N0 := {x | mul (z, x) = z} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ mul (z, S n) = z
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
zero_mul_eq_zero
[360, 1]
[377, 12]
rw [smul, hel, zero_plus_x_eq_eq]
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
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
let A := {x : N0 | mul (S z, x) = x}
x : ↑N0 ⊒ mul (S z, x) = x
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} ⊒ mul (S z, x) = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] rw [zmul]
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} ⊒ mul (S z, x) = x
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} hzmem : z ∈ A ⊒ mul (S z, x) = x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
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]
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} hzmem : z ∈ A ⊒ mul (S z, x) = x
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
have heq := p3 A ⟨hzmem, hind⟩
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
simp [A, Set.ext_iff] at heq
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
specialize heq x
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
exact heq
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
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
simp only [Set.mem_setOf_eq]
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} ⊒ z ∈ A
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} ⊒ mul (S z, z) = z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
rw [zmul]
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} ⊒ mul (S z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
intros n hel
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
simp only [Set.mem_setOf_eq]
x : ↑N0 A : Set ↑N0 := {x | mul (S z, x) = x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
simp only [Set.mem_setOf_eq] at hel
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
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
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self
[380, 1]
[397, 12]
rw [smul, hel, splus, zplus]
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
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
let A := {x : N0 | motive x}
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
have hzmem : z ∈ A := by simp only [Set.mem_setOf_eq] exact hz
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
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 specialize hs n exact hs hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
have heq := p3 A ⟨hzmem, hind⟩
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
simp [A, Set.ext_iff] at heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : Subtype.val '' A = N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), motive { val := x, property := (_ : x ∈ N0) }) ↔ x ∈ N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
specialize heq x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : βˆ€ (x : Ξ±), (βˆƒ (x_1 : x ∈ N0), motive { val := x, property := (_ : x ∈ N0) }) ↔ x ∈ N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), motive { val := ↑x, property := (_ : ↑x ∈ N0) }) ↔ ↑x ∈ N0 ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
simp only [Subtype.coe_eta, Subtype.coe_prop, exists_const, iff_true] at heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : (βˆƒ (x_1 : ↑x ∈ N0), motive { val := ↑x, property := (_ : ↑x ∈ N0) }) ↔ ↑x ∈ N0 ⊒ motive x
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : motive x ⊒ motive x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
exact heq
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A hind : βˆ€ n ∈ A, S n ∈ A heq : motive x ⊒ motive x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
simp only [Set.mem_setOf_eq]
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ z ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive z
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
exact hz
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} ⊒ motive z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
intros n hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A ⊒ βˆ€ n ∈ A, S n ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
simp only [Set.mem_setOf_eq]
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ S n ∈ A
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
simp only [Set.mem_setOf_eq] at hel
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : n ∈ A ⊒ motive (S n)
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
specialize hs n
motive : ↑N0 β†’ Prop hz : motive z hs : βˆ€ (n : ↑N0), motive n β†’ motive (S n) x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n ⊒ motive (S n)
motive : ↑N0 β†’ Prop hz : motive z x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n hs : motive n β†’ motive (S n) ⊒ motive (S n)
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
generic_recursor
[400, 1]
[421, 12]
exact hs hel
motive : ↑N0 β†’ Prop hz : motive z x : ↑N0 A : Set ↑N0 := {x | motive x} hzmem : z ∈ A n : ↑N0 hel : motive n hs : motive n β†’ motive (S n) ⊒ motive (S n)
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self'
[423, 1]
[429, 32]
apply generic_recursor
⊒ βˆ€ (x : ↑N0), mul (S z, x) = x
case hz ⊒ mul (S z, z) = z case hs ⊒ βˆ€ (n : ↑N0), mul (S z, n) = n β†’ mul (S z, S n) = S n
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self'
[423, 1]
[429, 32]
rw [zmul]
case hz ⊒ mul (S z, z) = z
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self'
[423, 1]
[429, 32]
intros x hi
case hs ⊒ βˆ€ (n : ↑N0), mul (S z, n) = n β†’ mul (S z, S n) = S n
case hs x : ↑N0 hi : mul (S z, x) = x ⊒ mul (S z, S x) = S x
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_zero_mul_eq_self'
[423, 1]
[429, 32]
rw [smul, hi, splus, zplus]
case hs x : ↑N0 hi : mul (S z, x) = x ⊒ mul (S z, S x) = S x
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus'
[431, 1]
[438, 43]
apply generic_recursor
⊒ βˆ€ (x y : ↑N0), plus (S y, x) = S (plus (x, y))
case hz ⊒ βˆ€ (y : ↑N0), plus (S y, z) = S (plus (z, y)) case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (y : ↑N0), plus (S y, n) = S (plus (n, y))) β†’ βˆ€ (y : ↑N0), plus (S y, S n) = S (plus (S n, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus'
[431, 1]
[438, 43]
intro y
case hz ⊒ βˆ€ (y : ↑N0), plus (S y, z) = S (plus (z, y))
case hz y : ↑N0 ⊒ plus (S y, z) = S (plus (z, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus'
[431, 1]
[438, 43]
rw [zplus, zero_plus_x_eq_eq]
case hz y : ↑N0 ⊒ plus (S y, z) = S (plus (z, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus'
[431, 1]
[438, 43]
intros n hi y
case hs ⊒ βˆ€ (n : ↑N0), (βˆ€ (y : ↑N0), plus (S y, n) = S (plus (n, y))) β†’ βˆ€ (y : ↑N0), plus (S y, S n) = S (plus (S n, y))
case hs n : ↑N0 hi : βˆ€ (y : ↑N0), plus (S y, n) = S (plus (n, y)) y : ↑N0 ⊒ plus (S y, S n) = S (plus (S n, y))
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex5.lean
succ_plus_n_eq_succ_n_plus'
[431, 1]
[438, 43]
rw [splus, hi, succ_plus_eq_succ_plus]
case hs n : ↑N0 hi : βˆ€ (y : ↑N0), plus (S y, n) = S (plus (n, y)) y : ↑N0 ⊒ plus (S y, S n) = S (plus (S n, y))
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
induction' n with n ih
n : β„• ⊒ (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3
case zero ⊒ (βˆ‘ x in Finset.range (Nat.zero + 1), x) ^ 2 = βˆ‘ x in Finset.range (Nat.zero + 1), x ^ 3 case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (βˆ‘ x in Finset.range (Nat.succ n + 1), x) ^ 2 = βˆ‘ x in Finset.range (Nat.succ n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
ring_nf
case zero ⊒ (βˆ‘ x in Finset.range (Nat.zero + 1), x) ^ 2 = βˆ‘ x in Finset.range (Nat.zero + 1), x ^ 3
case zero ⊒ (βˆ‘ x in Finset.range (1 + Nat.zero), x) ^ 2 = βˆ‘ x in Finset.range (1 + Nat.zero), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
simp only [Nat.zero_eq, add_zero, Finset.range_one, Finset.sum_singleton, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow']
case zero ⊒ (βˆ‘ x in Finset.range (1 + Nat.zero), x) ^ 2 = βˆ‘ x in Finset.range (1 + Nat.zero), x ^ 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
rw [Finset.range_succ, Finset.sum_insert Finset.not_mem_range_self, Finset.sum_insert Finset.not_mem_range_self]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (βˆ‘ x in Finset.range (Nat.succ n + 1), x) ^ 2 = βˆ‘ x in Finset.range (Nat.succ n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (n + 1 + βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
rw [add_sq]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (n + 1 + βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
let S := βˆ‘ x in Finset.range (n + 1), x
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
have hS : S = βˆ‘ x in Finset.range (n + 1), x := rfl
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
nth_rewrite 2 [←hS]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
have bigger (n : β„•) : 1 ≀ n + 1 := by simp only [le_add_iff_nonneg_left, zero_le]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
rw [Finset.sum_range_id]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * βˆ‘ x in Finset.range (n + 1), x + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
zify [bigger]
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) + S ^ 2 = (n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
have hring (n : β„€): (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3 := by have htwodvd : 2 ∣ ((n + 1) * (n + 1 - 1)) := by rw [add_sub_cancel, mul_comm] exact even_iff_two_dvd.1 (Int.even_mul_succ_self n) qify [htwodvd, bigger] push_cast ring_nf
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 hring : βˆ€ (n : β„€), (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
zify at ih
case succ n : β„• ih : (βˆ‘ x in Finset.range (n + 1), x) ^ 2 = βˆ‘ x in Finset.range (n + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 hring : βˆ€ (n : β„€), (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
case succ n : β„• S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 hring : βˆ€ (n : β„€), (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3 ih : (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = βˆ‘ x in Finset.range (n + 1), ↑x ^ 3 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
rw [hring n, ih]
case succ n : β„• S : β„• := βˆ‘ x in Finset.range (n + 1), x hS : S = βˆ‘ x in Finset.range (n + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 hring : βˆ€ (n : β„€), (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3 ih : (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = βˆ‘ x in Finset.range (n + 1), ↑x ^ 3 ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) + (βˆ‘ x in Finset.range (n + 1), ↑x) ^ 2 = (↑n + 1) ^ 3 + βˆ‘ x in Finset.range (n + 1), ↑x ^ 3
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
simp only [le_add_iff_nonneg_left, zero_le]
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x n : β„• ⊒ 1 ≀ n + 1
no goals
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
have htwodvd : 2 ∣ ((n + 1) * (n + 1 - 1)) := by rw [add_sub_cancel, mul_comm] exact even_iff_two_dvd.1 (Int.even_mul_succ_self n)
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 n : β„€ ⊒ (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 n : β„€ htwodvd : 2 ∣ (n + 1) * (n + 1 - 1) ⊒ (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
qify [htwodvd, bigger]
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 n : β„€ htwodvd : 2 ∣ (n + 1) * (n + 1 - 1) ⊒ (n + 1) ^ 2 + 2 * (n + 1) * ((n + 1) * (n + 1 - 1) / 2) = (n + 1) ^ 3
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 n : β„€ htwodvd : 2 ∣ (n + 1) * (n + 1 - 1) ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) = (↑n + 1) ^ 3
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
ring_nf
n✝ : β„• ih : (βˆ‘ x in Finset.range (n✝ + 1), x) ^ 2 = βˆ‘ x in Finset.range (n✝ + 1), x ^ 3 S : β„• := βˆ‘ x in Finset.range (n✝ + 1), x hS : S = βˆ‘ x in Finset.range (n✝ + 1), x bigger : βˆ€ (n : β„•), 1 ≀ n + 1 n : β„€ htwodvd : 2 ∣ (n + 1) * (n + 1 - 1) ⊒ (↑n + 1) ^ 2 + 2 * (↑n + 1) * ((↑n + 1) * (↑n + 1 - 1) / 2) = (↑n + 1) ^ 3
no goals