TITLE: When does $P(a−b)=0$  for $a≠b$  ensure $P(0)=0$? (Continued.)
QUESTION [14 upvotes]: As a natural (and expectable) extension of my earlier question:

How large must be a set $A\subset F_2^n$ to ensure that if $P$ is a cubic polynomial in $n$ variables over the field $F_2$, vanishing at every non-zero point of the sumset $2A:=\{a_1+a_2\colon a_1,a_2\in A\}$, then also $P(0)=0$? 

(Here $n$ is a given positive integer, to be thought of as a growing parameter.)

Ultimately, I want to know how large must $A$ be for every given degree $\deg P$. Say, if $P$ has degree zero, then, trivially, $|A|\ge 2$ suffices. Furthermore, it is easy to see that for $P$ linear, one needs $|A|\ge 3$ (while $|A|\ge 2$ is insufficient). For $P$ quadratic, it suffices to have $|A|\ge n+3$. In the case where $P$ is cubic, at least $|A|>2n$ is needed: consider, for instance, the set 
  $$ A=\{0,e_1,...,e_n,e_1+e_2,...,e_1+e_n\}, $$ 
where $e_i$ are the vectors of the standard basis, and the polynomial 
  $$ P=\sum_{1<i<j\le n} x_1x_ix_j+\sum_{1\le i<j\le n} x_ix_j+\sum_{1\le i\le n} x_i+1. $$
Must $|A|$ actually be quadratic (or, perhaps, even exponential) in $n$? (If $|A|>2^{7n/8}$, then $A$ contains an affine $4$-dimensional subspace; hence $2A$ contains a linear $4$-dimensional subspace, and the rest follows with a minor effort.)

REPLY [5 votes]: Here is a small comment to Seva's answer, which allows to get smaller bounds for some fields.
Assume that we have two functions $f,g\in\mathbb F^A$ such that 
$$\sum_{a\in A} f(a)Q(a)=\sum_{a\in A} g(a)Q(a)=0  \tag{$\ast$} $$ 
for any polynomial $Q\in\mathbb F[x_1,\ldots,x_n]$ of degree $\deg Q\leqslant d$. Then 
$$
\sum_{a\in A,b\in A} f(a)g(b)Q(a,b)=0
$$ 
for any polynomial $Q$ of degree at most $2d+1$. (If $Q$ is a monomial, then our sum factorizes and one of factors is 0.)
Applying this with the polynomial $Q(x,y):=P(x-y)$, where $\deg P\leqslant 2d+1$ and $P(a,b)=0$ for $a,b\in A$, $a\ne b$, we get
$$
0=\sum_{a\in A,b\in A} f(a)g(b)P(a-b)=P(0)\cdot \sum_{a\in A} f(a)g(a).
$$
Now if $P(0)\ne 0$, then $\sum_{a\in A} f(a)g(a)=0$ for any two functions $f,g\in\mathbb F^A$ . Then functions $f,g$ satisfying ($\ast$). This condition determines a linear subspace of $\mathbb F^A$ of dimension at least $|A|-\binom{n+d}d$ (or $|A|-\sum_{i\leqslant d} \binom{n}i$, if we consider only multilinear polynomials). We have thus shown that if $P(0,0)\ne 0$, then this is an isotropic subspace (any two vectors are mutually orthogonal.) The maximal dimension of an isotropic subspace is well-studied. It cannot exceed $|A|/2$ by obvious reasons (such a space is contained in its own orthogonal complement). For real field there is no isotropic subspace even of dimension $1$. 
See the answer by Robin Chapman to my old question here for references on isotropic subspaces.