We use techniques from functorial quantum field theory to provide a geometric
description of the parity anomaly in fermionic systems coupled to background
gauge and gravitational fields on odd-dimensional spacetimes. We give an
explicit construction of a geometric cobordism bicategory which incorporates
general background fields in a stack, and together with the theory of symmetric
monoidal bicategories we use it to provide the concrete forms of invertible
extended quantum field theories which capture anomalies in both the path
integral and Hamiltonian frameworks. Specialising this situation by using the
extension of the Atiyah-Patodi-Singer index theorem to manifolds with corners
due to Loya and Melrose, we obtain a new Hamiltonian perspective on the parity
anomaly. We compute explicitly the 2-cocycle of the projective representation
of the gauge symmetry on the quantum state space, which is defined in a
parity-symmetric way by suitably augmenting the standard chiral fermionic Fock
spaces with Lagrangian subspaces of zero modes of the Dirac Hamiltonian that
naturally appear in the index theorem. We describe the significance of our
constructions for the bulk-boundary correspondence in a large class of
time-reversal invariant gauge-gravity symmetry-protected topological phases of
quantum matter with gapless charged boundary fermions, including the standard
topological insulator in 3+1 dimensions.Comment: 63 pages, 3 figures; v2: clarifying comments and references added;
Final version to be published in Communications in Mathematical Physic