no goals
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
h : ∀ (x : α), x ∈ xs → ¬p x = true
⊢ splitOnP p xs = [xs]
induction xs with
| nil => rfl
| cons hd tl ih =>
  simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]
  rw [ih <| forall_mem_of_forall_mem_cons h]
  rfl
no goals
case nil
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
h : ∀ (x : α), x ∈ [] → ¬p x = true
⊢ splitOnP p [] = [[]]
rfl
case cons
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ modifyHead (cons hd) (splitOnP p tl) = [hd :: tl]
case cons
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ splitOnP p (hd :: tl) = [hd :: tl]
simp only [splitOnP_cons, h hd (mem_cons_self hd tl), if_neg]
case cons
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ modifyHead (cons hd) [tl] = [hd :: tl]
case cons
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ modifyHead (cons hd) (splitOnP p tl) = [hd :: tl]
rw [ih <| forall_mem_of_forall_mem_cons h]
no goals
case cons
ι : Type ?u.302293
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
xs ys : List α
ls : List (List α)
f : List α → List α
hd : α
tl : List α
ih : (∀ (x : α), x ∈ tl → ¬p x = true) → splitOnP p tl = [tl]
h : ∀ (x : α), x ∈ hd :: tl → ¬p x = true
⊢ modifyHead (cons hd) [tl] = [hd :: tl]
rfl