Opened 2 years ago

Closed 2 years ago

#27069 closed defect (fixed)

Inconsistent behavior with generator ordering in free Lie algebras

Reported by: gh-ehaka Owned by:
Priority: major Milestone: sage-8.7
Component: algebra Keywords: Lie algebras
Cc: Merged in:
Authors: Eero Hakavuori, Travis Scrimshaw Reviewers: Travis Scrimshaw, Eero Hakavuori
Report Upstream: N/A Work issues:
Branch: a3f59d3 (Commits, GitHub, GitLab) Commit: a3f59d3784c3a68a17f7d1beafe1527a4ae09770
Dependencies: Stopgaps:

Status badges

Description

This is an issue discovered due to #27018. Giving a free Lie algebra a set of generators that are not in lexicographic order causes graded_basis to output elements which are not recognized as basis elements of the Lie algebra due to different ordering behavior.

sage: Lxyz = LieAlgebra(QQ, ['x','y','z']).Lyndon()
sage: Lzxy = LieAlgebra(QQ, ['z','x','y']).Lyndon()
sage: Lxyz.graded_basis(2)
([x, y], [x, z], [y, z])
sage: Lzxy.graded_basis(2)
([z, x], [z, y], [x, y])
sage: x,y,z = Lxyz.gens()
sage: a,b,c = Lzxy.gens()
sage: a,b,c
(z, x, y)
sage: b.bracket(a)
[x, z]
sage: x.bracket(z)
[x, z]
sage: Lzxy._is_basis_element(b.leading_support(),a.leading_support())
True
sage: Lzxy._is_basis_element(a.leading_support(),b.leading_support())
False

Trying to compute brackets with these elements leads to unhelpful tracebacks, e.g.

sage: Lzxy[Lzxy.graded_basis(2)[0],Lzxy.graded_basis(1)[0]]
Traceback (most recent call last)
...
AttributeError: 'sage.algebras.lie_algebras.lie_algebra_element.Lie' object has no attribute '_right'

Change History (5)

comment:1 Changed 2 years ago by git

  • Commit changed from 4e27c06abf6bfc538f3a21394f2ce86dd4fc26b3 to 45b45064ba42c5def60ec4e5f926a06e82306549

Branch pushed to git repo; I updated commit sha1. New commits:

af8cac3Merge branch 'public/lie_elem_indexing-27018' of git://trac.sagemath.org/sage into public/lie_elem_indexing-27018
45b4506Using the word given by elements \NN to generate the free Lie algebra basis elements.

comment:2 Changed 2 years ago by tscrim

  • Authors set to Eero Hakavuori, Travis Scrimshaw
  • Milestone changed from sage-8.6 to sage-8.7
  • Reviewers set to Travis Scrimshaw, Eero Hakavuori
  • Status changed from new to needs_review

Okay, this should fix it, as well as #27018.

comment:3 Changed 2 years ago by git

  • Commit changed from 45b45064ba42c5def60ec4e5f926a06e82306549 to a3f59d3784c3a68a17f7d1beafe1527a4ae09770

Branch pushed to git repo; I updated commit sha1. New commits:

a3f59d3Small tweak to the documentation.

comment:4 Changed 2 years ago by gh-ehaka

  • Status changed from needs_review to positive_review

Everything seems to be working as it should now, thanks for the fix!

comment:5 Changed 2 years ago by vbraun

  • Branch changed from public/lie_elem_indexing-27018 to a3f59d3784c3a68a17f7d1beafe1527a4ae09770
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.