\section{Introduction}

Forecasts of a candidate's probability of winning an election have become a staple of political journalism over the last decade, with the most prominent being those reported on the website FiveThirtyEight, for example in the 2016 U.S. Presidential election; see \cite{538}. \cite{taleb2018} was motivated to critique the quality of election forecasts by the apparent instability of these probabilities through time. FiveThirtyEight reported a probability of Clinton winning the 2016 election that ranged from 55 to 85 percent over the final five months. According to Taleb, this was indicative of `stark errors' and `severe violations' of standard results in quantitative finance, specifically no-arbitrage option pricing. Imposing a no-arbitrage constraint on election forecast probabilities, as binary options written on the candidate's vote share, would therefore, according to Taleb, eliminate such instabilities.

In this paper we show that Taleb's argument was mistaken. First, one of the `standard results' of quantitative finance that his election forecast assessments rely on is false, as we demonstrate with a simple counterexample. Next, we show that binary option prices can easily exhibit as much or more variability through time as the 2016 Presidential election forecasts without violating any no-arbitrage constraints. We argue that, under mild assumptions concerning the information available to a forecaster, all such election forecasts are arbitrage-free. Finally, we comment on a problem regarding an ill-defined variable in Taleb's election model and what this implies for the general applicability of option pricing methods to election forecasting.

