Completion settings:
Axiom: aa=1.
Defines rule #2.
Axiom: bbbbbb=bab.
Flip LHS and RHS.
Defines rule #1.