mathlib3documentation

category_theory.limits.shapes.types

Special shapes for limits in Type. #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

The general shape (co)limits defined in category_theory.limits.types are intended for use through the limits API, and the actual implementation should mostly be considered "sealed".

In this file, we provide definitions of the "standard" special shapes of limits in Type, giving the expected definitional implementation:

• the terminal object is punit
• the binary product of X and Y is X × Y
• the product of a family f : J → Type is Π j, f j
• the coproduct of a family f : J → Type is Σ j, f j
• the binary coproduct of X and Y is the sum type X ⊕ Y
• the equalizer of a pair of maps (g, h) is the subtype {x : Y // g x = h x}
• the coequalizer of a pair of maps (f, g) is the quotient of Y by ∀ x : Y, f x ~ g x
• the pullback of f : X ⟶ Z and g : Y ⟶ Z is the subtype { p : X × Y // f p.1 = g p.2 } of the product

We first construct terms of is_limit and limit_cone, and then provide isomorphisms with the types generated by the has_limit API.

As an example, when setting up the monoidal category structure on Type we use the types_has_terminal and types_has_binary_products instances.

@[simp]
theorem category_theory.limits.types.pi_lift_π_apply {β : Type u} (f : β Type u) {P : Type u} (s : Π (b : β), P f b) (b : β) (x : P) :
= s b x

A restatement of types.lift_π_apply that uses pi.π and pi.lift.

@[simp]
theorem category_theory.limits.types.pi_map_π_apply {β : Type u} {f g : β Type u} (α : Π (j : β), f j g j) (b : β) (x : λ (j : β), f j) :
= α b x)

A restatement of types.map_π_apply that uses pi.π and pi.map.

The category of types has punit as a terminal object.

Equations

The terminal object in Type u is punit.

Equations

The terminal object in Type u is punit.

Equations

The category of types has pempty as an initial object.

Equations

The initial object in Type u is pempty.

Equations

The initial object in Type u is pempty.

Equations

The product type X × Y forms a cone for the binary product of X and Y.

Equations
@[simp]
@[simp]
@[simp]
theorem category_theory.limits.types.binary_product_limit_lift (X Y : Type u) (x : s.X) :
= (s.fst x, s.snd x)

The product type X × Y is a binary product for X and Y.

Equations

The category of types has X × Y, the usual cartesian product, as the binary product of X and Y.

Equations
@[simp]
@[simp]
noncomputable def category_theory.limits.types.binary_product_iso (X Y : Type u) :
X Y X × Y

The categorical binary product in Type u is cartesian product.

Equations
@[simp]
@[simp]
@[simp]
@[simp]

The functor which sends X, Y to the product type X × Y.

Equations
@[simp]
theorem category_theory.limits.types.binary_product_functor_map_app (X₁ X₂ : Type u) (f : X₁ X₂) (Y : Type u) :
@[simp]
theorem category_theory.limits.types.binary_product_functor_obj_map (X Y₁ Y₂ : Type u) (f : Y₁ Y₂) :

The product functor given by the instance has_binary_products (Type u) is isomorphic to the explicit binary product functor given by the product type.

Equations

The sum type X ⊕ Y forms a cocone for the binary coproduct of X and Y.

Equations
@[simp]
theorem category_theory.limits.types.binary_coproduct_cocone_ι_app (X Y : Type u) (ᾰ : j) :
= category_theory.discrete.rec (category_theory.limits.walking_pair.rec sum.inl sum.inr) j

The sum type X ⊕ Y is a binary coproduct for X and Y.

Equations
@[simp]

The category of types has X ⊕ Y, as the binary coproduct of X and Y.

Equations
noncomputable def category_theory.limits.types.binary_coproduct_iso (X Y : Type u) :
X ⨿ Y X Y

The categorical binary coproduct in Type u is the sum X ⊕ Y.

Equations
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
@[simp]
noncomputable def category_theory.limits.types.is_coprod_of_mono {X Y : Type u} (f : X Y)  :

Any monomorphism in Type is an coproduct injection.

Equations

The category of types has Π j, f j as the product of a type family f : J → Type.

Equations
noncomputable def category_theory.limits.types.product_iso {J : Type u} (F : J Type (max u v)) :
F Π (j : J), F j

The categorical product in Type u is the type theoretic product Π j, F j.

Equations
@[simp]
theorem category_theory.limits.types.product_iso_hom_comp_eval {J : Type u} (F : J Type (max u v)) (j : J) :
λ (f : Π (j : J), F j), f j) =
@[simp]
theorem category_theory.limits.types.product_iso_hom_comp_eval_apply {J : Type u} (F : J Type (max u v)) (j : J) (x : F) :
@[simp]
theorem category_theory.limits.types.product_iso_inv_comp_π {J : Type u} (F : J Type (max u v)) (j : J) :
= λ (f : Π (j : J), F j), f j
@[simp]
theorem category_theory.limits.types.product_iso_inv_comp_π_apply {J : Type u} (F : J Type (max u v)) (j : J) (x : (Π (j : J), F j)) :

The category of types has Σ j, f j as the coproduct of a type family f : J → Type.

Equations
noncomputable def category_theory.limits.types.coproduct_iso {J : Type u} (F : J Type u) :
F Σ (j : J), F j

The categorical coproduct in Type u is the type theoretic coproduct Σ j, F j.