\section{Summary of Taleb's argument}

We being by summarizing Taleb's argument, which consists of five main steps. We also take this opportunity to fix some notation and definitions:

\begin{enumerate}

\item He claims that the forecast probability for an event, such as a candidate winning an election, should be considered as the price of a binary option taking the terminal value 1 if the event happens and 0 otherwise. This can be thought of a derivative security on an underlying `asset' variable $Y_t$, e.g., the candidate's number of supporters among the population of voters at a given time $t$, with the election outcome determined by whether $Y_T$ exceeds some threshold $l$ at terminal time $T$. Arbitrage pricing theory will then dictate limits on the behavior of these prices/probabilities over time.

\item He gives a model for the stochastic process governing the underlying asset $Y_t$. To produce a $Y_t$ that is bounded in some range $[L, H]$, Taleb assumes $Y_t = S(X_t)$ for a `shadow process' $X_t$ satisfying a tractable stochastic differential equation, where $S$ is a function taking the real line to a finite interval. He makes the choice:

$$dX_t = \sigma^2 X_t dt + \sigma dW_t$$

and

$$S(x) = \frac{1}{2} +  \frac{1}{2} erf(x)$$

where $erf(x) = \frac{2}{\sqrt{\pi}} \int_0 ^ x \exp(-t^2) dt$.

\noindent Note that

$$\frac{1}{2} S''(x) + x S'(x) = 0$$

With that choice in place, It\^{o}'s formula implies $Y_t$ satisfies

$$dY_t = \left( \frac{1}{2} \sigma^2 S''(X_t) + \sigma^2 X_t  S'(X_t) \right) dt + \sigma S'(X_t) dW_t $$
$$= 0 \cdot dt + \sigma S'(X_t) dW_t$$

That is, the process $Y_t$ is a bounded martingale.

\item Since the process $X_t$ is the familiar Bachelier-style model for an asset price, the price of a binary option of $X_t$ has a known formula. Arguing that this price is equal to the price one would obtain for the binary option on $Y_t$ with the corresponding threshold value, this gives the election forecast probability. Substituting $x = S^{-1}(y)$ into the option pricing formula for $X$ gives the price in terms of the currently observed value of $Y_t$ at a given time. Since $Y_t$ is a martingale, Taleb argues that the stochastic equation for $Y_t$ represents the dynamics under the risk-neutral measure, and therefore the price obtained for the binary option represents the probability of $Y_T$ exceeding the threshold, that is, the probability of the given candidate winning the election. Since the forecast probabilities are derived as option prices, under this measure they are also martingales.

\item A heuristic from option pricing suggests that the greater the volatility of the underlying asset, the closer the binary option price should be to $0.5$ and the lower the volatility of the option price should be over time. A numerical example for the forecast probability of Trump winning the 2016 Presidential election shows that Taleb's model gives prices close to $0.5$ until just before election day, at which point it jumps to near $1.0$, in agreement with the heuristic argument. Observing electoral forecasts such as those made by FiveThirtyEight show forecast probabilities deviating significantly from $0.5$ and fluctuating widely, even at a date far in advance of the election. He claims this means the FiveThirtyEight forecasts must have `violate[d] arbitrage boundaries.'

\item Taleb then compares his martingale-pricing approach with an argument due to de Finetti \citep{definetti2009} that forecast probabilities be evaluated by means of the Brier score

$$\frac{1}{n} \sum_{i=1}^n (\mathbf{1_i} - p_i)^2$$

where $p_1, \ldots, p_n$ are prices of bets laid on the outcomes of $n$ independent events, and $\mathbf{1_i}$ is the indicator function taking the value 1 if the event occurred and 0 otherwise. In order to minimize losses according to this score, an agent will place bets in agreement with their probabilities for the events. He claims the martingale-pricing technique gives a continuous time analogue of the same idea.

\end{enumerate}

\section{Criticism}

\subsection{The behavior of option prices with respect to volatility}
Taleb's heuristic regarding the behavior of binary option prices as the volatility of the underlying increases is only partially true. He claims that `[a] standard result in quantitative finance is that when the volatility of the underlying security increases, arbitrage pressures push the corresponding binary option to trade closer to 50\%, and become less variable over the remaining time to expiration.' It is the case that for a given `spot-price' $Y_t$ and a given threshold value $l$, as the volatility $\sigma$ in the stochastic model for $Y_t$ is increased, under general conditions the binary option price/probability of exceeding the threshold should converge to $0.5$. For example, if the stochastic process for $Y_t$ were a simple Brownian motion with drift

$$dY_t = \mu dt + \sigma dW_t$$

\noindent the conditional distribution for $Y_T$ given $Y_t$ would be $N(Y_t,\sigma^2 (T-t))$ and so the binary option price for strike $l$ at time $t$ would be

$$B(t,T) = 1 - \Phi \left(\frac{l - Y_t - \mu(T-t)}{\sigma \sqrt{T-t}} \right)$$

\noindent where $\Phi$ is the standard normal cdf. This converges to $0.5$ as $\sigma$ goes to $\infty$. Other processes depending on a volatility parameter will show the same behavior.

However, the prices $B(t,T)$ one actually \emph{observed} over time would not stabilize around $0.5$, because the higher volatility for the process $Y$ would also result in a wider distribution for $Y_t$ at any given $t$. Taking the same example above with $Y_0 = 0$, we have an unconditional cdf for $B(t,T)$ given by

\begin{equation*}
\begin{aligned}
P[ B(t,T) < x] = P \left[ \Phi \left(\frac{l - Y_t - \mu(T-t)}{\sigma \sqrt{T-t}} \right) > 1 - x \right] \\
= \Phi \left( \frac{l - \mu (T-t) - \sigma \sqrt{T-t} \Phi^{-1}(1-x) - \mu t}{\sigma \sqrt{t}} \right)  \\
= \Phi \left( \frac{l - \mu T}{\sigma \sqrt{t}} - \sqrt{\frac{T}{t} - 1} \Phi^{-1}(1-x) \right)
\end{aligned}
\end{equation*}

So, as $\sigma \rightarrow \infty$, we end up with a distribution for $B(t,T)$ that is stable but certainly not a point mass at $0.5$. In particular, at the midway point $t = T/2$, if we have set our threshold $l$ to be equal to the projected mean of $Y_T$, $l =\mu T$, then we will have

$$P[B(t,T) < x] = \Phi \left( - \Phi^{-1}(1-x) \right) = 1 - \Phi(\Phi^{-1}(1-x)) = x$$

\noindent and so $B(t,T)$ has the \emph{uniform} distribution on $[0,1]$ regardless of $\sigma$.

This counterexample shows that Taleb's second claim, that as volatility increases binary option prices `become less variable over the remaining time to expiration,' is false. Instead, the variability of the paths of the option price may be completely independent of the volatility in the underlying. This has profound implications on his criticism of election forecasts. For example, assuming a simple random-walk model for a given candidate's vote share, if the process stays close to the value $50\%$ we may observe the win-probability fluctuate widely through time despite arbitrarily small fluctuations in the polls. The figures below show one such simulated path over 1000 days where we have set the size of daily poll movements to 0.1\%. We could just have easily chosen 0.000001\% or any small number.

\begin{figure}[H]
\centering
\includegraphics[width=.8\linewidth]{random_walk_example_polls.eps}
\caption{Simulated candidate vote share for a random-walk process; step = 0.01\%}
\label{fig:randomwalkpolls}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[width=.8\linewidth]{random_walk_example_win_prob_uncaptioned.eps}
\caption{Simulated candidate win-probability for a random-walk process; step = 0.01\%}
\label{fig:randomwalkwinprob}
\end{figure}

\noindent The size of these fluctuations in poll numbers and forecast win-probability are roughly consistent with what was observed in 2016.

In fact, even in Taleb's model, if the same \emph{s} parameter, representing annualized volatility in the polls, is used to project the polls as well as construct the forecasts, the paths do not stabilize at $0.5$ for high volatilities. For example, the figure below shows one such path with $s = 100\%$:

\begin{figure}[H]
\centering
\includegraphics[width=.8\linewidth]{Taleb_model_path_s=100.eps}
\caption{Simulated candidate win-probability for Taleb's pricing model; s = 100\%}
\label{fig:talebwinprob}
\end{figure}

Intuitively speaking, the greater we assume the implied volatility for the pricing model $Y_t$ to be, the greater we must also assume the realized volatility to be; the former pulls option prices in toward $0.5$ for any given spot-price while the latter widens the distribution of the actual spot-price we observe. Since the same volatility we observe is priced into the option, the two effects more-or-less exactly cancel, leaving the paths of forecast probabilities/prices unchanged. For Taleb's demonstrated stable probabilities to manifest, we would need to consistently use a higher implied volatility than what has been realized, an `excess volatility' assumption that he does not explicitly state or attempt to justify.

\subsection{Election predictions are arbitrage-free}

Framing election forecasting as a problem of option pricing adds needless complication and introduces the possibility of confusion. Taleb's argument relies on an analogy to the problem: given a model for the dynamics of an asset price under real-world probabilities $\mathbb{P}$, price an option on the asset. The Fundamental Theorem of Asset Pricing implies that in a complete market with no arbitrage there is an equivalent probability measure $\mathbb{Q}$ under which all assets earn the risk-free rate $r$ on average, including the option. Setting $r=0$ would make all assets martingales under this measure. Thus, the value at any given time for any derivative security is simply the average of its possible values at any future time; for a binary option this implies the price is equal to the probability of occurrence for the payoff event.

However, the task facing a forecaster is not one of pricing an option but of assigning a real probability. Suppose this is done over the filtration $(F_t)$ of information available to the forecaster at any given time. Granting Taleb's assertion that the probabilities should be thought of as prices, and that these prices should be martingales under the \emph{real-world measure}, we still needn't bother with the artifice of defining a stochastic model for $Y_t$ under which it is a martingale and pricing an option written on $Y_t$. Instead, we can achieve exactly the dynamic Taleb desires by considering any stochastic process at all for $Y_t$ and then quoting the probability

$$B(t,T) = \mathbf{P}[Y_T > l | F_t]$$

These probabilities/prices always produce an $(F_t)-$martingale by the tower property of conditional expectation:

$$E[ B(t,T) | F_s ] = E[ E[ \mathbf{1}_{Y_T > l}] | F_t] | F_s] = E[ \mathbf{1}_{Y_T > l}] | F_s] = B(s,T)$$

\noindent for any times $s < t$.

Thus, Taleb's construction of a martingale $Y_t$ is sufficient but not necessary for the forecast probabilities to be martingales, which makes his shadow process $X_t$ doubly unnecessary. Taleb's construction requires a bounded martingale that can be written as some monotonic function of a process for which the option prices were possible to compute, but he could have skipped that entirely.

Different forecasters may disagree in their assessments, and the results may be profitable for one or the other. Whether the forecaster's probabilities allow for profitable investments over time will depend on the judgments of the forecaster and the investor. However, since the forecaster's conditional probabilities are automatically martingales with respect to their own filtration, there is no possibility for arbitrage unless the two assigned probability measures are not equivalent. In order to exhibit arbitrage, then, Taleb would need to show an event a forecaster assigned nonzero probability to was actually impossible, or conversely, a forecaster claimed an actually possible event had probability zero.

\subsection{The definition of the underlying}
Finally, Taleb's analysis suffers from a lack of precision about the meaning of the `underlying' asset $Y_t$, from which the election results are meant to be determined. He desires it both to be the vote count/share $Y_T$ at the terminal date (or number of electoral votes for determining a presidential election outcome) and yet also to be measurable by some means at times $t < T$ as `an intermediate realization of the process at t.' This would be possible if the opinion of every potential voter in the U.S. were known at every given time, in which case the volatility of $Y_t$ would correspond to changes of \emph{opinion}.

However, the problem for the forecaster is that the intentions of every person are not known and must be estimated from polls/samples. Thus, the uncertainty facing a political forecaster such as FiveThirtyEight is that these samples themselves have uncertainty, as do the proportions of people who actually vote in the election. Taleb later defines $Y_t$ to be `the observed \emph{estimated} proportion of votes' (emphasis ours). If we treat $Y_t$ as the estimated proportions of voters, as given by the samples, we would find it inadequate to determine the election of the outcome; elections are decided by the actual vote counts, not a final random sample of voters on election day. This means that the process $Y_t$ cannot possibly be both an underlying asset for the derivative and adapted to the filtration of information available to the forecaster.

\section{Conclusion}

Taleb's criticism of popular forecast probabilities, specifically the election forecasts of FiveThirtyEight, was inspired by a judgment that they tend to fluctuate too much given a reasonable amount of uncertainty in the future changes in popular opinion. He attempted to cast this as a violation of the principles of option pricing and to produce an alternative model by constructing a bounded martingale with known binary option prices exhibiting the dynamics he sought. However, the situation facing the forecaster is one of assigning probabilities, not prices, and this can be done in the real-world measure without reference to an underlying martingale asset. As long as these probabilites are updated consistenly according to rules of conditional probability, they will automatically be martingales. If the forecaster's probability measure is equivalent to an investor's, then according to the Fundamental Theorem of Asset Pricing arbitrage is impossible even if the forecasts are treated as prices. There may be profitable, but risky, market opportunities if investors have different probability assessments than the forecasters, but this is simply an argument that the investors' forecasts are better.

Taleb's heuristic of greater volatility/uncertainty giving binary option prices that stabilize around $0.5$ suggested that these forecasts had violated arbitrage boundaries, presumably, by understating the amount of uncertainty. However, that heuristic is neither true nor relevant. The paths of the conditional probabilities of a stochastic process terminating above some threshold level do not necessarily converge to constant lines at $0.5$ as volatility increases. It's possible to produce counterexamples where the distribution of prices at some intermediate point may be uniform on $[0,1]$, independent of the volatility of the underlying. This implies the observed variability in election forecasts is not necessarily indicative of any errors at all. The forecast probabilities may have fluctuated because they priced in only as much volatility as had been observed in the polls, a reasonable assumption that Taleb does not argue against. In any event, this is not a question of arbitrage.

Finally, the lack of clarity as to what the underlying asset $Y_t$ represents in Taleb's model speaks to a misunderstanding of the kinds of uncertainty facing the forecaster. In quantitative finance, an asset with an observable price is given a stochastic model, and fluctuations in that price determine the uncertainty of the terminal payoffs of various derivatives. In election forecasting, the ``price'' itself is unknown and unknowable. Thus, the whole framework of derivative pricing is arguably inapplicable here, which is no great loss since there was no need for it in the first place.

\section{References}


\section{Introduction}

 3-ary algebraic systems are applied in
mathematics and mathematical physics. For example, 3-Lie algebras
provided by Filippov  in 1985 \cite{FV, B1}, have close relation with
the theory of integrable-systems and Nambu mechanical-systems
\cite{BL, BW}.  Bagger and Lambert \cite{BW2,BW3, BW4} proposed a
supersymmetric fields theory model for multiple $M_2$-branes based
on the metric $3$-Lie algebras \cite{BW7}.

C. Bai and coauthors \cite{BGS}, defined pre-3-Lie algebras and local cocycle 3-Lie bialgebras and generalized Yang-Baxter equation in 3-Lie algebras, and proved that  tensor form solutions  of 3-Lie Yang-Baxter equation can be constructed by   local cocycle 3-Lie bialgebras. Three classes of 3-algebras are constructed in \cite{CFJMZ}:

(1) The classical Nambu bracket based on three variables ( say $x, y, z$ ) is the simplest to
compute, in most situations. It involves the Jacobian-like determinant of partial derivatives
of three functions $A, B, C$, $$ \{ A, B, C\}=\frac{\partial(A, B, C)}{(\partial x, \partial y, \partial z)},$$
and it satisfies Filippove identity:
$$
\{A, B, \{C, D, E\}\}=\{\{A, B,C\}, D, E\}+\{C, \{A, B, D\}, E\}+ \{C, D, \{A, B, E\}\}.
$$

(2) The  sum of single operators producted with commutators of the remaining two,
or as anticommutators acting on the commutators,

$$[A, B, C ] = A [B, C] + B [C, A] + C [A, B] = [B, C] A + [C, A] B + [A, B] C .$$

The multiplication does not satisfy Filippov identity, and the 3-algebra can by
realized by operators  \cite{CFJMZ}.

(3) The re-packaging
commutators of any Lie algebra to define

$$\langle A, B, C\rangle = [A, B] T r (C ) + [C, A] T r (B) + [B, C] T r (A). $$
\\
This is again a totally antisymmetric trilinear combination, but it is a singular construction
for finite dimensional realizations in the sense that $T r \langle A, B, C\rangle = 0,$ and authors in \cite{BBW3} proved that all the $m$-dimensional 3-Lie algebras with $m\leq 5$,  except for the unique  simple 3-Lie algebra,
can be constructed by the method from Lie algebras.

Likewise, in \cite{BGS}, the paper provides an algebra which is called the $3$-pre-Lie algebra, and induces a sub-adjacent $3$-Lie algebra. However,
 the $3$-pre-Lie algebra does not satisfy associative property. Motivated by this, in this paper, we define a new 3-algebra, the 3-ary multiplication is none completely antisymmetry, but it has close relation with 3-Lie algebras.

In the following we assume that $\mathbb Z$ is the set of integers,  $\mathbb F$ is an algebraic closed field of characteristic zero, and for a subset $S$ of a linear space $V$,  $\langle S\rangle $ denotes the subspace spanned by $S$.
And we usually omit  zero products of basis vectors when we list  the multiplication of $3$-algebras.

\section{ Natures of semi-associative 3-algebras}

\begin{defn}  A semi-associative 3-algebra $(A, \{ , , \})$ is a vector space $A$ with a 3-ary linear multiplication $\{
, , \}: A\otimes A\otimes A\rightarrow A$ satisfying that  for all
$x_i\in A, 1\leq i\leq 5$,
\begin{equation}
\{x_1, x_2, x_3\}=-\{x_2, x_1, x_3\},
\label{eq:21}
\end{equation}
\begin{equation}
\{x_1, \{x_2, x_3, x_4\}, x_5\}=\{x_1, x_2, \{x_3, x_4, x_5\}\},
\label{eq:22}
\end{equation}
\begin{equation}
\{x_1, \{x_2, x_3, x_4\}, x_5\}=\{x_5, \{x_2, x_3, x_4\}, x_1\}+\{x_1, \{x_5,
x_3, x_4\}, x_2\}.
\label{eq:23}
\end{equation}

\label{defn:21}
\end{defn}

For subspaces $B_1, B_2, B_3$ of $A$,
denotes $\{B_1, B_2, B_3\}$  the subspace spanned by  vectors $\{x_1, x_2, x_3\}$, $\forall x_i\in B_i$, $i=1, 2, 3$;  $\{A, A, A\}$ is denoted by $A^1$, which is called {\it the derived algebra} of $A$. If  $A^1=0$, then $A$ is called abelian.

For example, let $A$ be a $3$-dimensional vector space with   a basis $v_1, v_2, v_3$. Then $A$ is a semi-associative 3-algebra with the multiplication
$$\{v_1, v_2, v_2\}=-\{v_2, v_1, v_2\}=v_3,~~ \mbox{ and others are zero.}$$

\begin{defn} A subalgebra  of a semi-associative 3-algebra $A$ is a subspace $B$ satisfying $\{B, B, B\}\subseteq B$. If $B$ satisfies that $\{A, A, B\}\subseteq B$ and $(A, B, A)\subseteq B$, then $B$ is called an ideal of $A$.

\label{defn:22}
\end{defn}

Obviously, $\{0\}$ and $A$ are ideals of $A$, which are called trivial ideals. If $A$ has non proper ideals, then $A$ is called {\it  a simple semi-associative 3-algebra.}

For a given subspace $V\leq A$, the subalgebra

$$Z_A(V)=\{~ x ~|~ x\in A, ~\{x, V, A~\}=\{~V, A, x~\}=0~\}, $$
is called {\it the centralizer of $V$ in $A$}.  $Z_A(A)$ is called {\it the center} of $A$, and is simply denoted by $Z(A)$, that is,
$Z(A)=\{~ x  \mid   x\in A, \{x, A, A\}=\{A, A, x\}=0~\}$. It is clear that  $Z(A)$ is an ideal.

\begin{defn} Let $A$ and $A_1$ be semi-associative 3-algebras. If a linear mapping (linear isomorphism) $f: A\rightarrow A_1$
satisfies
$$
f\{x, y, z\}=\{f(x), f(y), f(z)\},~~ \forall x, y, z\in A,$$
then $f$ is called an algebra homomorphism (an algebra isomorphism).

\label{defn:21}
\end{defn}

Let $I$ be an ideal of $A$. Then quotient space $A/I=\{ x+I \mid ~~x\in A\}$ is a semi-associative 3-algebra in the multiplication
 $$\{x+I, y+I, z+I\}=\{x, y, z\}+I, ~~ \forall x, y, z\in A,$$ which is called {\it the quotient algebra of $A$ by $I$}, and
 $\pi: A\rightarrow A/I$, $\pi(x)=x+I$,  $\forall x\in A$, is a surjective algebra homomorphism.

\begin{prop} Let $A$  be a semi-associative algebra, $I_1, I_2, I_3$ be ideals of $A$. Then

1) $I_1+I_2$, $I_1\cap I_2$ and $\{I_1, I_2, I_3\}$ are ideals of $A$.

