Compare commits

...

2 Commits

Author SHA1 Message Date
Kim Morrison
307611e154 fix 2024-09-16 13:08:32 +10:00
Kim Morrison
f8269c5e3c chore: remove @[simp] from Option.bind_map 2024-09-16 12:53:25 +10:00
2 changed files with 2 additions and 2 deletions

View File

@@ -478,7 +478,7 @@ theorem false_of_mem_take_findIdx {xs : List α} {p : α → Bool} (h : x ∈ xs
· simp only [take_succ_cons, findIdx?_cons]
split
· simp
· simp [ih, Option.guard_comp]
· simp [ih, Option.guard_comp, Option.bind_map]
@[simp] theorem min_findIdx_findIdx {xs : List α} {p q : α Bool} :
min (xs.findIdx p) (xs.findIdx q) = xs.findIdx (fun a => p a || q a) := by

View File

@@ -247,7 +247,7 @@ theorem isSome_filter_of_isSome (p : α → Bool) (o : Option α) (h : (o.filter
theorem bind_map_comm {α β} {x : Option (Option α)} {f : α β} :
x.bind (Option.map f) = (x.map (Option.map f)).bind id := by cases x <;> simp
@[simp] theorem bind_map {f : α β} {g : β Option γ} {x : Option α} :
theorem bind_map {f : α β} {g : β Option γ} {x : Option α} :
(x.map f).bind g = x.bind (g f) := by cases x <;> simp
@[simp] theorem map_bind {f : α Option β} {g : β γ} {x : Option α} :