If we call $\mathscr{H}$ a one-half set of reduced residues (mod $p$), $p$ is a prime, if $\mathscr{H}$ has the property that:
$h \in \mathscr{H}$ if and only if $-h \notin \mathscr{H}$
Let $\mathscr{H}$ and $\mathscr{K}$ be two complementary one-half sets. They form the reduced residue system modulo $p$.
There are some propositions about $\mathscr{H}$ and $\mathscr{K}$:
if $(a, p) = 1$. Let $\nu$ be the number of $h \in \mathscr{H}$ for which $ah \notin \mathscr{H}$. That is $h \in \mathscr{H}$ but $ah \in \mathscr{K}$.
Then we can get: \begin{split} (-1)^{\nu} = \left(\frac{a}{p}\right) \end{split} $\left(\frac{a}{p}\right)$ is the Legendre symbol
$(a, p) = 1$, $a \mathscr{H}$ and $a\mathscr{K}$ are complementary one-half sets.
That is $a \mathscr{H}$ and $a\mathscr{K}$ are disjoint and form the reduced residue system modulo $p$.
I wonder how to get the following equation:
\begin{split} \left(\frac{a}{p}\right) = \prod_{h\in\mathscr{H}}^{}\frac{\sin(2\pi ah/p)}{\sin(2\pi h/p)} \end{split} for any integer $a$ and odd prime $p$.
Here are the hints:
Notice that $a\mathscr{H} = (a\mathscr{H} \cap \mathscr{H}) \cup(a\mathscr{H} \cap \mathscr{K})$.
Consider the product of elements in $\mathscr{H}$ and $(\mathscr{H} \cap a\mathscr{H}) \cup(\mathscr{H} \cap a\mathscr{K})$ respectively, and they are equal.