File: Mathlib/CategoryTheory/Types.lean

full_name: CategoryTheory.types
code: @[to_additive existing CategoryTheory.types]
instance types : LargeCategory (Type u) 
goal: CategoryTheory.LargeCategory (Type u)

full_name: CategoryTheory.types_hom
code: theorem types_hom {α β : Type u} : (α ⟶ β) = (α → β) 
goal: (α ⟶ β) = (α → β)

full_name: CategoryTheory.types_ext
code: @[ext] theorem types_ext {α β : Type u} (f g : α ⟶ β) (h : ∀ a : α, f a = g a) : f = g 
goal: f = g

full_name: CategoryTheory.types_id
code: theorem types_id (X : Type u) : 𝟙 X = id 
goal: CategoryTheory.CategoryStruct.id X = id

full_name: CategoryTheory.types_comp
code: theorem types_comp {X Y Z : Type u} (f : X ⟶ Y) (g : Y ⟶ Z) : f ≫ g = g ∘ f 
goal: CategoryTheory.CategoryStruct.comp f g = g ∘ f

full_name: CategoryTheory.types_id_apply
code: @[simp]
theorem types_id_apply (X : Type u) (x : X) : (𝟙 X : X → X) x = x 
goal: CategoryTheory.CategoryStruct.id X x = x

full_name: CategoryTheory.types_comp_apply
code: @[simp]
theorem types_comp_apply {X Y Z : Type u} (f : X ⟶ Y) (g : Y ⟶ Z) (x : X) : (f ≫ g) x = g (f x) 
goal: CategoryTheory.CategoryStruct.comp f g x = g (f x)

full_name: CategoryTheory.hom_inv_id_apply
code: @[simp]
theorem hom_inv_id_apply {X Y : Type u} (f : X ≅ Y) (x : X) : f.inv (f.hom x) = x 
goal: f.inv (f.hom x) = x

full_name: CategoryTheory.inv_hom_id_apply
code: @[simp]
theorem inv_hom_id_apply {X Y : Type u} (f : X ≅ Y) (y : Y) : f.hom (f.inv y) = y 
goal: f.hom (f.inv y) = y

full_name: CategoryTheory.asHom
code: /-- `asHom f` helps Lean type check a function as a morphism in the category `Type`. -/
abbrev asHom {α β : Type u} (f : α → β) : α ⟶ β 
goal: α ⟶ β

full_name: CategoryTheory.«_aux_Mathlib_CategoryTheory_Types___macroRules_CategoryTheory_term↾__1»
code: @[inherit_doc]
scoped notation "↾" f:200 => CategoryTheory.asHom f
goal: Lean.Macro

full_name: CategoryTheory._aux_Mathlib_CategoryTheory_Types___unexpand_CategoryTheory_asHom_1
code: @[inherit_doc]
scoped notation "↾" f:200 => CategoryTheory.asHom f
goal: Lean.PrettyPrinter.Unexpander

full_name: CategoryTheory.Functor.sections
code: /-- The sections of a functor `F : J ⥤ Type` are
the choices of a point `u j : F.obj j` for each `j`,
such that `F.map f (u j) = u j'` for every morphism `f : j ⟶ j'`.

We later use these to define limits in `Type` and in many concrete categories.
-/
def sections (F : J ⥤ Type w) : Set (∀ j, F.obj j) 
goal: Set ((j : J) → F.obj j)

full_name: CategoryTheory.Functor.sections_property
code: @[simp]
lemma sections_property {F : J ⥤ Type w} (s : (F.sections : Type _))
    {j j' : J} (f : j ⟶ j') : F.map f (s.val j) = s.val j' 
goal: F.map f (↑s j) = ↑s j'

full_name: CategoryTheory.Functor.sections_ext_iff
code: lemma sections_ext_iff {F : J ⥤ Type w} {x y : F.sections} : x = y ↔ ∀ j, x.val j = y.val j 
goal: x = y ↔ ∀ (j : J), ↑x j = ↑y j

full_name: CategoryTheory.Functor.sectionsFunctor
code: /-- The functor which sends a functor to types to its sections. -/
@[simps]
def sectionsFunctor : (J ⥤ Type w) ⥤ Type max u w 
goal: CategoryTheory.Functor (CategoryTheory.Functor J (Type w)) (Type (max u w))

