While working through the proof of Fagin's theorem presented in Libkin's "Elements of Finite Model Theory"(pp 170-172) I noticed a passage that's not very clear to me:
in the presence of addition and multiplication (given as ternary relations), $\iota$ is definable
With addition and multiplication, this is a definable property, and addition and multiplication themselves can be introduced by means of additional existential second-order quantifiers (since one can state in FO that a given relation properly represents addition or multiplication with respect to the ordering L).
This is in the context of a structure on which there exists a linear ordering over the elements of the universe. While trying to see how this could be defined I came across this answer that uses quantification over function symbols. However I'd like to introduce addition and multiplication within the bounds of second order existential logic, so by only allowing quantification over sets.
What I worked out for addition is this:
Assume we have a language $\sigma=\{ \leq \}$ where $\leq$ represents a linear ordering (so let's assume all the needed ordering properties are in a first order statement $\psi$ in the language $\sigma$) then we can say: $$ \exists S\,( \psi\wedge\, (\exists m \forall n S(n,m,n) \wedge \forall z S(n,z,n) \to (z=m))\wedge\forall n\forall p \exists m (S(n,m,p)\wedge \forall z (S(n,z,p)\to(z=m))\wedge\forall n\forall m\forall p \,(S(n,m,p)\to(n\leq p \wedge m\leq p)))$$ Where the intended interpretation of $S(n,m,p)$ is $n+m=p$.
Am I going in the right direction, are there other thing I need to add or have I misunderstood what is intended with "One can state in FO that a given relation properly represents addition or multiplication with respect to the ordering L"?
EDIT:
So I thought of another approach. Let's assume I want to write a first order sentence in the language $\sigma_2 = \{\leq, S\}$, where I introduced S through an existential second order quantification, that states that $S$ is in fact a sum. If we let $succ(x,y)$ be the formula in the language $\sigma$ stating that "y is the successor of x in the ordering $\leq$". Then if the take the relation $S(n,m,p)$ with the same interpretation as before, I write $\exists S \varphi$, where $\varphi$ is: $$\exists l( S(n,l,n) \wedge \forall z S(n,z,n) \to (l=z))\wedge(\forall n\forall m\forall p\exists x\exists y((S(n,m,p)\wedge succ(m,x)\wedge succ(p,y))\to(S(n,x,y)) $$
With the intended interpretation being: There exists only one element $l$ of the universe such that $n+l=n$ and for all $n,m,p$ if $n+m=p$ then the sum of $n$ with the successor of $m$ is equal to the successor of $p$.
I know it's not perfect but I can't think of a way to write $S(n,m,p)\leftrightarrow$ some formula.