(0) Obligation:

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

sel(s(X), cons(Y)) → sel(X, Z)
from(X) → cons(X)
first(0, Z) → nil
first(s(X), cons(Y)) → cons(Y)
sel(0, cons(X)) → X