Sage: Ticket #8589: New feature : Hopf algebra structure on group algebras
https://trac.sagemath.org/ticket/8589
<p>
This patch gives its Hopf algebra structure to the group algebra of <code>G</code> over <code>R</code> created in the following way
</p>
<pre class="wiki"> sage: G.algebra(R)
</pre><p>
Another feature is a method is_central on elements of the algebra (which works also for monoid algebras so is in the file sage.categories.monoids)
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/8589
Trac 1.1.6vferayTue, 23 Mar 2010 17:35:21 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:1
https://trac.sagemath.org/ticket/8589#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
Doing this, I have encountered and solved some problems:
</p>
<ul><li>The generators of permutation groups were returned as a list and not as a family, which is the case for other types of groups. They are now returned as a family.
</li></ul><ul><li>The Hopf algebra structure didn't include counit. This has been corrected.
</li></ul><ul><li>There was a bug in module_morphism which didn't work when the codomain was the ring itself (because it is not considered as a module by sage). It has been corrected.
</li></ul>
TicketjhpalmieriFri, 02 Apr 2010 16:20:33 GMT
https://trac.sagemath.org/ticket/8589#comment:2
https://trac.sagemath.org/ticket/8589#comment:2
<p>
Is line 919 in sage/categories/modules_with_basis.py a typo?
</p>
<pre class="wiki">:meth:`rodulesWithBasis.HomCategory.ElementMethods.on_basis`.
^
</pre><p>
Also, at the start of sage/groups/perm_gps/permgroup.py, the line
</p>
<pre class="wiki">from sage.combinat.family import Family
</pre><p>
might be changed to
</p>
<pre class="wiki">from sage.sets.family import Family
</pre><p>
(since sage.combinat.family says "This is a backward compatibility stub. Use :mod:<code>sage.sets.family</code> instead").
</p>
TicketvferayWed, 07 Apr 2010 16:03:10 GMT
https://trac.sagemath.org/ticket/8589#comment:3
https://trac.sagemath.org/ticket/8589#comment:3
<p>
You're right! A new version of the patch has been uploaded
</p>
<p>
Thanks for these comments!
</p>
<p>
Valentin
</p>
TickethivertWed, 05 May 2010 02:23:53 GMT
https://trac.sagemath.org/ticket/8589#comment:4
https://trac.sagemath.org/ticket/8589#comment:4
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:3" title="Comment 3">vferay</a>:
</p>
<blockquote class="citation">
<p>
You're right! A new version of the patch has been uploaded
</p>
</blockquote>
<p>
The feature here depends on the Algebra functorial constructions <a class="closed ticket" href="https://trac.sagemath.org/ticket/8881" title="enhancement: Functorial constructions in categories (closed: fixed)">#8881</a> which are not yet finished.
</p>
TicketvferayWed, 05 May 2010 09:06:42 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:5
https://trac.sagemath.org/ticket/8589#comment:5
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_work</em>
</li>
</ul>
<p>
Ok I wait until the Algebra functorial constructions are finished to finalize the patch
</p>
TicketnthieryWed, 09 Jun 2010 15:32:42 GMT
https://trac.sagemath.org/ticket/8589#comment:6
https://trac.sagemath.org/ticket/8589#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:5" title="Comment 5">vferay</a>:
</p>
<blockquote class="citation">
<p>
Ok I wait until the Algebra functorial constructions are finished to finalize the patch
</p>
</blockquote>
<p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/8881" title="enhancement: Functorial constructions in categories (closed: fixed)">#8881</a> was just merged in sage 4.4.4!
</p>
TicketnthieryMon, 14 Jun 2010 23:03:13 GMT
https://trac.sagemath.org/ticket/8589#comment:7
https://trac.sagemath.org/ticket/8589#comment:7
<p>
For the record with 4.4.3 and this patch applied,
</p>
<pre class="wiki">sage: SymmetricGroup(3).algebra(QQ)
</pre><p>
triggers an error about _basis_keys
</p>
TicketnilesSun, 10 Oct 2010 20:15:44 GMTcc set
https://trac.sagemath.org/ticket/8589#comment:8
https://trac.sagemath.org/ticket/8589#comment:8
<ul>
<li><strong>cc</strong>
<em>niles</em> added
</li>
</ul>
<p>
Hello,
</p>
<p>
Is there any new progress on this?
</p>
<p>
I'd like to help, but I think I have to start by understanding <code>Family</code>:
</p>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:1" title="Comment 1">vferay</a>:
</p>
<blockquote class="citation">
<ul><li>The generators of permutation groups were returned as a list and not as a family, which is the case for other types of groups. They are now returned as a family.
</li></ul></blockquote>
<p>
<code>DihedralGroup</code> and <code>CyclicPermutationGroup</code> both return <code>gens</code> as lists, and polynomial/power series rings return <code>gens</code> as tuples . . . could someone tell me if there is an effort under way to convert all of these to <code>Family</code>, or what sorts of things do already return <code>gens</code> as a <code>Family</code>?
</p>
<p>
Are there other work issues for this patch (other than the bug with 4.4.3 reported by nthiery), or is it otherwise ready for review?
</p>
<p>
thanks,
Niles
</p>
TicketvferayMon, 11 Oct 2010 15:57:28 GMT
https://trac.sagemath.org/ticket/8589#comment:9
https://trac.sagemath.org/ticket/8589#comment:9
<p>
Hello,
</p>
<blockquote>
<p>
finishing this patch is on my todo list of the week.
</p>
</blockquote>
<blockquote class="citation">
<blockquote>
<p>
could someone tell me if there is an effort under way to convert all of these to Family, or
</p>
</blockquote>
<p>
what sorts of things do already return gens as a Family?
</p>
</blockquote>
<p>
If we are only interested with groups, there is no interest to return things as a Family, but it is the natural structure when we work with algebra generators. So the change was to unify this but I confess that I don't remember for which function I wanted to do that.
</p>
<p>
more soon,
</p>
<p>
Valentin
</p>
TicketnthieryTue, 12 Oct 2010 16:18:51 GMT
https://trac.sagemath.org/ticket/8589#comment:10
https://trac.sagemath.org/ticket/8589#comment:10
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:9" title="Comment 9">vferay</a>:
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
could someone tell me if there is an effort under way to convert all of these to Family, or
what sorts of things do already return gens as a Family?
</p>
</blockquote>
</blockquote>
<blockquote class="citation">
<p>
If we are only interested with groups, there is no interest to
return things as a Family, but it is the natural structure when we
work with algebra generators. So the change was to unify this but I
confess that I don't remember for which function I wanted to do
that.
</p>
</blockquote>
<p>
The current convention is for algebra_generators,
semigroup_generators, and the like to return families.
</p>
<p>
There definitely is a plan for the long run (at least a wish from the
sage-combinat group :-)) to have .gens() return a family as well. But
this will require some serious coordination to maintain backward
compatibility, and I'd rather have it done in a separate patch.
</p>
<p>
Valentin: do you really need this feature right now?
</p>
TicketvferayWed, 13 Oct 2010 13:36:02 GMTcc changed
https://trac.sagemath.org/ticket/8589#comment:11
https://trac.sagemath.org/ticket/8589#comment:11
<ul>
<li><strong>cc</strong>
<em>nthiery</em> added
</li>
</ul>
<p>
Hello,
</p>
<blockquote class="citation">
<p>
Valentin: do you really need this feature right now?
</p>
</blockquote>
<p>
It was needed in the function algebra_generators() which can be called on a group or semi-group algebra. But I changed this function such that it works in both cases.
</p>
<p>
I splitted the patch in 2 and keep just the part on group algebra and Hopf algebra (and not the part turning group generators into a family).
</p>
<p>
Everything seems to work now (I have one error in the test of hopf_algebra_with_basis.py :
"... still using old coercion framework) when the patch is applied in the sage-combinat queue. But it seems to depend on other patches (because import it when no other patches are applied lead to a lot of mistakes. Nicolas, do you know which ones and what I should do.
</p>
<p>
I attach the new version of the patch
</p>
TicketnthieryWed, 13 Oct 2010 14:19:08 GMT
https://trac.sagemath.org/ticket/8589#comment:12
https://trac.sagemath.org/ticket/8589#comment:12
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:11" title="Comment 11">vferay</a>:
</p>
<blockquote class="citation">
<p>
It was needed in the function algebra_generators() which can be
called on a group or semi-group algebra. But I changed this function
such that it works in both cases.
</p>
</blockquote>
<p>
Thanks. Do you mind fixing instead semigroup_generators?
</p>
<blockquote class="citation">
<p>
I splitted the patch in 2 and keep just the part on group algebra
and Hopf algebra (and not the part turning group generators into a
family).
</p>
</blockquote>
<p>
Thanks.
</p>
<blockquote class="citation">
<p>
Everything seems to work now (I have one error in the test of
hopf_algebra_with_basis.py : "... still using old coercion
framework) when the patch is applied in the sage-combinat queue. But
it seems to depend on other patches (because import it when no other
patches are applied lead to a lot of mistakes. Nicolas, do you know
which ones and what I should do.
</p>
</blockquote>
<p>
After investigation, your patch depends on:
</p>
<ul><li>trac_9648_modulemorphism_codomain_extension-cs.patch # Needs review
</li><li>free_module_basis_key_initialisation-nb.patch
</li></ul><p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/9648" title="enhancement: New feature: ModulesWithBasis allows module_morphism's to a wider ... (closed: fixed)">#9648</a> just needs a last pass of proofreading + rerunning the tests
with the latest Sage. Do you volunteer for the former?
</p>
<p>
I just created <a class="closed ticket" href="https://trac.sagemath.org/ticket/10127" title="defect: Fix initialization order in CombinatorialFreeModule (closed: fixed)">#10127</a> for the second. We should be able to finalize it
soon with Nicolas B.
</p>
<p>
With those patches applied, I only get two trivial errors in sage/categories:
</p>
<pre class="wiki">sage -t "devel/sage-combinat/sage/categories/groups.py"
**********************************************************************
File "/opt/sage-4.5.2/devel/sage-combinat/sage/categories/groups.py", line 69:
sage: A.group_generators()
Expected:
[(2,3,4), (1,2,3)]
Got:
[(1,2,3), (2,3,4)]
sage -t "devel/sage-combinat/sage/categories/algebra_functor.py"
**********************************************************************
File "/opt/sage-4.5.2/devel/sage-combinat/sage/categories/algebra_functor.py", line 37:
sage: Groups().Algebras(QQ) # todo: update once there will be a category for group algebras
Expected:
Category of monoid algebras over Rational Field
Got:
Category of group algebras over Rational Field
</pre><p>
Cheers,
</p>
<blockquote>
<p>
Nicolas
</p>
</blockquote>
TicketvferayThu, 14 Oct 2010 10:09:20 GMT
https://trac.sagemath.org/ticket/8589#comment:13
https://trac.sagemath.org/ticket/8589#comment:13
<p>
Hi
</p>
<blockquote class="citation">
<p>
Thanks. Do you mind fixing instead semigroup_generators?
</p>
</blockquote>
<p>
You mean that you want semigroup_generators to return a list. I assume that this will need to change a few things in all the semigroup file. Another solution is also to overload the algebra_generators function for group algebras.
</p>
<blockquote class="citation">
<p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/9648" title="enhancement: New feature: ModulesWithBasis allows module_morphism's to a wider ... (closed: fixed)">#9648</a> just needs a last pass of proofreading + rerunning the tests with the latest Sage. Do you > volunteer for the former?
</p>
</blockquote>
<p>
ok I will try to do that.
</p>
<blockquote class="citation">
<p>
With those patches applied, I only get two trivial errors in sage/categories:
</p>
</blockquote>
<p>
the first one does not appear on my computer (?). I corrected the second one.
</p>
<p>
Valentin
</p>
TicketnthieryThu, 14 Oct 2010 12:57:10 GMT
https://trac.sagemath.org/ticket/8589#comment:14
https://trac.sagemath.org/ticket/8589#comment:14
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/8589#comment:13" title="Comment 13">vferay</a>:
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
Thanks. Do you mind fixing instead semigroup_generators?
</p>
</blockquote>
<p>
You mean that you want semigroup_generators to return a list. I assume that this will need to change a few things in all the semigroup file. Another solution is also to overload the algebra_generators function for group algebras.
</p>
</blockquote>
<p>
Oops, I investigated this too quickly. The culprit is actually Groups.<a class="missing wiki">ParentMethods?</a>.group_generators which returns self.gens() directly, instead of making the result first into a family.
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
<a class="closed ticket" href="https://trac.sagemath.org/ticket/9648" title="enhancement: New feature: ModulesWithBasis allows module_morphism's to a wider ... (closed: fixed)">#9648</a> just needs a last pass of proofreading + rerunning the tests with the latest Sage. > > Do you volunteer for the former?
</p>
</blockquote>
<p>
ok I will try to do that.
</p>
</blockquote>
<p>
Thanks!
</p>
<blockquote class="citation">
<blockquote class="citation">
<p>
With those patches applied, I only get two trivial errors in sage/categories:
</p>
</blockquote>
<p>
the first one does not appear on my computer (?).
</p>
</blockquote>
<p>
Hmm. Which patches did you have applied when you tried? Which version of Sage?
</p>
<blockquote class="citation">
<p>
I corrected the second one.
</p>
</blockquote>
<p>
Thanks!
</p>
TicketvferayThu, 14 Oct 2010 13:28:57 GMT
https://trac.sagemath.org/ticket/8589#comment:15
https://trac.sagemath.org/ticket/8589#comment:15
<p>
Replying to nthiery:
</p>
<blockquote class="citation">
<p>
Oops, I investigated this too quickly. The culprit is actually
Groups.<a class="missing wiki">ParentMethods?</a>?.group_generators which returns self.gens() directly, instead of making the > result first into a family.
</p>
</blockquote>
<p>
ok I have changed this function and every test pass...
</p>
<p>
I think the patch is ready now, I am waiting that the other patches are included in sage to set it as need_review .
</p>
<blockquote class="citation">
<blockquote class="citation">
<blockquote class="citation">
<p>
With those patches applied, I only get two trivial errors in sage/categories:
</p>
</blockquote>
<p>
the first one does not appear on my computer (?).
</p>
</blockquote>
<p>
Hmm. Which patches did you have applied when you tried? Which version of Sage?
</p>
</blockquote>
<p>
version 4.5.3, patches up to this one were applied. But now, I find the same result as you do (except that now, it has been transformed into a family)...
</p>
<p>
Valentin
</p>
TicketnthieryFri, 15 Oct 2010 13:56:12 GMTcc changed; reviewer, milestone set
https://trac.sagemath.org/ticket/8589#comment:16
https://trac.sagemath.org/ticket/8589#comment:16
<ul>
<li><strong>cc</strong>
<em>sage-combinat</em> added; <em>nthiery</em> removed
</li>
<li><strong>reviewer</strong>
set to <em>Nicolas M. Thiéry</em>
</li>
<li><strong>milestone</strong>
set to <em>sage-4.6.1</em>
</li>
</ul>
<p>
All test pass on 4.5.3, with the following patches applied:
</p>
<pre class="wiki">trac_9648_modulemorphism_codomain_extension-cs.patch # Needs review
trac_10127_free_module_basis_key_initialisation-nb.patch # Under review
trac_8589_feature_group_algebras_vf.patch #-4_5 # Under review
trac_8589_feature_group_algebras-reviewer-nt.patch
</pre><p>
Generally speaking, the patch is good to go, up to missing documentation and tests for Coalgebras.<a class="missing wiki">ElementMethods?</a>.counit. Valentin, please fold in my reviewer's patch, add doc and test, check that the documentation compiles smoothly, and upload here.
</p>
<p>
Then you can set a positive review on my behalf. Thanks for your work on that!
</p>
<p>
Niles: feel free to make a last check up!
</p>
TicketvferayMon, 18 Oct 2010 13:20:28 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:17
https://trac.sagemath.org/ticket/8589#comment:17
<ul>
<li><strong>status</strong>
changed from <em>needs_work</em> to <em>positive_review</em>
</li>
</ul>
<blockquote class="citation">
<p>
Valentin, please fold in my reviewer's patch, add doc and test, check that the documentation
compiles smoothly, and upload here.
</p>
</blockquote>
<p>
Done!
</p>
TicketvferayMon, 18 Oct 2010 13:21:04 GMTattachment set
https://trac.sagemath.org/ticket/8589
https://trac.sagemath.org/ticket/8589
<ul>
<li><strong>attachment</strong>
set to <em>trac_8589_feature_group_algebras_vf.2.patch</em>
</li>
</ul>
TicketvferayMon, 18 Oct 2010 13:21:06 GMTattachment set
https://trac.sagemath.org/ticket/8589
https://trac.sagemath.org/ticket/8589
<ul>
<li><strong>attachment</strong>
set to <em>trac_8589_feature_group_algebras_vf.patch</em>
</li>
</ul>
TicketjdemeyerSat, 23 Oct 2010 11:58:11 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:18
https://trac.sagemath.org/ticket/8589#comment:18
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>needs_info</em>
</li>
</ul>
<p>
Which of the patches should be applied?
</p>
TicketvferayTue, 26 Oct 2010 08:16:11 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:19
https://trac.sagemath.org/ticket/8589#comment:19
<ul>
<li><strong>status</strong>
changed from <em>needs_info</em> to <em>needs_review</em>
</li>
</ul>
<p>
The two files are the same. I did wrong manipulation. Sorry for that
</p>
TicketvferayTue, 26 Oct 2010 08:16:20 GMTstatus changed
https://trac.sagemath.org/ticket/8589#comment:20
https://trac.sagemath.org/ticket/8589#comment:20
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>positive_review</em>
</li>
</ul>
TicketjdemeyerMon, 01 Nov 2010 10:06:12 GMTstatus changed; resolution, merged set
https://trac.sagemath.org/ticket/8589#comment:21
https://trac.sagemath.org/ticket/8589#comment:21
<ul>
<li><strong>status</strong>
changed from <em>positive_review</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.6.1.alpha0</em>
</li>
</ul>
TicketchapotonWed, 19 Jul 2017 08:25:27 GMTauthor changed
https://trac.sagemath.org/ticket/8589#comment:22
https://trac.sagemath.org/ticket/8589#comment:22
<ul>
<li><strong>author</strong>
changed from <em>Valentin Feray</em> to <em>Valentin Féray</em>
</li>
</ul>
<p>
name with accent
</p>
Ticket