Computer Algebra: Concepts and Techniques