You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jankoboehm just sent me this example, maybe @thofma or @fieker have an idea what's going on:
Consider this input:
R, _ = polynomial_ring(QQ, ["x", "y", "z"]);
Z = abelian_group(0);
Rg, (x, y, z) = grade(R,[Z[1], Z[1], Z[1]]);
F1 = graded_free_module(Rg, [2,2,2]);
F2 = graded_free_module(Rg, [2]);
G = graded_free_module(Rg, [1,1]);
V1 = [y*G[1], (x+y)*G[1]+y*G[2], z*G[2]];
V2 = [z*G[2]+y*G[1]];
a1 = hom(F1, G, V1);
a2 = hom(F2, G, V2);
M = subquotient(a1,a2);
m = x*y*z*M[1]
Then we can proceed:
julia> degree(m)
Element of
GrpAb: Z
with components [5]
julia> degree(m)
Element of Z with components [5]
Note that the output changes the second time around.
The problem goes away if I let Z print itself once (e.g. by removing the semicolon at the end of the second line of the initial input).
So my guess is that printing degree(m) somehow leads to the abelian group Z "learning" its name, and then the next time degree(m) is printed, a different path is taken.
Clearly it would be preferable if we get the same printing output in both cases...
@jankoboehm ... but at least the above maybe suggests a temporary workaround for you?
The text was updated successfully, but these errors were encountered:
Thanks a lot, did not notice that, it is a good workaround for the moment.
The problem seems not to happen in similar situations, e.g., for polynomial rings. However there is also a (related or unrelated) issue with compact printing, which works in the graded case, but not in the ungraded case.
julia> R, (x, y, z) =polynomial_ring(QQ, ["x", "y", "z"]);
julia> Z =abelian_group(0);
julia> Rg, (a, b, c) =grade(R,[Z[1], Z[1], Z[1]]);
julia> io_compact =IOContext(stdout, :compact=>true);
julia>print(io_compact, R)
Multivariate polynomial ring in3 variables over QQ
julia>print(io_compact, Rg)
Rg
@jankoboehm just sent me this example, maybe @thofma or @fieker have an idea what's going on:
Consider this input:
Then we can proceed:
Note that the output changes the second time around.
The problem goes away if I let
Z
print itself once (e.g. by removing the semicolon at the end of the second line of the initial input).So my guess is that printing
degree(m)
somehow leads to the abelian groupZ
"learning" its name, and then the next timedegree(m)
is printed, a different path is taken.Clearly it would be preferable if we get the same printing output in both cases...
@jankoboehm ... but at least the above maybe suggests a temporary workaround for you?
The text was updated successfully, but these errors were encountered: