Lie Algebra in Scala