The following is a toy version of something I've been fiddling with and I thought it might be more efficient to post it as a question here.


Just to fix definitions: for me, a complex-valued function $f$ on a group $G$ is said to be *positive-semi-definite* if, for every choice of points $x\_1, \dots, x\_n\in G$, the $n\times n$ matrix $[f(x\_i^{-1}x\_j)]\_{i,j=1}^n$ is PSD in the usual sense. Note that in this definition I do not assume $G$ is countable, nor do I assume $f$ is continuous.


**Question 1.** Let $f$ be a continuous PSD function on $\mathbb R$, and pick a finite subset $F\subset R$; then let $E=\{-x+y \mid x,y \in F\}$. Does there always exist a PSD function $h$ on $\mathbb R$, *with finite or countably infinite support*,such that $h\vert\_E = f\vert\_E$ ?


Obviously, if we knew that the ``truncation'' of $f$ to the set $E$ was itself a PSD function on $\mathbb R$, then the answer to Q1 would be positive. But I don't see why this truncated function would always be PSD.


**Question 2.** The analogue of Q1 with $\mathbb R$ replaced by $\mathbb R^d$ for $d\geq 2$.


My personal suspicion is that Q2 will have a negative answer but this is based on pessimism rather than any genuine intuition.



Restricting a continuous positive-semidefinite function to a finite subset
The answer for *countably infinite* has been given by fedja and Uri Bader in the comments and is yes: put $f$ to $0$ outside of the subgroup generated by $E$, and leave $f$ unchanged on this subgroup.


For *finite*, the answer is no. For an example, take $f=1$ and $E=\{-1,0,1\}$. Since the only PSD function of the form $\begin{pmatrix} 1 & 1 & a \\ 1&1&1\\ b &1 &1\end{pmatrix}$ is the matrix $\begin{pmatrix} 1 & 1 & 1 \\ 1&1&1\\ 1 &1 &1\end{pmatrix}$, we have that any positive-semidefinite function whose restriction to $E$ is $1$ has to be constant equal to $1$ on $\mathbf Z$.


