(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
length(cons(N)) → s(length(L))
zeroscons(0)
length(nil) → 0
take(0, IL) → nil
take(s(M), cons(N)) → cons(N)