We describe rules for building 2d theories labeled by 4-manifolds. Using the
proposed dictionary between building blocks of 4-manifolds and 2d N=(0,2)
theories, we obtain a number of results, which include new 3d N=2 theories
T[M_3] associated with rational homology spheres and new results for
Vafa-Witten partition functions on 4-manifolds. In particular, we point out
that the gluing measure for the latter is precisely the superconformal index of
2d (0,2) vector multiplet and relate the basic building blocks with coset
branching functions. We also offer a new look at the fusion of defect lines /
walls, and a physical interpretation of the 4d and 3d Kirby calculus as
dualities of 2d N=(0,2) theories and 3d N=2 theories, respectivelyComment: 81 pages, 18 figures. v2: misprints corrected, clarifications and
references added. v3: additions and corrections about lens space theory,
4-manifold gluing, smooth structure