2) If $I_1\subseteq I_2$, then $I_2/I_1$ is an ideal of $A/I_1$.
\label{prop:21}
\end{prop}

\begin{proof} It  can be verified by a direct computation according to Definition \ref{defn:22}.
\end{proof}

\begin{prop} Let $A$  and $A_1$ be  semi-associative algebras, $f: A\rightarrow A_1$ be an algebra  homomorphism.  Then

1) $K=Ker f=\{x\in A\mid f(x)=0\}$ is an ideal of $A$, and $f(A)$ is a subalgebra of $A_1$.

2) If $f(A)=A_1$, then linear  mapping $\bar f: A/K\rightarrow A_1$, $\bar f(x+K)=f(x)$, for all $x\in A$, is an algebra isomorphism, and there is one to one correspondence  between  subalgebras of $A$ containing  $K$, with the subalgebras of $A_1$, and ideals  correspond to ideals.

\label{prop:22}
\end{prop}

\begin{proof} The result is easily  verified by a direct computation.
\end{proof}

\begin{theorem}
 Let $A$ be a semi-associative 3-algebra.

1) If there exist nonzero vectors $e_1, e_2, e_3, e_4\in A$ such that $\{e_1, e_2, e_3\}=e_4$, then $e_4\neq \lambda e_s$, where $\lambda\in \mathbb F, \lambda\neq 0, $  $s=1, 2, 3$.

2) If there exist nonzero vectors  $e_1, e_2, e_3\in A$ such that $\{e_1, e_2, e_3\}\neq 0$, then $\{e_1, e_2, e_3\}\neq \lambda e_1+ \mu e_2, \forall \lambda, \mu\in \mathbb F$.  Therefore,  if
 $\{e_1, e_2, e_3\}=ae_1 + be_2+ce_4\neq 0$, then $c\neq 0$, and $e_1, e_2, e_4$ are linearly independent.

\label{thm:23}
\end{theorem}

\begin{proof}~ If there exist nonzero vectors $e_1, e_2, e_3, e_4\in A$ such that $\{e_1, e_2, e_3\}=e_4=\lambda e_1$, $\lambda\in \mathbb F, \lambda\neq 0$, then by Eqs \eqref{eq:21} and \eqref{eq:22}

$e_4=\{e_1, e_2, e_3\}=\frac{1}{\lambda}\{e_2, \{e_2, e_1, e_3\},
e_3\}=\frac{1}{\lambda}\{e_2, e_2, \{e_1, e_3,
e_3\}\}=0$.
Contradiction. Therefore, $e_4\neq \lambda e_1$.
By the similar discussion to the above,  $e_4 \neq \mu e_2$, $\mu\in \mathbb F$.

If $e_4=\alpha e_3$, $\alpha\in \mathbb F, \alpha\neq 0$,  then

$e_4=\{e_1, e_2, e_3\}=\frac{1}{\alpha}\{e_1, e_2, \{e_1, e_2,
e_3\}\}=-\frac{1}{\alpha}\{e_1, e_1, \{e_2, e_2,
e_3\}\}=0$.
Contradiction. The result 1) follows.

If there exist nonzero vectors  $e_1, e_2, e_3\in A$ such that $\{e_1, e_2, e_3\}=\lambda e_1+ \mu e_2\neq 0, \lambda, \mu\in \mathbb F$.
 Without loss of generality, we can suppose $\mu\neq 0$. Then
 $$\{e_1, \lambda e_1+ \mu e_2, \frac{1}{\mu}e_3\}=\lambda e_1+ \mu e_2\neq 0.$$
 Contradiction. Therefore, $\{e_1, e_2, e_3\}\neq \lambda e_1+ \mu e_2, \forall \lambda, \mu\in \mathbb F$.
The proof is complete.
\end{proof}

\begin{theorem} Let $A$ be a non-abelian semi-associative 3-algebra with $\dim A=m\geq 3$. Then there exist linearly independent vectors $e_i, e_j, e_k\in A$ such that
$$\{e_i, e_j, e_k\}\neq 0.$$
\label{thm:24}
\end{theorem}

\begin{proof} Since $A$ is non-abelian, by \eqref{eq:21}, there are linearly independent vectors $e_1, e_2\in A$, such that $\{e_1, e_2, A\}\neq 0.$
Suppose  $\{ e_1, e_2, \cdots, e_m\} $ is a basis of $A$.  If $\{e_1, e_2, e_l\}=0$, for all $l\geq 3$, then there exist $a, b\in \mathbb F$, such that
$\{e_1, e_2, ae_1+be_2\}\neq 0$, we get  $\{e_1, e_2, ae_1+be_2+e_3\}\neq 0$, and vectors $e_1, e_2, ae_1+be_2+e_3$ are linearly independent. The proof is complete.
\end{proof}

\begin{theorem} Let $A$ be an $s$-dimensional semi-associative 3-algebra with $s\leq 6$. Then $A^{1}\subseteq Z(A)$.
\label{thm:25}
\end{theorem}

\begin{proof} If $A$ is abelian, then the result is trivial.

If $A^1\neq 0$, then we will  prove  $\{A, A^1, A\}=\{A, A, A^1 \}=0$.

Since $A^1\neq 0$, then  there are  nonzero vectors $e_i, e_j, e_k, e_l\in A$ such that $$\{e_i, e_j, e_k\}=e_l.$$

$ \bullet$   $\{ e_i, e_j, e_k \}$ are linearly dependent.

Then we can  suppose $e_k=ae_i+be_j$, $a, b\in \mathbb F$, and
   $e_l=a\{e_i, e_j, e_i\}+b\{e_i, e_j, e_j\}$.

  By \eqref{eq:22} and \eqref{eq:23},  for all $e_m, e_n\in A$, we have

 $\{e_m, e_l, e_n\}=a\{e_m, \{e_i, e_j, e_i\}, e_n\}+b\{e_m, \{e_i, e_j, e_j\}, e_n\}$

 \hspace{2cm}$=-a\{e_m, e_j, \{e_i, e_i, e_n\}\}+b\{e_m, e_i, \{e_j, e_j, e_n\}\}=0$,

$\{e_m, e_n, e_l\}=a\{e_m, e_n, \{e_i, e_j, e_i\}\}+b\{e_m, e_n, \{e_i, e_j, e_j\}\}$

