R
↳Dependency Pair Analysis
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)
R
↳DPs
→DP Problem 1
↳Instantiation Transformation
COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
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
one new Dependency Pair is created:
COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))
R
↳DPs
→DP Problem 1
↳Inst
→DP Problem 2
↳Instantiation Transformation
COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))
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
one new Dependency Pair is created:
COPY(s(x'), y'', cons(x'''', z'')) -> COPY(x', y'', cons(f(y''), cons(x'''', z'')))
COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))
R
↳DPs
→DP Problem 1
↳Inst
→DP Problem 2
↳Inst
...
→DP Problem 3
↳Polynomial Ordering
COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))
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
COPY(s(x'''), y'''', cons(x''''0, cons(x'''''', z''''))) -> COPY(x''', y'''', cons(f(y''''), cons(x''''0, cons(x'''''', z''''))))
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))
POL(copy(x1, x2, x3)) = x3 POL(0) = 0 POL(cons(x1, x2)) = x2 POL(COPY(x1, x2, x3)) = x1 POL(nil) = 0 POL(n) = 0 POL(s(x1)) = 1 + x1 POL(f(x1)) = x1
R
↳DPs
→DP Problem 1
↳Inst
→DP Problem 2
↳Inst
...
→DP Problem 4
↳Dependency Graph
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