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

Set-enriched categories #1467

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d884132
Uniqueness of general products (up to isomorphism)
langston-barrett Oct 21, 2018
0d97d7f
Associativity of binary products
langston-barrett Oct 21, 2018
b222d1f
Fix notation conflict
langston-barrett Oct 21, 2018
c13d72e
monoidal structure on categories with products
langston-barrett Oct 22, 2018
e629c8b
Migrate proof of binary product associativity to binproducts.v
langston-barrett Oct 28, 2018
dabdc7b
Add Cartesian.v to CONTENTS.md
langston-barrett Oct 28, 2018
ca9bf06
fix errors
umedaikiti Nov 23, 2021
38574c7
Merge branch 'master' into univalence-slices
nmvdw Feb 13, 2022
2d319b9
Merge pull request #1457 from nmvdw/univalence-slices
benediktahrens Feb 14, 2022
096421b
Street (op)fibs in Cat
nmvdw Feb 14, 2022
70324d3
Merge branch 'master' into street-fib-in-cat
nmvdw Feb 14, 2022
d2273bf
Merge pull request #1458 from nmvdw/street-fib-in-cat
benediktahrens Feb 14, 2022
d04c63d
try to get the unicode notation table to look nice in ASCII viewing mode
DanGrayson Feb 17, 2022
36b3874
Merge branch 'master' of github.com:UniMath/UniMath
DanGrayson Feb 17, 2022
5ff1ae2
add some remarks about emacs to USAGE.md
DanGrayson Feb 17, 2022
c725e07
try to get the unicode notation table to look nice in ASCII viewing m…
DanGrayson Feb 17, 2022
f3bb66e
Duality involutions, rework discrete bicats
nmvdw Feb 18, 2022
393e08c
Merge branch 'master' into duality-involution
nmvdw Feb 18, 2022
fc49805
Whoops....
nmvdw Feb 18, 2022
d239668
Remove comments
nmvdw Feb 18, 2022
368f71d
Forgot to add a file
nmvdw Feb 18, 2022
91d2bb0
Merge pull request #1460 from nmvdw/duality-involution
benediktahrens Feb 18, 2022
6cc9f2e
Uniqueness of general products (up to isomorphism)
langston-barrett Oct 21, 2018
8018188
Associativity of binary products
langston-barrett Oct 21, 2018
e1dd9d7
Fix notation conflict
langston-barrett Oct 21, 2018
6c4c07b
monoidal structure on categories with products
langston-barrett Oct 22, 2018
7e7b846
Migrate proof of binary product associativity to binproducts.v
langston-barrett Oct 28, 2018
740c86e
Add Cartesian.v to CONTENTS.md
langston-barrett Oct 28, 2018
2eeccd0
fix errors
umedaikiti Nov 23, 2021
503a80e
remove obsolete file Cats.v with def of precat of cats
benediktahrens Feb 20, 2022
b76613d
dissolve DispCat/Aux
benediktahrens Feb 20, 2022
c08e9d4
Merge pull request #1461 from benediktahrens/issue-1404
DanGrayson Feb 21, 2022
0da7f1c
Merge branch 'master' into issue-1421-sq
benediktahrens Feb 21, 2022
9abbfb0
Merge pull request #1462 from benediktahrens/issue-1421-sq
DanGrayson Feb 21, 2022
ac60705
remove duplicate z_iso_inv_mor
benediktahrens Feb 22, 2022
9ff746c
remove duplicate z_iso_is_z_isomorphism2
benediktahrens Feb 22, 2022
bb95381
remove comments
benediktahrens Feb 22, 2022
f0da7e2
arguments now implicit
benediktahrens Feb 22, 2022
c5f099d
arguments now implicit II
benediktahrens Feb 22, 2022
78e12b4
arguments now implicit III
benediktahrens Feb 22, 2022
b089c47
arguments now implicit IV
benediktahrens Feb 22, 2022
5362f3a
Merge pull request #1463 from benediktahrens/issue-948
benediktahrens Feb 23, 2022
ff504a7
mention tags-search in the INSTALL file
DanGrayson Mar 2, 2022
e4111db
move tags-search discussion from USAGE to INSTALL
DanGrayson Mar 2, 2022
dbda0c0
remove autorewrite
umedaikiti Mar 4, 2022
6d7c516
Merge branch 'cartesian-monoidal' of github.com:umedaikiti/UniMath in…
umedaikiti Mar 4, 2022
2ac52f4
add correspondence between HSET-enriched and ordinary categories
umedaikiti Mar 5, 2022
126a7e9
improve proofs
umedaikiti Mar 5, 2022
39ea615
Merge branch 'UniMath:master' into cartesian-monoidal
umedaikiti Mar 5, 2022
ea2e038
Merge branch 'UniMath:master' into cartesian-monoidal
umedaikiti Mar 5, 2022
0a08dae
remove auto and autorewrite
umedaikiti Mar 5, 2022
16ae6a5
move some parts to UniMath/Bicategories/EnrichedCategories
umedaikiti Mar 7, 2022
18f4a6c
Merge branch 'master' into cartesian-monoidal
benediktahrens Mar 11, 2022
7166753
Merge branch 'master' into cartesian-monoidal
benediktahrens Oct 18, 2022
70c125f
Update UniMath/CategoryTheory/limits/binproducts.v
benediktahrens Nov 7, 2022
9788301
Update UniMath/CategoryTheory/limits/binproducts.v
benediktahrens Nov 7, 2022
2a7cdc5
Update UniMath/CategoryTheory/limits/binproducts.v
benediktahrens Nov 7, 2022
5d42579
Update UniMath/CategoryTheory/limits/binproducts.v
benediktahrens Nov 7, 2022
7c41460
Update UniMath/CategoryTheory/limits/binproducts.v
benediktahrens Nov 7, 2022
98f0cc6
Merge branch 'master' into cartesian-monoidal
benediktahrens Nov 7, 2022
41339c6
Merge branch 'master' into cartesian-monoidal
benediktahrens Nov 18, 2022
9d5e0e4
Update UniMath/CategoryTheory/Monoidal/Cartesian.v
benediktahrens Nov 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion UniMath/Bicategories/.package/files
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,8 @@ DisplayedBicats/FiberBicategory/DisplayMapFiber.v

