On the heat equation and the index theorem