R
↳Dependency Pair Analysis
FIB(N) -> SEL(N, fib1(s(0), s(0)))
FIB(N) -> FIB1(s(0), s(0))
FIB1(X, Y) -> ADD(X, Y)
ADD(s(X), Y) -> ADD(X, Y)
SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
SEL(s(N), cons(X, XS)) -> ACTIVATE(XS)
ACTIVATE(nfib1(X1, X2)) -> FIB1(X1, X2)
R
↳DPs
→DP Problem 1
↳Polynomial Ordering
→DP Problem 2
↳Nar
ADD(s(X), Y) -> ADD(X, Y)
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X
ADD(s(X), Y) -> ADD(X, Y)
POL(s(x1)) = 1 + x1 POL(ADD(x1, x2)) = x1
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 3
↳Dependency Graph
→DP Problem 2
↳Nar
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Narrowing Transformation
SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X
two new Dependency Pairs are created:
SEL(s(N), cons(X, XS)) -> SEL(N, activate(XS))
SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(X1', X2'))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Narrowing Transformation
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(X1', X2'))
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X
two new Dependency Pairs are created:
SEL(s(N), cons(X, nfib1(X1', X2'))) -> SEL(N, fib1(X1', X2'))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(X1'', nfib1(X2'', add(X1'', X2''))))
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, nfib1(X1'', X2''))
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Nar
...
→DP Problem 5
↳Polynomial Ordering
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(X1'', nfib1(X2'', add(X1'', X2''))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(X1'', nfib1(X2'', add(X1'', X2''))))
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
POL(0) = 0 POL(SEL(x1, x2)) = x1 POL(cons(x1, x2)) = 0 POL(n__fib1(x1, x2)) = 0 POL(s(x1)) = 1 + x1 POL(add(x1, x2)) = 0
R
↳DPs
→DP Problem 1
↳Polo
→DP Problem 2
↳Nar
→DP Problem 4
↳Nar
...
→DP Problem 6
↳Dependency Graph
fib(N) -> sel(N, fib1(s(0), s(0)))
fib1(X, Y) -> cons(X, nfib1(Y, add(X, Y)))
fib1(X1, X2) -> nfib1(X1, X2)
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
sel(0, cons(X, XS)) -> X
sel(s(N), cons(X, XS)) -> sel(N, activate(XS))
activate(nfib1(X1, X2)) -> fib1(X1, X2)
activate(X) -> X