#7555: Fix Cayley tables, add operation tables
---------------------------------+------------------------------------------
Reporter: rbeezer | Owner: AlexGhitza
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.0
Component: algebra | Keywords: cayley table, operation table
Author: Robert Beezer | Upstream: N/A
Reviewer: Nicolas M. Thiéry | Merged:
Work_issues: |
---------------------------------+------------------------------------------
Changes (by newvalueoldvalue):
* reviewer: => Nicolas M. Thiéry
* milestone: => sage-5.0
* author: => Robert Beezer
Old description:
> Cayley tables for permutation groups are broken, see #7340.
>
> For other finite algebraic structures, it would be useful for educational
> purposes to have tables for whatever operation(s) may be present.
>
> Text file included here provides a class that creates a Cayley table
> object, it can be generalized to provide a similar table for any object
> with an addition or multiplication - general groups and rings would be
> the first places to use it.
New description:
Cayley tables for permutation groups are broken, see #7340.
For other finite algebraic structures, it would be useful for educational
purposes to have tables for whatever operation(s) may be present.
Text file included here provides a class that creates a Cayley table
object, it can be generalized to provide a similar table for any object
with an addition or multiplication - general groups and rings would be the
first places to use it.
Depends on #8579.
--
Comment:
Hi Robert,
The updated patch contains the following changes:
- OperationTable is moved in sage.matrix.operation_table
- multiplication_table and addition_table are moved in the new
categories Magmas and AdditiveMagmas respectively (sorry, this
introduces a dependency on #8579; but there will be many changes
soon in Semigroups, and this will avoid later conflicts when moving
things around)
- __getitem__ does not do coercion anymore
- The input can be a finite iterable, as in:
{{{
sage: T = OperationTable([False, True], operator.or_, names =
'elements')
sage: T
. False True
+------------
False| False True
True| True True
}}}
- self._elts (and thus the column/row keys) is a tuple (reduces the
risk of accidently changing its content)
- a couple minor doc improvements: using directly :: at the end of a
sentence describing the next example, putting default values within
() ...
- I allowed myself to change the '+' and '*' to operator.add and
operator.mul, for a more uniform logic (anyway, the basic user
won't use OperationTable directly, and for the others, it is nice
to show them directly the general approach).
Given that all the code was moved around, a reviewer patch would not
have brought any useful information. So I just folded everything
together.
All tests pass on my ubuntu laptop.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7555#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.