Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpc5 committed Sep 19, 2018
2 parents 3b540a1 + 1a3a69a commit a5d0e7f
Show file tree
Hide file tree
Showing 33 changed files with 578 additions and 457 deletions.
158 changes: 79 additions & 79 deletions src/doc/en/thematic_tutorials/group_theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,17 +414,17 @@ The command ::
sage: H = DihedralGroup(6)
sage: H.list()
[(),
(1,6)(2,5)(3,4),
(1,2,3,4,5,6),
(1,5)(2,4),
(2,6)(3,5),
(1,5,3)(2,6,4),
(1,3,5)(2,4,6),
(1,4)(2,3)(5,6),
(1,6,5,4,3,2),
(1,4)(2,5)(3,6),
(1,2)(3,6)(4,5),
(1,5,3)(2,6,4),
(1,3)(4,6)]
(1,2,3,4,5,6),
(2,6)(3,5),
(1,5)(2,4),
(1,3)(4,6),
(1,6)(2,5)(3,4),
(1,4)(2,3)(5,6),
(1,2)(3,6)(4,5)]

will return all of the elements of `H` in a fixed order as a Python
list. Indexing (``[ ]``) can be used to extract the individual
Expand All @@ -434,7 +434,7 @@ list begins at zero. ::
sage: H = DihedralGroup(6)
sage: elements = H.list()
sage: elements[2]
(1,2,3,4,5,6)
(1,3,5)(2,4,6)


Cayley table
Expand All @@ -447,17 +447,17 @@ The command ::
* a b c d e f g h i j k l
+------------------------
a| a b c d e f g h i j k l
b| b a e h c j k d l f g i
c| c d f g b i l a k e h j
d| d c b a f e h g j i l k
e| e h j k a l i b g c d f
f| f g i l d k j c h b a e
g| g f d c i b a l e k j h
h| h e a b j c d k f l i g
i| i l k j g h e f a d c b
j| j k l i h g f e d a b c
k| k j h e l a b i c g f d
l| l i g f k d c j b h e a
b| b c a e f d i g h l j k
c| c a b f d e h i g k l j
d| d e f b c a l j k g h i
e| e f d c a b k l j i g h
f| f d e a b c j k l h i g
g| g h i j k l a b c d e f
h| h i g k l j c a b f d e
i| i g h l j k b c a e f d
j| j k l h i g f d e a b c
k| k l j i g h e f d c a b
l| l j k g h i d e f b c a


will construct the Cayley table (or "multiplication table") of `H`.
Expand All @@ -471,7 +471,7 @@ element named ``e``::
sage: T = H.cayley_table()
sage: headings = T.row_keys()
sage: headings[4]
(2,6)(3,5)
(1,4)(2,5)(3,6)

Center
------
Expand Down Expand Up @@ -522,7 +522,7 @@ In more mathematical notation, we might write
sage: sigma = G("(1,2,3) (4,5)")
sage: H = G.subgroup([sigma])
sage: H.list()
[(), (1,2,3)(4,5), (1,3,2), (4,5), (1,2,3), (1,3,2)(4,5)]
[(), (1,2,3), (1,3,2), (4,5), (1,2,3)(4,5), (1,3,2)(4,5)]

Experiment by trying different permutations for ``sigma`` and
observing the effect on ``H``.
Expand All @@ -542,26 +542,26 @@ preceded by the order of each element. ::
sage: CN = CyclicPermutationGroup(n)
sage: for g in CN:
....: print("{} {}".format(g.order(), g))
1 ()
20 (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
10 (1,3,5,7,9,11,13,15,17,19)(2,4,6,8,10,12,14,16,18,20)
20 (1,4,7,10,13,16,19,2,5,8,11,14,17,20,3,6,9,12,15,18)
5 (1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)
4 (1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)
10 (1,7,13,19,5,11,17,3,9,15)(2,8,14,20,6,12,18,4,10,16)
20 (1,8,15,2,9,16,3,10,17,4,11,18,5,12,19,6,13,20,7,14)
5 (1,9,17,5,13)(2,10,18,6,14)(3,11,19,7,15)(4,12,20,8,16)
20 (1,10,19,8,17,6,15,4,13,2,11,20,9,18,7,16,5,14,3,12)
2 (1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)
20 (1,12,3,14,5,16,7,18,9,20,11,2,13,4,15,6,17,8,19,10)
5 (1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12)
20 (1,14,7,20,13,6,19,12,5,18,11,4,17,10,3,16,9,2,15,8)
10 (1,15,9,3,17,11,5,19,13,7)(2,16,10,4,18,12,6,20,14,8)
4 (1,16,11,6)(2,17,12,7)(3,18,13,8)(4,19,14,9)(5,20,15,10)
5 (1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)
20 (1,18,15,12,9,6,3,20,17,14,11,8,5,2,19,16,13,10,7,4)
10 (1,19,17,15,13,11,9,7,5,3)(2,20,18,16,14,12,10,8,6,4)
20 (1,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2)
1 ()
5 (1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)
5 (1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12)
5 (1,9,17,5,13)(2,10,18,6,14)(3,11,19,7,15)(4,12,20,8,16)
5 (1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)
10 (1,19,17,15,13,11,9,7,5,3)(2,20,18,16,14,12,10,8,6,4)
10 (1,15,9,3,17,11,5,19,13,7)(2,16,10,4,18,12,6,20,14,8)
2 (1,11)(2,12)(3,13)(4,14)(5,15)(6,16)(7,17)(8,18)(9,19)(10,20)
10 (1,7,13,19,5,11,17,3,9,15)(2,8,14,20,6,12,18,4,10,16)
10 (1,3,5,7,9,11,13,15,17,19)(2,4,6,8,10,12,14,16,18,20)
20 (1,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2)
4 (1,16,11,6)(2,17,12,7)(3,18,13,8)(4,19,14,9)(5,20,15,10)
20 (1,12,3,14,5,16,7,18,9,20,11,2,13,4,15,6,17,8,19,10)
20 (1,8,15,2,9,16,3,10,17,4,11,18,5,12,19,6,13,20,7,14)
20 (1,4,7,10,13,16,19,2,5,8,11,14,17,20,3,6,9,12,15,18)
20 (1,18,15,12,9,6,3,20,17,14,11,8,5,2,19,16,13,10,7,4)
20 (1,14,7,20,13,6,19,12,5,18,11,4,17,10,3,16,9,2,15,8)
20 (1,10,19,8,17,6,15,4,13,2,11,20,9,18,7,16,5,14,3,12)
4 (1,6,11,16)(2,7,12,17)(3,8,13,18)(4,9,14,19)(5,10,15,20)
20 (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)

By varying the size of the group (change the value of ``n``) you can
begin to illustrate some of the structure of a cyclic group (for
Expand All @@ -576,10 +576,10 @@ subgroup::
sage: H = C20.subgroup([rho])
sage: H.list()
[(),
(1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8),
(1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12),
(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20),
(1,9,17,5,13)(2,10,18,6,14)(3,11,19,7,15)(4,12,20,8,16),
(1,5,9,13,17)(2,6,10,14,18)(3,7,11,15,19)(4,8,12,16,20)]
(1,13,5,17,9)(2,14,6,18,10)(3,15,7,19,11)(4,16,8,20,12),
(1,17,13,9,5)(2,18,14,10,6)(3,19,15,11,7)(4,20,16,12,8)]

For a cyclic group, the following command will list *all* of the
subgroups. ::
Expand Down Expand Up @@ -738,29 +738,29 @@ entire symmetry group. Use ::
....: "(1,2,6,5)(4,3,7,8)", "(1,2,3,4)(5,6,7,8)"])
sage: cube.list()
[(),
(1,2,3,4)(5,6,7,8),
(1,2,6,5)(3,7,8,4),
(1,5,8,4)(2,6,7,3),
(1,6,8)(2,7,4),
(1,3,8)(2,7,5),
(1,6,3)(4,5,7),
(1,6)(2,5)(3,8)(4,7),
(2,5,4)(3,6,8),
(1,3)(2,4)(5,7)(6,8),
(1,6)(2,5)(3,8)(4,7),
(1,8)(2,7)(3,6)(4,5),
(1,7)(2,3)(4,6)(5,8),
(1,5,6,2)(3,4,8,7),
(1,7)(2,6)(3,5)(4,8),
(1,7)(2,8)(3,4)(5,6),
(1,4,3,2)(5,8,7,6),
(1,4)(2,8)(3,5)(6,7),
(1,2,3,4)(5,6,7,8),
(1,5)(2,8)(3,7)(4,6),
(1,4,8,5)(2,3,7,6),
(1,2)(3,5)(4,6)(7,8),
(1,7)(2,6)(3,5)(4,8),
(2,5,4)(3,6,8),
(1,3,8)(2,7,5),
(1,6,3)(4,5,7),
(1,8,6)(2,4,7),
(1,3,6)(4,7,5),
(1,4)(2,8)(3,5)(6,7),
(1,2,6,5)(3,7,8,4),
(1,5,6,2)(3,4,8,7),
(1,7)(2,3)(4,6)(5,8),
(2,4,5)(3,8,6),
(1,8,3)(2,5,7)]
(1,3,6)(4,7,5),
(1,6,8)(2,7,4),
(1,8,3)(2,5,7),
(1,4,8,5)(2,3,7,6),
(1,2)(3,5)(4,6)(7,8),
(1,5,8,4)(2,6,7,3),
(1,7)(2,8)(3,4)(5,6)]

