How mathematics stopped being defined by reality — and started to invent new ones