\hspace{2cm}$=a\{e_i, e_i, \{e_n, e_j, e_m\}\}+b\{e_j, e_j, \{e_n, e_i, e_m\}=0.$
\\Therefore, $\{A, e_l, A\}=\{A, A, e_l\}=0$.

$\bullet\bullet$  $\{ e_i, e_j, e_k \}$ are linearly independent.

$\bullet\bullet_1$ If there $a, b, c\in \mathbb F,$ such that  $e_l=ae_i+be_j+ce_k$, then
$$\{e_i, e_j, e_k\}=ae_i+be_j+ce_k, ~~ a, b, c\in \mathbb F. $$
 By Theorem  \ref{thm:23}, $ac\neq 0$, or $bc\neq 0$. Without loss of generality, suppose $ac\neq 0$,  then
 $$\frac{c}{a}\{e_j, e_k, e_k\}=\frac{1}{a}\{e_j, ce_k, e_k\}=\frac{1}{a}\{e_j, \{e_i, e_j, e_k\}-ae_i-be_j, e_k\}=e_l. $$
 Therefore, for all $e_m, e_n\in A$,

   $\{e_m, e_l, e_n\}=\{e_m, \frac{c}{a}\{e_j, e_k, e_k\}, e_n\}=\{e_m, \frac{c}{a}e_j, \{e_k, e_k, e_n\}\}=0$, and

   $\{e_m, e_n, e_l\}=\{e_m, e_n, \frac{c}{a}\{e_j, e_k, e_k\}\}= \frac{c}{a}\{e_k, \{e_k, e_n, e_j\}, e_m\}=0$.
 \\ It follows  $\{A, A, e_l\}=\{A, e_l, A\}=0.$

 $\bullet\bullet_2$  $\{ e_i, e_j, e_k, e_l \}$ are linearly independent.

Then in the case $\dim A=4$, $\{ e_i, e_j, e_k, e_l\}$ is a
basis of  $A$.  For all $e_m, e_n\in A$, set

 $e_m=a_1e_i+b_1e_j+c_1e_k+d_1e_l, $  $e_n=a_2e_i+b_2e_j+c_2e_k+d_2e_l,
$ $a_i, b_i, c_i, d_i\in \mathbb F, i=1, 2$.
Then $\{e_m, e_l, e_n\}=\{a_1e_i+b_1e_j+c_1e_k+d_1e_l, e_l, e_n\}$

\hspace{2.6cm}$=a_1\{e_i, e_i, \{e_j, e_k, e_n\}\}-b_1\{e_j, e_j, \{e_i, e_k, e_n\}\}-c_1\{e_k, e_i, \{e_k, e_j, e_n\}\}$

\hspace{2.6cm}$=c_1\{e_k, e_k, \{e_i, e_j, e_n\}\}=0.$\\
By the similar to the above, $\{e_m, e_n, e_l\}=0$.

In the case  $\dim A=5$, then we can suppose that $\{ e_i, e_j, e_k, e_l, e_t\}$ is a  basis of $A$.

From the discussion of the case $\dim A=4$, we only  need to prove that $\{e_t, e_l, e_t\}=0$.
 Thanks to \eqref{eq:21}, \eqref{eq:22} and \eqref{eq:23},

$\{e_t, e_l, e_t\}=\{e_t, \{e_i, e_j, e_k\}, e_t\}=-\{e_t, e_t, \{e_j, e_k, e_i\}\}=0$.

In the case $\dim A=6$, then we can suppose $e_1, e_2, e_3, e_4, e_5, e_6$ is  a basis of $A$, where $e_1=e_i$, $e_2=e_j$, $e_3=e_k$, and $e_4=e_l$. Then
$\{e_1, e_2, e_3\}=e_4.$

By the above discussion,

\begin{equation}
\{B, e_4, B\}=\{B, B, e_4\}=0,~~ \{C, e_4, C\}=\{C, C, e_4\}=0,
\label{eq:24}
\end{equation}
\\
where $B=\langle e_1, e_2, e_3, e_4, e_5\rangle$, $C=\langle e_1, e_2, e_3, e_4, e_6\rangle$. Therefore, we  only need to discuss the products
$\{e_5, e_4, e_6\}$,
$ \{e_6, e_4, e_5\}$ and $\{e_5, e_6, e_4\}$. Suppose
$$\{e_5, e_4, e_6\}=a_3e_1+b_3e_2+c_3e_3+d_3e_4+\lambda_3 e_5+\mu_3 e_6, ~~ a_3, b_3, c_3, \lambda_3, \mu_3\in \mathbb F. $$
Thanks to \eqref{eq:24},

$\lambda_3\{e_5, e_4, e_6\}=\{\{e_5, e_4, e_6\}-a_3e_1-b_3e_2-c_3e_3-d_3e_4-\mu_3 e_6, e_4, e_6\}=\{\{e_5, e_4, e_6\}, e_4, e_6\}$

\hspace{2.35cm}$=\{e_4, \{e_4, e_5, e_6\}, e_6\}=\{e_4, e_4, \{e_5, e_6, e_6\}\}=0.$
\\
Therefore, $\lambda_3\{e_5, e_4, e_6\}=\lambda_3 ae_1+\lambda_3 b_3e_2+\lambda_3c_3e_3+\lambda_3 d_3e_4+\lambda_3^2 e_5+\lambda_3 \mu-3\lambda_3 e_6=0$,
 $\lambda_3=0$.

  By the complete similar discussion,  we have $a_3=b_3=c_3=d_3=\mu_3=0$.

  Therefore,
$\{ e_5, e_4, e_6\}=\{ e_5, e_6, e_4\}$  $=\{e_6, e_4, e_5\}=0$, and
  $A^{1}\subseteq Z(A)$.
\end{proof}

\section{ Derivations and centroid of semi-associative 3-algebras}

\subsection{ Derivations of semi-associative 3-algebras}

\begin{defn}
 Let $A$ be a semi-associative 3-algebra, and $D: A\rightarrow A$ be a linear mapping. If $D$ satisfies that
\begin{equation}
D\{x_1, x_2, x_3\}=\{Dx_1, x_2, x_3\}+\{x_1, Dx_2, x_3\}+\{x_1, x_2, Dx_3\}, ~~\forall  x_1, x_2, x_3 \in A,
\label{eq:31}
\end{equation}
then $D$ is called a derivation of $A$. $Der(A)$ denotes the set of all derivations  of  $A$.
\label{defn:31}
\end{defn}

\begin{prop}
 $Der(A)$ is a subalgebra of the general linear algebra $gl(A)$.
 \label{prop:31}
 \end{prop}

 \begin{proof}
 The result follows from a direct computation.
 \end{proof}

For $D\in Der(A)$, if $D$ satisfies $D(A)\subseteq Z(A)$ and $D(A^1)=0$, then $D$ is  called a {\it central derivation} of $A$.
And $Der_C(A)$ denotes the set of  central derivations. It is clear that $Der_C(A)$ is a subalgebra of $Der(A)$.

 For all $x_1, x_2\in A$, define linear mappings,

 $L(x_1, x_2),$ ~$ R(x_1, x_2), ~~ S(x_1, x_2): A \times A \longrightarrow A$,  by
\begin{equation}
L(x_1, x_2)(x)=\{x_1, x_2, x\},~ R(x_1, x_2)(x)=\{x, x_1, x_2\}, ~~ \forall x\in A,
\label{eq:32}
\end{equation}
\begin{equation}
 S(x_1, x_2)=L(x_1, x_2)-R(x_1, x_2).
 \label{eq:33}
\end{equation}
 $L(x_1, x_2)$  and $ R(x_1, x_2)$ are called the left multiplication and the right multiplication, respectively.

\begin{lemma} Let $A$ be a semi-associative 3-algebra. Then  for all $x_1, x_2, x_3, x_4\in A$,
\begin{equation}
L(x_1, x_2)=-L(x_2, x_1),
\label{eq:34}
\end{equation}
\begin{equation}L(x_1, x_2)L(x_3, x_4)=L(x_1, \{x_2, x_3, x_4\}),
\label{eq:35}
\end{equation}
\begin{equation}L(x_1, \{x_2, x_3, x_4\})=R(\{x_2, x_3, x_4\}, x_1)-R(x_1, x_2)R(x_3, x_4),
\label{eq:36}
\end{equation}
\begin{equation}
L(x_1, x_2)L(x_3, x_4)=L(x_3, x_1)L(x_2, x_4)=L(x_4, x_2)R(x_3, x_1)+L(x_3, x_1)R(x_4, x_2),
\label{eq:37}
\end{equation}
\begin{equation}
R(x_3,x_4)(R(x_1,x_2)+R(x_2, x_1))=0.
\label{eq:38}
\end{equation}
\label{lem:31}
\end{lemma}

\begin{proof} Eqs \eqref{eq:34}, \eqref{eq:35} and  \eqref{eq:36}  follow from \eqref{eq:21}, \eqref{eq:22} and \eqref{eq:23}, directly.

  For $\forall x_i\in A$, $1\leq i\leq 5$, by \eqref{eq:22} and \eqref{eq:23}, we have

$R(x_3, x_4)R(x_1, x_2)(x_5)+R(x_3, x_4)R(x_2, x_1)(x_5)$

\vspace{2mm}\hspace{-3mm}$ =\{\{x_5, x_1, x_2\}, x_3, x_4\}+\{\{x_5, x_2, x_1\}, x_3, x_4\}$

\vspace{2mm}\hspace{-3mm}
$ =-\{x_3, \{x_5, x_1, x_2\}, x_4\}-\{x_3, \{x_5, x_2, x_1\}, x_4\}$

\vspace{2mm}\hspace{-3mm}$ =-\{x_3, \{x_5, x_1, x_2\}, x_4\}+\{x_3, \{x_5, x_1, x_2\}, x_4\} =0,$

Similarly, we have

 $L(x_1, x_2)L(x_3, x_4)(x_5)-L(x_3, x_1)L(x_2, x_4)(x_5)$

\vspace{2mm}\hspace{-3mm}$=\{x_1, x_2, \{x_3, x_4, x_5\}\}-\{x_3, x_1, \{x_2, x_4, x_5\}\} =0,$ and

$L(x_1, x_2)L(x_3, x_4)(x_5)-(L(x_4, x_2)R(x_3, x_1)(x_5)+L(x_3, x_1)R(x_4, x_2)(x_5))=0.$

It follows \eqref{eq:37} and \eqref{eq:38}.
\end{proof}

Let $L(A)$, $R(A)$ and $S(A)$ be subspaces of $End(A)$ spanned by linear mappings $L(x_1, x_2)$, $R(x, x_2)$ and $S(x_1, x_2)$, respectively, $\forall x_1, x_2\in A,$ that is,

 $$L(A)=\langle L(x_1, x_2)\mid \forall x_1, x_2\in A\rangle,~~R(A)=\langle R(x, x_2)\mid \forall x_1, x_2\in A\rangle,$$

$$S(A)=\langle S(x_1, x_2)\mid \forall x_1, x_2\in A\rangle, ~~ T(A)=L(A)+R(A).$$

 Then  $L(A)\subseteq T(A)$ and $R(A)\subseteq T(A).$

\begin{theorem} Let $A$  be a semi-associative 3-algebra. Then $T(A)$ is an abelian subalgebra of $gl(A)$.
\label{thm:31}
\end{theorem}

\begin{proof} By \eqref{eq:21} and \eqref{eq:22},  for all $x_i\in A$, $1\leq i\leq 5,$

$
[L(x_1, x_2), L(x_3, x_4)](x_5)=(L(x_1, x_2)L(x_3, x_4)-L(x_3, x_4)L(x_1, x_2))(x_5)$

\vspace{2mm}\hspace{-3mm}$=\{x_1, \{x_2, x_3, x_4\}, x_5\}- \{x_3, \{x_4, x_1, x_2\}, x_5\}
$

\vspace{2mm}\hspace{-3mm}$=\{x_1, x_3, \{x_4, x_2, x_5\}\}- \{x_3, \{x_4, x_1, x_2\}, x_5\}
$

\vspace{2mm}\hspace{-3mm}$=(\{x_3, \{x_4, x_1, x_2\}, x_5\}- \{x_3, \{x_4, x_1, x_2\}, x_5\}=0.
$

Similarly, $
[L(x_1, x_2), R(x_3, x_4)]x_5=0.$ Thanks  to \eqref{eq:23},

$
[R(x_1, x_2), R(x_3, x_4)](x_5)=(R(x_1, x_2)R(x_3, x_4)-R(x_3, x_4)R(x_1, x_2))(x_5)$

\vspace{2mm}\hspace{-3mm}$=\{\{x_5, x_3, x_4\}, x_1, x_2\}-\{\{x_5, x_1, x_2\}, x_3, x_4\}
$

\vspace{2mm}\hspace{-3mm}$=-\{x_1, \{x_5, x_3, x_4\}, x_2\}+\{x_3, \{x_5, x_1, x_2\}, x_4\}
$

\vspace{2mm}\hspace{-3mm}$=-\{x_1, \{x_5, x_3, x_4\}, x_2\}+\{x_5, \{x_1, x_3, x_2\}, x_4\}
$

\vspace{2mm}\hspace{-3mm}$=-\{x_2, \{x_5, x_3, x_4\}, x_1\}-\{x_1, \{x_2, x_3, x_4\}, x_5\}
$
$+\{x_4, \{x_1, x_3, x_2\}, x_5\}$

\vspace{2mm}\hspace{-3mm}$+\{x_5, \{x_4, x_3, x_2\}, x_1\}=0. $

Therefore,
$[L(A), T(A)]=[R(A), T(A)]=0, [T(A), T(A)]=0.$ The proof is complete.
\end{proof}

\begin{theorem} Let $A$ be a semi-associative 3-algebra. Then

1) for any $ x_1, x_2\in A$,  $S(x_1, x_2)$ is a derivation of $A$;

2) $S(A)$ is an ideal of $Der(A)$, and $[S(A), S(A)]=0$.

\label{thm:32}
\end{theorem}

\begin{proof} For $\forall x_1, x_2, x, y, z\in A$, by \eqref{eq:32} and \eqref{eq:33},

$S(x_1, x_2)\{x, y, z\}$$=\{x_1, x_2, \{x, y, z\}\}-\{\{x, y, z\}, x_1,
x_2\}$

\vspace{2mm}\hspace{-3mm}
$=\{x_1, \{x_2, x, y\}, z\}+\{x_1, \{x, y, z\}, x_2\}, $

\vspace{2mm}$\{S(x_1, x_2)(x), y, z\}+\{x, S(x_1, x_2)(y), z\}+\{x, y, S(x_1, x_2)(z)\}$

\vspace{2mm}\hspace{-3mm}
$=\{\{x_1, x_2, x\}, y, z\}-\{\{x, x_1, x_2\}, y, z\}+\{x, \{x_1, x_2, y\}, z\}$

\vspace{2mm}\hspace{-3mm}
$-\{x, \{y, x_1, x_2\}, z\}+\{x, y, \{x_1, x_2, z\}\}-\{x, y, \{z, x_1, x_2\}\}$

\vspace{2mm}\hspace{-3mm}
$=\{x_1, \{x_2, x, y\}, z\}+\{x_1, \{x, y, z\}, x_2\}. $
Therefore,

$S(x_1, x_2)\{x, y, z\}=\{S(x_1, x_2)(x), y, z\}+\{x, S(x_1, x_2)(y), z\}+\{x, y, S(x_1, x_2)(z)\}.$
\\The result 1) follows.

