Zulip Chat Archive
Stream: new members
Topic: Failing to synthesize Finset Bind instance
Jesse Slater (Jul 10 2024 at 21:42):
I don't understand why this doesn't work:
import Mathlib
def foo (s : Finset ℕ) (f : ℕ → Finset ℕ)
: (Finset ℕ)
:= s >>= f --failed to synthesize Bind Finset
My expectation is that since Finset has a Monad instance and Monad extends Bind, then I should be able to use >>=
notation with Finsets. It looks like the notation is being used at docs#Finset.bind_def, so I don't understand why it doesn't work here.
I know I can use Finset.sup, but I'm curious what I am missing.
Eric Wieser (Jul 10 2024 at 21:47):
You can only use it with open scoped Classical
Last updated: May 02 2025 at 03:31 UTC