Graded modules over the Steenrod algebra: The degree of zero elements

105 views
Skip to first unread message

Sverre Lunøe-Nielsen

unread,
Jul 18, 2020, 5:31:01 AM7/18/20
to sage-devel
Dear list,

I have been involved in preparing a package by M. Catanzaro and R. Bruner lately, which implements finitely presented modules over the mod `p` Steenrod algebra.

We have encountered a conflict regarding how to present graded objects, and I am writing to the list to get other people's opinion on how to proceed on this matter.

Briefly, the issue is that the Steenrod algebra allows inhomogeneous elements and our graded modules do not.  Thus, the Steenrod algebra has a single zero element with no well defined degree, while our modules could potentially have one zero element for each degree.

My wish is to allow degreewise zero elements in our graded modules, so that x.degree() would return an integer for every element x.  But because the unique zero in the Steenrod algebra has no well defined degree, I am forced to let degree() treat all zero elements in our modules the same way and return ``None``.

A more precise description of the issue is found in the Sphinx note below.

My questions to the list are: Has similar issues been discussed and/or resolved before?  And more specificly: What acceptable changes could be made to the Steenrod algebra package to achieve what I want?

Regards,

Sverre Lunøe-Nielsen


.. NOTE::
Our implementation treats a graded module as the disjoint union, rather than a
direct sum, of vectorspaces of homogeneous elements.  Elements are therefore
always homogeneous, which also implies that sums between elements of different
degrees are not allowed.  This also means that acting by an inhomogeneous
element of the Steenrod algebra makes no sense.

In this setting there is no single zero element, but rather a zero for every
degree.  It follows that, in theory, all elements, including the zero elements,
have a well defined degree.

This way of representing a graded object differs from the way the graded
Steenrod algebra is represented by :class:`sage.algebras.steenrod` where inhomogeneous
elements are allowed and there is only a single zero element.  Consequently,
this zero element has no well defined degree.

