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