ComprehensionBicat.v

DualityInvolution.v
DualityInvolution.v

EnrichedCategories/BicatOfEnrichedCat.v
EnrichedCategories/ChangeOfBase.v
EnrichedCategories/HSETEnriched.v
160 changes: 160 additions & 0 deletions UniMath/Bicategories/EnrichedCategories/BicatOfEnrichedCat.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
Require Import UniMath.Foundations.PartA.
Require Import UniMath.Foundations.Sets.
Require Import UniMath.Foundations.Propositions.
Require Import UniMath.CategoryTheory.Core.Categories.
Require Import UniMath.CategoryTheory.Monoidal.MonoidalCategories.
Require Import UniMath.CategoryTheory.Enriched.Enriched.
Require Import UniMath.Bicategories.Core.Bicat.

Local Open Scope cat.

Section BicatOfEnrichedCat.

Definition enriched_precat_prebicat_data (Mon_V : monoidal_cat) : prebicat_data.
Proof.
use build_prebicat_data.
- exact (enriched_precat Mon_V).
- exact enriched_functor.
- exact (@enriched_nat_trans Mon_V).
- exact enriched_functor_identity.
- exact (@enriched_functor_comp Mon_V).
- exact (@enriched_nat_trans_identity Mon_V).
- exact (@enriched_nat_trans_comp Mon_V).
- exact (@pre_whisker Mon_V).
- exact (@post_whisker Mon_V).
- intros C D F.
use make_enriched_nat_trans.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to add a separate definition for this natural transformation and the next one.

+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, id_left;
reflexivity
).
Comment on lines +29 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and elsewhere, the abstract(...) could/should also include the intros.... cbn. tactics.

