group <a,b | a⁵, b⁴, (ab)²> — the {5,4} triangle group's rotation part. type a word in a b A B (uppercase = inverse). it's now a real canonical form: a bidirectional search applies the relators forwards and backwards, exploring the whole equivalence class up to a length cap, and keeps the shortest then lexicographically smallest word. so ab and BA now land on the same string (they're one element, (ab)²=1). the cost: it searches, so very long words hit the cap and say so. empty = identity.
a⁵ → ε b⁴ → ε (ab)² → ε (Ab)² → εA⁵, B⁴, and the reversed squares. free cancellation xX → ε runs first each pass.