Suppose we have a square $[-\frac{L}{2},\frac{L}{2}]^{N}$ on $\mathbb{R}^{N}$ for some $L>1$ and take $S$ to be a finite and discrete set. Here I will take $S = \{-1,1\}$. Consider the space $L^{2}\big{(}\big{(}[-\frac{L}{2},\frac{L}{2}]^{N}\times S\big{)}^{n}\big{)}$ with inner product given by: $$\langle f,g\rangle = \sum_{s_{1},...,s_{n}\in S}\int dx_{1}\cdots dx_{n} \overline{f(x_{1},s_{1}...,x_{n},s_{n})}g(x_{1},s_{1},...,x_{n},s_{n})$$ This can be shown to be a Hilbert space.
Question: How to define Fourier transforms on this space? Since $\big{(}[-\frac{L}{2},\frac{L}{2}]^{N}\times S\big{)}^{n} \cong \big{(}[-\frac{L}{2},\frac{L}{2}]^{nN}\times S^{n}\big{)}$, it seems natural to me to define on $[-\frac{L}{2},\frac{L}{2}]^{nN}$ an inner product: $$\langle x, y \rangle = \sum_{i=1}^{n}\langle x_{i},y_{i}\rangle$$ where each $x_{i},y_{i} \in [-\frac{L}{2},\frac{L}{2}]^{N}$. Then, it seems that the appropriate Fourier transform would be: $$\hat{f}(p_{1},s_{1},...,p_{n},s_{n}) = \int dx_{1}\cdots dx_{n}f(x_{1},s_{1},...,x_{n},s_{n})e^{-i\langle x_{1},p_{1}\rangle}\cdots e^{-i\langle x_{n},p_{n}\rangle}.$$
Does this make sense? I mean, Fourier transforming just the $x$-variables and ignoring the $s$-variables? What makes a Fourier transform to be...a Fourier transform, when there are more variables which do not transform as usual?
Let $M=Nn$, you consider the set of functions $f: [-L/2,L/2]^M\times \{0,1\}^n\to \Bbb{C}$ with inner product $$(f,g)=\sum_{s\in \{0,1\}^n} \int_{[-L/2,L/2]^M} f(x,s)\overline{g(x,s)} dx$$ where $dx=dx_1\ldots dx_M$.
Its Fourier transform is
$$\hat{f}(p,u) = \sum_{s\in S^n} (-1)^{\sum_n s_n u_n} \int_{[-L/2,L/2]^M} f(x,s) e^{-2i\pi \sum_{m\le M} x_m p_m}$$ where $p_m\in L\Bbb{Z}$ and $u\in \{0,1\}^n$.
The inverse is $$f(x,s) = \frac1R\sum_{s\in S^n} (-1)^{\sum_n s_n u_n}\sum_{p\in (L\Bbb{Z})^M} \hat{f}(p,u) e^{2i\pi\sum_{m\le M} p_m x_m}$$ where $R=2^n L^M$.