The rewrite relation of the following TRS is considered.
fib(N) | → | sel(N,fib1(s(0),s(0))) | (1) |
fib1(X,Y) | → | cons(X,n__fib1(Y,n__add(X,Y))) | (2) |
add(0,X) | → | X | (3) |
add(s(X),Y) | → | s(add(X,Y)) | (4) |
sel(0,cons(X,XS)) | → | X | (5) |
sel(s(N),cons(X,XS)) | → | sel(N,activate(XS)) | (6) |
fib1(X1,X2) | → | n__fib1(X1,X2) | (7) |
add(X1,X2) | → | n__add(X1,X2) | (8) |
activate(n__fib1(X1,X2)) | → | fib1(activate(X1),activate(X2)) | (9) |
activate(n__add(X1,X2)) | → | add(activate(X1),activate(X2)) | (10) |
activate(X) | → | X | (11) |
sel#(s(N),cons(X,XS)) | → | activate#(XS) | (12) |
activate#(n__add(X1,X2)) | → | add#(activate(X1),activate(X2)) | (13) |
fib#(N) | → | sel#(N,fib1(s(0),s(0))) | (14) |
add#(s(X),Y) | → | add#(X,Y) | (15) |
activate#(n__add(X1,X2)) | → | activate#(X1) | (16) |
fib#(N) | → | fib1#(s(0),s(0)) | (17) |
activate#(n__fib1(X1,X2)) | → | activate#(X2) | (18) |
activate#(n__fib1(X1,X2)) | → | fib1#(activate(X1),activate(X2)) | (19) |
sel#(s(N),cons(X,XS)) | → | sel#(N,activate(XS)) | (20) |
activate#(n__add(X1,X2)) | → | activate#(X2) | (21) |
activate#(n__fib1(X1,X2)) | → | activate#(X1) | (22) |
The dependency pairs are split into 3 components.
sel#(s(N),cons(X,XS)) | → | sel#(N,activate(XS)) | (20) |
[s(x1)] | = | x1 + 1 |
[activate(x1)] | = | 1 |
[activate#(x1)] | = | 0 |
[n__add(x1, x2)] | = | 2 |
[fib1#(x1, x2)] | = | 0 |
[n__fib1(x1, x2)] | = | x1 + x2 + 1 |
[fib1(x1, x2)] | = | x1 + x2 + 0 |
[fib(x1)] | = | 0 |
[0] | = | 20163 |
[sel#(x1, x2)] | = | x1 + 0 |
[sel(x1, x2)] | = | 0 |
[cons(x1, x2)] | = | x1 + x2 + 1 |
[add#(x1, x2)] | = | 0 |
[add(x1, x2)] | = | x1 + 1 |
[fib#(x1)] | = | 0 |
sel#(s(N),cons(X,XS)) | → | sel#(N,activate(XS)) | (20) |
The dependency pairs are split into 0 components.
activate#(n__fib1(X1,X2)) | → | activate#(X1) | (22) |
activate#(n__add(X1,X2)) | → | activate#(X2) | (21) |
activate#(n__fib1(X1,X2)) | → | activate#(X2) | (18) |
activate#(n__add(X1,X2)) | → | activate#(X1) | (16) |
[s(x1)] | = | x1 + 1 |
[activate(x1)] | = | 1 |
[activate#(x1)] | = | x1 + 0 |
[n__add(x1, x2)] | = | x1 + x2 + 2 |
[fib1#(x1, x2)] | = | 0 |
[n__fib1(x1, x2)] | = | x1 + x2 + 1 |
[fib1(x1, x2)] | = | x1 + x2 + 0 |
[fib(x1)] | = | 0 |
[0] | = | 20163 |
[sel#(x1, x2)] | = | 0 |
[sel(x1, x2)] | = | 0 |
[cons(x1, x2)] | = | x2 + 1 |
[add#(x1, x2)] | = | 0 |
[add(x1, x2)] | = | x1 + 1 |
[fib#(x1)] | = | 0 |
activate#(n__fib1(X1,X2)) | → | activate#(X1) | (22) |
activate#(n__add(X1,X2)) | → | activate#(X2) | (21) |
activate#(n__fib1(X1,X2)) | → | activate#(X2) | (18) |
activate#(n__add(X1,X2)) | → | activate#(X1) | (16) |
The dependency pairs are split into 0 components.
add#(s(X),Y) | → | add#(X,Y) | (15) |
[s(x1)] | = | x1 + 1 |
[activate(x1)] | = | 1 |
[activate#(x1)] | = | 0 |
[n__add(x1, x2)] | = | x1 + x2 + 2 |
[fib1#(x1, x2)] | = | 0 |
[n__fib1(x1, x2)] | = | x1 + x2 + 1 |
[fib1(x1, x2)] | = | x1 + x2 + 0 |
[fib(x1)] | = | 0 |
[0] | = | 42736 |
[sel#(x1, x2)] | = | 0 |
[sel(x1, x2)] | = | 0 |
[cons(x1, x2)] | = | x2 + 1 |
[add#(x1, x2)] | = | x1 + 0 |
[add(x1, x2)] | = | x1 + 1 |
[fib#(x1)] | = | 0 |
add#(s(X),Y) | → | add#(X,Y) | (15) |
The dependency pairs are split into 0 components.