  Taking a discrete approach to functions and dynamical systems, this paper
integrates the combinatorial gradients in Forman's discrete Morse theory with
persistent homology to forge a unified approach to function simplification. The
two crucial ingredients in this effort are the Lefschetz complex, which focuses
on the homology at the expense of the geometry of the cells, and the shallow
pairs, which are birth-death pairs that can double as vectors in discrete Morse
theory. The main new concept is the depth poset on the birth-death pairs, which
captures all simplifications achieved through canceling shallow pairs. One of
its linear extensions is the ordering by persistence.
