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
↳Forward Instantiation Transformation
→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
innermost
one new Dependency Pair is created:
ADD(s(X), Y) -> ADD(X, Y)
ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳Forward Instantiation Transformation
→DP Problem 2
↳Nar
ADD(s(s(X'')), Y'') -> ADD(s(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
innermost
one new Dependency Pair is created:
ADD(s(s(X'')), Y'') -> ADD(s(X''), Y'')
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(X'''')), Y'''')
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 4
↳Polynomial Ordering
→DP Problem 2
↳Nar
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(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
innermost
ADD(s(s(s(X''''))), Y'''') -> ADD(s(s(X'''')), Y'''')
POL(s(x1)) = 1 + x1 POL(ADD(x1, x2)) = 1 + x1
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 5
↳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
innermost
R
↳DPs
→DP Problem 1
↳FwdInst
→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
innermost
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
↳FwdInst
→DP Problem 2
↳Nar
→DP Problem 6
↳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
innermost
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
↳FwdInst
→DP Problem 2
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 7
↳Forward Instantiation Transformation
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
innermost
two new Dependency Pairs are created:
SEL(s(N), cons(X, XS')) -> SEL(N, XS')
SEL(s(s(N'')), cons(X, cons(X'', XS'''))) -> SEL(s(N''), cons(X'', XS'''))
SEL(s(s(N'')), cons(X, cons(X'', nfib1(X1'''', X2'''')))) -> SEL(s(N''), cons(X'', nfib1(X1'''', X2'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 8
↳Polynomial Ordering
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(X1'', nfib1(X2'', add(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
innermost
SEL(s(N), cons(X, nfib1(X1'', X2''))) -> SEL(N, cons(X1'', nfib1(X2'', add(X1'', X2''))))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
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)) = x1 + x2
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 10
↳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
innermost
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Nar
→DP Problem 6
↳Nar
...
→DP Problem 9
↳Polynomial Ordering
SEL(s(s(N'')), cons(X, cons(X'', XS'''))) -> SEL(s(N''), cons(X'', 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
innermost
SEL(s(s(N'')), cons(X, cons(X'', XS'''))) -> SEL(s(N''), cons(X'', XS'''))
POL(SEL(x1, x2)) = x1 POL(cons(x1, x2)) = 0 POL(s(x1)) = 1 + x1