User:James in dc/sandbox/Quadratic Reciprocity

Let $$m=2m'+1>0.$$ Define $$I_m=\{1,2,..,m-1\}$$ and $$H_m=\{1,2,..,m'\}.$$ Both $$I_m$$ and $$I_m^\pm=H_m\cup -H_m=\{1,2,\dots,m',-m',\dots,-1\}$$ are representative sets for the nonzero residue classes in the ring $$\mathbb Z/m\mathbb Z.$$ Define $$a\perp m$$ to mean $$\gcd(a,m)=1.$$ $$ab\perp m$$ is equivalent to $$a\perp m$$ and $$b\perp m.$$ There is a copy of the multiplicative group $$(\mathbb{Z}/m\mathbb{Z})^\times$$ in the symmetric group $$S_{m-1}$$ For $$a\perp m$$ let $$\pi^a_m\in S_{m-1}$$ be the permutation caused by multiplication by $$a \bmod m.$$ In other words, $$\pi^a_m(x)\equiv ax \pmod m.$$ Note that $$\pi^{-a}_m(x)\equiv -\pi^{a}_m(x)\equiv-ax \pmod m.$$

Theorem (The image is an isomorphic copy) For $$ab\perp m$$ $$\pi^a_m\pi^b_m=\pi^{ab}_m$$

Theorem $$\pi^{-1}_m=(1,-1)(2,-2)\dots(m',-m')$$

Let $$\left[\tfrac{a}{m}\right]$$ denote the signature of the permutation $$\pi^a_m$$

$$\left[\tfrac{-1}{m}\right]=(-1)^{m'}=(-1)^{\tfrac{m-1}{2}}$$

Let $$x,y,z\dots\in H_m.$$ Then the transpositions in $$\pi^a_m$$ are of three types: $$(x,y),(-x,-y),$$ and $$(x,-y)$$. The first two kinds occur in pairs and have no effect on the signature of the permutation. The parity of the number of transpositions of the last kind determines the signature of $$\Pi^a_m.$$ The numbers that occur in these are the numbers in Gauss' Lemma.

$$\pi^2_3 =(1\;-1)$$

$$\pi^2_5=(1\;2\;-1\;-2)=(1\;2)(2\;-1\;-2)$$

$$\pi^2_7=(1 \;2 \;-3)(-1\; -2 \;3)$$

$$\pi^2_9=(1 \;2 \;4 \;-1 \;-2\; 4)(3\; -3)$$

$$\pi^2_{11}=(1 \;2 \;4 \;-3 \; 5 \;-1 \;-2 \; -4 \; 3 \; -5)$$

$$\pi^2_{13}=(1 \;2 \;4 \;-5 \;3\; 6 \;-1\; -2\; -4 \;5 \;-3 \;-6)$$

$$\pi^2_{15}=(1 \;2 \;4\; -7)(3\; 6\; -3\; -6)(5\; -5)(7 \;-1 \;-2\; -4)$$

$$\pi^2_{17}=(1\; 2\; 4\; 8\; -1\; -2 \;-4 \;-8)(3\; 6\; -5\; 7\; -3\; -6\; 5\; -7)$$

$$\pi^2_{19}=(1\; 2 \;4 \;8 \;-3\; -6\; 7\; -5\; 9\; -1\; -2\; -4\; -8\; 3\; 6\; -7\; 5 \;-9)$$