(0) Obligation:

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

app(app(app(comp, f), g), x) → app(f, app(g, x))
app(twice, f) → app(app(comp, f), f)

Q is empty.