A cube has four distinct diagonals (joining opposite vertices through
the center of the cube). Each symmetry of the cube will cause the
Expand All @@ -787,29 +787,29 @@ two opposite faces) can be used as generators of the symmetry group::
sage: cubeface = PermutationGroup(["(1,3,2,5)", "(1,4,2,6)", "(3,4,5,6)"])
sage: cubeface.list()
[(),
(3,4,5,6),
(1,4,2,6),
(1,3,2,5),
(1,3,4)(2,5,6),
(1,3,6)(2,5,4),
(1,2)(3,5),
(1,4,5)(2,6,3),
(1,5,6)(2,3,4),
(3,5)(4,6),
(1,6,5)(2,4,3),
(1,6,3)(2,4,5),
(1,5,6)(2,3,4),
(1,5,4)(2,3,6),
(1,2)(4,6),
(1,5,2,3),
(1,2)(3,5),
(1,4,5)(2,6,3),
(1,4,3)(2,6,5),
(1,3,4)(2,5,6),
(1,3,6)(2,5,4),
(1,4,2,6),
(1,6)(2,4)(3,5),
(1,4)(2,6)(3,5),
(1,3,2,5),
(1,5,2,3),
(1,2)(3,4)(5,6),
(1,3)(2,5)(4,6),
(3,6,5,4),
(1,5)(2,3)(4,6),
(1,6,2,4),
(1,2)(3,6)(4,5),
(1,6,3)(2,4,5),
(1,6,5)(2,4,3),
(1,5,4)(2,3,6),
(1,4,3)(2,6,5)]
(1,4)(2,6)(3,5),
(1,5)(2,3)(4,6),
(1,3)(2,5)(4,6),
(3,4,5,6),
(1,2)(3,6)(4,5)]

