applicative
instances #
This file provides Applicative
instances for concrete functors:
id
Functor.comp
Functor.const
Functor.add_const
theorem
Applicative.map_seq_map
{F : Type u → Type v}
[Applicative F]
[LawfulApplicative F]
{α : Type u}
{β : Type u}
{γ : Type u}
{σ : Type u}
(f : α → β → γ)
(g : σ → β)
(x : F α)
(y : F σ)
:
theorem
Applicative.pure_seq_eq_map'
{F : Type u → Type v}
[Applicative F]
[LawfulApplicative F]
{α : Type u}
{β : Type u}
(f : α → β)
:
theorem
Applicative.ext
{F : Type u → Type u_1}
{A1 : Applicative F}
{A2 : Applicative F}
[LawfulApplicative F]
[LawfulApplicative F]
:
theorem
Functor.Comp.map_pure
{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
{α : Type v}
{β : Type v}
(f : α → β)
(x : α)
:
theorem
Functor.Comp.seq_pure
{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
{α : Type v}
{β : Type v}
(f : Functor.Comp F G (α → β))
(x : α)
:
theorem
Functor.Comp.seq_assoc
{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
{α : Type v}
{β : Type v}
{γ : Type v}
(x : Functor.Comp F G α)
(f : Functor.Comp F G (α → β))
(g : Functor.Comp F G (β → γ))
:
theorem
Functor.Comp.pure_seq_eq_map
{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
{α : Type v}
{β : Type v}
(f : α → β)
(x : Functor.Comp F G α)
:
instance
Functor.Comp.instLawfulApplicativeComp
{F : Type u → Type w}
{G : Type v → Type u}
[Applicative F]
[Applicative G]
[LawfulApplicative F]
[LawfulApplicative G]
:
theorem
Functor.Comp.applicative_id_comp
{F : Type u_1 → Type u_2}
[AF : Applicative F]
[LawfulApplicative F]
:
Functor.Comp.instApplicativeComp = AF
theorem
Functor.Comp.applicative_comp_id
{F : Type u_1 → Type u_2}
[AF : Applicative F]
[LawfulApplicative F]
:
Functor.Comp.instApplicativeComp = AF
instance
Functor.Comp.instCommApplicativeCompInstApplicativeComp
{f : Type u → Type w}
{g : Type v → Type u}
[Applicative f]
[Applicative g]
[CommApplicative f]
[CommApplicative g]
:
CommApplicative (Functor.Comp f g)
theorem
Comp.seq_mk
{α : Type w}
{β : Type w}
{f : Type u → Type v}
{g : Type w → Type u}
[Applicative f]
[Applicative g]
(h : f (g (α → β)))
(x : f (g α))
:
(Seq.seq (Functor.Comp.mk h) fun x => Functor.Comp.mk x) = Functor.Comp.mk (Seq.seq ((fun x x_1 => Seq.seq x fun x => x_1) <$> h) fun x => x)
Equations
- instApplicativeConst = Applicative.mk
instance
instLawfulApplicativeConstInstApplicativeConstToOneToMulToMulOneClass
{α : Type u_1}
[Monoid α]
:
Equations
- instApplicativeAddConst = Applicative.mk
instance
instLawfulApplicativeAddConstInstApplicativeAddConstToZeroToAddToAddSemigroup
{α : Type u_1}
[AddMonoid α]
: