A Formal Definition of Culture