First time here? Check out the FAQ!
answered 2021-03-31 09:09:47 +0100
Use cartesian_product.
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)