Thus, because of the module action, we are forced to follow the same convention
when it comes to the degree of zero elements in a module:  The method
:meth:`sage.modules.finitely_presented_over_the_steenrod_algebra.module.fp_element.FP_Element.degree'
returns the value ``None`` for zero elements.

An example which highlights this problem is the following::

    sage: F = FPA_Module([0], SteenrodAlgebra(p=2))   # The free module on a single generator in degree 0.
    sage: g = F.generator(0)
    sage: x1 = Sq(1)*g
    sage: x2 = Sq(1)*x1

Clearly, the code implementing the module action has all the information it needs
to conclude that the element ``x2`` is the zero element in the second degree.
However, because of the module action, we cannot distinguish it from the element::

    sage: x2_ = (Sq(1) * Sq(1))*g

The latter is equal to the action of the zero element of the Steenrod
algebra on `g`, but since the zero element has no degree in the Steenrod algebra,
the module class cannot deduce what degree the zero element `x2_` should belong
to.

Reimundo Heluani

unread,
Jul 18, 2020, 7:44:23 AM7/18/20
to sage-...@googlegroups.com
Hello,
According to this note your graded modules are not even an Abelian group, I
wander what definition of module you are using. I don't know what would be the
advantage of having such behaviour but if you insist on "modules" not being
abelian groups I'd be looking into sets with actions rather than modules.

Apart from that, I've also been surprised by the fact that the zero element
has no defined degree in a different context. It seems to me that the default
implementation for degrees (at least in the situation where you have a basis
for the module) come from sage.categories.filtered_modules_with_basis which
you have to implement degree_on_basis(). Then homogeneous_degree() raises that
ValueError on the zero element, degree() by default returns homogeneous_degree().

In the module sage.categories.filtered_modules, in the docstring for the
module, a filtration is defined as an increasing filtration (with a TODO for
decreasing ones) so a natural choice for the degree of the zero element would
have been -Infinity (+Infinity would be for decreasing filtrations)

Best,

R.
>--
>You received this message because you are subscribed to the Google Groups
>"sage-devel" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to [1]sage-devel+...@googlegroups.com.
>To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
>sage-devel/50bab31f-182c-448e-bf35-b1bac90a8a75o%40googlegroups.com.
>
>References:
>
>[1] mailto:sage-devel+...@googlegroups.com
>[2] https://groups.google.com/d/msgid/sage-devel/50bab31f-182c-448e-bf35-b1bac90a8a75o%40googlegroups.com?utm_medium=email&utm_source=footer

signature.asc

Christian Nassau

unread,
Jul 18, 2020, 9:52:08 AM7/18/20
to sage-...@googlegroups.com
Hi Sverre,

I ran into similar problems in my "yacop" package (https://github.com/cnassau/yacop-sage), which also deals with graded modules over the Steenrod algebra.

I think when I began, Sage didn't even have its own category of graded things, so I ended up inventing my own category of "Yacop graded objects". I later had a look at what Sage is offering and it seemed to lack some important features that I need, so I have stuck with my own inventions ever since.

One missing thing is inspection of the grading module: if your code gets a tri-graded, potentially very big module it's desirable to provide a way to locate the non-zero tridegree's efficiently. My solution was that a graded module can advertise the "bounding box" for (a subset of) its elements, so that the non-zero pieces can be located quickly. 

More importantly, once you're dealing with graded modules you might want to operate *on* the grading by taking a suspension or truncation of the module. I implemented this by providing two new functors "supension" and "truncation".

My solution is probably not very robust and well-tested, but you could take a look at my code for inspiration. Here is a sample session, using the docker image based on Sage 8.2:

~$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --rm -it cnassau/yacop-sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.2, Release Date: 2018-05-05                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────┐
│ Imported package Yacop (version 2.0)                               │
└────────────────────────────────────────────────────────────────────┘
sage: from yacop.modules.dickson import DicksonAlgebra
sage: D=DicksonAlgebra(2,3)
sage: D
Dickson algebra D(3) for prime 2
sage: for g in D.graded_basis(tmax=10):
....:     print g, g.t, g.degree()
....:    
d4 4 region(e = 0, s = 0, t = 4)
1 0 region(e = 0, s = 0, t = 0)
d4*d6 10 region(e = 0, s = 0, t = 10)
d6 6 region(e = 0, s = 0, t = 6)
d7 7 region(e = 0, s = 0, t = 7)
d4**2 8 region(e = 0, s = 0, t = 8)
Here's how you take suspensions and truncations:

sage: suspension(D,t=8)
suspension (8,0,0) of Dickson algebra D(3) for prime 2
sage: from yacop.modules.functors import truncation
sage: truncation(D,tmax=10)
truncation to region(-Infinity < t <= 10) of Dickson algebra D(3) for prime 2

Finally, to come back to your original question, here is the degree of zero:

sage: D.zero().degree()
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
...
ValueError: degree of zero is undefined
I think if you end up needed a different zero in each grading, you're doing something wrong. After all, your code can always know what the expected degree of an element (eg. some Sq(R)*whatever) is; you probably should just not rely on the idea that that degree can be recovered from the product.

Best,
Christian

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/50bab31f-182c-448e-bf35-b1bac90a8a75o%40googlegroups.com.


John H Palmieri

unread,
Jul 18, 2020, 5:31:43 PM7/18/20
to sage-devel
In my experience, algebraic topologists often think of graded objects as disjoint unions, and you can often get away with this, but really they're not — they're direct sums. I think you should use Sage's categories framework, graded modules with basis or whatever, to set these up. In any case where the degree matters, you should first test whether an element is zero (in which case it won't have a degree) and then perhaps whether it is homogeneous. If not, you can raise an error (to keep someone from multiplying a module element by Sq(1) + Sq(2), for example). If it is homogeneous, you can proceed the way you want.

--
John

Sverre Lunøe-Nielsen

unread,
Jul 18, 2020, 5:35:53 PM7/18/20
to sage-devel
Hi,

Thank you for your comments so far.  I feel I need to expand some more on the issue of zero elements which is the central thing for the problem we are adressing.

It is mathematically equivalent to think of a graded k-algebra A as either

1) a direct sum A = \bigosum_i A_i, together with a graded k-linear map from
   the graded tensor product A\tensor_k A --> A,

or

2) a sequence of k-vectorspaces {A_i}_i, together with a set of structure maps
   \{ A_i \tensor_R A_j --> A_{i+j} \}_{i,j}.

(In both cases the structure maps should satisfy usual algebraic conditions.)

Similar for graded A-modules.

The implementation of the SteenrodAlgebra package takes the approach of 1), and never speaks about the zero element z_i \in A_i for any i.  Rather, they are all identified in A via the canonical injection A_i --> A.  It is tradition not to worry too much about this since you can "figure it out" if you have to, and know how you ended up with a zero.

However, it is arguably better, specially when writing software, to avoid this simplifaction since it leads to a corner case which has to be dealt with over and over again.  A great share of the bugs I have corrected in the package I have been editing have been caused by the wrongful assumption that all elements have an integer degree.  Having not to worry about this would make our code cleaner, and so will all future code building on it.

I was being rather vague about making proposals for change in the SteenrodAlgebra package in my last post, so to be clear let me propose a specific change and invite anyone to share their opinion on it:

Change SteenrodAlgebra such that _all_ homogeneous elements have a well defined degree.  For the user, this means in particular that when constructing the zero element, its degree must be given:

    sage: A = SteenrodAlgebra(p=2)
    sage: z = A.zero(degree=2)
    sage: Sq(1)*Sq(1) == z
    True
    sage: Sq(2)*Sq(1)*Sq(1) == z
    False

This involves adding the degree as internal data to zero elements, and change the behaviour of degree() such that it raises an exception only for inhomogeneous elements.

I hope I have clearified that I am not seeking a strange new definition of graded module or algebra, and that I am merely wanting to discuss the possibility of changing the implementation of SteenrodAlgebra.

E.g. are there perhaps unwanted software ramifications that our proposal would bring about?

Regards,

Sverre


Christian Nassau

unread,
Jul 18, 2020, 5:57:21 PM7/18/20
to sage-...@googlegroups.com
Hi Sverre,

I don't think it's a good idea to have different zeroes in an algebraic structure that is also categorized as an abelian group, unless you take the point that a "graded abelian group" should not be an "abelian group".

But let me also point out that something similar to what you want already exists: you can take a homogeneous component of the Steenrod algebra and look at its zero:

sage: A=SteenrodAlgebra(2)
sage: A[18]
Vector space spanned by (Sq(0,1,0,1), Sq(3,0,0,1), Sq(1,1,2), Sq(4,0,2), Sq(2,3,1), Sq(5,2,1), Sq(8,1,1), Sq(11,0,1), Sq(0,6), Sq(3,5), Sq(6,4), Sq(9,3), Sq(12,2), Sq(15,1), Sq(18)) over Finite Field of size 2
sage: A[18].zero() == A.zero()
True
sage: A[18].zero() == A[17].zero()
False
This suggests that "A[18].zero().degree()" could give 18, and the fact that it currently gives a ValueError might be considered a bug.

Best,
Christian

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

Sverre Lunøe-Nielsen

unread,
Jul 18, 2020, 6:28:56 PM7/18/20
to sage-devel

On Saturday, July 18, 2020 at 11:31:43 PM UTC+2, John H Palmieri wrote:
In any case where the degree matters, you should first test whether an element is zero (in which case it won't have a degree) and then perhaps whether it is homogeneous. If not, you can raise an error (to keep someone from multiplying a module element by Sq(1) + Sq(2), for example). If it is homogeneous, you can proceed the way you want.

This is indeed what we do in the current version.  However, I have come to think of this as some kind of anti-pattern, so I am seeking ways to avoid it.

On Saturday, July 18, 2020 at 11:57:21 PM UTC+2, Christian Nassau wrote:
> I don't think it's a good idea to have different zeroes in an algebraic structure that is also categorized as an abelian group, unless you take the point that a "graded abelian group" should not be an "abelian group".

Yes, as I outlined, they should definitely be living in a category where the objects are sequences of k-vectorspaces with the structure maps that make them k-algebras.  But the data that goes into defining an algebra this way is no different from usual.


- Sverre

John H Palmieri

unread,
Jul 18, 2020, 7:00:21 PM7/18/20
to sage-devel
Can you give a specific example of a computation in which you care about the degree where your zero element lives? Or where you can't just recover it from its component elements (if ab=0, then you have an element in degree = deg(a) + deg(b)). I'm struggling to understand this.

If you are doing the same check repeatedly, then write a little function to do it and then you have a one-line call to that function scattered around your code, which doesn't seem like that big a deal to me. Alternatively, and I know this isn't how we like to think about these things, but what goes wrong if you allow nonhomogeneous elements? That could be another way to simplify things.

- John

John H Palmieri

unread,
Jul 18, 2020, 7:01:23 PM7/18/20
to sage-devel


On Saturday, July 18, 2020 at 2:57:21 PM UTC-7, Christian Nassau wrote:
Hi Sverre,

I don't think it's a good idea to have different zeroes in an algebraic structure that is also categorized as an abelian group, unless you take the point that a "graded abelian group" should not be an "abelian group".

But let me also point out that something similar to what you want already exists: you can take a homogeneous component of the Steenrod algebra and look at its zero:

sage: A=SteenrodAlgebra(2)
sage: A[18]
Vector space spanned by (Sq(0,1,0,1), Sq(3,0,0,1), Sq(1,1,2), Sq(4,0,2), Sq(2,3,1), Sq(5,2,1), Sq(8,1,1), Sq(11,0,1), Sq(0,6), Sq(3,5), Sq(6,4), Sq(9,3), Sq(12,2), Sq(15,1), Sq(18)) over Finite Field of size 2
sage: A[18].zero() == A.zero()
True
sage: A[18].zero() == A[17].zero()
False
This suggests that "A[18].zero().degree()" could give 18, and the fact that it currently gives a ValueError might be considered a bug.

It could equally well give zero. Should A[18] remember that it's in degree 18, or should is just be an ungraded module?

To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Christian Nassau

unread,
Jul 18, 2020, 8:11:12 PM7/18/20
to sage-...@googlegroups.com
On 19.07.20 01:01, John H Palmieri wrote:


On Saturday, July 18, 2020 at 2:57:21 PM UTC-7, Christian Nassau wrote:
Hi Sverre,

I don't think it's a good idea to have different zeroes in an algebraic structure that is also categorized as an abelian group, unless you take the point that a "graded abelian group" should not be an "abelian group".

But let me also point out that something similar to what you want already exists: you can take a homogeneous component of the Steenrod algebra and look at its zero:

sage: A=SteenrodAlgebra(2)
sage: A[18]
Vector space spanned by (Sq(0,1,0,1), Sq(3,0,0,1), Sq(1,1,2), Sq(4,0,2), Sq(2,3,1), Sq(5,2,1), Sq(8,1,1), Sq(11,0,1), Sq(0,6), Sq(3,5), Sq(6,4), Sq(9,3), Sq(12,2), Sq(15,1), Sq(18)) over Finite Field of size 2
sage: A[18].zero() == A.zero()
True
sage: A[18].zero() == A[17].zero()
False
This suggests that "A[18].zero().degree()" could give 18, and the fact that it currently gives a ValueError might be considered a bug.

It could equally well give zero. Should A[18] remember that it's in degree 18, or should is just be an ungraded module?

I don't think zero makes much sense here. The suggestion seems to be to have in Sage an A[n] that represents homotopy classes of maps from a fixed suspension of HF2 to HF2. If this is the goal then elements of A[n] should always have x.degree() = n, and we would also need a multiplication A[n] * A[m] -> A[n+m].  Currently that product map does not exist in Sage:

sage: A=SteenrodAlgebra(2)
sage: A[3].an_element() * A[4].an_element()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)


TypeError: unsupported operand parent(s) for *: 'Vector space spanned by (Sq(0,1), Sq(3)) over Finite Field of size 2' and 'Vector space spanned by (Sq(1,1), Sq(4)) over Finite Field of size 2'

Also, a quick test suggests that the M[n] notation is not part of a general framework in Sage, and that degrees of inhomogeneous elements are handled somewhat liberally in other places.  This might just reflect a "cultural" difference between topologists and combinatorialists, of course:

sage: S=SymmetricFunctions(QQ)
sage: S.an_element().degree()
2
sage: for x in S.an_element().monomials():
....:     print (x, x.degree())
....:    
s[] 0
s[1] 1
s[2] 2
sage: S.zero().degree()
0
sage: S.graded_algebra() is S
True






rrbold

unread,
Jul 19, 2020, 5:25:38 AM7/19/20
to sage-devel
Hi Christian and John,

Christian, your first sentence puts the finger on the correct spot:   I take the position that a graded abelian group is not an abelian group.   It is a sequence of abelian groups.

For any category C, one can consider Gr(C), the category of graded objects in C, which has objects the functions from your grading monoid, frequently the natural numbers, to Obj(C), and morphisms the sequences of morphisms of C.   There is no need for C to have a direct sum or categorical coproduct which will allow you to combine these
into a single object in C, in order to consider such things.

Mathematically, consider singular n-cochains on a space X with values in a module M.   These are functions from the set Top(\Delta_n,X) of continuous maps \Delta_n --> X into the module M, i.e., elements of Set(Top(\Delta_n,X),M), given the natural module structure inherited from M.    If n \neq k, then there is no sensible relation between the  zero function Top(\Delta_n, X) --> M and the zero function Top(\Delta_k,X).    Only inductive generalization or habit would suggest that sending all the elements of Top(\Delta_n,X)  to zero \in M means you should also do this to all the elements in the entirely different set Top(Delta_k,X).

The fact that this causes difficulties in the programming is a hint that we make an error in thinking of graded objects as their direct sum.    I think it is better to take the mathematically sensible solution, and accept that there is a different 0 in each degree of a graded module.  

Best,
Bob (rrb - old)
To unsubscribe from this group and stop receiving emails from it, send an email to sage-...@googlegroups.com.

Reimundo Heluani

unread,
Jul 19, 2020, 6:26:58 AM7/19/20
to sage-...@googlegroups.com
The problem of thinking that graded Abelian groups and graded modules are not
abelian groups, and similarly graded Algebras are not Algebras, in the context
of Sage, is that the whole category framework is in place, and your classes
will not be able to use this. A parent defined as above cannot be a parent in
the category of graded modules. This means that you have to double whatever
code is already in place in the category framework and this should lead to
more programming errors than the ones that may be solved by having a zero on
each degree instead of checking for zero before using degree().

R.
> an email to [1]sage-...@googlegroups.com.
> To view this discussion on the web visit [2]https://groups.google.com/d
> /msgid/sage-devel/816f808f-0c55-4d3c-946e-b3c2d6cbe56fo%
> 40googlegroups.com.
>
>
>
>--
>You received this message because you are subscribed to the Google Groups
>"sage-devel" group.
>To unsubscribe from this group and stop receiving emails from it, send an email
>to [3]sage-devel+...@googlegroups.com.
>To view this discussion on the web visit [4]https://groups.google.com/d/msgid/
>sage-devel/75adcfa9-e7cc-4613-abb8-7bf85a28f016o%40googlegroups.com.
>
>References:
>
>[1] javascript:
>[2] https://groups.google.com/d/msgid/sage-devel/816f808f-0c55-4d3c-946e-b3c2d6cbe56fo%40googlegroups.com?utm_medium=email&utm_source=footer
>[3] mailto:sage-devel+...@googlegroups.com
>[4] https://groups.google.com/d/msgid/sage-devel/75adcfa9-e7cc-4613-abb8-7bf85a28f016o%40googlegroups.com?utm_medium=email&utm_source=footer

signature.asc

Christian Nassau

unread,
Jul 19, 2020, 6:29:27 AM7/19/20
to sage-...@googlegroups.com
On 19.07.20 00:34, rrbold wrote:
Hi Christian and John,

Christian, your first sentence puts the finger on the correct spot:   I take the position that a graded abelian group is not an abelian group.   It is a sequence of abelian groups.

For any category C, one can consider Gr(C), the category of graded objects in C, which has objects the functions from your grading monoid, frequently the natural numbers, to Obj(C), and morphisms the sequences of morphisms of C.   There is no need for C to have a direct sum or categorical coproduct which will allow you to combine these
into a single object in C, in order to consider such things.

Mathematically, consider singular n-cochains on a space X with values in a module M.   These are functions from the set Top(\Delta_n,X) of continuous maps \Delta_n --> X into the module M, i.e., elements of Set(Top(\Delta_n,X),M), given the natural module structure inherited from M.    If n \neq k, then there is no sensible relation between the  zero function Top(\Delta_n, X) --> M and the zero function Top(\Delta_k,X).    Only inductive generalization or habit would suggest that sending all the elements of Top(\Delta_n,X)  to zero \in M means you should also do this to all the elements in the entirely different set Top(Delta_k,X).

The fact that this causes difficulties in the programming is a hint that we make an error in thinking of graded objects as their direct sum.    I think it is better to take the mathematically sensible solution, and accept that there is a different 0 in each degree of a graded module.  

Hi Bob,

I think treating graded objects as sequences/disjoint unions of their homogeneous components is a perfectly legitimate point of view, and Sage could and should strive to make it possible to follow that philosophy in user code. I also stand by my suggestion that this is already *almost* possible, using the A[n] in place of A. Essentially you would just need to redefine the Sq function or whatever you use to generate a Steenrod operation:

sage: def Sq(*R):
....:     A = SteenrodAlgebra(2)
....:     a = A.Sq(*R)
....:     return A[a.degree()].monomial(R)
....:
sage: Sq(1,1)+Sq(4)
milnor[(1, 1)] + milnor[(4,)]

This way, your Sq(R) live in different parents depending on their degree, and the association element -> parent -> degree allows to recover the degree from all elements.

When you try to add those Sq(R) from different degrees, you also get the expected errors:

sage: Sq(1,1)+Sq(5)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: unsupported operand parent(s) for +: 'Vector space spanned by (Sq(1,1), Sq(4)) over Finite Field of size 2' and 'Vector space spanned by (Sq(2,1), Sq(5)) over Finite Field of size 2'

Using that approach in practice would need some (minor) fixes to Sage, but these are not nearly as radical as suggesting multiple zeroes in the SteenrodAlgebra itself:

TODOs:

  1)  missing multiplication A[n] * A[m] -> A[n+m]

  2)  A[n].zero().degree() should be n

  3)  the printing of A[n] and of its elements is a bit unexpected: I would support changing this to the usual printing with respect to the basis that is chosen in the usual SteenrodAlgebra

  4)  missing cast from A to A[n]

Best,
Christian

PS: the different approaches to gradings seem to mirror the distinction between classical and quantum physics. The enlightened quantum perspective just acepts as a fact of nature that elements of a graded module usually exist in a superposition of pure states, i.e. that they might have no fixed degree (for inhomogeneous elements) or every degree (the zero element). I find this mostly just as good in my programming.

In practical terms this just shifts the responsibilities a bit: the result of a computation (e.g. multiplication) will not in general know its degree; therefore the piece of user code that triggered the multiplication must keep a memory of the grading that it's workign at.

PPS: among illuminated minds, no posting is complete without a hint of self-contradiction, so I feel obliged to disclose that in my Steenrod Tcl library I actually made a similar choice about the representation of matrices as lists of lists of entries, and here my choice was clearly wrong and has given me a lot of headachesever since: the point is that I cannot recover the M from a matrix of dimensions 0xM or Mx0 ...

To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/75adcfa9-e7cc-4613-abb8-7bf85a28f016o%40googlegroups.com.


John H Palmieri

unread,
Jul 19, 2020, 3:04:26 PM7/19/20
to sage-devel
Hi Bob,

Mathematically, a classical example of a graded object is a polynomial ring, and non-topologists often consider nonhomogeneous polynomials, for reasons that are beyond me. But once you do that, it seems that you're forced to live in a direct sum. Sage could have two different structures, although they would need names: an indexed family of objects and a direct sum of objects. I don't really want to start a fight over which deserves to be called "graded objects," though.

Let me go back to a question I asked Sverre: what happens in your code if you allow nonhomogeneous elements? It may not be something you would ever want to do, but maybe it would just work without breaking anything, then that's an easy way around.

- John

Robert Bruner

unread,
Jul 19, 2020, 4:11:56 PM7/19/20
to sage-devel
Hi John,

Your question is a good one, to look at the places where the notion that 0 has no degree
causes extra effort. I have strong memories of having to go through minor but
annoying contortions to deal with this, both in sage and in MAGMA, for decades now,
but don't have examples fresh in mind. That's why I haven't responded yet.

As a practical matter, implementing a full Gr(C) or Gr(category=C,index=N) solution
would require far too much effort, as appealing as it is aesthetically.

I will try to see if I can retrieve some examples for you. Sverre may beat me to it.

We had hoped, perhaps over-optimistically, that it might not be too hard to assign
degrees to solve the problem Sverre described succinctly in his initial post: if g is an
element of degree 0 and we make the assignment x = (Sq(1)*Sq(1))*g, the module
code has no way to recognize that x has degree 2, since the Steenrod algebra code
does not view Sq(1)*Sq(1) as having degree 2.

This means that one has to resort to circumlocutions like
if x == 0 then A else B
when, mathematically and conceptually, it should be possible to simply say
B

Bob

________________________________________
From: sage-...@googlegroups.com <sage-...@googlegroups.com> on behalf of John H Palmieri <jhpalm...@gmail.com>
Sent: Sunday, July 19, 2020 3:04 PM
To: sage-devel
Subject: Re: [sage-devel] Re: Graded modules over the Steenrod algebra: The degree of zero elements

Hi Bob,

- John

Best,
Christian

or

Similar for graded A-modules.

Regards,

Sverre

Regards,

Sverre Lunøe-Nielsen

--
John

To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/816f808f-0c55-4d3c-946e-b3c2d6cbe56fo%40googlegroups.com<https://groups.google.com/d/msgid/sage-devel/816f808f-0c55-4d3c-946e-b3c2d6cbe56fo%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.

To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com<mailto:sage-devel+...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/712aa5ef-4aac-49f9-9ac9-e80b7449b700o%40googlegroups.com<https://groups.google.com/d/msgid/sage-devel/712aa5ef-4aac-49f9-9ac9-e80b7449b700o%40googlegroups.com?utm_medium=email&utm_source=footer>.

sver...@gmail.com

unread,
Jul 19, 2020, 4:33:37 PM7/19/20
to sage-devel
John,

On Sunday, July 19, 2020 at 1:00:21 AM UTC+2 John H Palmieri wrote:
Can you give a specific example of a computation in which you care about the degree where your zero element lives? Or where you can't just recover it from its component elements (if ab=0, then you have an element in degree = deg(a) + deg(b)). I'm struggling to understand this.

It's more that I would like to avoid checking for the special case 0.  The case we are discussing is similar to the use of pointers vs. references in C++:  If a function returns a pointer to an object, the recipient have to check that it is not NULL before dereferencing it.  On the other hand, if the function returns a reference to an object, you don't have to.  The latter leads to cleaner code, and is preferred if one has a choice since it relieves the user from the responsibility of guarding against the null case.

This is what Christian mentions too:

> In practical terms this just shifts the responsibilities a bit: the result of a computation (e.g. multiplication) will not in general know its degree; therefore the piece of user code that triggered the multiplication must keep a memory of the grading that it's workign at.

If we treated graded objects like Bob suggests, we would relieve the user of this responsibility.

At this point I think it's clear that what I would like requires some work to get done right,  so I guess I will let this rest for now.  Thanks so much to all for your input!

Best regards,
Sverre

sver...@gmail.com

unread,
Jul 19, 2020, 4:55:41 PM7/19/20
to sage-devel
John,

On Sunday, July 19, 2020 at 9:04:26 PM UTC+2 John H Palmieri wrote:
> Let me go back to a question I asked Sverre: what happens in your code if you allow nonhomogeneous elements? It may not be something you would ever want to do, but maybe it would just work without breaking anything, then that's an easy way around.

Off the top of my head I couldn't say how much trouble it would cause.  The package is really focused on graded maps and homological algebra (free resolutions, kernels, cokernels etc.) and this issue of the zeros has only come up now when we have been finishing the documentation and tests.

So, I have never considered it seriously before, but I will and see if it could be useful. 

Thanks!

- Sverre



- John
Reply all
Reply to author
Forward
0 new messages