The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Control.EquivFunctor

14 declarations. Mathlib docs · Source

def EquivFunctor.ctorIdx E1 #

{f : Type u₀ → Type u₁} → EquivFunctor f → ℕ

class EquivFunctor E1 #

(Type u₀ → Type u₁) → Type (max (u₀ + 1) u₁)

An EquivFunctor is only functorial with respect to equivalences.

To construct an EquivFunctor, it suffices to supply just the function f α → f β from an equivalence α ≃ β, and then prove the functor laws. It's then a consequence that this function is part of an equivalence, provided by EquivFunctor.mapEquiv.

ctor EquivFunctor.mk E0 #

{f : Type u₀ → Type u₁} →
  (map : {α β : Type u₀} → α ≃ β → f α → f β) →
    autoParam (∀ (α : Type u₀), map (Equiv.refl α) = id) EquivFunctor.map_refl'._autoParam →
      autoParam (∀ {α β γ : Type u₀} (k : α ≃ β) (h : β ≃ γ), map (k.trans h) = map h ∘ map k)
          EquivFunctor.map_trans'._autoParam →
        EquivFunctor f

abbrev EquivFunctor.map E1 #

{f : Type u₀ → Type u₁} → [self : EquivFunctor f] → {α β : Type u₀} → α ≃ β → f α → f β

The action of f on isomorphisms.

theorem EquivFunctor.map_refl' E0 #

∀ {f : Type u₀ → Type u₁} [self : EquivFunctor f] (α : Type u₀), EquivFunctor.map (Equiv.refl α) = id

map of f preserves the identity morphism.

theorem EquivFunctor.map_trans' E0 #

∀ {f : Type u₀ → Type u₁} [self : EquivFunctor f] {α β γ : Type u₀} (k : α ≃ β) (h : β ≃ γ),
  EquivFunctor.map (k.trans h) = EquivFunctor.map h ∘ EquivFunctor.map k

map is functorial on equivalences.

def EquivFunctor.mapEquiv E1 #

(f : Type u₀ → Type u₁) → [EquivFunctor f] → {α β : Type u₀} → α ≃ β → f α ≃ f β

An EquivFunctor in fact takes every equiv to an equiv.

theorem EquivFunctor.mapEquiv_apply E0 #

∀ (f : Type u₀ → Type u₁) [inst : EquivFunctor f] {α β : Type u₀} (e : α ≃ β) (x : f α),
  (EquivFunctor.mapEquiv f e) x = EquivFunctor.map e x

theorem EquivFunctor.mapEquiv_symm_apply E0 #

∀ (f : Type u₀ → Type u₁) [inst : EquivFunctor f] {α β : Type u₀} (e : α ≃ β) (y : f β),
  (EquivFunctor.mapEquiv f e).symm y = EquivFunctor.map e.symm y

theorem EquivFunctor.mapEquiv_refl E0 #

∀ (f : Type u₀ → Type u₁) [inst : EquivFunctor f] (α : Type u₀),
  EquivFunctor.mapEquiv f (Equiv.refl α) = Equiv.refl (f α)

theorem EquivFunctor.mapEquiv_symm E0 #

∀ (f : Type u₀ → Type u₁) [inst : EquivFunctor f] {α β : Type u₀} (e : α ≃ β),
  (EquivFunctor.mapEquiv f e).symm = EquivFunctor.mapEquiv f e.symm

theorem EquivFunctor.mapEquiv_trans E0 #

∀ (f : Type u₀ → Type u₁) [inst : EquivFunctor f] {α β γ : Type u₀} (ab : α ≃ β) (bc : β ≃ γ),
  (EquivFunctor.mapEquiv f ab).trans (EquivFunctor.mapEquiv f bc) = EquivFunctor.mapEquiv f (ab.trans bc)

The composition of mapEquivs is carried over the EquivFunctor. For plain Functors, this lemma is named map_map when applied or map_comp_map when not applied.

instance EquivFunctor.ofLawfulFunctor E0 #

(f : Type u₀ → Type u₁) → [inst : Functor f] → [LawfulFunctor f] → EquivFunctor f

theorem EquivFunctor.mapEquiv.injective E1 #

∀ (f : Type u₀ → Type u₁) [inst : Applicative f] [inst_1 : LawfulApplicative f] {α β : Type u₀},
  (∀ (γ : Type u₀), Function.Injective pure) → Function.Injective (EquivFunctor.mapEquiv f)