(0) Obligation:

Generalized rewrite system (where rules with free variables on rhs are allowed):
The TRS R consists of the following rules:

and(tt) → X
plus(N, 0) → N
plus(N, s(M)) → s(plus(N, M))
x(N, 0) → 0
x(N, s(M)) → plus(x(N, M), N)