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


On 18.07.20 11:31, Sverre Lunøe-Nielsen wrote:
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.

--
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+unsubscr...@googlegroups.com <mailto:sage-devel+unsubscr...@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 <https://groups.google.com/d/msgid/sage-devel/50bab31f-182c-448e-bf35-b1bac90a8a75o%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/48f57e60-9547-2241-0f33-8c56ba8c1c46%40nullhomotopie.de.

Reply via email to