The rewrite relation of the following TRS is considered.
pairNs |
→ |
cons(0,n__incr(n__oddNs)) |
(1) |
oddNs |
→ |
incr(pairNs) |
(2) |
incr(cons(X,XS)) |
→ |
cons(s(X),n__incr(activate(XS))) |
(3) |
take(0,XS) |
→ |
nil |
(4) |
take(s(N),cons(X,XS)) |
→ |
cons(X,n__take(N,activate(XS))) |
(5) |
zip(nil,XS) |
→ |
nil |
(6) |
zip(X,nil) |
→ |
nil |
(7) |
zip(cons(X,XS),cons(Y,YS)) |
→ |
cons(pair(X,Y),n__zip(activate(XS),activate(YS))) |
(8) |
tail(cons(X,XS)) |
→ |
activate(XS) |
(9) |
repItems(nil) |
→ |
nil |
(10) |
repItems(cons(X,XS)) |
→ |
cons(X,n__cons(X,n__repItems(activate(XS)))) |
(11) |
incr(X) |
→ |
n__incr(X) |
(12) |
oddNs |
→ |
n__oddNs |
(13) |
take(X1,X2) |
→ |
n__take(X1,X2) |
(14) |
zip(X1,X2) |
→ |
n__zip(X1,X2) |
(15) |
cons(X1,X2) |
→ |
n__cons(X1,X2) |
(16) |
repItems(X) |
→ |
n__repItems(X) |
(17) |
activate(n__incr(X)) |
→ |
incr(activate(X)) |
(18) |
activate(n__oddNs) |
→ |
oddNs |
(19) |
activate(n__take(X1,X2)) |
→ |
take(activate(X1),activate(X2)) |
(20) |
activate(n__zip(X1,X2)) |
→ |
zip(activate(X1),activate(X2)) |
(21) |
activate(n__cons(X1,X2)) |
→ |
cons(activate(X1),X2) |
(22) |
activate(n__repItems(X)) |
→ |
repItems(activate(X)) |
(23) |
activate(X) |
→ |
X |
(24) |
pairNs# |
→ |
cons#(0,n__incr(n__oddNs)) |
(25) |
oddNs# |
→ |
incr#(pairNs) |
(26) |
oddNs# |
→ |
pairNs# |
(27) |
incr#(cons(X,XS)) |
→ |
cons#(s(X),n__incr(activate(XS))) |
(28) |
incr#(cons(X,XS)) |
→ |
activate#(XS) |
(29) |
take#(s(N),cons(X,XS)) |
→ |
cons#(X,n__take(N,activate(XS))) |
(30) |
take#(s(N),cons(X,XS)) |
→ |
activate#(XS) |
(31) |
zip#(cons(X,XS),cons(Y,YS)) |
→ |
cons#(pair(X,Y),n__zip(activate(XS),activate(YS))) |
(32) |
zip#(cons(X,XS),cons(Y,YS)) |
→ |
activate#(XS) |
(33) |
zip#(cons(X,XS),cons(Y,YS)) |
→ |
activate#(YS) |
(34) |
repItems#(cons(X,XS)) |
→ |
cons#(X,n__cons(X,n__repItems(activate(XS)))) |
(35) |
repItems#(cons(X,XS)) |
→ |
activate#(XS) |
(36) |
activate#(n__incr(X)) |
→ |
incr#(activate(X)) |
(37) |
activate#(n__incr(X)) |
→ |
activate#(X) |
(38) |
activate#(n__oddNs) |
→ |
oddNs# |
(39) |
activate#(n__take(X1,X2)) |
→ |
take#(activate(X1),activate(X2)) |
(40) |
activate#(n__take(X1,X2)) |
→ |
activate#(X1) |
(41) |
activate#(n__take(X1,X2)) |
→ |
activate#(X2) |
(42) |
activate#(n__zip(X1,X2)) |
→ |
zip#(activate(X1),activate(X2)) |
(43) |
activate#(n__zip(X1,X2)) |
→ |
activate#(X1) |
(44) |
activate#(n__zip(X1,X2)) |
→ |
activate#(X2) |
(45) |
activate#(n__cons(X1,X2)) |
→ |
cons#(activate(X1),X2) |
(46) |
activate#(n__cons(X1,X2)) |
→ |
activate#(X1) |
(47) |
activate#(n__repItems(X)) |
→ |
repItems#(activate(X)) |
(48) |
activate#(n__repItems(X)) |
→ |
activate#(X) |
(49) |
It remains to prove infiniteness of the resulting DP problem.
pairNs# |
→ |
cons#(0,n__incr(n__oddNs)) |
(25) |
oddNs# |
→ |
pairNs# |
(27) |
incr#(cons(X,XS)) |
→ |
cons#(s(X),n__incr(activate(XS))) |
(28) |
take#(s(N),cons(X,XS)) |
→ |
cons#(X,n__take(N,activate(XS))) |
(30) |
zip#(cons(X,XS),cons(Y,YS)) |
→ |
cons#(pair(X,Y),n__zip(activate(XS),activate(YS))) |
(32) |
repItems#(cons(X,XS)) |
→ |
cons#(X,n__cons(X,n__repItems(activate(XS)))) |
(35) |
activate#(n__cons(X1,X2)) |
→ |
cons#(activate(X1),X2) |
(46) |
and the following rules have been deleted.
activate#(n__incr(n__incr(x0))) |
→ |
incr#(incr(activate(x0))) |
(51) |
activate#(n__incr(n__oddNs)) |
→ |
incr#(oddNs) |
(52) |
activate#(n__incr(n__take(x0,x1))) |
→ |
incr#(take(activate(x0),activate(x1))) |
(53) |
activate#(n__incr(n__zip(x0,x1))) |
→ |
incr#(zip(activate(x0),activate(x1))) |
(54) |
activate#(n__incr(n__cons(x0,x1))) |
→ |
incr#(cons(activate(x0),x1)) |
(55) |
activate#(n__incr(n__repItems(x0))) |
→ |
incr#(repItems(activate(x0))) |
(56) |
activate#(n__incr(x0)) |
→ |
incr#(x0) |
(57) |