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): assorted small changes from the old limits PR #512

Merged

Conversation

semorrison
Copy link
Collaborator

This consists of the remaining changes from the old limits PR, not including anything to do with special shapes.

Most of it is minor, with the exception of introducing discrete categories.

(I've also rebased what remains of my "special shapes" limits work onto this commit.)

category_theory/functor_category.lean Outdated Show resolved Hide resolved
category_theory/limits/limits.lean Outdated Show resolved Hide resolved
category_theory/punit.lean Outdated Show resolved Hide resolved

def discrete (α : Type u₁) := α

@[extensionality] lemma plift.ext {P : Prop} (a b : plift P) : a = b :=
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Orphaning" an extensionality lemma like this is a bad idea. It means the behavior of ext will change depending on whether this module category_theory.discrete_category is imported, and especially since imports are transitive in Lean, this is something one has little control over.

The best place to put this would be either together with the definition of plift (impossible in this case), or with the definition of ext, or in some module which we can assume is "always" imported--I believe logic.basic qualifies. Also possible is to define the lemma here and give it the extensionality attribute locally.

However, I don't really understand why we are writing extensionality lemmas for subsingletons. Isn't this something we can solve once and for all by marking subsingleton.elim with extensionality? Or by modifying ext to try applying it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've moved this next to ulift.ext in tactics/ext.lean.

ext doesn't want to use subsingleton.elim for now. I agree this would be a good addition, but I think requires modifying ext.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just pinging @cipher1024 in case he knows readily how hard this would be.

category_theory/discrete_category.lean Outdated Show resolved Hide resolved
category_theory/discrete_category.lean Outdated Show resolved Hide resolved
category_theory/discrete_category.lean Outdated Show resolved Hide resolved
@digama0 digama0 merged commit 73933b7 into leanprover-community:master Dec 21, 2018
@jcommelin
Copy link
Member

Hooray!

@semorrison semorrison deleted the category-theory-assorted branch December 21, 2018 05:57
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.

None yet

4 participants