Restriction of Associative Operation is Associative

Theorem
Let $\struct {S, \circ}$ be an semigroup.

Let $T \subseteq S$.

Let $T$ be closed under $\circ$.

Then $\struct {T, \circ_T}$ is also a semigroup, where $\circ_T$ is the restriction of $\circ$ to $T$.