Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monoidal category #17

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ example_array.v
example_monty.v
smallstep.v
example_transformer.v
monoidal_category.v
closed_category.v

-R . monae
50 changes: 50 additions & 0 deletions closed_category.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From mathcomp Require Import all_ssreflect.
From mathcomp Require Import boolp.
Require Import monae_lib category.

(*
In this file:
1. categories with finite products
2. categories with pullbacks
2.99. universal arrow (for defining 3)
3. finitely complete categories (categories with finite limits)
4. categories with morphism comprehension
5. cartesian closed categories

3 subsumes 1 and 2.
5 = 1 + 4 + exponentiation axiom.


In monoidal_category.v:
M1. monoidal cateogories
M2. monoidal closed categories

M2 subsumes 5.
*)

Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.

Local Open Scope category_scope.

Module CatWithFinProd.
Section def.
Record mixin_of (C : category) : Type := Mixin {
prod : C -> C -> C;
fst : forall a b, {hom prod a b, a};
snd : forall a b, {hom prod a b, b};
univ : forall c a b, {hom c,a} -> {hom c,b} -> {hom c, prod a b};
_ : forall c a b (f : {hom c,a}) (g : {hom c,b}),
f = [hom (fst a b) \o (univ f g)];
}.
Record class_of (T : Type) : Type := Class {
base : Category.mixin_of T;
mixin : mixin_of (Category.Pack base);
}.
Structure t : Type := Pack { T : Type; class : class_of T }.
End def.
Module Exports.
End Exports.
End CatWithFinProd.
Export CatWithFinProd.Exports.