(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f(n__a, X, X) → f(activate(X), b, n__b)
ba
an__a
bn__b
activate(n__a) → a
activate(n__b) → b
activate(X) → X

Q is empty.