If "Ai" is an ideal of "Ri" for each "i" in "I", then is an ideal of "R". If "I" is finite, then the converse is true, i.e., every ideal of "R" is of this form. However, if "I" is infinite and the rings "Ri" are non-zero, then the converse is false: the set of elements with all but finitely many nonzero coordinates forms an ideal which is not a direct product of ideals of the "Ri". The ideal "A" is a prime ideal in "R" if all but one of the "Ai" are equal to "Ri" and the remaining "Ai" is a prime ideal in "Ri". However, the converse is not true when "I" is infinite. For example, the direct sum of the "Ri" form an ideal not contained in any such "A", but the axiom of choice gives that it is contained in some maximal ideal which is a fortiori prime.