elementary ring proof with composition of functions and addition of functions as operations

Taking on the suggestion of Sammy Black, consider $g = h = \mathbf{1} = \text{the identity function}$, and $f$ any function.

Suppose $f \circ (\mathbf{1} + \mathbf{1}) = f \circ \mathbf{1} + f \circ \mathbf{1} = f + f = 2 f$.

So for all $x \in \Bbb{R}$ you should have $f( 2 x) = 2 f(x)$. Now think of a function $f$ which does not satisfy this.

(Variation. Take $g(x) = a$ and $h(x) = b$ for two arbitrary constants $a, b \in \mathbf{R}$. If $f \circ (g + h) = f \circ g + f \circ h$ holds, then $f(a + b) = f(a) + f(b)$ for all $a, b \in \Bbb{R}$. Now take a non-additive $f$.)

So the distributive property $f \circ (g + h) = f \circ g + f \circ h$ does not generally hold.

On the other hand, the other distributive property $(g + h) \circ f = g \circ f + h \circ f$ always holds. In fact for all $x$ one has $$ \begin{align} ((g + h) \circ f) (x) &= (g + h) ( f(x)) \\&= g(f(x)) + h(f(x)) \\&= (g \circ f) (x) + (h \circ f) (x) \\&= (g \circ f + h \circ f) (x). \end{align} $$


If the distributive property $f \circ (g + h) = f \circ g + f \circ h$ held, notice that we would have $f(g(x) + h(x)) = f(g(x)) + f(h(x))$, that is, $f$ would preserve addition. In other words, $f$ would be a group homomorphism from $\mathbb{R}$ to $\mathbb{R}$ (the reals with addition). But not every $f \in \mathcal{F}$ is a group homomorphism!

Of course if we restricted our set to include only homomorphisms from $\mathbb{R}$ to $\mathbb{R}$ (called endomorphisms), then the ring axioms would be satisfied. This ring is called the endomorphism ring, and can be formed from any abelian group.