Zulip Chat Archive
Stream: mathlib4
Topic: How to define graded ring isomorphisms?
Kenny Lau (Oct 09 2025 at 13:36):
Recall that a docs#GradedRing (𝒜 : ι → σ) requires (assumptions):
Semiring AAddSubmonoidClass σ AAddMonoid ιGradedRing 𝒜(I'll add itself to facilitate discussion)
and a graded ring isomorphism e satisfies (conditions):
x ∈ 𝒜 i → e x ∈ ℬ ix ∈ 𝒜 i ↔ e x ∈ ℬ i
With the full list of assumptions (1, 2, 3, 4), conditions 1 and 2 are equivalent, so we should only ask for condition 1. So now there are two ways to set it up:
- Require assumption 1 for
GradedRingEquiv, and then delay 2, 3, 4 as much as possible. - Require assumptions 1, 2, 3, 4 for
GradedRingEquiv.
It might seem stupid at first to not assume GradedRing for GradedRingEquiv, but notice that docs#RingEquiv also only assumes Mul and Add.
Kenny Lau (Oct 09 2025 at 13:49):
Kenny Lau said:
- delay 2, 3, 4 as much as possible
note that it's basically only possible to define refl and trans, so 2 3 4 will be assumed very early in the file
Eric Wieser (Oct 09 2025 at 21:15):
I assume you did not mean for the two conditions to be the same?
Aaron Liu (Oct 09 2025 at 21:17):
there's an imp and there's an iff
Aaron Liu (Oct 09 2025 at 21:17):
not sure if these are the same under certain assumptions
Kenny Lau (Oct 09 2025 at 21:17):
they're the same when we have graded ring on both sides
Kenny Lau (Oct 09 2025 at 21:18):
(otherwise they're just random submodules)
Eric Wieser (Oct 09 2025 at 21:49):
I think you you use all four assumptions and the weaker condition
Kenny Lau (Oct 09 2025 at 21:53):
@Eric Wieser interesting, I went with the other approach in #30379 since I thought that would lessen the burden on typeclass searching, but as I remarked earlier, I ended up assuming 1, 2, 3, 4 as soon as Line 68.
Eric Wieser (Oct 09 2025 at 22:44):
That probably increases the burden because the typeclasses can't be immediately unified
Eric Wieser (Oct 09 2025 at 22:45):
But most importantly I claim the definition is just wrong if you can't define symm at the same level of generality as the definition
Kenny Lau (Oct 09 2025 at 23:01):
@Eric Wieser i've updated #30379 to use your suggested approach
Last updated: Dec 20 2025 at 21:32 UTC