Closure of Pointwise Operation on Algebraic Structure

Theorem
Let $S$ be a set such that $S \ne \varnothing$.

Let $\struct {T, \circ}$ be an algebraic structure.

Let $T^S$ be the set of all mappings from $S$ to $T$.

Let $f, g \in T^S$, that is, let $f: S \to T$ and $g: S \to T$ be mappings.

Let $\oplus: T^S \to T^S$ be the pointwise operation on $T^S$ induced by $\circ$.

Then $\oplus$ is closed on $T^S$ $\struct {T, \circ}$ is closed.

Necessary Condition
Let $\struct {T, \circ}$ be closed.

Let $x \in S$ be arbitrary.

Then:

So $\oplus$ is closed on $T^S$.

Sufficient Condition
Let $\oplus$ is closed on $T^S$.

$\struct {T, \circ}$ is not closed.

Then:
 * $(1): \quad \exists s, t \in T: s \circ t \notin T$

By definition, $T^S$ is the set of all mappings from $S$ \to $T$.

As $S \ne \O$ it follows that $\exists x \in S$.

Thus, let $x \in S$ be arbitrary.

Let $f, g \in T^S$ such that:
 * $(2): \quad \map f x = s, \map g x = t$

Then:

That is, $\oplus$ is not closed on $T^S$.

From that contradiction it follows that $\struct {T, \circ}$ is closed.