For any $S(x_1, x_2)\in S(A), D\in Der(A)$, and $x\in A$, since

$[S(x_1, x_2), D ](x)$
$=S(x_1, x_2)D(x)-DS(x_1, x_2)(x)$

\vspace{2mm}\hspace{-3mm}
$=\{x_1, x_2, D(x)\}-\{D(x), x_1, x_2\}-D\{x_1, x_2, x\}+D\{x, x_1, x_2\}$

\vspace{2mm}\hspace{-3mm}
$=\{x_1, x_2, D(x)\}-\{D(x),x_1, x_2\}-\{D(x_1), x_2, x\}-\{x_1, D(x_2), x\}$

\vspace{2mm}\hspace{-3mm}
$-\{x_1, x_2, D(x)\}+\{D(x),x_1, x_2\}+\{x, D(x_1), x_2\}+\{x, x_1, D(x_2)\}$

\vspace{2mm}\hspace{-3mm}
$=(S\{x_1, D(x_2)\}-S\{D(x_1), x_2\})(x)$.
\\ Then $[S(A), Der(A)]\subseteq S(A)$, that is, $S(A)$ is an ideal of $Der(A)$.
Thanks to Theorem \ref{thm:31}, $[S(A), S(A)]=[L(A)-R(A), L(A)-R(A)]=0. $
It follows 2).
\end{proof}

For any $x_1, x_2\in A$, $S(x_1, x_2) $  is called an inner derivation of $A$.

\subsection{The centroid  of  semi-associative 3-algebras}

\begin{defn}~ Let $A$ be a semi-associative 3-algebra. The vector space
$$
\Gamma(A)=\{\varphi \in End(A)| \varphi\{x_1, x_2, x_3\}=\{\varphi(x_1), x_2, x_3\}=\{x_1, x_2, \varphi(x_3)\}, \forall x_1, x_2, x_3\in A \}
$$
is called the centroid of $A$.
\label{defn:61}
\end{defn}

For any $\varphi\in End(A)$, by \eqref{eq:21},  $\varphi\in \Gamma(A) $ if and only if for all $x_1, x_2, x_3\in A$,

$$\varphi\{x_1, x_2, x_3\}=\{\varphi(x_1), x_2, x_3\}=\{x_1, \varphi(x_2), x_3\}=\{x_1, x_2, \varphi(x_3)\}.$$

\begin{theorem}~ Let $A$ be a semi-associative 3-algebra. Then

1) $\Gamma(A)$ is a subalgebra of the general linear Lie algebra $gl(A)$.

2) For any $\varphi\in \Gamma(A)$, if $\varphi(A)\subseteq Z(A)$ and $\varphi(A^1)=0$, then $\varphi$ is a central derivation.

3) For any $\varphi\in\Gamma(A)$, and $D\in Der(A)$. Then $\varphi D\in Der(A)$.

4) $Der_C(A)=\Gamma(A)\cap Der(A)$.

\label{thm:61}
\end{theorem}

\begin{proof} For all $\varphi_1, \varphi_2\in \Gamma(A)$, and  $x_1, x_2, x_3\in A$, by Definition \ref{defn:61},

$[\varphi_1, \varphi_2]\{x_1, x_2, x_3\}=(\varphi_1\varphi_2-\varphi_2\varphi_1)\{x_1, x_2, x_3\}$

\vspace{2mm}\hspace{-3mm}$=\{\varphi_1\varphi_2(x_1), x_2, x_3\}-\{\varphi_2\varphi_1(x_1), x_2, x_3\}$
$=\{[\varphi_1, \varphi_2](x_1), x_2, x_3\}$,

\vspace{2mm}$[\varphi_1, \varphi_2]\{x_1, x_2, x_3\}=(\varphi_1\varphi_2-\varphi_2\varphi_1)\{x_1, x_2, x_3\}$

\vspace{2mm}\hspace{-3mm}$=\{x_1, x_2, \varphi_1\varphi_2(x_3)\}-\{x_1, x_2, \varphi_2\varphi_1(x_3)\}$
$=\{x_1, x_2, [\varphi_1, \varphi_2](x_3)\}$.
\\
Therefore,  $[\varphi_1, \varphi_2]\in gl(A)$, the result 1) follows.

 For any $\varphi\in \Gamma(A)$, if $\varphi(A)\subseteq Z(A)$ and $\varphi(A^1)=0$, then by Definition \ref{defn:61} and \eqref{eq:31}, $\varphi\in Der A$. It follows 2).

For any  $\varphi\in \Gamma(A)$, $D\in Der A$, and $x_1, x_2, x_3\in A$,

 $\varphi D\{x_1, x_2, x_3\}=\varphi\{D(x_1), x_2, x_3\}+\varphi\{x_1, D(x_2), x_3\}+\varphi\{x_1, x_2, D(x_3)\}$

~~~~~~~~~~~~~~~~~~~$=\{\varphi D(x_1), x_2, x_3\}+\{x_1, \varphi D(x_2), x_3\}+\{x_1, x_2, \varphi D(x_3)\}$,
\\ $\varphi D\in Der A$.  It follows  3).

For any $\varphi\in \Gamma(A)\cap Der(A)$, by Definition \ref{defn:61}, and \eqref{eq:31},
$\forall x_1, x_2, x_3 \in A$,  we have

$\varphi\{x_1, x_2, x_3\}=\{\varphi(x_1), x_2,  x_3\}+\{x_1,
\varphi(x_2), x_3\}+\{x_1, x_2, \varphi(x_3)\}=3\varphi\{x_1, x_2, x_3\}$.
 \\Therefore,  $\varphi(A^1)=0$. By $\varphi\{x_1, x_2, x_3\}=\{\varphi(x_1), x_2,  x_3\}=\{ x_1,  x_2, \varphi(x_3)\}=0$, we have  $\varphi(A)\subseteq Z(A)$, it follows $\Gamma(A)\cap Der(A)\subseteq Der_C(A)$.

It is clear that if $\varphi\in Der_C(A)$, then $\varphi\in \Gamma(A) $. This implies $Der_C(A)=\Gamma(A)\cap
Der(A)$.
\end{proof}

\begin{theorem}~Let $A$ be a semi-associative 3-algebra. Then  $\forall D \in Der(A), \varphi\in \Gamma(A)$

1) $[D, \varphi]\subseteq \Gamma(A)$,~~
2) $D\varphi\in \Gamma(A)$ if and only if $\varphi D\in Der_C(A)$,

3) $D\varphi\in Der(A)$ if and only if $[D, \varphi]\in Der_C(A)$.

\label{thm:62}
\end{theorem}

{\bf Proof} For any $D\in Der(A), \varphi\in \Gamma(A)$, and $x_1, x_2, x_3\in A$, since

$D\varphi\{x_1, x_2, x_3\}=D\{\varphi(x_1), x_2, x_3\}$

\vspace{2mm}\hspace{-3mm}$=\{D\varphi(x_1), x_2, x_3\}+\{\varphi(x_1), D(x_2), x_3\}+\{\varphi(x_1), x_2, D(x_3)\}$

\vspace{2mm}\hspace{-3mm}$=\{D\varphi(x_1), x_2, x_3\}+\varphi D\{x_1, x_2, x_3\}-\{\varphi D(x_1), x_2, x_3\}$, and

\vspace{2mm}$D\varphi\{x_1, x_2, x_3\}=D\{x_1, x_2, \varphi(x_3)\}$

\vspace{2mm}\hspace{-3mm}$=\{D(x_1), x_2, \varphi(x_3)\}+\{x_1, D(x_2), \varphi(x_3)\}+\{x_1, x_2, D\varphi(x_3)\}$

\vspace{2mm}\hspace{-3mm}$=\varphi D\{x_1, x_2, x_3\}-\{x_1, x_2, \varphi
D(x_3)\}+\{x_1, x_2, D\varphi(x_3)\}$,
 \\ we have $(D\varphi-\varphi
D)\{x_1, x_2, x_3\}=\{(D\varphi-\varphi D)(x_1), x_2, x_3 \}$, and

$(D\varphi-\varphi
D)\{x_1, x_2, x_3\}=\{x_1, x_2, (D\varphi-\varphi D\}(x_3)\}$. Therefore, $[D, \varphi]\in \Gamma(A)$.

Thanks to  Theorem \ref{thm:61}, $\varphi D\in Der A$. If $D\varphi\in  \Gamma(A)$, then by $[D, \varphi]\in \Gamma(A)$, we have   $\varphi D\in \Gamma (A)$.  Therefore,
$\varphi D\in Der(A)\cap \Gamma(A)$.
Conversely, if $\varphi D\in \Gamma (A)$, then by $[D, \varphi]\in \Gamma(A)$, we have $D\varphi \in \Gamma(A)$.
We get 2). The result 3) follows from 1) and 2).

\section{Sub-adjacent  $3$-Lie algebras  and double modules  of  semi-associative 3-algebras}

\subsection{Sub-adjacent  $3$-Lie algebras of semi-associative 3-algebras}

3-Lie algebras have close relationships  with Lie algebras, pre-Lie algebras, associative algebras, commutative associative algebras and et al. Now we discuss
the relation between 3-Lie algebras with  semi-associative 3-algebras.

A $3$-Lie algebra $(L, [ , , ])$ is a vector space $L$  with a linear multiplication $[ , , ]: L\wedge L\wedge L\rightarrow L$ which satisfies that  for all $x_i\in L$, $1\leq i\leq 5,$
\begin{equation}
[[x_1, x_2, x_3], x_4, x_5]=[[x_1, x_4, x_5], x_2, x_3]+[x_1, [ x_2, x_4, x_5], x_3]+[x_1, x_2, [x_3, x_4, x_5]].
\label{eq:41}
\end{equation}

\begin{theorem} Let $A$ be a semi-association $3$-algebra. Then $(A, [ , , ]_c)$ is a $3$-Lie algebra, where for all $x_1, x_2, x_3\in A,$
\begin{equation}
[x_1, x_2, x_3]_c=\{x_1, x_2, x_3\}+\{x_2, x_3, x_1\}+\{x_3, x_1, x_2\}.
 \label{eq:42}
\end{equation}

\end{theorem}

\begin{proof} By \eqref{eq:21}, \eqref{eq:22} and \eqref{eq:23}, the multiplication  $[ , , ]_C$ given by
\eqref{eq:42} is skew-symmetric,  and for all $x_i\in A, 1\leq i\leq 5$,

$[[x_1, x_2, x_3]_c, x_4, x_5]_c-[[x_1, x_4, x_5]_c, x_2, x_3]_c-[x_1, [x_2, x_4, x_5]_c,  x_3]_c$

$-[x_1, x_2, [x_3, x_4, x_5]_c]_c$

\vspace{2mm}\noindent
$=\{\{x_1, x_2, x_3\}, x_4, x_5\}+\{\{x_2, x_3, x_1\}, x_4, x_5\}+\{\{x_3,
x_1, x_2\}, x_4, x_5\}$
$+\{x_4, x_5, \{x_1, x_2, x_3\}\}$

