Opened 2 years ago

Closed 2 years ago

#30493 closed defect (fixed)

bug in border case in highest weight vectors of tensor product of crystals

Reported by: Martin Rubey Owned by:
Priority: major Milestone: sage-9.2
Component: combinatorics Keywords:
Cc: Travis Scrimshaw Merged in:
Authors: Travis Scrimshaw Reviewers: Martin Rubey
Report Upstream: N/A Work issues:
Branch: 86b067d (Commits, GitHub, GitLab) Commit: 86b067d3cbe81f15e7e4df5bb47a46928b20fc4b
Dependencies: Stopgaps:

Status badges

Description

sage: CW = CartanType("G", 2)
sage: C = crystals.Letters(CW)
sage: C.highest_weight_vectors()
(1,)
sage: T = crystals.TensorProduct(C)
sage: T.highest_weight_vectors()
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-33-feba30ccc2e6> in <module>()
----> 1 T.highest_weight_vectors()

/home/martin/sage-develop/local/lib/python3.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedMethodCallerNoArgs.__call__ (build/cythonized/sage/misc/cachefunc.c:12717)()
   2308         if self.cache is None:
   2309             f = self.f
-> 2310             self.cache = f(self._instance)
   2311         return self.cache
   2312 

/home/martin/sage-develop/local/lib/python3.7/site-packages/sage/categories/highest_weight_crystals.py in highest_weight_vectors(self)
    713                      [[[-2]], [[1, 1], [2, 2]]])
    714                 """
--> 715                 return tuple(self.highest_weight_vectors_iterator())
    716 
    717             def highest_weight_vectors_iterator(self):

/home/martin/sage-develop/local/lib/python3.7/site-packages/sage/categories/highest_weight_crystals.py in highest_weight_vectors_iterator(self)
    786                     T_phi = [None]*(m-1) + [{i: b.phi(i) for i in I}]
    787                     while T_pos < m:
--> 788                         if T_cur[T_pos] == T_len[T_pos]:
    789                             T_cur[T_pos] = 0
    790                             T_pos += 1

IndexError: list index out of range
sage: T = crystals.TensorProduct(C, C)
sage: T.highest_weight_vectors()
([1, 1], [2, 1], [0, 1], [-1, 1])

Change History (3)

comment:1 Changed 2 years ago by Travis Scrimshaw

Authors: Travis Scrimshaw
Branch: public/crystals/tensor_product_hw_elts-30493
Commit: 86b067d3cbe81f15e7e4df5bb47a46928b20fc4b
Status: newneeds_review

Simple fix to handle the corner case.


New commits:

86b067dFixing corner case of highest weight vectors iterator.

comment:2 Changed 2 years ago by Martin Rubey

Reviewers: Martin Rubey
Status: needs_reviewpositive_review

Thank you!

comment:3 Changed 2 years ago by Volker Braun

Branch: public/crystals/tensor_product_hw_elts-3049386b067d3cbe81f15e7e4df5bb47a46928b20fc4b
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.