mathlib documentation

control.​applicative

control.​applicative

theorem applicative.​map_seq_map {F : Type uType v} [applicative F] [is_lawful_applicative F] {α β γ σ : Type u} (f : α → β → γ) (g : σ → β) (x : F α) (y : F σ) :
f <$> x <*> g <$> y = (flip function.comp g f) <$> x <*> y

theorem applicative.​pure_seq_eq_map' {F : Type uType v} [applicative F] [is_lawful_applicative F] {α β : Type u} (f : α → β) :

theorem applicative.​ext {F : Type uType u_1} {A1 A2 : applicative F} [is_lawful_applicative F] [is_lawful_applicative F] :
(∀ {α : Type u} (x : α), has_pure.pure x = has_pure.pure x)(∀ {α β : Type u} (f : F (α → β)) (x : F α), f <*> x = f <*> x)A1 = A2

theorem functor.​comp.​map_pure {F : Type uType w} {G : Type vType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] {α β : Type v} (f : α → β) (x : α) :

theorem functor.​comp.​seq_pure {F : Type uType w} {G : Type vType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] {α β : Type v} (f : functor.comp F G (α → β)) (x : α) :
f <*> has_pure.pure x = (λ (g : α → β), g x) <$> f

theorem functor.​comp.​seq_assoc {F : Type uType w} {G : Type vType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] {α β γ : Type v} (x : functor.comp F G α) (f : functor.comp F G (α → β)) (g : functor.comp F G (β → γ)) :
g <*> (f <*> x) = function.comp <$> g <*> f <*> x

theorem functor.​comp.​pure_seq_eq_map {F : Type uType w} {G : Type vType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] {α β : Type v} (f : α → β) (x : functor.comp F G α) :

@[instance]

Equations
theorem comp.​seq_mk {α β : Type w} {f : Type uType v} {g : Type wType u} [applicative f] [applicative g] (h : f (g (α → β))) (x : f (g α)) :