Again, this subgroup of `S_6` is "same as" the full symmetric group, `S_4`::

Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/group_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ def GroupAlgebra(G, R=IntegerRing()):
sage: A = GroupAlgebra(G, R); A
Algebra of Dihedral group of order 6 as a permutation group over Rational Field
sage: a = A.an_element(); a
() + (1,2) + 3*(1,2,3) + 2*(1,3)
() + (1,2) + 3*(1,2,3) + 2*(1,3,2)
This space is endowed with an algebra structure, obtained by extending
by bilinearity the multiplication of `G` to a multiplication on `RG`::
sage: A in Algebras
True
sage: a * a
6*() + 9*(2,3) + 8*(1,2) + 8*(1,2,3) + 11*(1,3,2) + 7*(1,3)
14*() + 5*(2,3) + 2*(1,2) + 10*(1,2,3) + 13*(1,3,2) + 5*(1,3)
:func:`GroupAlgebra` is just a short hand for a more general
construction that covers, e.g., monoid algebras, additive group
Expand Down
3 changes: 2 additions & 1 deletion src/sage/algebras/lie_algebras/lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,8 @@ def lie_algebra_generators(self):
sage: S = GroupAlgebra(G, QQ)
sage: L = LieAlgebra(associative=S)
sage: L.lie_algebra_generators()
Finite family {(): (), (1,2): (1,2), (1,2,3): (1,2,3), (1,3,2): (1,3,2), (2,3): (2,3), (1,3): (1,3)}
Finite family {(): (), (1,3): (1,3), (1,2,3): (1,2,3),
(2,3): (2,3), (1,3,2): (1,3,2), (1,2): (1,2)}
"""
if self._gens is not None:
return self._gens
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/lie_algebras/lie_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ cdef class LieAlgebraElementWrapper(ElementWrapper):
sage: x = L.gen(2); x
(1,2,3)
sage: y = L.gen(1); y
(1,2)
(1,3)
sage: u = x*3; u
3*(1,2,3)
sage: parent(u) == L
Expand All @@ -366,13 +366,13 @@ cdef class LieAlgebraElementWrapper(ElementWrapper):
sage: parent(u) == L
True
sage: elt = x*y - y*x; elt
b4 - b5
-b3 + b5
sage: xp, yp = x.lift_associative(), y.lift_associative()
sage: eltp = xp*yp - yp*xp; eltp
(2,3) - (1,3)
-(2,3) + (1,2)
sage: G = list(S.basis())
sage: G[4] - G[5]
(2,3) - (1,3)
-(1,2) + (1,3,2)
TESTS::
Expand Down
26 changes: 13 additions & 13 deletions src/sage/categories/algebra_functor.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
Algebra of Dihedral group of order 6 as a permutation group
over Rational Field
sage: a = A.an_element(); a
() + (1,2) + 3*(1,2,3) + 2*(1,3)
() + (1,2) + 3*(1,2,3) + 2*(1,3,2)
This space is endowed with an algebra structure, obtained by extending
by bilinearity the multiplication of `G` to a multiplication on `RG`::
sage: A in Algebras
True
sage: a * a
6*() + 9*(2,3) + 8*(1,2) + 8*(1,2,3) + 11*(1,3,2) + 7*(1,3)
14*() + 5*(2,3) + 2*(1,2) + 10*(1,2,3) + 13*(1,3,2) + 5*(1,3)
In particular, the product of two basis elements is induced by the
product of the corresponding elements of the group, and the unit of
Expand Down Expand Up @@ -230,12 +230,12 @@
sage: a = A.an_element(); a
() + 2*(3,4) + 3*(1,2) + (1,2)(3,4)
sage: b = B.an_element(); b
() + (2,3,4) + 2*(1,2) + 3*(1,2,3,4)
() + (2,3,4) + 3*(1,2,4) + 2*(1,4)
sage: B(a)
() + 2*(3,4) + 3*(1,2) + (1,2)(3,4)
sage: a * b # a is automatically converted to an element of B
7*() + 4*(3,4) + 2*(2,3) + (2,3,4) + 5*(1,2) + 5*(1,2)(3,4) + 6*(1,2,3)
+ 3*(1,2,3,4) + (1,3,2) + 3*(1,3,4,2) + 3*(1,3) + 9*(1,3,4)
() + 2*(3,4) + 2*(2,3) + (2,3,4) + 3*(1,2) + (1,2)(3,4) + 8*(1,2,4,3)
+ 9*(1,2,4) + (1,3,2) + 3*(1,3,4,2) + 7*(1,4,3) + 11*(1,4)
sage: parent(a * b)
Symmetric group algebra of order 4 over Rational Field
Expand All @@ -244,7 +244,7 @@
sage: A(b)
Traceback (most recent call last):
...
TypeError: do not know how to make x (= () + (2,3,4) + 2*(1,2) + 3*(1,2,3,4))
TypeError: do not know how to make x (= () + (2,3,4) + 3*(1,2,4) + 2*(1,4))
an element of self
(=Algebra of Dihedral group of order 4 as a permutation group over Integer Ring)
Expand Down Expand Up @@ -339,11 +339,11 @@
sage: kD4 in HopfAlgebras
True
sage: a = kD4.an_element(); a
() + 3*(1,2,3,4) + (1,3) + 2*(1,4)(2,3)
() + (1,3) + 2*(1,3)(2,4) + 3*(1,4,3,2)
sage: a.antipode()
() + (1,3) + 3*(1,4,3,2) + 2*(1,4)(2,3)
() + 3*(1,2,3,4) + (1,3) + 2*(1,3)(2,4)
sage: a.coproduct()
() # () + 3*(1,2,3,4) # (1,2,3,4) + (1,3) # (1,3) + 2*(1,4)(2,3) # (1,4)(2,3)
() # () + (1,3) # (1,3) + 2*(1,3)(2,4) # (1,3)(2,4) + 3*(1,4,3,2) # (1,4,3,2)
Coercions from the base ring::
Expand Down Expand Up @@ -422,10 +422,10 @@
From: Symmetric group algebra of order 3 over Integer Ring
To: Symmetric group algebra of order 3 over Finite Field of size 5
sage: a = 2 * A.an_element(); a
2*() + 2*(2,3) + 4*(1,2) + 6*(1,2,3)
2*() + 2*(2,3) + 6*(1,2,3) + 4*(1,3)
sage: hh(a)
2*() + 2*(2,3) + 4*(1,2) + (1,2,3)
2*() + 2*(2,3) + (1,2,3) + 4*(1,3)
Conversion from a formal sum::
Expand Down Expand Up @@ -626,9 +626,9 @@ def _apply_functor_to_morphism(self, f):
To: Symmetric group algebra of order 3 over Finite Field of size 5
sage: a = 2 * A.an_element(); a
2*() + 2*(2,3) + 4*(1,2) + 6*(1,2,3)
2*() + 2*(2,3) + 6*(1,2,3) + 4*(1,3)
sage: hh(a)
2*() + 2*(2,3) + 4*(1,2) + (1,2,3)
2*() + 2*(2,3) + (1,2,3) + 4*(1,3)
"""
from sage.categories.rings import Rings
domain = self(f.domain())
Expand Down
Loading

0 comments on commit a5d0e7f

Please sign in to comment.