Hi Reimundo,

On 2020-06-17, 'Reimundo Heluani' via sage-support 
<sage-support@googlegroups.com> wrote:
> Is there an implementation of such a thing as in the title? 

TL;DR: Yes. Singular does have these capabilities. I recall that these
were comfortably wrapped in SageMath, but as it turns out: They aren't.

Note to developers: I think we should have at least two trac tickets
related with Reimundo's question, and we should have these tickets opened
10 years ago already!!!

1. If A is a super-commutative algebra (which exists in Sage), then
   singular(A) should create a copy of A in the Singular pexpect
   interface, but this is broken.
2. Apparently, for ideals over A, Sage is using a generic implementation
   that doesn't know about Gröbner bases. It should of course use an
   implementation based on libsingular.

Longer answer:

I suppose "supercommutative" means that you have something
that resembles a polynomial ring, with the difference that some of the
generators anti-commute among each other, whereas some generators
commute with all generators.

> I am facing the following design problem, and I'd love to get some pointers.

Can one not find it by searching in the SageMath documentation? Anyway,
I suppose it is explained in the docs how to create a SCA
(SuperCommutativeAlgebra) with grading, create ideals
over such algebras, and compute Gröbner bases.

This is how one could search during a SageMath session:

  sage: search_src('supercommutative')                                          
  
However, the answers to that search have not really been helpful. So,
perhaps the search in the documentation wasn't successful either. It
points to a lot of places in "sage.categories", but not where I recall
the actual implementation.

Fortunately I recall that supercommutative algebra is abbreviated as
sca. Hence, the following search succeeded:

  sage: search_def('sca', whole_word=True)                                      
  
It tells you that you find it (of course with documentation and
examples) in sage.rings.polynomial.plural

> Now the issue is to compute the graded dimension of the quotient as a formal 
> power series.

You talk about Hilbert-Poincaré series? That's already implemented in
SageMath

Actually I need Hilbert-Poincaré series for my computation of modular
cohomology rings of finite groups; these rings are graded-commutative
(for odd prime characteristic at least) and can thus be implemented as
supercommutative algebras.

Here is a non-trivial example from my cohomology computations
(translated to boilerplate singular):

sage: names = '(x1a,x1b,x3a,x3b,y2a,y2b,y2c,y2d,y6)'                            
sage: Igens = ['x1a*x1b',
 'y2b*x1a-y2a*x1b',
 'y2c*x1a-y2b*x1b-y2a*x1b',
 'y2c*x1b-y2b*x1b-y2a*x1b',
 'y2d*x1a-y2b*x1b+y2a*x1b',
 '-y2b^2+y2a*y2c-y2a*y2b',
 'y2b*y2c-y2b^2-y2a*y2b',
 'y2c^2+y2b^2+y2a*y2b',
 'y2b^2-y2a*y2d-y2a*y2b+x1a*x3a',
 '-y2b*y2d-y2b^2+y2a*y2b+x1b*x3a',
 '-y2b*y2d-y2a*y2d+x1a*x3b',
 '-y2c*y2d+x1b*x3b',
 'y2d*x3a-y2d^2*x1b-y2c*x3a-y2b*x3a+y2a*y2b*x1b-y2a^2*x1b',
 '-y2b*x3a+y2a*x3b-y2a*x3a-y2a*y2b*x1b',
 '-y2c*x3a+y2b*x3b-y2a^2*x1b',
 'y2c*x3b+y2c*x3a-y2a*y2b*x1b-y2a^2*x1b',
 'x3a*x3b-y2d*x1b*x3b+y2a*x1b*x3b-y2a*x1a*x3b+y2a*x1a*x3a']

Create the super commutative algebra:

sage: R = singular.ring(3,names,'wp(1,1,3,3,2,2,2,2,6)')
sage: A = singular.superCommutative(4,9)
sage: A.set_ring()

Create an ideal and compute its Hilbert series (note that the quotient
of A by this ideal is isomorphic to the cohomology ring of the Sylow
3-subgroup of U_3(8) with coefficients in GF(3)):

sage: I = singular.ideal(Igens)
sage: from sage.rings.polynomial.hilbert import hilbert_poincare_series
sage: HP = hilbert_poincare_series(I.twostd().lead(), (1,1,3,3,2,2,2,2,6))

Now we can read off the number of standard monomials in each (weighted)
degree. Unfortunately, Singular doesn't have a function to return
standard monomials in WEIGHTED degree. Hence, just as a proof of
concept, I collect the standard monomials in unweighted degree up to 8,
then filter and count by weighted degree.

sage: SM = []
sage: for d in range(1,9): 
....:     SM.extend(list(I.twostd().kbase(d)))
....:
sage: for d in range(1,9):
....:     print(d,len([m for m in SM if m.deg()==d]))
....:
1 2
2 6
3 8
4 7
5 8
6 6
7 6
8 11

And this coincides with what the Hilbert series predicts:

sage: HP
(t^14 + t^13 + 3*t^12 - 3*t^10 - 7*t^9 - 3*t^8 + t^7 + 2*t^6 - 2*t^5 - 5*t^4 - 
7*t^3 - 6*t^2 - 2*t - 1)/(t^3 - 1)
sage: PowerSeriesRing(ZZ,'t')(HP)
1 + 2*t + 6*t^2 + 8*t^3 + 7*t^4 + 8*t^5 + 6*t^6 + 6*t^7 + 11*t^8 + 13*t^9 + 
9*t^10 + 11*t^11 + 10*t^12 + 8*t^13 + 10*t^14 + 10*t^15 + 8*t^16 + 10*t^17 + 
10*t^18 + 8*t^19 + O(t^20)

Note that in princible Singular can compute Hilbert series, too, but 
it has an awkward syntax, refuses to work in non-commutative settings,
and occasionally suffers from integer overflows.

Best regards,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/rq0279%24ev3%241%40ciao.gmane.io.

Reply via email to