mathlib documentation

control.​traversable.​equiv

control.​traversable.​equiv

def equiv.​map {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] {α β : Type u} :
(α → β)t' αt' β

Equations
def equiv.​functor {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] :

Equations
theorem equiv.​id_map {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] [is_lawful_functor t] {α : Type u} (x : t' α) :
equiv.map eqv id x = x

theorem equiv.​comp_map {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] [is_lawful_functor t] {α β γ : Type u} (g : α → β) (h : β → γ) (x : t' α) :
equiv.map eqv (h g) x = equiv.map eqv h (equiv.map eqv g x)

theorem equiv.​is_lawful_functor {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] [is_lawful_functor t] :

theorem equiv.​is_lawful_functor' {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [functor t] [is_lawful_functor t] [F : functor t'] :
(∀ {α β : Type u} (f : α → β), functor.map f = equiv.map eqv f)(∀ {α β : Type u} (f : β), functor.map_const f = (equiv.map eqv function.const α) f)is_lawful_functor t'

def equiv.​traverse {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] {m : Type uType u} [applicative m] {α β : Type u} :
(α → m β)t' αm (t' β)

Equations
def equiv.​traversable {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] :

Equations
theorem equiv.​id_traverse {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] {α : Type u} (x : t' α) :

theorem equiv.​traverse_eq_map_id {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] {α β : Type u} (f : α → β) (x : t' α) :
equiv.traverse eqv (id.mk f) x = id.mk (equiv.map eqv f x)

theorem equiv.​comp_traverse {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] {F G : Type uType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] {α β γ : Type u} (f : β → F γ) (g : α → G β) (x : t' α) :

theorem equiv.​naturality {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] {F G : Type uType u} [applicative F] [applicative G] [is_lawful_applicative F] [is_lawful_applicative G] (η : applicative_transformation F G) {α β : Type u} (f : α → F β) (x : t' α) :
η (equiv.traverse eqv f x) = equiv.traverse eqv (η f) x

def equiv.​is_lawful_traversable {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] :

Equations
def equiv.​is_lawful_traversable' {t t' : Type uType u} (eqv : Π (α : Type u), t α t' α) [traversable t] [is_lawful_traversable t] [traversable t'] :
(∀ {α β : Type u} (f : α → β), functor.map f = equiv.map eqv f)(∀ {α β : Type u} (f : β), functor.map_const f = (equiv.map eqv function.const α) f)(∀ {F : Type uType u} [_inst_7 : applicative F] [_inst_8 : is_lawful_applicative F] {α β : Type u} (f : α → F β), traversable.traverse f = equiv.traverse eqv f)is_lawful_traversable t'

Equations