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

Commit

Permalink
src/doc/en/thematic_tutorials/lie/weyl_character_ring.rst: Use key=..…
Browse files Browse the repository at this point in the history
….tuple(....support()) for sorting by lex support
  • Loading branch information
Matthias Koeppe committed Sep 11, 2022
1 parent b80989f commit 57273ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/en/thematic_tutorials/lie/weyl_character_ring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ coefficients) through the usual free module accessors::
[((0, 0, 0), 1), ((1, 0, 0), 1), ((1, 1, 0), 1), ((1, 1, 1), 1)]
sage: pprint(dict(chi))
{(0, 0, 0): 1, (1, 0, 0): 1, (1, 1, 0): 1, (1, 1, 1): 1}
sage: M = sorted(chi.monomials(), key=lambda x: x.support()); M
sage: M = sorted(chi.monomials(), key=lambda x: tuple(x.support())); M
[B3(0,0,0), B3(1,0,0), B3(1,1,0), B3(1,1,1)]
sage: sorted(chi.support())
[(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1)]
Expand Down Expand Up @@ -485,7 +485,7 @@ itself, that is, the integral of `|tr(g)|^{10}`::

sage: tr^5
5*A2(2,2,1) + 6*A2(3,1,1) + 5*A2(3,2,0) + 4*A2(4,1,0) + A2(5,0,0)
sage: sorted((tr^5).monomials(), key=lambda x: x.support())
sage: sorted((tr^5).monomials(), key=lambda x: tuple(x.support()))
[A2(2,2,1), A2(3,1,1), A2(3,2,0), A2(4,1,0), A2(5,0,0)]
sage: sorted((tr^5).coefficients())
[1, 4, 5, 5, 6]
Expand Down

0 comments on commit 57273ea

Please sign in to comment.