Use sets for Rules. case-classes for Rule and Symbol. Reuse MutableRules for synonims.