blob: 991b11efad8bddb5cb3ed82357c958dc800a3958 [file]
module
-- https://github.com/leanprover/lean4/issues/13167
theorem Option.bind_pmap {α β γ} {p : α → Prop} (f : ∀ a, p a → β) (x : Option α) (g : β → Option γ) (H) :
pmap f x H >>= g = x.pbind fun a h ↦ g (f a (H _ h)) := by
grind [cases Option, pmap]