Binary (co)products
We define a category walking_pair
, which is the index category
for a binary (co)product diagram. A convenience method pair X Y
constructs the functor from the walking pair, hitting the given objects.
We define prod X Y
and coprod X Y
as limits and colimits of such functors.
Typeclasses has_binary_products
and has_binary_coproducts
assert the existence
of (co)limits shaped as walking pairs.
We include lemmas for simplifying equations involving projections and coprojections, and define braiding and associating isomorphisms, and the product comparison morphism.
The type of objects for the diagram indexing a binary (co)product.
The equivalence swapping left and right.
Equations
- category_theory.limits.walking_pair.swap = {to_fun := λ (j : category_theory.limits.walking_pair), j.rec_on category_theory.limits.walking_pair.right category_theory.limits.walking_pair.left, inv_fun := λ (j : category_theory.limits.walking_pair), j.rec_on category_theory.limits.walking_pair.right category_theory.limits.walking_pair.left, left_inv := category_theory.limits.walking_pair.swap._proof_1, right_inv := category_theory.limits.walking_pair.swap._proof_2}
An equivalence from walking_pair
to bool
, sometimes useful when reindexing limits.
Equations
- category_theory.limits.walking_pair.equiv_bool = {to_fun := λ (j : category_theory.limits.walking_pair), j.rec_on bool.tt bool.ff, inv_fun := λ (b : bool), b.rec_on category_theory.limits.walking_pair.right category_theory.limits.walking_pair.left, left_inv := category_theory.limits.walking_pair.equiv_bool._proof_1, right_inv := category_theory.limits.walking_pair.equiv_bool._proof_2}
The diagram on the walking pair, sending the two points to X
and Y
.
Equations
- category_theory.limits.pair X Y = category_theory.discrete.functor (λ (j : category_theory.limits.walking_pair), j.cases_on X Y)
The natural transformation between two functors out of the walking pair, specified by its components.
Equations
- category_theory.limits.map_pair f g = {app := λ (j : category_theory.discrete category_theory.limits.walking_pair), category_theory.limits.map_pair._match_1 f g j, naturality' := _}
- category_theory.limits.map_pair._match_1 f g category_theory.limits.walking_pair.right = g
- category_theory.limits.map_pair._match_1 f g category_theory.limits.walking_pair.left = f
The natural isomorphism between two functors out of the walking pair, specified by its components.
Equations
- category_theory.limits.map_pair_iso f g = {hom := category_theory.limits.map_pair f.hom g.hom, inv := category_theory.limits.map_pair f.inv g.inv, hom_inv_id' := _, inv_hom_id' := _}
The natural isomorphism between pair X Y ⋙ F
and pair (F.obj X) (F.obj Y)
.
Every functor out of the walking pair is naturally isomorphic (actually, equal) to a pair
A binary fan is just a cone on a diagram indexing a product.
The first projection of a binary fan.
The second projection of a binary fan.
A binary cofan is just a cocone on a diagram indexing a coproduct.
The first inclusion of a binary cofan.
The second inclusion of a binary cofan.
A binary fan with vertex P
consists of the two projections π₁ : P ⟶ X
and π₂ : P ⟶ Y
.
Equations
- category_theory.limits.binary_fan.mk π₁ π₂ = {X := P, π := {app := λ (j : category_theory.discrete category_theory.limits.walking_pair), category_theory.limits.walking_pair.cases_on j π₁ π₂, naturality' := _}}
A binary cofan with vertex P
consists of the two inclusions ι₁ : X ⟶ P
and ι₂ : Y ⟶ P
.
Equations
- category_theory.limits.binary_cofan.mk ι₁ ι₂ = {X := P, ι := {app := λ (j : category_theory.discrete category_theory.limits.walking_pair), category_theory.limits.walking_pair.cases_on j ι₁ ι₂, naturality' := _}}
If s
is a limit binary fan over X
and Y
, then every pair of morphisms f : W ⟶ X
and
g : W ⟶ Y
induces a morphism l : W ⟶ s.X
satisfying l ≫ s.fst = f
and l ≫ s.snd = g
.
Equations
If s
is a colimit binary cofan over X
and Y
,, then every pair of morphisms f : X ⟶ W
and
g : Y ⟶ W
induces a morphism l : s.X ⟶ W
satisfying s.inl ≫ l = f
and s.inr ≫ l = g
.
Equations
An abbreviation for has_limit (pair X Y)
.
Instances
An abbreviation for has_colimit (pair X Y)
.
If we have chosen a product of X
and Y
, we can access it using prod X Y
or
X ⨯ Y
.
If we have chosen a coproduct of X
and Y
, we can access it using coprod X Y
or
X ⨿ Y
.
The projection map to the first component of the product.
The projecton map to the second component of the product.
The inclusion map from the first component of the coproduct.
The inclusion map from the second component of the coproduct.
If the product of X
and Y
exists, then every pair of morphisms f : W ⟶ X
and g : W ⟶ Y
induces a morphism prod.lift f g : W ⟶ X ⨯ Y
.
If the coproduct of X
and Y
exists, then every pair of morphisms f : X ⟶ W
and
g : Y ⟶ W
induces a morphism coprod.desc f g : X ⨿ Y ⟶ W
.
Equations
- _ = _
Equations
- _ = _
Equations
- _ = _
Equations
- _ = _
If the product of X
and Y
exists, then every pair of morphisms f : W ⟶ X
and g : W ⟶ Y
induces a morphism l : W ⟶ X ⨯ Y
satisfying l ≫ prod.fst = f
and l ≫ prod.snd = g
.
Equations
If the coproduct of X
and Y
exists, then every pair of morphisms f : X ⟶ W
and
g : Y ⟶ W
induces a morphism l : X ⨿ Y ⟶ W
satisfying coprod.inl ≫ l = f
and
coprod.inr ≫ l = g
.
Equations
If the products W ⨯ X
and Y ⨯ Z
exist, then every pair of morphisms f : W ⟶ Y
and
g : X ⟶ Z
induces a morphism prod.map f g : W ⨯ X ⟶ Y ⨯ Z
.
If the products W ⨯ X
and Y ⨯ Z
exist, then every pair of isomorphisms f : W ≅ Y
and
g : X ≅ Z
induces a isomorphism prod.map_iso f g : W ⨯ X ≅ Y ⨯ Z
.
If the coproducts W ⨿ X
and Y ⨿ Z
exist, then every pair of morphisms f : W ⟶ Y
and
g : W ⟶ Z
induces a morphism coprod.map f g : W ⨿ X ⟶ Y ⨿ Z
.
If the coproducts W ⨿ X
and Y ⨿ Z
exist, then every pair of isomorphisms f : W ≅ Y
and
g : W ≅ Z
induces a isomorphism coprod.map_iso f g : W ⨿ X ≅ Y ⨿ Z
.
has_binary_products
represents a choice of product for every pair of objects.
has_binary_coproducts
represents a choice of coproduct for every pair of objects.
If C
has all limits of diagrams pair X Y
, then it has all binary products
If C
has all colimits of diagrams pair X Y
, then it has all binary coproducts
The binary product functor.
Equations
- category_theory.limits.prod_functor = {obj := λ (X : C), {obj := λ (Y : C), X ⨯ Y, map := λ (Y Z : C), category_theory.limits.prod.map (𝟙 X), map_id' := _, map_comp' := _}, map := λ (Y Z : C) (f : Y ⟶ Z), {app := λ (T : C), category_theory.limits.prod.map f (𝟙 T), naturality' := _}, map_id' := _, map_comp' := _}
The product comparison morphism.
In category_theory/limits/preserves
we show this is always an iso iff F preserves binary products.
Naturality of the prod_comparison morphism in both arguments.
If the product comparison morphism is an iso, its inverse is natural.