Documentation

Mathlib.Control.Bitraversable.Lemmas

Bitraversable Lemmas #

Main definitions #

Lemmas #

Combination of

with the applicatives id and comp

References #

Tags #

traversable bitraversable functor bifunctor applicative

@[reducible]
def Bitraversable.tfst {t : Type u → Type u → Type u} [Bitraversable t] {β : Type u} {F : Type u → Type u} [Applicative F] {α : Type u} {α' : Type u} (f : αF α') :
t α βF (t α' β)

traverse on the first functor argument

Equations
Instances For
    @[reducible]
    def Bitraversable.tsnd {t : Type u → Type u → Type u} [Bitraversable t] {β : Type u} {F : Type u → Type u} [Applicative F] {α : Type u} {α' : Type u} (f : αF α') :
    t β αF (t β α')

    traverse on the second functor argument

    Equations
    Instances For
      theorem Bitraversable.tfst_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} :
      theorem Bitraversable.id_tfst {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} (x : t α β) :
      theorem Bitraversable.tsnd_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} :
      theorem Bitraversable.id_tsnd {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} (x : t α β) :
      theorem Bitraversable.tfst_comp_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {α₂ : Type u} {β : Type u} (f : α₀F α₁) (f' : α₁G α₂) :
      theorem Bitraversable.comp_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {α₂ : Type u} {β : Type u} (f : α₀F α₁) (f' : α₁G α₂) (x : t α₀ β) :
      theorem Bitraversable.tfst_comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {β₀ : Type u} {β₁ : Type u} (f : α₀F α₁) (f' : β₀G β₁) :
      Functor.Comp.mk Functor.map (Bitraversable.tfst f) Bitraversable.tsnd f' = bitraverse (Functor.Comp.mk pure f) (Functor.Comp.mk Functor.map pure f')
      theorem Bitraversable.tfst_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {β₀ : Type u} {β₁ : Type u} (f : α₀F α₁) (f' : β₀G β₁) (x : t α₀ β₀) :
      Functor.Comp.mk (Bitraversable.tfst f <$> Bitraversable.tsnd f' x) = bitraverse (Functor.Comp.mk pure f) (Functor.Comp.mk Functor.map pure f') x
      theorem Bitraversable.tsnd_comp_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {β₀ : Type u} {β₁ : Type u} (f : α₀F α₁) (f' : β₀G β₁) :
      Functor.Comp.mk Functor.map (Bitraversable.tsnd f') Bitraversable.tfst f = bitraverse (Functor.Comp.mk Functor.map pure f) (Functor.Comp.mk pure f')
      theorem Bitraversable.tsnd_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ : Type u} {α₁ : Type u} {β₀ : Type u} {β₁ : Type u} (f : α₀F α₁) (f' : β₀G β₁) (x : t α₀ β₀) :
      Functor.Comp.mk (Bitraversable.tsnd f' <$> Bitraversable.tfst f x) = bitraverse (Functor.Comp.mk Functor.map pure f) (Functor.Comp.mk pure f') x
      theorem Bitraversable.tsnd_comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α : Type u} {β₀ : Type u} {β₁ : Type u} {β₂ : Type u} (g : β₀F β₁) (g' : β₁G β₂) :
      theorem Bitraversable.comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F : Type u → Type u} {G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α : Type u} {β₀ : Type u} {β₁ : Type u} {β₂ : Type u} (g : β₀F β₁) (g' : β₁G β₂) (x : t α β₀) :
      theorem Bitraversable.tfst_eq_fst_id' {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {α' : Type u} {β : Type u} (f : αα') :
      theorem Bitraversable.tfst_eq_fst_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {α' : Type u} {β : Type u} (f : αα') (x : t α β) :
      theorem Bitraversable.tsnd_eq_snd_id' {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} {β' : Type u} (f : ββ') :
      theorem Bitraversable.tsnd_eq_snd_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α : Type u} {β : Type u} {β' : Type u} (f : ββ') (x : t α β) :