From d18b3d8ad4a449c221d7ec1648216297ae17c2cf Mon Sep 17 00:00:00 2001 From: Daniel Bump Date: Thu, 25 Oct 2018 13:50:24 -0700 Subject: [PATCH] doctest for _dual_helper --- src/sage/combinat/root_system/weyl_characters.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index ff9e3fd0147..f414ed55c4d 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -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": @@ -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)} @@ -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]] @@ -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())])