# Two-Step Subgroup Test using Subset Product

## Theorem

Let $G$ be a group.

Let $\varnothing \subset H \subseteq G$ be a non-empty subset of $G$.

Then $H$ is a subgroup of $G$ if and only if:

$H H \subseteq H$
$H^{-1} \subseteq H$

where:

$H H$ is the product of $H$ with itself
$H^{-1}$ is the inverse of $H$.

## Proof

This is a reformulation of the Two-Step Subgroup Test in terms of subset product.

### Necessary Condition

Let $H$ is a subgroup of $G$.

Then $H$ is closed.

It follows from Magma Subset Product with Self:

$H H \subseteq H$

Then:

$g \in H^{-1} \implies \exists h \in H: g = h^{-1} \implies g \in H$

so:

$H^{-1} \subseteq H$

$\Box$

### Sufficient Condition

Let:

$H H \subseteq H$
$H^{-1} \subseteq H$

From the definition of subset product:

$\forall x, y \in H: x y \in H$
$\forall x \in H^{-1}: x^{-1} \in H$

So by the Two-Step Subgroup Test, $H$ is a subgroup of $G$.

$\blacksquare$