\vspace{2mm}\noindent
$+\{x_4, x_5, \{x_2, x_3, x_1\}\}+\{x_4, x_5,
\{x_3, x_1, x_2\}\}$
$+\{x_5, \{x_1, x_2, x_3\}, x_4\}$
$+\{x_5, \{x_2, x_3, x_1\}, x_4\}$

\vspace{2mm}\noindent$+\{x_5, x_3,
x_1, x_2\}, x_4\}$
$-\{\{x_1, x_4, x_5\}, x_2, x_3\}-\{\{x_4, x_5, x_1\}, x_2, x_3\}$
$-\{\{x_5,
x_1, x_4\}, x_2, x_3\}$

\vspace{2mm}\noindent$-\{x_2, x_3, \{x_1, x_4, x_5\}\}$
$-\{x_2, x_3, \{x_4, x_5, x_1\}\}-\{x_2, x_3,
\{x_5, x_1, x_4\}\}$
$-\{x_3, \{x_1, x_4, x_5\}, x_2\}$

\vspace{2mm}\noindent$-\{x_3, \{x_4, x_5, x_1\}, x_2\}$
$-\{x_3,
\{x_5, x_1, x_4\}, x_2\}$
$-\{x_1, \{x_2, x_4, x_5\}, x_3\}$
$-\{x_1, \{x_4, x_5, x_2\}, x_3\}$

\vspace{2mm}\noindent$-\{x_1,
\{x_5, x_2, x_4\}, x_3\}$
$-\{\{x_2, x_4, x_5\}, x_3, x_1\}-\{\{x_4, x_5, x_2\}, x_3, x_1\}-\{\{x_5,
x_2, x_4\}, x_3, x_1\}$

\vspace{2mm}\noindent
$-\{x_3, x_1, \{x_2, x_4, x_5\}\}-\{x_3, x_1, \{x_4, x_5, x_2\}\}-\{x_3, x_1,
\{x_5, x_2, x_4\}\}$
$-\{x_1, x_2, \{x_3, x_4, x_5\}\}$

\vspace{2mm}\noindent$-\{x_1, x_2, \{x_4, x_5, x_3\}\}-\{x_1, x_2,
\{x_5, x_3, x_4\}\}$
$-\{x_2, \{x_3, x_4, x_5\}, x_1\}-\{x_2, \{x_4, x_5, x_3\}, x_1\}$

\vspace{2mm}\noindent
$-\{x_2,
\{x_5, x_3, x_4\}, x_1\}$
$-\{\{x_3, x_4, x_5\}, x_1, x_2\}-\{\{x_4, x_5, x_3\}, x_1, x_2\}-\{\{x_5,
x_3, x_4\}, x_1, x_2\}$

\vspace{2mm}\noindent
$=\{x_4, x_5, \{x_1, x_2, x_3\}\}+\{x_5, \{x_4, x_2, x_3\}, x_1\}+\{x_4, x_5, \{x_2, x_3, x_1\}\}$
$+\{x_5, \{x_4, x_3, x_1\}, x_2\}$

\vspace{2mm}\noindent$+\{x_4, x_5, \{x_3, x_1, x_2\}\}+\{x_5, \{x_4, x_1, x_2\}, x_3\}$
$-\{x_2, x_3, \{x_1, x_4, x_5\}\}-\{x_3, \{x_2, x_4, x_5\}, x_1\}$

\vspace{2mm}\noindent$-\{x_2, x_3, \{x_4, x_5, x_1\}\}$
$-\{x_3, \{x_2, x_5, x_1\}, x_4\}-\{x_2, x_3, \{x_5, x_1, x_4\}\}-\{x_3, \{x_2, x_1, x_4\}, x_5\}$

\vspace{2mm}\noindent
$-\{x_3, x_1, \{x_2, x_4, x_5\}\}-\{x_1, \{x_3, x_4, x_5\}, x_2\}-\{x_3, x_1, \{x_4, x_5, x_2\}\}$
$-\{x_1, \{x_3, x_5, x_2\}, x_4\}$

\vspace{2mm}\noindent$-\{x_3, x_1, \{x_5, x_2, x_4\}\}-\{x_1, \{x_3, x_2, x_4\}, x_5\}$
$-\{x_1, x_2, \{x_3, x_4, x_5\}\}-\{x_2, \{x_1, x_4, x_5\}, x_3\}$

\vspace{2mm}\noindent$-\{x_1, x_2, \{x_4, x_5, x_3\}\}$
$-\{x_2, \{x_1, x_5, x_3\}, x_4\}-\{x_1, x_2, \{x_5, x_3, x_4\}\}-\{x_2, \{x_1, x_3, x_4\}, x_5\}$
$=0$.

Therefore, the multiplication $[~ , ~ , ~]_c$ satisfies \eqref{eq:41}, and $A_c$ is a 3-Lie algebra. The proof is complete.
\end{proof}

The 3-Lie algebra $(A, [ , , ]_c)$ is called {\it the sub-adjacent $3$-Lie algebra of the semi-association 3-algebra $A$,} and is simply denoted by $A_c$.
 $Der(A_c)$ denotes the derivation algebras of the sub-adjacent $3$-Lie algebra $A_c$, and

\begin{theorem} Let $A$ be a semi-associative $3$-algebra. Then

\vspace{2mm}\noindent
1) derivation algebra $Der(A)$ is a subalgebra of  $Der(A_c)$;

 \vspace{2mm}\noindent 2) for all  $x_i\in A$, $1\leq i\leq 4,$ and $S(x_1, x_2)$, $S(x_3, x_4)\in Der(A)$,
$$ S([x_1, x_2, x_3]_c, x_4)=S(x_2, x_3)S(x_1, x_4)+S(x_1, x_2)S(x_3, x_4)-S(x_1, x_3)S(x_2, x_4); $$

 \vspace{2mm}\noindent
 3) if $I$ is an ideal ( a subalgebra ) of semi-associative algebra $A$, then $I$ is also an ideal ( a subalgebra ) of the $3$-Lie algebra $A_c$.
\label{thm:42}
\end{theorem}

\begin{proof} For any $D\in Der(A)$, and $x, y, z\in A$,

 $D[x, y, z]_c=D(\{x, y, z\}+\{y, z, x\}+\{z, x, y\})$
$=\{Dx, y, z\}+\{x, Dy, z\}+\{x, y, Dz\}$

\vspace{2mm}\hspace{2cm}
$+\{Dy, z, x\}+\{y, Dz, x\}+\{y, z, Dx\}$
$+\{Dz, x, y\}+\{z, Dx, y\}$

\vspace{2mm}\hspace{2.2cm}$+\{z, x, Dy\}$
$=[Dx, y, z]_C+[x, Dy, z]_C+[x, y, Dz]_c,$
\\therefore, $D\in Der(A_c)$. It follows  1).
By the similar discussion to the above, we get  2) and 3).
\end{proof}

\begin{theorem} Let $A$ be a semi-associative $3$-algebra. Then $L(A), R(A)\subseteq $ $Der(A_c)$.

\label{thm:43}
\end{theorem}

\begin{proof}  By \eqref{eq:21}-\eqref{eq:23}, \eqref{eq:32} and \eqref{eq:42}, for any $x, y, u, v, w\in A$,
\begin{align*}
 &L(x, y)[u, v, w]_c
 =L(x, y)(\{u, v, w\}+\{v, w, u\}+\{w, u, v\})\\
 =&\{x, y, \{u, v, w\}\}+\{x, y, \{v, w, u\}\}+\{x, y, \{w, u, v\}\}\\
 =&\{u, \{v, x, y\}, w\}+\{x, \{y, v, w\}, u\}+\{x, \{y, w, u\}, v\}\\
 =&\{w, \{v, x, y\}, u\}+\{u, \{w, x, y\}, v\}+\{x, \{y, v, w\}, u\}+\{x, \{y, w, u\}, v\}
 =0,
\end{align*}
\begin{align*}
 &[L(x, y)(u), v, w]_c+[u, L(x, y)(v), w]_c+[u, v, L(x, y)(w)]_c\\
 =&\{\{x, y, u\}, v, w\}+\{v, w, \{x, y, u\}\}+\{w, \{x, y, u\}, v\}\\
 +&\{u, \{x, y, v\}, w\}+\{\{x, y, v\}, w, u\}+\{w, u, \{x, y, v\}\}\\
 +&\{u, v, \{x, y, w\}\}+\{v, \{x, y, w\}, u\}+\{\{x, y, w\}, u, v\}\\
 =&3\{w, \{v, x, y\}, u\}+3\{u, \{w, x, y\}, v\}+3\{x, \{y, v, w\}, u\}+3\{x, \{y, w, u\}, v\} =0.
\end{align*}
Therefore, $L(x, y)[u, v, w]_c=[L(x, y)(u), v, w]_c+[u, L(x, y)(v), w]_c+[u, v, L(x, y)(w)]_c. $

By the similar discussion to the above, we have
$$R(x, y)[u, v, w]_c=[R(x, y)(u), v, w]_c+[u, R(x, y)(v), w]_c+[u, v, R(x, y)(w)]_c. $$
  The proof is complete.
\end{proof}

\subsection{Double modules  of the semi-associative 3-algebras}

In this section, we discuss double modules of semi-associative $3$-algebras.

 A representation (or a module)  $(V, \rho)$ of a $3$-Lie algebra $(G, [, ,])$ is a vector space $V$ and  a linear transformation $\rho :$ $G\wedge G\longrightarrow End(V)$,
 satisfying, $\forall x_1, x_2, x_3, x_4\in G$,
 \begin{equation}
[\rho(x_1, x_2), \rho(x_3, x_4)]=\rho([x_1, x_2, x_3], x_4)+\rho(x_3, [x_1, x_2, x_4]),
\label{eq:43}
\end{equation}
\begin{equation}
\rho([x_1, x_2, x_3], x_4)=\rho(x_1, x_2)\rho(x_3, x_4)+\rho(x_2, x_3)\rho(x_1, x_4)+\rho(x_3, x_1)\rho(x_2, x_4).
\label{eq:44}
\end{equation}

We know that $(V, \rho)$ is a 3-Lie algebra $(G, [ , , ])$-module if and only if $G\dot+ V$ is a 3-Lie algebra in the multiplication $[ , , ]_{\rho}$,
where $\forall x_1, x_2, x_3\in A$ and $v_1, v_2, v_3\in V,$
 \begin{equation}
[x_1+v_1, x_2+v_2, x_3+v_3]_{\rho}=[x_1, x_2, x_3]+\rho(x_1, x_2)v_3+\rho(x_2, x_3)v_1+\rho(x_3, x_1)v_2.
\label{eq:modulelie}
\end{equation}

