Ticket #3959 (closed enhancement: fixed)

Opened 3 months ago

Last modified 2 months ago

[with patch, positive review] General group algebras class

Reported by: davidloeffler Assigned to: davidloeffler
Priority: major Milestone: sage-3.2
Component: algebra Keywords:
Cc:

Description

I've attempted to write a generic class for group algebras R[G] where R is any commutative ring and G is any group; it derives from the existing Algebra class, and most of the work is done by the existing FormalSums class.

In the process I've uncovered a bizarre coercion wrinkle: if we try and make elements of R and elements of G coerce into R[G] automatically, it breaks, because (for example) 2 might coerce into G (e.g. if G = GL(n, ZZ)) and the compositions of the obvious maps ZZ -> G -> R[G] and ZZ -> R -> R[G] aren't the same! [*]

I've got around this by not adding automatic coercion from G to R[G], but I'm not sure if this is the right thing. In fact I'd very much appreciate any input on whether or not I've understood Sage's coercion framework and other "house rules" generally, as this is my first attempt to contribute anything where that's relevant.

Note: this is rather orthogonal to David Joyner's PermutationGroupRing class deriving from CombinatorialAlgebra -- what I'm trying to do is much more general but has almost no methods, and PermutationGroupRing might work well as a subclass of my general GroupAlgebra.

([*] I seem to recall mentioning this as a theoretical example in a discussion at Sage Days 6, but I can't remember what came of it at the time.)

Attachments

group_algebras.hg (5.1 kB) - added by davidloeffler on 08/26/2008 10:49:39 AM.
hg bundle (includes several small changesets) - against Sage 3.1.1
group_algebras_v1.patch (14.8 kB) - added by davidloeffler on 08/27/2008 07:03:33 AM.

Change History

08/26/2008 10:49:39 AM changed by davidloeffler

  • attachment group_algebras.hg added.

hg bundle (includes several small changesets) - against Sage 3.1.1

08/26/2008 10:57:17 AM changed by davidloeffler

  • owner changed from tbd to davidloeffler.
  • status changed from new to assigned.
  • summary changed from [with patch bundle] General group algebras class to [with patch bundle, needs review] General group algebras class.

(The above hg changeset bundle works fine for me but the trac browser doesn't seem to like it -- not sure what's going on there.)

08/26/2008 03:06:10 PM changed by wdj

This looks very interesting but I can't get it to pull/apply/import_patch etc. Can you please use the commit/log/export commands to create a regular patch (see http://www.sagemath.org/doc/prog/node72.html for details)?

Also, if R is a ring and G is a group then R[G] is a group ring and (in general) not an algebra. (An algebra, stripped of its multiplicative structure, is a vector space over a field. In general, a group ring such as R[G] does not have this property.)

08/27/2008 07:03:33 AM changed by davidloeffler

  • attachment group_algebras_v1.patch added.

08/27/2008 07:10:36 AM changed by davidloeffler

  • summary changed from [with patch bundle, needs review] General group algebras class to [with patch, needs review] General group algebras class.

OK, here's a single patch.

As for the naming convention: I thought an algebra over a ring R was any ring S with a fixed homomorphism R->S. This is what Sage's generic Algebra class does -- it doesn't require that its base_ring is a field. My class derives from that. Compare the existing FreeAlgebra? class, which also derives from Algebra and also can be defined over any ring (one of the FreeAlgebra? doctest examples is over ZZ).

08/27/2008 03:36:33 PM changed by wdj

  • summary changed from [with patch, needs review] General group algebras class to [with patch, positive review] General group algebras class.

This applies cleanly to sage 3.1.1 and passes sage -testall. I read over the diff file and played with some of the functionality. I think this is a really good basic patch and should be applied. There are lots of additions I'd like. For example, there are special methods if R[G] is finite or if R is a field, so special classes could be written for these. However, this is a great start.

About the terminology (group algebra vs group ring), I have no serious objection and it is fine with me if it stays as is.

08/31/2008 06:48:51 PM changed by AlexGhitza

  • milestone changed from sage-feature to sage-3.1.2.

09/19/2008 09:06:30 AM changed by mabshoff

By the way: I am not ignoring this patch, but Mike Hansen has a couple fixes for this patch that he is working on and will be done hopefully this weekend.

Cheers,

Michael

10/18/2008 08:11:31 AM changed by mabshoff

  • status changed from assigned to closed.
  • resolution set to fixed.

Merged in Sage 3.2.alpha0.

Mike: Feel free to submit a patch on top of this one.

Cheers,

Michael