Zulip Chat Archive
Stream: mathlib4
Topic: redefine Graded Algebra
Kenny Lau (Oct 07 2025 at 19:04):
This is not part of the projective space project, but I think this might make some things smoother. I propose the following redefinition:
import Mathlib.RingTheory.GradedAlgebra.Basic
#check GradedAlgebra
/-
GradedAlgebra.{u_1, u_2, u_3} {ฮน : Type u_1} {R : Type u_2} {A : Type u_3}
[DecidableEq ฮน] [AddMonoid ฮน] [CommSemiring R] [Semiring A] [Algebra R A]
(๐ : ฮน โ Submodule R A) : Type (max u_1 u_3)
-/
abbrev GradedAlgebra' {ฮน R A ฯ : Type*}
[DecidableEq ฮน] [AddMonoid ฮน]
[Semiring A] [SMul R A]
[SetLike ฯ A] [AddSubmonoidClass ฯ A] [SMulMemClass ฯ R A]
(๐ : ฮน โ ฯ) :=
GradedRing ๐
Alternatively, I propose to not touch the existing GradedAlgebra, but when defining GradedAlgHom we secretly use the new assumptions
Kenny Lau (Oct 07 2025 at 19:05):
basically i just want to unbundle the "base ring" from a graded ring
Eric Wieser (Oct 07 2025 at 19:37):
But I would guess that's not your motivation
Eric Wieser (Oct 07 2025 at 19:37):
Currently the only class that satisfies AddSubmonoidClass and SMulMemClass and GradedRing is Submodule, unless LieSubmodule somehow fits
Kenny Lau (Oct 07 2025 at 19:39):
right, ok, my "real" motivation is to characterise the following map:
given a Nat-graded R-algebra A, and an R-algebra S,
one can construct a Nat-grading on the S-algebra S โ[R] A.
the map A -> S โ[R] A preserves the grading and R-action, but the LHS is a graded R-algebra and the RHS is a graded S-algebra.
Kenny Lau (Oct 07 2025 at 19:40):
so, under my new proposal, I would be able to write toTensor : ๐ โโแต[R] S โแต ๐
Kenny Lau (Oct 07 2025 at 19:42):
actually I suppose in my definition above the base ring is still baked in...
Kenny Lau (Oct 07 2025 at 19:42):
which brings me to the second suggestion:
Kenny Lau (Oct 07 2025 at 19:42):
Kenny Lau said:
Alternatively, I propose to not touch the existing GradedAlgebra, but when defining GradedAlgHom we secretly use the new assumptions
Kenny Lau (Oct 07 2025 at 19:42):
so as objects they are just graded rings, but I can now package into a class the statement that "the morphism preserves the R-actions"
Kenny Lau (Oct 07 2025 at 19:43):
so as cursed as it is, a GradedAlgHom is a map between two GradedRing's
Kenny Lau (Oct 08 2025 at 21:58):
Eric Wieser said:
Currently the only class that satisfies
AddSubmonoidClassandSMulMemClassandGradedRingisSubmodule
The catch is that it isn't Submodule, it's Submodule R, meaning that the base ring is tied down to the type, which I want to avoid, because I want to restrict to a smaller ring.
I guess I can still do that via (๐ : ฮน โ Submodule S A) [GradedAlgebra ๐] [Algebra R S] and then just refer to R all of the time, but is that really better than [SMulMemClass R ฯ A] (๐ : ฮน โ ฯ) [GradedRing ๐]? This latter formulation allows me to avoid mentioning S at all (at the expense of , uh, ฯ := Submodule S A I guess...)
ok maybe I can reconsider this a bit
Kenny Lau (Oct 08 2025 at 22:00):
this brings me back actually to an old proposal of mine:
[Algebra R Rโ] (๐ : ฮน โ Submodule Rโ A) [IsScalarTower R Rโ A]
[Algebra R Rโ] (โฌ : ฮน โ Submodule Rโ A) [IsScalarTower R Rโ A]
structure ๐ โโ[R] โฌ where
Kenny Lau (Oct 08 2025 at 22:01):
compare this to:
[SMulMemClass R ฯ A] (๐ : ฮน โ ฯ)
[SMulMemClass R ฯ B] (โฌ : ฮน โ ฯ)
structure ๐ โโ[R] โฌ where
Kenny Lau (Oct 08 2025 at 22:01):
I think "on paper" ฯ and ฯ look cleaner but in practice maybe fixing it to Submodule R1/2 is faster
Kenny Lau (Oct 08 2025 at 23:14):
let me really type out the two proposals so that we can concretely see the fuller picture:
import Mathlib
set_option autoImplicit false
namespace Proposal1
structure GradedAlgHom (R : Type*) {S T A B ฮน : Type*}
[CommRing R] [CommRing S] [CommRing T] [Ring A] [Ring B]
[Algebra R S] [Algebra S A] [Algebra R A] [IsScalarTower R S A]
[Algebra R T] [Algebra T B] [Algebra R B] [IsScalarTower R T B]
[DecidableEq ฮน] [AddMonoid ฮน]
(๐ : ฮน โ Submodule S A) (โฌ : ฮน โ Submodule T B) [GradedAlgebra ๐] [GradedAlgebra โฌ]
extends A โโ[R] B where
map_mem' {i} {x} : x โ ๐ i โ toFun x โ โฌ i
end Proposal1
namespace Proposal2
structure GradedAlgHom (R : Type*) {A B ฮน ฯ ฯ: Type*}
[CommRing R] [Ring A] [Ring B] [Algebra R A] [Algebra R B]
[DecidableEq ฮน] [AddMonoid ฮน]
[SetLike ฯ A] [AddSubmonoidClass ฯ A] [SMulMemClass ฯ R A]
[SetLike ฯ B] [AddSubmonoidClass ฯ B] [SMulMemClass ฯ R B]
(๐ : ฮน โ ฯ) (โฌ : ฮน โ ฯ) [GradedRing ๐] [GradedRing โฌ]
extends A โโ[R] B where
map_mem' {i} {x} : x โ ๐ i โ toFun x โ โฌ i
end Proposal2
Kenny Lau (Oct 08 2025 at 23:16):
/poll Which one do you prefer?
:one:
:two:
Kenny Lau (Oct 09 2025 at 11:44):
made #30365
Eric Wieser (Oct 09 2025 at 12:42):
I agree that :one: isn't a perfect solution (but I think it's a better compromise than :two:)
Kenny Lau (Oct 09 2025 at 12:42):
I did use 1 in #30365
Antoine Chambert-Loir (Oct 09 2025 at 20:07):
I would like to have graded algebras graded by a monoid (not an addmonoid). This stuff appears in Berkovich's theory.
Kenny Lau (Oct 09 2025 at 20:08):
is there a difference that is not covered by Additive?
Antoine Chambert-Loir (Oct 10 2025 at 15:07):
Since there is no mathematical difference, no, but that will force (eventually, when people will want to formalize this) to insert many toAdditive in formulas.
Kenny Lau (Oct 10 2025 at 15:07):
should we call it MulGradedAlgebra?
Last updated: Dec 20 2025 at 21:32 UTC