File: Mathlib/Control/Traversable/Equiv.lean

full_name: Equiv.map
code: /-- Given a functor `t`, a function `t' : Type u → Type u`, and
equivalences `t α ≃ t' α` for all `α`, then every function `α → β` can
be mapped to a function `t' α → t' β` functorially (see
`Equiv.functor`). -/
protected def map {α β : Type u} (f : α → β) (x : t' α) : t' β 
goal: t' β

full_name: Equiv.functor
code: /-- The function `Equiv.map` transfers the functoriality of `t` to
`t'` using the equivalences `eqv`.  -/
protected def functor : Functor t' 
goal: Functor t'

full_name: Equiv.id_map
code: protected theorem id_map {α : Type u} (x : t' α) : Equiv.map eqv id x = x 
goal: Equiv.map eqv id x = x

full_name: Equiv.comp_map
code: protected theorem comp_map {α β γ : Type u} (g : α → β) (h : β → γ) (x : t' α) :
    Equiv.map eqv (h ∘ g) x = Equiv.map eqv h (Equiv.map eqv g x) 
goal: Equiv.map eqv (h ∘ g) x = Equiv.map eqv h (Equiv.map eqv g x)

full_name: Equiv.lawfulFunctor
code: protected theorem lawfulFunctor : @LawfulFunctor _ (Equiv.functor eqv) 
goal: LawfulFunctor t'

full_name: Equiv.lawfulFunctor'
code: protected theorem lawfulFunctor' [F : Functor t']
    (h₀ : ∀ {α β} (f : α → β), Functor.map f = Equiv.map eqv f)
    (h₁ : ∀ {α β} (f : β), Functor.mapConst f = (Equiv.map eqv ∘ Function.const α) f) :
    LawfulFunctor t' 
goal: LawfulFunctor t'

full_name: Equiv.traverse
code: /-- Like `Equiv.map`, a function `t' : Type u → Type u` can be given
the structure of a traversable functor using a traversable functor
`t'` and equivalences `t α ≃ t' α` for all α. See `Equiv.traversable`. -/
protected def traverse (f : α → m β) (x : t' α) : m (t' β) 
goal: m (t' β)

full_name: Equiv.traverse_def
code: theorem traverse_def (f : α → m β) (x : t' α) :
    Equiv.traverse eqv f x = eqv β <$> traverse f ((eqv α).symm x) 
goal: Equiv.traverse eqv f x = ⇑(eqv β) <$> traverse f ((eqv α).symm x)

full_name: Equiv.traversable
code: /-- The function `Equiv.traverse` transfers a traversable functor
instance across the equivalences `eqv`. -/
protected def traversable : Traversable t' 
goal: Traversable t'

full_name: Equiv.id_traverse
code: protected theorem id_traverse (x : t' α) : Equiv.traverse eqv (pure : α → Id α) x = x 
goal: Equiv.traverse eqv pure x = x

full_name: Equiv.traverse_eq_map_id
code: protected theorem traverse_eq_map_id (f : α → β) (x : t' α) :
    Equiv.traverse eqv ((pure : β → Id β) ∘ f) x = pure (Equiv.map eqv f x) 
goal: Equiv.traverse eqv (pure ∘ f) x = pure (Equiv.map eqv f x)

full_name: Equiv.comp_traverse
code: protected theorem comp_traverse (f : β → F γ) (g : α → G β) (x : t' α) :
    Equiv.traverse eqv (Comp.mk ∘ Functor.map f ∘ g) x =
      Comp.mk (Equiv.traverse eqv f <$> Equiv.traverse eqv g x) 
goal: Equiv.traverse eqv (Functor.Comp.mk ∘ Functor.map f ∘ g) x =
  Functor.Comp.mk (Equiv.traverse eqv f <$> Equiv.traverse eqv g x)

full_name: Equiv.naturality
code: protected theorem naturality (f : α → F β) (x : t' α) :
    η (Equiv.traverse eqv f x) = Equiv.traverse eqv (@η _ ∘ f) x 
goal: (fun {α} => η.app α) (Equiv.traverse eqv f x) = Equiv.traverse eqv ((fun {α} => η.app α) ∘ f) x

full_name: Equiv.isLawfulTraversable
code: /-- The fact that `t` is a lawful traversable functor carries over the
equivalences to `t'`, with the traversable functor structure given by
`Equiv.traversable`. -/
protected theorem isLawfulTraversable : @LawfulTraversable t' (Equiv.traversable eqv) 
goal: LawfulTraversable t'

full_name: Equiv.isLawfulTraversable'
code: /-- If the `Traversable t'` instance has the properties that `map`,
`map_const`, and `traverse` are equal to the ones that come from
carrying the traversable functor structure from `t` over the
equivalences, then the fact that `t` is a lawful traversable functor
carries over as well. -/
protected theorem isLawfulTraversable' [Traversable t']
    (h₀ : ∀ {α β} (f : α → β), map f = Equiv.map eqv f)
    (h₁ : ∀ {α β} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f)
    (h₂ : ∀ {F : Type u → Type u} [Applicative F],
      ∀ [LawfulApplicative F] {α β} (f : α → F β), traverse f = Equiv.traverse eqv f) :
    LawfulTraversable t' 
goal: LawfulTraversable t'