Functoriality of set
#
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the functor structure of set
.
theorem
set.image2_def
{α β γ : Type u_1}
(f : α → β → γ)
(s : set α)
(t : set β) :
set.image2 f s t = f <$> s <*> t
set.image2
in terms of monadic operations. Note that this can't be taken as the definition
because of the lack of universe polymorphism.
@[protected, instance]
Equations
- set.alternative = {to_applicative := monad.to_applicative set.monad, to_has_orelse := {orelse := λ (α : Type u_1), has_union.union}, failure := λ (α : Type u_1), ∅}