-
Notifications
You must be signed in to change notification settings - Fork 173
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
base: master
Are you sure you want to change the base?
Set-enriched categories #1467
Changes from 52 commits
d884132
0d97d7f
b222d1f
c13d72e
e629c8b
dabdc7b
ca9bf06
38574c7
2d319b9
096421b
70324d3
d2273bf
d04c63d
36b3874
5ff1ae2
c725e07
f3bb66e
393e08c
fc49805
d239668
368f71d
91d2bb0
6cc9f2e
8018188
e1dd9d7
6c4c07b
7e7b846
740c86e
2eeccd0
503a80e
b76613d
c08e9d4
0da7f1c
9abbfb0
ac60705
9ff746c
bb95381
f0da7e2
c5f099d
78e12b4
b089c47
5362f3a
ff504a7
e4111db
dbda0c0
6d7c516
2ac52f4
126a7e9
39ea615
ea2e038
0a08dae
16ae6a5
18f4a6c
7166753
70c125f
9788301
2a7cdc5
5d42579
7c41460
98f0cc6
41339c6
9d5e0e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
+ 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and elsewhere, the |
||
- 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. |
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
There was a problem hiding this comment.
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.