Say $F$ is a free algebra over $n$ generators of degree $1$, and i want to compute in this algebra but i only need to get my expressions up to degree $k$. For example, if $k=2$, $(ab +a)*b$ should be $ab$.
For now, i have been doing the computation and truncating everything above degree $k$, but the time complexity is too high when i launch a big computation.
I am actually asking how to compute in the tensor Algebra $T(V)$ modulo $T_{\geq k}(V)$. For free Lie algebras, this can be done using nilpotent Lie algebras, (for example L = LieAlgebra(QQ, 3, step=3) implements a 3-nilpotent Free Lie algebra). How to do this with Free algebras ?