Question About the Group Axioms and Symmetry Let $f$ be a function $f:X^2\to Y$. Let $G_f$ be a subset of the symmetric group on $X$, such that $G$ consists of all of the permutations $\sigma$ satisfying $f(\sigma(a),\sigma(b))=f(a,b)$ for the chosen $f$. $X$ need not be finite, and also $Y$ need not coincide with $X$, or even have equal cardinality to it; it is just some arbitrary co-domain.
Question:

Is every group just isomorphic to some $G_f$, if we make the correct choice of $f$? Alternatively, for any group does there exist some function $f$ such that $G_f$ if isomorphic to the group in question?

Purpose:
I'm looking for ways to motivate the group axioms by showing that they describe something where the level of abstraction is no more and no less than is required to describe this particular object.
What I already know/have figured out/have tried:

*

*Any $G_f$ satisfies the group axioms. Closure) if $f(\sigma_1(a),\sigma_1(b))=f(a,b)$ and $f(\sigma_2(a),\sigma_2(b))=f(a,b)$, then the composition $\sigma_3=\sigma_1\circ\sigma_2$ or $\sigma_2\circ\sigma_1$ will also satisfy $f(\sigma_3(a),\sigma_3(b))=f(a,b)$ once decomposed, implying closure. Identity) the identity permutation $e$ trivially satisfies $f(e(a),e(b))=f(a,b)$. Inverses) if $f(\sigma(a),\sigma(b))=f(a,b)$, then $\sigma^{-1}$ will also satisfy $f(\sigma^{-1}(a),\sigma^{-1}(b))=f(a,b)$, because $f(a,b)=f(e(a),e(b))=f(\sigma(\sigma^{-1}(a)),\sigma(\sigma^{-1}(b)))=f(\sigma^{-1}(a),\sigma^{-1}(b))$. Associativity) permutations are functions, and function composition is always associative.

*As per this question I've asked, I know that every group is the automorphism group of some magma. In the language of my question here, I think that's basically saying that if $f:X^2\to X$ then any group is isomorphic to the set of all $\sigma$ under composition such that $\sigma(f(x,y))=f(\sigma(x),\sigma(y))$, but this doesn't seem exactly the same as what I have above. I think that because my condition here is even less restrictive the automorphism group of a magma, I strongly suspect that the answer to my question is yes, but I absolutely lack the algebraic prowess to justify this hunch beyond intuition. I don't know enough about lattices to follow what's going on in the answer to this question.

Note:
If the answer to this question is affirmative, then I am planning to also - at some point in the future - use this to ask a question about how this approach to compares to the magma-automorphism approach and binary-relations approach of defining the group axioms, and which way and how these concepts actually relate to the applications of group theory, such as symmetry in physics and geometry, the abstract concept of in-variance in math, how to interpret this in the case of, say, a rubrics cube, conjugation and cosets, the isomorphism theorems, & more.
 A: This follows from the beginning of Hagen von Eitzen's answer that I linked to previously. Every group occurs in this way, and we can take $X = Y = G$ and $f : G \times G \to G$ to be the function
$$f(x_1, x_2) = x_1^{-1} x_2.$$
Then we can check that if $g \in G$ and $L_g : X \to X$ denotes the left-multiplication-by-$g$ map $x \mapsto gx$ that we have
$$f(L_g x_1, L_g x_2) = (gx_1)^{-1} gx_2 = x_1^{-1} g^{-1} g x_2 = x_1^{-1} x_2$$
so $L_g$ is an automorphism of $f$ (which defines a kind of graph structure on $G$ where the edges are directed and colored by the elements of $G$ itself; $f$ above is describing the "difference" between two elements of $G$).
Conversely, suppose $\varphi : X \to X$ is an automorphism of $f$ and set $g = \varphi(e)$. Then
$$f(\varphi(e), \varphi(x)) = f(g, \varphi(x)) = g^{-1} \varphi(x) = f(e, x) = x$$
gives that $\varphi(x) = gx$ for all $x \in X$. So $\varphi = L_g$. Hence the automorphisms of $f$ are exactly the left multiplications $L_g$.
The function $f$ above can be thought of as describing the structure of a right $G$-torsor on $G$, and it's classical that the automorphism group of a $G$-torsor is $G$ again; this is a more precise version of Cayley's theorem.
