# Test for Ideal

## Theorem

Let $J$ be a subset of a ring $\struct {R, +, \circ}$.

Then $J$ is an ideal of $\struct {R, +, \circ}$ if and only if these all hold:

$(1): \quad J \ne \O$
$(2): \quad \forall x, y \in J: x + \paren {-y} \in J$
$(3): \quad \forall j \in J, r \in R: r \circ j \in J, j \circ r \in J$

## Proof

### Necessary Condition

Let $J$ be an ideal of $\struct {R, +, \circ}$.

Then conditions $(1)$ to $(3)$ hold by virtue of the ring axioms and $J$ being an ideal.

$\Box$

### Sufficient Condition

Suppose conditions $(1)$ to $(3)$ hold.

As $r \in J \implies r \in R$, if $(3)$ holds for $J$, then $J$ is closed under $\circ$ and condition $(3)$ of Subring Test holds.

Thus, $J$ is a subring of $R$.

As $(3)$ defines the condition for $J$, being a subring, to be an ideal, the result holds.

So $J$ is an ideal of $\struct {R, +, \circ}$.

$\blacksquare$