#13209: Fix some minor Cayley table documentation problems
---------------------------------------------+------------------------------
       Reporter:  kcrisman                   |         Owner:  joyner           
  
           Type:  defect                     |        Status:  needs_work       
  
       Priority:  trivial                    |     Milestone:  sage-5.6         
  
      Component:  group theory               |    Resolution:                   
  
       Keywords:  cayley doc table beginner  |   Work issues:                   
  
Report Upstream:  N/A                        |     Reviewers:  Karl-Dieter 
Crisman
        Authors:  Kannappan Sampath          |     Merged in:                   
  
   Dependencies:                             |      Stopgaps:                   
  
---------------------------------------------+------------------------------

Comment (by knsam):

 Replying to [comment:4 kcrisman]:
 > > So, it does return a list of elements, not strings.
 > Sure.  But that's not what the keyword `elements` is referring to.  Try
 using that keyword and see what happens if you pass elements and not
 strings.

 Alright, I think there is no real issue with this one. Well, what I mean
 is, since {{{(foo, bar)}}} stands for a tuple, having things like
 {{{(1,2)(3,4)}}} scares Sage. Reasonable. I looked at how its overcome in
 general:
 {{{
 sage: G = SymmetricGroup(5)
 sage: sigma = G("(1,3) (2,5,4)")
 }}}
 which is basically coercion at play.
 So, there are two work arounds:
 1. Pass the elements as strings, because after all the code coerces them
 into an element of the said group. *(done in the documentation)*
 2. Or, suppose you have a group G. List its elements using {{{G.list()}}}.
 Now determine the indices which you'd like to include in the list and use
 a for loop to iterate.

 Here's a test case:
 {{{
 sage: H = CyclicPermutationGroup(4)
 sage: L = H.list()
 sage: elts = []
 sage: for i in {0, 2}:
 ...      elts.append(L[i])
 ...
 sage: elts
 [(), (1,3) (2,4)]
 sage: from sage.matrix.operation_table import OperationTable
 sage: T = OperationTable(H, operator.mul, elements = elts)
 sage: T
 *  a b
  +----
 a| a b
 b| b a

 }}}

 So, does this solve the "thingy" issue? I will submit a patch for the
 other two OperationTable docs. And, should this alternative way of passing
 elements be documented?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13209#comment:8>
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.

Reply via email to