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

Add (co)products #637

Merged
merged 4 commits into from
Dec 17, 2021
Merged

Add (co)products #637

merged 4 commits into from
Dec 17, 2021

Conversation

barrettj12
Copy link
Contributor

No description provided.

@mortberg
Copy link
Collaborator

See how I just refactored the pullbacks: #650
How about doing the same here?

@barrettj12
Copy link
Contributor Author

@mortberg could you be more specific please? I'm not sure what exactly you'd like me to do - I think my code already looks pretty similar to your refactored code.

@mortberg
Copy link
Collaborator

State the universal property first just as a definition and not as a record and then prove that it's a property. Then use it to define the product/equalizer structure. Finally, give a definition of what it means for a category to have and merely have products/equalizers: https://github.com/agda/cubical/pull/650/files#diff-9d881e0b34956b31c18090a3faa7d4b14e7adea7aa927fd6914a2ea2cc839ae8R53

@barrettj12
Copy link
Contributor Author

Great, I can do that.

@mortberg
Copy link
Collaborator

Great, I can do that.

Perfect! Just so you know: I plan to rewrite the file about terminal objects and limits soon as well.

@barrettj12
Copy link
Contributor Author

Cool. Just so you know, I defined coproducts and coequalisers too (as products/equalisers in the opposite category) and was planning to PR them after this one got approved.

@mortberg
Copy link
Collaborator

I actually don't think it's good to define colimits as limits in C^op. This leads to more headache than its worth (for example record projections will have the wrong names, e.g. the maps into the coproduct will be called projections...). My experience from UniMath is that it's much better to define all limits and colimits as directly as possible.

It's also kind of arbitrary that the colimits are limits in C^op, we could just as well take colimits as primitive and define limits as colimits in C^op. No matter what it's better to keep them separate

- Remove equalisers
- Add coproducts
@barrettj12 barrettj12 changed the title Add products, equalisers Add (co)products Nov 26, 2021
@barrettj12
Copy link
Contributor Author

@mortberg have refactored to match your code. I removed equalisers since I don't need them for what I'm doing, and added coproducts.

Copy link
Collaborator

@mortberg mortberg left a comment

Choose a reason for hiding this comment

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

A lot of suggestions for new names

Cubical/Categories/Colimits/Coproduct.agda Outdated Show resolved Hide resolved
Cubical/Categories/Colimits.agda Outdated Show resolved Hide resolved
Cubical/Categories/Colimits/Coproduct.agda Outdated Show resolved Hide resolved
Cubical/Categories/Colimits/Coproduct.agda Outdated Show resolved Hide resolved
Cubical/Categories/Limits/Product.agda Outdated Show resolved Hide resolved
Cubical/Categories/Colimits/Coproduct.agda Outdated Show resolved Hide resolved
Cubical/Categories/Colimits/Coproduct.agda Outdated Show resolved Hide resolved
Cubical/Categories/Limits/Product.agda Outdated Show resolved Hide resolved
Cubical/Categories/Limits/Product.agda Outdated Show resolved Hide resolved
Copy link
Collaborator

@mortberg mortberg left a comment

Choose a reason for hiding this comment

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

Looks good to me!

I would love to get the equalizers as well in another PR

@barrettj12
Copy link
Contributor Author

I would love to get the equalizers as well in another PR

Sadly I won't have time to put that together, but it should be easy enough to copy the structure of these files.

@mortberg
Copy link
Collaborator

I would love to get the equalizers as well in another PR

Sadly I won't have time to put that together, but it should be easy enough to copy the structure of these files.

Ok, no problem! I'll do it myself

@mortberg mortberg merged commit 22bea95 into agda:master Dec 17, 2021
@barrettj12 barrettj12 deleted the limits branch December 17, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants