# 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} [] {α : Type u} {β : Type u} {γ : Type u} {σ : Type u} (f : αβγ) (g : σβ) (x : F α) (y : F σ) :
(Seq.seq (f <$> x) fun (x : Unit) => g <$> y) = Seq.seq (((fun (x : βγ) => x g) f) <$> x) fun (x : Unit) => y theorem Applicative.pure_seq_eq_map' {F : Type u → Type v} [] {α : Type u} {β : Type u} (f : αβ) : (fun (x : F α) => Seq.seq (pure f) fun (x_1 : Unit) => x) = fun (x : F α) => f <$> x
theorem Applicative.ext {F : Type u → Type u_1} {A1 : } {A2 : } :
(∀ {α : Type u} (x : α), pure x = pure x)(∀ {α β : Type u} (f : F (αβ)) (x : F α), (Seq.seq f fun (x_1 : Unit) => x) = Seq.seq f fun (x_1 : Unit) => x)A1 = A2
Equations
theorem Functor.Comp.map_pure {F : Type u → Type w} {G : Type v → Type u} [] [] {α : Type v} {β : Type v} (f : αβ) (x : α) :
f <$> pure x = pure (f x) theorem Functor.Comp.seq_pure {F : Type u → Type w} {G : Type v → Type u} [] [] {α : Type v} {β : Type v} (f : Functor.Comp F G (αβ)) (x : α) : (Seq.seq f fun (x_1 : Unit) => pure x) = (fun (g : αβ) => g x) <$> f
theorem Functor.Comp.seq_assoc {F : Type u → Type w} {G : Type v → Type u} [] [] {α : Type v} {β : Type v} {γ : Type v} (x : Functor.Comp F G α) (f : Functor.Comp F G (αβ)) (g : Functor.Comp F G (βγ)) :
(Seq.seq g fun (x_1 : Unit) => Seq.seq f fun (x_2 : Unit) => x) = Seq.seq (Seq.seq (Function.comp <$> g) fun (x : Unit) => f) fun (x_1 : Unit) => x theorem Functor.Comp.pure_seq_eq_map {F : Type u → Type w} {G : Type v → Type u} [] [] {α : Type v} {β : Type v} (f : αβ) (x : Functor.Comp F G α) : (Seq.seq (pure f) fun (x_1 : Unit) => x) = f <$> x
instance Functor.Comp.instLawfulApplicativeComp {F : Type u → Type w} {G : Type v → Type u} [] [] :
Equations
• =
theorem Functor.Comp.applicative_id_comp {F : Type u_1 → Type u_2} [AF : ] :
Functor.Comp.instApplicativeComp = AF
theorem Functor.Comp.applicative_comp_id {F : Type u_1 → Type u_2} [AF : ] :
Functor.Comp.instApplicativeComp = AF
instance Functor.Comp.instCommApplicative {f : Type u → Type w} {g : Type v → Type u} [] [] [] [] :
Equations
• =
theorem Comp.seq_mk {α : Type w} {β : Type w} {f : Type u → Type v} {g : Type w → Type u} [] [] (h : f (g (αβ))) (x : f (g α)) :
(Seq.seq () fun (x_1 : Unit) => ) = Functor.Comp.mk (Seq.seq ((fun (x : g (αβ)) (x_1 : g α) => Seq.seq x fun (x : Unit) => x_1) <\$> h) fun (x_1 : Unit) => x)
instance instApplicativeConstOfOneOfMul {α : Type u_1} [One α] [Mul α] :
Equations
• instApplicativeConstOfOneOfMul = Applicative.mk
instance instLawfulApplicativeConst {α : Type u_1} [] :
Equations
• =