Repository navigation
feat: QuotLike - #16421
feat: QuotLike#16421astrainfinita wants to merge 23 commits into
QuotLike#16421Conversation
PR summary d7279d7f94Import 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.
Why not just require an Equiv to Quot with default value of Equiv.refl _?
There was a problem hiding this comment.
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.
It isn't clear what's the meaning of Hint.
There was a problem hiding this comment.
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.
|
Thanks for the PR! This feels like a big change. Can you please discuss it on Zulip? |
|
This PR has been migrated to a fork-based workflow: #30668 |
This PR has been migrated to a fork-based workflow: #30668
This typeclass is primarily for use by type synonyms of
QuotandQuotient. UsingQuotLikeAPI for type synonyms ofQuotandQuotientwill avoid defeq abuse caused by directly usingQuotandQuotientAPIs.This PR also adds some typeclasses to support different ways to find the quotient map that should be used. See the documentation comments of these typeclasses for examples of usage.
It's not a typical design to use these auxiliary typeclasses and term elaborators, but I haven't found a better way to support these notations.
Some of the naming may need to be discussed. For example,
⟦·⟧is currently calledmkQin names. This distinguishes it from other.mks and makes it possible to write the quotient map asmkQmkQ'mkQ_ h. But this will also require changing the old lemma names. Also, it would be helpful if the names of new type classes explained their functionality better.Zulip