Equations
@[simp]
theorem category_theory.limits.types.coproduct_iso_ι_comp_hom_apply {J : Type u} (F : J Type u) (j : J) (x : (F j)) :
@[simp]
theorem category_theory.limits.types.coproduct_iso_ι_comp_hom {J : Type u} (F : J Type u) (j : J) :
= λ (x : F j), j, x⟩
@[simp]
theorem category_theory.limits.types.coproduct_iso_mk_comp_inv_apply {J : Type u} (F : J Type u) (j : J) (x : (F j)) :
@[simp]
theorem category_theory.limits.types.coproduct_iso_mk_comp_inv {J : Type u} (F : J Type u) (j : J) :
category_theory.as_hom (λ (x : F j), j, x⟩) =
noncomputable def category_theory.limits.types.type_equalizer_of_unique {X Y Z : Type u} (f : X Y) {g h : Y Z} (w : f g = f h) (t : (y : Y), g y = h y (∃! (x : X), f x = y)) :

Show the given fork in Type u is an equalizer given that any element in the "difference kernel" comes from X. The converse of unique_of_type_equalizer.

Equations
theorem category_theory.limits.types.unique_of_type_equalizer {X Y Z : Type u} (f : X Y) {g h : Y Z} (w : f g = f h) (y : Y) (hy : g y = h y) :
∃! (x : X), f x = y

The converse of type_equalizer_of_unique.

theorem category_theory.limits.types.type_equalizer_iff_unique {X Y Z : Type u} (f : X Y) {g h : Y Z} (w : f g = f h) :
(y : Y), g y = h y (∃! (x : X), f x = y)

Show that the subtype {x : Y // g x = h x} is an equalizer for the pair (g,h).

Equations
noncomputable def category_theory.limits.types.equalizer_iso {Y Z : Type u} (g h : Y Z) :
{x // g x = h x}

The categorical equalizer in Type u is {x : Y // g x = h x}.

Equations
@[simp]
@[simp]
theorem category_theory.limits.types.equalizer_iso_inv_comp_ι_apply {Y Z : Type u} (g h : Y Z) (x : {x // g x = h x}) :
inductive category_theory.limits.types.coequalizer_rel {X Y : Type u} (f g : X Y) :
Y Y Prop
• rel : {X Y : Type u} {f g : X Y} (x : X), (g x)

(Implementation) The relation to be quotiented to obtain the coequalizer.

Show that the quotient by the relation generated by f(x) ~ g(x) is a coequalizer for the pair (f, g).

Equations
theorem category_theory.limits.types.coequalizer_preimage_image_eq_of_preimage_eq {X Y Z : Type u} (f g : X Y) (π : Y Z) (e : f π = g π) (U : set Y) (H : f ⁻¹' U = g ⁻¹' U) :
π ⁻¹' '' U) = U

If π : Y ⟶ Z is an equalizer for (f, g), and U ⊆ Y such that f ⁻¹' U = g ⁻¹' U, then π ⁻¹' (π '' U) = U.

noncomputable def category_theory.limits.types.coequalizer_iso {X Y : Type u} (f g : X Y) :

The categorical coequalizer in Type u is the quotient by f g ~ g x.

Equations
@[simp]
theorem category_theory.limits.types.coequalizer_iso_π_comp_hom_apply {X Y : Type u} (f g : X Y) (x : Y) :
= quot.mk x
@[simp]
@[simp]
@[nolint, reducible]
def category_theory.limits.types.pullback_obj {X Y Z : Type u} (f : X Z) (g : Y Z) :

The usual explicit pullback in the category of types, as a subtype of the product. The full limit_cone data is bundled as pullback_limit_cone f g.

@[reducible]
def category_theory.limits.types.pullback_cone {X Y Z : Type u} (f : X Z) (g : Y Z) :

The explicit pullback cone on pullback_obj f g. This is bundled with the is_limit data as pullback_limit_cone f g.

def category_theory.limits.types.pullback_limit_cone {X Y Z : Type u} (f : X Z) (g : Y Z) :

The explicit pullback in the category of types, bundled up as a limit_cone for given f and g.

Equations
@[simp]
theorem category_theory.limits.types.pullback_limit_cone_is_limit {X Y Z : Type u} (f : X Z) (g : Y Z) :
= (λ (s : (x : s.X), (s.fst x, s.snd x), _⟩) _ _ _
@[simp]
theorem category_theory.limits.types.pullback_limit_cone_cone {X Y Z : Type u} (f : X Z) (g : Y Z) :
noncomputable def category_theory.limits.types.pullback_cone_iso_pullback {X Y Z : Type u} (f : X Z) (g : Y Z) :

The pullback cone given by the instance has_pullbacks (Type u) is isomorphic to the explicit pullback cone given by pullback_limit_cone.

Equations
noncomputable def category_theory.limits.types.pullback_iso_pullback {X Y Z : Type u} (f : X Z) (g : Y Z) :

The pullback given by the instance has_pullbacks (Type u) is isomorphic to the explicit pullback object given by pullback_limit_obj.

Equations
@[simp]
theorem category_theory.limits.types.pullback_iso_pullback_hom_fst {X Y Z : Type u} (f : X Z) (g : Y Z) (p : g) :
@[simp]
theorem category_theory.limits.types.pullback_iso_pullback_hom_snd {X Y Z : Type u} (f : X Z) (g : Y Z) (p : g) :
@[simp]
theorem category_theory.limits.types.pullback_iso_pullback_inv_fst {X Y Z : Type u} (f : X Z) (g : Y Z) :
@[simp]
theorem category_theory.limits.types.pullback_iso_pullback_inv_snd {X Y Z : Type u} (f : X Z) (g : Y Z) :