Algebraic modelling of category distinguishability