Consider a finite-rank free $Z$-module $Y$. Let $c: Y \times Y \rightarrow Z$ be a $Z$-bilinear form. Assume that $c(y_1, y_2) + c(y_2, y_1)$ is even, for all $y_1, y_2 \in $. Then $c$ "incarnates" an extension of $Z$-modules: $$0 \rightarrow \mu_2 \rightarrow \hat Y \rightarrow Y \rightarrow 0,$$ with a distinguished section. Here $\mu_2 = \{ \pm 1 \}$, and $\hat Y = Y \oplus \mu_2$ as a set; define addition in this set by $$(y_1, \epsilon_1) + (y_2, \epsilon_2) = \left( y_1 + y_2, \epsilon_1 \epsilon_2 \cdot (-1)^{c(y_1, y_2)} \right).$$

First question: Does $\hat Y$ have a name in the literature? I know it's a special case of the construction of extensions by cocycles, etc., but maybe it has its own name? Do such abelian extensions arise naturally? For example, if $T$ is the topological torus $(Y \otimes R) / Y$ with fundamental group $Y$, is there a natural manifold with fundamental group $\hat Y$ that occurs in the literature?

Now, many algebraists would dismiss these extensions, because they are "trivial". All extensions of $Y$ split, since $Y$ is a free Z-module. But the extension $\hat Y$ does not split *canonically*.

What interests me most is the "change-of-basis" formula for splittings. Namely, consider a (ordered) basis $(y_1, \ldots, y_r)$ of $Y$. This gives a splitting $\phi$, using the section above: define $$\phi \left( a_1 y_1 + \cdots + a_r y_r \right) = a_1 \hat y_1 + \cdots + a_r \hat y_r.$$

Now consider another $Z$-basis $(y_1', \ldots, y_r')$ with change of basis matrix $A = (\alpha_i^k)$: $$y_i = \sum_k \alpha_i^k y_k'.$$ This gives another splitting $\phi': Y \rightarrow \hat Y$: $$\phi' \left( a_1 y_1' + \cdots + a_r y_r' \right) = a_1 \widehat{y_1'} + \cdots + a_r \widehat{y_r'}.$$

As any two splittings differ by an element of $Hom(Y, \mu_2)$, so $\phi'(y) - \phi(y) \in \mu_2$ for all $y \in Y$. This difference is given on basis elements by the formula $$\phi'(y_i) - \phi(y_i) = (-1)^{E_i},$$ $$E_i = \sum_k \left( {\alpha_i^k} \atop 2 \right) c(y_k', y_k') + \sum_{1 \leq m < n \leq r} \alpha_i^m \alpha_i^n c(y_m', y_n').$$

Second, most important, question: Has anyone seen a formula like this before in other contexts? It involves nothing more than a invertible matrix $A \in GL(Y)$ and symmetric bilinear form $C \in Hom(Y \otimes Y, Z / 2 Z)$. So what else does this linear algebraic quantity $E_i$ capture? Where else does $(-1)^{E_i}$ occur in the wild?