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
[Merged by Bors] - feat(category/limits/shapes): fix biproducts #3175
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semorrison
added
the
awaiting-review
The author would like community review of the PR
label
Jun 26, 2020
b-mehta
reviewed
Jun 26, 2020
jcommelin
approved these changes
Jun 29, 2020
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 looks good to me. But the proof of the pudding is in the eating...
Let's give it a try!
bors merge
github-actions
bot
added
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
and removed
awaiting-review
The author would like community review of the PR
labels
Jun 29, 2020
don't mind me, just combining some batches... |
Canceled. |
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Jun 29, 2020
This is a second attempt at #3102. Previously the definition of a (binary) biproduct in a category with zero morphisms (but not necessarily) preadditive was just wrong. The definition for a "bicone" was just something that was simultaneously a cone and a cocone, with the same cone points. It was a "biproduct bicone" if the cone was a limit cone and the cocone was a colimit cocone. However, this definition was not particularly useful. In particular, there was no way to prove that the two different `map` constructions providing a morphism `W ⊞ X ⟶ Y ⊞ Z` (i.e. by treating the biproducts either as cones, or as cocones) were actually equal. Blech. So, I've added the axioms `inl ≫ fst = 𝟙 P`, `inl ≫ snd = 0`, `inr ≫ fst = 0`, and `inr ≫ snd = 𝟙 Q` to `bicone P Q`. (Note these only require the exist of zero morphisms, not preadditivity.) Now the two map constructions are equal. I've then entirely removed the `has_preadditive_biproduct` typeclass. Instead we have 1. additional theorems providing `total`, when `preadditive C` is available 2. alternative constructors for `has_biproduct` that use `total` rather than `is_limit` and `is_colimit`. This PR also introduces some abbreviations along the lines of `abbreviation has_binary_product (X Y : C) := has_limit (pair X Y)`, just to improve readability. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
bors is having trouble bors r- |
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Jun 29, 2020
This is a second attempt at #3102. Previously the definition of a (binary) biproduct in a category with zero morphisms (but not necessarily) preadditive was just wrong. The definition for a "bicone" was just something that was simultaneously a cone and a cocone, with the same cone points. It was a "biproduct bicone" if the cone was a limit cone and the cocone was a colimit cocone. However, this definition was not particularly useful. In particular, there was no way to prove that the two different `map` constructions providing a morphism `W ⊞ X ⟶ Y ⊞ Z` (i.e. by treating the biproducts either as cones, or as cocones) were actually equal. Blech. So, I've added the axioms `inl ≫ fst = 𝟙 P`, `inl ≫ snd = 0`, `inr ≫ fst = 0`, and `inr ≫ snd = 𝟙 Q` to `bicone P Q`. (Note these only require the exist of zero morphisms, not preadditivity.) Now the two map constructions are equal. I've then entirely removed the `has_preadditive_biproduct` typeclass. Instead we have 1. additional theorems providing `total`, when `preadditive C` is available 2. alternative constructors for `has_biproduct` that use `total` rather than `is_limit` and `is_colimit`. This PR also introduces some abbreviations along the lines of `abbreviation has_binary_product (X Y : C) := has_limit (pair X Y)`, just to improve readability. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Pull request successfully merged into master. Build succeeded: |
bors
bot
changed the title
feat(category/limits/shapes): fix biproducts
[Merged by Bors] - feat(category/limits/shapes): fix biproducts
Jun 29, 2020
cipher1024
pushed a commit
to cipher1024/mathlib
that referenced
this pull request
Mar 15, 2022
This is a second attempt at leanprover-community#3102. Previously the definition of a (binary) biproduct in a category with zero morphisms (but not necessarily) preadditive was just wrong. The definition for a "bicone" was just something that was simultaneously a cone and a cocone, with the same cone points. It was a "biproduct bicone" if the cone was a limit cone and the cocone was a colimit cocone. However, this definition was not particularly useful. In particular, there was no way to prove that the two different `map` constructions providing a morphism `W ⊞ X ⟶ Y ⊞ Z` (i.e. by treating the biproducts either as cones, or as cocones) were actually equal. Blech. So, I've added the axioms `inl ≫ fst = 𝟙 P`, `inl ≫ snd = 0`, `inr ≫ fst = 0`, and `inr ≫ snd = 𝟙 Q` to `bicone P Q`. (Note these only require the exist of zero morphisms, not preadditivity.) Now the two map constructions are equal. I've then entirely removed the `has_preadditive_biproduct` typeclass. Instead we have 1. additional theorems providing `total`, when `preadditive C` is available 2. alternative constructors for `has_biproduct` that use `total` rather than `is_limit` and `is_colimit`. This PR also introduces some abbreviations along the lines of `abbreviation has_binary_product (X Y : C) := has_limit (pair X Y)`, just to improve readability. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a second attempt at #3102.
Previously the definition of a (binary) biproduct in a category with zero morphisms (but not necessarily) preadditive was just wrong.
The definition for a "bicone" was just something that was simultaneously a cone and a cocone, with the same cone points. It was a "biproduct bicone" if the cone was a limit cone and the cocone was a colimit cocone. However, this definition was not particularly useful. In particular, there was no way to prove that the two different
map
constructions providing a morphismW ⊞ X ⟶ Y ⊞ Z
(i.e. by treating the biproducts either as cones, or as cocones) were actually equal. Blech.So, I've added the axioms
inl ≫ fst = 𝟙 P
,inl ≫ snd = 0
,inr ≫ fst = 0
, andinr ≫ snd = 𝟙 Q
tobicone P Q
. (Note these only require the exist of zero morphisms, not preadditivity.)Now the two map constructions are equal.
I've then entirely removed the
has_preadditive_biproduct
typeclass. Instead we havetotal
, whenpreadditive C
is availablehas_biproduct
that usetotal
rather thanis_limit
andis_colimit
.This PR also introduces some abbreviations along the lines of
abbreviation has_binary_product (X Y : C) := has_limit (pair X Y)
, just to improve readability.