Term Rewriting System R:
[y, z, x]
f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

F(cons(f(cons(nil, y)), z)) -> COPY(n, y, z)
COPY(0, y, z) -> F(z)
COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
COPY(s(x), y, z) -> F(y)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Instantiation Transformation


Dependency Pair:

COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
one new Dependency Pair is created:

COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
Instantiation Transformation


Dependency Pair:

COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Strategy:

innermost




On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))
one new Dependency Pair is created:

COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
Inst
             ...
               →DP Problem 3
Argument Filtering and Ordering


Dependency Pair:

COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Strategy:

innermost




The following dependency pair can be strictly oriented:

COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))


The following usable rules for innermost can be oriented:

f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Used ordering: Lexicographic Path Order with Non-Strict Precedence with Quasi Precedence:
{f, copy}

resulting in one new DP problem.
Used Argument Filtering System:
COPY(x1, x2, x3) -> COPY(x1, x2, x3)
s(x1) -> s(x1)
cons(x1, x2) -> x2
f(x1) -> f(x1)
copy(x1, x2, x3) -> copy(x3)


   R
DPs
       →DP Problem 1
Inst
           →DP Problem 2
Inst
             ...
               →DP Problem 4
Dependency Graph


Dependency Pair:


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:01 minutes