Skip to content

Commit 2ea88b1

Browse files
committed
refactor: move theorem about lists to batteries
`List.modifyHead_modifyHead` is from `Mathlib.Data.List.Basic`. I need it to prove `String.splitOn_of_valid`. See leanprover-community/batteries#743. Corresponding Batteries PR: leanprover-community/batteries#756
1 parent 8b0815e commit 2ea88b1

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Mathlib/Data/List/Basic.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,6 @@ theorem get_cons {l : List α} {a : α} {n} (hl) :
509509
l.get ⟨n - 1, by contrapose! hl; rw [length_cons]; omega⟩ :=
510510
getElem_cons hl
511511

512-
theorem modifyHead_modifyHead (l : List α) (f g : α → α) :
513-
(l.modifyHead f).modifyHead g = l.modifyHead (g ∘ f) := by cases l <;> simp
514-
515512
/-! ### Induction from the right -/
516513

517514
/-- Induction principle from the right for lists: if a property holds for the empty list, and

0 commit comments

Comments
 (0)