- intros C D F.
use make_enriched_nat_trans.
+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, id_left;
reflexivity
).
- intros C D F.
use make_enriched_nat_trans.
+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, id_right;
reflexivity
).
- intros C D F.
use make_enriched_nat_trans.
+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, !id_right;
reflexivity
).
- intros A B C D F G H.
use make_enriched_nat_trans.
+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, assoc;
reflexivity
).
- intros A B C D F G H.
use make_enriched_nat_trans.
+ intro x.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite postcompose_identity, precompose_identity, !assoc;
reflexivity
).
Defined.

Lemma enriched_precat_prebicat_laws (Mon_V : monoidal_cat) : prebicat_laws (enriched_precat_prebicat_data Mon_V).
Proof.
repeat split; intros; use enriched_nat_trans_eq; intro; cbn.
- rewrite underlying_morphism_compose_swap, precompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_underlying_morphism_composite.
apply assoc.
- reflexivity.
- apply enriched_functor_on_identity.
- reflexivity.
- rewrite !assoc'.
apply cancel_precomposition.
apply pathsinv0.
apply enriched_functor_on_postcompose.
- rewrite postcompose_identity.
rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
reflexivity.
- rewrite postcompose_identity.
rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
apply id_right.
- rewrite postcompose_identity.
rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
reflexivity.
- rewrite postcompose_identity.
rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
reflexivity.
- rewrite postcompose_identity.
rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
rewrite assoc.
reflexivity.
- apply pathsinv0.
rewrite underlying_morphism_compose_swap.
rewrite !assoc'.
apply cancel_precomposition.
apply pathsinv0.
apply (enriched_nat_trans_ax y).
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite postcompose_identity.
apply id_right.
- rewrite underlying_morphism_compose_swap.
rewrite precompose_identity.
rewrite id_right.
apply enriched_functor_on_identity.
- rewrite enriched_functor_on_identity.
rewrite postcompose_identity.
apply id_right.
Qed.

Definition enriched_precat_prebicat (Mon_V : monoidal_cat) : prebicat := (_,, enriched_precat_prebicat_laws Mon_V).

Definition enriched_precat_bicat (Mon_V : monoidal_cat) : bicat.
Proof.
exists (enriched_precat_prebicat Mon_V).
intros C D F G.
apply isaset_enriched_nat_trans.
Defined.

End BicatOfEnrichedCat.
182 changes: 182 additions & 0 deletions UniMath/Bicategories/EnrichedCategories/ChangeOfBase.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
Require Import UniMath.Foundations.PartA.
Require Import UniMath.Foundations.Propositions.
Require Import UniMath.CategoryTheory.Core.Categories.
Require Import UniMath.CategoryTheory.Core.Functors.
Require Import UniMath.CategoryTheory.Monoidal.MonoidalCategories.
Require Import UniMath.CategoryTheory.Monoidal.MonoidalFunctors.
Require Import UniMath.CategoryTheory.Enriched.Enriched.
Require Import UniMath.CategoryTheory.Enriched.ChangeOfBase.
Require Import UniMath.Bicategories.Core.Bicat.
Require Import UniMath.Bicategories.PseudoFunctors.PseudoFunctor.
Require Import UniMath.Bicategories.PseudoFunctors.Display.PseudoFunctorBicat.
Require Import UniMath.Bicategories.EnrichedCategories.BicatOfEnrichedCat.

Local Open Scope cat.

Section PseudoFunctor.

Context {Mon_V Mon_V' : monoidal_cat} (F : lax_monoidal_functor Mon_V Mon_V').

Definition change_of_base_psfunctor_data : psfunctor_data (enriched_precat_bicat Mon_V) (enriched_precat_bicat Mon_V').
Proof.
use make_psfunctor_data.
- exact (change_of_base_enriched_precat F).
- exact (@change_of_base_enriched_functor _ _ F).
- exact (@change_of_base_enriched_nat_trans _ _ F).
- intro C.
use make_enriched_nat_trans.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it would also be good to add separate definitions for the two natural transformations

+ intro.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite (functor_id F), <- lax_monoidal_functor_on_postcompose_underlying_morphism, <- lax_monoidal_functor_on_precompose_underlying_morphism, postcompose_identity, precompose_identity;
reflexivity
).
- intros.
use make_enriched_nat_trans.
+ intro.
apply enriched_cat_id.
+ intros x y.
cbn.
abstract (
rewrite <- lax_monoidal_functor_on_postcompose_underlying_morphism, <- lax_monoidal_functor_on_precompose_underlying_morphism, postcompose_identity, precompose_identity, functor_comp;
reflexivity
).
Defined.

