The study of the partition function in M-theory involves the use of index
theory on a twelve-dimensional bounding manifold. In eleven dimensions, viewed
as a boundary, this is given by secondary index invariants such as the
Atiyah-Patodi-Singer eta-invariant, the Chern-Simons invariant, or the Adams
e-invariant. If the eleven-dimensional manifold itself has a boundary, the
resulting ten-dimensional manifold can be viewed as a codimension two corner.
The partition function in this context has been studied by the author in
relation to index theory for manifolds with corners, essentially on the product
of two intervals. In this paper, we focus on the case of framed manifolds
(which are automatically Spin) and provide a formulation of the refined
partition function using a tertiary index invariant, namely the f-invariant
introduced by Laures within elliptic cohomology. We describe the context
globally, connecting the various spaces and theories around M-theory, and
providing a physical realization and interpretation of some ingredients
appearing in the constructions due to Bunke-Naumann and Bodecker. The
formulation leads to a natural interpretation of anomalies using corners and
uncovers some resulting constraints in the heterotic corner. The analysis for
type IIA leads to a physical identification of various components of eta-forms
appearing in the formula for the phase of the partition function