Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(category_theory): finite products give a monoidal structure (#1340)
* providing minimal API for limits of special shapes * apis for special shapes * start * fintype instances * copy-paste from monoidal-categories-reboot * associators, unitors, braidings for binary product * minor * minor * map * minor * instances * blah * chore(category_theory/monoidal): monoidal_category doesn't extend category * minor * minor * assoc lemma * coprod * done? * fix import * names * cleanup * fix reassoc * comments * comments
- Loading branch information
1 parent
8cd16b9
commit 5d59e8b
Showing
5 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/category_theory/limits/shapes/constructions/finite_limits.lean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- TODO construct finite limits from finite products and equalizers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- TODO construct limits from products and equalizers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/- | ||
Copyright (c) 2019 Scott Morrison. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Scott Morrison, Simon Hudon | ||
-/ | ||
import category_theory.monoidal.category | ||
import category_theory.limits.shapes.finite_products | ||
import category_theory.limits.shapes.binary_products | ||
import category_theory.limits.shapes.terminal | ||
import category_theory.limits.types | ||
|
||
/-! | ||
# The natural monoidal structure on any category with finite (co)products. | ||
A category with a monoidal structure provided in this way is sometimes called a (co)cartesian category, | ||
although this is also sometimes used to mean a finitely complete category. | ||
(See https://ncatlab.org/nlab/show/cartesian+category.) | ||
As this works with either products or coproducts, we don't set up either construct as an instance. | ||
-/ | ||
|
||
open category_theory.limits | ||
|
||
universes v u | ||
|
||
namespace category_theory | ||
|
||
section | ||
variables (C : Type u) [𝒞 : category.{v+1} C] | ||
include 𝒞 | ||
|
||
local attribute [tidy] tactic.case_bash | ||
|
||
/-- A category with finite products has a natural monoidal structure. -/ | ||
def monoidal_of_has_finite_products [has_finite_products.{v} C] : monoidal_category C := | ||
{ tensor_unit := terminal C, | ||
tensor_obj := λ X Y, limits.prod X Y, | ||
tensor_hom := λ _ _ _ _ f g, limits.prod.map f g, | ||
associator := prod.associator, | ||
left_unitor := prod.left_unitor, | ||
right_unitor := prod.right_unitor } | ||
|
||
/-- A category with finite coproducts has a natural monoidal structure. -/ | ||
def monoidal_of_has_finite_coproducts [has_finite_coproducts.{v} C] : monoidal_category C := | ||
{ tensor_unit := initial C, | ||
tensor_obj := λ X Y, limits.coprod X Y, | ||
tensor_hom := λ _ _ _ _ f g, limits.coprod.map f g, | ||
associator := coprod.associator, | ||
left_unitor := coprod.left_unitor, | ||
right_unitor := coprod.right_unitor } | ||
|
||
end | ||
|
||
end category_theory | ||
|
||
-- TODO in fact, a category with finite products is braided, and symmetric, | ||
-- and we should say that here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters