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/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_min_zero
[47, 1]
[51, 7]
unfold minOfLe
n : ℕ ⊢ minOfLe.1 0 n = 0
n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 0 n = 0
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ minOfLe.1 0 n = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_min_zero
[47, 1]
[51, 7]
simp
n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 0 n = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 0 n = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
cases n with | zero => simp | succ n => unfold min unfold instMinNat unfold minOfLe simp only [nonpos_iff_eq_zero, ite_false]
n : ℕ ⊢ min n 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ min n 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
simp
case zero ⊢ min zero 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ min zero 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
unfold min
case succ n : ℕ ⊢ min (succ n) 0 = 0
case succ n : ℕ ⊢ instMinNat.1 (succ n) 0 = 0
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ min (succ n) 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
unfold instMinNat
case succ n : ℕ ⊢ instMinNat.1 (succ n) 0 = 0
case succ n : ℕ ⊢ minOfLe.1 (succ n) 0 = 0
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ instMinNat.1 (succ n) 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
unfold minOfLe
case succ n : ℕ ⊢ minOfLe.1 (succ n) 0 = 0
case succ n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 (succ n) 0 = 0
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ minOfLe.1 (succ n) 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_zero_min
[53, 1]
[61, 46]
simp only [nonpos_iff_eq_zero, ite_false]
case succ n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 (succ n) 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ n : ℕ ⊢ { min := fun x y => if x ≤ y then x else y }.1 (succ n) 0 = 0 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
cases n with | zero => rewrite [Nat.add_comm] simp only [zero_eq, zero_add] | succ n => rewrite [Nat.add_comm] rewrite [Nat.add_comm (succ n)] repeat rewrite [Nat.add_succ] rfl
n m : ℕ ⊢ succ n + m = succ (n + m)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n m : ℕ ⊢ succ n + m = succ (n + m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
rewrite [Nat.add_comm]
case zero m : ℕ ⊢ succ zero + m = succ (zero + m)
case zero m : ℕ ⊢ m + succ zero = succ (zero + m)
Please generate a tactic in lean4 to solve the state. STATE: case zero m : ℕ ⊢ succ zero + m = succ (zero + m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
simp only [zero_eq, zero_add]
case zero m : ℕ ⊢ m + succ zero = succ (zero + m)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero m : ℕ ⊢ m + succ zero = succ (zero + m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
rewrite [Nat.add_comm]
case succ m n : ℕ ⊢ succ (succ n) + m = succ (succ n + m)
case succ m n : ℕ ⊢ m + succ (succ n) = succ (succ n + m)
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : ℕ ⊢ succ (succ n) + m = succ (succ n + m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
rewrite [Nat.add_comm (succ n)]
case succ m n : ℕ ⊢ m + succ (succ n) = succ (succ n + m)
case succ m n : ℕ ⊢ m + succ (succ n) = succ (m + succ n)
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : ℕ ⊢ m + succ (succ n) = succ (succ n + m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
repeat rewrite [Nat.add_succ]
case succ m n : ℕ ⊢ m + succ (succ n) = succ (m + succ n)
case succ m n : ℕ ⊢ succ (succ (m + n)) = succ (succ (m + n))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : ℕ ⊢ m + succ (succ n) = succ (m + succ n) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
rfl
case succ m n : ℕ ⊢ succ (succ (m + n)) = succ (succ (m + n))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : ℕ ⊢ succ (succ (m + n)) = succ (succ (m + n)) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_add_succ_is_succ_add
[63, 1]
[72, 8]
rewrite [Nat.add_succ]
case succ m n : ℕ ⊢ succ (m + (n + 1)) = succ (m + succ n)
case succ m n : ℕ ⊢ succ (succ (m + n)) = succ (succ (m + n))
Please generate a tactic in lean4 to solve the state. STATE: case succ m n : ℕ ⊢ succ (m + (n + 1)) = succ (m + succ n) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
intro n m h
⊢ ∀ {n m : ℕ}, n ≤ m → pred n ≤ pred m
n m : ℕ h : n ≤ m ⊢ pred n ≤ pred m
Please generate a tactic in lean4 to solve the state. STATE: ⊢ ∀ {n m : ℕ}, n ≤ m → pred n ≤ pred m TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
cases h with | refl => constructor | step h => rename_i m cases n with | zero => dsimp exact h | succ n => dsimp have h_n_le_succ_n := Nat.le_succ n exact (Nat.le_trans h_n_le_succ_n h)
n m : ℕ h : n ≤ m ⊢ pred n ≤ pred m
no goals
Please generate a tactic in lean4 to solve the state. STATE: n m : ℕ h : n ≤ m ⊢ pred n ≤ pred m TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
constructor
case refl n : ℕ ⊢ pred n ≤ pred n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl n : ℕ ⊢ pred n ≤ pred n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
rename_i m
case step n m✝ : ℕ h : Nat.le n m✝ ⊢ pred n ≤ pred (succ m✝)
case step n m : ℕ h : Nat.le n m ⊢ pred n ≤ pred (succ m)
Please generate a tactic in lean4 to solve the state. STATE: case step n m✝ : ℕ h : Nat.le n m✝ ⊢ pred n ≤ pred (succ m✝) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
cases n with | zero => dsimp exact h | succ n => dsimp have h_n_le_succ_n := Nat.le_succ n exact (Nat.le_trans h_n_le_succ_n h)
case step n m : ℕ h : Nat.le n m ⊢ pred n ≤ pred (succ m)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case step n m : ℕ h : Nat.le n m ⊢ pred n ≤ pred (succ m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
dsimp
case step.zero m : ℕ h : Nat.le zero m ⊢ pred zero ≤ pred (succ m)
case step.zero m : ℕ h : Nat.le zero m ⊢ 0 ≤ m
Please generate a tactic in lean4 to solve the state. STATE: case step.zero m : ℕ h : Nat.le zero m ⊢ pred zero ≤ pred (succ m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
exact h
case step.zero m : ℕ h : Nat.le zero m ⊢ 0 ≤ m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case step.zero m : ℕ h : Nat.le zero m ⊢ 0 ≤ m TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
dsimp
case step.succ m n : ℕ h : Nat.le (succ n) m ⊢ pred (succ n) ≤ pred (succ m)
case step.succ m n : ℕ h : Nat.le (succ n) m ⊢ n ≤ m
Please generate a tactic in lean4 to solve the state. STATE: case step.succ m n : ℕ h : Nat.le (succ n) m ⊢ pred (succ n) ≤ pred (succ m) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
have h_n_le_succ_n := Nat.le_succ n
case step.succ m n : ℕ h : Nat.le (succ n) m ⊢ n ≤ m
case step.succ m n : ℕ h : Nat.le (succ n) m h_n_le_succ_n : n ≤ succ n ⊢ n ≤ m
Please generate a tactic in lean4 to solve the state. STATE: case step.succ m n : ℕ h : Nat.le (succ n) m ⊢ n ≤ m TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
nat_pred_le_pred
[74, 1]
[87, 43]
exact (Nat.le_trans h_n_le_succ_n h)
case step.succ m n : ℕ h : Nat.le (succ n) m h_n_le_succ_n : n ≤ succ n ⊢ n ≤ m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case step.succ m n : ℕ h : Nat.le (succ n) m h_n_le_succ_n : n ≤ succ n ⊢ n ≤ m TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_ne_nil
[89, 1]
[92, 16]
intro h'
α : Type u_1 x : α xs : List α ⊢ x :: xs ≠ []
α : Type u_1 x : α xs : List α h' : x :: xs = [] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ⊢ x :: xs ≠ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_ne_nil
[89, 1]
[92, 16]
contradiction
α : Type u_1 x : α xs : List α h' : x :: xs = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α h' : x :: xs = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_nil_ne
[94, 1]
[97, 16]
intro h'
α : Type u_1 x : α xs : List α ⊢ [] ≠ x :: xs
α : Type u_1 x : α xs : List α h' : [] = x :: xs ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ⊢ [] ≠ x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_nil_ne
[94, 1]
[97, 16]
contradiction
α : Type u_1 x : α xs : List α h' : [] = x :: xs ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α h' : [] = x :: xs ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_ne_nil
[99, 1]
[102, 16]
intro h'
α : Type u_1 x : α xs : List α ⊢ [x] ++ xs ≠ []
α : Type u_1 x : α xs : List α h' : [x] ++ xs = [] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ⊢ [x] ++ xs ≠ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_ne_nil
[99, 1]
[102, 16]
contradiction
α : Type u_1 x : α xs : List α h' : [x] ++ xs = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α h' : [x] ++ xs = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_nil_ne
[104, 1]
[111, 18]
intro h'
α : Type u_1 x : α xs : List α ⊢ xs ++ [x] ≠ []
α : Type u_1 x : α xs : List α h' : xs ++ [x] = [] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ⊢ xs ++ [x] ≠ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_nil_ne
[104, 1]
[111, 18]
cases xs with | nil => contradiction | cons head tail => contradiction
α : Type u_1 x : α xs : List α h' : xs ++ [x] = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α h' : xs ++ [x] = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_nil_ne
[104, 1]
[111, 18]
contradiction
case nil α : Type u_1 x : α h' : [] ++ [x] = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x : α h' : [] ++ [x] = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_append_nil_ne
[104, 1]
[111, 18]
contradiction
case cons α : Type u_1 x head : α tail : List α h' : head :: tail ++ [x] = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x head : α tail : List α h' : head :: tail ++ [x] = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_is_empty
[113, 1]
[119, 57]
cases xs
α : Type u_1 xs : List α ⊢ length xs = 0 → xs = []
case nil α : Type u_1 ⊢ length [] = 0 → [] = [] case cons α : Type u_1 head✝ : α tail✝ : List α ⊢ length (head✝ :: tail✝) = 0 → head✝ :: tail✝ = []
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ length xs = 0 → xs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_is_empty
[113, 1]
[119, 57]
intro _
case nil α : Type u_1 ⊢ length [] = 0 → [] = []
case nil α : Type u_1 a✝ : length [] = 0 ⊢ [] = []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ length [] = 0 → [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_is_empty
[113, 1]
[119, 57]
rfl
case nil α : Type u_1 a✝ : length [] = 0 ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 a✝ : length [] = 0 ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_is_empty
[113, 1]
[119, 57]
intro h'
case cons α : Type u_1 head✝ : α tail✝ : List α ⊢ length (head✝ :: tail✝) = 0 → head✝ :: tail✝ = []
case cons α : Type u_1 head✝ : α tail✝ : List α h' : length (head✝ :: tail✝) = 0 ⊢ head✝ :: tail✝ = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head✝ : α tail✝ : List α ⊢ length (head✝ :: tail✝) = 0 → head✝ :: tail✝ = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_is_empty
[113, 1]
[119, 57]
simp only [length, add_eq_zero_iff, and_false] at h'
case cons α : Type u_1 head✝ : α tail✝ : List α h' : length (head✝ :: tail✝) = 0 ⊢ head✝ :: tail✝ = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head✝ : α tail✝ : List α h' : length (head✝ :: tail✝) = 0 ⊢ head✝ :: tail✝ = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_l
[121, 1]
[123, 6]
rfl
α : Type u_1 xs : List α ⊢ [] ++ xs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ [] ++ xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_r
[125, 1]
[132, 15]
induction xs with | nil => rfl | cons head tail ih => apply (congrArg (cons head)) assumption
α : Type u_1 xs : List α ⊢ xs ++ [] = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ xs ++ [] = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_r
[125, 1]
[132, 15]
rfl
case nil α : Type u_1 ⊢ [] ++ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ [] ++ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_r
[125, 1]
[132, 15]
apply (congrArg (cons head))
case cons α : Type u_1 head : α tail : List α ih : tail ++ [] = tail ⊢ head :: tail ++ [] = head :: tail
case cons α : Type u_1 head : α tail : List α ih : tail ++ [] = tail ⊢ List.append tail [] = tail
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : tail ++ [] = tail ⊢ head :: tail ++ [] = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_r
[125, 1]
[132, 15]
assumption
case cons α : Type u_1 head : α tail : List α ih : tail ++ [] = tail ⊢ List.append tail [] = tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : tail ++ [] = tail ⊢ List.append tail [] = tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc
[134, 1]
[140, 13]
induction xs with | nil => rfl | cons head tail ih => apply (congrArg (cons head)) exact ih
α : Type u_1 xs ys zs : List α ⊢ xs ++ (ys ++ zs) = xs ++ ys ++ zs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α ⊢ xs ++ (ys ++ zs) = xs ++ ys ++ zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc
[134, 1]
[140, 13]
rfl
case nil α : Type u_1 ys zs : List α ⊢ [] ++ (ys ++ zs) = [] ++ ys ++ zs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ys zs : List α ⊢ [] ++ (ys ++ zs) = [] ++ ys ++ zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc
[134, 1]
[140, 13]
apply (congrArg (cons head))
case cons α : Type u_1 ys zs : List α head : α tail : List α ih : tail ++ (ys ++ zs) = tail ++ ys ++ zs ⊢ head :: tail ++ (ys ++ zs) = head :: tail ++ ys ++ zs
case cons α : Type u_1 ys zs : List α head : α tail : List α ih : tail ++ (ys ++ zs) = tail ++ ys ++ zs ⊢ List.append tail (ys ++ zs) = List.append (List.append tail ys) zs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys zs : List α head : α tail : List α ih : tail ++ (ys ++ zs) = tail ++ ys ++ zs ⊢ head :: tail ++ (ys ++ zs) = head :: tail ++ ys ++ zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc
[134, 1]
[140, 13]
exact ih
case cons α : Type u_1 ys zs : List α head : α tail : List α ih : tail ++ (ys ++ zs) = tail ++ ys ++ zs ⊢ List.append tail (ys ++ zs) = List.append (List.append tail ys) zs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys zs : List α head : α tail : List α ih : tail ++ (ys ++ zs) = tail ++ ys ++ zs ⊢ List.append tail (ys ++ zs) = List.append (List.append tail ys) zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc_singleton
[142, 1]
[144, 23]
apply list_app_assoc
α : Type u_1 xs ys : List α z : α ⊢ xs ++ (ys ++ [z]) = xs ++ ys ++ [z]
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α z : α ⊢ xs ++ (ys ++ [z]) = xs ++ ys ++ [z] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc_reverse
[146, 1]
[149, 23]
apply Eq.symm
α : Type u_1 xs ys zs : List α ⊢ xs ++ ys ++ zs = xs ++ (ys ++ zs)
case h α : Type u_1 xs ys zs : List α ⊢ xs ++ (ys ++ zs) = xs ++ ys ++ zs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α ⊢ xs ++ ys ++ zs = xs ++ (ys ++ zs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_assoc_reverse
[146, 1]
[149, 23]
apply list_app_assoc
case h α : Type u_1 xs ys zs : List α ⊢ xs ++ (ys ++ zs) = xs ++ ys ++ zs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h α : Type u_1 xs ys zs : List α ⊢ xs ++ (ys ++ zs) = xs ++ ys ++ zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_comm_cons
[151, 1]
[154, 6]
apply (congrArg (cons x))
α : Type u_1 x : α xs ys : List α ⊢ x :: (xs ++ ys) = x :: xs ++ ys
α : Type u_1 x : α xs ys : List α ⊢ xs ++ ys = List.append xs ys
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs ys : List α ⊢ x :: (xs ++ ys) = x :: xs ++ ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_comm_cons
[151, 1]
[154, 6]
rfl
α : Type u_1 x : α xs ys : List α ⊢ xs ++ ys = List.append xs ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs ys : List α ⊢ xs ++ ys = List.append xs ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_nil_ne_app_cons
[156, 1]
[158, 44]
cases xs <;> { intro h' ; contradiction }
α : Type u_1 y : α xs ys : List α ⊢ [] ≠ xs ++ y :: ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 y : α xs ys : List α ⊢ [] ≠ xs ++ y :: ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_nil_ne_app_cons
[156, 1]
[158, 44]
intro h'
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α ⊢ [] ≠ head✝ :: tail✝ ++ y :: ys
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : [] = head✝ :: tail✝ ++ y :: ys ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α ⊢ [] ≠ head✝ :: tail✝ ++ y :: ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_nil_ne_app_cons
[156, 1]
[158, 44]
contradiction
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : [] = head✝ :: tail✝ ++ y :: ys ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : [] = head✝ :: tail✝ ++ y :: ys ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_cons_ne_nil
[160, 1]
[162, 44]
cases xs <;> { intro h' ; contradiction }
α : Type u_1 y : α xs ys : List α ⊢ xs ++ y :: ys ≠ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 y : α xs ys : List α ⊢ xs ++ y :: ys ≠ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_cons_ne_nil
[160, 1]
[162, 44]
intro h'
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α ⊢ head✝ :: tail✝ ++ y :: ys ≠ []
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : head✝ :: tail✝ ++ y :: ys = [] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α ⊢ head✝ :: tail✝ ++ y :: ys ≠ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_cons_ne_nil
[160, 1]
[162, 44]
contradiction
case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : head✝ :: tail✝ ++ y :: ys = [] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 y : α ys : List α head✝ : α tail✝ : List α h' : head✝ :: tail✝ ++ y :: ys = [] ⊢ False TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
apply Iff.intro
α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] ↔ xs = [] ∧ ys = []
case mp α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] → xs = [] ∧ ys = [] case mpr α : Type u_1 xs ys : List α ⊢ xs = [] ∧ ys = [] → xs ++ ys = []
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] ↔ xs = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
case mp => cases xs with | nil => simp only [nil_append, true_and, imp_self] | cons head tail => intro h' contradiction
α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] → xs = [] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] → xs = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
case mpr => intro h' cases h' with | intro h1 h2 => rw [h1, h2] rfl
α : Type u_1 xs ys : List α ⊢ xs = [] ∧ ys = [] → xs ++ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ xs = [] ∧ ys = [] → xs ++ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
cases xs with | nil => simp only [nil_append, true_and, imp_self] | cons head tail => intro h' contradiction
α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] → xs = [] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ xs ++ ys = [] → xs = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
simp only [nil_append, true_and, imp_self]
case nil α : Type u_1 ys : List α ⊢ [] ++ ys = [] → [] = [] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ys : List α ⊢ [] ++ ys = [] → [] = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
intro h'
case cons α : Type u_1 ys : List α head : α tail : List α ⊢ head :: tail ++ ys = [] → head :: tail = [] ∧ ys = []
case cons α : Type u_1 ys : List α head : α tail : List α h' : head :: tail ++ ys = [] ⊢ head :: tail = [] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α head : α tail : List α ⊢ head :: tail ++ ys = [] → head :: tail = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
contradiction
case cons α : Type u_1 ys : List α head : α tail : List α h' : head :: tail ++ ys = [] ⊢ head :: tail = [] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α head : α tail : List α h' : head :: tail ++ ys = [] ⊢ head :: tail = [] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
intro h'
α : Type u_1 xs ys : List α ⊢ xs = [] ∧ ys = [] → xs ++ ys = []
α : Type u_1 xs ys : List α h' : xs = [] ∧ ys = [] ⊢ xs ++ ys = []
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ xs = [] ∧ ys = [] → xs ++ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
cases h' with | intro h1 h2 => rw [h1, h2] rfl
α : Type u_1 xs ys : List α h' : xs = [] ∧ ys = [] ⊢ xs ++ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α h' : xs = [] ∧ ys = [] ⊢ xs ++ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
rw [h1, h2]
case intro α : Type u_1 xs ys : List α h1 : xs = [] h2 : ys = [] ⊢ xs ++ ys = []
case intro α : Type u_1 xs ys : List α h1 : xs = [] h2 : ys = [] ⊢ [] ++ [] = []
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys : List α h1 : xs = [] h2 : ys = [] ⊢ xs ++ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_nil
[164, 1]
[179, 10]
rfl
case intro α : Type u_1 xs ys : List α h1 : xs = [] h2 : ys = [] ⊢ [] ++ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys : List α h1 : xs = [] h2 : ys = [] ⊢ [] ++ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
cases xs with | nil => intro hy simp only [nil_append] at hy apply Or.intro_left apply And.intro case left => rfl case right => assumption | cons head tail => intro hy simp only [cons_append, cons.injEq, append_eq_nil] at hy apply Or.intro_right cases hy with | intro h1 h2 => rw [h1] cases h2 with | intro h4 h5 => rw [h4, h5] apply And.intro <;> rfl
α : Type u_1 a : α xs ys : List α ⊢ xs ++ ys = [a] → xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α xs ys : List α ⊢ xs ++ ys = [a] → xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
intro hy
case nil α : Type u_1 a : α ys : List α ⊢ [] ++ ys = [a] → [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = []
case nil α : Type u_1 a : α ys : List α hy : [] ++ ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 a : α ys : List α ⊢ [] ++ ys = [a] → [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
simp only [nil_append] at hy
case nil α : Type u_1 a : α ys : List α hy : [] ++ ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = []
case nil α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 a : α ys : List α hy : [] ++ ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
apply Or.intro_left
case nil α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = []
case nil.h α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a]
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a] ∨ [] = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
apply And.intro
case nil.h α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a]
case nil.h.left α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] case nil.h.right α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ ys = [a]
Please generate a tactic in lean4 to solve the state. STATE: case nil.h α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] ∧ ys = [a] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
case left => rfl
α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
case right => assumption
α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ ys = [a]
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ ys = [a] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
rfl
α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
assumption
α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ ys = [a]
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α ys : List α hy : ys = [a] ⊢ ys = [a] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
intro hy
case cons α : Type u_1 a : α ys : List α head : α tail : List α ⊢ head :: tail ++ ys = [a] → head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = []
case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head :: tail ++ ys = [a] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 a : α ys : List α head : α tail : List α ⊢ head :: tail ++ ys = [a] → head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
simp only [cons_append, cons.injEq, append_eq_nil] at hy
case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head :: tail ++ ys = [a] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = []
case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head :: tail ++ ys = [a] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
apply Or.intro_right
case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = []
case cons.h α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [] ∧ ys = [a] ∨ head :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
cases hy with | intro h1 h2 => rw [h1] cases h2 with | intro h4 h5 => rw [h4, h5] apply And.intro <;> rfl
case cons.h α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [a] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.h α : Type u_1 a : α ys : List α head : α tail : List α hy : head = a ∧ tail = [] ∧ ys = [] ⊢ head :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
rw [h1]
case cons.h.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h2 : tail = [] ∧ ys = [] ⊢ head :: tail = [a] ∧ ys = []
case cons.h.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h2 : tail = [] ∧ ys = [] ⊢ a :: tail = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: case cons.h.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h2 : tail = [] ∧ ys = [] ⊢ head :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
cases h2 with | intro h4 h5 => rw [h4, h5] apply And.intro <;> rfl
case cons.h.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h2 : tail = [] ∧ ys = [] ⊢ a :: tail = [a] ∧ ys = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.h.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h2 : tail = [] ∧ ys = [] ⊢ a :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
rw [h4, h5]
case cons.h.intro.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h4 : tail = [] h5 : ys = [] ⊢ a :: tail = [a] ∧ ys = []
case cons.h.intro.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h4 : tail = [] h5 : ys = [] ⊢ [a] = [a] ∧ [] = []
Please generate a tactic in lean4 to solve the state. STATE: case cons.h.intro.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h4 : tail = [] h5 : ys = [] ⊢ a :: tail = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_eq_unit
[181, 1]
[201, 32]
apply And.intro <;> rfl
case cons.h.intro.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h4 : tail = [] h5 : ys = [] ⊢ [a] = [a] ∧ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.h.intro.intro α : Type u_1 a : α ys : List α head : α tail : List α h1 : head = a h4 : tail = [] h5 : ys = [] ⊢ [a] = [a] ∧ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_eq_unit_app
[203, 1]
[208, 13]
intro H
α : Type u_1 a : α xs ys : List α ⊢ [a] = xs ++ ys → xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = []
α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = []
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α xs ys : List α ⊢ [a] = xs ++ ys → xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_eq_unit_app
[203, 1]
[208, 13]
apply list_app_eq_unit
α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = []
case a α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs ++ ys = [a]
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs = [] ∧ ys = [a] ∨ xs = [a] ∧ ys = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_eq_unit_app
[203, 1]
[208, 13]
apply Eq.symm
case a α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs ++ ys = [a]
case a.h α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ [a] = xs ++ ys
Please generate a tactic in lean4 to solve the state. STATE: case a α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ xs ++ ys = [a] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_eq_unit_app
[203, 1]
[208, 13]
assumption
case a.h α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ [a] = xs ++ ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.h α : Type u_1 a : α xs ys : List α H : [a] = xs ++ ys ⊢ [a] = xs ++ ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
revert ys
α : Type u_1 xs ys : List α x y : α ⊢ xs ++ [x] = ys ++ [y] → xs = ys ∧ x = y
α : Type u_1 xs : List α x y : α ⊢ ∀ {ys : List α}, xs ++ [x] = ys ++ [y] → xs = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α x y : α ⊢ xs ++ [x] = ys ++ [y] → xs = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
induction xs with | nil => intro ys h' simp only [nil_append] at h' have h3: (ys = [] /\ [y] = [x]) \/ (ys = [x] /\ [y] = []) := list_app_eq_unit (Eq.symm h') cases h3 with | inl left => cases left with | intro empty xy => simp only [cons.injEq, and_true] at xy rw [empty, xy] apply And.intro <;> rfl | inr right => cases right with | intro empty ysx => contradiction | cons headx tailx ihx => intro ys cases ys with | nil => intro h' simp only [cons_append, nil_append, cons.injEq, append_eq_nil, and_false] at h' | cons heady taily => intro h' simp only [cons_append, cons.injEq] at h' cases h' with | intro heads tails => rw [heads] have h: tailx = taily ∧ x = y := (ihx tails) cases h with | intro tailxy xy => rw [tailxy] rw [xy] apply And.intro <;> rfl
α : Type u_1 xs : List α x y : α ⊢ ∀ {ys : List α}, xs ++ [x] = ys ++ [y] → xs = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α x y : α ⊢ ∀ {ys : List α}, xs ++ [x] = ys ++ [y] → xs = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
intro ys h'
case nil α : Type u_1 x y : α ⊢ ∀ {ys : List α}, [] ++ [x] = ys ++ [y] → [] = ys ∧ x = y
case nil α : Type u_1 x y : α ys : List α h' : [] ++ [x] = ys ++ [y] ⊢ [] = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x y : α ⊢ ∀ {ys : List α}, [] ++ [x] = ys ++ [y] → [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
simp only [nil_append] at h'
case nil α : Type u_1 x y : α ys : List α h' : [] ++ [x] = ys ++ [y] ⊢ [] = ys ∧ x = y
case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] ⊢ [] = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x y : α ys : List α h' : [] ++ [x] = ys ++ [y] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
have h3: (ys = [] /\ [y] = [x]) \/ (ys = [x] /\ [y] = []) := list_app_eq_unit (Eq.symm h')
case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] ⊢ [] = ys ∧ x = y
case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] h3 : ys = [] ∧ [y] = [x] ∨ ys = [x] ∧ [y] = [] ⊢ [] = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases h3 with | inl left => cases left with | intro empty xy => simp only [cons.injEq, and_true] at xy rw [empty, xy] apply And.intro <;> rfl | inr right => cases right with | intro empty ysx => contradiction
case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] h3 : ys = [] ∧ [y] = [x] ∨ ys = [x] ∧ [y] = [] ⊢ [] = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] h3 : ys = [] ∧ [y] = [x] ∨ ys = [x] ∧ [y] = [] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases left with | intro empty xy => simp only [cons.injEq, and_true] at xy rw [empty, xy] apply And.intro <;> rfl
case nil.inl α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] left : ys = [] ∧ [y] = [x] ⊢ [] = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.inl α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] left : ys = [] ∧ [y] = [x] ⊢ [] = ys ∧ x = y TACTIC: