Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Free nilpotent Lie algebras #26076

Closed
ehaka mannequin opened this issue Aug 17, 2018 · 22 comments
Closed

Free nilpotent Lie algebras #26076

ehaka mannequin opened this issue Aug 17, 2018 · 22 comments

Comments

@ehaka
Copy link
Mannequin

ehaka mannequin commented Aug 17, 2018

Implement the construction of free nilpotent Lie algebras, i.e. Lie algebras where the only additional relations among the brackets are that iterated brackets longer than the nilpotency step must vanish.

Depends on #26074

CC: @tscrim

Component: algebra

Keywords: Lie algebras, nilpotent

Author: Eero Hakavuori

Branch/Commit: 664fbec

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/26076

@ehaka ehaka mannequin added this to the sage-8.4 milestone Aug 17, 2018
@ehaka ehaka mannequin added c: algebra labels Aug 17, 2018
@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 17, 2018

comment:1

Some implementation already exists in an external private codebase that I need to clean up and import into Sage.

@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 17, 2018

Commit: cb8a103

@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 17, 2018

Author: Eero Hakavuori

@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 17, 2018

comment:2

The adapted version of the free nilpotent Lie algebra construction is in the commits. I removed the parameter free from the method sage.algebras.lie_algebras.nilpotent_lie_algebra.NilpotentLieAlgebra of #26074, as the parameter seemed to be redundant.


New commits:

19c27ebNew subcategories of Lie algebras (nilpotent, graded, stratified) and a base class for nilpotent Lie algebras
f58cdddImplementation of the construction of free nilpotent Lie algebras
cb8a103Changed doctests to use free nilpotent Lie algebras as more natural examples of graded or stratified Lie algebras

@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 17, 2018

@ehaka ehaka mannequin added the s: needs review label Aug 17, 2018
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 21, 2018

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

158bfdbFix to product_space() for when L is not a true subalgebra of A.
293901eFixed a test for _test_generated_by_degree_one().
8658e9dFixing print order for fin-dim nilpotent Lie algebras with basis.
726639fSome last little cleanup.
8b3c585A better failure example for _test_generated_by_degree_one and some more doc.
a1e1aceRefactored nilpotent Lie algebra constructor into Lie algebra constructor
14fcd30Deduction rule for the fact that finite dimensional stratified Lie algebras are nilpotent
f1a0b1eDocstring fix for indexing of grading of a stratification
4d4bdf6Merge remote-tracking branch 'trac/public/lie_algebras/base_class_nilponent-26074' into free_nilpotent_lie_algebras
31fa53aAdded free nilpotent Lie algebras to LieAlgebra constructor

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 21, 2018

Changed commit from cb8a103 to 31fa53a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

Changed commit from 31fa53a to b7c8a2a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

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

a3dccfdMerge branch 'public/lie_algebras/base_class_nilponent-26074' of git://trac.sagemath.org/sage into public/lie_algebras/base_class_nilponent-26074
0fa41adFixing doctests, making category an arugment, and other small tweaks.
53a10beAdding an extra doctest and fix for the category option.
d7077cdMerge remote-tracking branch 'trac/public/lie_algebras/base_class_nilponent-26074' into u/gh-ehaka/free_nilpotent_lie_algebras-26076
b7c8a2aFixed category parameter of initialization of free nilpotent Lie algebra

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

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

a5ec3adMoving the axioms around for better printing.
09b54f5Merge remote-tracking branch 'trac/public/lie_algebras/base_class_nilponent-26074' into u/gh-ehaka/free_nilpotent_lie_algebras-26076

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

Changed commit from b7c8a2a to 09b54f5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

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

b70bebddoctest fix for changed category printing

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 22, 2018

Changed commit from 09b54f5 to b70bebd

@tscrim
Copy link
Collaborator

tscrim commented Aug 23, 2018

Changed commit from b70bebd to a60ef68

@tscrim
Copy link
Collaborator

tscrim commented Aug 23, 2018

@tscrim
Copy link
Collaborator

tscrim commented Aug 23, 2018

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Aug 23, 2018

comment:7

I have made some documentation tweaks and a little better normalization and testing of the input. I have also obtained a speedup of the creation of the free nilpotent lie algebra (although it costs a big more in terms of memory usage by having to hold 2 copies of all of the Lyndon word tuples in memory):

%sage: %time L = LieAlgebra(QQ, 3, step=3)
CPU times: user 48 ms, sys: 4 ms, total: 52 ms
Wall time: 50.3 ms
sage: %time L = LieAlgebra(QQ, 5, step=3)
CPU times: user 16 ms, sys: 0 ns, total: 16 ms
Wall time: 12.7 ms
sage: %time L = LieAlgebra(QQ, 5, step=4)
CPU times: user 92 ms, sys: 0 ns, total: 92 ms
Wall time: 88.3 ms
sage: %time L = LieAlgebra(QQ, 5, step=5)
CPU times: user 1.45 s, sys: 28 ms, total: 1.48 s
Wall time: 1.47 s
sage: %time L = LieAlgebra(QQ, 6, step=3)
CPU times: user 16 ms, sys: 8 ms, total: 24 ms
Wall time: 21 ms
sage: %time L = LieAlgebra(QQ, 6, step=4)
CPU times: user 368 ms, sys: 36 ms, total: 404 ms
Wall time: 356 ms
sage: %time L = LieAlgebra(QQ, 6, step=5)
CPU times: user 8.83 s, sys: 148 ms, total: 8.98 s
Wall time: 8.97 s

vs prev

sage: %time L = LieAlgebra(QQ, 3, step=3)
CPU times: user 44 ms, sys: 8 ms, total: 52 ms
Wall time: 49.3 ms
sage: %time L = LieAlgebra(QQ, 5, step=3)
CPU times: user 12 ms, sys: 4 ms, total: 16 ms
Wall time: 15.5 ms
sage: %time L = LieAlgebra(QQ, 5, step=4)
CPU times: user 144 ms, sys: 12 ms, total: 156 ms
Wall time: 142 ms
sage: %time L = LieAlgebra(QQ, 5, step=5)
CPU times: user 2.29 s, sys: 24 ms, total: 2.32 s
Wall time: 2.31 s
sage: %time L = LieAlgebra(QQ, 6, step=3)
CPU times: user 24 ms, sys: 0 ns, total: 24 ms
Wall time: 25.2 ms
sage: %time L = LieAlgebra(QQ, 6, step=4)
CPU times: user 536 ms, sys: 28 ms, total: 564 ms
Wall time: 533 ms
sage: %time L = LieAlgebra(QQ, 6, step=5)
CPU times: user 13.7 s, sys: 204 ms, total: 13.9 s
Wall time: 13.9 s

If my changes are good, then positive review.


New commits:

8f7aac5Added missing files to documentation, removed non-existent one that was causing docbuild to fail
120c02aSome trivial fixes.
7699db4Merge branch 'u/gh-ehaka/free_nilpotent_lie_algebras-26076' of git://trac.sagemath.org/sage into public/lie_algebras/free_nilpotent-26076
d1fe093Some reviewer changes and tweaks.
a60ef68Speedup constructor for free Nilpotent Lie algebras.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 23, 2018

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

664fbecChanging r=10 as cutoff to requiring a linear ordering.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 23, 2018

Changed commit from a60ef68 to 664fbec

@tscrim
Copy link
Collaborator

tscrim commented Aug 23, 2018

comment:10

I also changed the r = 10 case to not be accepted for the index naming because you are using 1-based indices.

@ehaka
Copy link
Mannequin Author

ehaka mannequin commented Aug 23, 2018

comment:11

Replying to @tscrim:

I have made some documentation tweaks and a little better normalization and testing of the input.

All good changes.

I have also obtained a speedup of the creation of the free nilpotent lie algebra (although it costs a big more in terms of memory usage by having to hold 2 copies of all of the Lyndon word tuples in memory)

A ~30% speedup in the expensive cases, very impressive!

Replying to @tscrim:

I also changed the r = 10 case to not be accepted for the index naming because you are using 1-based indices.

I left the cutoff at 11 because I figured technically a zero does not cause ambiguity since it must always be attached to a 10. For aesthetic and convenience the cutoff at 10 is much better though.

The changes all look very good to me, thanks for the improvements!

@ehaka ehaka mannequin added s: positive review and removed s: needs review labels Aug 23, 2018
@vbraun
Copy link
Member

vbraun commented Aug 26, 2018

Changed branch from public/lie_algebras/free_nilpotent-26076 to 664fbec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants