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
list_take_length
[683, 1]
[700, 13]
unfold min
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = min n (length xs)
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = instMinNat.1 n (length xs)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = min n (length xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold instMinNat
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = instMinNat.1 n (length xs)
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = minOfLe.1 n (length xs)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = instMinNat.1 n (length xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold minOfLe
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = minOfLe.1 n (length xs)
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = { min := fun x y => if x ≤ y then x else y }.1 n (length xs)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = minOfLe.1 n (length xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
simp only [length_take, ge_iff_le]
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = { min := fun x y => if x ≤ y then x else y }.1 n (length xs)
α : Type u_1 n : ℕ xs : List α ⊢ min n (length xs) = if n ≤ length xs then n else length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) = { min := fun x y => if x ≤ y then x else y }.1 n (length xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
split
α : Type u_1 n : ℕ xs : List α ⊢ min n (length xs) = if n ≤ length xs then n else length xs
case inl α : Type u_1 n : ℕ xs : List α h✝ : n ≤ length xs ⊢ min n (length xs) = n case inr α : Type u_1 n : ℕ xs : List α h✝ : ¬n ≤ length xs ⊢ min n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ min n (length xs) = if n ≤ length xs then n else length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
case inl => rename_i c unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_left_iff, not_le] intro c' linarith
α : Type u_1 n : ℕ xs : List α h✝ : n ≤ length xs ⊢ min n (length xs) = n
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α h✝ : n ≤ length xs ⊢ min n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
case inr => rename_i c have c' := gt_of_not_le c unfold min; unfold instMinNat; unfold minOfLe; simp only [ite_eq_right_iff] intro c'' linarith
α : Type u_1 n : ℕ xs : List α h✝ : ¬n ≤ length xs ⊢ min n (length xs) = length xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α h✝ : ¬n ≤ length xs ⊢ min n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
rename_i c
α : Type u_1 n : ℕ xs : List α h✝ : n ≤ length xs ⊢ min n (length xs) = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ min n (length xs) = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α h✝ : n ≤ length xs ⊢ min n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold min
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ min n (length xs) = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ instMinNat.1 n (length xs) = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ min n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold instMinNat
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ instMinNat.1 n (length xs) = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ minOfLe.1 n (length xs) = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ instMinNat.1 n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold minOfLe
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ minOfLe.1 n (length xs) = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ minOfLe.1 n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
simp only [ite_eq_left_iff, not_le]
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ length xs < n → length xs = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
intro c'
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ length xs < n → length xs = n
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs c' : length xs < n ⊢ length xs = n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs ⊢ length xs < n → length xs = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
linarith
α : Type u_1 n : ℕ xs : List α c : n ≤ length xs c' : length xs < n ⊢ length xs = n
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : n ≤ length xs c' : length xs < n ⊢ length xs = n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
rename_i c
α : Type u_1 n : ℕ xs : List α h✝ : ¬n ≤ length xs ⊢ min n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs ⊢ min n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α h✝ : ¬n ≤ length xs ⊢ min n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
have c' := gt_of_not_le c
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs ⊢ min n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ min n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs ⊢ min n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold min
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ min n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ instMinNat.1 n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ min n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold instMinNat
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ instMinNat.1 n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ minOfLe.1 n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ instMinNat.1 n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
unfold minOfLe
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ minOfLe.1 n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ minOfLe.1 n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
simp only [ite_eq_right_iff]
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ n ≤ length xs → n = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ { min := fun x y => if x ≤ y then x else y }.1 n (length xs) = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
intro c''
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ n ≤ length xs → n = length xs
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs c'' : n ≤ length xs ⊢ n = length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs ⊢ n ≤ length xs → n = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length
[683, 1]
[700, 13]
linarith
α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs c'' : n ≤ length xs ⊢ n = length xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α c : ¬n ≤ length xs c' : n > length xs c'' : n ≤ length xs ⊢ n = length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
revert xs
α : Type u_1 n : ℕ xs : List α ⊢ length (drop n xs) = length xs - n
α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length (drop n xs) = length xs - n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (drop n xs) = length xs - n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
induction n with | zero => intro xs rw [drop] rw [Nat.sub_zero] | succ n ih => intro xs cases xs with | nil => rw [drop] rw [length] rw [Nat.zero_sub] | cons x xs => rw [drop] rw [length] rw [Nat.succ_sub_succ] apply ih
α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length (drop n xs) = length xs - n
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length (drop n xs) = length xs - n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
intro xs
case zero α : Type u_1 ⊢ ∀ (xs : List α), length (drop zero xs) = length xs - zero
case zero α : Type u_1 xs : List α ⊢ length (drop zero xs) = length xs - zero
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 ⊢ ∀ (xs : List α), length (drop zero xs) = length xs - zero TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [drop]
case zero α : Type u_1 xs : List α ⊢ length (drop zero xs) = length xs - zero
case zero α : Type u_1 xs : List α ⊢ length xs = length xs - zero
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs : List α ⊢ length (drop zero xs) = length xs - zero TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [Nat.sub_zero]
case zero α : Type u_1 xs : List α ⊢ length xs = length xs - zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs : List α ⊢ length xs = length xs - zero TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
intro xs
case succ α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ ∀ (xs : List α), length (drop (succ n) xs) = length xs - succ n
case succ α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n xs : List α ⊢ length (drop (succ n) xs) = length xs - succ n
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ ∀ (xs : List α), length (drop (succ n) xs) = length xs - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
cases xs with | nil => rw [drop] rw [length] rw [Nat.zero_sub] | cons x xs => rw [drop] rw [length] rw [Nat.succ_sub_succ] apply ih
case succ α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n xs : List α ⊢ length (drop (succ n) xs) = length xs - succ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n xs : List α ⊢ length (drop (succ n) xs) = length xs - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [drop]
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ length (drop (succ n) []) = length [] - succ n
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ length [] = length [] - succ n
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ length (drop (succ n) []) = length [] - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [length]
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ length [] = length [] - succ n
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ 0 = 0 - succ n
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ length [] = length [] - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [Nat.zero_sub]
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ 0 = 0 - succ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n ⊢ 0 = 0 - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [drop]
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop (succ n) (x :: xs)) = length (x :: xs) - succ n
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length (x :: xs) - succ n
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop (succ n) (x :: xs)) = length (x :: xs) - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [length]
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length (x :: xs) - succ n
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs + 1 - succ n
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length (x :: xs) - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
rw [Nat.succ_sub_succ]
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs + 1 - succ n
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs - n
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs + 1 - succ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length
[702, 1]
[721, 15]
apply ih
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs - n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs : List α), length (drop n xs) = length xs - n x : α xs : List α ⊢ length (drop n xs) = length xs - n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
revert ys
α : Type u_1 xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs
α : Type u_1 xs : List α ⊢ ∀ (ys : List α), take (length xs) (xs ++ ys) = xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
induction xs with | nil => simp only [take, forall_const] | cons x xs ih => intro ys rw [length] rw [<- list_app_comm_cons] rw [take] apply (congrArg (cons x)) apply ih
α : Type u_1 xs : List α ⊢ ∀ (ys : List α), take (length xs) (xs ++ ys) = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ ∀ (ys : List α), take (length xs) (xs ++ ys) = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
simp only [take, forall_const]
case nil α : Type u_1 ⊢ ∀ (ys : List α), take (length []) ([] ++ ys) = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ ∀ (ys : List α), take (length []) ([] ++ ys) = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
intro ys
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ⊢ ∀ (ys : List α), take (length (x :: xs)) (x :: xs ++ ys) = x :: xs
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length (x :: xs)) (x :: xs ++ ys) = x :: xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ⊢ ∀ (ys : List α), take (length (x :: xs)) (x :: xs ++ ys) = x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
rw [length]
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length (x :: xs)) (x :: xs ++ ys) = x :: xs
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: xs ++ ys) = x :: xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length (x :: xs)) (x :: xs ++ ys) = x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
rw [<- list_app_comm_cons]
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: xs ++ ys) = x :: xs
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: (xs ++ ys)) = x :: xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: xs ++ ys) = x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
rw [take]
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: (xs ++ ys)) = x :: xs
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ x :: take (length xs) (xs ++ ys) = x :: xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs + 1) (x :: (xs ++ ys)) = x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
apply (congrArg (cons x))
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ x :: take (length xs) (xs ++ ys) = x :: xs
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ x :: take (length xs) (xs ++ ys) = x :: xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_app_length
[723, 1]
[735, 13]
apply ih
case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (ys : List α), take (length xs) (xs ++ ys) = xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
revert xs
α : Type u_1 xs : List α n : ℕ ⊢ ∀ (ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs
α : Type u_1 n : ℕ ⊢ ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α n : ℕ ⊢ ∀ (ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
induction n with | zero => intro xs ys zs hl ha have he := list_length_zero_is_empty _ hl rw [he] rw [he] at ha rw [take] rw [drop] rw [list_app_nil_l] at ha have ha' := Eq.symm ha constructor case left => rfl case right => exact ha' | succ n ih => intro xs ys zs hl ha cases xs with | nil => rw [take] rw [drop] have ha' := Eq.symm ha rw [list_app_nil_nil] at ha' exact ha' | cons x xs => rw [take, drop] cases ys with | nil => rw [length] at hl contradiction | cons y ys => simp only [length_cons, succ.injEq] at hl have hzs : y :: ys ++ zs = y :: (ys ++ zs) := by simp only [cons_append] rw [hzs] at ha rw [list_cons_eq] at ha cases ha with | intro hxy ha => rw [hxy] have ih' := ih xs ys zs hl ha cases ih' with | intro hys hzs => rw [<- hys] rw [<- hzs] simp only [and_self]
α : Type u_1 n : ℕ ⊢ ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ ⊢ ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
intro xs ys zs hl ha
case zero α : Type u_1 ⊢ ∀ (xs ys zs : List α), length ys = zero → xs = ys ++ zs → ys = take zero xs ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs ⊢ ys = take zero xs ∧ zs = drop zero xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 ⊢ ∀ (xs ys zs : List α), length ys = zero → xs = ys ++ zs → ys = take zero xs ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
have he := list_length_zero_is_empty _ hl
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs ⊢ ys = take zero xs ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ ys = take zero xs ∧ zs = drop zero xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs ⊢ ys = take zero xs ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [he]
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ ys = take zero xs ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ ys = take zero xs ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [he] at ha
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = ys ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [take]
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = drop zero xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = take zero xs ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [drop]
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = drop zero xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = drop zero xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [list_app_nil_l] at ha
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ⊢ [] = [] ∧ zs = xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = [] ++ zs he : ys = [] ⊢ [] = [] ∧ zs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
have ha' := Eq.symm ha
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ⊢ [] = [] ∧ zs = xs
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] ∧ zs = xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ⊢ [] = [] ∧ zs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
constructor
case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] ∧ zs = xs
case zero.left α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] case zero.right α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ zs = xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] ∧ zs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
case left => rfl
α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
case right => exact ha'
α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ zs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ zs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rfl
α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
exact ha'
α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ zs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α hl : length ys = zero ha : xs = zs he : ys = [] ha' : zs = xs ⊢ zs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
intro xs ys zs hl ha
case succ α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ⊢ ∀ (xs ys zs : List α), length ys = succ n → xs = ys ++ zs → ys = take (succ n) xs ∧ zs = drop (succ n) xs
case succ α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs xs ys zs : List α hl : length ys = succ n ha : xs = ys ++ zs ⊢ ys = take (succ n) xs ∧ zs = drop (succ n) xs
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ⊢ ∀ (xs ys zs : List α), length ys = succ n → xs = ys ++ zs → ys = take (succ n) xs ∧ zs = drop (succ n) xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
cases xs with | nil => rw [take] rw [drop] have ha' := Eq.symm ha rw [list_app_nil_nil] at ha' exact ha' | cons x xs => rw [take, drop] cases ys with | nil => rw [length] at hl contradiction | cons y ys => simp only [length_cons, succ.injEq] at hl have hzs : y :: ys ++ zs = y :: (ys ++ zs) := by simp only [cons_append] rw [hzs] at ha rw [list_cons_eq] at ha cases ha with | intro hxy ha => rw [hxy] have ih' := ih xs ys zs hl ha cases ih' with | intro hys hzs => rw [<- hys] rw [<- hzs] simp only [and_self]
case succ α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs xs ys zs : List α hl : length ys = succ n ha : xs = ys ++ zs ⊢ ys = take (succ n) xs ∧ zs = drop (succ n) xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs xs ys zs : List α hl : length ys = succ n ha : xs = ys ++ zs ⊢ ys = take (succ n) xs ∧ zs = drop (succ n) xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [take]
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = take (succ n) [] ∧ zs = drop (succ n) []
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = drop (succ n) []
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = take (succ n) [] ∧ zs = drop (succ n) [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [drop]
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = drop (succ n) []
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = []
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = drop (succ n) [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
have ha' := Eq.symm ha
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = []
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys ++ zs = [] ⊢ ys = [] ∧ zs = []
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ⊢ ys = [] ∧ zs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [list_app_nil_nil] at ha'
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys ++ zs = [] ⊢ ys = [] ∧ zs = []
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys = [] ∧ zs = [] ⊢ ys = [] ∧ zs = []
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys ++ zs = [] ⊢ ys = [] ∧ zs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
exact ha'
case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys = [] ∧ zs = [] ⊢ ys = [] ∧ zs = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n ha : [] = ys ++ zs ha' : ys = [] ∧ zs = [] ⊢ ys = [] ∧ zs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [take, drop]
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n x : α xs : List α ha : x :: xs = ys ++ zs ⊢ ys = take (succ n) (x :: xs) ∧ zs = drop (succ n) (x :: xs)
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n x : α xs : List α ha : x :: xs = ys ++ zs ⊢ ys = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n x : α xs : List α ha : x :: xs = ys ++ zs ⊢ ys = take (succ n) (x :: xs) ∧ zs = drop (succ n) (x :: xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
cases ys with | nil => rw [length] at hl contradiction | cons y ys => simp only [length_cons, succ.injEq] at hl have hzs : y :: ys ++ zs = y :: (ys ++ zs) := by simp only [cons_append] rw [hzs] at ha rw [list_cons_eq] at ha cases ha with | intro hxy ha => rw [hxy] have ih' := ih xs ys zs hl ha cases ih' with | intro hys hzs => rw [<- hys] rw [<- hzs] simp only [and_self]
case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n x : α xs : List α ha : x :: xs = ys ++ zs ⊢ ys = x :: take n xs ∧ zs = drop n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs ys zs : List α hl : length ys = succ n x : α xs : List α ha : x :: xs = ys ++ zs ⊢ ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [length] at hl
case succ.cons.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α hl : length [] = succ n ha : x :: xs = [] ++ zs ⊢ [] = x :: take n xs ∧ zs = drop n xs
case succ.cons.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α hl : 0 = succ n ha : x :: xs = [] ++ zs ⊢ [] = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α hl : length [] = succ n ha : x :: xs = [] ++ zs ⊢ [] = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
contradiction
case succ.cons.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α hl : 0 = succ n ha : x :: xs = [] ++ zs ⊢ [] = x :: take n xs ∧ zs = drop n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.nil α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α hl : 0 = succ n ha : x :: xs = [] ++ zs ⊢ [] = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
simp only [length_cons, succ.injEq] at hl
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length (y :: ys) = succ n ha : x :: xs = y :: ys ++ zs ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length (y :: ys) = succ n ha : x :: xs = y :: ys ++ zs ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
have hzs : y :: ys ++ zs = y :: (ys ++ zs) := by simp only [cons_append]
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [hzs] at ha
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: (ys ++ zs) hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [list_cons_eq] at ha
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: (ys ++ zs) hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x = y ∧ xs = ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: (ys ++ zs) hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
cases ha with | intro hxy ha => rw [hxy] have ih' := ih xs ys zs hl ha cases ih' with | intro hys hzs => rw [<- hys] rw [<- hzs] simp only [and_self]
case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x = y ∧ xs = ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x = y ∧ xs = ys ++ zs hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
simp only [cons_append]
α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n ⊢ y :: ys ++ zs = y :: (ys ++ zs)
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α ha : x :: xs = y :: ys ++ zs hl : length ys = n ⊢ y :: ys ++ zs = y :: (ys ++ zs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [hxy]
case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs
case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ⊢ y :: ys = x :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
have ih' := ih xs ys zs hl ha
case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs
case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ih' : ys = take n xs ∧ zs = drop n xs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
cases ih' with | intro hys hzs => rw [<- hys] rw [<- hzs] simp only [and_self]
case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ih' : ys = take n xs ∧ zs = drop n xs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs ih' : ys = take n xs ∧ zs = drop n xs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [<- hys]
case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs
case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = drop n xs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: take n xs ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
rw [<- hzs]
case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = drop n xs
case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = zs
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = drop n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_split_list
[737, 1]
[787, 33]
simp only [and_self]
case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = zs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons.cons.intro.intro α : Type u_1 n : ℕ ih : ∀ (xs ys zs : List α), length ys = n → xs = ys ++ zs → ys = take n xs ∧ zs = drop n xs zs : List α x : α xs : List α y : α ys : List α hl : length ys = n hzs✝ : y :: ys ++ zs = y :: (ys ++ zs) hxy : x = y ha : xs = ys ++ zs hys : ys = take n xs hzs : zs = drop n xs ⊢ y :: ys = y :: ys ∧ zs = zs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_split
[789, 1]
[791, 28]
simp only [length_append]
α : Type u_1 xs ys : List α ⊢ length (xs ++ ys) = length xs + length ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ length (xs ++ ys) = length xs + length ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
intro xsyszs
α : Type u_1 xs ys zs : List α ⊢ xs = ys ++ zs → length ys ≤ length xs
α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs ⊢ length ys ≤ length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α ⊢ xs = ys ++ zs → length ys ≤ length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
have h := list_split_list xs (length ys) ys zs rfl xsyszs
α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs ⊢ length ys ≤ length xs
α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs h : ys = take (length ys) xs ∧ zs = drop (length ys) xs ⊢ length ys ≤ length xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs ⊢ length ys ≤ length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
cases h with | intro hys hzs => rw [hzs] at xsyszs rw [xsyszs] rw [list_length_split] linarith
α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs h : ys = take (length ys) xs ∧ zs = drop (length ys) xs ⊢ length ys ≤ length xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs h : ys = take (length ys) xs ∧ zs = drop (length ys) xs ⊢ length ys ≤ length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
rw [hzs] at xsyszs
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length xs
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length xs
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ zs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
rw [xsyszs]
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length xs
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length (ys ++ drop (length ys) xs)
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
rw [list_length_split]
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length (ys ++ drop (length ys) xs)
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length ys + length (drop (length ys) xs)
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length (ys ++ drop (length ys) xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_prefix_leq_length
[793, 1]
[802, 13]
linarith
case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length ys + length (drop (length ys) xs)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys zs : List α xsyszs : xs = ys ++ drop (length ys) xs hys : ys = take (length ys) xs hzs : zs = drop (length ys) xs ⊢ length ys ≤ length ys + length (drop (length ys) xs) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length_prefix_is_suffix
[804, 1]
[811, 13]
induction xs with | nil => simp only [drop, nil_append] | cons x xs ih => simp only [drop, add_eq, add_zero, append_eq] exact ih
α : Type u_1 xs ys : List α ⊢ drop (length xs) (xs ++ ys) = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ drop (length xs) (xs ++ ys) = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length_prefix_is_suffix
[804, 1]
[811, 13]
simp only [drop, nil_append]
case nil α : Type u_1 ys : List α ⊢ drop (length []) ([] ++ ys) = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ys : List α ⊢ drop (length []) ([] ++ ys) = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length_prefix_is_suffix
[804, 1]
[811, 13]
simp only [drop, add_eq, add_zero, append_eq]
case cons α : Type u_1 ys : List α x : α xs : List α ih : drop (length xs) (xs ++ ys) = ys ⊢ drop (length (x :: xs)) (x :: xs ++ ys) = ys
case cons α : Type u_1 ys : List α x : α xs : List α ih : drop (length xs) (xs ++ ys) = ys ⊢ drop (length xs) (xs ++ ys) = ys
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α x : α xs : List α ih : drop (length xs) (xs ++ ys) = ys ⊢ drop (length (x :: xs)) (x :: xs ++ ys) = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_length_prefix_is_suffix
[804, 1]
[811, 13]
exact ih
case cons α : Type u_1 ys : List α x : α xs : List α ih : drop (length xs) (xs ++ ys) = ys ⊢ drop (length xs) (xs ++ ys) = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α x : α xs : List α ih : drop (length xs) (xs ++ ys) = ys ⊢ drop (length xs) (xs ++ ys) = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_app_length
[813, 1]
[815, 42]
apply list_drop_length_prefix_is_suffix
α : Type u_1 xs ys : List α ⊢ drop (length xs) (xs ++ ys) = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ drop (length xs) (xs ++ ys) = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_drop_app
[817, 1]
[820, 8]
sorry
α : Type u_1 n : ℕ xs ys : List α ⊢ drop n (xs ++ ys) = drop n xs ++ drop (n - length xs) ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs ys : List α ⊢ drop n (xs ++ ys) = drop n xs ++ drop (n - length xs) ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length_prefix_is_prefix
[822, 1]
[829, 13]
induction xs with | nil => simp only [take] | cons x xs ih => simp only [take, add_eq, add_zero, append_eq, cons.injEq, true_and] exact ih
α : Type u_1 xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ take (length xs) (xs ++ ys) = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length_prefix_is_prefix
[822, 1]
[829, 13]
simp only [take]
case nil α : Type u_1 ys : List α ⊢ take (length []) ([] ++ ys) = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ys : List α ⊢ take (length []) ([] ++ ys) = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_length_prefix_is_prefix
[822, 1]
[829, 13]
simp only [take, add_eq, add_zero, append_eq, cons.injEq, true_and]
case cons α : Type u_1 ys : List α x : α xs : List α ih : take (length xs) (xs ++ ys) = xs ⊢ take (length (x :: xs)) (x :: xs ++ ys) = x :: xs
case cons α : Type u_1 ys : List α x : α xs : List α ih : take (length xs) (xs ++ ys) = xs ⊢ take (length xs) (xs ++ ys) = xs
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α x : α xs : List α ih : take (length xs) (xs ++ ys) = xs ⊢ take (length (x :: xs)) (x :: xs ++ ys) = x :: xs TACTIC: