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

Commit

Permalink
Fixing doctest failures in the thematic tutorials.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Scrimshaw committed Mar 5, 2016
1 parent 7ed4c2a commit 3c32075
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions src/doc/en/thematic_tutorials/lie/weyl_groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,39 +77,44 @@ for the simple reflections, that is, the case where `\alpha` is a simple
root. The reflections are just the conjugates of the simple reflections.

The reflections are the keys in a finite family, which is a wrapper
around a python dictionary. The values are the positive roots, so
around a python dictionary. The keys are the positive roots, so
given a reflection, you can look up the corresponding root. If you
want a list of all reflections, use the method ``keys`` for the
family of reflections::

sage: W = WeylGroup("B3",prefix="s")
sage: [s1,s2,s3] = W.simple_reflections()
sage: ref = W.reflections(); ref
Finite family {s1*s2*s1: (1, 0, -1), s2: (0, 1, -1), s3*s2*s3: (0, 1, 1),
s3*s1*s2*s3*s1: (1, 0, 1), s1: (1, -1, 0), s2*s3*s1*s2*s3*s1*s2: (1, 1, 0),
s1*s2*s3*s2*s1: (1, 0, 0), s2*s3*s2: (0, 1, 0), s3: (0, 0, 1)}
sage: ref[s3*s2*s3]
(0, 1, 1)
sage: ref.keys()
[s1*s2*s1, s2, s3*s2*s3, s2*s3*s1*s2*s3*s1*s2, s1, s3*s1*s2*s3*s1, s1*s2*s3*s2*s1, s2*s3*s2, s3]

If instead you want a dictionary whose keys are the roots and whose
values are the reflections, you may use the inverse family::

sage: from pprint import pprint
sage: W = WeylGroup("B3",prefix="s")
sage: [s1,s2,s3] = W.simple_reflections()
sage: altref = W.reflections().inverse_family()
sage: pprint(altref)
Finite family {(1, 0, 0): s1*s2*s3*s2*s1, (0, 1, 1): s3*s2*s3,
(0, 1, -1): s2, (0, 0, 1): s3, (1, -1, 0): s1,
(1, 1, 0): s2*s3*s1*s2*s3*s1*s2, (1, 0, -1): s1*s2*s1,
(1, 0, 1): s3*s1*s2*s3*s1, (0, 1, 0): s2*s3*s2}
sage: [a1,a2,a3] = W.domain().simple_roots()
sage: a1+a2+a3
(1, 0, 0)
sage: altref[a1+a2+a3]
sage: ref[a1+a2+a3]
s1*s2*s3*s2*s1
sage: list(ref)
[s1*s2*s3*s2*s1, s3*s2*s3, s2, s3, s1, s2*s3*s1*s2*s3*s1*s2,
s1*s2*s1, s3*s1*s2*s3*s1, s2*s3*s2]

If instead you want a dictionary whose keys are the reflections
and whose values are the roots, you may use the inverse family::

sage: from pprint import pprint
sage: W = WeylGroup("B3",prefix="s")
sage: [s1,s2,s3] = W.simple_reflections()
sage: altref = W.reflections().inverse_family()
sage: pprint(altref)
Finite family {s1*s2*s1: (1, 0, -1), s2: (0, 1, -1), s3*s2*s3: (0, 1, 1),
s1*s2*s3*s2*s1: (1, 0, 0), s1: (1, -1, 0),
s2*s3*s1*s2*s3*s1*s2: (1, 1, 0), s3*s1*s2*s3*s1: (1, 0, 1),
s2*s3*s2: (0, 1, 0), s3: (0, 0, 1)}
sage: altref[s3*s2*s3]
(0, 1, 1)

.. NOTE::

The behaviour of this function was changed in :trac:`20027`.

The Weyl group is implemented as a GAP matrix group. You therefore can
display its character table. The character table is returned as a
Expand Down

0 comments on commit 3c32075

Please sign in to comment.