Let $q$ be a prime power. I will use the notations of Keith Conrad's *[Carlitz extensions](http://www.math.uconn.edu/~kconrad/blurbs/gradnumthy/carlitz.pdf)* paper (but I'll work over $\mathbb{F}\_q$ rather than $\mathbb{F}\_p$).


The most general question I'm asking here is whether there is anything resembling the classical theory of quadratic residues (including results like quadratic reciprocity, supplementary laws, Gauss sums, Gauss' lemma etc.) in the context of Carlitz polynomials -- i. e., over $\mathbb{F}\_q\left[T\right]$ instead of $\mathbb Z$, with "squaring" replaced by application of $\left[N\right]$ for some fixed polynomial $N\in\mathbb{F}\_q\left[T\right]$. (This is in line with the usual idea that $\mathbb{F}\_q\left[T\right]$ is an analogue of $\mathbb Z$, and applying a Carlitz polynomial in the former ring is like taking a power in the latter.)


Of course, unlike $\mathbb Z$, where every prime apart from $2$ is $\equiv 1 \mod 2$, there is no irreducible $N\in\mathbb{F}\_q\left[T\right]$ such that all but finitely many monic irreducibles in $\mathbb{F}\_q\left[T\right]$ are $\equiv 1\mod N$. So there is no obvious analogue of squaring that would mirror the "the product of two nonsquare residues is a square residue" property. But there is still an irreducible in $\mathbb{F}\_q\left[T\right]$ which, in some sense, is simpler than the others: namely, $T$. Whenever $\pi\in\mathbb{F}\_q\left[T\right]$ is an irreducible such that $\pi\equiv 1\mod T$, the elements $u$ of $\mathbb{F}\_q\left[T\right] / \pi$ which can be written as $\left[T\right]\left(v\right)=v^q+Tv$ for $v\in\mathbb{F}\_q\left[T\right] / \pi$ form an $\mathbb{F}\_q\left[T\right]$-submodule of the Carlitz module $C\left(\mathbb{F}\_q\left[T\right] / \pi\right)$. They can be viewed as the elements annihilated by $\left[\dfrac{\pi-1}{T}\right]$.


My more concrete question is in how far they share properties with quadratic residues in $\mathbb Z$. I don't dare formulate any conjectures (lacking computational data and number-theoretical intuition), but one could ask how the property of a monic irreducible $\phi$ to be a "$T$-quadratic residue" modulo another $\psi$ correlates with the same in the other direction.


