  We perform a rigorous piecewise-flat discretization of classical general
relativity in the first-order formulation, in both 2+1 and 3+1 dimensions,
carefully keeping track of curvature and torsion via holonomies. We show that
the resulting phase space is precisely that of spin networks, the quantum
states of discrete spacetime in loop quantum gravity, with additional degrees
of freedom called edge modes, which control the gluing between cells. This work
establishes, for the first time, a rigorous proof of the equivalence between
spin networks and piecewise-flat geometries with curvature and torsion degrees
of freedom. In addition, it demonstrates that careful consideration of edge
modes is crucial both for the purpose of this proof and for future work in the
field of loop quantum gravity. It also shows that spin networks have a dual
description related to teleparallel gravity, where gravity is encoded in
torsion instead of curvature degrees of freedom. Finally, it sets the stage for
collaboration between the loop quantum gravity community and theoretical
physicists working on edge modes from other perspectives, such as quantum
electrodynamics, non-abelian gauge theories, and classical gravity.
