Question: Storing Lots of Variables and Evaluating Expressions

I currently have a procedure that runs a fairly complicated formula involving non-commutative variables. The procedure is Vu(a, b, c) where a, b, and c are any integers. I have to run this formula whenever vacub appears in my expression. I'm currently replacing each variable of this type with the procedure Vu(a, b, c). I'm wanted to automate that process if possible. One thought I had was to assign the value of Vu(a, b, c) to the variable vacub for any value of a, b, and c from 1 to 5. Then use the eval command to replace the variables with the proper values. Is there any way to automate this process? Let me give you an example:

v0u0 = u0v0 + 2w0

So u0v0u0 = u0(u0v0+2w0) = u02v0+2u0w0

Please Wait...