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

Commit

Permalink
doctest for _dual_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbump committed Oct 25, 2018
1 parent 6736b8c commit d18b3d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sage/combinat/root_system/weyl_characters.py
Expand Up @@ -133,7 +133,6 @@ def __init__(self, ct, base_ring=ZZ, prefix=None, style="lattice", k=None):
self._k = k
if ct.is_atomic():
self._opposition = ct.opposition_automorphism()
if k is not None:
self._highest = self._space.highest_root()
self._hip = self._highest.inner_product(self._highest)
if style == "coroots":
Expand Down Expand Up @@ -556,6 +555,7 @@ def affine_reflect(self, wt, k=0):
`\theta`. Optionally shifts by a multiple `k`of `\theta`.
EXAMPLES::
sage: B22=FusionRing("B2",2)
sage: fw = B22.fundamental_weights(); fw
Finite family {1: (1, 0), 2: (1/2, 1/2)}
Expand Down Expand Up @@ -772,6 +772,7 @@ def level(self, wt):
the weight on the coroot associated with the highest root.
EXAMPLES::
sage: R = FusionRing("F4",2); [R.level(x) for x in R.fundamental_weights()]
[2, 3, 2, 1]
sage: [CartanType("F4~").dual().a()[x] for x in [1..4]]
Expand All @@ -783,6 +784,12 @@ def _dual_helper(self, wt):
"""
If `w_0` is the long Weyl group element and `wt` is an
element of the weight lattice, this returns `-w_0(wt)`.
EXAMPLES::
sage: A3=WeylCharacterRing("A3")
sage: [A3._dual_helper(x) for x in A3.fundamental_weights()]
[(0, 0, 0, -1), (0, 0, -1, -1), (0, -1, -1, -1)]
"""
if self.cartan_type()[0] == 'A': # handled separately for GL(n) compatibility
return self.space()([-x for x in reversed(wt.to_vector().list())])
Expand Down

0 comments on commit d18b3d8

Please sign in to comment.