An Advance on Variable Elimination with Applications to Tensor-Based Computation