Principal ideal of a non-associative magma The definitions of a left, right, and two-sided ideal of an algebra do not involve associativity
(R.D. Schafer "An Introduction To Nonassociative Algebras").
The same we can say about the definitions of a left and right principal ideal of a semigroup.
However, the definition of a two-sided principal ideal of a semigroup involves the product $SaS$
which assumes associativity (https://en.wikipedia.org/wiki/Green%27s_relations).
Is it possible to extend the definition of a two-sided principal ideal to a non-associative magma?
Can we simply replace $SaS$ with $(Sa)S \cup S(aS)$ in the definition for a semigroup?
Are there definitions of principal ideals for non-associative rings, algebras, etc.?
 A: This is too long to post as comment and I appreciate if you correct any mistake. I'm assuming $I_A=Sa\cup aS \cup S(aS)\cup (Sa)S\cup\{a\}$.
Consider the magma $(S,.)$ with $S=\{i,a,b,c\}$ and with product given by the table:
$\begin{array}{c|c|c|c|}
 & i & a & b & c\\ \hline
i & a & c & i & a\\ \hline
a & a & a & a & a\\ \hline
b & a & a & a & a\\ \hline
c & a & a & a & b 
\end{array}
$
Then $aS=\{a\},Sa=\{a,c\},(Sa)S=\{a,b\},S(aS)=\{a,c\}$ so $I_a=\{a,b,c\}$ but $i=(ib)\in S.I_a$ and $i\notin I_a$. 
If $(S,.)$ is associative one always have $S((Sa)S)\subset (Sa)S=S(aS)\subset I_a$ and this construction fails. It's true that $S.I_a\subset I_a$ for non-associative magmas that satisfy $S=aS$ for every $a\in S$ but it may be too much to ask. However if every element $a\in S$ satisfies $S\setminus\{a\}=aS\cup Sa$ then $I_a$ satisfies $S.I_a\subset I_a$ even if the magma is not associative. To see this, note that an element $x\in S.I_a$ satisfying $x\notin I_a$ must be of the form $i((s_1a)s_2)$ or $i(s_1(as_2))$ for some $i,s_1,s_2\in S$, in both cases we have an element of S as the operation is closed, this implies $i((s_1a)s_2),i(s_1(as_2))\in aS\cup Sa \cup \{a\}\subset I_a$.
