On the formal definition of categories