This question is inspired by this previous one. Generally speaking, I ask what algebraic identities are universally valid for the composition law on cubic surfaces (or hypersurfaces); since the law in question is not always defined, I have to state this a little more carefully.

Let $\Sigma := \{u_1,\ldots,u_r\}$ be a finite set which we view as a set of indeterminates. The **free magma** $F(\Sigma)$ on $\Sigma$ is the set of all expressions formed by combining the elements of $\Sigma$ with a binary operation $\circ$ with no relations at all (equivalently, the set of ordered binary trees whose nodes are labeled by the elements of $\Sigma$); for example, $u_1\circ(u_2\circ u_3)$ and $(u_1\circ u_2)\circ u_3$ are elements of $F(\Sigma)$. The notion of substituting a variable by an element of $F(\Sigma)$ inside another element of $F(\Sigma)$ is unproblematic.

Given a cubic hypersurface (over a field which we might as well assume algebraically closed) $X$ and points $x_1,\ldots,x_r$ on $X$, and given an element $w$ of $F(\Sigma)$, we can define $w(x_1,\ldots,x_r)$ by substituting $x_i$ for $u_i$ and interpreting $\circ$ as the (partial) composition law on $X$ (which takes two points $x,y$ on $X$ to the third intersection point of $X$ with the line through $x$ and $y$, provided both the line and point in question are uniquely defined). This is either a point on $X$ or undefined.

Say that $w\in F(\Sigma)$ is **universally undefined (for cubic hypersurfaces)** if $w(x_1,\ldots,x_r)$ is always undefined, whatever the hypersurface $X$ and whatever the points $x_1,\ldots,x_r$. For example, $u\circ u$ is universally undefined for cubic surfaces; as is any element of $F(\Sigma)$ containing a subexpression obtained by substituting anything for $u$ in $u\circ u$. (Generally speaking, if $w$ is universally undefined for cubic hypersurfaces, so is anything containing $w$ as a subexpression, or anything obtained by substituting subexpressions for the variables of $w$.)

If $w$ is not universally undefined for cubic hypersurfaces, then I believe $w(x_1,\ldots,x_r)$ is meaningful for general points $x_1,\ldots,x_r$ on a general hypersurface. (I hope I'm not missing a subtle point about irreducibility here.) It might even be true that it is then meaningful for general points $x_1,\ldots,x_r$ on *any* smooth (irreducible?) hypersurface $X$, I don't know.

If $w,w'$ are generally defined (i.e., not universally undefined), say that $w$ and $w'$ are **universally equal** (for cubic hypersurfaces) when $w(x_1,\ldots,x_r) = w'(x_1,\ldots,x_r)$, whatever the hypersurfaces $X$ and $X'$ and whatever the points $x_1,\ldots,x_r$, provided that both terms are defined (the previous paragraph implies that, if $w$ and $w'$ are *separately* generally defined, then they are *jointly* generally defined).

For example, $u\circ v$ and $v\circ u$ are universally equal. More interestingly, $u\circ (u\circ v)$ and $v$ are universally equal; also, $v\circ ((u\circ v')\circ(v\circ v'))$ and $v'\circ ((u\circ v)\circ(v\circ v'))$ are universally equal (this follows from the fact that the intersection of $X$ with a plane is a cubic curve on which the operation can be seen as $(x,y) \mapsto -x-y$ once a choice of origin makes it into an Abelian group; I had originally written an incorrect identity instead).

I might define the “universal cubic hypersurface partial magma” $K(\Sigma)$ (on $r$ variables $u_1,\ldots,u_r$) to be the set of elements $w \in F(\Sigma)$ which are not universally undefined on cubic hypersurfaces, modulo the equivalence relation of being universally equal on cubic hypersurfaces; this comes with a partial binary operation taking $w$ and $w'$ to the class of $w\circ w'$ provided the latter is defined. This operation $\circ$ is commutative.

**Question:** How can we decide, given an element $w\in F(\Sigma)$, whether it is universally undefined on cubic hypersurfaces, and given two elements $w,w'$, whether they are universally equal?

(The two questions are inextricably linked, since $w$ and $w'$ universally equal imply that $w\circ w'$ is universally undefined.)

Note: Rather than dealing with partially defined functions, it might be better to introduce a symbol $\bot$ for “undefined” and write, e.g., $u\circ u = \bot$ universally on cubic hypersurfaces. In this way, both $u\circ u = \bot$ and $u\circ v = v\circ u$ are universal identities on cubic hypersurfaces (=equalities in $K(\Sigma)$).

In particular, the question asks, can we deduce all universal identities from the ones I already listed above? (That is, is $K(\Sigma)$ “free” subject to the relations in question?)

**Bonus question:** Suppose we do the same for cubic surfaces instead of cubic hypersurfaces (evidently this can only produce more undefinedness and equality identities): is there, in fact, any identities which are universally valid on cubic surfaces and not on cubic hypersurfaces in general?

For all $w_1,w_2$ well-defined, either they are universally equal, or $w_1\circ w_2$ is well-defined."? (by "well-defined" I mean "not universally undefined", but I don't like double negations). In any case, it doesn't seem tautologically true, because $(w_1,w_2)$ might fall in a proper subvariety that is not the diagonal. $\endgroup$ – YCor Nov 24 '17 at 15:36