-
Notifications
You must be signed in to change notification settings - Fork 316
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: QuotLike
#16421
base: master
Are you sure you want to change the base?
feat: QuotLike
#16421
Conversation
PR summary f4ddcad285Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
The definition of `QuotLike`. It is needed to avoid name clashes | ||
between `QuotLike.rec` `QuotLike.recOn` and the autogenerated recursors. | ||
-/ | ||
class QuotLikeStruct (Q : Sort*) (α : outParam Sort*) (r : outParam (α → α → Prop)) where |
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.
Why not just require an Equiv
to Quot
with default value of Equiv.refl _
?
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.
Mathlib.Logic.Equiv.Defs
imports Mathlib.Data.Quot
. I want QuotLike
to import less.
instance (p : Submodule R M) : QuotLike.Hint p (M ⧸ p) M p.quotientRel where | ||
``` | ||
-/ | ||
class Hint {Hint : Sort*} (hint : Hint) |
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 isn't clear what's the meaning of Hint
.
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.
Its full name is QuotLike.Hint
. Is the explanation in the documentation string clear enough? If there is a better name, I can use it.
This typeclass is primarily for use by type synonyms of
Quot
andQuotient
. UsingQuotLike
API for type synonyms ofQuot
andQuotient
will avoid defeq abuse caused by directly usingQuot
andQuotient
APIs.Some of the naming may need to be discussed. For example,
⟦·⟧
is currently calledmkQ
in names. This distinguishes it from other.mk
s and makes it possible to write the quotient map asmkQ
mkQ'
mkQ_ h
. But this will also require changing the old lemma names.