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/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_left | [1485, 1] | [1504, 20] | . rw [lastN]
convert h₂ using 3
rw [Nat.sub_sub_eq_add_sub_of_le]
rw [Nat.succ_le, pos_iff_ne_zero]
apply hzero | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) l₂ ++ l₃
hzero : ¬length l₁ = 0
⊢ l₁ <:+: lastN (length l₁ - 1) l₂ ++ l₃
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ length l₂ + 1 - length l₁ ≤ length l₂ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ length l₂ + 1 - length l₁ ≤ length l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) l₂ ++ l₃
hzero : ¬length l₁ = 0
⊢ l₁ <:+: lastN (length l₁ - 1) l₂ ++ l₃
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ length l₂ + 1 - length l₁ ≤ length l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_left | [1485, 1] | [1504, 20] | . simp only [ge_iff_le, tsub_le_iff_right, add_le_add_iff_left]
rw [Nat.succ_le, pos_iff_ne_zero]
apply hzero | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ length l₂ + 1 - length l₁ ≤ length l₂ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
h₂ : l₁ <:+: drop (length l₂ + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ length l₂ + 1 - length l₁ ≤ length l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | have split := List.isInfix_split h (l₂.length + (l₁.length -1)) | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | if hzero: l₁.length = 0 then
simp only [List.length_eq_zero.1 hzero, length_nil, ge_iff_le, tsub_eq_zero_of_le, append_nil, nil_isInfix, or_self]
else
cases split with
| inl h₁ =>
left
rw [List.take_append] at h₁
exact h₁
| inr h₂ =>
right
rw [add_assoc, Nat.sub_add_cancel, Nat.add_sub_cancel, ←Nat.add_zero l₂.length, List.drop_append, List.drop] at h₂
. exact h₂
. rw [Nat.succ_le_iff, Nat.pos_iff_ne_zero]
exact hzero | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | simp only [List.length_eq_zero.1 hzero, length_nil, ge_iff_le, tsub_eq_zero_of_le, append_nil, nil_isInfix, or_self] | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
hzero : length l₁ = 0
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
hzero : length l₁ = 0
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | cases split with
| inl h₁ =>
left
rw [List.take_append] at h₁
exact h₁
| inr h₂ =>
right
rw [add_assoc, Nat.sub_add_cancel, Nat.add_sub_cancel, ←Nat.add_zero l₂.length, List.drop_append, List.drop] at h₂
. exact h₂
. rw [Nat.succ_le_iff, Nat.pos_iff_ne_zero]
exact hzero | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
split :
l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃) ∨
l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
hzero : ¬length l₁ = 0
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | left | case inl
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
case inl
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | rw [List.take_append] at h₁ | case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ | case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: l₂ ++ take (length l₁ - 1) l₃
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: take (length l₂ + (length l₁ - 1)) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | exact h₁ | case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: l₂ ++ take (length l₁ - 1) l₃
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inl.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₁ : l₁ <:+: l₂ ++ take (length l₁ - 1) l₃
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | right | case inr
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃ | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₂ ++ take (length l₁ - 1) l₃ ∨ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | rw [add_assoc, Nat.sub_add_cancel, Nat.add_sub_cancel, ←Nat.add_zero l₂.length, List.drop_append, List.drop] at h₂ | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₃ | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: l₃
⊢ l₁ <:+: l₃
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1) + 1 - length l₁) (l₂ ++ l₃)
⊢ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | . exact h₂ | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: l₃
⊢ l₁ <:+: l₃
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁ | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: l₃
⊢ l₁ <:+: l₃
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_append_split_right | [1506, 1] | [1521, 20] | . rw [Nat.succ_le_iff, Nat.pos_iff_ne_zero]
exact hzero | case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
hzero : ¬length l₁ = 0
h₂ : l₁ <:+: drop (length l₂ + (length l₁ - 1 + 1) - length l₁) (l₂ ++ l₃)
⊢ 1 ≤ length l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_take | [1525, 1] | [1529, 34] | rw [← List.take_append_drop n l₂] | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
⊢ l₁ <:+: l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
⊢ l₁ <:+: l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_take | [1525, 1] | [1529, 34] | have ⟨s,t,heq⟩ := h | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_take | [1525, 1] | [1529, 34] | exists s, t ++ drop n l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ s ++ l₁ ++ (t ++ drop n l₂) = take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_take | [1525, 1] | [1529, 34] | simp only [append_assoc, ← heq] | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ s ++ l₁ ++ (t ++ drop n l₂) = take n l₂ ++ drop n l₂ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: take n l₂
s t : List α✝
heq : s ++ l₁ ++ t = take n l₂
⊢ s ++ l₁ ++ (t ++ drop n l₂) = take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_drop | [1531, 1] | [1535, 34] | rw [← List.take_append_drop n l₂] | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
⊢ l₁ <:+: l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
⊢ l₁ <:+: l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_drop | [1531, 1] | [1535, 34] | have ⟨s,t,heq⟩ := h | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_drop | [1531, 1] | [1535, 34] | exists take n l₂ ++ s, t | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ take n l₂ ++ s ++ l₁ ++ t = take n l₂ ++ drop n l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ l₁ <:+: take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_drop | [1531, 1] | [1535, 34] | simp only [append_assoc, ← heq] | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ take n l₂ ++ s ++ l₁ ++ t = take n l₂ ++ drop n l₂ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop n l₂
s t : List α✝
heq : s ++ l₁ ++ t = drop n l₂
⊢ take n l₂ ++ s ++ l₁ ++ t = take n l₂ ++ drop n l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_lastN | [1537, 1] | [1539, 39] | rw [lastN] at h | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: lastN n l₂
⊢ l₁ <:+: l₂ | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop (length l₂ - n) l₂
⊢ l₁ <:+: l₂ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: lastN n l₂
⊢ l₁ <:+: l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_of_isInfix_lastN | [1537, 1] | [1539, 39] | apply List.isInfix_of_isInfix_drop h | α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop (length l₂ - n) l₂
⊢ l₁ <:+: l₂ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ : List α✝
n : ℕ
l₂ : List α✝
h : l₁ <:+: drop (length l₂ - n) l₂
⊢ l₁ <:+: l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isPrefix_trans | [1541, 1] | [1545, 20] | have ⟨t₁, heq₁⟩ := h₁ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
⊢ l₁ <+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
⊢ l₁ <+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
⊢ l₁ <+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isPrefix_trans | [1541, 1] | [1545, 20] | have ⟨t₂, heq₂⟩ := h₂ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
⊢ l₁ <+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
⊢ l₁ <+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isPrefix_trans | [1541, 1] | [1545, 20] | rw [← heq₂, ←heq₁, append_assoc] | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₁ ++ (t₁ ++ t₂) | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isPrefix_trans | [1541, 1] | [1545, 20] | exists (t₁ ++ t₂) | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₁ ++ (t₁ ++ t₂) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <+: l₂
h₂ : l₂ <+: l₃
t₁ : List α✝
heq₁ : l₁ ++ t₁ = l₂
t₂ : List α✝
heq₂ : l₂ ++ t₂ = l₃
⊢ l₁ <+: l₁ ++ (t₁ ++ t₂)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_trans | [1547, 1] | [1552, 27] | have ⟨s₁, t₁, heq₁⟩ := h₁ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
⊢ l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
⊢ l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
⊢ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_trans | [1547, 1] | [1552, 27] | have ⟨s₂, t₂, heq₂⟩ := h₂ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
⊢ l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
⊢ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_trans | [1547, 1] | [1552, 27] | rw [← heq₂, ←heq₁, append_assoc] | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂) | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_trans | [1547, 1] | [1552, 27] | exists (s₂ ++ s₁), (t₁ ++ t₂) | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂) | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ s₂ ++ s₁ ++ l₁ ++ (t₁ ++ t₂) = s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂) | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ l₁ <:+: s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_trans | [1547, 1] | [1552, 27] | simp only [append_assoc] | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ s₂ ++ s₁ ++ l₁ ++ (t₁ ++ t₂) = s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h₁ : l₁ <:+: l₂
h₂ : l₂ <:+: l₃
s₁ t₁ : List α✝
heq₁ : s₁ ++ l₁ ++ t₁ = l₂
s₂ t₂ : List α✝
heq₂ : s₂ ++ l₂ ++ t₂ = l₃
⊢ s₂ ++ s₁ ++ l₁ ++ (t₁ ++ t₂) = s₂ ++ (s₁ ++ l₁ ++ t₁ ++ t₂)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | have ⟨s, t, heq⟩ := h | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | cases hinf: List.isInfixOf l₁ (s ++ dropLast l₁) with
| true =>
simp [List.isInfixOf_ext] at hinf
have _ : length s + (length l₁ - 1) < length l₂ := by
rw[← heq]
simp only [length_append, length_dropLast, tsub_le_iff_right, ge_iff_le, append_assoc, add_lt_add_iff_left]
apply Nat.lt_add_right
apply Nat.sub_lt
. apply Nat.pos_of_ne_zero
simp only [zero_le, ge_iff_le, nonpos_iff_eq_zero, ne_eq, length_eq_zero, hne, not_false_iff]
. simp only
have ⟨s₁, ih⟩ := List.isInfix_first_match _ _ hinf hne
exists s₁
apply And.intro
. rw [← heq]
apply isPrefix_trans ih.left
exists (l₁.lastN 1) ++ t
rw [dropLast_eq_take, lastN, Nat.pred_eq_sub_one]
simp only [tsub_le_iff_right, ge_iff_le, append_assoc, append_cancel_left_eq]
rw [← append_assoc, List.take_append_drop (length l₁ - 1) l₁]
. exact ih.right
| false =>
exists s
apply And.intro
. exists t
. simp only [←isInfixOf_ext, hinf, not_false_iff] | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | simp [List.isInfixOf_ext] at hinf | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = true
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = true
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | have _ : length s + (length l₁ - 1) < length l₂ := by
rw[← heq]
simp only [length_append, length_dropLast, tsub_le_iff_right, ge_iff_le, append_assoc, add_lt_add_iff_left]
apply Nat.lt_add_right
apply Nat.sub_lt
. apply Nat.pos_of_ne_zero
simp only [zero_le, ge_iff_le, nonpos_iff_eq_zero, ne_eq, length_eq_zero, hne, not_false_iff]
. simp only | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | have ⟨s₁, ih⟩ := List.isInfix_first_match _ _ hinf hne | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | exists s₁ | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | apply And.intro | case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁ | case true.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂
case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . rw [← heq]
apply isPrefix_trans ih.left
exists (l₁.lastN 1) ++ t
rw [dropLast_eq_take, lastN, Nat.pred_eq_sub_one]
simp only [tsub_le_iff_right, ge_iff_le, append_assoc, append_cancel_left_eq]
rw [← append_assoc, List.take_append_drop (length l₁ - 1) l₁] | case true.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂
case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁ | case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case true.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ s₁ ++ l₁ <+: l₂
case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . exact ih.right | case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case true.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
x✝ : length s + (length l₁ - 1) < length l₂
s₁ : List α
ih : s₁ ++ l₁ <+: s ++ dropLast l₁ ∧ ¬l₁ <:+: s₁ ++ dropLast l₁
⊢ ¬l₁ <:+: s₁ ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | rw[← heq] | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length s + (length l₁ - 1) < length l₂ | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length s + (length l₁ - 1) < length (s ++ l₁ ++ t) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length s + (length l₁ - 1) < length l₂
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | simp only [length_append, length_dropLast, tsub_le_iff_right, ge_iff_le, append_assoc, add_lt_add_iff_left] | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length s + (length l₁ - 1) < length (s ++ l₁ ++ t) | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁ + length t | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length s + (length l₁ - 1) < length (s ++ l₁ ++ t)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | apply Nat.lt_add_right | α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁ + length t | case h
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁ + length t
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | apply Nat.sub_lt | case h
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁ | case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < length l₁
case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case h
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ length l₁ - 1 < length l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . apply Nat.pos_of_ne_zero
simp only [zero_le, ge_iff_le, nonpos_iff_eq_zero, ne_eq, length_eq_zero, hne, not_false_iff] | case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < length l₁
case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1 | case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < length l₁
case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . simp only | case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.a
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : l₁ <:+: s ++ dropLast l₁
⊢ 0 < 1
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | exists s | case false
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case false
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case false
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ∃ s, s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | apply And.intro | case false
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁ | case false.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂
case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case false
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂ ∧ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . exists t | case false.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂
case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁ | case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
case false.left
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ s ++ l₁ <+: l₂
case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_first_match | [1554, 1] | [1584, 56] | . simp only [←isInfixOf_ext, hinf, not_false_iff] | case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case false.right
α : Type u_1
inst✝ : DecidableEq α
l₁ l₂ : List α
h : l₁ <:+: l₂
hne : l₁ ≠ []
s t : List α
heq : s ++ l₁ ++ t = l₂
hinf : isInfixOf l₁ (s ++ dropLast l₁) = false
⊢ ¬l₁ <:+: s ++ dropLast l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | unfold splitOnListAux | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
l : List α
⊢ splitOnListAux delim l acc r h ≠ #[] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
l : List α
⊢ (match _h₀ : l with
| [] => Array.push r acc
| head :: tail =>
match h : getRest l delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf l);
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
l : List α
⊢ splitOnListAux delim l acc r h ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | cases l with
| nil => simp only; intro contr; rw [Array.ext_iff] at contr; simp only [Array.push_data, Array.data_toArray, append_eq_nil, and_false] at contr
| cons head tail =>
simp only
match h: getRest (head::tail) delim with
| none =>
simp only
have _ : length tail < Nat.succ (length tail) := by apply Nat.lt_succ_self
apply List.splitOnListAux_ne_nil tail
| some rest =>
simp only
have _ : length rest < Nat.succ (length tail) := by
have h₂ := List.eq_append_of_getRest h
replace h₂ := congr_arg List.length h₂
simp at h₂
rw[h₂]
apply Nat.lt_add_of_pos_left
apply Nat.zero_lt_of_ne_zero
intro contr
have contr₂ := List.length_eq_zero.1 contr
contradiction
apply List.splitOnListAux_ne_nil rest | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
l : List α
⊢ (match _h₀ : l with
| [] => Array.push r acc
| head :: tail =>
match h : getRest l delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf l);
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
l : List α
⊢ (match _h₀ : l with
| [] => Array.push r acc
| head :: tail =>
match h : getRest l delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf l);
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp only | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
⊢ (match _h₀ : [] with
| [] => Array.push r acc
| head :: tail =>
match h : getRest [] delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf []);
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
⊢ Array.push r acc ≠ #[] | Please generate a tactic in lean4 to solve the state.
STATE:
case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
⊢ (match _h₀ : [] with
| [] => Array.push r acc
| head :: tail =>
match h : getRest [] delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf []);
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | intro contr | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
⊢ Array.push r acc ≠ #[] | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : Array.push r acc = #[]
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
⊢ Array.push r acc ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | rw [Array.ext_iff] at contr | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : Array.push r acc = #[]
⊢ False | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : (Array.push r acc).data = #[].data
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : Array.push r acc = #[]
⊢ False
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp only [Array.push_data, Array.data_toArray, append_eq_nil, and_false] at contr | case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : (Array.push r acc).data = #[].data
⊢ False | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case nil
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
contr : (Array.push r acc).data = #[].data
⊢ False
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp only | case cons
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
⊢ (match _h₀ : head :: tail with
| [] => Array.push r acc
| head_1 :: tail_1 =>
match h : getRest (head :: tail) delim with
| none => splitOnListAux delim tail_1 (Array.push acc head_1) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf (head :: tail));
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | case cons
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
⊢ (match h : getRest (head :: tail) delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest => splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | Please generate a tactic in lean4 to solve the state.
STATE:
case cons
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
⊢ (match _h₀ : head :: tail with
| [] => Array.push r acc
| head_1 :: tail_1 =>
match h : getRest (head :: tail) delim with
| none => splitOnListAux delim tail_1 (Array.push acc head_1) r h
| some rest =>
let_fun x := (_ : sizeOf rest < sizeOf (head :: tail));
splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | match h: getRest (head::tail) delim with
| none =>
simp only
have _ : length tail < Nat.succ (length tail) := by apply Nat.lt_succ_self
apply List.splitOnListAux_ne_nil tail
| some rest =>
simp only
have _ : length rest < Nat.succ (length tail) := by
have h₂ := List.eq_append_of_getRest h
replace h₂ := congr_arg List.length h₂
simp at h₂
rw[h₂]
apply Nat.lt_add_of_pos_left
apply Nat.zero_lt_of_ne_zero
intro contr
have contr₂ := List.length_eq_zero.1 contr
contradiction
apply List.splitOnListAux_ne_nil rest | case cons
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
⊢ (match h : getRest (head :: tail) delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest => splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[] | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case cons
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
⊢ (match h : getRest (head :: tail) delim with
| none => splitOnListAux delim tail (Array.push acc head) r h
| some rest => splitOnListAux delim rest #[] (Array.push r acc) h) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp only | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ (match h : none with
| none => splitOnListAux delim tail (Array.push acc head) r h✝
| some rest => splitOnListAux delim rest #[] (Array.push r acc) h✝) ≠
#[] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ (match h : none with
| none => splitOnListAux delim tail (Array.push acc head) r h✝
| some rest => splitOnListAux delim rest #[] (Array.push r acc) h✝) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | have _ : length tail < Nat.succ (length tail) := by apply Nat.lt_succ_self | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
x✝ : length tail < Nat.succ (length tail)
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | apply List.splitOnListAux_ne_nil tail | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
x✝ : length tail < Nat.succ (length tail)
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[] | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
x✝ : length tail < Nat.succ (length tail)
⊢ splitOnListAux delim tail (Array.push acc head) r h✝ ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | apply Nat.lt_succ_self | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ length tail < Nat.succ (length tail) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail : List α
h : getRest (head :: tail) delim = none
⊢ length tail < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp only | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ (match h : some rest with
| none => splitOnListAux delim tail (Array.push acc head) r h✝
| some rest_1 => splitOnListAux delim rest_1 #[] (Array.push r acc) h✝) ≠
#[] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ (match h : some rest with
| none => splitOnListAux delim tail (Array.push acc head) r h✝
| some rest_1 => splitOnListAux delim rest_1 #[] (Array.push r acc) h✝) ≠
#[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | have _ : length rest < Nat.succ (length tail) := by
have h₂ := List.eq_append_of_getRest h
replace h₂ := congr_arg List.length h₂
simp at h₂
rw[h₂]
apply Nat.lt_add_of_pos_left
apply Nat.zero_lt_of_ne_zero
intro contr
have contr₂ := List.length_eq_zero.1 contr
contradiction | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | apply List.splitOnListAux_ne_nil rest | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[] | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ splitOnListAux delim rest #[] (Array.push r acc) h✝ ≠ #[]
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | have h₂ := List.eq_append_of_getRest h | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ length rest < Nat.succ (length tail) | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : head :: tail = delim ++ rest
⊢ length rest < Nat.succ (length tail) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | replace h₂ := congr_arg List.length h₂ | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : head :: tail = delim ++ rest
⊢ length rest < Nat.succ (length tail) | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : length (head :: tail) = length (delim ++ rest)
⊢ length rest < Nat.succ (length tail) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : head :: tail = delim ++ rest
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp at h₂ | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : length (head :: tail) = length (delim ++ rest)
⊢ length rest < Nat.succ (length tail) | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < Nat.succ (length tail) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : length (head :: tail) = length (delim ++ rest)
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | rw[h₂] | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < Nat.succ (length tail) | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < length delim + length rest | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | apply Nat.lt_add_of_pos_left | α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < length delim + length rest | case h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ 0 < length delim | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length rest < length delim + length rest
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | apply Nat.zero_lt_of_ne_zero | case h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ 0 < length delim | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length delim ≠ 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ 0 < length delim
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | intro contr | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length delim ≠ 0 | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
⊢ length delim ≠ 0
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | have contr₂ := List.length_eq_zero.1 contr | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
⊢ False | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
contr₂ : delim = []
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
⊢ False
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | contradiction | case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
contr₂ : delim = []
⊢ False | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h.h
α : Type u_1
delim : List α
acc : Array α
r : Array (Array α)
h✝ : delim ≠ []
inst✝ : DecidableEq α
head : α
tail rest : List α
h : getRest (head :: tail) delim = some rest
h₂ : Nat.succ (length tail) = length delim + length rest
contr : length delim = 0
contr₂ : delim = []
⊢ False
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | try simp_wf; try decreasing_tactic | α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ (invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
{ fst := #[],
snd := { fst := Array.push r acc, snd := { fst := h✝¹, snd := { fst := fun a b => inst✝ a b, snd := rest } } } }
{ fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ (invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
{ fst := #[],
snd := { fst := Array.push r acc, snd := { fst := h✝¹, snd := { fst := fun a b => inst✝ a b, snd := rest } } } }
{ fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } }
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | simp_wf | α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ (invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
{ fst := #[],
snd := { fst := Array.push r acc, snd := { fst := h✝¹, snd := { fst := fun a b => inst✝ a b, snd := rest } } } }
{ fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } | α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ length rest < Nat.succ (length tail) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ (invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
{ fst := #[],
snd := { fst := Array.push r acc, snd := { fst := h✝¹, snd := { fst := fun a b => inst✝ a b, snd := rest } } } }
{ fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } }
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | try decreasing_tactic | α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ length rest < Nat.succ (length tail) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.splitOnListAux_ne_nil | [1587, 1] | [1612, 49] | decreasing_tactic | α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ length rest < Nat.succ (length tail) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
delim : List α
_x✝ : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝⁴ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y _x✝ →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
acc : Array α
r✝ : (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝³ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := r✝ } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
r : Array (Array α)
h✝² : (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α
a✝² :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := h✝² } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝¹ : delim ≠ []
inst✝¹ : (_ : DecidableEq α) ×' List α
a✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := inst✝¹ } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
inst✝ : DecidableEq α
l : List α
a✝ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := l } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
head : α
tail : List α
x✝¹ :
∀ (y : (_ : Array α) ×' (_ : Array (Array α)) ×' (_ : delim ≠ []) ×' (_ : DecidableEq α) ×' List α),
(invImage
(fun a =>
PSigma.casesOn a fun acc snd =>
PSigma.casesOn snd fun r snd =>
PSigma.casesOn snd fun h snd => PSigma.casesOn snd fun inst snd => length snd)
instWellFoundedRelation).1
y { fst := acc, snd := { fst := r, snd := { fst := h✝¹, snd := { fst := inst✝, snd := head :: tail } } } } →
splitOnListAux delim y.2.2.2.2 y.1 y.2.1 (_ : delim ≠ []) ≠ #[]
h✝ : l = head :: tail
rest : List α
h : getRest (head :: tail) delim = some rest
x✝ : length rest < Nat.succ (length tail)
⊢ length rest < Nat.succ (length tail)
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.drop_isInfix | [1614, 1] | [1616, 43] | exists List.take n l, [] | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ drop n l <:+: l | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ take n l ++ drop n l ++ [] = l | Please generate a tactic in lean4 to solve the state.
STATE:
n : ℕ
α✝ : Type u_1
l : List α✝
⊢ drop n l <:+: l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.drop_isInfix | [1614, 1] | [1616, 43] | simp only [take_append_drop, append_nil] | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ take n l ++ drop n l ++ [] = l | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n : ℕ
α✝ : Type u_1
l : List α✝
⊢ take n l ++ drop n l ++ [] = l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.drop_isInfix_drop | [1618, 1] | [1620, 26] | rw [← Nat.add_sub_of_le h, add_comm, List.drop_add] | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≥ m
⊢ drop n l <:+: drop m l | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≥ m
⊢ drop (n - m) (drop m l) <:+: drop m l | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≥ m
⊢ drop n l <:+: drop m l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.drop_isInfix_drop | [1618, 1] | [1620, 26] | apply List.drop_isInfix | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≥ m
⊢ drop (n - m) (drop m l) <:+: drop m l | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≥ m
⊢ drop (n - m) (drop m l) <:+: drop m l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.take_isInfix | [1622, 1] | [1624, 43] | exists [], drop n l | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ take n l <:+: l | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ [] ++ take n l ++ drop n l = l | Please generate a tactic in lean4 to solve the state.
STATE:
n : ℕ
α✝ : Type u_1
l : List α✝
⊢ take n l <:+: l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.take_isInfix | [1622, 1] | [1624, 43] | simp only [nil_append, take_append_drop] | n : ℕ
α✝ : Type u_1
l : List α✝
⊢ [] ++ take n l ++ drop n l = l | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n : ℕ
α✝ : Type u_1
l : List α✝
⊢ [] ++ take n l ++ drop n l = l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.take_isInfix_take | [1626, 1] | [1628, 60] | rw [← Nat.add_sub_of_le h] | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≤ m
⊢ take n l <:+: take m l | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≤ m
⊢ take n l <:+: take (n + (m - n)) l | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≤ m
⊢ take n l <:+: take m l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.take_isInfix_take | [1626, 1] | [1628, 60] | simp only [List.take_add, ge_iff_le, isInfix_append_left] | n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≤ m
⊢ take n l <:+: take (n + (m - n)) l | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
α✝ : Type u_1
l : List α✝
h : n ≤ m
⊢ take n l <:+: take (n + (m - n)) l
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | have ⟨s, t, ih⟩ := h | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
⊢ drop (length l₂) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | have l₁split := List.take_append_drop (length l₂) l₁ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | rw [← l₁split] at ih | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ l₁ ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | apply_fun List.drop (length l₂) at ih | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) (s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t) = drop (length l₂) (l₂ ++ l₃)
⊢ drop (length l₂) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
ih : s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t = l₂ ++ l₃
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | simp only [take_append_drop, drop_append_eq_append_drop, ge_iff_le, tsub_le_iff_right,
drop_length, le_refl, tsub_eq_zero_of_le, nil_append, List.drop, List.length_append, Nat.sub_add_eq] at ih | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) (s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t) = drop (length l₂) (l₂ ++ l₃)
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) (s ++ (take (length l₂) l₁ ++ drop (length l₂) l₁) ++ t) = drop (length l₂) (l₂ ++ l₃)
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | suffices drop (length l₂ - length s) l₁ <:+: l₃ by
apply List.isInfix_trans _ this
apply List.drop_isInfix_drop
apply Nat.sub_le | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂ - length s) l₁ <:+: l₃ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | exists (drop (length l₂) s), (drop (length l₂ - length s - length l₁) t) | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂ - length s) l₁ <:+: l₃ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
⊢ drop (length l₂ - length s) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | apply List.isInfix_trans _ this | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ drop (length l₂) l₁ <:+: l₃ | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ drop (length l₂) l₁ <:+: drop (length l₂ - length s) l₁ | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ drop (length l₂) l₁ <:+: l₃
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | apply List.drop_isInfix_drop | α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ drop (length l₂) l₁ <:+: drop (length l₂ - length s) l₁ | case h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ length l₂ ≥ length l₂ - length s | Please generate a tactic in lean4 to solve the state.
STATE:
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ drop (length l₂) l₁ <:+: drop (length l₂ - length s) l₁
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | List.isInfix_drop_of_isInfix_append | [1630, 1] | [1641, 75] | apply Nat.sub_le | case h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ length l₂ ≥ length l₂ - length s | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h
α✝ : Type u_1
l₁ l₂ l₃ : List α✝
h : l₁ <:+: l₂ ++ l₃
s t : List α✝
l₁split : take (length l₂) l₁ ++ drop (length l₂) l₁ = l₁
ih : drop (length l₂) s ++ drop (length l₂ - length s) l₁ ++ drop (length l₂ - length s - length l₁) t = l₃
this : drop (length l₂ - length s) l₁ <:+: l₃
⊢ length l₂ ≥ length l₂ - length s
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | Nat.min_self_sub_right | [1644, 1] | [1646, 91] | simp only [ge_iff_le, tsub_le_iff_right, le_add_iff_nonneg_right, zero_le, min_eq_right] | n m : ℕ
⊢ min n (n - m) = n - m | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
⊢ min n (n - m) = n - m
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | Nat.min_self_sub_left | [1648, 1] | [1651, 31] | rw [min_commutative] | n m : ℕ
⊢ min (n - m) n = n - m | n m : ℕ
⊢ min n (n - m) = n - m | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
⊢ min (n - m) n = n - m
TACTIC:
|
https://github.com/jeremysalwen/advent_of_lean_2022.git | 96035d07c4f9f133fe79fe02cdf5792b597881c0 | One.lean | Nat.min_self_sub_left | [1648, 1] | [1651, 31] | apply Nat.min_self_sub_right | n m : ℕ
⊢ min n (n - m) = n - m | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
n m : ℕ
⊢ min n (n - m) = n - m
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.