\begin{defn} Let $A$ be a semi-associative 3-algebra, $V$ be a vector space, and $\phi,\psi$: $A\times A\longrightarrow End(V)$  be linear mappings. If $\phi$ and $\psi$ satisfy the following properties,  $\forall x_1, x_2, x_3, x_4\in A$,
\begin{equation}
\phi(x_1, x_2)=-\phi(x_2, x_1),
\label{eq:51}
\end{equation}
\begin{equation}
\phi(x_1, \{x_2, x_3, x_4\})=\phi(x_1, x_2)\phi (x_3, x_4),
\label{eq:52}
\end{equation}
\begin{equation}
\psi(\{x_1, x_2, x_3\}, x_4)=\psi(x_1, \{x_2, x_3, x_4\})=\psi(x_1, x_4)\psi(x_2, x_3),
\label{eq:53}
\end{equation}
\begin{equation}
\psi(x_1, x_2)\psi(x_3, x_4)=\psi(x_2, x_1)\phi(x_3, x_4)+\psi(x_1, x_3)\phi(x_2, x_4),
\label{eq:54}
\end{equation}
\begin{equation}
\psi(\{x_1, x_2, x_3\}, x_4)=\phi(x_4, \{x_1, x_2, x_3\})+\psi(\{x_4, x_2, x_3\}, x_1),
\label{eq:55}
\end{equation}
\begin{equation}
\psi(x_1, x_2)\psi(x_3, x_4)=\psi(x_1, x_2)\phi(x_3, x_4)=\phi(x_1, x_3)\psi(x_4, x_2)=-\phi(x_1, \{x_3, x_2, x_4\}),
\label{eq:56}
\end{equation}
\\
then $(\phi, \psi, V)$ is called a double representation of $A$, or is simply called a double module of $A$.
\label{defn:51}
\end{defn}

\begin{theorem}~Let $A$ be a semi-associative 3-algebra, and $l,r$: $A\times A\longrightarrow End(V)$  be linear mappings.
Then triple $(\phi, \psi, V)$ is a double module of $A$ if and only if $( A\dot+ V, \{ , , \}_{\phi\psi})$ is a
semi-associative 3-algebra, where $\forall x_i\in A, v_i\in V, i=1, 2, 3$,
 \begin{equation}
 \{x_1+v_1, x_2+v_2, x_3+v_3\}_{\phi\psi}=\{x_1, x_2, x_3\}+\phi(x_1, x_2)v_3-\psi(x_1, x_3)v_2+\psi(x_2, x_3)v_1.
 \label{eq:57}
\end{equation}

\label{thm:51}
\end{theorem}

\begin{proof}  If  $(\phi, \psi, V)$ is a double  mode of the semi-associative algebra $A$, we will prove that $(A\dot+V, \{ , , \}_{\phi\psi})$ is  a semi-associative 3-algebra.

Thanks to \eqref{eq:57},  for all $x_i\in A, v_i\in V, 1\leq i\leq 5$,

$\{x_1+v_1, x_2+v_2, x_3+v_3\}_{\phi\psi}=-\{x_2+v_2, x_1+v_1, x_3+v_3\}_{\phi\psi}$, \eqref{eq:21} holds.

By \eqref{eq:57}, \eqref{eq:52}, \eqref{eq:53} and \eqref{eq:56},

$\{x_1+v_1, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_5+v_5\}_{\phi\psi}$

\vspace{1mm}\noindent
$=\{x_1, x_2, \{x_3, x_4, x_5\})+\psi(x_2, \{x_3, x_4, x_5\})v_1-\psi(x_1, \{x_3, x_4, x_5\})v_2$

\vspace{1mm}
$+\phi(x_1, x_2)\psi(x_4, x_5)v_3-\phi(x_1, x_2)\psi(x_3, x_5)v_4+\phi(x_1, x_2)\phi(x_3, x_4)v_5$

\vspace{1mm}\noindent
$=\{x_1+v_1, x_2+v_2, \{x_3+v_3, x_4+v_4, x_5+v_5\}_{\phi\psi}\}_{\phi\psi}$,
\eqref{eq:22} holds.

Thanks to \eqref{eq:57}, \eqref{eq:53}- \eqref{eq:55},

$\{x_1+v_1, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_5+v_5\}_{\phi\psi}$

\vspace{1mm}\noindent
$=\{x_5, \{x_2, x_3, x_4\}, x_1\}+\{x_1, \{x_5, x_3, x_4\}, x_2\}+(\phi(x_5, \{x_2, x_3, x_4\})$

\vspace{1mm} $+\psi(\{x_5, x_3, x_4\}, x_2))v_1+(\phi(x_1, \{x_5, x_3, x_4\})-\psi(x_5, x_1)\psi(x_3, x_4))v_2$

\vspace{1mm}
   $+(\psi(x_5, x_1)\psi(x_2, x_4)+\psi(x_1, x_2)\psi(x_5, x_4))v_3-(\psi(x_5, x_1)\phi(x_2, x_3)$

   \vspace{1mm}
$+\psi(x_1, x_2)\phi(x_5, x_3))v_4+(\psi(\{x_2, x_3, x_4\}, x_1)-\psi(x_1, x_2)\psi(x_3, x_4))v_5$

\vspace{1mm}\noindent
$=\{x_5+v_5, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_1+v_1\}\}_{\phi\psi}$