full_name: CategoryTheory.Functor.sectionsFunctor_obj
code: /-- The functor which sends a functor to types to its sections. -/
@[simps]
def sectionsFunctor : (J ⥤ Type w) ⥤ Type max u w 
goal: (CategoryTheory.Functor.sectionsFunctor J).obj F = ↑F.sections

full_name: CategoryTheory.Functor.sectionsFunctor_map_coe
code: /-- The functor which sends a functor to types to its sections. -/
@[simps]
def sectionsFunctor : (J ⥤ Type w) ⥤ Type max u w 
goal: ↑((CategoryTheory.Functor.sectionsFunctor J).map φ x) j = φ.app j (↑x j)

full_name: CategoryTheory.FunctorToTypes.map_comp_apply
code: @[simp]
theorem map_comp_apply (f : X ⟶ Y) (g : Y ⟶ Z) (a : F.obj X) :
    (F.map (f ≫ g)) a = (F.map g) ((F.map f) a) 
goal: F.map (CategoryTheory.CategoryStruct.comp f g) a = F.map g (F.map f a)

full_name: CategoryTheory.FunctorToTypes.map_id_apply
code: @[simp]
theorem map_id_apply (a : F.obj X) : (F.map (𝟙 X)) a = a 
goal: F.map (CategoryTheory.CategoryStruct.id X) a = a

full_name: CategoryTheory.FunctorToTypes.naturality
code: theorem naturality (f : X ⟶ Y) (x : F.obj X) : σ.app Y ((F.map f) x) = (G.map f) (σ.app X x) 
goal: σ.app Y (F.map f x) = G.map f (σ.app X x)

full_name: CategoryTheory.FunctorToTypes.comp
code: @[simp]
theorem comp (x : F.obj X) : (σ ≫ τ).app X x = τ.app X (σ.app X x) 
goal: (CategoryTheory.CategoryStruct.comp σ τ).app X x = τ.app X (σ.app X x)

full_name: CategoryTheory.FunctorToTypes.eqToHom_map_comp_apply
code: @[simp]
theorem eqToHom_map_comp_apply (p : X = Y) (q : Y = Z) (x : F.obj X) :
    F.map (eqToHom q) (F.map (eqToHom p) x) = F.map (eqToHom <| p.trans q) x 
goal: F.map (CategoryTheory.eqToHom q) (F.map (CategoryTheory.eqToHom p) x) = F.map (CategoryTheory.eqToHom ⋯) x

full_name: CategoryTheory.FunctorToTypes.hcomp
code: @[simp]
theorem hcomp (x : (I ⋙ F).obj W) : (ρ ◫ σ).app W x = (G.map (ρ.app W)) (σ.app (I.obj W) x) 
goal: (ρ ◫ σ).app W x = G.map (ρ.app W) (σ.app (I.obj W) x)

full_name: CategoryTheory.FunctorToTypes.map_inv_map_hom_apply
code: @[simp]
theorem map_inv_map_hom_apply (f : X ≅ Y) (x : F.obj X) : F.map f.inv (F.map f.hom x) = x 
goal: F.map f.inv (F.map f.hom x) = x

full_name: CategoryTheory.FunctorToTypes.map_hom_map_inv_apply
code: @[simp]
theorem map_hom_map_inv_apply (f : X ≅ Y) (y : F.obj Y) : F.map f.hom (F.map f.inv y) = y 
goal: F.map f.hom (F.map f.inv y) = y

full_name: CategoryTheory.FunctorToTypes.hom_inv_id_app_apply
code: @[simp]
theorem hom_inv_id_app_apply (α : F ≅ G) (X) (x) : α.inv.app X (α.hom.app X x) = x 
goal: α.inv.app X (α.hom.app X x) = x

full_name: CategoryTheory.FunctorToTypes.inv_hom_id_app_apply
code: @[simp]
theorem inv_hom_id_app_apply (α : F ≅ G) (X) (x) : α.hom.app X (α.inv.app X x) = x 
goal: α.hom.app X (α.inv.app X x) = x

full_name: CategoryTheory.uliftTrivial
code: /-- The isomorphism between a `Type` which has been `ULift`ed to the same universe,
and the original type.
-/
def uliftTrivial (V : Type u) : ULift.{u} V ≅ V 
goal: ULift.{u, u} V ≅ V

full_name: CategoryTheory.uliftFunctor
code: /-- The functor embedding `Type u` into `Type (max u v)`.
Write this as `uliftFunctor.{5, 2}` to get `Type 2 ⥤ Type 5`.
-/
@[pp_with_univ]
def uliftFunctor : Type u ⥤ Type max u v 
goal: CategoryTheory.Functor (Type u) (Type (max u v))

full_name: CategoryTheory.uliftFunctor_obj
code: @[simp]
theorem uliftFunctor_obj {X : Type u} : uliftFunctor.obj.{v} X = ULift.{v} X 
goal: CategoryTheory.uliftFunctor.{v, u}.obj X = ULift.{v, u} X

full_name: CategoryTheory.uliftFunctor_map
code: @[simp]
theorem uliftFunctor_map {X Y : Type u} (f : X ⟶ Y) (x : ULift.{v} X) :
    uliftFunctor.map f x = ULift.up (f x.down) 
goal: CategoryTheory.uliftFunctor.{v, u}.map f x = { down := f x.down }

full_name: CategoryTheory.uliftFunctor_full
code: instance uliftFunctor_full : Functor.Full.{u} uliftFunctor 
goal: CategoryTheory.uliftFunctor.{u_1, u}.Full

full_name: CategoryTheory.uliftFunctor_faithful
code: instance uliftFunctor_faithful : uliftFunctor.Faithful 
goal: CategoryTheory.uliftFunctor.{u_2, u_1}.Faithful

full_name: CategoryTheory.uliftFunctorTrivial
code: /-- The functor embedding `Type u` into `Type u` via `ULift` is isomorphic to the identity functor.
 -/
def uliftFunctorTrivial : uliftFunctor.{u, u} ≅ 𝟭 _ 
goal: CategoryTheory.uliftFunctor.{u, u} ≅ CategoryTheory.Functor.id (Type u)

full_name: CategoryTheory.homOfElement
code: /-- Any term `x` of a type `X` corresponds to a morphism `PUnit ⟶ X`. -/
def homOfElement {X : Type u} (x : X) : PUnit ⟶ X 
goal: PUnit.{u + 1} ⟶ X

full_name: CategoryTheory.homOfElement_eq_iff
code: theorem homOfElement_eq_iff {X : Type u} (x y : X) : homOfElement x = homOfElement y ↔ x = y 
goal: CategoryTheory.homOfElement x = CategoryTheory.homOfElement y ↔ x = y

full_name: CategoryTheory.mono_iff_injective
code: /-- A morphism in `Type` is a monomorphism if and only if it is injective.

See <https://stacks.math.columbia.edu/tag/003C>.
-/
theorem mono_iff_injective {X Y : Type u} (f : X ⟶ Y) : Mono f ↔ Function.Injective f 
goal: CategoryTheory.Mono f ↔ Function.Injective f

full_name: CategoryTheory.injective_of_mono
code: theorem injective_of_mono {X Y : Type u} (f : X ⟶ Y) [hf : Mono f] : Function.Injective f 
goal: Function.Injective f

full_name: CategoryTheory.epi_iff_surjective
code: /-- A morphism in `Type` is an epimorphism if and only if it is surjective.

See <https://stacks.math.columbia.edu/tag/003C>.
-/
theorem epi_iff_surjective {X Y : Type u} (f : X ⟶ Y) : Epi f ↔ Function.Surjective f 
goal: CategoryTheory.Epi f ↔ Function.Surjective f

full_name: CategoryTheory.surjective_of_epi
code: theorem surjective_of_epi {X Y : Type u} (f : X ⟶ Y) [hf : Epi f] : Function.Surjective f 
goal: Function.Surjective f

full_name: CategoryTheory.ofTypeFunctor
code: /-- `ofTypeFunctor m` converts from Lean's `Type`-based `Category` to `CategoryTheory`. This
allows us to use these functors in category theory. -/
def ofTypeFunctor (m : Type u → Type v) [_root_.Functor m] [LawfulFunctor m] : Type u ⥤ Type v 
goal: CategoryTheory.Functor (Type u) (Type v)

full_name: CategoryTheory.ofTypeFunctor_obj
code: @[simp]
theorem ofTypeFunctor_obj : (ofTypeFunctor m).obj = m 
goal: (CategoryTheory.ofTypeFunctor m).obj = m

full_name: CategoryTheory.ofTypeFunctor_map
code: @[simp]
theorem ofTypeFunctor_map {α β} (f : α → β) :
    (ofTypeFunctor m).map f = (Functor.map f : m α → m β) 