(Fun fact: From the cyclicity of the Carlitz module $C\left(\mathbb{F}\_q\left[T\right] / \pi\right)$, it follows immediately that if $\pi$ is a monic irreducible in $\mathbb{F}\_q\left[T\right]$ satisfying $\pi\equiv 1\mod T$, then $-T$ is a $p-1$-th power in $\mathbb{F}\_q\left[T\right]$. Of course, this also follows from Hilbert's theorem 90 or cyclicity of the group $\left(\mathbb{F}\_q\left[T\right] / \pi\right)^\times$.)


If $T$ is a bad (because not invariant under $\mathbb{F}\_q$-automorphisms or for whatever other reason) analogue of $2$, we might consider $T^q - T$ instead -- it doesn't appear like irreducibility is important here...



Are there Carlitz analogues of quadratic residues and reciprocity?
In the context of Carlitz polynomials, the analogue is the classical quadratic reciprocity law in ${\mathbf F}\_q[T]$ (for odd $q$, of course). For a monic irreducible $\pi$ in ${\mathbf F}\_q[T]$, and any $A$ in ${\mathbf F}\_q[T]$, let $(\frac{A}{\pi})$ be $1$ if $A \equiv \Box \bmod \pi$ and $A \not\equiv 0 \bmod \pi$, $-1$ if $A \not\equiv \Box \bmod \pi$, and $0$ if $A \equiv 0 \bmod \pi$. Then the main law of quadratic reciprocity in ${\mathbf F}\_q[T]$ is that for distinct monic irreducible $\pi$ and $\widetilde{\pi}$, 
$$
\left(\frac{\widetilde{\pi}}{\pi}\right) = (-1)^{({\rm N}\pi-1)/2 \cdot ({\rm N}\widetilde{\pi}-1)/2}\left(\frac{\pi}{\widetilde{\pi}}\right),
$$
where ${\rm N}(f) := |{\mathbf F}\_q[T]/(f)| = q^{\deg f}$. This is due to Dedekind, and can be found in Mike Rosen's *Number Theory in Function Fields* with a proof that is much simpler than quadratic reciprocity in $\mathbf Z$ and doesn't mention Carlitz polynomials at all. But it can be explained using Carlitz extensions of ${\mathbf F}\_q(T)$ in exactly the same way quadratic reciprocity in $\mathbf Z$ can be explained using cyclotomic extensions of ${\mathbf Q}$.


Let's recall first what is done in the case of the integers. For an odd prime $p$ the cyclotomic extension ${\mathbf Q}(\zeta\_p)$ has a cyclic Galois group over $\mathbf Q$ of order $p-1$ and thus it contains exactly one quadratic extension of $\mathbf Q$ (corresponding to the subgroup of squares in the Galois group). This quadratic extension is ${\mathbf Q}(\sqrt{p^\*})$, where $p^\* = (-1)^{(p-1)/2}p$. For any odd prime $q$ other than $p$, we will compute the Frobenius element $\text{Frob}\_q({\mathbf Q}(\sqrt{p^\*})/{\mathbf Q})$ in two ways. We will interpret $\text{Gal}({\mathbf Q}(\sqrt{p^\*})/{\mathbf Q})$ as $\{\pm 1\}$, which can be done in a unique way (all groups of order 2 are uniquely isomorphic to each other), so the Frobenius element is 1 or $-1$.


(1) By knowledge of how primes split in quadratic extensions of ${\mathbf Q}$, $q$ splits in ${\mathbf Q}(\sqrt{p^\*})$ iff $X^2 - p^\*$ splits mod $q$, so this Frobenius element is $(\frac{p^\*}{q})$.


(2) From the standard isomorphism of $\text{Gal}({\mathbf Q}(\zeta\_p)/{\mathbf Q})$ with $({\mathbf Z}/(p))^\times$, $\text{Frob}\_q({\mathbf Q}(\zeta\_p)/{\mathbf Q})$ is $q \bmod p$. The restriction of $\text{Frob}\_q({\mathbf Q}(\zeta\_p)/{\mathbf Q})$ to ${\mathbf Q}(\sqrt{p^\*})$ is $\text{Frob}\_q({\mathbf Q}(\sqrt{p^\*})/{\mathbf Q})$, and the image of $q \bmod p$ under the natural restriction map $\text{Gal}({\mathbf Q}(\zeta\_p)/{\mathbf Q}) \rightarrow \text{Gal}({\mathbf Q}(\sqrt{p^\*})/{\mathbf Q})$ is $(\frac{q}{p})$. Therefore $\text{Frob}\_q({\mathbf Q}(\sqrt{p^\*})/{\mathbf Q}) = (\frac{q}{p})$.


By (1) and (2), $(\frac{p^\*}{q}) = (\frac{q}{p})$, and this is the main law of quadratic reciprocity after we recall that $p^\* = (-1)^{(p-1)/2}p$ and use the supplementary law $(\frac{-1}{q}) = (-1)^{(q-1)/2}$.


Now let's turn to the Carlitz setting. Pick a monic irreducible $\pi$ in ${\mathbf F}\_q[T]$, where $q$ is odd. Let $\Lambda\_\pi$ be the set of roots of the Carlitz polynomial $[\pi](X)$. Set $K = {\mathbf F}\_q(T)$, so $K(\Lambda\_\pi)/K$ is a Galois extension with Galois group isomorphic to $({\mathbf F}\_q[T]/\pi)^\times$ by using the action of Carlitz polynomials on $\Lambda\_\pi$. Any monic irreducible $\widetilde \pi$ other than $\pi$ is unramified in $K(\Lambda\_\pi)$, and $\text{Frob}\_{\widetilde{\pi}}(K(\Lambda\_\pi)/K) = \widetilde{\pi} \bmod \pi$.`


Letting $d = \deg \pi$, the group $({\mathbf F}\_q[T]/\pi)^\times$ is cyclic of odd order $q^d-1$, so it has a unique subgroup of index 2 (the subgroup of squares). Therefore $K(\Lambda\_\pi)$ has a unique quadratic subextension of $K$ inside it. It turns out to be $K(\sqrt{\pi^\*})$, where $\pi^\* = (-1)^{({\rm N}\pi-1)/2}\pi$.` (EDIT: This is explained below.)


If you run through the above proof of quadratic reciprocity in $\mathbf Z$ using the analogous constructions in the Carlitz setting that I describe above, then you'll obtain $$\left(\frac{\pi^\*}{\widetilde{\pi}}\right) = \left(\frac{\widetilde{\pi}}{\pi}\right)$$ in exactly the same way that one obtains $(\frac{p^\*}{q}) = (\frac{q}{p})$, and the main law of quadratic reciprocity in ${\mathbf F}\_q[T]$ is an unraveling of this equation once you recall the definition of $\pi^\*$ and use the supplementary law $(\frac{-1}{\widetilde{\pi}}) = (-1)^{({\rm N}\widetilde{\pi}-1)/2}$.


EDIT: I wrote in passing above that $K(\Lambda\_\pi)$ contains a square root of $\pi^\* := (-1)^{({\rm N}\pi-1)/2}\pi$. This is analogous to ${\mathbf Q}(\zeta\_p)$ containing a square root of $p^\* = (-1)^{(p-1)/2}p$, but explaining the containment is one place where simple analogies between ${\mathbf Q}$ and ${\mathbf F}\_q(T)$ can break down. Classically there are several ways of showing $\sqrt{p^\*}$ lies in ${\mathbf Q}(\zeta\_p)$.


(1) Ramification. The unique quadratic field in ${\mathbf Q}(\zeta\_p)$ ramifies only at $p$, and there turns out to be just one quadratic extension of ${\mathbf Q}$ ramified only at $p$.


(2) Gauss sums. Define $G = \sum\_{a \bmod p} (\frac{a}{p})\zeta\_p^a$, which by construction lies in ${\mathbf Q}(\zeta\_p)$. Show $G^2 = p^\*$.


(3) Calculating a norm in a second way. Setting $X = 1$ in the identity $X^{p-1}+\cdots+X+1 = \prod\_{i=1}^{p-1}(X-\zeta\_p^i)$ gives us $p = \prod\_{i=1}^{p-1} (1 - \zeta\_p^i)$. This says $p = {\rm N}\_{{\mathbf Q}(\zeta\_p)/{\mathbf Q}}(1- \zeta\_p)$. The product of the terms at $i$ and $p-i$ in the product is $-1$ up to a square factor (because $\zeta\_p$ is a square of some $p$th root of unity). Therefore $p$ is $(-1)^{(p-1)/2}$ times a square in ${\mathbf Q}(\zeta\_p)$, so $(-1)^{(p-1)/2}p$ is a square in the $p$th cyclotomic field.


If we try to adapt these methods to find the unique quadratic extension of $K = {\mathbf F}\_q(T)$ inside $K(\Lambda\_\pi)$, the first two do *not* work directly.


(1) There is not just one quadratic extension of $K$ ramified only at $\pi$ among the "finite" places (those places other than the place associated to $1/T$). One choice is $K(\sqrt{\pi})$ and another is $K(\sqrt{c\pi})$ where $c$ is a nonsquare in ${\mathbf F}\_q^\times$. 


(2) If we define $G = \sum\_{A \bmod \pi} (\frac{A}{\pi})[A](\lambda)$ for any fixed choice of nonzero $\lambda$ in $\Lambda\_\pi$, then $G = 0$ if ${\rm N}(\pi) > 3$ (not if ${\rm N}(\pi) = 3$). To prove $G=0$ we exploit additivity of Carlitz polynomials: the coefficients $(\frac{A}{\pi})$ are $\pm 1$, so 
$$
\sum\_{A \bmod \pi} \left(\frac{A}{\pi}\right)[A](\lambda) = 
\left[\sum\_{A \bmod \pi}\left(\frac{A}{\pi}\right)A\right](\lambda), 
$$
and the polynomial inside the brackets on the right only matters mod $\pi$ since its Carlitz action is being applied to $\lambda$, a root of $[\pi](X)$. Therefore the vanishing of $G$ is the same as the vanishing of $\sum\_{A \bmod \pi} (\frac{A}{\pi})A \bmod \pi$, and Darij Grinberg gives a proof of that in his comments to this answer. (When ${\rm N}(\pi) = 3$ the sum $G$ is $2\lambda \not= 0$.)


The idea of the third method does carry over to the Carlitz setting. 


(3) Starting from the factorization $[\pi](X)/X = \prod\_{A \not\equiv 0 \bmod \pi} (X - [A](\lambda))$, set $X = 0$ (not $X = 1$: the roots of $[\pi](X)$ are more analogous to $1 - \zeta\_p^i$ instead of to the $p$th roots of unity themselves) and get $\pi = \prod\_{A \not\equiv 0 \bmod \pi} [A](\lambda)$. This says $\pi = {\rm N}\_{K(\Lambda\_\pi)/K}(\lambda)$.` The product of the terms at $A$ and $-A$ is $[A](\lambda)[-A](\lambda) = -[A](\lambda)^2$ because $[-A](X) = [-1]([A](X)) = -[A](X)$. Therefore up to a square factor in $K(\Lambda\_\pi)$, $\pi$ equals $(-1)^{({\rm N}\pi- 1)/2}$, so $(-1)^{({\rm N}\pi- 1)/2}\pi$ is a square in $K(\Lambda\_\pi)$. 


