-
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
Conversation
Univalence of slices
Street (op)fibrations in Cat
Duality involutions, rework discrete bicats
…to cartesian-monoidal
The CI error comes from one of the "sanity" checks:
In general, the list of files in |
The sanity checks passed, but the build script failed with the message "Error: Universe inconsistency." I don't think I did anything strange. No error occurs when I run |
There are two builds launched for each PR:
It is the second one that failed, specifically when building the satellite repository https://github.com/UniMath/SetHITs. @nmvdw : could you assist in investigating this error? |
+ intros x y. | ||
cbn. | ||
abstract ( | ||
rewrite postcompose_identity, precompose_identity, id_left; | ||
reflexivity | ||
). |
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.
Here and elsewhere, the abstract(...)
could/should also include the intros.... cbn.
tactics.
|
||
(** The arrow from p1 to p2 induced by the projections from p1 is an iso *) | ||
Lemma product_unique (p1 p2 : Product I C c) : | ||
is_iso (ProductArrow _ _ p2 (ProductPr I C p1)). |
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.
We are transitioning to is_z_iso
, so maybe it would be best to state this lemma directly in terms of it? The proof should be the same after is_iso_qinv
.
apply funextsec; intro. | ||
rewrite ProductPrCommutes. | ||
now rewrite id_left. | ||
Qed. |
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.
This proof should be transparent, at least in part, to allow for the extraction of the inverse.
unfold isProduct. | ||
do 2 (apply impred; intro). | ||
apply isapropiscontr. | ||
Defined. |
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.
Defined. | |
Qed. |
Local Definition r_pr2 {x y z : C} : C ⟦x ⊠ (y ⊠ z), y⟧ := π2 · π1. | ||
Local Definition r_pr3 {x y z : C} : C ⟦x ⊠ (y ⊠ z), z⟧ := π2 · π2. | ||
|
||
Lemma right_assoc_ternary_product : |
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.
It might be good to make parts of this construction opaque.
Local Definition l_pr2 {x y z : C} : C ⟦(x ⊠ y) ⊠ z, y⟧ := π1 · π2. | ||
Local Definition l_pr3 {x y z : C} : C ⟦(x ⊠ y) ⊠ z, z⟧ := π2. | ||
|
||
Lemma left_assoc_ternary_product : |
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.
It might be good to make parts of this construction opaque.
isweq BinproductsToProductsBool. | ||
Proof. | ||
apply (isweq_iso _ ProductsBoolToBinproducts). | ||
- intros x. |
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.
It might be good to make parts of this construction opaque.
@@ -696,6 +701,15 @@ Arguments isBinProduct' _ _ _ _ _ : clear implicits. | |||
|
|||
(** ** Terminal object as the unit (up to isomorphism) of binary products *) | |||
|
|||
(** Generalize [maponpaths_2] to this lemma *) | |||
Local Lemma f_equal_2 : |
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.
There are already two constructions for this:
two_arg_paths:
∏ (A B C : UU) (f : A → B → C) (a1 : A) (b1 : B)
(a2 : A) (b2 : B), a1 = a2 → b1 = b2 → f a1 b1 = f a2 b2
map_on_two_paths:
∏ (X Y Z : UU) (f : X → Y → Z) (x x' : X) (y y' : Y),
x = x' → y = y' → f x y = f x' y'
Interestingly, the error happens in the following line: The error can be avoided by adding My guess is that one of the additions to |
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.
Some tips for constructing the biequivalence:
- I think it is useful to have a separate statement for constructing invertible 2-cells (pointwise isos are invertible 2-cells). For a biequivalence, you need to construct numerous invertible 2-cells and you can save work by having a more efficient way for constructing invertible 2-cells.
- Sometimes, I meet termination issues when constructing biequivalences (non-termination at the
Qed
orDefined
). To deal with this,comp_psfunctor
need to be made opaque at several parts (see for example https://github.com/UniMath/UniMath/blob/master/UniMath/Bicategories/DualityInvolution.v or https://github.com/UniMath/UniMath/blob/master/UniMath/Bicategories/DisplayedBicats/FiberBicategory/TrivialFiber.v and especially the lines which containTransparent comp_psfunctor
orOpaque comp_psfunctor
).
Another thing that I am wondering about, is how do you envision the role of univalence in your development and what are your plans in this regard? For both categories and bicategories, the main focus in univalent foundations tends to be on the univalent ones.
- exact (@pre_whisker Mon_V). | ||
- exact (@post_whisker Mon_V). | ||
- intros C D F. | ||
use make_enriched_nat_trans. |
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.
- 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 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
- 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 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).
exact (F x). | ||
+ intros x y f. | ||
exact (enriched_functor_on_morphisms F _ _ f). | ||
- split. |
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.
This should be made opaque.
use make_nat_trans. | ||
- intro x. | ||
exact (a x tt). | ||
- intros x y f. |
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.
This should be made opaque.
use make_is_z_isomorphism. | ||
* apply binprod_assoc_r. | ||
* apply assoc_l_qinv_assoc_r. | ||
- intros a b; cbn. |
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.
The parts following this need to be made opaque.
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.
With these changes SetHITs should not have to enable -type-in-type.
I would prefer if there wasn't duplication of material, but since this PR has been around a while I don't mind, we can clean it up later.
I have no comments on the mathematics of this, I just looked at the SetHIT-problem.
Let α {x y z} : C⟦(x ⊠ y) ⊠ z, x ⊠ (y ⊠ z)⟧ := binprod_assoc x y z. | ||
|
||
(** A type with three inhabitants, used for indexing ternary products *) | ||
Let three : UU := coprod unit bool. |
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.
There's already a type like this in Combinatorics/StandardFiniteSets.v
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
Can we try and merge master into this and see if it compiles with the recent changes to UniMath? |
Done! |
Co-authored-by: Michael Lindgren <mlindgren84@gmail.com>
This PR includes the following.
auto
andautorewrite
are removed)I believe that the proof of biequivalence is straightforward but I would like to finish it later because it requires a lot of efforts.