When computing modulo a polynomial, it is of importance to note in which order the computations are carried out. Taking a clever route can gain a lot of time.
For example, let
a
R[X]/(X2 + 1) be the equivalence class
containing the element
and suppose that the question is to find a representative of degree at most 1 for a. Evidently, it is lot of work to first work out the product and then find the remainder after division by X2 + 1. A considerable reduction in computational work is achieved by the following method mod X2 + 1:
So a representative of a is 213X - 213.
Verify yourself how the arithmetical rules were used.