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
input
stringlengths
73
2.09M
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
rw [add_sub_cancel, mul_comm]
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 : ℤ ⊢ 2 ∣ (n + 1) * (n + 1 - 1)
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 : ℤ ⊢ 2 ∣ n * (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: 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 : ℤ ⊢ 2 ∣ (n + 1) * (n + 1 - 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
sum_squared_eq_sum_cubes
[7, 1]
[42, 21]
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 : ℤ ⊢ 2 ∣ n * (n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: 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 : ℤ ⊢ 2 ∣ n * (n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
have gt_pow3 (n : ℕ) : n ≤ n ^ 3 := by apply Nat.le_self_pow simp
n : ℕ ⊢ 6 ∣ n ^ 3 - n
n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ n ^ 3 - n
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ 6 ∣ n ^ 3 - n TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
zify [gt_pow3 n]
n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ n ^ 3 - n
n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑n ^ 3 - ↑n
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ n ^ 3 - n TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
induction' n using Nat.caseStrongInductionOn with n ih
n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑n ^ 3 - ↑n
case zero gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑0 ^ 3 - ↑0 case ind gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑n ^ 3 - ↑n TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
apply Nat.le_self_pow
n✝ n : ℕ ⊢ n ≤ n ^ 3
case hn n✝ n : ℕ ⊢ 3 ≠ 0
Please generate a tactic in lean4 to solve the state. STATE: n✝ n : ℕ ⊢ n ≤ n ^ 3 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp
case hn n✝ n : ℕ ⊢ 3 ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case hn n✝ n : ℕ ⊢ 3 ≠ 0 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
exact dvd_zero 6
case zero gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑0 ^ 3 - ↑0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ⊢ 6 ∣ ↑0 ^ 3 - ↑0 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
by_cases hp : n ≤ 3
case ind gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: case ind gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
let k : ℕ := n - 3
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
have hk : Nat.succ n = k + 4 := by zify [le_of_not_le hp] ring_nf
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rw [hk]
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(k + 4) ^ 3 - ↑(k + 4)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
push_cast (config := { zeta := false })
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(k + 4) ^ 3 - ↑(k + 4)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ ↑(k + 4) ^ 3 - ↑(k + 4) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
have hring (k : ℤ) : (k + 4) ^ 3 - (k + 4) = (k ^ 3 - k) + 6 * (2 * k ^ 2 + 8 * k + 10) := by ring_nf
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rw [hring k]
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4)
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ (↑k + 4) ^ 3 - (↑k + 4) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rcases ih k (by simp) with ⟨m, hm⟩
case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10)
case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10)
Please generate a tactic in lean4 to solve the state. STATE: case neg gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rw [hm, ←mul_add]
case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10)
case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ 6 * (m + (2 * ↑k ^ 2 + 8 * ↑k + 10))
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ ↑k ^ 3 - ↑k + 6 * (2 * ↑k ^ 2 + 8 * ↑k + 10) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp only [ge_iff_le, dvd_mul_right]
case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ 6 * (m + (2 * ↑k ^ 2 + 8 * ↑k + 10))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.intro gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) m : ℤ hm : ↑k ^ 3 - ↑k = 6 * m ⊢ 6 ∣ 6 * (m + (2 * ↑k ^ 2 + 8 * ↑k + 10)) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rw [Nat.succ_eq_add_one]
case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n)
case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(Nat.succ n) ^ 3 - ↑(Nat.succ n) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rcases hp with _ | hp
case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(3 + 1) ^ 3 - ↑(3 + 1) case pos.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 2 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n ≤ 3 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring_nf
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(3 + 1) ^ 3 - ↑(3 + 1)
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 60
Please generate a tactic in lean4 to solve the state. STATE: case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(3 + 1) ^ 3 - ↑(3 + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
have : (60 : ℤ) = 6 * 10 := by ring
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 60
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m this : 60 = 6 * 10 ⊢ 6 ∣ 60
Please generate a tactic in lean4 to solve the state. STATE: case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 60 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp_rw [this, dvd_mul_right]
case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m this : 60 = 6 * 10 ⊢ 6 ∣ 60
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m this : 60 = 6 * 10 ⊢ 6 ∣ 60 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 60 = 6 * 10
no goals
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 3, 6 ∣ ↑m ^ 3 - ↑m ⊢ 60 = 6 * 10 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rcases hp with _ | hp
case pos.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 2 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(2 + 1) ^ 3 - ↑(2 + 1) case pos.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 1 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 2 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring_nf
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(2 + 1) ^ 3 - ↑(2 + 1)
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 24
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(2 + 1) ^ 3 - ↑(2 + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
have : (24 : ℤ) = 6 * 4 := by ring
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 24
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m this : 24 = 6 * 4 ⊢ 6 ∣ 24
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 24 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp_rw [this, dvd_mul_right]
case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m this : 24 = 6 * 4 ⊢ 6 ∣ 24
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m this : 24 = 6 * 4 ⊢ 6 ∣ 24 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 24 = 6 * 4
no goals
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 2, 6 ∣ ↑m ^ 3 - ↑m ⊢ 24 = 6 * 4 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rcases hp with _ | hp
case pos.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 1 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(1 + 1) ^ 3 - ↑(1 + 1) case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 1 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring_nf
case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(1 + 1) ^ 3 - ↑(1 + 1)
case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 6
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ ↑(1 + 1) ^ 3 - ↑(1 + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
exact Int.dvd_refl 6
case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 6
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step.refl gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 ih : ∀ m ≤ 1, 6 ∣ ↑m ^ 3 - ↑m ⊢ 6 ∣ 6 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp at hp
case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : Nat.le n 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
rw [hp]
case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1)
case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(0 + 1) ^ 3 - ↑(0 + 1)
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(n + 1) ^ 3 - ↑(n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
exact dvd_zero 6
case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(0 + 1) ^ 3 - ↑(0 + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.step.step.step gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : n = 0 ⊢ 6 ∣ ↑(0 + 1) ^ 3 - ↑(0 + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
zify [le_of_not_le hp]
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ Nat.succ n = k + 4
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ ↑n + 1 = ↑n - 3 + 4
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ Nat.succ n = k + 4 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring_nf
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ ↑n + 1 = ↑n - 3 + 4
no goals
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 ⊢ ↑n + 1 = ↑n - 3 + 4 TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
ring_nf
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k✝ : ℕ := n - 3 hk : Nat.succ n = k✝ + 4 k : ℤ ⊢ (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10)
no goals
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k✝ : ℕ := n - 3 hk : Nat.succ n = k✝ + 4 k : ℤ ⊢ (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
six_dvd_n_cubed_minus_n
[45, 1]
[88, 41]
simp
gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ k ≤ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: gt_pow3 : ∀ (n : ℕ), n ≤ n ^ 3 n : ℕ ih : ∀ m ≤ n, 6 ∣ ↑m ^ 3 - ↑m hp : ¬n ≤ 3 k : ℕ := n - 3 hk : Nat.succ n = k + 4 hring : ∀ (k : ℤ), (k + 4) ^ 3 - (k + 4) = k ^ 3 - k + 6 * (2 * k ^ 2 + 8 * k + 10) ⊢ k ≤ n TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
binomial_theorem
[91, 1]
[112, 36]
induction' n with n ih
x y n : ℕ ⊢ (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k
case zero x y : ℕ ⊢ (x + y) ^ Nat.zero = ∑ k in Finset.range (Nat.zero + 1), Nat.choose Nat.zero k * x ^ (Nat.zero - k) * y ^ k case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ Nat.succ n = ∑ k in Finset.range (Nat.succ n + 1), Nat.choose (Nat.succ n) k * x ^ (Nat.succ n - k) * y ^ k
Please generate a tactic in lean4 to solve the state. STATE: x y n : ℕ ⊢ (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
binomial_theorem
[91, 1]
[112, 36]
simp
case zero x y : ℕ ⊢ (x + y) ^ Nat.zero = ∑ k in Finset.range (Nat.zero + 1), Nat.choose Nat.zero k * x ^ (Nat.zero - k) * y ^ k
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero x y : ℕ ⊢ (x + y) ^ Nat.zero = ∑ k in Finset.range (Nat.zero + 1), Nat.choose Nat.zero k * x ^ (Nat.zero - k) * y ^ k TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
binomial_theorem
[91, 1]
[112, 36]
rw [Finset.sum_range_succ, Nat.succ_eq_add_one, Nat.choose_self, Nat.sub_self, pow_zero, mul_one, one_mul, Finset.sum_range_succ', Nat.choose_zero_right, one_mul, Nat.sub_zero, pow_zero, mul_one]
case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ Nat.succ n = ∑ k in Finset.range (Nat.succ n + 1), Nat.choose (Nat.succ n) k * x ^ (Nat.succ n - k) * y ^ k
case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ (n + 1) = ∑ k in Finset.range n, Nat.choose (n + 1) (k + 1) * x ^ (n + 1 - (k + 1)) * y ^ (k + 1) + x ^ (n + 1) + y ^ (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ Nat.succ n = ∑ k in Finset.range (Nat.succ n + 1), Nat.choose (Nat.succ n) k * x ^ (Nat.succ n - k) * y ^ k TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
meetings/ex3.lean
binomial_theorem
[91, 1]
[112, 36]
simp_rw [Nat.choose_succ_succ']
case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ (n + 1) = ∑ k in Finset.range n, Nat.choose (n + 1) (k + 1) * x ^ (n + 1 - (k + 1)) * y ^ (k + 1) + x ^ (n + 1) + y ^ (n + 1)
case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ (n + 1) = ∑ x_1 in Finset.range n, (Nat.choose n x_1 + Nat.choose n (x_1 + 1)) * x ^ (n + 1 - (x_1 + 1)) * y ^ (x_1 + 1) + x ^ (n + 1) + y ^ (n + 1)
Please generate a tactic in lean4 to solve the state. STATE: case succ x y n : ℕ ih : (x + y) ^ n = ∑ k in Finset.range (n + 1), Nat.choose n k * x ^ (n - k) * y ^ k ⊢ (x + y) ^ (n + 1) = ∑ k in Finset.range n, Nat.choose (n + 1) (k + 1) * x ^ (n + 1 - (k + 1)) * y ^ (k + 1) + x ^ (n + 1) + y ^ (n + 1) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
cons_le_is_ordered
[25, 1]
[34, 17]
simp only [IsOrdered, List.pairwise_cons] at *
α : Type inst✝ : LE α a : α xs : List α h : IsOrdered xs hle : ∀ x ∈ xs, a ≤ x ⊢ IsOrdered (a :: xs)
α : Type inst✝ : LE α a : α xs : List α h : List.Pairwise LE.le xs hle : ∀ x ∈ xs, a ≤ x ⊢ (∀ a' ∈ xs, a ≤ a') ∧ List.Pairwise LE.le xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type inst✝ : LE α a : α xs : List α h : IsOrdered xs hle : ∀ x ∈ xs, a ≤ x ⊢ IsOrdered (a :: xs) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
cons_le_is_ordered
[25, 1]
[34, 17]
exact ⟨hle, h⟩
α : Type inst✝ : LE α a : α xs : List α h : List.Pairwise LE.le xs hle : ∀ x ∈ xs, a ≤ x ⊢ (∀ a' ∈ xs, a ≤ a') ∧ List.Pairwise LE.le xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type inst✝ : LE α a : α xs : List α h : List.Pairwise LE.le xs hle : ∀ x ∈ xs, a ≤ x ⊢ (∀ a' ∈ xs, a ≤ a') ∧ List.Pairwise LE.le xs TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
constructor
α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x ∈ insert' a l ↔ x = a ∨ x ∈ l
case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x ∈ insert' a l → x = a ∨ x ∈ l case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x = a ∨ x ∈ l → x ∈ insert' a l
Please generate a tactic in lean4 to solve the state. STATE: α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x ∈ insert' a l ↔ x = a ∨ x ∈ l TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
intro hel
case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x ∈ insert' a l → x = a ∨ x ∈ l
case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hel : x ∈ insert' a l ⊢ x = a ∨ x ∈ l
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x ∈ insert' a l → x = a ∨ x ∈ l TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
induction' l with y ys ih
case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hel : x ∈ insert' a l ⊢ x = a ∨ x ∈ l
case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x ∈ insert' a [] ⊢ x = a ∨ x ∈ [] case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ insert' a (y :: ys) ⊢ x = a ∨ x ∈ y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hel : x ∈ insert' a l ⊢ x = a ∨ x ∈ l TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rw [insert', List.mem_singleton] at hel
case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x ∈ insert' a [] ⊢ x = a ∨ x ∈ []
case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a ∨ x ∈ []
Please generate a tactic in lean4 to solve the state. STATE: case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x ∈ insert' a [] ⊢ x = a ∨ x ∈ [] TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
left
case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a ∨ x ∈ []
case mp.nil.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a
Please generate a tactic in lean4 to solve the state. STATE: case mp.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a ∨ x ∈ [] TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact hel
case mp.nil.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp.nil.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hel : x = a ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rw [insert'] at hel
case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ insert' a (y :: ys) ⊢ x = a ∨ x ∈ y :: ys
case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ insert' a (y :: ys) ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
split_ifs at hel
case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x ∈ a :: y :: ys ⊢ x = a ∨ x ∈ y :: ys case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x ∈ y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case mp.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys hel : x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons] at hel
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x ∈ a :: y :: ys ⊢ x = a ∨ x ∈ y :: ys
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x ∈ y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x ∈ a :: y :: ys ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons]
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x ∈ y :: ys
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact hel
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : a ≤ y hel : x = a ∨ x = y ∨ x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons] at hel
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x ∈ y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x ∈ y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x ∈ y :: insert' a ys ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons]
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x ∈ y :: ys
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x ∈ y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases hel with (heq | hmem)
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys
case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = a ∨ x = y ∨ x ∈ ys case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hel : x = y ∨ x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = a ∨ x = y ∨ x ∈ ys
case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
left
case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y ∨ x ∈ ys
case neg.inl.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact heq
case neg.inl.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y heq : x = y ⊢ x = y TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases ih hmem with (heq' | hmem')
case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys
case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
left
case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys
case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact heq'
case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys heq' : x = a ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys
case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = y ∨ x ∈ ys
case neg.inr.inr.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact hmem'
case neg.inr.inr.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x ∈ ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inr.h.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x ∈ insert' a ys → x = a ∨ x ∈ ys h✝ : ¬a ≤ y hmem : x ∈ insert' a ys hmem' : x ∈ ys ⊢ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
intro hor
case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x = a ∨ x ∈ l → x ∈ insert' a l
case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hor : x = a ∨ x ∈ l ⊢ x ∈ insert' a l
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α ⊢ x = a ∨ x ∈ l → x ∈ insert' a l TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
induction' l with y ys ih
case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hor : x = a ∨ x ∈ l ⊢ x ∈ insert' a l
case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x ∈ insert' a [] case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ insert' a (y :: ys)
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α l : List α hor : x = a ∨ x ∈ l ⊢ x ∈ insert' a l TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rw [insert', List.mem_singleton]
case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x ∈ insert' a []
case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x = a
Please generate a tactic in lean4 to solve the state. STATE: case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x ∈ insert' a [] TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases hor with (heq | hmem)
case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x = a
case mpr.nil.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α heq : x = a ⊢ x = a case mpr.nil.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hmem : x ∈ [] ⊢ x = a
Please generate a tactic in lean4 to solve the state. STATE: case mpr.nil α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hor : x = a ∨ x ∈ [] ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact heq
case mpr.nil.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α heq : x = a ⊢ x = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr.nil.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α heq : x = a ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.not_mem_nil] at hmem
case mpr.nil.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hmem : x ∈ [] ⊢ x = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr.nil.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a : α hmem : x ∈ [] ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rw [insert']
case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ insert' a (y :: ys)
case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ insert' a (y :: ys) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
split_ifs
case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x ∈ a :: y :: ys case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x ∈ y :: insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case mpr.cons α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys ⊢ x ∈ if a ≤ y then a :: y :: ys else y :: insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons]
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x ∈ a :: y :: ys
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x ∈ a :: y :: ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases hor with (heq | hmem)
case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x = a ∨ x = y ∨ x ∈ ys
case pos.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys case pos.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = a ∨ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case pos α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : a ≤ y ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
left
case pos.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys
case pos.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a
Please generate a tactic in lean4 to solve the state. STATE: case pos.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact heq
case pos.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y heq : x = a ⊢ x = a TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case pos.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = a ∨ x = y ∨ x ∈ ys
case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case pos.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = a ∨ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons] at hmem
case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ ys
case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ ys
Please generate a tactic in lean4 to solve the state. STATE: case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact hmem
case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case pos.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons]
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x ∈ y :: insert' a ys
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x = y ∨ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x ∈ y :: insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases hor with (heq | hmem)
case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x = y ∨ x ∈ insert' a ys
case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x = y ∨ x ∈ insert' a ys case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys hor : x = a ∨ x ∈ y :: ys h✝ : ¬a ≤ y ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x = y ∨ x ∈ insert' a ys
case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact ih (Or.inl heq)
case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x ∈ insert' a ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq : x = a ⊢ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
simp only [List.mem_cons] at hmem
case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ insert' a ys
case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x ∈ y :: ys ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
rcases hmem with (heq' | hmem')
case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys
case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y ∨ x ∈ insert' a ys case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem : x = y ∨ x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
left
case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y ∨ x ∈ insert' a ys
case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inl α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact heq'
case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inl.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y heq' : x = y ⊢ x = y TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
right
case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys
case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x ∈ insert' a ys
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inr α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x = y ∨ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
insert_mem
[61, 1]
[115, 36]
exact ih (Or.inr hmem')
case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x ∈ insert' a ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case neg.inr.inr.h α : Type hp : LE α inst✝ : DecidableRel LE.le x a y : α ys : List α ih : x = a ∨ x ∈ ys → x ∈ insert' a ys h✝ : ¬a ≤ y hmem' : x ∈ ys ⊢ x ∈ insert' a ys TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
simp at *
α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α l : List α ordered : IsOrdered l ⊢ IsOrdered (insert' a l)
α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α l : List α ordered : List.Pairwise LE.le l ⊢ List.Pairwise LE.le (insert' a l)
Please generate a tactic in lean4 to solve the state. STATE: α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α l : List α ordered : IsOrdered l ⊢ IsOrdered (insert' a l) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
induction' l with x xs ih
α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α l : List α ordered : List.Pairwise LE.le l ⊢ List.Pairwise LE.le (insert' a l)
case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le (insert' a []) case cons α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a x : α xs : List α ih : List.Pairwise LE.le xs → List.Pairwise LE.le (insert' a xs) ordered : List.Pairwise LE.le (x :: xs) ⊢ List.Pairwise LE.le (insert' a (x :: xs))
Please generate a tactic in lean4 to solve the state. STATE: α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α l : List α ordered : List.Pairwise LE.le l ⊢ List.Pairwise LE.le (insert' a l) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
rw [insert', List.pairwise_cons]
case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le (insert' a [])
case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ (∀ a' ∈ [], a ≤ a') ∧ List.Pairwise LE.le []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le (insert' a []) TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
constructor
case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ (∀ a' ∈ [], a ≤ a') ∧ List.Pairwise LE.le []
case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ ∀ a' ∈ [], a ≤ a' case nil.right α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ (∀ a' ∈ [], a ≤ a') ∧ List.Pairwise LE.le [] TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
intros y hy
case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ ∀ a' ∈ [], a ≤ a'
case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] y : α hy : y ∈ [] ⊢ a ≤ y
Please generate a tactic in lean4 to solve the state. STATE: case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ ∀ a' ∈ [], a ≤ a' TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
simp only [List.find?_nil, List.not_mem_nil] at hy
case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] y : α hy : y ∈ [] ⊢ a ≤ y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.left α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] y : α hy : y ∈ [] ⊢ a ≤ y TACTIC:
https://github.com/aronerben/lean4-playground.git
5efced915ecee24cd723d28d00aa63f9c7ea0a9c
Dictionary.lean
ordered_insert_is_ordered
[117, 1]
[155, 27]
exact ordered
case nil.right α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.right α : Type hl : LinearOrder α inst✝ : DecidableRel LE.le a : α ordered : List.Pairwise LE.le [] ⊢ List.Pairwise LE.le [] TACTIC: