Ask Your Question

Revision history [back]

Use cartesian_product.

Example:

sage: R = cartesian_product([Zmod(4), Zmod(3), Zmod(5)])
sage: R((1, 2, 3)) * R((2, 1, 3))
(2, 2, 4)
sage: R((2, 2, 3)) * R((2, 2, 2))
(0, 1, 1)