implemented n-ary lie group product, tested.