goal: (CategoryTheory.ofTypeFunctor m).map f = Functor.map f

full_name: Equiv.toIso
code: /-- Any equivalence between types in the same universe gives
a categorical isomorphism between those types.
-/
def toIso (e : X ≃ Y) : X ≅ Y 
goal: X ≅ Y

full_name: Equiv.toIso_hom
code: @[simp]
theorem toIso_hom {e : X ≃ Y} : e.toIso.hom = e 
goal: e.toIso.hom = ⇑e

full_name: Equiv.toIso_inv
code: @[simp]
theorem toIso_inv {e : X ≃ Y} : e.toIso.inv = e.symm 
goal: e.toIso.inv = ⇑e.symm

full_name: CategoryTheory.Iso.toEquiv
code: /-- Any isomorphism between types gives an equivalence. -/
def toEquiv (i : X ≅ Y) : X ≃ Y 
goal: X ≃ Y

full_name: CategoryTheory.Iso.toEquiv_fun
code: @[simp]
theorem toEquiv_fun (i : X ≅ Y) : (i.toEquiv : X → Y) = i.hom 
goal: ⇑i.toEquiv = i.hom

full_name: CategoryTheory.Iso.toEquiv_symm_fun
code: @[simp]
theorem toEquiv_symm_fun (i : X ≅ Y) : (i.toEquiv.symm : Y → X) = i.inv 
goal: ⇑i.toEquiv.symm = i.inv

full_name: CategoryTheory.Iso.toEquiv_id
code: @[simp]
theorem toEquiv_id (X : Type u) : (Iso.refl X).toEquiv = Equiv.refl X 
goal: (CategoryTheory.Iso.refl X).toEquiv = Equiv.refl X

full_name: CategoryTheory.Iso.toEquiv_comp
code: @[simp]
theorem toEquiv_comp {X Y Z : Type u} (f : X ≅ Y) (g : Y ≅ Z) :
    (f ≪≫ g).toEquiv = f.toEquiv.trans g.toEquiv 
goal: (f ≪≫ g).toEquiv = f.toEquiv.trans g.toEquiv

full_name: CategoryTheory.isIso_iff_bijective
code: /-- A morphism in `Type u` is an isomorphism if and only if it is bijective. -/
theorem isIso_iff_bijective {X Y : Type u} (f : X ⟶ Y) : IsIso f ↔ Function.Bijective f 
goal: CategoryTheory.IsIso f ↔ Function.Bijective f

full_name: CategoryTheory.instSplitEpiCategoryType
code: instance : SplitEpiCategory (Type u) 
goal: CategoryTheory.SplitEpiCategory (Type u)

full_name: equivIsoIso
code: /-- Equivalences (between types in the same universe) are the same as (isomorphic to) isomorphisms
of types. -/
@[simps]
def equivIsoIso {X Y : Type u} : X ≃ Y ≅ X ≅ Y 
goal: X ≃ Y ≅ X ≅ Y

full_name: equivIsoIso_inv
code: /-- Equivalences (between types in the same universe) are the same as (isomorphic to) isomorphisms
of types. -/
@[simps]
def equivIsoIso {X Y : Type u} : X ≃ Y ≅ X ≅ Y 
goal: equivIsoIso.inv i = i.toEquiv

full_name: equivIsoIso_hom
code: /-- Equivalences (between types in the same universe) are the same as (isomorphic to) isomorphisms
of types. -/
@[simps]
def equivIsoIso {X Y : Type u} : X ≃ Y ≅ X ≅ Y 
goal: equivIsoIso.hom e = e.toIso

full_name: equivEquivIso
code: /-- Equivalences (between types in the same universe) are the same as (equivalent to) isomorphisms
of types. -/
def equivEquivIso {X Y : Type u} : X ≃ Y ≃ (X ≅ Y) 
goal: X ≃ Y ≃ (X ≅ Y)

full_name: equivEquivIso_hom
code: @[simp]
theorem equivEquivIso_hom {X Y : Type u} (e : X ≃ Y) : equivEquivIso e = e.toIso 
goal: equivEquivIso e = e.toIso

full_name: equivEquivIso_inv
code: @[simp]
theorem equivEquivIso_inv {X Y : Type u} (e : X ≅ Y) : equivEquivIso.symm e = e.toEquiv 
goal: equivEquivIso.symm e = e.toEquiv