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