Categorisation: A Logical Approach to a Cognitive problem