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

feat(category_theory/limits): kernels #1988

Merged
merged 45 commits into from Feb 22, 2020
Merged

feat(category_theory/limits): kernels #1988

merged 45 commits into from Feb 22, 2020

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Feb 14, 2020

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • reviewed and applied the documentation requirements
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

This PR replaces #1445. Since then, the following has been added:

  • The category of R-modules has a zero object (punit) and all kernels (f.ker.subtype)
  • An equalizer is a monomorphism
  • The equalizer of (f, f) is an isomorphism, and in particular the kernel of a zero morphism is an isomorphism
  • An equalizer that is an epimorphism is an isomorphism (this is how you show that in abelian categories, mono+epi=iso)
  • If there is a zero object, then the kernel of a monomorphism f is the map from 0 to the domain of f
  • Some documentation

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this PR! It looks really nice!
I've left some remarks, and some are maybe a bit short, but that isn't meant as harsh critique. (I'm just a bit short on time atm.)

src/algebra/category/Module/basic.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
/-- Every equalizer of (f, f) is an isomorphism -/
def limit_cone_parallel_pair_self_is_iso (c : cone (parallel_pair f f)) (h : is_limit c) :
is_iso (c.π.app zero) :=
begin
Copy link
Member

Choose a reason for hiding this comment

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

In this proof you are defining data using rw and similar tactics. This usually creates problems once you try to use the data.

Copy link
Member Author

Choose a reason for hiding this comment

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

Luckily, in this case, z.hom.hom is actually defeq to c.π.app zero, so not only would rfl have shown t, we can simply get rid of the rewrite altogether.

On the other hand, for epi_limit_cone_parallel_pair_is_iso, I cannot see an easy way to get rid of the rewrite and especially the convert (on the other hand, I am not yet convinced that in this situation it really matters how the inverse is defined, as long as there are proofs that it is an inverse).

Copy link
Member

Choose a reason for hiding this comment

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

In theory it doesn't matter. But it might complicate proving this about it. (Not in a conceptually hard way, but in a tedious, annoying, kind of way.)

src/category_theory/limits/shapes/equalizers.lean Outdated Show resolved Hide resolved
docs/references.bib Outdated Show resolved Hide resolved
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

I'm inclined to say that this looks ready for merging, but I would love to also here from other reviewers. @semorrison @rwbarton any comments?

@jcommelin jcommelin added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Feb 22, 2020
@mergify mergify bot merged commit eabcd13 into leanprover-community:master Feb 22, 2020
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
* chore(category_theory): require morphisms live in Type

* move back to Type

* fixes

* feat(category_theory/limits): kernels

* finishing basic API for kernels

* update post leanprover-community#1412

* fix

* documentation

* documentation

* more docs

* replacing dumb code

* forall -> Pi

* removing all instances

* working on Reid's suggested lemmas

* experiments

* lots to do

* Show that equalizers are monomorphisms

* Show that equalizer of (f, f) is always an iso

* Show that an equalizer that is an epimorphism is an isomorphism

* Clean up

* Show that the kernel of a monomorphism is zero

* Fix

* Show that the kernel of a linear map is a kernel in the categorical sense

* Modify proof

* Compactify proof

* Various cleanup

* Some more cleanup

* Fix bibtex

* Address some issues raised during discussion of the PR

* Fix some more incorrect indentation

* Some more minor fixes

* Unify capitalization in Bibtex entries

* Replace equalizer.lift.uniq with equalizer.hom_ext

* Some more slight refactors

* Typo

Co-authored-by: Scott Morrison <scott@tqft.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 16, 2020
* chore(category_theory): require morphisms live in Type

* move back to Type

* fixes

* feat(category_theory/limits): kernels

* finishing basic API for kernels

* update post leanprover-community#1412

* fix

* documentation

* documentation

* more docs

* replacing dumb code

* forall -> Pi

* removing all instances

* working on Reid's suggested lemmas

* experiments

* lots to do

* Show that equalizers are monomorphisms

* Show that equalizer of (f, f) is always an iso

* Show that an equalizer that is an epimorphism is an isomorphism

* Clean up

* Show that the kernel of a monomorphism is zero

* Fix

* Show that the kernel of a linear map is a kernel in the categorical sense

* Modify proof

* Compactify proof

* Various cleanup

* Some more cleanup

* Fix bibtex

* Address some issues raised during discussion of the PR

* Fix some more incorrect indentation

* Some more minor fixes

* Unify capitalization in Bibtex entries

* Replace equalizer.lift.uniq with equalizer.hom_ext

* Some more slight refactors

* Typo

Co-authored-by: Scott Morrison <scott@tqft.net>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.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+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants