-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when defining differentials over GCA's with relations. #34818
Comments
Commit: |
New commits:
|
comment:3
A few minor things: -Check that #34818 is solved::
+Check that :trac:`34818` is solved:: if isinstance(im_gens, (list, tuple)):
- im_gens = {A.gen(i): x for i, x in enumerate(im_gens)}
-
- im_gens = {A(a): A(im_gens[a]) for a in im_gens}
+ im_gens = {A.gen(i): A(x) for i, x in enumerate(im_gens)}
+ else:
+ im_gens = {A(a): A(im_gens[a]) for a in im_gens} def image_monomial(exponent):
i = 0
cexp = list(exponent)
while i < len(cexp):
- if cexp[i] == 0:
+ if not cexp[i]:
i +=1
continue
a = A.gen(i)
try:
da = im_gens[a]
except KeyError:
da = A.zero()
cexp[i] -= 1
- b = prod([A.gen(j)**cexp[j] for j in range(len(cexp))])
+ b = prod(A.gen(j) ** cexp[j] for j in range(len(cexp)))
db = image_monomial(cexp)
- im = da * b + (-1)**A._degrees[i]*a*db
- return(A(im))
+ im = da * b + (-1)**A._degrees[i] * a * db
+ return A(im)
return A.zero()
for g in I.gens():
d = g.dict()
- res = A(sum([d[ex]*image_monomial(ex) for ex in d]))
+ res = A.sum(d[ex] * image_monomial(ex) for ex in d)
if not res.is_zero():
- raise ValueError("The differential does not preserve the ideal")
+ raise ValueError("the differential does not preserve the ideal") Note that this last change might change a few error messages, but this is to follow a Python convention. |
comment:4
Your changes look good. Can you push them? |
comment:5
Done. I also took the liberty of making all of the error messages in the file follow the Python convention (to help prevent any inconsistencies). New commits:
|
Reviewer: Travis Scrimshaw |
comment:6
Great! It can be set to positive review if nobody objects. |
comment:7
pyflakes plugin says
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:9
Fixed. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Green bot modulo the pyflakes unused variable I just removed. |
comment:13
Morally green bot. |
comment:14
Positive review then? |
comment:15
Assuming Frédéric has no further ones, I think so. |
Changed branch from u/tscrim/differential_gca_relations-34818 to |
The following code
Produces an error
which is wrong, because the differential is valid in the quotient algebra.
It seems that the computations for the differential are done in the free algebra instead of the quotient one.
CC: @tscrim @jhpalmieri
Component: algebra
Author: Miguel Marco
Branch/Commit:
8ba265b
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34818
The text was updated successfully, but these errors were encountered: