YES

The TRS could be proven terminating. The proof took 46 ms.

The following DP Processors were used


Problem 1 was processed with processor DependencyGraph (27ms).
 | – Problem 2 was processed with processor SubtermCriterion (0ms).
 | – Problem 3 was processed with processor SubtermCriterion (0ms).

Problem 1: DependencyGraph



Dependency Pair Problem

Dependency Pairs

take#(s(N), cons(X, XS))activate#(XS)2nd#(cons(X, XS))head#(activate(XS))
2nd#(cons(X, XS))activate#(XS)activate#(n__take(X1, X2))take#(X1, X2)
activate#(n__from(X))from#(X)sel#(s(N), cons(X, XS))sel#(N, activate(XS))
sel#(s(N), cons(X, XS))activate#(XS)

Rewrite Rules

from(X)cons(X, n__from(s(X)))head(cons(X, XS))X
2nd(cons(X, XS))head(activate(XS))take(0, XS)nil
take(s(N), cons(X, XS))cons(X, n__take(N, activate(XS)))sel(0, cons(X, XS))X
sel(s(N), cons(X, XS))sel(N, activate(XS))from(X)n__from(X)
take(X1, X2)n__take(X1, X2)activate(n__from(X))from(X)
activate(n__take(X1, X2))take(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: activate, 2nd, 0, s, n__from, take, from, head, n__take, sel, cons, nil

Strategy


The following SCCs where found

take#(s(N), cons(X, XS)) → activate#(XS)activate#(n__take(X1, X2)) → take#(X1, X2)

sel#(s(N), cons(X, XS)) → sel#(N, activate(XS))

Problem 2: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

sel#(s(N), cons(X, XS))sel#(N, activate(XS))

Rewrite Rules

from(X)cons(X, n__from(s(X)))head(cons(X, XS))X
2nd(cons(X, XS))head(activate(XS))take(0, XS)nil
take(s(N), cons(X, XS))cons(X, n__take(N, activate(XS)))sel(0, cons(X, XS))X
sel(s(N), cons(X, XS))sel(N, activate(XS))from(X)n__from(X)
take(X1, X2)n__take(X1, X2)activate(n__from(X))from(X)
activate(n__take(X1, X2))take(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: activate, 2nd, 0, s, n__from, take, from, head, n__take, sel, cons, nil

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

sel#(s(N), cons(X, XS))sel#(N, activate(XS))

Problem 3: SubtermCriterion



Dependency Pair Problem

Dependency Pairs

take#(s(N), cons(X, XS))activate#(XS)activate#(n__take(X1, X2))take#(X1, X2)

Rewrite Rules

from(X)cons(X, n__from(s(X)))head(cons(X, XS))X
2nd(cons(X, XS))head(activate(XS))take(0, XS)nil
take(s(N), cons(X, XS))cons(X, n__take(N, activate(XS)))sel(0, cons(X, XS))X
sel(s(N), cons(X, XS))sel(N, activate(XS))from(X)n__from(X)
take(X1, X2)n__take(X1, X2)activate(n__from(X))from(X)
activate(n__take(X1, X2))take(X1, X2)activate(X)X

Original Signature

Termination of terms over the following signature is verified: activate, 2nd, 0, s, n__from, take, from, head, n__take, sel, cons, nil

Strategy


Projection

The following projection was used:

Thus, the following dependency pairs are removed:

take#(s(N), cons(X, XS))activate#(XS)activate#(n__take(X1, X2))take#(X1, X2)