  As is well known to physicists, the axial anomaly of the massless free
fermion in Euclidean signature is given by the index of the corresponding Dirac
operator. We use the Batalin-Vilkovisky (BV) formalism and the methods of
equivariant quantization of Costello and Gwilliam to produce a new,
mathematical derivation of this result. Using these methods, we formalize two
conventional interpretations of the axial anomaly, the first as a violation of
current conservation at the quantum level and the second as the obstruction to
the existence of a well-defined fermionic partition function. Moreover, in the
formalism of Costello and Gwilliam, anomalies are measured by cohomology
classes in a certain obstruction-deformation complex. Our main result shows
that---in the case of the axial symmetry---the relevant complex is
quasi-isomorphic to the complex of de Rham forms of the spacetime manifold and
that the anomaly corresponds to a top-degree cohomology class which is trivial
if and only if the index of the corresponding Dirac operator is zero.
