applicative instances #
This file provides Applicative instances for concrete functors:
idFunctor.compFunctor.constFunctor.add_const
theorem
Functor.Comp.applicative_id_comp
{F : Type u_1 → Type u_2}
[AF : Applicative F]
[LawfulApplicative F]
:
instApplicativeComp = AF
theorem
Functor.Comp.applicative_comp_id
{F : Type u_1 → Type u_2}
[AF : Applicative F]
[LawfulApplicative F]
:
instApplicativeComp = AF
instance
Functor.Comp.instCommApplicative
{f : Type u → Type w}
{g : Type v → Type u}
[Applicative f]
[Applicative g]
[CommApplicative f]
[CommApplicative g]
:
CommApplicative (Comp f g)
theorem
Comp.seq_mk
{α β : Type w}
{f : Type u → Type v}
{g : Type w → Type u}
[Applicative f]
[Applicative g]
(h : f (g (α → β)))
(x : f (g α))
:
Functor.Comp.mk h <*> Functor.Comp.mk x = Functor.Comp.mk ((fun (x1 : g (α → β)) (x2 : g α) => x1 <*> x2) <$> h <*> x)
@[implicit_reducible]
instance
instApplicativeConstOfOneOfMul
{α : Type u_1}
[One α]
[Mul α]
:
Applicative (Functor.Const α)
@[implicit_reducible]
instance
instApplicativeAddConstOfZeroOfAdd
{α : Type u_1}
[Zero α]
[Add α]
:
Applicative (Functor.AddConst α)
instance
instLawfulApplicativeAddConst
{α : Type u_1}
[AddMonoid α]
:
LawfulApplicative (Functor.AddConst α)