\vspace{1mm}
$+\{x_1+v_1, \{x_5+v_5, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_2+v_2\}_{\phi\psi}$,
 \eqref{eq:23} holds.

 Therefore, $(A\dot+V, \{, , \}_{\phi\psi})$ is  a semi-associative 3-algebra.

Conversely, if $(A\dot+V, \{, , \}_{\phi\psi})$ is a semi-associative algebra. Then  by  \eqref{eq:21},  $\forall x_i\in A, v_i\in V$, $1\leq i\leq 3$,
$$\{x_1+v_1, x_2+v_2, x_3+v_3\}_{\phi\psi}=-\{x_2+v_2, x_1+v_1, x_3+v_3\}_{\phi\psi}.$$
Thanks to \eqref{eq:57},

$\{x_1, x_2, x_3+v_3\}_{\phi\psi}=\{x_1, x_2, x_3\}+\phi(x_1, x_2)v_3$,
$\{x_2, x_1, x_3+v_3\}=\{x_2, x_1, x_3\}+\phi(x_2, x_1)v_3$, \\
  therefore, $\phi(x_1, x_2)=-\phi(x_2, x_1) $,  \eqref{eq:51} holds.

By \eqref{eq:22}, and  \eqref{eq:57},

$\{x_1+v_1, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_5+v_5\}_{\phi\psi}$

\vspace{1mm}\noindent$=\{x_1+v_1, x_2+v_2, \{x_3+v_3, x_4+v_4, x_5+v_5\}_{\phi\psi}\}_{\phi\psi}$,

\vspace{2mm}$\{x_1+v_1, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_5+v_5\}_{\phi\psi}$

\vspace{1mm}\noindent $=\{x_1, \{x_2, x_3, x_4\}, x_5\}+\psi(\{x_2, x_3, x_4\}, x_5)v_1-\psi(x_1, x_5)\psi(x_3, x_4)v_2$

\vspace{1mm}
$+\psi(x_1, x_5)\psi(x_2, x_4)v_3-\psi(x_1, x_5)\phi(x_2, x_3)v_4+\phi(x_1, \{x_2, x_3, x_4\})v_5$,

\vspace{2mm}$\{x_1+v_1, x_2+v_2, \{x_3+v_3, x_4+v_4, x_5+v_5\}_{\phi\psi}\}_{\phi\psi}$

\vspace{1mm}\noindent
$=\{x_1, x_2, \{x_3, x_4, x_5\}\}+\psi(x_2, \{x_3, x_4, x_5\})v_1-\psi(x_1, \{x_3, x_4, x_5\})v_2$

\vspace{1mm}
$+\phi(x_1, x_2)\psi(x_4, x_5)v_3-\phi(x_1, x_2)\psi(x_3, x_5)v_4+\phi(x_1, x_2)\phi(x_3, x_4)v_5$.

\vspace{1mm}\noindent \
 If we suppose  $v_i\neq 0, v_j=0$, for  $1\leq i\neq j\leq 5$, then we get
\begin{equation}
\psi(\{x_2, x_3, x_4\}, x_5)=\psi(x_2, \{x_3, x_4, x_5\}),
\label{eq:58}
\end{equation}
\begin{equation}
\phi(x_1, \{x_2, x_3, x_4\})=\phi(x_1, x_2)\phi(x_3, x_4),
\label{eq:59}
\end{equation}
\begin{equation}
\psi(x_1, x_5)\psi(x_3, x_4)=\psi(x_1, \{x_3, x_4, x_5\}),
\label{eq:60}
\end{equation}
\begin{equation}
\psi(x_1, x_5)\psi(x_2, x_4)=\phi(x_1, x_2)\psi(x_4, x_5),
\label{eq:61}
\end{equation}
\begin{equation}
\psi(x_1, x_5)\phi(x_2, x_3)=\phi(x_1, x_2)\psi(x_3, x_5).
\label{eq:62}
\end{equation}

Thanks to \eqref{eq:23}, and \eqref{eq:57},

$\{x_5+v_5, \{x_2+v_2, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_1+v_1\}_{\phi\psi}+\{x_1+v_1, \{x_5+v_5, x_3+v_3, x_4+v_4\}_{\phi\psi}, x_2+v_2\}_{\phi\psi}$

\vspace{1mm}\noindent$=\{x_5, \{x_2, x_3, x_4\}, x_1\}+\{x_1, \{x_5, x_3, x_4\}, x_2\}+(\phi(x_5, \{x_2, x_3, x_4\})$$+\psi(\{x_5, x_3, x_4\}, x_2))v_1$

\vspace{1mm}$+(\phi(x_1, \{x_5, x_3, x_4\})-\psi(x_5, x_1)\psi(x_3, x_4))v_2$$+(\psi(x_5, x_1)\psi(x_2, x_4)+\psi(x_1, x_2)\psi(x_5, x_4))v_3$

\vspace{1mm}$-(\psi(x_5, x_1)\phi(x_2, x_3)$$+\psi(x_1, x_2)\phi(x_5, x_3))v_4+(\psi(\{x_2, x_3, x_4\}, x_1)-\psi(x_1, x_2)\psi(x_3, x_4))v_5$, \\
similarly, for $v_i\neq 0, v_j=0$, for $1\leq i\neq j\leq 5$, we have
\begin{equation}
\psi(x_1, x_5)\psi(x_2, x_4)=\psi(x_5, x_1)\psi(x_2, x_4)+\psi(x_1, x_2)\psi(x_5, x_4),
\label{eq:63}
\end{equation}
\begin{equation}
\psi(x_1, x_5)\phi(x_2, x_3)=\psi(x_5, x_1)\phi(x_2, x_3)+\psi(x_1, x_2)\phi(x_5, x_3),
\label{eq:64}
\end{equation}
\begin{equation}
\psi(x_1, x_5)\psi(x_3, x_4)=\psi(x_5, x_1)\psi(x_3, x_4)-\phi(x_1, \{x_5, x_3, x_4\}),
\label{eq:65}
\end{equation}
\begin{equation}
\psi(\{x_2, x_3, x_4\}, x_5)=\phi(x_5, \{x_2, x_3, x_4\})+\psi(\{x_5, x_3, x_4\}, x_2),
\label{eq:66}
\end{equation}
\begin{equation}
\phi(x_1, \{x_2, x_3, x_4\})=\psi(\{x_2, x_3, x_4\}, x_1)-\psi(x_1, x_2)\psi(x_3, x_4).
\label{eq:67}
\end{equation}

Now we analyze the above identities.  \eqref{eq:52} follows  from \eqref{eq:59}; \eqref{eq:55} follows  from \eqref{eq:66}; and it is clear that \eqref{eq:63} is equivalent to \eqref{eq:61}, \eqref{eq:62} and \eqref{eq:64}; and \eqref{eq:67} is equivalent to \eqref{eq:58}, \eqref{eq:60} and \eqref{eq:66}; \eqref{eq:53} follows from  \eqref{eq:58} and \eqref{eq:59};   \eqref{eq:54} follows from \eqref{eq:61}, \eqref{eq:62} and \eqref{eq:64}; and \eqref{eq:56} follows from  \eqref{eq:61}, \eqref{eq:62}, \eqref{eq:64} and \eqref{eq:65}.
Therefore, $(l, r, V)$ is a double  mode of the semi-associative algebra $A$.
The proof is complete.
\end{proof}

Let $\tau :$ $V\otimes V \rightarrow V\otimes  V $ be the exchange mapping, that is,
$$\tau(x_1, x_2)=(x_2, x_1), \forall x_1, x_2\in V. $$

\begin{theorem}~Let $A$ be a semi-associative $3$-algebra,  and $(l, r, V)$ be the double module of $A$. Then $(V, \rho)$ is a 3-Lie algebra $A_c$-module, where
$$\rho: A_c\wedge A_c \rightarrow A_c, \quad \rho=\phi-\psi\tau+\psi.$$
\label{thm:51c}
\end{theorem}

\begin{proof}
 Thanks to Theorem \ref{thm:51},  $A\dot+ V$ is a semi-associative $3$-algebra in the multiplication \eqref{eq:57}.
Therefore, the multiplication of  the subjacent 3-Lie algebra $(A\dot+ V)_c$ of $A\dot+ V$ is  \eqref{eq:42}, that is, $\forall x_1, x_2, x_3 \in A,$ $ v_1, v_2, v_3\in V$,

$[x_1+v_1, x_2+v_2, x_3+v_3]_c$

 \vspace{1mm}\noindent
 $=\{x_1+v_1, x_2+v_2, x_3+v_3\}_{\phi\psi}+\{x_2+v_2, x_3+v_3, x_1+v_1\}_{\phi\psi}+\{x_3+v_3, x_1+v_1, x_2+v_2\}_{\phi\psi}$

 \vspace{1mm}\noindent
 $=\{x_1, x_2, x_3\}+\phi(x_1, x_2)v_3-\psi(x_1, x_3)v_2+\psi(x_2, x_3)v_1+\{x_2, x_3, x_1\}+\psi(x_2, x_3)v_1$

 \vspace{1mm}\noindent
 $-\psi(x_2, x_1)v_3+\psi(x_3, x_1)v_2+\{x_3, x_1, x_2\}+\phi(x_3, x_1)v_2-\psi(x_3, x_2)v_1+\psi(x_1, x_2)v_3$

 \vspace{1mm}\noindent
 $=[x_1, x_2, x_3]_c+(\phi-\psi\tau+\psi)(x_1, x_2)v_3+(\phi-\psi\tau+\psi)(x_2, x_3)v_1+(\phi-\psi\tau+\psi)(x_3, x_1)v_2. $

 Follows from \eqref{eq:modulelie}, $(V, \rho)$ is a  3-Lie algebra $A_c$, where  $\rho=\phi-\psi\tau+\psi$.
\end{proof}

\begin{theorem}
Let $A$ be a semi-associative 3-algebra, and  $L(x, y), R(x, y):A\times A \rightarrow A$ be left and right multiplications defined as  \eqref{eq:32},  $ \forall x, y\in A$. Then $(L, R, A)$ is a double module of $A$.
\label{thm:52}
\end{theorem}

\begin{proof} Apply Lemma \ref{lem:31}, Theorem \ref{thm:51} and Definition \ref{defn:51}.\end{proof}

The  double module  $(L, R, A)$ of the semi-associative 3-algebra $A$ is called {\it the regular representation of $A$}, or {\it the adjoint module of $A$.}

\begin{theorem} Let $A$ be a semi-associative 3-algebra, and  $(l, r, V)$ be  a double module of  $A$.
Then  $(\phi^{*}, \psi^{*}, V^{*})$ is also a double module of $A$,
where $V^*$ is the dual space of $V$, and $\phi^*, \psi^* : A\times A\longrightarrow End(V^*)$ are defined by
$\forall x, y\in A, v\in V, \xi\in V^*$,
\begin{equation}
\langle \phi^*(x, y)(\xi), v\rangle=-\langle \xi, \phi(x, y)(v)\rangle, ~~ \langle \psi^{*}(x, y)(\xi), v\rangle=-\langle \xi, \psi(x, y)(v)\rangle.
\label{eq:68}
\end{equation}
\label{thm:53}
\end{theorem}

\begin{proof} Apply Lemma \ref{lem:31}, Definition \ref{defn:51} and Theorem \ref{thm:51}.\end{proof}

\begin{coro}
Let $A$ be a semi-associative 3-algebra. Then $(L^*, R^*, A^*)$ is a double module of $A$.
\label{coro:51}
\end{coro}

\begin{proof}
The result follows from Theorem \ref{thm:52} and Theorem \ref{thm:53}, directly.

\end{proof}

\subsection{Double extensions of  semi-associative 3-algebras by cocycles}

\begin{defn} Let  $A$ be a semi-associative 3-algebra, if linear mapping $\theta : A\otimes A\otimes A \rightarrow A^{*}$ satisfies that for all $x, y, z, w, u\in A$,
  \begin{equation}
\theta\{x, y, z\}=-\theta\{y, x, z\},
\label{eq:69}
\end{equation}
\begin{equation}
\theta\{x, \{y, z, w\}, u\}=\theta\{x, y, \{z, w, u\}\},
\label{eq:70}
\end{equation}
\begin{equation}
L^{*}(x, y)\theta\{z, w, u\}=-R^{*}(x, u)\theta\{y, z, w\},
\label{eq:71}
\end{equation}
\begin{equation}
\theta\{x, \{y, z, w\}, u\}-\theta\{u, \{y, z, w\}, x\}
\label{eq:72}
\end{equation}

\hspace{3.7cm}$=\theta\{x, \{u, z, w\}, y\}+R^{*}(x, u)\theta\{y, z, w\}$

\hspace{3.7cm}$-R^{*}(u, x)\theta\{y, z, w\}-R^{*}(x, y)\theta\{u, z, w\}$,
\\then $\theta$ is called a cocycle of  the semi-associative 3-algebra $A$, where $L^*, R^*$ are defined by \eqref{eq:68}.
\label{defn:52}
\end{defn}

\begin{theorem} Let  $A$ be a semi-associative 3-algebra, and  $\theta : A\otimes A\otimes A \rightarrow A^{*}$ be  a  cocycle of $A$. Then  $( A\dot+ A^{*}, \{, , \}_{\theta})$ is a semi-associative 3-algebra, where  $\forall  x_i\in A, \xi_i\in A^*, 1\leq i\leq 3,$

\begin{equation} \{x_1+\xi_1, x_2+\xi_2, x_3+\xi_3\}_{\theta}
=\{x_1, x_2, x_3\}+\theta\{x_1, x_2, x_3\}+L^{*}(x_1, x_2)\xi_3
\label{eq:73}
\end{equation}
\hspace{7.2cm}$-R^{*}(x_1, x_3)\xi_2+R^{*}(x_2, x_3)\xi_1. $
\label{thm:54}
\end{theorem}

\begin{proof} Thanks to \eqref{eq:51} - \eqref{eq:56}, $\forall  x_i\in A, \xi_i\in A^*, 1\leq i\leq 3,$

$\{x_1+\xi_1, x_2+\xi_2, x_3+\xi_3\}_{\theta}$$=-\{x_2+\xi_2, x_1+\xi_1, x_3+\xi_3\}_{\theta}$,  \eqref{eq:21} holds.

By Definition \ref{defn:52},

\vspace{2mm}$\{x_1+\xi_1, \{x_2+h_2, x_3+h_3, x_4+\xi_4\}_{\theta}, x_5+\xi_5\}_{\theta}$

\vspace{1mm}\noindent
$=\{x_1, x_2, \{x_3, x_4, x_5\}\}+\theta\{x_1, x_2, \{x_3, x_4, x_5\}\}+L^{*}(x_1, x_2)L^{*}(x_3, x_4)\xi_5$

\vspace{1mm}$+L^{*}(x_1, x_2)\theta\{x_3, x_4, x_5\}-L^{*}(x_1, x_2)R^{*}(x_3, x_5)\xi_4+L^{*}(x_1, x_2)R^{*}(x_4, x_5)\xi_3$

\vspace{1mm}$-R^{*}(x_1, \{x_3, x_4, x_5\})\xi_2+R^{*}(x_2, \{x_3, x_4, x_5\})\xi_1$

\vspace{1mm}\noindent$=\{x_1+\xi_1, x_2+\xi_2, \{x_3+\xi_3, x_4+\xi_4, x_5+\xi_5\}_{\theta}\}_{\theta}$,  \eqref{eq:22} holds.

Thanks to Theorem \ref{thm:53},

\vspace{2mm}$\{x_1, \{x_2, x_3, x_4\}, x_5\}+\theta\{x_1, \{x_2, x_3, x_4\}, x_5\}+L^{*}(x_1, \{x_2, x_3, x_4\})\xi_5$

\vspace{1mm}$-R^{*}(x_1, x_5)\theta\{x_2, x_3, x_4\}-R^{*}(x_1, x_5)L^{*}(x_2, x_3)\xi_4+R^{*}(x_1, x_5)R^{*}(x_2, x_4)\xi_3$

\vspace{1mm}$-R^{*}(x_1, x_5)R^{*}(x_3, x_4)\xi_2+R^{*}(\{x_2, x_3, x_4\}, x_5)\xi_1$

\vspace{1mm}\noindent$=\{x_5+\xi_5, \{x_2+\xi_2, x_3+\xi_3, x_4+\xi_4\}_{\theta}, x_1+\xi_1\}_{\theta}+\{x_1+\xi_1, \{x_5+\xi_5, x_3+\xi_3, x_4+\xi_4\}_{\theta}, x_2+\xi_2\}_{\theta}$,
\\
we get

\vspace{1mm}\noindent $\{x_1+\xi_1, \{x_2+\xi_2, x_3+\xi_3, x_4+\xi_4\}_{\theta}, x_5+\xi_5\}_{\theta}$

\vspace{1mm}\noindent$=\{x_5+\xi_5, \{x_2+\xi_2, x_3+\xi_3, x_4+\xi_4\}_{\theta}, x_1+\xi_1\}_{\theta}+\{x_1+\xi_1, \{x_5+\xi_5, x_3+\xi_3, x_4+\xi_4\}_{\theta}, x_2+\xi_2\}_{\theta}$,   that is, \eqref{eq:23} holds.
Therefore, $(A\dot+ A^{*}, \{ , , \}_{\theta})$ is a semi-associative 3-algebra.
\end{proof}

The  semi-associative 3-algebra $( A\dot+ A^{*}, \{, , \}_{\theta})$  is called {\it  a double extension of $3$-semi-associative algebra} by $\theta$.