The mathematical groundwork of economics