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, inline]
abbrev Bitraversable.tfst {t : Type u → Type u → Type u} [Bitraversable t] {β : Type u} {F : Type u → Type u} [Applicative F] {α α' : Type u} (f : αF α') :
t α βF (t α' β)

traverse on the first functor argument

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

    traverse on the second functor argument

    Equations
    Instances For
      theorem Bitraversable.id_tfst {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β : Type u} (x : t α β) :
      theorem Bitraversable.tfst_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β : Type u} :
      theorem Bitraversable.id_tsnd {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β : Type u} (x : t α β) :
      theorem Bitraversable.tsnd_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β : Type u} :
      theorem Bitraversable.comp_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ α₂ β : Type u} (f : α₀F α₁) (f' : α₁G α₂) (x : t α₀ β) :
      theorem Bitraversable.tfst_comp_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ α₂ β : Type u} (f : α₀F α₁) (f' : α₁G α₂) :
      theorem Bitraversable.tfst_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ β₀ β₁ : 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.tfst_comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ β₀ β₁ : 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.tsnd_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ β₀ β₁ : 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_tfst {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α₀ α₁ β₀ β₁ : 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.comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α β₀ β₁ β₂ : Type u} (g : β₀F β₁) (g' : β₁G β₂) (x : t α β₀) :
      theorem Bitraversable.tsnd_comp_tsnd {t : Type u → Type u → Type u} [Bitraversable t] {F G : Type u → Type u} [Applicative F] [Applicative G] [LawfulBitraversable t] [LawfulApplicative F] [LawfulApplicative G] {α β₀ β₁ β₂ : Type u} (g : β₀F β₁) (g' : β₁G β₂) :
      theorem Bitraversable.tfst_eq_fst_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α α' β : Type u} (f : αα') (x : t α β) :
      theorem Bitraversable.tfst_eq_fst_id' {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α α' β : Type u} (f : αα') :
      theorem Bitraversable.tsnd_eq_snd_id {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β β' : Type u} (f : ββ') (x : t α β) :
      theorem Bitraversable.tsnd_eq_snd_id' {t : Type u → Type u → Type u} [Bitraversable t] [LawfulBitraversable t] {α β β' : Type u} (f : ββ') :