Lemma change_of_base_psfunctor_laws : psfunctor_laws change_of_base_psfunctor_data.
Proof.
repeat split.
- intros C D G.
use enriched_nat_trans_eq.
intro.
reflexivity.
- intros a b f g h η φ.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite functor_comp.
rewrite lax_monoidal_functor_on_postcompose_underlying_morphism.
rewrite assoc.
reflexivity.
- intros a b f.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite <- lax_monoidal_functor_on_postcompose_underlying_morphism.
rewrite postcompose_identity.
rewrite functor_id.
rewrite !id_right.
rewrite assoc'.
rewrite <- functor_comp.
rewrite (enriched_functor_on_identity f).
reflexivity.
- intros a b f.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite <- lax_monoidal_functor_on_postcompose_underlying_morphism.
rewrite postcompose_identity.
rewrite functor_id.
rewrite !id_right.
reflexivity.
- intros a b c d f g h.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite (assoc' _ (#F _) (#F _)).
rewrite <- functor_comp.
rewrite (enriched_functor_on_identity h).
reflexivity.
- intros a b c f g₁ g₂ η.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism.
rewrite !assoc'.
apply cancel_precomposition.
rewrite <- !functor_comp.
apply maponpaths.
etrans.
{
apply underlying_morphism_compose_swap.
}
rewrite postcompose_identity, precompose_identity.
reflexivity.
- intros a b c f₁ f₂ g η.
use enriched_nat_trans_eq.
cbn.
intro x.
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism.
rewrite !assoc'.
apply cancel_precomposition.
rewrite <- !functor_comp.
apply maponpaths.
etrans.
{
apply underlying_morphism_compose_swap.
}
rewrite postcompose_identity, precompose_identity.
apply assoc'.
Qed.

Definition change_of_base_psfunctor : psfunctor (enriched_precat_bicat Mon_V) (enriched_precat_bicat Mon_V').
Proof.
use make_psfunctor.
- exact change_of_base_psfunctor_data.
- exact change_of_base_psfunctor_laws.
- split.
+ intros.
use make_is_invertible_2cell.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For categories, one can prove that a natural transformation is an invertible 2-cell if it is a pointwise isomorphism. I guess the same holds in the enriched case.

To improve the usability of your code, it would be good to add the notion of an isomorphism in an enriched category and to add the statement that a natural transformation is an invertible 2 -cell if and only if it is a pointwise isomorphism (this can be done in a separate PR though).

* use make_enriched_nat_trans.
-- intro x.
apply enriched_cat_id.
-- intros x y.
cbn.
abstract (
rewrite functor_id, <- !lax_monoidal_functor_on_postcompose_underlying_morphism, <- lax_monoidal_functor_on_precompose_underlying_morphism, postcompose_identity, precompose_identity;
reflexivity
).
* abstract (
use enriched_nat_trans_eq;
intro x;
cbn;
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism, postcompose_identity, functor_id;
apply id_right
).
* abstract (
use enriched_nat_trans_eq;
intro x;
cbn;
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism, postcompose_identity, functor_id;
apply id_right
).
+ intros.
use make_is_invertible_2cell.
* use make_enriched_nat_trans.
-- intro x.
apply enriched_cat_id.
-- intros x y.
cbn.
abstract (
rewrite functor_comp, <- !lax_monoidal_functor_on_postcompose_underlying_morphism, <- lax_monoidal_functor_on_precompose_underlying_morphism, postcompose_identity, precompose_identity;
reflexivity
).
* abstract (
use enriched_nat_trans_eq;
intro x;
cbn;
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism, postcompose_identity, functor_id;
apply id_right
).
* abstract (
use enriched_nat_trans_eq;
intro x;
cbn;
rewrite <- !lax_monoidal_functor_on_postcompose_underlying_morphism, postcompose_identity, functor_id;
apply id_right
).
Defined.

End PseudoFunctor.
Loading