  By developing a connection between partial theta functions and Appell-Lerch
sums, we find and prove a formula which expresses Hecke-type double sums in
terms of Appell-Lerch sums and theta functions. Not only does our formula prove
classical Hecke-type double sum identities such as those found in work Kac and
Peterson on affine Lie Algebras and Hecke modular forms, but once we have the
Hecke-type forms for Ramanujan's mock theta functions our formula gives
straightforward proofs of many of the classical mock theta function identities.
In particular, we obtain a new proof of the mock theta conjectures. Our formula
also applies to positive-level string functions associated with admissable
representations of the affine Lie Algebra $A_1^{(1)}$ as introduced by Kac and
Wakimoto.
