Changeset 6218:13d465b1abc8
- Timestamp:
- 09/06/07 13:10:45 (6 years ago)
- Branch:
- default
- Location:
- sage/groups/perm_gps
- Files:
-
- 2 edited
-
cubegroup.py (modified) (2 diffs)
-
permgroup_element.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/groups/perm_gps/cubegroup.py
r6217 r6218 11 11 Products of moves are read {\it right to left}, so for example, 12 12 R*U means move U first and then R. 13 14 See \code{CubeGroup.parse()} for all possible input notations. 13 15 14 16 The "Singmaster notation": … … 1065 1067 soln = hom.PreImagesRepresentative(gap(str(g))) 1066 1068 # print soln 1067 sol1 = str(soln).replace("x1","B") 1068 sol2 = sol1.replace("x2","D") 1069 sol3 = sol2.replace("x3","F") 1070 sol4 = sol3.replace("x4","L") 1071 sol5 = sol4.replace("x5","R") 1072 sol6 = sol5.replace("x6","U") 1073 return sol6 1074 1069 sol = str(soln) 1070 names = self.gen_names() 1071 for i in range(6): 1072 sol = sol.replace("x%s" % (i+1), names[i]) 1073 return sol 1075 1074 1076 1075 -
sage/groups/perm_gps/permgroup_element.py
r5489 r6218 535 535 from sage.groups.perm_gps.permgroup import PermutationGroup 536 536 from sage.interfaces.all import gap 537 G = g.parent() 538 #print G 539 gap.eval("l:=One(Rationals)") 540 s1 = "gens := GeneratorsOfGroup(%s)"%G._gap_init_() 541 #print s1 542 gap.eval(s1) 543 s2 = "g0:=%s; gensH:=%s"%(gap(g),words) 544 gap.eval(s2) 545 s3 = 'G:=Group(gens); H:=Group(gensH)' 546 #print s3 547 gap.eval(s3) 548 phi = gap.eval("hom:=EpimorphismFromFreeGroup(G)") 549 #print phi 550 l1 = gap.eval("ans:=PreImagesRepresentative(hom,g0)") 537 538 G = gap(words[0].parent()) 539 g = words[0].parent()(g) 540 gensH = gap(words) 541 H = gensH.Group() 542 hom = G.EpimorphismFromFreeGroup() 543 ans = hom.PreImagesRepresentative(gap(g)) 544 545 l1 = str(ans) 551 546 l2 = copy.copy(l1) 552 547 l4 = [] … … 554 549 for i in range(1,len(words)+1): 555 550 l2 = l2.replace("x"+str(i),str(words[i-1])) 551 556 552 if display: 557 553 for i in range(len(l3)): ## parsing the word for display
Note: See TracChangeset
for help on using the changeset viewer.
