-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Group algebra bug #34292
Comments
Branch: u/tkarn/group-algebra-34292 |
Commit: |
Author: Trevor K. Karn |
New commits:
|
comment:2
I am pretty certain this is not the correct fix. The underlying issue comes from the fact that
IMO, it is luck that this makes the code work. The issue is that the coercion G = self.basis().keys()
K = self.base_ring()
+ G_coercion = G.coerce_map_from(S)
- if G.has_coerce_map_from(S):
+ if G_coercion is not None:
from sage.categories.groups import Groups
# No coercion for additive groups because of ambiguity of +
# being the group action or addition of a new term.
- return self.category().is_subcategory(Groups().Algebras(K))
+ if not self.category().is_subcategory(Groups().Algebras(K)):
+ return None
+ if S is G:
+ return True
+ return self.coerce_map_from(G) * G_coercion
if S in Sets.Algebras:
S_K = S.base_ring()
S_G = S.basis().keys()
hom_K = K.coerce_map_from(S_K)
hom_G = G.coerce_map_from(S_G)
if hom_K is not None and hom_G is not None:
return SetMorphism(S.Hom(self, category=self.category() | S.category()),
lambda x: self.sum_of_terms( (hom_G(g), hom_K(c)) for g,c in x )) Unfortunately, this does not solve the problem. There is an even deeper issue:
So we see it is getting short-circuited by the coercion system because of equal-but-not-identical-parents. Indeed, this is matched by the coercion map:
We see a very subtle distinction:
This lead me through the
The default implementation uses My proposal to fix this is have
to |
This comment has been minimized.
This comment has been minimized.
comment:4
After making the change to
I think this makes sense given the change you propose and seems mathematically correct, so I am inclined to change the doctest to the |
comment:5
That is correct. While it seems like it adds an extra layer of indirection, it avoids a second call to the coercion system. |
comment:8
Awesome, thanks! Replying to @tscrim:
|
comment:9
Can you also quickly remove the added blankline to Once the patchbot comes back green, positive review. |
Reviewer: Travis Scrimshaw |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed keywords from group-algebra coercion to group-algebra coercion gsoc2022 |
comment:12
Thanks. Now to wait for the bot. |
comment:13
The bot seems to not like this branch. In the log I see
Are these the tests that fail? When I ctrl-f "fail" I only get the lines:
and
which don't seem to tell me about which tests failed. |
comment:14
|
comment:15
The bot is morally green. Those timed out tests show up on many different tickets. Something needs to be tweaked on that patchbot. |
Changed branch from u/tkarn/group-algebra-34292 to |
Discussed
on sage-support
and sage-devel.
There is a coercion bug that causes the example:
to fail. It does not recognize in the coercion that the parents of the indexing elements should be the same.
CC: @tscrim @trevorkarn
Component: algebra
Keywords: group-algebra coercion gsoc2022
Author: Trevor K. Karn
Branch/Commit:
e6f16a7
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34292
The text was updated successfully, but these errors were encountered: