Ask Your Question
3

Trouble with CDGA's with One Generator

asked 2023-08-07 23:41:15 +0100

russphelan gravatar image

updated 2023-08-08 22:37:36 +0100

slelievre gravatar image

Hi all, I've been using the functions associated with the GCAlgebra class to compute some minimal models for given cohomology algebras. It works fine whenever my cohomology algebra has 2 or more generators, but I can't get it to accept a single generator. I am trying, for example:

D.<x> = GradedCommutativeAlgebra(QQ, degrees = (2,))
d = D.differential({x:0,})
D = D.cdg_algebra(d)
I = D.ideal(x^3)
R = D.quotient(I)

It always fails on the quotient, the objection is that

   1324                               'homomorphisms of graded commutative '
   1325                               'algebras have only been implemented '
   1326                               'when the base rings are the same' "

I don't get it, pretty printing all objects shows they are all over the rational field. I did figure out that you need a comma to define a single-element tuple otherwise you get "not iterable" errors, but I think that's solved now. Any ideas?

To contrast, something like this runs fine:

D.<x,y> = GradedCommutativeAlgebra(QQ, degrees = (2,2))
d = D.differential({x:0, y:0})
D = D.cdg_algebra(d)
I = D.ideal([x^2-y^2,x*y,x^3,y^3])
R = D.quotient(I)

Note: it doesn't help to change D.ideal(x^3) to D.ideal([x^3]) or D.ideal([x^3,])... I thought maybe it expected a tuple. I've also seen examples where things like ideal(x^3) are written, so that shouldn't be an issue.

Thanks, Russ

edit retag flag offensive close merge delete

Comments

As a workaround, you can define the quotient first, and then define the differential: D.<x> = ... and then C = D.quotient(...) and then d = C.differential(...) etc.

John Palmieri gravatar imageJohn Palmieri ( 2023-08-09 22:22:35 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-08-09 14:35:56 +0100

dan_fulea gravatar image

It is hard to understand what is going wrong on the road. The code is doing some checks, and one of them is failing. The following code tries to reproduce what the code would have done, when going into it step for step.

from sage.algebras import commutative_dga as cdga

D.<y> = GradedCommutativeAlgebra(QQ, degrees = (2,))
d = D.differential({y: 0})
E = D.cdg_algebra(d)

E.inject_variables()    # make y known to the world, just to be sure we have the right y... 
J = E.ideal(y^3)

AQ = cdga.GCAlgebra.quotient(E, J, check=False)
dic = {AQ(a) : AQ(a.differential()) for a in E.gens()}

Q = AQ.cdg_algebra(dic)

And it works... For instance:

sage: for k in [0..5]:
....:     print(f"{k = } {Q(y)^k = }")
....: 
k = 0 Q(y)**k = 1
k = 1 Q(y)**k = y
k = 2 Q(y)**k = y^2
k = 3 Q(y)**k = 0
k = 4 Q(y)**k = 0
k = 5 Q(y)**k = 0
sage: Q.differential(y)
Differential of Commutative Differential Graded Algebra with generators ('y',) in degrees (2,) with relations [y^3] over Rational Field
  Defn: y --> 0
sage: Q.differential()(y)
0
sage:

The explicit code above is avoiding the many selfoccurrences in the original code... There must be a related bug in there, that must be fixed... (I never got involved in such bug fixes, but maybe i should start doing it...)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2023-08-07 23:41:15 +0100

Seen: 128 times

Last updated: Aug 09 '23