YES(O(1),O(n^1)) 514.44/148.17 YES(O(1),O(n^1)) 514.44/148.17 514.44/148.17 We are left with following problem, upon which TcT provides the 514.44/148.17 certificate YES(O(1),O(n^1)). 514.44/148.17 514.44/148.17 Strict Trs: 514.44/148.17 { U11(tt(), N, X, XS) -> 514.44/148.17 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.17 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.17 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.17 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.17 , activate(X) -> X 514.44/148.17 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.17 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.17 , snd(pair(X, Y)) -> Y 514.44/148.17 , and(tt(), X) -> activate(X) 514.44/148.17 , fst(pair(X, Y)) -> X 514.44/148.17 , head(cons(N, XS)) -> N 514.44/148.17 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.17 , natsFrom(X) -> n__natsFrom(X) 514.44/148.17 , sel(N, XS) -> head(afterNth(N, XS)) 514.44/148.17 , tail(cons(N, XS)) -> activate(XS) 514.44/148.17 , take(N, XS) -> fst(splitAt(N, XS)) } 514.44/148.17 Obligation: 514.44/148.17 runtime complexity 514.44/148.17 Answer: 514.44/148.17 YES(O(1),O(n^1)) 514.44/148.17 514.44/148.17 We add the following weak dependency pairs: 514.44/148.17 514.44/148.17 Strict DPs: 514.44/148.17 { U11^#(tt(), N, X, XS) -> 514.44/148.17 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.17 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.17 , activate^#(X) -> c_5(X) 514.44/148.17 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.17 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.17 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.17 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.17 , natsFrom^#(N) -> c_12(N, N) 514.44/148.17 , natsFrom^#(X) -> c_13(X) 514.44/148.17 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.17 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.17 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.17 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.17 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.17 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.17 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.17 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.17 514.44/148.17 and mark the set of starting terms. 514.44/148.17 514.44/148.17 We are left with following problem, upon which TcT provides the 514.44/148.17 certificate YES(O(1),O(n^1)). 514.44/148.17 514.44/148.17 Strict DPs: 514.44/148.17 { U11^#(tt(), N, X, XS) -> 514.44/148.17 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.17 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.17 , activate^#(X) -> c_5(X) 514.44/148.17 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.17 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.17 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.17 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.17 , natsFrom^#(N) -> c_12(N, N) 514.44/148.17 , natsFrom^#(X) -> c_13(X) 514.44/148.17 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.17 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.17 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.17 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.17 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.17 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.17 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.17 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.17 Strict Trs: 514.44/148.17 { U11(tt(), N, X, XS) -> 514.44/148.17 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.17 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.17 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.17 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.17 , activate(X) -> X 514.44/148.17 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.17 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.17 , snd(pair(X, Y)) -> Y 514.44/148.17 , and(tt(), X) -> activate(X) 514.44/148.17 , fst(pair(X, Y)) -> X 514.44/148.17 , head(cons(N, XS)) -> N 514.44/148.17 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.17 , natsFrom(X) -> n__natsFrom(X) 514.44/148.17 , sel(N, XS) -> head(afterNth(N, XS)) 514.44/148.17 , tail(cons(N, XS)) -> activate(XS) 514.44/148.17 , take(N, XS) -> fst(splitAt(N, XS)) } 514.44/148.17 Obligation: 514.44/148.17 runtime complexity 514.44/148.17 Answer: 514.44/148.17 YES(O(1),O(n^1)) 514.44/148.17 514.44/148.17 We replace rewrite rules by usable rules: 514.44/148.17 514.44/148.17 Strict Usable Rules: 514.44/148.17 { U11(tt(), N, X, XS) -> 514.44/148.17 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.17 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.17 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.17 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.17 , activate(X) -> X 514.44/148.17 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.17 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.17 , snd(pair(X, Y)) -> Y 514.44/148.17 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.17 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.17 514.44/148.17 We are left with following problem, upon which TcT provides the 514.44/148.17 certificate YES(O(1),O(n^1)). 514.44/148.17 514.44/148.17 Strict DPs: 514.44/148.17 { U11^#(tt(), N, X, XS) -> 514.44/148.17 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.17 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.17 , activate^#(X) -> c_5(X) 514.44/148.17 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.17 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.17 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.17 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.17 , natsFrom^#(N) -> c_12(N, N) 514.44/148.17 , natsFrom^#(X) -> c_13(X) 514.44/148.17 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.17 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.17 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.17 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.17 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.17 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.17 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.17 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.17 Strict Trs: 514.44/148.17 { U11(tt(), N, X, XS) -> 514.44/148.17 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.17 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.17 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.17 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.17 , activate(X) -> X 514.44/148.17 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.17 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.17 , snd(pair(X, Y)) -> Y 514.44/148.17 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.17 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.17 Obligation: 514.44/148.17 runtime complexity 514.44/148.17 Answer: 514.44/148.17 YES(O(1),O(n^1)) 514.44/148.17 514.44/148.17 The weightgap principle applies (using the following nonconstant 514.44/148.17 growth matrix-interpretation) 514.44/148.17 514.44/148.17 The following argument positions are usable: 514.44/148.17 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.44/148.17 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.44/148.17 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.44/148.17 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.44/148.17 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.44/148.17 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.44/148.17 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.44/148.17 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.44/148.17 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.44/148.17 514.44/148.17 TcT has computed the following matrix interpretation satisfying 514.44/148.17 not(EDA) and not(IDA(1)). 514.44/148.17 514.44/148.17 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [tt] = [0] 514.44/148.17 [0] 514.44/148.17 514.44/148.17 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [activate](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 514.44/148.17 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [snd](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 514.44/148.17 [natsFrom](x1) = [1 0] x1 + [1] 514.44/148.17 [0 0] [0] 514.44/148.17 514.44/148.17 [n__natsFrom](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 514.44/148.17 [s](x1) = [0 0] x1 + [0] 514.44/148.17 [1 0] [0] 514.44/148.17 514.44/148.17 [0] = [0] 514.44/148.17 [0] 514.44/148.17 514.44/148.17 [nil] = [0] 514.44/148.17 [0] 514.44/148.17 514.44/148.17 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [c_1](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.44/148.17 [0 1] [0 1] [0 1] [1] 514.44/148.17 514.44/148.17 [activate^#](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 514.44/148.17 [c_3](x1) = [1 0] x1 + [3] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [c_4](x1) = [7] 514.44/148.17 [0] 514.44/148.17 514.44/148.17 [c_5](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [c_6](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [natsFrom^#](x1) = [7] 514.44/148.17 [7] 514.44/148.17 514.44/148.17 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.17 [0 0] [0 0] [7] 514.44/148.17 514.44/148.17 [c_7](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [snd^#](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [c_8](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [and^#](x1, x2) = [1 0] x2 + [7] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [c_9](x1) = [1 0] x1 + [6] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [fst^#](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [c_10](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [head^#](x1) = [1 0] x1 + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [c_11](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [c_12](x1, x2) = [6] 514.44/148.17 [7] 514.44/148.17 514.44/148.17 [c_13](x1) = [6] 514.44/148.17 [7] 514.44/148.17 514.44/148.17 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.17 [0 0] [0 0] [7] 514.44/148.17 514.44/148.17 [c_14](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [tail^#](x1) = [1 0] x1 + [7] 514.44/148.17 [0 0] [7] 514.44/148.17 514.44/148.17 [c_15](x1) = [1 0] x1 + [6] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.17 [0 0] [0 0] [7] 514.44/148.17 514.44/148.17 [c_16](x1) = [1 0] x1 + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 514.44/148.17 The order satisfies the following ordering constraints: 514.44/148.17 514.44/148.17 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.44/148.17 514.44/148.17 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 = [pair(cons(activate(X), YS), ZS)] 514.44/148.17 514.44/148.17 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 = [U11(tt(), N, X, activate(XS))] 514.44/148.17 514.44/148.17 [splitAt(0(), XS)] = [1 0] XS + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 >= [1 0] XS + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 = [pair(nil(), XS)] 514.44/148.17 514.44/148.17 [activate(X)] = [1 0] X + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 ? [1 0] X + [0] 514.44/148.17 [0 1] [0] 514.44/148.17 = [X] 514.44/148.17 514.44/148.17 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 ? [1 0] X + [1] 514.44/148.17 [0 0] [0] 514.44/148.17 = [natsFrom(X)] 514.44/148.17 514.44/148.17 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 >= [1 1] N + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 = [snd(splitAt(N, XS))] 514.44/148.17 514.44/148.17 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.17 [0 0] [0 0] [0] 514.44/148.17 ? [1 0] Y + [0] 514.44/148.17 [0 1] [0] 514.44/148.17 = [Y] 514.44/148.17 514.44/148.17 [natsFrom(N)] = [1 0] N + [1] 514.44/148.17 [0 0] [0] 514.44/148.17 > [1 0] N + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 = [cons(N, n__natsFrom(s(N)))] 514.44/148.17 514.44/148.17 [natsFrom(X)] = [1 0] X + [1] 514.44/148.17 [0 0] [0] 514.44/148.17 > [1 0] X + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 = [n__natsFrom(X)] 514.44/148.17 514.44/148.17 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.44/148.17 [0 0] [0 0] [0 0] [7] 514.44/148.17 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.44/148.17 514.44/148.17 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 ? [1 0] X + [1 0] YS + [1 0] ZS + [7] 514.44/148.17 [0 0] [0 1] [0 1] [8] 514.44/148.17 = [c_2(activate^#(X), YS, ZS)] 514.44/148.17 514.44/148.17 [activate^#(X)] = [1 0] X + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 ? [1 0] X + [7] 514.44/148.17 [0 1] [7] 514.44/148.17 = [c_5(X)] 514.44/148.17 514.44/148.17 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.17 [0 0] [7] 514.44/148.17 ? [14] 514.44/148.17 [14] 514.44/148.17 = [c_6(natsFrom^#(X))] 514.44/148.17 514.44/148.17 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.17 [0 0] [0 0] [0 0] [0] 514.44/148.17 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.44/148.17 [0 0] [0 0] [0 0] [7] 514.44/148.17 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.44/148.17 514.44/148.17 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.44/148.17 [0 0] [0] 514.44/148.17 ? [7] 514.44/148.17 [0] 514.44/148.17 = [c_4(XS)] 514.44/148.17 514.44/148.17 [natsFrom^#(N)] = [7] 514.44/148.17 [7] 514.44/148.17 > [6] 514.44/148.17 [7] 514.44/148.17 = [c_12(N, N)] 514.44/148.17 514.44/148.18 [natsFrom^#(X)] = [7] 514.44/148.18 [7] 514.44/148.18 > [6] 514.44/148.18 [7] 514.44/148.18 = [c_13(X)] 514.44/148.18 514.44/148.18 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_7(snd^#(splitAt(N, XS)))] 514.44/148.18 514.44/148.18 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] Y + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_8(Y)] 514.44/148.18 514.44/148.18 [and^#(tt(), X)] = [1 0] X + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 ? [1 0] X + [6] 514.44/148.18 [0 0] [14] 514.44/148.18 = [c_9(activate^#(X))] 514.44/148.18 514.44/148.18 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] X + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_10(X)] 514.44/148.18 514.44/148.18 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] N + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_11(N)] 514.44/148.18 514.44/148.18 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_14(head^#(afterNth(N, XS)))] 514.44/148.18 514.44/148.18 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] XS + [6] 514.44/148.18 [0 0] [14] 514.44/148.18 = [c_15(activate^#(XS))] 514.44/148.18 514.44/148.18 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_16(fst^#(splitAt(N, XS)))] 514.44/148.18 514.44/148.18 514.44/148.18 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.44/148.18 514.44/148.18 We are left with following problem, upon which TcT provides the 514.44/148.18 certificate YES(O(1),O(n^1)). 514.44/148.18 514.44/148.18 Strict DPs: 514.44/148.18 { U11^#(tt(), N, X, XS) -> 514.44/148.18 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.18 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.18 , activate^#(X) -> c_5(X) 514.44/148.18 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.18 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.18 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.18 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.18 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.18 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.18 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.18 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.18 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.18 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.18 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.18 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.18 Strict Trs: 514.44/148.18 { U11(tt(), N, X, XS) -> 514.44/148.18 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.18 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.18 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.18 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.18 , activate(X) -> X 514.44/148.18 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.18 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.18 , snd(pair(X, Y)) -> Y } 514.44/148.18 Weak DPs: 514.44/148.18 { natsFrom^#(N) -> c_12(N, N) 514.44/148.18 , natsFrom^#(X) -> c_13(X) } 514.44/148.18 Weak Trs: 514.44/148.18 { natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.18 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.18 Obligation: 514.44/148.18 runtime complexity 514.44/148.18 Answer: 514.44/148.18 YES(O(1),O(n^1)) 514.44/148.18 514.44/148.18 The weightgap principle applies (using the following nonconstant 514.44/148.18 growth matrix-interpretation) 514.44/148.18 514.44/148.18 The following argument positions are usable: 514.44/148.18 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.44/148.18 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.44/148.18 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.44/148.18 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.44/148.18 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.44/148.18 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.44/148.18 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.44/148.18 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.44/148.18 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.44/148.18 514.44/148.18 TcT has computed the following matrix interpretation satisfying 514.44/148.18 not(EDA) and not(IDA(1)). 514.44/148.18 514.44/148.18 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [tt] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [activate](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 514.44/148.18 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 1] [0] 514.44/148.18 514.44/148.18 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.44/148.18 [0 0] [0 0] [4] 514.44/148.18 514.44/148.18 [snd](x1) = [1 0] x1 + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 514.44/148.18 [natsFrom](x1) = [1 0] x1 + [5] 514.44/148.18 [0 0] [4] 514.44/148.18 514.44/148.18 [n__natsFrom](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 514.44/148.18 [s](x1) = [0 0] x1 + [0] 514.44/148.18 [1 0] [0] 514.44/148.18 514.44/148.18 [0] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [nil] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_1](x1) = [1 0] x1 + [3] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.44/148.18 [0 1] [0 1] [0 1] [1] 514.44/148.18 514.44/148.18 [activate^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_3](x1) = [1 0] x1 + [3] 514.44/148.18 [0 1] [3] 514.44/148.18 514.44/148.18 [c_4](x1) = [7] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [c_5](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [c_6](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [natsFrom^#](x1) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_7](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [snd^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_8](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [and^#](x1, x2) = [1 0] x2 + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_9](x1) = [1 0] x1 + [6] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [fst^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_10](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [head^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_11](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [c_12](x1, x2) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [c_13](x1) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_14](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [tail^#](x1) = [1 0] x1 + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_15](x1) = [1 0] x1 + [6] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_16](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 The order satisfies the following ordering constraints: 514.44/148.18 514.44/148.18 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.44/148.18 514.44/148.18 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 1] [0] 514.44/148.18 = [pair(cons(activate(X), YS), ZS)] 514.44/148.18 514.44/148.18 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 = [U11(tt(), N, X, activate(XS))] 514.44/148.18 514.44/148.18 [splitAt(0(), XS)] = [1 0] XS + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] XS + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [pair(nil(), XS)] 514.44/148.18 514.44/148.18 [activate(X)] = [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] X + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [X] 514.44/148.18 514.44/148.18 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] X + [5] 514.44/148.18 [0 0] [4] 514.44/148.18 = [natsFrom(X)] 514.44/148.18 514.44/148.18 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.44/148.18 [0 0] [0 0] [4] 514.44/148.18 > [1 1] N + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 = [snd(splitAt(N, XS))] 514.44/148.18 514.44/148.18 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 1] [0] 514.44/148.18 >= [1 0] Y + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [Y] 514.44/148.18 514.44/148.18 [natsFrom(N)] = [1 0] N + [5] 514.44/148.18 [0 0] [4] 514.44/148.18 > [1 0] N + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 = [cons(N, n__natsFrom(s(N)))] 514.44/148.18 514.44/148.18 [natsFrom(X)] = [1 0] X + [5] 514.44/148.18 [0 0] [4] 514.44/148.18 > [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 = [n__natsFrom(X)] 514.44/148.18 514.44/148.18 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.44/148.18 [0 0] [0 0] [0 0] [7] 514.44/148.18 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.44/148.18 514.44/148.18 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 ? [1 0] X + [1 0] YS + [1 0] ZS + [7] 514.44/148.18 [0 0] [0 1] [0 1] [8] 514.44/148.18 = [c_2(activate^#(X), YS, ZS)] 514.44/148.18 514.44/148.18 [activate^#(X)] = [1 0] X + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 ? [1 0] X + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_5(X)] 514.44/148.18 514.44/148.18 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 ? [14] 514.44/148.18 [14] 514.44/148.18 = [c_6(natsFrom^#(X))] 514.44/148.18 514.44/148.18 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.44/148.18 [0 0] [0 0] [0 0] [3] 514.44/148.18 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.44/148.18 514.44/148.18 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [7] 514.44/148.18 [0] 514.44/148.18 = [c_4(XS)] 514.44/148.18 514.44/148.18 [natsFrom^#(N)] = [7] 514.44/148.18 [7] 514.44/148.18 >= [7] 514.44/148.18 [7] 514.44/148.18 = [c_12(N, N)] 514.44/148.18 514.44/148.18 [natsFrom^#(X)] = [7] 514.44/148.18 [7] 514.44/148.18 >= [7] 514.44/148.18 [7] 514.44/148.18 = [c_13(X)] 514.44/148.18 514.44/148.18 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_7(snd^#(splitAt(N, XS)))] 514.44/148.18 514.44/148.18 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] Y + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_8(Y)] 514.44/148.18 514.44/148.18 [and^#(tt(), X)] = [1 0] X + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 ? [1 0] X + [6] 514.44/148.18 [0 0] [14] 514.44/148.18 = [c_9(activate^#(X))] 514.44/148.18 514.44/148.18 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] X + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_10(X)] 514.44/148.18 514.44/148.18 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] N + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 = [c_11(N)] 514.44/148.18 514.44/148.18 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [11] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_14(head^#(afterNth(N, XS)))] 514.44/148.18 514.44/148.18 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 0] XS + [6] 514.44/148.18 [0 0] [14] 514.44/148.18 = [c_15(activate^#(XS))] 514.44/148.18 514.44/148.18 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 ? [1 1] N + [1 0] XS + [7] 514.44/148.18 [0 0] [0 0] [14] 514.44/148.18 = [c_16(fst^#(splitAt(N, XS)))] 514.44/148.18 514.44/148.18 514.44/148.18 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.44/148.18 514.44/148.18 We are left with following problem, upon which TcT provides the 514.44/148.18 certificate YES(O(1),O(n^1)). 514.44/148.18 514.44/148.18 Strict DPs: 514.44/148.18 { U11^#(tt(), N, X, XS) -> 514.44/148.18 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.18 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.18 , activate^#(X) -> c_5(X) 514.44/148.18 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.18 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.18 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.18 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.18 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.18 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.18 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.18 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.18 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.18 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.18 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.18 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.18 Strict Trs: 514.44/148.18 { U11(tt(), N, X, XS) -> 514.44/148.18 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.18 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.18 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.18 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.18 , activate(X) -> X 514.44/148.18 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.18 , snd(pair(X, Y)) -> Y } 514.44/148.18 Weak DPs: 514.44/148.18 { natsFrom^#(N) -> c_12(N, N) 514.44/148.18 , natsFrom^#(X) -> c_13(X) } 514.44/148.18 Weak Trs: 514.44/148.18 { afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.18 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.18 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.18 Obligation: 514.44/148.18 runtime complexity 514.44/148.18 Answer: 514.44/148.18 YES(O(1),O(n^1)) 514.44/148.18 514.44/148.18 The weightgap principle applies (using the following nonconstant 514.44/148.18 growth matrix-interpretation) 514.44/148.18 514.44/148.18 The following argument positions are usable: 514.44/148.18 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.44/148.18 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.44/148.18 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.44/148.18 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.44/148.18 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.44/148.18 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.44/148.18 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.44/148.18 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.44/148.18 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.44/148.18 514.44/148.18 TcT has computed the following matrix interpretation satisfying 514.44/148.18 not(EDA) and not(IDA(1)). 514.44/148.18 514.44/148.18 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [tt] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [activate](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 514.44/148.18 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 1] [0] 514.44/148.18 514.44/148.18 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 1] [0 0] [0] 514.44/148.18 514.44/148.18 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.44/148.18 [0 0] [0 0] [4] 514.44/148.18 514.44/148.18 [snd](x1) = [1 0] x1 + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 514.44/148.18 [natsFrom](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [6] 514.44/148.18 514.44/148.18 [n__natsFrom](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 514.44/148.18 [s](x1) = [0 0] x1 + [0] 514.44/148.18 [1 0] [0] 514.44/148.18 514.44/148.18 [0] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [nil] = [0] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [1] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_1](x1) = [1 0] x1 + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 514.44/148.18 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.44/148.18 [0 1] [0 1] [0 1] [1] 514.44/148.18 514.44/148.18 [activate^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 514.44/148.18 [c_3](x1) = [1 0] x1 + [6] 514.44/148.18 [0 1] [3] 514.44/148.18 514.44/148.18 [c_4](x1) = [7] 514.44/148.18 [0] 514.44/148.18 514.44/148.18 [c_5](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [c_6](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [natsFrom^#](x1) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_7](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [snd^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_8](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [and^#](x1, x2) = [1 0] x2 + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_9](x1) = [1 0] x1 + [6] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [fst^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_10](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [head^#](x1) = [1 0] x1 + [0] 514.44/148.18 [0 1] [3] 514.44/148.18 514.44/148.18 [c_11](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [3] 514.44/148.18 514.44/148.18 [c_12](x1, x2) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [c_13](x1) = [7] 514.44/148.18 [7] 514.44/148.18 514.44/148.18 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_14](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [tail^#](x1) = [1 0] x1 + [7] 514.44/148.18 [0 0] [7] 514.44/148.18 514.44/148.18 [c_15](x1) = [1 0] x1 + [6] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.18 [0 0] [0 0] [7] 514.44/148.18 514.44/148.18 [c_16](x1) = [1 0] x1 + [7] 514.44/148.18 [0 1] [7] 514.44/148.18 514.44/148.18 The order satisfies the following ordering constraints: 514.44/148.18 514.44/148.18 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.44/148.18 514.44/148.18 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 1] [0] 514.44/148.18 = [pair(cons(activate(X), YS), ZS)] 514.44/148.18 514.44/148.18 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 = [U11(tt(), N, X, activate(XS))] 514.44/148.18 514.44/148.18 [splitAt(0(), XS)] = [1 0] XS + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] XS + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [pair(nil(), XS)] 514.44/148.18 514.44/148.18 [activate(X)] = [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] X + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [X] 514.44/148.18 514.44/148.18 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 ? [1 0] X + [7] 514.44/148.18 [0 1] [6] 514.44/148.18 = [natsFrom(X)] 514.44/148.18 514.44/148.18 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.44/148.18 [0 0] [0 0] [4] 514.44/148.18 > [1 1] N + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0] 514.44/148.18 = [snd(splitAt(N, XS))] 514.44/148.18 514.44/148.18 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.18 [0 0] [0 1] [0] 514.44/148.18 >= [1 0] Y + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [Y] 514.44/148.18 514.44/148.18 [natsFrom(N)] = [1 0] N + [7] 514.44/148.18 [0 1] [6] 514.44/148.18 > [1 0] N + [0] 514.44/148.18 [0 1] [0] 514.44/148.18 = [cons(N, n__natsFrom(s(N)))] 514.44/148.18 514.44/148.18 [natsFrom(X)] = [1 0] X + [7] 514.44/148.18 [0 1] [6] 514.44/148.18 > [1 0] X + [0] 514.44/148.18 [0 0] [0] 514.44/148.18 = [n__natsFrom(X)] 514.44/148.18 514.44/148.18 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [1] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 > [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.18 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.44/148.18 514.44/148.18 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.18 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] X + [1 0] YS + [1 0] ZS + [7] 514.44/148.19 [0 0] [0 1] [0 1] [8] 514.44/148.19 = [c_2(activate^#(X), YS, ZS)] 514.44/148.19 514.44/148.19 [activate^#(X)] = [1 0] X + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [1 0] X + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_5(X)] 514.44/148.19 514.44/148.19 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [14] 514.44/148.19 [14] 514.44/148.19 = [c_6(natsFrom^#(X))] 514.44/148.19 514.44/148.19 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [0 0] [3] 514.44/148.19 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.44/148.19 514.44/148.19 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [7] 514.44/148.19 [0] 514.44/148.19 = [c_4(XS)] 514.44/148.19 514.44/148.19 [natsFrom^#(N)] = [7] 514.44/148.19 [7] 514.44/148.19 >= [7] 514.44/148.19 [7] 514.44/148.19 = [c_12(N, N)] 514.44/148.19 514.44/148.19 [natsFrom^#(X)] = [7] 514.44/148.19 [7] 514.44/148.19 >= [7] 514.44/148.19 [7] 514.44/148.19 = [c_13(X)] 514.44/148.19 514.44/148.19 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_7(snd^#(splitAt(N, XS)))] 514.44/148.19 514.44/148.19 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] Y + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_8(Y)] 514.44/148.19 514.44/148.19 [and^#(tt(), X)] = [1 0] X + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [1 0] X + [6] 514.44/148.19 [0 0] [14] 514.44/148.19 = [c_9(activate^#(X))] 514.44/148.19 514.44/148.19 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] X + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_10(X)] 514.44/148.19 514.44/148.19 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.44/148.19 [0 1] [0 0] [3] 514.44/148.19 ? [1 0] N + [7] 514.44/148.19 [0 1] [3] 514.44/148.19 = [c_11(N)] 514.44/148.19 514.44/148.19 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [11] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_14(head^#(afterNth(N, XS)))] 514.44/148.19 514.44/148.19 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] XS + [6] 514.44/148.19 [0 0] [14] 514.44/148.19 = [c_15(activate^#(XS))] 514.44/148.19 514.44/148.19 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_16(fst^#(splitAt(N, XS)))] 514.44/148.19 514.44/148.19 514.44/148.19 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.44/148.19 514.44/148.19 We are left with following problem, upon which TcT provides the 514.44/148.19 certificate YES(O(1),O(n^1)). 514.44/148.19 514.44/148.19 Strict DPs: 514.44/148.19 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.19 , activate^#(X) -> c_5(X) 514.44/148.19 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.19 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.19 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.19 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.19 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.19 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.19 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.19 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.19 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.19 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.19 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.19 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.19 Strict Trs: 514.44/148.19 { U11(tt(), N, X, XS) -> 514.44/148.19 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.19 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.19 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.19 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.19 , activate(X) -> X 514.44/148.19 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.19 , snd(pair(X, Y)) -> Y } 514.44/148.19 Weak DPs: 514.44/148.19 { U11^#(tt(), N, X, XS) -> 514.44/148.19 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.19 , natsFrom^#(N) -> c_12(N, N) 514.44/148.19 , natsFrom^#(X) -> c_13(X) } 514.44/148.19 Weak Trs: 514.44/148.19 { afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.19 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.19 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.19 Obligation: 514.44/148.19 runtime complexity 514.44/148.19 Answer: 514.44/148.19 YES(O(1),O(n^1)) 514.44/148.19 514.44/148.19 The weightgap principle applies (using the following nonconstant 514.44/148.19 growth matrix-interpretation) 514.44/148.19 514.44/148.19 The following argument positions are usable: 514.44/148.19 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.44/148.19 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.44/148.19 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.44/148.19 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.44/148.19 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.44/148.19 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.44/148.19 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.44/148.19 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.44/148.19 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.44/148.19 514.44/148.19 TcT has computed the following matrix interpretation satisfying 514.44/148.19 not(EDA) and not(IDA(1)). 514.44/148.19 514.44/148.19 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [4] 514.44/148.19 [0 0] [0 0] [0 0] [4] 514.44/148.19 514.44/148.19 [tt] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [activate](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.44/148.19 [0 0] [0 0] [4] 514.44/148.19 514.44/148.19 [snd](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [natsFrom](x1) = [1 0] x1 + [7] 514.44/148.19 [0 0] [6] 514.44/148.19 514.44/148.19 [n__natsFrom](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [s](x1) = [0 0] x1 + [0] 514.44/148.19 [1 0] [0] 514.44/148.19 514.44/148.19 [0] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [nil] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_1](x1) = [1 0] x1 + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 514.44/148.19 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.44/148.19 [0 1] [0 1] [0 1] [1] 514.44/148.19 514.44/148.19 [activate^#](x1) = [1 0] x1 + [4] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_3](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_4](x1) = [7] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [c_5](x1) = [1 0] x1 + [3] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_6](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [natsFrom^#](x1) = [3] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_7](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [snd^#](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_8](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [and^#](x1, x2) = [1 0] x2 + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_9](x1) = [1 0] x1 + [6] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [fst^#](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_10](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [head^#](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_11](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_12](x1, x2) = [3] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [c_13](x1) = [3] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_14](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [tail^#](x1) = [1 0] x1 + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_15](x1) = [1 0] x1 + [6] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_16](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 The order satisfies the following ordering constraints: 514.44/148.19 514.44/148.19 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [4] 514.44/148.19 [0 0] [0 0] [0 0] [4] 514.44/148.19 > [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.44/148.19 514.44/148.19 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 = [pair(cons(activate(X), YS), ZS)] 514.44/148.19 514.44/148.19 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] N + [1 0] X + [1 0] XS + [4] 514.44/148.19 [0 0] [0 0] [0 0] [4] 514.44/148.19 = [U11(tt(), N, X, activate(XS))] 514.44/148.19 514.44/148.19 [splitAt(0(), XS)] = [1 0] XS + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 >= [1 0] XS + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 = [pair(nil(), XS)] 514.44/148.19 514.44/148.19 [activate(X)] = [1 0] X + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [1 0] X + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 = [X] 514.44/148.19 514.44/148.19 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [1 0] X + [7] 514.44/148.19 [0 0] [6] 514.44/148.19 = [natsFrom(X)] 514.44/148.19 514.44/148.19 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.44/148.19 [0 0] [0 0] [4] 514.44/148.19 > [1 1] N + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 = [snd(splitAt(N, XS))] 514.44/148.19 514.44/148.19 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 ? [1 0] Y + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 = [Y] 514.44/148.19 514.44/148.19 [natsFrom(N)] = [1 0] N + [7] 514.44/148.19 [0 0] [6] 514.44/148.19 > [1 0] N + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 = [cons(N, n__natsFrom(s(N)))] 514.44/148.19 514.44/148.19 [natsFrom(X)] = [1 0] X + [7] 514.44/148.19 [0 0] [6] 514.44/148.19 > [1 0] X + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 = [n__natsFrom(X)] 514.44/148.19 514.44/148.19 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.44/148.19 514.44/148.19 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] X + [1 0] YS + [1 0] ZS + [11] 514.44/148.19 [0 0] [0 1] [0 1] [8] 514.44/148.19 = [c_2(activate^#(X), YS, ZS)] 514.44/148.19 514.44/148.19 [activate^#(X)] = [1 0] X + [4] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [1 0] X + [3] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_5(X)] 514.44/148.19 514.44/148.19 [activate^#(n__natsFrom(X))] = [1 0] X + [4] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [10] 514.44/148.19 [14] 514.44/148.19 = [c_6(natsFrom^#(X))] 514.44/148.19 514.44/148.19 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [0 0] [7] 514.44/148.19 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.44/148.19 514.44/148.19 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [7] 514.44/148.19 [0] 514.44/148.19 = [c_4(XS)] 514.44/148.19 514.44/148.19 [natsFrom^#(N)] = [3] 514.44/148.19 [7] 514.44/148.19 >= [3] 514.44/148.19 [7] 514.44/148.19 = [c_12(N, N)] 514.44/148.19 514.44/148.19 [natsFrom^#(X)] = [3] 514.44/148.19 [7] 514.44/148.19 >= [3] 514.44/148.19 [7] 514.44/148.19 = [c_13(X)] 514.44/148.19 514.44/148.19 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_7(snd^#(splitAt(N, XS)))] 514.44/148.19 514.44/148.19 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] Y + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_8(Y)] 514.44/148.19 514.44/148.19 [and^#(tt(), X)] = [1 0] X + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 ? [1 0] X + [10] 514.44/148.19 [0 0] [14] 514.44/148.19 = [c_9(activate^#(X))] 514.44/148.19 514.44/148.19 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] X + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_10(X)] 514.44/148.19 514.44/148.19 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] N + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 = [c_11(N)] 514.44/148.19 514.44/148.19 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [11] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_14(head^#(afterNth(N, XS)))] 514.44/148.19 514.44/148.19 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 0] XS + [10] 514.44/148.19 [0 0] [14] 514.44/148.19 = [c_15(activate^#(XS))] 514.44/148.19 514.44/148.19 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 ? [1 1] N + [1 0] XS + [7] 514.44/148.19 [0 0] [0 0] [14] 514.44/148.19 = [c_16(fst^#(splitAt(N, XS)))] 514.44/148.19 514.44/148.19 514.44/148.19 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.44/148.19 514.44/148.19 We are left with following problem, upon which TcT provides the 514.44/148.19 certificate YES(O(1),O(n^1)). 514.44/148.19 514.44/148.19 Strict DPs: 514.44/148.19 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.44/148.19 , activate^#(X) -> c_5(X) 514.44/148.19 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.44/148.19 , splitAt^#(s(N), cons(X, XS)) -> 514.44/148.19 c_3(U11^#(tt(), N, X, activate(XS))) 514.44/148.19 , splitAt^#(0(), XS) -> c_4(XS) 514.44/148.19 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.44/148.19 , snd^#(pair(X, Y)) -> c_8(Y) 514.44/148.19 , and^#(tt(), X) -> c_9(activate^#(X)) 514.44/148.19 , fst^#(pair(X, Y)) -> c_10(X) 514.44/148.19 , head^#(cons(N, XS)) -> c_11(N) 514.44/148.19 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.44/148.19 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.44/148.19 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.44/148.19 Strict Trs: 514.44/148.19 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.44/148.19 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.44/148.19 , splitAt(0(), XS) -> pair(nil(), XS) 514.44/148.19 , activate(X) -> X 514.44/148.19 , activate(n__natsFrom(X)) -> natsFrom(X) 514.44/148.19 , snd(pair(X, Y)) -> Y } 514.44/148.19 Weak DPs: 514.44/148.19 { U11^#(tt(), N, X, XS) -> 514.44/148.19 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.44/148.19 , natsFrom^#(N) -> c_12(N, N) 514.44/148.19 , natsFrom^#(X) -> c_13(X) } 514.44/148.19 Weak Trs: 514.44/148.19 { U11(tt(), N, X, XS) -> 514.44/148.19 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.44/148.19 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.44/148.19 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.44/148.19 , natsFrom(X) -> n__natsFrom(X) } 514.44/148.19 Obligation: 514.44/148.19 runtime complexity 514.44/148.19 Answer: 514.44/148.19 YES(O(1),O(n^1)) 514.44/148.19 514.44/148.19 The weightgap principle applies (using the following nonconstant 514.44/148.19 growth matrix-interpretation) 514.44/148.19 514.44/148.19 The following argument positions are usable: 514.44/148.19 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.44/148.19 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.44/148.19 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.44/148.19 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.44/148.19 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.44/148.19 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.44/148.19 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.44/148.19 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.44/148.19 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.44/148.19 514.44/148.19 TcT has computed the following matrix interpretation satisfying 514.44/148.19 not(EDA) and not(IDA(1)). 514.44/148.19 514.44/148.19 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [tt] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [activate](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 1] [0] 514.44/148.19 514.44/148.19 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.44/148.19 [0 0] [0 0] [4] 514.44/148.19 514.44/148.19 [snd](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [natsFrom](x1) = [1 0] x1 + [5] 514.44/148.19 [0 0] [6] 514.44/148.19 514.44/148.19 [n__natsFrom](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 514.44/148.19 [s](x1) = [0 0] x1 + [0] 514.44/148.19 [1 0] [0] 514.44/148.19 514.44/148.19 [0] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [nil] = [0] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_1](x1) = [1 0] x1 + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 514.44/148.19 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [3] 514.44/148.19 [0 1] [0 1] [0 1] [1] 514.44/148.19 514.44/148.19 [activate^#](x1) = [1 0] x1 + [4] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.44/148.19 [0 0] [0 0] [0] 514.44/148.19 514.44/148.19 [c_3](x1) = [1 0] x1 + [3] 514.44/148.19 [0 1] [3] 514.44/148.19 514.44/148.19 [c_4](x1) = [7] 514.44/148.19 [0] 514.44/148.19 514.44/148.19 [c_5](x1) = [1 0] x1 + [3] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_6](x1) = [1 0] x1 + [3] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [natsFrom^#](x1) = [7] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_7](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [snd^#](x1) = [1 0] x1 + [1] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_8](x1) = [1 0] x1 + [0] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [and^#](x1, x2) = [1 0] x2 + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_9](x1) = [1 0] x1 + [2] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [fst^#](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_10](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [head^#](x1) = [1 0] x1 + [0] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_11](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [c_12](x1, x2) = [7] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [c_13](x1) = [7] 514.44/148.19 [7] 514.44/148.19 514.44/148.19 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_14](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [tail^#](x1) = [1 0] x1 + [7] 514.44/148.19 [0 0] [7] 514.44/148.19 514.44/148.19 [c_15](x1) = [1 0] x1 + [6] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.44/148.19 [0 0] [0 0] [7] 514.44/148.19 514.44/148.19 [c_16](x1) = [1 0] x1 + [7] 514.44/148.19 [0 1] [7] 514.44/148.19 514.44/148.19 The order satisfies the following ordering constraints: 514.44/148.19 514.44/148.19 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.44/148.19 514.44/148.19 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.19 [0 0] [0 0] [0 1] [0] 514.44/148.19 = [pair(cons(activate(X), YS), ZS)] 514.44/148.19 514.44/148.19 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.19 [0 0] [0 0] [0 0] [0] 514.44/148.19 = [U11(tt(), N, X, activate(XS))] 514.44/148.19 514.44/148.19 [splitAt(0(), XS)] = [1 0] XS + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [1 0] XS + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 = [pair(nil(), XS)] 514.44/148.19 514.44/148.19 [activate(X)] = [1 0] X + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [1 0] X + [0] 514.44/148.19 [0 1] [0] 514.44/148.19 = [X] 514.44/148.19 514.44/148.19 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.44/148.19 [0 0] [0] 514.44/148.19 ? [1 0] X + [5] 514.44/148.19 [0 0] [6] 514.44/148.20 = [natsFrom(X)] 514.44/148.20 514.44/148.20 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.44/148.20 [0 0] [0 0] [4] 514.44/148.20 > [1 1] N + [1 0] XS + [0] 514.44/148.20 [0 0] [0 0] [0] 514.44/148.20 = [snd(splitAt(N, XS))] 514.44/148.20 514.44/148.20 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.44/148.20 [0 0] [0 0] [0] 514.44/148.20 ? [1 0] Y + [0] 514.44/148.20 [0 1] [0] 514.44/148.20 = [Y] 514.44/148.20 514.44/148.20 [natsFrom(N)] = [1 0] N + [5] 514.44/148.20 [0 0] [6] 514.44/148.20 > [1 0] N + [0] 514.44/148.20 [0 0] [0] 514.44/148.20 = [cons(N, n__natsFrom(s(N)))] 514.44/148.20 514.44/148.20 [natsFrom(X)] = [1 0] X + [5] 514.44/148.20 [0 0] [6] 514.44/148.20 > [1 0] X + [0] 514.44/148.20 [0 0] [0] 514.44/148.20 = [n__natsFrom(X)] 514.44/148.20 514.44/148.20 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.20 [0 0] [0 0] [0 0] [0] 514.44/148.20 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.20 [0 0] [0 0] [0 0] [0] 514.44/148.20 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.44/148.20 514.44/148.20 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.44/148.20 [0 0] [0 0] [0 0] [0] 514.44/148.20 ? [1 0] X + [1 0] YS + [1 0] ZS + [7] 514.44/148.20 [0 0] [0 1] [0 1] [8] 514.44/148.20 = [c_2(activate^#(X), YS, ZS)] 514.44/148.20 514.44/148.20 [activate^#(X)] = [1 0] X + [4] 514.44/148.20 [0 0] [7] 514.44/148.20 ? [1 0] X + [3] 514.44/148.20 [0 1] [7] 514.44/148.20 = [c_5(X)] 514.44/148.20 514.44/148.20 [activate^#(n__natsFrom(X))] = [1 0] X + [4] 514.44/148.20 [0 0] [7] 514.44/148.20 ? [10] 514.44/148.20 [14] 514.44/148.20 = [c_6(natsFrom^#(X))] 514.44/148.20 514.44/148.20 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.44/148.20 [0 0] [0 0] [0 0] [0] 514.44/148.20 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.44/148.20 [0 0] [0 0] [0 0] [3] 514.44/148.20 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.44/148.20 514.44/148.20 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.44/148.20 [0 0] [0] 514.44/148.20 ? [7] 514.44/148.20 [0] 514.44/148.20 = [c_4(XS)] 514.44/148.20 514.44/148.20 [natsFrom^#(N)] = [7] 514.44/148.20 [7] 514.44/148.20 >= [7] 514.44/148.20 [7] 514.44/148.20 = [c_12(N, N)] 514.44/148.20 514.44/148.20 [natsFrom^#(X)] = [7] 514.44/148.20 [7] 514.44/148.20 >= [7] 514.44/148.20 [7] 514.44/148.20 = [c_13(X)] 514.44/148.20 514.44/148.20 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.44/148.20 [0 0] [0 0] [7] 514.44/148.20 ? [1 1] N + [1 0] XS + [8] 514.44/148.20 [0 0] [0 0] [14] 514.44/148.20 = [c_7(snd^#(splitAt(N, XS)))] 514.44/148.20 514.44/148.20 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [1] 514.44/148.20 [0 0] [0 1] [7] 514.68/148.20 > [1 0] Y + [0] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_8(Y)] 514.68/148.20 514.68/148.20 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.20 [0 0] [7] 514.68/148.20 ? [1 0] X + [6] 514.68/148.20 [0 0] [14] 514.68/148.20 = [c_9(activate^#(X))] 514.68/148.20 514.68/148.20 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] X + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_10(X)] 514.68/148.20 514.68/148.20 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] N + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_11(N)] 514.68/148.20 514.68/148.20 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 1] N + [1 0] XS + [11] 514.68/148.20 [0 0] [0 0] [14] 514.68/148.20 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.20 514.68/148.20 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] XS + [10] 514.68/148.20 [0 0] [14] 514.68/148.20 = [c_15(activate^#(XS))] 514.68/148.20 514.68/148.20 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [14] 514.68/148.20 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.20 514.68/148.20 514.68/148.20 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.20 514.68/148.20 We are left with following problem, upon which TcT provides the 514.68/148.20 certificate YES(O(1),O(n^1)). 514.68/148.20 514.68/148.20 Strict DPs: 514.68/148.20 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.20 , activate^#(X) -> c_5(X) 514.68/148.20 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.20 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.20 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.20 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.20 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.20 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.20 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.20 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.20 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.20 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.20 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.20 Strict Trs: 514.68/148.20 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.20 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.20 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.20 , activate(X) -> X 514.68/148.20 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.20 , snd(pair(X, Y)) -> Y } 514.68/148.20 Weak DPs: 514.68/148.20 { U11^#(tt(), N, X, XS) -> 514.68/148.20 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.20 , natsFrom^#(N) -> c_12(N, N) 514.68/148.20 , natsFrom^#(X) -> c_13(X) 514.68/148.20 , snd^#(pair(X, Y)) -> c_8(Y) } 514.68/148.20 Weak Trs: 514.68/148.20 { U11(tt(), N, X, XS) -> 514.68/148.20 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.20 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.20 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.20 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.20 Obligation: 514.68/148.20 runtime complexity 514.68/148.20 Answer: 514.68/148.20 YES(O(1),O(n^1)) 514.68/148.20 514.68/148.20 The weightgap principle applies (using the following nonconstant 514.68/148.20 growth matrix-interpretation) 514.68/148.20 514.68/148.20 The following argument positions are usable: 514.68/148.20 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.20 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.20 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.20 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.20 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.20 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.20 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.20 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.20 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.20 514.68/148.20 TcT has computed the following matrix interpretation satisfying 514.68/148.20 not(EDA) and not(IDA(1)). 514.68/148.20 514.68/148.20 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [tt] = [0] 514.68/148.20 [0] 514.68/148.20 514.68/148.20 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [activate](x1) = [1 0] x1 + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 514.68/148.20 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 1] [0] 514.68/148.20 514.68/148.20 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.20 [0 0] [0 0] [4] 514.68/148.20 514.68/148.20 [snd](x1) = [1 0] x1 + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 514.68/148.20 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.20 [0 0] [4] 514.68/148.20 514.68/148.20 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 514.68/148.20 [s](x1) = [0 0] x1 + [0] 514.68/148.20 [1 0] [0] 514.68/148.20 514.68/148.20 [0] = [0] 514.68/148.20 [0] 514.68/148.20 514.68/148.20 [nil] = [0] 514.68/148.20 [0] 514.68/148.20 514.68/148.20 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [c_1](x1) = [1 0] x1 + [0] 514.68/148.20 [0 1] [0] 514.68/148.20 514.68/148.20 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.20 [0 1] [0 1] [0 1] [1] 514.68/148.20 514.68/148.20 [activate^#](x1) = [1 0] x1 + [4] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [c_3](x1) = [1 0] x1 + [3] 514.68/148.20 [0 1] [3] 514.68/148.20 514.68/148.20 [c_4](x1) = [7] 514.68/148.20 [0] 514.68/148.20 514.68/148.20 [c_5](x1) = [1 0] x1 + [3] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [c_6](x1) = [1 0] x1 + [3] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [natsFrom^#](x1) = [7] 514.68/148.20 [7] 514.68/148.20 514.68/148.20 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 514.68/148.20 [c_7](x1) = [1 0] x1 + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [snd^#](x1) = [1 0] x1 + [4] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [c_8](x1) = [1 0] x1 + [4] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.20 [0 0] [7] 514.68/148.20 514.68/148.20 [c_9](x1) = [1 0] x1 + [2] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.20 [0 0] [7] 514.68/148.20 514.68/148.20 [c_10](x1) = [1 0] x1 + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [head^#](x1) = [1 0] x1 + [0] 514.68/148.20 [0 0] [7] 514.68/148.20 514.68/148.20 [c_11](x1) = [1 0] x1 + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [c_12](x1, x2) = [7] 514.68/148.20 [7] 514.68/148.20 514.68/148.20 [c_13](x1) = [7] 514.68/148.20 [7] 514.68/148.20 514.68/148.20 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 514.68/148.20 [c_14](x1) = [1 0] x1 + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.20 [0 0] [7] 514.68/148.20 514.68/148.20 [c_15](x1) = [1 0] x1 + [2] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 514.68/148.20 [c_16](x1) = [1 0] x1 + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 514.68/148.20 The order satisfies the following ordering constraints: 514.68/148.20 514.68/148.20 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.20 514.68/148.20 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.20 [0 0] [0 0] [0 1] [0] 514.68/148.20 = [pair(cons(activate(X), YS), ZS)] 514.68/148.20 514.68/148.20 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 = [U11(tt(), N, X, activate(XS))] 514.68/148.20 514.68/148.20 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 ? [1 0] XS + [0] 514.68/148.20 [0 1] [0] 514.68/148.20 = [pair(nil(), XS)] 514.68/148.20 514.68/148.20 [activate(X)] = [1 0] X + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 ? [1 0] X + [0] 514.68/148.20 [0 1] [0] 514.68/148.20 = [X] 514.68/148.20 514.68/148.20 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 ? [1 0] X + [7] 514.68/148.20 [0 0] [4] 514.68/148.20 = [natsFrom(X)] 514.68/148.20 514.68/148.20 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.20 [0 0] [0 0] [4] 514.68/148.20 > [1 1] N + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 = [snd(splitAt(N, XS))] 514.68/148.20 514.68/148.20 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.20 [0 0] [0 0] [0] 514.68/148.20 ? [1 0] Y + [0] 514.68/148.20 [0 1] [0] 514.68/148.20 = [Y] 514.68/148.20 514.68/148.20 [natsFrom(N)] = [1 0] N + [7] 514.68/148.20 [0 0] [4] 514.68/148.20 > [1 0] N + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 = [cons(N, n__natsFrom(s(N)))] 514.68/148.20 514.68/148.20 [natsFrom(X)] = [1 0] X + [7] 514.68/148.20 [0 0] [4] 514.68/148.20 > [1 0] X + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 = [n__natsFrom(X)] 514.68/148.20 514.68/148.20 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.20 514.68/148.20 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 ? [1 0] X + [1 0] YS + [1 0] ZS + [11] 514.68/148.20 [0 1] [0 1] [0 1] [8] 514.68/148.20 = [c_2(activate^#(X), YS, ZS)] 514.68/148.20 514.68/148.20 [activate^#(X)] = [1 0] X + [4] 514.68/148.20 [0 1] [7] 514.68/148.20 > [1 0] X + [3] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_5(X)] 514.68/148.20 514.68/148.20 [activate^#(n__natsFrom(X))] = [1 0] X + [4] 514.68/148.20 [0 0] [7] 514.68/148.20 ? [10] 514.68/148.20 [14] 514.68/148.20 = [c_6(natsFrom^#(X))] 514.68/148.20 514.68/148.20 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.20 [0 0] [0 0] [0 0] [3] 514.68/148.20 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.20 514.68/148.20 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.20 [0 0] [0] 514.68/148.20 ? [7] 514.68/148.20 [0] 514.68/148.20 = [c_4(XS)] 514.68/148.20 514.68/148.20 [natsFrom^#(N)] = [7] 514.68/148.20 [7] 514.68/148.20 >= [7] 514.68/148.20 [7] 514.68/148.20 = [c_12(N, N)] 514.68/148.20 514.68/148.20 [natsFrom^#(X)] = [7] 514.68/148.20 [7] 514.68/148.20 >= [7] 514.68/148.20 [7] 514.68/148.20 = [c_13(X)] 514.68/148.20 514.68/148.20 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 1] N + [1 0] XS + [11] 514.68/148.20 [0 0] [0 0] [14] 514.68/148.20 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.20 514.68/148.20 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [4] 514.68/148.20 [0 0] [0 1] [7] 514.68/148.20 >= [1 0] Y + [4] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_8(Y)] 514.68/148.20 514.68/148.20 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.20 [0 0] [7] 514.68/148.20 ? [1 0] X + [6] 514.68/148.20 [0 1] [14] 514.68/148.20 = [c_9(activate^#(X))] 514.68/148.20 514.68/148.20 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] X + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_10(X)] 514.68/148.20 514.68/148.20 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] N + [7] 514.68/148.20 [0 1] [7] 514.68/148.20 = [c_11(N)] 514.68/148.20 514.68/148.20 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 1] N + [1 0] XS + [11] 514.68/148.20 [0 0] [0 0] [14] 514.68/148.20 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.20 514.68/148.20 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 0] XS + [6] 514.68/148.20 [0 1] [14] 514.68/148.20 = [c_15(activate^#(XS))] 514.68/148.20 514.68/148.20 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [7] 514.68/148.20 ? [1 1] N + [1 0] XS + [7] 514.68/148.20 [0 0] [0 0] [14] 514.68/148.20 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.20 514.68/148.20 514.68/148.20 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.20 514.68/148.20 We are left with following problem, upon which TcT provides the 514.68/148.20 certificate YES(O(1),O(n^1)). 514.68/148.20 514.68/148.20 Strict DPs: 514.68/148.20 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.20 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.20 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.20 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.20 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.20 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.20 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.20 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.20 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.20 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.20 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.20 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.20 Strict Trs: 514.68/148.20 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.20 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.20 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.20 , activate(X) -> X 514.68/148.20 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.20 , snd(pair(X, Y)) -> Y } 514.68/148.20 Weak DPs: 514.68/148.20 { U11^#(tt(), N, X, XS) -> 514.68/148.20 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.20 , activate^#(X) -> c_5(X) 514.68/148.20 , natsFrom^#(N) -> c_12(N, N) 514.68/148.20 , natsFrom^#(X) -> c_13(X) 514.68/148.20 , snd^#(pair(X, Y)) -> c_8(Y) } 514.68/148.20 Weak Trs: 514.68/148.20 { U11(tt(), N, X, XS) -> 514.68/148.20 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.20 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.20 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.20 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.20 Obligation: 514.68/148.20 runtime complexity 514.68/148.20 Answer: 514.68/148.20 YES(O(1),O(n^1)) 514.68/148.20 514.68/148.20 The weightgap principle applies (using the following nonconstant 514.68/148.20 growth matrix-interpretation) 514.68/148.20 514.68/148.20 The following argument positions are usable: 514.68/148.20 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.20 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.20 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.20 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.20 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.20 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.20 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.20 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.20 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.20 514.68/148.20 TcT has computed the following matrix interpretation satisfying 514.68/148.20 not(EDA) and not(IDA(1)). 514.68/148.20 514.68/148.20 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.20 [0 0] [0 0] [0 0] [0] 514.68/148.20 514.68/148.20 [tt] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [activate](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 514.68/148.21 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 1] [0] 514.68/148.21 514.68/148.21 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.21 [0 0] [0 0] [4] 514.68/148.21 514.68/148.21 [snd](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 514.68/148.21 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.21 [0 0] [4] 514.68/148.21 514.68/148.21 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 514.68/148.21 [s](x1) = [0 0] x1 + [0] 514.68/148.21 [1 0] [0] 514.68/148.21 514.68/148.21 [0] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [nil] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_1](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 514.68/148.21 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.21 [0 1] [0 1] [0 1] [1] 514.68/148.21 514.68/148.21 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_3](x1) = [1 0] x1 + [3] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_4](x1) = [7] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [c_5](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_6](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [natsFrom^#](x1) = [7] 514.68/148.21 [7] 514.68/148.21 514.68/148.21 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_7](x1) = [1 0] x1 + [3] 514.68/148.21 [0 1] [0] 514.68/148.21 514.68/148.21 [snd^#](x1) = [1 0] x1 + [1] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_8](x1) = [1 0] x1 + [1] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_9](x1) = [1 0] x1 + [6] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_10](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [head^#](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_11](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_12](x1, x2) = [7] 514.68/148.21 [7] 514.68/148.21 514.68/148.21 [c_13](x1) = [7] 514.68/148.21 [7] 514.68/148.21 514.68/148.21 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_14](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_15](x1) = [1 0] x1 + [6] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_16](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 The order satisfies the following ordering constraints: 514.68/148.21 514.68/148.21 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.21 514.68/148.21 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 1] [0] 514.68/148.21 = [pair(cons(activate(X), YS), ZS)] 514.68/148.21 514.68/148.21 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [U11(tt(), N, X, activate(XS))] 514.68/148.21 514.68/148.21 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] XS + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [pair(nil(), XS)] 514.68/148.21 514.68/148.21 [activate(X)] = [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] X + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [X] 514.68/148.21 514.68/148.21 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] X + [7] 514.68/148.21 [0 0] [4] 514.68/148.21 = [natsFrom(X)] 514.68/148.21 514.68/148.21 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.21 [0 0] [0 0] [4] 514.68/148.21 > [1 1] N + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 = [snd(splitAt(N, XS))] 514.68/148.21 514.68/148.21 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 ? [1 0] Y + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [Y] 514.68/148.21 514.68/148.21 [natsFrom(N)] = [1 0] N + [7] 514.68/148.21 [0 0] [4] 514.68/148.21 > [1 0] N + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 = [cons(N, n__natsFrom(s(N)))] 514.68/148.21 514.68/148.21 [natsFrom(X)] = [1 0] X + [7] 514.68/148.21 [0 0] [4] 514.68/148.21 > [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 = [n__natsFrom(X)] 514.68/148.21 514.68/148.21 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.21 514.68/148.21 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] X + [1 0] YS + [1 0] ZS + [7] 514.68/148.21 [0 1] [0 1] [0 1] [8] 514.68/148.21 = [c_2(activate^#(X), YS, ZS)] 514.68/148.21 514.68/148.21 [activate^#(X)] = [1 0] X + [0] 514.68/148.21 [0 1] [7] 514.68/148.21 >= [1 0] X + [0] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_5(X)] 514.68/148.21 514.68/148.21 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.21 [0 0] [7] 514.68/148.21 ? [14] 514.68/148.21 [14] 514.68/148.21 = [c_6(natsFrom^#(X))] 514.68/148.21 514.68/148.21 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.21 [0 0] [0 0] [0 0] [7] 514.68/148.21 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.21 514.68/148.21 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [7] 514.68/148.21 [0] 514.68/148.21 = [c_4(XS)] 514.68/148.21 514.68/148.21 [natsFrom^#(N)] = [7] 514.68/148.21 [7] 514.68/148.21 >= [7] 514.68/148.21 [7] 514.68/148.21 = [c_12(N, N)] 514.68/148.21 514.68/148.21 [natsFrom^#(X)] = [7] 514.68/148.21 [7] 514.68/148.21 >= [7] 514.68/148.21 [7] 514.68/148.21 = [c_13(X)] 514.68/148.21 514.68/148.21 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 > [1 1] N + [1 0] XS + [4] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.21 514.68/148.21 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [1] 514.68/148.21 [0 0] [0 1] [7] 514.68/148.21 >= [1 0] Y + [1] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_8(Y)] 514.68/148.21 514.68/148.21 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 ? [1 0] X + [6] 514.68/148.21 [0 1] [14] 514.68/148.21 = [c_9(activate^#(X))] 514.68/148.21 514.68/148.21 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 0] X + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_10(X)] 514.68/148.21 514.68/148.21 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 0] N + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_11(N)] 514.68/148.21 514.68/148.21 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 1] N + [1 0] XS + [11] 514.68/148.21 [0 0] [0 0] [14] 514.68/148.21 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.21 514.68/148.21 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 0] XS + [6] 514.68/148.21 [0 1] [14] 514.68/148.21 = [c_15(activate^#(XS))] 514.68/148.21 514.68/148.21 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [14] 514.68/148.21 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.21 514.68/148.21 514.68/148.21 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.21 514.68/148.21 We are left with following problem, upon which TcT provides the 514.68/148.21 certificate YES(O(1),O(n^1)). 514.68/148.21 514.68/148.21 Strict DPs: 514.68/148.21 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.21 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.21 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.21 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.21 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.21 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.21 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.21 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.21 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.21 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.21 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.21 Strict Trs: 514.68/148.21 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.21 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.21 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.21 , activate(X) -> X 514.68/148.21 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.21 , snd(pair(X, Y)) -> Y } 514.68/148.21 Weak DPs: 514.68/148.21 { U11^#(tt(), N, X, XS) -> 514.68/148.21 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.21 , activate^#(X) -> c_5(X) 514.68/148.21 , natsFrom^#(N) -> c_12(N, N) 514.68/148.21 , natsFrom^#(X) -> c_13(X) 514.68/148.21 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.21 , snd^#(pair(X, Y)) -> c_8(Y) } 514.68/148.21 Weak Trs: 514.68/148.21 { U11(tt(), N, X, XS) -> 514.68/148.21 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.21 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.21 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.21 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.21 Obligation: 514.68/148.21 runtime complexity 514.68/148.21 Answer: 514.68/148.21 YES(O(1),O(n^1)) 514.68/148.21 514.68/148.21 The weightgap principle applies (using the following nonconstant 514.68/148.21 growth matrix-interpretation) 514.68/148.21 514.68/148.21 The following argument positions are usable: 514.68/148.21 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.21 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.21 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.21 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.21 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.21 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.21 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.21 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.21 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.21 514.68/148.21 TcT has computed the following matrix interpretation satisfying 514.68/148.21 not(EDA) and not(IDA(1)). 514.68/148.21 514.68/148.21 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [tt] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [activate](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 514.68/148.21 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 1] [0] 514.68/148.21 514.68/148.21 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 1] [0 0] [0] 514.68/148.21 514.68/148.21 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.21 [0 0] [0 0] [4] 514.68/148.21 514.68/148.21 [snd](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 514.68/148.21 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 514.68/148.21 [s](x1) = [0 0] x1 + [0] 514.68/148.21 [1 0] [0] 514.68/148.21 514.68/148.21 [0] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [nil] = [0] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_1](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 514.68/148.21 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.21 [0 1] [0 1] [0 1] [1] 514.68/148.21 514.68/148.21 [activate^#](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 514.68/148.21 [c_3](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [3] 514.68/148.21 514.68/148.21 [c_4](x1) = [7] 514.68/148.21 [0] 514.68/148.21 514.68/148.21 [c_5](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_6](x1) = [1 0] x1 + [3] 514.68/148.21 [0 1] [3] 514.68/148.21 514.68/148.21 [natsFrom^#](x1) = [3] 514.68/148.21 [3] 514.68/148.21 514.68/148.21 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_7](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 514.68/148.21 [snd^#](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [c_8](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_9](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_10](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [head^#](x1) = [1 0] x1 + [0] 514.68/148.21 [0 1] [3] 514.68/148.21 514.68/148.21 [c_11](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [3] 514.68/148.21 514.68/148.21 [c_12](x1, x2) = [3] 514.68/148.21 [3] 514.68/148.21 514.68/148.21 [c_13](x1) = [3] 514.68/148.21 [3] 514.68/148.21 514.68/148.21 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_14](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 514.68/148.21 [c_15](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 514.68/148.21 [c_16](x1) = [1 0] x1 + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 514.68/148.21 The order satisfies the following ordering constraints: 514.68/148.21 514.68/148.21 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.21 514.68/148.21 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 1] [0] 514.68/148.21 = [pair(cons(activate(X), YS), ZS)] 514.68/148.21 514.68/148.21 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [U11(tt(), N, X, activate(XS))] 514.68/148.21 514.68/148.21 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] XS + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [pair(nil(), XS)] 514.68/148.21 514.68/148.21 [activate(X)] = [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] X + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [X] 514.68/148.21 514.68/148.21 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [1 0] X + [5] 514.68/148.21 [0 1] [7] 514.68/148.21 = [natsFrom(X)] 514.68/148.21 514.68/148.21 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.21 [0 0] [0 0] [4] 514.68/148.21 > [1 1] N + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0] 514.68/148.21 = [snd(splitAt(N, XS))] 514.68/148.21 514.68/148.21 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.21 [0 0] [0 1] [0] 514.68/148.21 >= [1 0] Y + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [Y] 514.68/148.21 514.68/148.21 [natsFrom(N)] = [1 0] N + [5] 514.68/148.21 [0 1] [7] 514.68/148.21 > [1 0] N + [0] 514.68/148.21 [0 1] [0] 514.68/148.21 = [cons(N, n__natsFrom(s(N)))] 514.68/148.21 514.68/148.21 [natsFrom(X)] = [1 0] X + [5] 514.68/148.21 [0 1] [7] 514.68/148.21 > [1 0] X + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 = [n__natsFrom(X)] 514.68/148.21 514.68/148.21 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.21 514.68/148.21 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] X + [1 0] YS + [1 0] ZS + [14] 514.68/148.21 [0 1] [0 1] [0 1] [8] 514.68/148.21 = [c_2(activate^#(X), YS, ZS)] 514.68/148.21 514.68/148.21 [activate^#(X)] = [1 0] X + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 >= [1 0] X + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_5(X)] 514.68/148.21 514.68/148.21 [activate^#(n__natsFrom(X))] = [1 0] X + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 > [6] 514.68/148.21 [6] 514.68/148.21 = [c_6(natsFrom^#(X))] 514.68/148.21 514.68/148.21 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.21 [0 0] [0 0] [0 0] [0] 514.68/148.21 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [0 0] [3] 514.68/148.21 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.21 514.68/148.21 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.21 [0 0] [0] 514.68/148.21 ? [7] 514.68/148.21 [0] 514.68/148.21 = [c_4(XS)] 514.68/148.21 514.68/148.21 [natsFrom^#(N)] = [3] 514.68/148.21 [3] 514.68/148.21 >= [3] 514.68/148.21 [3] 514.68/148.21 = [c_12(N, N)] 514.68/148.21 514.68/148.21 [natsFrom^#(X)] = [3] 514.68/148.21 [3] 514.68/148.21 >= [3] 514.68/148.21 [3] 514.68/148.21 = [c_13(X)] 514.68/148.21 514.68/148.21 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 >= [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.21 514.68/148.21 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.21 [0 0] [0 1] [7] 514.68/148.21 >= [1 0] Y + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_8(Y)] 514.68/148.21 514.68/148.21 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.21 [0 0] [7] 514.68/148.21 ? [1 0] X + [14] 514.68/148.21 [0 1] [14] 514.68/148.21 = [c_9(activate^#(X))] 514.68/148.21 514.68/148.21 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 0] X + [7] 514.68/148.21 [0 1] [7] 514.68/148.21 = [c_10(X)] 514.68/148.21 514.68/148.21 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.21 [0 1] [0 0] [3] 514.68/148.21 ? [1 0] N + [7] 514.68/148.21 [0 1] [3] 514.68/148.21 = [c_11(N)] 514.68/148.21 514.68/148.21 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 1] N + [1 0] XS + [11] 514.68/148.21 [0 0] [0 0] [14] 514.68/148.21 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.21 514.68/148.21 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.21 [0 0] [0 0] [7] 514.68/148.21 ? [1 0] XS + [14] 514.68/148.21 [0 1] [14] 514.68/148.22 = [c_15(activate^#(XS))] 514.68/148.22 514.68/148.22 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [14] 514.68/148.22 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.22 514.68/148.22 514.68/148.22 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.22 514.68/148.22 We are left with following problem, upon which TcT provides the 514.68/148.22 certificate YES(O(1),O(n^1)). 514.68/148.22 514.68/148.22 Strict DPs: 514.68/148.22 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.22 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.22 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.22 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.22 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.22 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.22 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.22 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.22 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.22 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.22 Strict Trs: 514.68/148.22 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.22 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.22 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.22 , activate(X) -> X 514.68/148.22 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.22 , snd(pair(X, Y)) -> Y } 514.68/148.22 Weak DPs: 514.68/148.22 { U11^#(tt(), N, X, XS) -> 514.68/148.22 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.22 , activate^#(X) -> c_5(X) 514.68/148.22 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.22 , natsFrom^#(N) -> c_12(N, N) 514.68/148.22 , natsFrom^#(X) -> c_13(X) 514.68/148.22 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.22 , snd^#(pair(X, Y)) -> c_8(Y) } 514.68/148.22 Weak Trs: 514.68/148.22 { U11(tt(), N, X, XS) -> 514.68/148.22 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.22 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.22 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.22 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.22 Obligation: 514.68/148.22 runtime complexity 514.68/148.22 Answer: 514.68/148.22 YES(O(1),O(n^1)) 514.68/148.22 514.68/148.22 The weightgap principle applies (using the following nonconstant 514.68/148.22 growth matrix-interpretation) 514.68/148.22 514.68/148.22 The following argument positions are usable: 514.68/148.22 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.22 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.22 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.22 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.22 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.22 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.22 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.22 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.22 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.22 514.68/148.22 TcT has computed the following matrix interpretation satisfying 514.68/148.22 not(EDA) and not(IDA(1)). 514.68/148.22 514.68/148.22 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [tt] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [activate](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 1] [0] 514.68/148.22 514.68/148.22 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.22 [0 0] [0 0] [4] 514.68/148.22 514.68/148.22 [snd](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [s](x1) = [0 0] x1 + [0] 514.68/148.22 [1 0] [0] 514.68/148.22 514.68/148.22 [0] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [nil] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_1](x1) = [1 0] x1 + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.22 [0 1] [0 1] [0 1] [1] 514.68/148.22 514.68/148.22 [activate^#](x1) = [1 0] x1 + [1] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_3](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_4](x1) = [7] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [c_5](x1) = [1 0] x1 + [1] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_6](x1) = [1 0] x1 + [1] 514.68/148.22 [0 1] [3] 514.68/148.22 514.68/148.22 [natsFrom^#](x1) = [0] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_7](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [3] 514.68/148.22 514.68/148.22 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [3] 514.68/148.22 514.68/148.22 [c_8](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [3] 514.68/148.22 514.68/148.22 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_9](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_10](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [head^#](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_11](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_12](x1, x2) = [0] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [c_13](x1) = [0] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_14](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_15](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_16](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 The order satisfies the following ordering constraints: 514.68/148.22 514.68/148.22 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.22 514.68/148.22 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 1] [0] 514.68/148.22 = [pair(cons(activate(X), YS), ZS)] 514.68/148.22 514.68/148.22 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [U11(tt(), N, X, activate(XS))] 514.68/148.22 514.68/148.22 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] XS + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [pair(nil(), XS)] 514.68/148.22 514.68/148.22 [activate(X)] = [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] X + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [X] 514.68/148.22 514.68/148.22 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] X + [5] 514.68/148.22 [0 0] [7] 514.68/148.22 = [natsFrom(X)] 514.68/148.22 514.68/148.22 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.22 [0 0] [0 0] [4] 514.68/148.22 > [1 1] N + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 = [snd(splitAt(N, XS))] 514.68/148.22 514.68/148.22 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 ? [1 0] Y + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [Y] 514.68/148.22 514.68/148.22 [natsFrom(N)] = [1 0] N + [5] 514.68/148.22 [0 0] [7] 514.68/148.22 > [1 0] N + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 = [cons(N, n__natsFrom(s(N)))] 514.68/148.22 514.68/148.22 [natsFrom(X)] = [1 0] X + [5] 514.68/148.22 [0 0] [7] 514.68/148.22 > [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 = [n__natsFrom(X)] 514.68/148.22 514.68/148.22 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.22 514.68/148.22 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] X + [1 0] YS + [1 0] ZS + [8] 514.68/148.22 [0 1] [0 1] [0 1] [8] 514.68/148.22 = [c_2(activate^#(X), YS, ZS)] 514.68/148.22 514.68/148.22 [activate^#(X)] = [1 0] X + [1] 514.68/148.22 [0 1] [7] 514.68/148.22 >= [1 0] X + [1] 514.68/148.22 [0 1] [7] 514.68/148.22 = [c_5(X)] 514.68/148.22 514.68/148.22 [activate^#(n__natsFrom(X))] = [1 0] X + [1] 514.68/148.22 [0 0] [7] 514.68/148.22 >= [1] 514.68/148.22 [6] 514.68/148.22 = [c_6(natsFrom^#(X))] 514.68/148.22 514.68/148.22 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.22 [0 0] [0 0] [0 0] [7] 514.68/148.22 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.22 514.68/148.22 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [7] 514.68/148.22 [0] 514.68/148.22 = [c_4(XS)] 514.68/148.22 514.68/148.22 [natsFrom^#(N)] = [0] 514.68/148.22 [3] 514.68/148.22 >= [0] 514.68/148.22 [3] 514.68/148.22 = [c_12(N, N)] 514.68/148.22 514.68/148.22 [natsFrom^#(X)] = [0] 514.68/148.22 [3] 514.68/148.22 >= [0] 514.68/148.22 [3] 514.68/148.22 = [c_13(X)] 514.68/148.22 514.68/148.22 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 > [1 1] N + [1 0] XS + [6] 514.68/148.22 [0 0] [0 0] [6] 514.68/148.22 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.22 514.68/148.22 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.22 [0 0] [0 1] [3] 514.68/148.22 >= [1 0] Y + [3] 514.68/148.22 [0 1] [3] 514.68/148.22 = [c_8(Y)] 514.68/148.22 514.68/148.22 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 > [1 0] X + [4] 514.68/148.22 [0 1] [7] 514.68/148.22 = [c_9(activate^#(X))] 514.68/148.22 514.68/148.22 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 0] X + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 = [c_10(X)] 514.68/148.22 514.68/148.22 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 0] N + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 = [c_11(N)] 514.68/148.22 514.68/148.22 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 1] N + [1 0] XS + [11] 514.68/148.22 [0 0] [0 0] [14] 514.68/148.22 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.22 514.68/148.22 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 0] XS + [4] 514.68/148.22 [0 1] [14] 514.68/148.22 = [c_15(activate^#(XS))] 514.68/148.22 514.68/148.22 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 ? [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [14] 514.68/148.22 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.22 514.68/148.22 514.68/148.22 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.22 514.68/148.22 We are left with following problem, upon which TcT provides the 514.68/148.22 certificate YES(O(1),O(n^1)). 514.68/148.22 514.68/148.22 Strict DPs: 514.68/148.22 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.22 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.22 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.22 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.22 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.22 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.22 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.22 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.22 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.22 Strict Trs: 514.68/148.22 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.22 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.22 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.22 , activate(X) -> X 514.68/148.22 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.22 , snd(pair(X, Y)) -> Y } 514.68/148.22 Weak DPs: 514.68/148.22 { U11^#(tt(), N, X, XS) -> 514.68/148.22 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.22 , activate^#(X) -> c_5(X) 514.68/148.22 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.22 , natsFrom^#(N) -> c_12(N, N) 514.68/148.22 , natsFrom^#(X) -> c_13(X) 514.68/148.22 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.22 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.22 , and^#(tt(), X) -> c_9(activate^#(X)) } 514.68/148.22 Weak Trs: 514.68/148.22 { U11(tt(), N, X, XS) -> 514.68/148.22 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.22 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.22 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.22 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.22 Obligation: 514.68/148.22 runtime complexity 514.68/148.22 Answer: 514.68/148.22 YES(O(1),O(n^1)) 514.68/148.22 514.68/148.22 The weightgap principle applies (using the following nonconstant 514.68/148.22 growth matrix-interpretation) 514.68/148.22 514.68/148.22 The following argument positions are usable: 514.68/148.22 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.22 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.22 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.22 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.22 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.22 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.22 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.22 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.22 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.22 514.68/148.22 TcT has computed the following matrix interpretation satisfying 514.68/148.22 not(EDA) and not(IDA(1)). 514.68/148.22 514.68/148.22 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [tt] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [activate](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 1] [0] 514.68/148.22 514.68/148.22 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.22 [0 0] [0 0] [4] 514.68/148.22 514.68/148.22 [snd](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.22 [0 0] [4] 514.68/148.22 514.68/148.22 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 514.68/148.22 [s](x1) = [0 0] x1 + [0] 514.68/148.22 [1 0] [0] 514.68/148.22 514.68/148.22 [0] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [nil] = [0] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_1](x1) = [1 0] x1 + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.22 [0 1] [0 1] [0 1] [1] 514.68/148.22 514.68/148.22 [activate^#](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 514.68/148.22 [c_3](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_4](x1) = [7] 514.68/148.22 [0] 514.68/148.22 514.68/148.22 [c_5](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_6](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [3] 514.68/148.22 514.68/148.22 [natsFrom^#](x1) = [3] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_7](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_8](x1) = [1 0] x1 + [3] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_9](x1) = [1 0] x1 + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_10](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [head^#](x1) = [1 0] x1 + [0] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_11](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [c_12](x1, x2) = [3] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [c_13](x1) = [3] 514.68/148.22 [3] 514.68/148.22 514.68/148.22 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_14](x1) = [1 0] x1 + [2] 514.68/148.22 [0 1] [0] 514.68/148.22 514.68/148.22 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.22 [0 0] [7] 514.68/148.22 514.68/148.22 [c_15](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 514.68/148.22 [c_16](x1) = [1 0] x1 + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 514.68/148.22 The order satisfies the following ordering constraints: 514.68/148.22 514.68/148.22 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.22 514.68/148.22 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 1] [0] 514.68/148.22 = [pair(cons(activate(X), YS), ZS)] 514.68/148.22 514.68/148.22 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [U11(tt(), N, X, activate(XS))] 514.68/148.22 514.68/148.22 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] XS + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [pair(nil(), XS)] 514.68/148.22 514.68/148.22 [activate(X)] = [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] X + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [X] 514.68/148.22 514.68/148.22 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [1 0] X + [7] 514.68/148.22 [0 0] [4] 514.68/148.22 = [natsFrom(X)] 514.68/148.22 514.68/148.22 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.22 [0 0] [0 0] [4] 514.68/148.22 > [1 1] N + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 = [snd(splitAt(N, XS))] 514.68/148.22 514.68/148.22 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.22 [0 0] [0 0] [0] 514.68/148.22 ? [1 0] Y + [0] 514.68/148.22 [0 1] [0] 514.68/148.22 = [Y] 514.68/148.22 514.68/148.22 [natsFrom(N)] = [1 0] N + [7] 514.68/148.22 [0 0] [4] 514.68/148.22 > [1 0] N + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 = [cons(N, n__natsFrom(s(N)))] 514.68/148.22 514.68/148.22 [natsFrom(X)] = [1 0] X + [7] 514.68/148.22 [0 0] [4] 514.68/148.22 > [1 0] X + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 = [n__natsFrom(X)] 514.68/148.22 514.68/148.22 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.22 514.68/148.22 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] X + [1 0] YS + [1 0] ZS + [14] 514.68/148.22 [0 1] [0 1] [0 1] [8] 514.68/148.22 = [c_2(activate^#(X), YS, ZS)] 514.68/148.22 514.68/148.22 [activate^#(X)] = [1 0] X + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 >= [1 0] X + [7] 514.68/148.22 [0 1] [7] 514.68/148.22 = [c_5(X)] 514.68/148.22 514.68/148.22 [activate^#(n__natsFrom(X))] = [1 0] X + [7] 514.68/148.22 [0 0] [7] 514.68/148.22 > [6] 514.68/148.22 [6] 514.68/148.22 = [c_6(natsFrom^#(X))] 514.68/148.22 514.68/148.22 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.22 [0 0] [0 0] [0 0] [0] 514.68/148.22 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.22 [0 0] [0 0] [0 0] [7] 514.68/148.22 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.22 514.68/148.22 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.22 [0 0] [0] 514.68/148.22 ? [7] 514.68/148.22 [0] 514.68/148.22 = [c_4(XS)] 514.68/148.22 514.68/148.22 [natsFrom^#(N)] = [3] 514.68/148.22 [3] 514.68/148.22 >= [3] 514.68/148.22 [3] 514.68/148.22 = [c_12(N, N)] 514.68/148.22 514.68/148.22 [natsFrom^#(X)] = [3] 514.68/148.22 [3] 514.68/148.22 >= [3] 514.68/148.22 [3] 514.68/148.22 = [c_13(X)] 514.68/148.22 514.68/148.22 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 > [1 1] N + [1 0] XS + [6] 514.68/148.22 [0 0] [0 0] [7] 514.68/148.22 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.22 514.68/148.23 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.23 [0 0] [0 1] [7] 514.68/148.23 >= [1 0] Y + [3] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_8(Y)] 514.68/148.23 514.68/148.23 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 >= [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_9(activate^#(X))] 514.68/148.23 514.68/148.23 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_10(X)] 514.68/148.23 514.68/148.23 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 0] N + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_11(N)] 514.68/148.23 514.68/148.23 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 > [1 1] N + [1 0] XS + [6] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.23 514.68/148.23 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 0] XS + [14] 514.68/148.23 [0 1] [14] 514.68/148.23 = [c_15(activate^#(XS))] 514.68/148.23 514.68/148.23 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [14] 514.68/148.23 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.23 514.68/148.23 514.68/148.23 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.23 514.68/148.23 We are left with following problem, upon which TcT provides the 514.68/148.23 certificate YES(O(1),O(n^1)). 514.68/148.23 514.68/148.23 Strict DPs: 514.68/148.23 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.23 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.23 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.23 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.23 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.23 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.23 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.23 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.23 Strict Trs: 514.68/148.23 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.23 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.23 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.23 , activate(X) -> X 514.68/148.23 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.23 , snd(pair(X, Y)) -> Y } 514.68/148.23 Weak DPs: 514.68/148.23 { U11^#(tt(), N, X, XS) -> 514.68/148.23 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.23 , activate^#(X) -> c_5(X) 514.68/148.23 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.23 , natsFrom^#(N) -> c_12(N, N) 514.68/148.23 , natsFrom^#(X) -> c_13(X) 514.68/148.23 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.23 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.23 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.23 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) } 514.68/148.23 Weak Trs: 514.68/148.23 { U11(tt(), N, X, XS) -> 514.68/148.23 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.23 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.23 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.23 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.23 Obligation: 514.68/148.23 runtime complexity 514.68/148.23 Answer: 514.68/148.23 YES(O(1),O(n^1)) 514.68/148.23 514.68/148.23 The weightgap principle applies (using the following nonconstant 514.68/148.23 growth matrix-interpretation) 514.68/148.23 514.68/148.23 The following argument positions are usable: 514.68/148.23 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.23 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.23 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.23 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.23 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.23 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.23 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.23 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.23 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.23 514.68/148.23 TcT has computed the following matrix interpretation satisfying 514.68/148.23 not(EDA) and not(IDA(1)). 514.68/148.23 514.68/148.23 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [tt] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [activate](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 1] [0] 514.68/148.23 514.68/148.23 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.23 [0 0] [0 0] [4] 514.68/148.23 514.68/148.23 [snd](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.23 [0 0] [7] 514.68/148.23 514.68/148.23 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [s](x1) = [0 0] x1 + [0] 514.68/148.23 [1 0] [0] 514.68/148.23 514.68/148.23 [0] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [nil] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_1](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.23 [0 1] [0 1] [0 1] [1] 514.68/148.23 514.68/148.23 [activate^#](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_3](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [c_4](x1) = [7] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [c_5](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_6](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [natsFrom^#](x1) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_7](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [snd^#](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [c_8](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_9](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [7] 514.68/148.23 514.68/148.23 [c_10](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [head^#](x1) = [1 0] x1 + [1] 514.68/148.23 [0 0] [3] 514.68/148.23 514.68/148.23 [c_11](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [c_12](x1, x2) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [c_13](x1) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_14](x1) = [1 0] x1 + [1] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.23 [0 0] [7] 514.68/148.23 514.68/148.23 [c_15](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_16](x1) = [1 0] x1 + [6] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 The order satisfies the following ordering constraints: 514.68/148.23 514.68/148.23 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.23 514.68/148.23 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 1] [0] 514.68/148.23 = [pair(cons(activate(X), YS), ZS)] 514.68/148.23 514.68/148.23 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [U11(tt(), N, X, activate(XS))] 514.68/148.23 514.68/148.23 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] XS + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [pair(nil(), XS)] 514.68/148.23 514.68/148.23 [activate(X)] = [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] X + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [X] 514.68/148.23 514.68/148.23 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] X + [5] 514.68/148.23 [0 0] [7] 514.68/148.23 = [natsFrom(X)] 514.68/148.23 514.68/148.23 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.23 [0 0] [0 0] [4] 514.68/148.23 > [1 1] N + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 = [snd(splitAt(N, XS))] 514.68/148.23 514.68/148.23 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 ? [1 0] Y + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [Y] 514.68/148.23 514.68/148.23 [natsFrom(N)] = [1 0] N + [5] 514.68/148.23 [0 0] [7] 514.68/148.23 > [1 0] N + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 = [cons(N, n__natsFrom(s(N)))] 514.68/148.23 514.68/148.23 [natsFrom(X)] = [1 0] X + [5] 514.68/148.23 [0 0] [7] 514.68/148.23 > [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 = [n__natsFrom(X)] 514.68/148.23 514.68/148.23 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.23 514.68/148.23 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 ? [1 0] X + [1 0] YS + [1 0] ZS + [14] 514.68/148.23 [0 1] [0 1] [0 1] [8] 514.68/148.23 = [c_2(activate^#(X), YS, ZS)] 514.68/148.23 514.68/148.23 [activate^#(X)] = [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 >= [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_5(X)] 514.68/148.23 514.68/148.23 [activate^#(n__natsFrom(X))] = [1 0] X + [7] 514.68/148.23 [0 0] [7] 514.68/148.23 > [6] 514.68/148.23 [6] 514.68/148.23 = [c_6(natsFrom^#(X))] 514.68/148.23 514.68/148.23 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.23 [0 0] [0 0] [0 0] [3] 514.68/148.23 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.23 514.68/148.23 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [7] 514.68/148.23 [0] 514.68/148.23 = [c_4(XS)] 514.68/148.23 514.68/148.23 [natsFrom^#(N)] = [3] 514.68/148.23 [3] 514.68/148.23 >= [3] 514.68/148.23 [3] 514.68/148.23 = [c_12(N, N)] 514.68/148.23 514.68/148.23 [natsFrom^#(X)] = [3] 514.68/148.23 [3] 514.68/148.23 >= [3] 514.68/148.23 [3] 514.68/148.23 = [c_13(X)] 514.68/148.23 514.68/148.23 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 >= [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [6] 514.68/148.23 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.23 514.68/148.23 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.23 [0 0] [0 1] [3] 514.68/148.23 >= [1 0] Y + [7] 514.68/148.23 [0 1] [3] 514.68/148.23 = [c_8(Y)] 514.68/148.23 514.68/148.23 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 >= [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_9(activate^#(X))] 514.68/148.23 514.68/148.23 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_10(X)] 514.68/148.23 514.68/148.23 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [1] 514.68/148.23 [0 0] [0 0] [3] 514.68/148.23 ? [1 0] N + [0] 514.68/148.23 [0 1] [3] 514.68/148.23 = [c_11(N)] 514.68/148.23 514.68/148.23 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 > [1 1] N + [1 0] XS + [6] 514.68/148.23 [0 0] [0 0] [6] 514.68/148.23 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.23 514.68/148.23 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 ? [1 0] XS + [14] 514.68/148.23 [0 1] [14] 514.68/148.23 = [c_15(activate^#(XS))] 514.68/148.23 514.68/148.23 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 > [1 1] N + [1 0] XS + [6] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.23 514.68/148.23 514.68/148.23 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.23 514.68/148.23 We are left with following problem, upon which TcT provides the 514.68/148.23 certificate YES(O(1),O(n^1)). 514.68/148.23 514.68/148.23 Strict DPs: 514.68/148.23 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.23 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.23 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.23 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.23 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.23 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.23 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) } 514.68/148.23 Strict Trs: 514.68/148.23 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.23 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.23 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.23 , activate(X) -> X 514.68/148.23 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.23 , snd(pair(X, Y)) -> Y } 514.68/148.23 Weak DPs: 514.68/148.23 { U11^#(tt(), N, X, XS) -> 514.68/148.23 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.23 , activate^#(X) -> c_5(X) 514.68/148.23 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.23 , natsFrom^#(N) -> c_12(N, N) 514.68/148.23 , natsFrom^#(X) -> c_13(X) 514.68/148.23 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.23 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.23 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.23 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.23 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.23 Weak Trs: 514.68/148.23 { U11(tt(), N, X, XS) -> 514.68/148.23 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.23 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.23 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.23 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.23 Obligation: 514.68/148.23 runtime complexity 514.68/148.23 Answer: 514.68/148.23 YES(O(1),O(n^1)) 514.68/148.23 514.68/148.23 The weightgap principle applies (using the following nonconstant 514.68/148.23 growth matrix-interpretation) 514.68/148.23 514.68/148.23 The following argument positions are usable: 514.68/148.23 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.23 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.23 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.23 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.23 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.23 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.23 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.23 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.23 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.23 514.68/148.23 TcT has computed the following matrix interpretation satisfying 514.68/148.23 not(EDA) and not(IDA(1)). 514.68/148.23 514.68/148.23 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [tt] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [activate](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 1] [0] 514.68/148.23 514.68/148.23 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 1] [0 0] [0] 514.68/148.23 514.68/148.23 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.23 [0 0] [0 0] [4] 514.68/148.23 514.68/148.23 [snd](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [natsFrom](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [6] 514.68/148.23 514.68/148.23 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 514.68/148.23 [s](x1) = [0 0] x1 + [0] 514.68/148.23 [1 0] [0] 514.68/148.23 514.68/148.23 [0] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [nil] = [0] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_1](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [7] 514.68/148.23 [0 1] [0 1] [0 1] [1] 514.68/148.23 514.68/148.23 [activate^#](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 514.68/148.23 [c_3](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_4](x1) = [7] 514.68/148.23 [0] 514.68/148.23 514.68/148.23 [c_5](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_6](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [natsFrom^#](x1) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_7](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_8](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [c_9](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [fst^#](x1) = [1 0] x1 + [1] 514.68/148.23 [0 0] [7] 514.68/148.23 514.68/148.23 [c_10](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [head^#](x1) = [1 0] x1 + [1] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [c_11](x1) = [1 0] x1 + [0] 514.68/148.23 [0 1] [3] 514.68/148.23 514.68/148.23 [c_12](x1, x2) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [c_13](x1) = [3] 514.68/148.23 [3] 514.68/148.23 514.68/148.23 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_14](x1) = [1 0] x1 + [1] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.23 [0 0] [7] 514.68/148.23 514.68/148.23 [c_15](x1) = [1 0] x1 + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 514.68/148.23 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.23 [0 0] [0 0] [7] 514.68/148.23 514.68/148.23 [c_16](x1) = [1 0] x1 + [3] 514.68/148.23 [0 1] [0] 514.68/148.23 514.68/148.23 The order satisfies the following ordering constraints: 514.68/148.23 514.68/148.23 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.23 514.68/148.23 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 1] [0] 514.68/148.23 = [pair(cons(activate(X), YS), ZS)] 514.68/148.23 514.68/148.23 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [U11(tt(), N, X, activate(XS))] 514.68/148.23 514.68/148.23 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] XS + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [pair(nil(), XS)] 514.68/148.23 514.68/148.23 [activate(X)] = [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] X + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [X] 514.68/148.23 514.68/148.23 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 ? [1 0] X + [3] 514.68/148.23 [0 1] [6] 514.68/148.23 = [natsFrom(X)] 514.68/148.23 514.68/148.23 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.23 [0 0] [0 0] [4] 514.68/148.23 > [1 1] N + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 = [snd(splitAt(N, XS))] 514.68/148.23 514.68/148.23 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.23 [0 0] [0 0] [0] 514.68/148.23 ? [1 0] Y + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [Y] 514.68/148.23 514.68/148.23 [natsFrom(N)] = [1 0] N + [3] 514.68/148.23 [0 1] [6] 514.68/148.23 > [1 0] N + [0] 514.68/148.23 [0 1] [0] 514.68/148.23 = [cons(N, n__natsFrom(s(N)))] 514.68/148.23 514.68/148.23 [natsFrom(X)] = [1 0] X + [3] 514.68/148.23 [0 1] [6] 514.68/148.23 > [1 0] X + [0] 514.68/148.23 [0 0] [0] 514.68/148.23 = [n__natsFrom(X)] 514.68/148.23 514.68/148.23 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.23 514.68/148.23 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.23 [0 0] [0 0] [0 0] [0] 514.68/148.23 ? [1 0] X + [1 0] YS + [1 0] ZS + [14] 514.68/148.23 [0 1] [0 1] [0 1] [8] 514.68/148.23 = [c_2(activate^#(X), YS, ZS)] 514.68/148.23 514.68/148.23 [activate^#(X)] = [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 >= [1 0] X + [7] 514.68/148.23 [0 1] [7] 514.68/148.23 = [c_5(X)] 514.68/148.23 514.68/148.23 [activate^#(n__natsFrom(X))] = [1 0] X + [7] 514.68/148.23 [0 0] [7] 514.68/148.24 > [6] 514.68/148.24 [6] 514.68/148.24 = [c_6(natsFrom^#(X))] 514.68/148.24 514.68/148.24 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [0 0] [7] 514.68/148.24 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.24 514.68/148.24 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 ? [7] 514.68/148.24 [0] 514.68/148.24 = [c_4(XS)] 514.68/148.24 514.68/148.24 [natsFrom^#(N)] = [3] 514.68/148.24 [3] 514.68/148.24 >= [3] 514.68/148.24 [3] 514.68/148.24 = [c_12(N, N)] 514.68/148.24 514.68/148.24 [natsFrom^#(X)] = [3] 514.68/148.24 [3] 514.68/148.24 >= [3] 514.68/148.24 [3] 514.68/148.24 = [c_13(X)] 514.68/148.24 514.68/148.24 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 > [1 1] N + [1 0] XS + [6] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.24 514.68/148.24 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.24 [0 0] [0 1] [7] 514.68/148.24 >= [1 0] Y + [3] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_8(Y)] 514.68/148.24 514.68/148.24 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 >= [1 0] X + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_9(activate^#(X))] 514.68/148.24 514.68/148.24 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [1] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 ? [1 0] X + [0] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_10(X)] 514.68/148.24 514.68/148.24 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [1] 514.68/148.24 [0 1] [0 0] [3] 514.68/148.24 > [1 0] N + [0] 514.68/148.24 [0 1] [3] 514.68/148.24 = [c_11(N)] 514.68/148.24 514.68/148.24 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 > [1 1] N + [1 0] XS + [6] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.24 514.68/148.24 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 ? [1 0] XS + [14] 514.68/148.24 [0 1] [14] 514.68/148.24 = [c_15(activate^#(XS))] 514.68/148.24 514.68/148.24 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 > [1 1] N + [1 0] XS + [4] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.24 514.68/148.24 514.68/148.24 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.24 514.68/148.24 We are left with following problem, upon which TcT provides the 514.68/148.24 certificate YES(O(1),O(n^1)). 514.68/148.24 514.68/148.24 Strict DPs: 514.68/148.24 { U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.24 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.24 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.24 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.24 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.24 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) } 514.68/148.24 Strict Trs: 514.68/148.24 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.24 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.24 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.24 , activate(X) -> X 514.68/148.24 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.24 , snd(pair(X, Y)) -> Y } 514.68/148.24 Weak DPs: 514.68/148.24 { U11^#(tt(), N, X, XS) -> 514.68/148.24 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.24 , activate^#(X) -> c_5(X) 514.68/148.24 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.24 , natsFrom^#(N) -> c_12(N, N) 514.68/148.24 , natsFrom^#(X) -> c_13(X) 514.68/148.24 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.24 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.24 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.24 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.24 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.24 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.24 Weak Trs: 514.68/148.24 { U11(tt(), N, X, XS) -> 514.68/148.24 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.24 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.24 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.24 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.24 Obligation: 514.68/148.24 runtime complexity 514.68/148.24 Answer: 514.68/148.24 YES(O(1),O(n^1)) 514.68/148.24 514.68/148.24 The weightgap principle applies (using the following nonconstant 514.68/148.24 growth matrix-interpretation) 514.68/148.24 514.68/148.24 The following argument positions are usable: 514.68/148.24 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.24 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.24 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.24 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.24 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.24 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.24 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.24 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.24 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.24 514.68/148.24 TcT has computed the following matrix interpretation satisfying 514.68/148.24 not(EDA) and not(IDA(1)). 514.68/148.24 514.68/148.24 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [tt] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [activate](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 1] [0 0] [0] 514.68/148.24 514.68/148.24 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.24 [0 0] [0 0] [4] 514.68/148.24 514.68/148.24 [snd](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [s](x1) = [0 0] x1 + [0] 514.68/148.24 [1 0] [0] 514.68/148.24 514.68/148.24 [0] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [nil] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [1] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [c_1](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [1] 514.68/148.24 [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.24 [0 1] [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [c_3](x1) = [1 0] x1 + [1] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_4](x1) = [7] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [c_5](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [c_6](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [natsFrom^#](x1) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_7](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_8](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [c_9](x1) = [1 0] x1 + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [fst^#](x1) = [1 0] x1 + [1] 514.68/148.24 [0 0] [7] 514.68/148.24 514.68/148.24 [c_10](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [head^#](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_11](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_12](x1, x2) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [c_13](x1) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_14](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.24 [0 0] [7] 514.68/148.24 514.68/148.24 [c_15](x1) = [1 0] x1 + [6] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_16](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 The order satisfies the following ordering constraints: 514.68/148.24 514.68/148.24 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.24 514.68/148.24 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.24 [0 0] [0 0] [0 1] [0] 514.68/148.24 = [pair(cons(activate(X), YS), ZS)] 514.68/148.24 514.68/148.24 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 = [U11(tt(), N, X, activate(XS))] 514.68/148.24 514.68/148.24 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 ? [1 0] XS + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 = [pair(nil(), XS)] 514.68/148.24 514.68/148.24 [activate(X)] = [1 0] X + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 ? [1 0] X + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 = [X] 514.68/148.24 514.68/148.24 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 ? [1 0] X + [5] 514.68/148.24 [0 1] [7] 514.68/148.24 = [natsFrom(X)] 514.68/148.24 514.68/148.24 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.24 [0 0] [0 0] [4] 514.68/148.24 > [1 1] N + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 = [snd(splitAt(N, XS))] 514.68/148.24 514.68/148.24 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 ? [1 0] Y + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 = [Y] 514.68/148.24 514.68/148.24 [natsFrom(N)] = [1 0] N + [5] 514.68/148.24 [0 1] [7] 514.68/148.24 > [1 0] N + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 = [cons(N, n__natsFrom(s(N)))] 514.68/148.24 514.68/148.24 [natsFrom(X)] = [1 0] X + [5] 514.68/148.24 [0 1] [7] 514.68/148.24 > [1 0] X + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 = [n__natsFrom(X)] 514.68/148.24 514.68/148.24 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 >= [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.24 514.68/148.24 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [1] 514.68/148.24 [0 1] [0 1] [0 1] [0] 514.68/148.24 > [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.24 [0 1] [0 1] [0 1] [0] 514.68/148.24 = [c_2(activate^#(X), YS, ZS)] 514.68/148.24 514.68/148.24 [activate^#(X)] = [1 0] X + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 >= [1 0] X + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 = [c_5(X)] 514.68/148.24 514.68/148.24 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 >= [0] 514.68/148.24 [0] 514.68/148.24 = [c_6(natsFrom^#(X))] 514.68/148.24 514.68/148.24 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 ? [1 0] N + [1 0] X + [1 0] XS + [2] 514.68/148.24 [0 0] [0 0] [0 0] [3] 514.68/148.24 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.24 514.68/148.24 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 ? [7] 514.68/148.24 [0] 514.68/148.24 = [c_4(XS)] 514.68/148.24 514.68/148.24 [natsFrom^#(N)] = [0] 514.68/148.24 [0] 514.68/148.24 >= [0] 514.68/148.24 [0] 514.68/148.24 = [c_12(N, N)] 514.68/148.24 514.68/148.24 [natsFrom^#(X)] = [0] 514.68/148.24 [0] 514.68/148.24 >= [0] 514.68/148.24 [0] 514.68/148.24 = [c_13(X)] 514.68/148.24 514.68/148.24 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 > [1 1] N + [1 0] XS + [6] 514.68/148.24 [0 0] [0 0] [6] 514.68/148.24 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.24 514.68/148.24 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.24 [0 1] [0 1] [3] 514.68/148.24 >= [1 0] Y + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 = [c_8(Y)] 514.68/148.24 514.68/148.24 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 >= [1 0] X + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_9(activate^#(X))] 514.68/148.24 514.68/148.24 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [1] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 ? [1 0] X + [0] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_10(X)] 514.68/148.24 514.68/148.24 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.24 [0 1] [0 0] [3] 514.68/148.24 >= [1 0] N + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 = [c_11(N)] 514.68/148.24 514.68/148.24 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 >= [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.24 514.68/148.24 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 ? [1 0] XS + [6] 514.68/148.24 [0 1] [7] 514.68/148.24 = [c_15(activate^#(XS))] 514.68/148.24 514.68/148.24 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 > [1 1] N + [1 0] XS + [4] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.24 514.68/148.24 514.68/148.24 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.24 514.68/148.24 We are left with following problem, upon which TcT provides the 514.68/148.24 certificate YES(O(1),O(n^1)). 514.68/148.24 514.68/148.24 Strict DPs: 514.68/148.24 { splitAt^#(s(N), cons(X, XS)) -> 514.68/148.24 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.24 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.24 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.24 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) } 514.68/148.24 Strict Trs: 514.68/148.24 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.24 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.24 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.24 , activate(X) -> X 514.68/148.24 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.24 , snd(pair(X, Y)) -> Y } 514.68/148.24 Weak DPs: 514.68/148.24 { U11^#(tt(), N, X, XS) -> 514.68/148.24 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.24 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.24 , activate^#(X) -> c_5(X) 514.68/148.24 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.24 , natsFrom^#(N) -> c_12(N, N) 514.68/148.24 , natsFrom^#(X) -> c_13(X) 514.68/148.24 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.24 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.24 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.24 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.24 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.24 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.24 Weak Trs: 514.68/148.24 { U11(tt(), N, X, XS) -> 514.68/148.24 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.24 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.24 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.24 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.24 Obligation: 514.68/148.24 runtime complexity 514.68/148.24 Answer: 514.68/148.24 YES(O(1),O(n^1)) 514.68/148.24 514.68/148.24 The weightgap principle applies (using the following nonconstant 514.68/148.24 growth matrix-interpretation) 514.68/148.24 514.68/148.24 The following argument positions are usable: 514.68/148.24 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.24 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.24 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.24 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.24 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.24 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.24 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.24 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.24 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.24 514.68/148.24 TcT has computed the following matrix interpretation satisfying 514.68/148.24 not(EDA) and not(IDA(1)). 514.68/148.24 514.68/148.24 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [tt] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [activate](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 1] [0 0] [0] 514.68/148.24 514.68/148.24 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.24 [0 0] [0 0] [4] 514.68/148.24 514.68/148.24 [snd](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.24 [0 1] [6] 514.68/148.24 514.68/148.24 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.24 [0 0] [0] 514.68/148.24 514.68/148.24 [s](x1) = [0 0] x1 + [0] 514.68/148.24 [1 0] [0] 514.68/148.24 514.68/148.24 [0] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [nil] = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [c_1](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.24 [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.24 [0 1] [0 1] [0 1] [0] 514.68/148.24 514.68/148.24 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.24 [0 0] [0 0] [0] 514.68/148.24 514.68/148.24 [c_3](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_4](x1) = [7] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [c_5](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [c_6](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [natsFrom^#](x1) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_7](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [snd^#](x1) = [1 0] x1 + [7] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_8](x1) = [1 0] x1 + [7] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [c_9](x1) = [1 0] x1 + [7] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [fst^#](x1) = [1 0] x1 + [1] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [c_10](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [head^#](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_11](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [3] 514.68/148.24 514.68/148.24 [c_12](x1, x2) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [c_13](x1) = [0] 514.68/148.24 [0] 514.68/148.24 514.68/148.24 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_14](x1) = [1 0] x1 + [0] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.24 [0 0] [7] 514.68/148.24 514.68/148.24 [c_15](x1) = [1 0] x1 + [6] 514.68/148.24 [0 1] [7] 514.68/148.24 514.68/148.24 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.24 [0 0] [0 0] [7] 514.68/148.24 514.68/148.24 [c_16](x1) = [1 0] x1 + [3] 514.68/148.24 [0 1] [0] 514.68/148.24 514.68/148.24 The order satisfies the following ordering constraints: 514.68/148.24 514.68/148.24 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.24 [0 0] [0 0] [0 0] [0] 514.68/148.24 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.25 514.68/148.25 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 0] [0 0] [0 1] [0] 514.68/148.25 = [pair(cons(activate(X), YS), ZS)] 514.68/148.25 514.68/148.25 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 = [U11(tt(), N, X, activate(XS))] 514.68/148.25 514.68/148.25 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] XS + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [pair(nil(), XS)] 514.68/148.25 514.68/148.25 [activate(X)] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [X] 514.68/148.25 514.68/148.25 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] X + [7] 514.68/148.25 [0 1] [6] 514.68/148.25 = [natsFrom(X)] 514.68/148.25 514.68/148.25 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.25 [0 0] [0 0] [4] 514.68/148.25 > [1 1] N + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 = [snd(splitAt(N, XS))] 514.68/148.25 514.68/148.25 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 ? [1 0] Y + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [Y] 514.68/148.25 514.68/148.25 [natsFrom(N)] = [1 0] N + [7] 514.68/148.25 [0 1] [6] 514.68/148.25 > [1 0] N + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [cons(N, n__natsFrom(s(N)))] 514.68/148.25 514.68/148.25 [natsFrom(X)] = [1 0] X + [7] 514.68/148.25 [0 1] [6] 514.68/148.25 > [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 = [n__natsFrom(X)] 514.68/148.25 514.68/148.25 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.25 514.68/148.25 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 1] [0 1] [0 1] [0] 514.68/148.25 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 1] [0 1] [0 1] [0] 514.68/148.25 = [c_2(activate^#(X), YS, ZS)] 514.68/148.25 514.68/148.25 [activate^#(X)] = [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 >= [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [c_5(X)] 514.68/148.25 514.68/148.25 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_6(natsFrom^#(X))] 514.68/148.25 514.68/148.25 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.25 [0 0] [0 0] [0 0] [3] 514.68/148.25 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.25 514.68/148.25 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [7] 514.68/148.25 [0] 514.68/148.25 = [c_4(XS)] 514.68/148.25 514.68/148.25 [natsFrom^#(N)] = [0] 514.68/148.25 [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_12(N, N)] 514.68/148.25 514.68/148.25 [natsFrom^#(X)] = [0] 514.68/148.25 [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_13(X)] 514.68/148.25 514.68/148.25 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 >= [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [6] 514.68/148.25 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.25 514.68/148.25 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.25 [0 1] [0 1] [3] 514.68/148.25 >= [1 0] Y + [7] 514.68/148.25 [0 1] [3] 514.68/148.25 = [c_8(Y)] 514.68/148.25 514.68/148.25 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 >= [1 0] X + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_9(activate^#(X))] 514.68/148.25 514.68/148.25 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [1] 514.68/148.25 [0 1] [0 1] [7] 514.68/148.25 > [1 0] X + [0] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_10(X)] 514.68/148.25 514.68/148.25 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.25 [0 1] [0 0] [3] 514.68/148.25 >= [1 0] N + [3] 514.68/148.25 [0 1] [3] 514.68/148.25 = [c_11(N)] 514.68/148.25 514.68/148.25 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 >= [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.25 514.68/148.25 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 ? [1 0] XS + [6] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_15(activate^#(XS))] 514.68/148.25 514.68/148.25 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 > [1 1] N + [1 0] XS + [4] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.25 514.68/148.25 514.68/148.25 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.25 514.68/148.25 We are left with following problem, upon which TcT provides the 514.68/148.25 certificate YES(O(1),O(n^1)). 514.68/148.25 514.68/148.25 Strict DPs: 514.68/148.25 { splitAt^#(s(N), cons(X, XS)) -> 514.68/148.25 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.25 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.25 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) } 514.68/148.25 Strict Trs: 514.68/148.25 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.25 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.25 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.25 , activate(X) -> X 514.68/148.25 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.25 , snd(pair(X, Y)) -> Y } 514.68/148.25 Weak DPs: 514.68/148.25 { U11^#(tt(), N, X, XS) -> 514.68/148.25 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.25 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.25 , activate^#(X) -> c_5(X) 514.68/148.25 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.25 , natsFrom^#(N) -> c_12(N, N) 514.68/148.25 , natsFrom^#(X) -> c_13(X) 514.68/148.25 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.25 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.25 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.25 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.25 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.25 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.25 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.25 Weak Trs: 514.68/148.25 { U11(tt(), N, X, XS) -> 514.68/148.25 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.25 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.25 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.25 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.25 Obligation: 514.68/148.25 runtime complexity 514.68/148.25 Answer: 514.68/148.25 YES(O(1),O(n^1)) 514.68/148.25 514.68/148.25 The weightgap principle applies (using the following nonconstant 514.68/148.25 growth matrix-interpretation) 514.68/148.25 514.68/148.25 The following argument positions are usable: 514.68/148.25 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.25 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.25 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.25 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.25 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.25 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.25 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.25 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.25 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.25 514.68/148.25 TcT has computed the following matrix interpretation satisfying 514.68/148.25 not(EDA) and not(IDA(1)). 514.68/148.25 514.68/148.25 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [tt] = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [activate](x1) = [1 0] x1 + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 514.68/148.25 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.25 [0 0] [0 0] [4] 514.68/148.25 514.68/148.25 [snd](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [4] 514.68/148.25 514.68/148.25 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 514.68/148.25 [s](x1) = [0 0] x1 + [0] 514.68/148.25 [1 0] [0] 514.68/148.25 514.68/148.25 [0] = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [nil] = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [c_1](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.25 [0 1] [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [c_3](x1) = [1 0] x1 + [3] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [c_4](x1) = [7] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [c_5](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [c_6](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [natsFrom^#](x1) = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 514.68/148.25 [c_7](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [snd^#](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [c_8](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [c_9](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [fst^#](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [c_10](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [head^#](x1) = [1 0] x1 + [3] 514.68/148.25 [0 1] [3] 514.68/148.25 514.68/148.25 [c_11](x1) = [1 0] x1 + [3] 514.68/148.25 [0 1] [3] 514.68/148.25 514.68/148.25 [c_12](x1, x2) = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [c_13](x1) = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 514.68/148.25 [c_14](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [c_15](x1) = [1 0] x1 + [6] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 514.68/148.25 [c_16](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 The order satisfies the following ordering constraints: 514.68/148.25 514.68/148.25 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.25 514.68/148.25 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 0] [0 1] [0 1] [0] 514.68/148.25 = [pair(cons(activate(X), YS), ZS)] 514.68/148.25 514.68/148.25 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 = [U11(tt(), N, X, activate(XS))] 514.68/148.25 514.68/148.25 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] XS + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [pair(nil(), XS)] 514.68/148.25 514.68/148.25 [activate(X)] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [X] 514.68/148.25 514.68/148.25 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [1 0] X + [7] 514.68/148.25 [0 1] [4] 514.68/148.25 = [natsFrom(X)] 514.68/148.25 514.68/148.25 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.25 [0 0] [0 0] [4] 514.68/148.25 > [1 1] N + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 = [snd(splitAt(N, XS))] 514.68/148.25 514.68/148.25 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 >= [1 0] Y + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [Y] 514.68/148.25 514.68/148.25 [natsFrom(N)] = [1 0] N + [7] 514.68/148.25 [0 1] [4] 514.68/148.25 > [1 0] N + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [cons(N, n__natsFrom(s(N)))] 514.68/148.25 514.68/148.25 [natsFrom(X)] = [1 0] X + [7] 514.68/148.25 [0 1] [4] 514.68/148.25 > [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 = [n__natsFrom(X)] 514.68/148.25 514.68/148.25 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.25 514.68/148.25 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 1] [0 1] [0 1] [0] 514.68/148.25 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.25 [0 1] [0 1] [0 1] [0] 514.68/148.25 = [c_2(activate^#(X), YS, ZS)] 514.68/148.25 514.68/148.25 [activate^#(X)] = [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 >= [1 0] X + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 = [c_5(X)] 514.68/148.25 514.68/148.25 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_6(natsFrom^#(X))] 514.68/148.25 514.68/148.25 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 ? [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.25 [0 0] [0 0] [0 0] [7] 514.68/148.25 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.25 514.68/148.25 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 ? [7] 514.68/148.25 [0] 514.68/148.25 = [c_4(XS)] 514.68/148.25 514.68/148.25 [natsFrom^#(N)] = [0] 514.68/148.25 [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_12(N, N)] 514.68/148.25 514.68/148.25 [natsFrom^#(X)] = [0] 514.68/148.25 [0] 514.68/148.25 >= [0] 514.68/148.25 [0] 514.68/148.25 = [c_13(X)] 514.68/148.25 514.68/148.25 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 >= [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.25 514.68/148.25 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.25 [0 1] [0 1] [7] 514.68/148.25 >= [1 0] Y + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_8(Y)] 514.68/148.25 514.68/148.25 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 >= [1 0] X + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_9(activate^#(X))] 514.68/148.25 514.68/148.25 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.25 [0 1] [0 1] [7] 514.68/148.25 >= [1 0] X + [7] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_10(X)] 514.68/148.25 514.68/148.25 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.25 [0 1] [0 1] [3] 514.68/148.25 >= [1 0] N + [3] 514.68/148.25 [0 1] [3] 514.68/148.25 = [c_11(N)] 514.68/148.25 514.68/148.25 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 >= [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.25 514.68/148.25 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.25 [0 1] [0 1] [7] 514.68/148.25 > [1 0] XS + [6] 514.68/148.25 [0 1] [7] 514.68/148.25 = [c_15(activate^#(XS))] 514.68/148.25 514.68/148.25 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 >= [1 1] N + [1 0] XS + [7] 514.68/148.25 [0 0] [0 0] [7] 514.68/148.25 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.25 514.68/148.25 514.68/148.25 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.25 514.68/148.25 We are left with following problem, upon which TcT provides the 514.68/148.25 certificate YES(O(1),O(n^1)). 514.68/148.25 514.68/148.25 Strict DPs: 514.68/148.25 { splitAt^#(s(N), cons(X, XS)) -> 514.68/148.25 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.25 , splitAt^#(0(), XS) -> c_4(XS) } 514.68/148.25 Strict Trs: 514.68/148.25 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.25 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.25 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.25 , activate(X) -> X 514.68/148.25 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.25 , snd(pair(X, Y)) -> Y } 514.68/148.25 Weak DPs: 514.68/148.25 { U11^#(tt(), N, X, XS) -> 514.68/148.25 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.25 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.25 , activate^#(X) -> c_5(X) 514.68/148.25 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.25 , natsFrom^#(N) -> c_12(N, N) 514.68/148.25 , natsFrom^#(X) -> c_13(X) 514.68/148.25 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.25 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.25 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.25 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.25 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.25 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.25 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.25 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.25 Weak Trs: 514.68/148.25 { U11(tt(), N, X, XS) -> 514.68/148.25 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.25 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.25 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.25 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.25 Obligation: 514.68/148.25 runtime complexity 514.68/148.25 Answer: 514.68/148.25 YES(O(1),O(n^1)) 514.68/148.25 514.68/148.25 The weightgap principle applies (using the following nonconstant 514.68/148.25 growth matrix-interpretation) 514.68/148.25 514.68/148.25 The following argument positions are usable: 514.68/148.25 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.25 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.25 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.25 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.25 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.25 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.25 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.25 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.25 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.25 514.68/148.25 TcT has computed the following matrix interpretation satisfying 514.68/148.25 not(EDA) and not(IDA(1)). 514.68/148.25 514.68/148.25 [U11](x1, x2, x3, x4) = [0 1] x1 + [1 0] x2 + [1 0] x3 + [1 514.68/148.25 0] x4 + [0] 514.68/148.25 [0 0] [0 0] [0 0] [0 514.68/148.25 0] [0] 514.68/148.25 514.68/148.25 [tt] = [0] 514.68/148.25 [1] 514.68/148.25 514.68/148.25 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 0] [0 0] [0] 514.68/148.25 514.68/148.25 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [1] 514.68/148.25 [0 0] [0 1] [0] 514.68/148.25 514.68/148.25 [activate](x1) = [1 0] x1 + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 514.68/148.25 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.25 [0 1] [0 1] [0] 514.68/148.25 514.68/148.25 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.25 [0 0] [0 1] [4] 514.68/148.25 514.68/148.25 [snd](x1) = [1 0] x1 + [0] 514.68/148.25 [0 1] [0] 514.68/148.25 514.68/148.25 [natsFrom](x1) = [1 0] x1 + [4] 514.68/148.25 [0 1] [7] 514.68/148.25 514.68/148.25 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.25 [0 0] [0] 514.68/148.25 514.68/148.25 [s](x1) = [0 0] x1 + [0] 514.68/148.25 [1 0] [0] 514.68/148.25 514.68/148.25 [0] = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [nil] = [0] 514.68/148.25 [0] 514.68/148.25 514.68/148.25 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [1] 514.68/148.25 [0 0] [0 0] [0 0] [0] 514.68/148.25 514.68/148.26 [c_1](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.26 [0 1] [0 1] [0] 514.68/148.26 514.68/148.26 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 514.68/148.26 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.26 [0 0] [0 0] [0] 514.68/148.26 514.68/148.26 [c_3](x1) = [1 0] x1 + [6] 514.68/148.26 [0 1] [3] 514.68/148.26 514.68/148.26 [c_4](x1) = [7] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [c_5](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [c_6](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [natsFrom^#](x1) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 514.68/148.26 [c_7](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [snd^#](x1) = [1 0] x1 + [2] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_8](x1) = [1 0] x1 + [1] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_9](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [fst^#](x1) = [1 0] x1 + [6] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_10](x1) = [1 0] x1 + [5] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [head^#](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [3] 514.68/148.26 514.68/148.26 [c_11](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [3] 514.68/148.26 514.68/148.26 [c_12](x1, x2) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [c_13](x1) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 514.68/148.26 [c_14](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_15](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 514.68/148.26 [c_16](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 The order satisfies the following ordering constraints: 514.68/148.26 514.68/148.26 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.26 514.68/148.26 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 0] [0 1] [0 1] [0] 514.68/148.26 = [pair(cons(activate(X), YS), ZS)] 514.68/148.26 514.68/148.26 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 1] [0 1] [0] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [U11(tt(), N, X, activate(XS))] 514.68/148.26 514.68/148.26 [splitAt(0(), XS)] = [1 0] XS + [1] 514.68/148.26 [0 1] [0] 514.68/148.26 > [1 0] XS + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [pair(nil(), XS)] 514.68/148.26 514.68/148.26 [activate(X)] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [X] 514.68/148.26 514.68/148.26 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [1 0] X + [4] 514.68/148.26 [0 1] [7] 514.68/148.26 = [natsFrom(X)] 514.68/148.26 514.68/148.26 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.26 [0 0] [0 1] [4] 514.68/148.26 > [1 1] N + [1 0] XS + [1] 514.68/148.26 [0 0] [0 1] [0] 514.68/148.26 = [snd(splitAt(N, XS))] 514.68/148.26 514.68/148.26 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.26 [0 1] [0 1] [0] 514.68/148.26 >= [1 0] Y + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [Y] 514.68/148.26 514.68/148.26 [natsFrom(N)] = [1 0] N + [4] 514.68/148.26 [0 1] [7] 514.68/148.26 > [1 0] N + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [cons(N, n__natsFrom(s(N)))] 514.68/148.26 514.68/148.26 [natsFrom(X)] = [1 0] X + [4] 514.68/148.26 [0 1] [7] 514.68/148.26 > [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 = [n__natsFrom(X)] 514.68/148.26 514.68/148.26 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.26 514.68/148.26 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 = [c_2(activate^#(X), YS, ZS)] 514.68/148.26 514.68/148.26 [activate^#(X)] = [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 >= [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [c_5(X)] 514.68/148.26 514.68/148.26 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_6(natsFrom^#(X))] 514.68/148.26 514.68/148.26 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 ? [1 0] N + [1 0] X + [1 0] XS + [7] 514.68/148.26 [0 0] [0 0] [0 0] [3] 514.68/148.26 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.26 514.68/148.26 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [7] 514.68/148.26 [0] 514.68/148.26 = [c_4(XS)] 514.68/148.26 514.68/148.26 [natsFrom^#(N)] = [0] 514.68/148.26 [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_12(N, N)] 514.68/148.26 514.68/148.26 [natsFrom^#(X)] = [0] 514.68/148.26 [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_13(X)] 514.68/148.26 514.68/148.26 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 > [1 1] N + [1 0] XS + [6] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.26 514.68/148.26 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [2] 514.68/148.26 [0 1] [0 1] [7] 514.68/148.26 > [1 0] Y + [1] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_8(Y)] 514.68/148.26 514.68/148.26 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 >= [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_9(activate^#(X))] 514.68/148.26 514.68/148.26 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [6] 514.68/148.26 [0 1] [0 1] [7] 514.68/148.26 > [1 0] X + [5] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_10(X)] 514.68/148.26 514.68/148.26 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.26 [0 1] [0 1] [3] 514.68/148.26 >= [1 0] N + [3] 514.68/148.26 [0 1] [3] 514.68/148.26 = [c_11(N)] 514.68/148.26 514.68/148.26 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 >= [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.26 514.68/148.26 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.26 [0 1] [0 1] [7] 514.68/148.26 >= [1 0] XS + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_15(activate^#(XS))] 514.68/148.26 514.68/148.26 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 >= [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.26 514.68/148.26 514.68/148.26 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.26 514.68/148.26 We are left with following problem, upon which TcT provides the 514.68/148.26 certificate YES(O(1),O(n^1)). 514.68/148.26 514.68/148.26 Strict DPs: 514.68/148.26 { splitAt^#(s(N), cons(X, XS)) -> 514.68/148.26 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.26 , splitAt^#(0(), XS) -> c_4(XS) } 514.68/148.26 Strict Trs: 514.68/148.26 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.26 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.26 , activate(X) -> X 514.68/148.26 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.26 , snd(pair(X, Y)) -> Y } 514.68/148.26 Weak DPs: 514.68/148.26 { U11^#(tt(), N, X, XS) -> 514.68/148.26 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.26 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.26 , activate^#(X) -> c_5(X) 514.68/148.26 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.26 , natsFrom^#(N) -> c_12(N, N) 514.68/148.26 , natsFrom^#(X) -> c_13(X) 514.68/148.26 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.26 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.26 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.26 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.26 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.26 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.26 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.26 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.26 Weak Trs: 514.68/148.26 { U11(tt(), N, X, XS) -> 514.68/148.26 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.26 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.26 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.26 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.26 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.26 Obligation: 514.68/148.26 runtime complexity 514.68/148.26 Answer: 514.68/148.26 YES(O(1),O(n^1)) 514.68/148.26 514.68/148.26 The weightgap principle applies (using the following nonconstant 514.68/148.26 growth matrix-interpretation) 514.68/148.26 514.68/148.26 The following argument positions are usable: 514.68/148.26 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.26 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.26 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.26 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.26 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.26 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.26 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.26 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.26 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.26 514.68/148.26 TcT has computed the following matrix interpretation satisfying 514.68/148.26 not(EDA) and not(IDA(1)). 514.68/148.26 514.68/148.26 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 514.68/148.26 [tt] = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.26 [0 0] [0 0] [0] 514.68/148.26 514.68/148.26 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.26 [0 0] [0 1] [0] 514.68/148.26 514.68/148.26 [activate](x1) = [1 0] x1 + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 514.68/148.26 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.26 [0 1] [0 1] [0] 514.68/148.26 514.68/148.26 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.26 [0 1] [0 1] [1] 514.68/148.26 514.68/148.26 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.26 [0 0] [0 0] [4] 514.68/148.26 514.68/148.26 [snd](x1) = [1 0] x1 + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 514.68/148.26 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 514.68/148.26 [s](x1) = [0 0] x1 + [0] 514.68/148.26 [1 0] [0] 514.68/148.26 514.68/148.26 [0] = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [nil] = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 514.68/148.26 [c_1](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.26 [0 1] [0 1] [0] 514.68/148.26 514.68/148.26 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 514.68/148.26 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [splitAt^#](x1, x2) = [0 1] x1 + [1 1] x2 + [0] 514.68/148.26 [0 0] [0 0] [0] 514.68/148.26 514.68/148.26 [c_3](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [c_4](x1) = [7] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [c_5](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [c_6](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [natsFrom^#](x1) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 514.68/148.26 [c_7](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_8](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_9](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [fst^#](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_10](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [head^#](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [3] 514.68/148.26 514.68/148.26 [c_11](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [4] 514.68/148.26 514.68/148.26 [c_12](x1, x2) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [c_13](x1) = [0] 514.68/148.26 [0] 514.68/148.26 514.68/148.26 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 0] [7] 514.68/148.26 514.68/148.26 [c_14](x1) = [1 0] x1 + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 514.68/148.26 [c_15](x1) = [1 0] x1 + [7] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 514.68/148.26 [c_16](x1) = [1 0] x1 + [3] 514.68/148.26 [0 1] [0] 514.68/148.26 514.68/148.26 The order satisfies the following ordering constraints: 514.68/148.26 514.68/148.26 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.26 514.68/148.26 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 0] [0 1] [0 1] [1] 514.68/148.26 = [pair(cons(activate(X), YS), ZS)] 514.68/148.26 514.68/148.26 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 1] [0 1] [1] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [U11(tt(), N, X, activate(XS))] 514.68/148.26 514.68/148.26 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 >= [1 0] XS + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [pair(nil(), XS)] 514.68/148.26 514.68/148.26 [activate(X)] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [X] 514.68/148.26 514.68/148.26 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 = [natsFrom(X)] 514.68/148.26 514.68/148.26 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.26 [0 0] [0 0] [4] 514.68/148.26 > [1 1] N + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0] 514.68/148.26 = [snd(splitAt(N, XS))] 514.68/148.26 514.68/148.26 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.26 [0 0] [0 0] [0] 514.68/148.26 ? [1 0] Y + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [Y] 514.68/148.26 514.68/148.26 [natsFrom(N)] = [1 0] N + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 > [1 0] N + [0] 514.68/148.26 [0 1] [1] 514.68/148.26 = [cons(N, n__natsFrom(s(N)))] 514.68/148.26 514.68/148.26 [natsFrom(X)] = [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 > [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 = [n__natsFrom(X)] 514.68/148.26 514.68/148.26 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.26 514.68/148.26 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.26 [0 1] [0 1] [0 1] [0] 514.68/148.26 = [c_2(activate^#(X), YS, ZS)] 514.68/148.26 514.68/148.26 [activate^#(X)] = [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 >= [1 0] X + [0] 514.68/148.26 [0 1] [0] 514.68/148.26 = [c_5(X)] 514.68/148.26 514.68/148.26 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_6(natsFrom^#(X))] 514.68/148.26 514.68/148.26 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 1] X + [1 1] XS + [1] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 > [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.26 [0 0] [0 0] [0 0] [0] 514.68/148.26 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.26 514.68/148.26 [splitAt^#(0(), XS)] = [1 1] XS + [0] 514.68/148.26 [0 0] [0] 514.68/148.26 ? [7] 514.68/148.26 [0] 514.68/148.26 = [c_4(XS)] 514.68/148.26 514.68/148.26 [natsFrom^#(N)] = [0] 514.68/148.26 [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_12(N, N)] 514.68/148.26 514.68/148.26 [natsFrom^#(X)] = [0] 514.68/148.26 [0] 514.68/148.26 >= [0] 514.68/148.26 [0] 514.68/148.26 = [c_13(X)] 514.68/148.26 514.68/148.26 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 > [1 1] N + [1 0] XS + [6] 514.68/148.26 [0 0] [0 1] [7] 514.68/148.26 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.26 514.68/148.26 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.26 [0 1] [0 1] [7] 514.68/148.26 >= [1 0] Y + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_8(Y)] 514.68/148.26 514.68/148.26 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 >= [1 0] X + [7] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_9(activate^#(X))] 514.68/148.26 514.68/148.26 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.26 [0 1] [0 1] [7] 514.68/148.26 >= [1 0] X + [3] 514.68/148.26 [0 1] [7] 514.68/148.26 = [c_10(X)] 514.68/148.26 514.68/148.26 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.26 [0 1] [0 1] [4] 514.68/148.26 >= [1 0] N + [3] 514.68/148.26 [0 1] [4] 514.68/148.26 = [c_11(N)] 514.68/148.26 514.68/148.26 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 0] [7] 514.68/148.26 >= [1 1] N + [1 0] XS + [7] 514.68/148.26 [0 0] [0 0] [7] 514.68/148.26 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.26 514.68/148.26 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.26 [0 1] [0 1] [8] 514.68/148.26 >= [1 0] XS + [7] 514.68/148.27 [0 1] [0] 514.68/148.27 = [c_15(activate^#(XS))] 514.68/148.27 514.68/148.27 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 > [1 1] N + [1 0] XS + [6] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.27 514.68/148.27 514.68/148.27 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.27 514.68/148.27 We are left with following problem, upon which TcT provides the 514.68/148.27 certificate YES(O(1),O(n^1)). 514.68/148.27 514.68/148.27 Strict DPs: { splitAt^#(0(), XS) -> c_4(XS) } 514.68/148.27 Strict Trs: 514.68/148.27 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.27 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.27 , activate(X) -> X 514.68/148.27 , activate(n__natsFrom(X)) -> natsFrom(X) 514.68/148.27 , snd(pair(X, Y)) -> Y } 514.68/148.27 Weak DPs: 514.68/148.27 { U11^#(tt(), N, X, XS) -> 514.68/148.27 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.27 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.27 , activate^#(X) -> c_5(X) 514.68/148.27 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.27 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.27 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.27 , natsFrom^#(N) -> c_12(N, N) 514.68/148.27 , natsFrom^#(X) -> c_13(X) 514.68/148.27 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.27 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.27 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.27 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.27 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.27 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.27 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.27 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.27 Weak Trs: 514.68/148.27 { U11(tt(), N, X, XS) -> 514.68/148.27 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.27 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.27 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.27 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.27 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.27 Obligation: 514.68/148.27 runtime complexity 514.68/148.27 Answer: 514.68/148.27 YES(O(1),O(n^1)) 514.68/148.27 514.68/148.27 The weightgap principle applies (using the following nonconstant 514.68/148.27 growth matrix-interpretation) 514.68/148.27 514.68/148.27 The following argument positions are usable: 514.68/148.27 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.27 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.27 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.27 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.27 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.27 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.27 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.27 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.27 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.27 514.68/148.27 TcT has computed the following matrix interpretation satisfying 514.68/148.27 not(EDA) and not(IDA(1)). 514.68/148.27 514.68/148.27 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [4] 514.68/148.27 [0 0] [0 0] [0 0] [4] 514.68/148.27 514.68/148.27 [tt] = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 0] [0 0] [0] 514.68/148.27 514.68/148.27 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.27 [0 0] [0 1] [0] 514.68/148.27 514.68/148.27 [activate](x1) = [1 0] x1 + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 514.68/148.27 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [4] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [4] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.27 [0 0] [0 1] [4] 514.68/148.27 514.68/148.27 [snd](x1) = [1 0] x1 + [4] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [4] 514.68/148.27 514.68/148.27 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 514.68/148.27 [s](x1) = [0 0] x1 + [0] 514.68/148.27 [1 0] [4] 514.68/148.27 514.68/148.27 [0] = [4] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [nil] = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 514.68/148.27 [c_1](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [1] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [activate^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.27 [0 0] [0 1] [4] 514.68/148.27 514.68/148.27 [c_3](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_4](x1) = [7] 514.68/148.27 [4] 514.68/148.27 514.68/148.27 [c_5](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [c_6](x1) = [1 0] x1 + [1] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [natsFrom^#](x1) = [1] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_7](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_8](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [c_9](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [fst^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_10](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [head^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_11](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_12](x1, x2) = [1] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [c_13](x1) = [1] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_14](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [c_15](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_16](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 The order satisfies the following ordering constraints: 514.68/148.27 514.68/148.27 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [4] 514.68/148.27 [0 0] [0 0] [0 0] [4] 514.68/148.27 > [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.27 514.68/148.27 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [4] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 ? [1 0] X + [1 0] YS + [1 0] ZS + [8] 514.68/148.27 [0 0] [0 1] [0 1] [0] 514.68/148.27 = [pair(cons(activate(X), YS), ZS)] 514.68/148.27 514.68/148.27 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [8] 514.68/148.27 [0 0] [0 1] [0 1] [0] 514.68/148.27 ? [1 0] N + [1 0] X + [1 0] XS + [4] 514.68/148.27 [0 0] [0 0] [0 0] [4] 514.68/148.27 = [U11(tt(), N, X, activate(XS))] 514.68/148.27 514.68/148.27 [splitAt(0(), XS)] = [1 0] XS + [4] 514.68/148.27 [0 1] [0] 514.68/148.27 >= [1 0] XS + [4] 514.68/148.27 [0 1] [0] 514.68/148.27 = [pair(nil(), XS)] 514.68/148.27 514.68/148.27 [activate(X)] = [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 ? [1 0] X + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [X] 514.68/148.27 514.68/148.27 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 ? [1 0] X + [7] 514.68/148.27 [0 1] [4] 514.68/148.27 = [natsFrom(X)] 514.68/148.27 514.68/148.27 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.27 [0 0] [0 1] [4] 514.68/148.27 >= [1 1] N + [1 0] XS + [4] 514.68/148.27 [0 0] [0 1] [0] 514.68/148.27 = [snd(splitAt(N, XS))] 514.68/148.27 514.68/148.27 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [8] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 > [1 0] Y + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [Y] 514.68/148.27 514.68/148.27 [natsFrom(N)] = [1 0] N + [7] 514.68/148.27 [0 1] [4] 514.68/148.27 > [1 0] N + [4] 514.68/148.27 [0 1] [0] 514.68/148.27 = [cons(N, n__natsFrom(s(N)))] 514.68/148.27 514.68/148.27 [natsFrom(X)] = [1 0] X + [7] 514.68/148.27 [0 1] [4] 514.68/148.27 > [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 = [n__natsFrom(X)] 514.68/148.27 514.68/148.27 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.27 514.68/148.27 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [4] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 >= [1 0] X + [1 0] YS + [1 0] ZS + [4] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 = [c_2(activate^#(X), YS, ZS)] 514.68/148.27 514.68/148.27 [activate^#(X)] = [1 0] X + [3] 514.68/148.27 [0 1] [0] 514.68/148.27 >= [1 0] X + [3] 514.68/148.27 [0 1] [0] 514.68/148.27 = [c_5(X)] 514.68/148.27 514.68/148.27 [activate^#(n__natsFrom(X))] = [1 0] X + [3] 514.68/148.27 [0 0] [0] 514.68/148.27 > [2] 514.68/148.27 [0] 514.68/148.27 = [c_6(natsFrom^#(X))] 514.68/148.27 514.68/148.27 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [8] 514.68/148.27 [0 0] [0 1] [0 1] [4] 514.68/148.27 > [1 0] N + [1 0] X + [1 0] XS + [3] 514.68/148.27 [0 0] [0 0] [0 0] [3] 514.68/148.27 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.27 514.68/148.27 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.27 [0 1] [4] 514.68/148.27 ? [7] 514.68/148.27 [4] 514.68/148.27 = [c_4(XS)] 514.68/148.27 514.68/148.27 [natsFrom^#(N)] = [1] 514.68/148.27 [0] 514.68/148.27 >= [1] 514.68/148.27 [0] 514.68/148.27 = [c_12(N, N)] 514.68/148.27 514.68/148.27 [natsFrom^#(X)] = [1] 514.68/148.27 [0] 514.68/148.27 >= [1] 514.68/148.27 [0] 514.68/148.27 = [c_13(X)] 514.68/148.27 514.68/148.27 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 > [1 1] N + [1 0] XS + [6] 514.68/148.27 [0 0] [0 1] [6] 514.68/148.27 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.27 514.68/148.27 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.27 [0 1] [0 1] [3] 514.68/148.27 >= [1 0] Y + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 = [c_8(Y)] 514.68/148.27 514.68/148.27 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 > [1 0] X + [6] 514.68/148.27 [0 1] [7] 514.68/148.27 = [c_9(activate^#(X))] 514.68/148.27 514.68/148.27 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.27 [0 1] [0 1] [3] 514.68/148.27 >= [1 0] X + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 = [c_10(X)] 514.68/148.27 514.68/148.27 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.27 [0 1] [0 1] [3] 514.68/148.27 >= [1 0] N + [7] 514.68/148.27 [0 1] [3] 514.68/148.27 = [c_11(N)] 514.68/148.27 514.68/148.27 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 >= [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.27 514.68/148.27 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [11] 514.68/148.27 [0 1] [0 1] [7] 514.68/148.27 > [1 0] XS + [10] 514.68/148.27 [0 1] [7] 514.68/148.27 = [c_15(activate^#(XS))] 514.68/148.27 514.68/148.27 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 > [1 1] N + [1 0] XS + [6] 514.68/148.27 [0 0] [0 1] [6] 514.68/148.27 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.27 514.68/148.27 514.68/148.27 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.27 514.68/148.27 We are left with following problem, upon which TcT provides the 514.68/148.27 certificate YES(O(1),O(n^1)). 514.68/148.27 514.68/148.27 Strict DPs: { splitAt^#(0(), XS) -> c_4(XS) } 514.68/148.27 Strict Trs: 514.68/148.27 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.27 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.27 , activate(X) -> X 514.68/148.27 , activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.27 Weak DPs: 514.68/148.27 { U11^#(tt(), N, X, XS) -> 514.68/148.27 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.27 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.27 , activate^#(X) -> c_5(X) 514.68/148.27 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.27 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.27 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.27 , natsFrom^#(N) -> c_12(N, N) 514.68/148.27 , natsFrom^#(X) -> c_13(X) 514.68/148.27 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.27 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.27 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.27 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.27 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.27 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.27 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.27 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.27 Weak Trs: 514.68/148.27 { U11(tt(), N, X, XS) -> 514.68/148.27 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.27 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.27 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.27 , snd(pair(X, Y)) -> Y 514.68/148.27 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.27 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.27 Obligation: 514.68/148.27 runtime complexity 514.68/148.27 Answer: 514.68/148.27 YES(O(1),O(n^1)) 514.68/148.27 514.68/148.27 The weightgap principle applies (using the following nonconstant 514.68/148.27 growth matrix-interpretation) 514.68/148.27 514.68/148.27 The following argument positions are usable: 514.68/148.27 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.27 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.27 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.27 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.27 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.27 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.27 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.27 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.27 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.27 514.68/148.27 TcT has computed the following matrix interpretation satisfying 514.68/148.27 not(EDA) and not(IDA(1)). 514.68/148.27 514.68/148.27 [U11](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 514.68/148.27 [tt] = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 0] [0 0] [0] 514.68/148.27 514.68/148.27 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.27 [0 0] [0 1] [0] 514.68/148.27 514.68/148.27 [activate](x1) = [1 0] x1 + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 514.68/148.27 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.27 [0 0] [0 1] [4] 514.68/148.27 514.68/148.27 [snd](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.27 [0 1] [6] 514.68/148.27 514.68/148.27 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 514.68/148.27 [s](x1) = [0 0] x1 + [0] 514.68/148.27 [1 0] [0] 514.68/148.27 514.68/148.27 [0] = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [nil] = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 514.68/148.27 [c_1](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 514.68/148.27 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [2] 514.68/148.27 [0 0] [0 0] [4] 514.68/148.27 514.68/148.27 [c_3](x1) = [1 0] x1 + [1] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_4](x1) = [1] 514.68/148.27 [4] 514.68/148.27 514.68/148.27 [c_5](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [c_6](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [natsFrom^#](x1) = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_7](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_8](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [c_9](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [fst^#](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [c_10](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [head^#](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_11](x1) = [1 0] x1 + [3] 514.68/148.27 [0 1] [3] 514.68/148.27 514.68/148.27 [c_12](x1, x2) = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [c_13](x1) = [0] 514.68/148.27 [0] 514.68/148.27 514.68/148.27 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_14](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [c_15](x1) = [1 0] x1 + [7] 514.68/148.27 [0 1] [7] 514.68/148.27 514.68/148.27 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 514.68/148.27 [c_16](x1) = [1 0] x1 + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 514.68/148.27 The order satisfies the following ordering constraints: 514.68/148.27 514.68/148.27 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.27 514.68/148.27 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.27 [0 0] [0 1] [0 1] [0] 514.68/148.27 = [pair(cons(activate(X), YS), ZS)] 514.68/148.27 514.68/148.27 [splitAt(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 1] [0 1] [0] 514.68/148.27 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 = [U11(tt(), N, X, activate(XS))] 514.68/148.27 514.68/148.27 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 >= [1 0] XS + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [pair(nil(), XS)] 514.68/148.27 514.68/148.27 [activate(X)] = [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 ? [1 0] X + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [X] 514.68/148.27 514.68/148.27 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 ? [1 0] X + [5] 514.68/148.27 [0 1] [6] 514.68/148.27 = [natsFrom(X)] 514.68/148.27 514.68/148.27 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.27 [0 0] [0 1] [4] 514.68/148.27 > [1 1] N + [1 0] XS + [0] 514.68/148.27 [0 0] [0 1] [0] 514.68/148.27 = [snd(splitAt(N, XS))] 514.68/148.27 514.68/148.27 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.27 [0 1] [0 1] [0] 514.68/148.27 >= [1 0] Y + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [Y] 514.68/148.27 514.68/148.27 [natsFrom(N)] = [1 0] N + [5] 514.68/148.27 [0 1] [6] 514.68/148.27 > [1 0] N + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [cons(N, n__natsFrom(s(N)))] 514.68/148.27 514.68/148.27 [natsFrom(X)] = [1 0] X + [5] 514.68/148.27 [0 1] [6] 514.68/148.27 > [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 = [n__natsFrom(X)] 514.68/148.27 514.68/148.27 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.27 [0 0] [0 0] [0 0] [0] 514.68/148.27 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.27 514.68/148.27 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.27 [0 1] [0 1] [0 1] [0] 514.68/148.27 = [c_2(activate^#(X), YS, ZS)] 514.68/148.27 514.68/148.27 [activate^#(X)] = [1 0] X + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 >= [1 0] X + [0] 514.68/148.27 [0 1] [0] 514.68/148.27 = [c_5(X)] 514.68/148.27 514.68/148.27 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.27 [0 0] [0] 514.68/148.27 >= [0] 514.68/148.27 [0] 514.68/148.27 = [c_6(natsFrom^#(X))] 514.68/148.27 514.68/148.27 [splitAt^#(s(N), cons(X, XS))] = [1 0] N + [1 0] X + [1 0] XS + [2] 514.68/148.27 [0 0] [0 0] [0 0] [4] 514.68/148.27 > [1 0] N + [1 0] X + [1 0] XS + [1] 514.68/148.27 [0 0] [0 0] [0 0] [3] 514.68/148.27 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.27 514.68/148.27 [splitAt^#(0(), XS)] = [1 0] XS + [2] 514.68/148.27 [0 0] [4] 514.68/148.27 > [1] 514.68/148.27 [4] 514.68/148.27 = [c_4(XS)] 514.68/148.27 514.68/148.27 [natsFrom^#(N)] = [0] 514.68/148.27 [0] 514.68/148.27 >= [0] 514.68/148.27 [0] 514.68/148.27 = [c_12(N, N)] 514.68/148.27 514.68/148.27 [natsFrom^#(X)] = [0] 514.68/148.27 [0] 514.68/148.27 >= [0] 514.68/148.27 [0] 514.68/148.27 = [c_13(X)] 514.68/148.27 514.68/148.27 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.27 [0 0] [0 1] [7] 514.68/148.27 > [1 1] N + [1 0] XS + [6] 514.68/148.27 [0 0] [0 1] [6] 514.68/148.27 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.28 514.68/148.28 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.28 [0 1] [0 1] [3] 514.68/148.28 >= [1 0] Y + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 = [c_8(Y)] 514.68/148.28 514.68/148.28 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 >= [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 = [c_9(activate^#(X))] 514.68/148.28 514.68/148.28 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.28 [0 1] [0 1] [7] 514.68/148.28 >= [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 = [c_10(X)] 514.68/148.28 514.68/148.28 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.28 [0 1] [0 1] [3] 514.68/148.28 >= [1 0] N + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 = [c_11(N)] 514.68/148.28 514.68/148.28 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 >= [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.28 514.68/148.28 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.28 [0 1] [0 1] [7] 514.68/148.28 >= [1 0] XS + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 = [c_15(activate^#(XS))] 514.68/148.28 514.68/148.28 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 >= [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.28 514.68/148.28 514.68/148.28 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.28 514.68/148.28 We are left with following problem, upon which TcT provides the 514.68/148.28 certificate YES(O(1),O(n^1)). 514.68/148.28 514.68/148.28 Strict Trs: 514.68/148.28 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.28 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.28 , activate(X) -> X 514.68/148.28 , activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.28 Weak DPs: 514.68/148.28 { U11^#(tt(), N, X, XS) -> 514.68/148.28 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.28 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.28 , activate^#(X) -> c_5(X) 514.68/148.28 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.28 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.28 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.28 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.28 , natsFrom^#(N) -> c_12(N, N) 514.68/148.28 , natsFrom^#(X) -> c_13(X) 514.68/148.28 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.28 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.28 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.28 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.28 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.28 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.28 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.28 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.28 Weak Trs: 514.68/148.28 { U11(tt(), N, X, XS) -> 514.68/148.28 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.28 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.28 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.28 , snd(pair(X, Y)) -> Y 514.68/148.28 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.28 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.28 Obligation: 514.68/148.28 runtime complexity 514.68/148.28 Answer: 514.68/148.28 YES(O(1),O(n^1)) 514.68/148.28 514.68/148.28 The weightgap principle applies (using the following nonconstant 514.68/148.28 growth matrix-interpretation) 514.68/148.28 514.68/148.28 The following argument positions are usable: 514.68/148.28 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.28 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.28 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.28 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.28 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.28 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.28 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.28 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.28 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.28 514.68/148.28 TcT has computed the following matrix interpretation satisfying 514.68/148.28 not(EDA) and not(IDA(1)). 514.68/148.28 514.68/148.28 [U11](x1, x2, x3, x4) = [0 0] x1 + [1 0] x2 + [1 0] x3 + [1 514.68/148.28 0] x4 + [0] 514.68/148.28 [1 1] [0 0] [0 0] [0 514.68/148.28 0] [0] 514.68/148.28 514.68/148.28 [tt] = [4] 514.68/148.28 [4] 514.68/148.28 514.68/148.28 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 0] [0] 514.68/148.28 514.68/148.28 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 1] [1] 514.68/148.28 514.68/148.28 [activate](x1) = [1 0] x1 + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 514.68/148.28 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 1] [0 1] [7] 514.68/148.28 514.68/148.28 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.28 [0 0] [0 1] [4] 514.68/148.28 514.68/148.28 [snd](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 514.68/148.28 [s](x1) = [0 0] x1 + [0] 514.68/148.28 [1 1] [4] 514.68/148.28 514.68/148.28 [0] = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [nil] = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [U11^#](x1, x2, x3, x4) = [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.28 [0 0] [0 0] [0 0] [4] 514.68/148.28 514.68/148.28 [c_1](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 514.68/148.28 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 1] [0 1] [1] 514.68/148.28 514.68/148.28 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.28 [0 1] [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 514.68/148.28 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [4] 514.68/148.28 [0 0] [0 0] [4] 514.68/148.28 514.68/148.28 [c_3](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [c_4](x1) = [4] 514.68/148.28 [4] 514.68/148.28 514.68/148.28 [c_5](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 514.68/148.28 [c_6](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [natsFrom^#](x1) = [0] 514.68/148.28 [1] 514.68/148.28 514.68/148.28 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_7](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_8](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [c_9](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [fst^#](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_10](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [head^#](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_11](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [1] 514.68/148.28 514.68/148.28 [c_12](x1, x2) = [0] 514.68/148.28 [1] 514.68/148.28 514.68/148.28 [c_13](x1) = [0] 514.68/148.28 [1] 514.68/148.28 514.68/148.28 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_14](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [c_15](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_16](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 The order satisfies the following ordering constraints: 514.68/148.28 514.68/148.28 [U11(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [8] 514.68/148.28 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.28 514.68/148.28 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 ? [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.28 [0 0] [0 1] [0 1] [7] 514.68/148.28 = [pair(cons(activate(X), YS), ZS)] 514.68/148.28 514.68/148.28 [splitAt(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [4] 514.68/148.28 [0 0] [0 1] [0 1] [8] 514.68/148.28 > [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [8] 514.68/148.28 = [U11(tt(), N, X, activate(XS))] 514.68/148.28 514.68/148.28 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 >= [1 0] XS + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [pair(nil(), XS)] 514.68/148.28 514.68/148.28 [activate(X)] = [1 0] X + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 ? [1 0] X + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [X] 514.68/148.28 514.68/148.28 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 ? [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 = [natsFrom(X)] 514.68/148.28 514.68/148.28 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.28 [0 0] [0 1] [4] 514.68/148.28 > [1 1] N + [1 0] XS + [0] 514.68/148.28 [0 0] [0 1] [1] 514.68/148.28 = [snd(splitAt(N, XS))] 514.68/148.28 514.68/148.28 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 >= [1 0] Y + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [Y] 514.68/148.28 514.68/148.28 [natsFrom(N)] = [1 0] N + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 > [1 0] N + [0] 514.68/148.28 [0 1] [7] 514.68/148.28 = [cons(N, n__natsFrom(s(N)))] 514.68/148.28 514.68/148.28 [natsFrom(X)] = [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 > [1 0] X + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 = [n__natsFrom(X)] 514.68/148.28 514.68/148.28 [U11^#(tt(), N, X, XS)] = [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [4] 514.68/148.28 >= [1 0] N + [1 0] X + [1 0] XS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [3] 514.68/148.28 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.28 514.68/148.28 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.28 [0 1] [0 1] [0 1] [1] 514.68/148.28 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.28 [0 1] [0 1] [0 1] [1] 514.68/148.28 = [c_2(activate^#(X), YS, ZS)] 514.68/148.28 514.68/148.28 [activate^#(X)] = [1 0] X + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 >= [1 0] X + [0] 514.68/148.28 [0 1] [1] 514.68/148.28 = [c_5(X)] 514.68/148.28 514.68/148.28 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.28 [0 0] [1] 514.68/148.28 >= [0] 514.68/148.28 [1] 514.68/148.28 = [c_6(natsFrom^#(X))] 514.68/148.28 514.68/148.28 [splitAt^#(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [8] 514.68/148.28 [0 0] [0 0] [0 0] [4] 514.68/148.28 > [1 0] N + [1 0] X + [1 0] XS + [7] 514.68/148.28 [0 0] [0 0] [0 0] [4] 514.68/148.28 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.28 514.68/148.28 [splitAt^#(0(), XS)] = [1 0] XS + [4] 514.68/148.28 [0 0] [4] 514.68/148.28 >= [4] 514.68/148.28 [4] 514.68/148.28 = [c_4(XS)] 514.68/148.28 514.68/148.28 [natsFrom^#(N)] = [0] 514.68/148.28 [1] 514.68/148.28 >= [0] 514.68/148.28 [1] 514.68/148.28 = [c_12(N, N)] 514.68/148.28 514.68/148.28 [natsFrom^#(X)] = [0] 514.68/148.28 [1] 514.68/148.28 >= [0] 514.68/148.28 [1] 514.68/148.28 = [c_13(X)] 514.68/148.28 514.68/148.28 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 > [1 1] N + [1 0] XS + [6] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.28 514.68/148.28 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.28 [0 1] [0 1] [3] 514.68/148.28 >= [1 0] Y + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 = [c_8(Y)] 514.68/148.28 514.68/148.28 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 >= [1 0] X + [7] 514.68/148.28 [0 1] [4] 514.68/148.28 = [c_9(activate^#(X))] 514.68/148.28 514.68/148.28 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.28 [0 1] [0 1] [3] 514.68/148.28 >= [1 0] X + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 = [c_10(X)] 514.68/148.28 514.68/148.28 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.28 [0 1] [0 1] [10] 514.68/148.28 >= [1 0] N + [3] 514.68/148.28 [0 1] [1] 514.68/148.28 = [c_11(N)] 514.68/148.28 514.68/148.28 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 >= [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.28 514.68/148.28 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.28 [0 1] [0 1] [14] 514.68/148.28 >= [1 0] XS + [7] 514.68/148.28 [0 1] [8] 514.68/148.28 = [c_15(activate^#(XS))] 514.68/148.28 514.68/148.28 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 > [1 1] N + [1 0] XS + [6] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.28 514.68/148.28 514.68/148.28 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.28 514.68/148.28 We are left with following problem, upon which TcT provides the 514.68/148.28 certificate YES(O(1),O(n^1)). 514.68/148.28 514.68/148.28 Strict Trs: 514.68/148.28 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.28 , activate(X) -> X 514.68/148.28 , activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.28 Weak DPs: 514.68/148.28 { U11^#(tt(), N, X, XS) -> 514.68/148.28 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.28 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.28 , activate^#(X) -> c_5(X) 514.68/148.28 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.28 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.28 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.28 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.28 , natsFrom^#(N) -> c_12(N, N) 514.68/148.28 , natsFrom^#(X) -> c_13(X) 514.68/148.28 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.28 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.28 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.28 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.28 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.28 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.28 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.28 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.28 Weak Trs: 514.68/148.28 { U11(tt(), N, X, XS) -> 514.68/148.28 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.28 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.28 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.28 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.28 , snd(pair(X, Y)) -> Y 514.68/148.28 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.28 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.28 Obligation: 514.68/148.28 runtime complexity 514.68/148.28 Answer: 514.68/148.28 YES(O(1),O(n^1)) 514.68/148.28 514.68/148.28 The weightgap principle applies (using the following nonconstant 514.68/148.28 growth matrix-interpretation) 514.68/148.28 514.68/148.28 The following argument positions are usable: 514.68/148.28 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.28 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.28 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.28 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.28 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.28 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.28 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.28 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.28 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.28 514.68/148.28 TcT has computed the following matrix interpretation satisfying 514.68/148.28 not(EDA) and not(IDA(1)). 514.68/148.28 514.68/148.28 [U11](x1, x2, x3, x4) = [0 1] x1 + [1 1] x2 + [1 0] x3 + [1 514.68/148.28 0] x4 + [0] 514.68/148.28 [0 0] [0 0] [0 0] [0 514.68/148.28 0] [0] 514.68/148.28 514.68/148.28 [tt] = [0] 514.68/148.28 [4] 514.68/148.28 514.68/148.28 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 0] [0] 514.68/148.28 514.68/148.28 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 1] [0] 514.68/148.28 514.68/148.28 [activate](x1) = [1 0] x1 + [1] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [4] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 1] [4] 514.68/148.28 514.68/148.28 [snd](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [natsFrom](x1) = [1 0] x1 + [5] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.28 [0 0] [0] 514.68/148.28 514.68/148.28 [s](x1) = [0 0] x1 + [0] 514.68/148.28 [1 1] [4] 514.68/148.28 514.68/148.28 [0] = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [nil] = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [U11^#](x1, x2, x3, x4) = [0 1] x1 + [1 1] x2 + [1 0] x3 + [1 514.68/148.28 0] x4 + [0] 514.68/148.28 [0 0] [0 0] [0 1] [0 514.68/148.28 1] [0] 514.68/148.28 514.68/148.28 [c_1](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.28 [0 1] [0 1] [0 1] [0] 514.68/148.28 514.68/148.28 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.28 [0 0] [0 1] [4] 514.68/148.28 514.68/148.28 [c_3](x1) = [1 0] x1 + [1] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_4](x1) = [0] 514.68/148.28 [4] 514.68/148.28 514.68/148.28 [c_5](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [c_6](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [natsFrom^#](x1) = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_7](x1) = [1 0] x1 + [0] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [snd^#](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_8](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [c_9](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [fst^#](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [c_10](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [head^#](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_11](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [3] 514.68/148.28 514.68/148.28 [c_12](x1, x2) = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [c_13](x1) = [0] 514.68/148.28 [0] 514.68/148.28 514.68/148.28 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_14](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [c_15](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [7] 514.68/148.28 514.68/148.28 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.28 [0 0] [0 1] [7] 514.68/148.28 514.68/148.28 [c_16](x1) = [1 0] x1 + [3] 514.68/148.28 [0 1] [0] 514.68/148.28 514.68/148.28 The order satisfies the following ordering constraints: 514.68/148.28 514.68/148.28 [U11(tt(), N, X, XS)] = [1 1] N + [1 0] X + [1 0] XS + [4] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 > [1 1] N + [1 0] X + [1 0] XS + [3] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.28 514.68/148.28 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 ? [1 0] X + [1 0] YS + [1 0] ZS + [5] 514.68/148.28 [0 1] [0 1] [0 1] [0] 514.68/148.28 = [pair(cons(activate(X), YS), ZS)] 514.68/148.28 514.68/148.28 [splitAt(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [8] 514.68/148.28 [0 0] [0 1] [0 1] [0] 514.68/148.28 > [1 1] N + [1 0] X + [1 0] XS + [5] 514.68/148.28 [0 0] [0 0] [0 0] [0] 514.68/148.28 = [U11(tt(), N, X, activate(XS))] 514.68/148.28 514.68/148.28 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 >= [1 0] XS + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [pair(nil(), XS)] 514.68/148.28 514.68/148.28 [activate(X)] = [1 0] X + [1] 514.68/148.28 [0 1] [0] 514.68/148.28 > [1 0] X + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [X] 514.68/148.28 514.68/148.28 [activate(n__natsFrom(X))] = [1 0] X + [1] 514.68/148.28 [0 0] [0] 514.68/148.28 ? [1 0] X + [5] 514.68/148.28 [0 1] [7] 514.68/148.28 = [natsFrom(X)] 514.68/148.28 514.68/148.28 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [0] 514.68/148.28 [0 0] [0 1] [4] 514.68/148.28 >= [1 1] N + [1 0] XS + [0] 514.68/148.28 [0 0] [0 1] [0] 514.68/148.28 = [snd(splitAt(N, XS))] 514.68/148.28 514.68/148.28 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.28 [0 1] [0 1] [0] 514.68/148.28 >= [1 0] Y + [0] 514.68/148.28 [0 1] [0] 514.68/148.28 = [Y] 514.68/148.28 514.68/148.28 [natsFrom(N)] = [1 0] N + [5] 514.68/148.28 [0 1] [7] 514.68/148.28 > [1 0] N + [4] 514.68/148.28 [0 1] [0] 514.68/148.29 = [cons(N, n__natsFrom(s(N)))] 514.68/148.29 514.68/148.29 [natsFrom(X)] = [1 0] X + [5] 514.68/148.29 [0 1] [7] 514.68/148.29 > [1 0] X + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 = [n__natsFrom(X)] 514.68/148.29 514.68/148.29 [U11^#(tt(), N, X, XS)] = [1 1] N + [1 0] X + [1 0] XS + [4] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 > [1 1] N + [1 0] X + [1 0] XS + [3] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.29 514.68/148.29 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 = [c_2(activate^#(X), YS, ZS)] 514.68/148.29 514.68/148.29 [activate^#(X)] = [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 >= [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 = [c_5(X)] 514.68/148.29 514.68/148.29 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_6(natsFrom^#(X))] 514.68/148.29 514.68/148.29 [splitAt^#(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [8] 514.68/148.29 [0 0] [0 1] [0 1] [4] 514.68/148.29 > [1 1] N + [1 0] X + [1 0] XS + [6] 514.68/148.29 [0 0] [0 1] [0 1] [3] 514.68/148.29 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.29 514.68/148.29 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.29 [0 1] [4] 514.68/148.29 >= [0] 514.68/148.29 [4] 514.68/148.29 = [c_4(XS)] 514.68/148.29 514.68/148.29 [natsFrom^#(N)] = [0] 514.68/148.29 [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_12(N, N)] 514.68/148.29 514.68/148.29 [natsFrom^#(X)] = [0] 514.68/148.29 [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_13(X)] 514.68/148.29 514.68/148.29 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 >= [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [6] 514.68/148.29 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.29 514.68/148.29 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.29 [0 1] [0 1] [3] 514.68/148.29 >= [1 0] Y + [7] 514.68/148.29 [0 1] [3] 514.68/148.29 = [c_8(Y)] 514.68/148.29 514.68/148.29 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 >= [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_9(activate^#(X))] 514.68/148.29 514.68/148.29 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.29 [0 1] [0 1] [7] 514.68/148.29 >= [1 0] X + [3] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_10(X)] 514.68/148.29 514.68/148.29 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.29 [0 1] [0 1] [3] 514.68/148.29 >= [1 0] N + [7] 514.68/148.29 [0 1] [3] 514.68/148.29 = [c_11(N)] 514.68/148.29 514.68/148.29 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 > [1 1] N + [1 0] XS + [6] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.29 514.68/148.29 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [11] 514.68/148.29 [0 1] [0 1] [7] 514.68/148.29 > [1 0] XS + [3] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_15(activate^#(XS))] 514.68/148.29 514.68/148.29 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 > [1 1] N + [1 0] XS + [6] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.29 514.68/148.29 514.68/148.29 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.29 514.68/148.29 We are left with following problem, upon which TcT provides the 514.68/148.29 certificate YES(O(1),O(n^1)). 514.68/148.29 514.68/148.29 Strict Trs: 514.68/148.29 { U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.29 , activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.29 Weak DPs: 514.68/148.29 { U11^#(tt(), N, X, XS) -> 514.68/148.29 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.29 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.29 , activate^#(X) -> c_5(X) 514.68/148.29 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.29 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.29 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.29 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.29 , natsFrom^#(N) -> c_12(N, N) 514.68/148.29 , natsFrom^#(X) -> c_13(X) 514.68/148.29 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.29 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.29 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.29 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.29 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.29 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.29 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.29 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.29 Weak Trs: 514.68/148.29 { U11(tt(), N, X, XS) -> 514.68/148.29 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.29 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.29 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.29 , activate(X) -> X 514.68/148.29 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.29 , snd(pair(X, Y)) -> Y 514.68/148.29 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.29 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.29 Obligation: 514.68/148.29 runtime complexity 514.68/148.29 Answer: 514.68/148.29 YES(O(1),O(n^1)) 514.68/148.29 514.68/148.29 The weightgap principle applies (using the following nonconstant 514.68/148.29 growth matrix-interpretation) 514.68/148.29 514.68/148.29 The following argument positions are usable: 514.68/148.29 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.29 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.29 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.29 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.29 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.29 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.29 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.29 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.29 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.29 514.68/148.29 TcT has computed the following matrix interpretation satisfying 514.68/148.29 not(EDA) and not(IDA(1)). 514.68/148.29 514.68/148.29 [U11](x1, x2, x3, x4) = [0 1] x1 + [1 1] x2 + [1 0] x3 + [1 514.68/148.29 0] x4 + [0] 514.68/148.29 [0 0] [0 0] [0 1] [0 514.68/148.29 1] [0] 514.68/148.29 514.68/148.29 [tt] = [0] 514.68/148.29 [1] 514.68/148.29 514.68/148.29 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [1] 514.68/148.29 [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [splitAt](x1, x2) = [1 1] x1 + [1 0] x2 + [0] 514.68/148.29 [0 0] [0 1] [0] 514.68/148.29 514.68/148.29 [activate](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [pair](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.29 [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [cons](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.29 [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [afterNth](x1, x2) = [1 1] x1 + [1 0] x2 + [4] 514.68/148.29 [0 0] [0 1] [4] 514.68/148.29 514.68/148.29 [snd](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [natsFrom](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [s](x1) = [0 0] x1 + [1] 514.68/148.29 [1 1] [0] 514.68/148.29 514.68/148.29 [0] = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [nil] = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [U11^#](x1, x2, x3, x4) = [1 1] x2 + [1 0] x3 + [1 0] x4 + [0] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [c_1](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.29 [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [c_2](x1, x2, x3) = [1 0] x1 + [1 0] x2 + [1 0] x3 + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 514.68/148.29 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [splitAt^#](x1, x2) = [0 1] x1 + [1 0] x2 + [0] 514.68/148.29 [0 0] [0 1] [0] 514.68/148.29 514.68/148.29 [c_3](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [c_4](x1) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [c_5](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [c_6](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [natsFrom^#](x1) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [afterNth^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 514.68/148.29 [c_7](x1) = [1 0] x1 + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 514.68/148.29 [snd^#](x1) = [1 0] x1 + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 514.68/148.29 [c_8](x1) = [1 0] x1 + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 514.68/148.29 [and^#](x1, x2) = [1 0] x2 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [c_9](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [fst^#](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [c_10](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [head^#](x1) = [1 0] x1 + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 514.68/148.29 [c_11](x1) = [1 0] x1 + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 514.68/148.29 [c_12](x1, x2) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [c_13](x1) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [sel^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 514.68/148.29 [c_14](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [tail^#](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [c_15](x1) = [1 0] x1 + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 514.68/148.29 [take^#](x1, x2) = [1 1] x1 + [1 0] x2 + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 514.68/148.29 [c_16](x1) = [1 0] x1 + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 The order satisfies the following ordering constraints: 514.68/148.29 514.68/148.29 [U11(tt(), N, X, XS)] = [1 1] N + [1 0] X + [1 0] XS + [1] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 >= [1 1] N + [1 0] X + [1 0] XS + [1] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.68/148.29 514.68/148.29 [U12(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [1] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 > [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 = [pair(cons(activate(X), YS), ZS)] 514.68/148.29 514.68/148.29 [splitAt(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [1] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 >= [1 1] N + [1 0] X + [1 0] XS + [1] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 = [U11(tt(), N, X, activate(XS))] 514.68/148.29 514.68/148.29 [splitAt(0(), XS)] = [1 0] XS + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 >= [1 0] XS + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 = [pair(nil(), XS)] 514.68/148.29 514.68/148.29 [activate(X)] = [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 >= [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 = [X] 514.68/148.29 514.68/148.29 [activate(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 ? [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 = [natsFrom(X)] 514.68/148.29 514.68/148.29 [afterNth(N, XS)] = [1 1] N + [1 0] XS + [4] 514.68/148.29 [0 0] [0 1] [4] 514.68/148.29 > [1 1] N + [1 0] XS + [0] 514.68/148.29 [0 0] [0 1] [0] 514.68/148.29 = [snd(splitAt(N, XS))] 514.68/148.29 514.68/148.29 [snd(pair(X, Y))] = [1 0] X + [1 0] Y + [0] 514.68/148.29 [0 1] [0 1] [0] 514.68/148.29 >= [1 0] Y + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 = [Y] 514.68/148.29 514.68/148.29 [natsFrom(N)] = [1 0] N + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 > [1 0] N + [1] 514.68/148.29 [0 1] [0] 514.68/148.29 = [cons(N, n__natsFrom(s(N)))] 514.68/148.29 514.68/148.29 [natsFrom(X)] = [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 > [1 0] X + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 = [n__natsFrom(X)] 514.68/148.29 514.68/148.29 [U11^#(tt(), N, X, XS)] = [1 1] N + [1 0] X + [1 0] XS + [0] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 >= [1 1] N + [1 0] X + [1 0] XS + [0] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.68/148.29 514.68/148.29 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 >= [1 0] X + [1 0] YS + [1 0] ZS + [0] 514.68/148.29 [0 1] [0 1] [0 1] [0] 514.68/148.29 = [c_2(activate^#(X), YS, ZS)] 514.68/148.29 514.68/148.29 [activate^#(X)] = [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 >= [1 0] X + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 = [c_5(X)] 514.68/148.29 514.68/148.29 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_6(natsFrom^#(X))] 514.68/148.29 514.68/148.29 [splitAt^#(s(N), cons(X, XS))] = [1 1] N + [1 0] X + [1 0] XS + [0] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 >= [1 1] N + [1 0] X + [1 0] XS + [0] 514.68/148.29 [0 0] [0 1] [0 1] [0] 514.68/148.29 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.68/148.29 514.68/148.29 [splitAt^#(0(), XS)] = [1 0] XS + [0] 514.68/148.29 [0 1] [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_4(XS)] 514.68/148.29 514.68/148.29 [natsFrom^#(N)] = [0] 514.68/148.29 [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_12(N, N)] 514.68/148.29 514.68/148.29 [natsFrom^#(X)] = [0] 514.68/148.29 [0] 514.68/148.29 >= [0] 514.68/148.29 [0] 514.68/148.29 = [c_13(X)] 514.68/148.29 514.68/148.29 [afterNth^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 > [1 1] N + [1 0] XS + [6] 514.68/148.29 [0 0] [0 1] [6] 514.68/148.29 = [c_7(snd^#(splitAt(N, XS)))] 514.68/148.29 514.68/148.29 [snd^#(pair(X, Y))] = [1 0] X + [1 0] Y + [3] 514.68/148.29 [0 1] [0 1] [3] 514.68/148.29 >= [1 0] Y + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 = [c_8(Y)] 514.68/148.29 514.68/148.29 [and^#(tt(), X)] = [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 >= [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_9(activate^#(X))] 514.68/148.29 514.68/148.29 [fst^#(pair(X, Y))] = [1 0] X + [1 0] Y + [7] 514.68/148.29 [0 1] [0 1] [7] 514.68/148.29 >= [1 0] X + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_10(X)] 514.68/148.29 514.68/148.29 [head^#(cons(N, XS))] = [1 0] N + [1 0] XS + [3] 514.68/148.29 [0 1] [0 1] [3] 514.68/148.29 >= [1 0] N + [3] 514.68/148.29 [0 1] [3] 514.68/148.29 = [c_11(N)] 514.68/148.29 514.68/148.29 [sel^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 >= [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 = [c_14(head^#(afterNth(N, XS)))] 514.68/148.29 514.68/148.29 [tail^#(cons(N, XS))] = [1 0] N + [1 0] XS + [7] 514.68/148.29 [0 1] [0 1] [7] 514.68/148.29 >= [1 0] XS + [7] 514.68/148.29 [0 1] [7] 514.68/148.29 = [c_15(activate^#(XS))] 514.68/148.29 514.68/148.29 [take^#(N, XS)] = [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 >= [1 1] N + [1 0] XS + [7] 514.68/148.29 [0 0] [0 1] [7] 514.68/148.29 = [c_16(fst^#(splitAt(N, XS)))] 514.68/148.29 514.68/148.29 514.68/148.29 Further, it can be verified that all rules not oriented are covered by the weightgap condition. 514.68/148.29 514.68/148.29 We are left with following problem, upon which TcT provides the 514.68/148.29 certificate YES(O(1),O(n^1)). 514.68/148.29 514.68/148.29 Strict Trs: { activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.29 Weak DPs: 514.68/148.29 { U11^#(tt(), N, X, XS) -> 514.68/148.29 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.68/148.29 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.68/148.29 , activate^#(X) -> c_5(X) 514.68/148.29 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.68/148.29 , splitAt^#(s(N), cons(X, XS)) -> 514.68/148.29 c_3(U11^#(tt(), N, X, activate(XS))) 514.68/148.29 , splitAt^#(0(), XS) -> c_4(XS) 514.68/148.29 , natsFrom^#(N) -> c_12(N, N) 514.68/148.29 , natsFrom^#(X) -> c_13(X) 514.68/148.29 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.68/148.29 , snd^#(pair(X, Y)) -> c_8(Y) 514.68/148.29 , and^#(tt(), X) -> c_9(activate^#(X)) 514.68/148.29 , fst^#(pair(X, Y)) -> c_10(X) 514.68/148.29 , head^#(cons(N, XS)) -> c_11(N) 514.68/148.29 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.68/148.29 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.68/148.29 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.68/148.29 Weak Trs: 514.68/148.29 { U11(tt(), N, X, XS) -> 514.68/148.29 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.68/148.29 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.68/148.29 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.68/148.29 , splitAt(0(), XS) -> pair(nil(), XS) 514.68/148.29 , activate(X) -> X 514.68/148.29 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.68/148.29 , snd(pair(X, Y)) -> Y 514.68/148.29 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.68/148.29 , natsFrom(X) -> n__natsFrom(X) } 514.68/148.29 Obligation: 514.68/148.29 runtime complexity 514.68/148.29 Answer: 514.68/148.29 YES(O(1),O(n^1)) 514.68/148.29 514.68/148.29 We use the processor 'matrix interpretation of dimension 2' to 514.68/148.29 orient following rules strictly. 514.68/148.29 514.68/148.29 Trs: { activate(n__natsFrom(X)) -> natsFrom(X) } 514.68/148.29 514.68/148.29 The induced complexity on above rules (modulo remaining rules) is 514.68/148.29 YES(?,O(n^1)) . These rules are moved into the corresponding weak 514.68/148.29 component(s). 514.68/148.29 514.68/148.29 Sub-proof: 514.68/148.29 ---------- 514.68/148.29 The following argument positions are usable: 514.68/148.29 Uargs(U11) = {3, 4}, Uargs(U12) = {1, 2}, Uargs(splitAt) = {1, 2}, 514.68/148.29 Uargs(activate) = {1}, Uargs(pair) = {1, 2}, Uargs(cons) = {1, 2}, 514.68/148.29 Uargs(snd) = {1}, Uargs(U11^#) = {4}, Uargs(c_1) = {1}, 514.68/148.29 Uargs(U12^#) = {1, 2}, Uargs(c_2) = {1, 2, 3}, 514.68/148.29 Uargs(activate^#) = {1}, Uargs(c_3) = {1}, Uargs(c_5) = {1}, 514.68/148.29 Uargs(c_6) = {1}, Uargs(c_7) = {1}, Uargs(snd^#) = {1}, 514.68/148.29 Uargs(c_8) = {1}, Uargs(c_9) = {1}, Uargs(fst^#) = {1}, 514.68/148.29 Uargs(c_10) = {1}, Uargs(head^#) = {1}, Uargs(c_11) = {1}, 514.68/148.29 Uargs(c_14) = {1}, Uargs(c_15) = {1}, Uargs(c_16) = {1} 514.68/148.29 514.68/148.29 TcT has computed the following constructor-based matrix 514.68/148.29 interpretation satisfying not(EDA) and not(IDA(1)). 514.68/148.29 514.68/148.29 [U11](x1, x2, x3, x4) = [4 4] x1 + [1 2] x2 + [1 0] x3 + [1 514.68/148.29 1] x4 + [1] 514.68/148.29 [0 7] [0 0] [0 0] [0 514.68/148.29 0] [0] 514.68/148.29 514.68/148.29 [tt] = [1] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [U12](x1, x2) = [1 0] x1 + [1 0] x2 + [1] 514.68/148.29 [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [splitAt](x1, x2) = [1 2] x1 + [1 1] x2 + [1] 514.68/148.29 [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [activate](x1) = [1 0] x1 + [1] 514.68/148.29 [0 1] [0] 514.68/148.29 514.68/148.29 [pair](x1, x2) = [1 1] x1 + [1 1] x2 + [0] 514.68/148.29 [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [cons](x1, x2) = [1 0] x1 + [1 1] x2 + [0] 514.68/148.29 [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [afterNth](x1, x2) = [4 4] x1 + [2 1] x2 + [1] 514.68/148.29 [4 4] [4 4] [4] 514.68/148.29 514.68/148.29 [snd](x1) = [1 0] x1 + [0] 514.68/148.29 [1 0] [0] 514.68/148.29 514.68/148.29 [natsFrom](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [n__natsFrom](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [s](x1) = [0 0] x1 + [0] 514.68/148.29 [1 1] [3] 514.68/148.29 514.68/148.29 [0] = [4] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [nil] = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [U11^#](x1, x2, x3, x4) = [4 0] x1 + [1 2] x2 + [1 0] x3 + [1 514.68/148.29 1] x4 + [0] 514.68/148.29 [0 0] [0 4] [0 0] [4 514.68/148.29 0] [0] 514.68/148.29 514.68/148.29 [c_1](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [U12^#](x1, x2) = [1 0] x1 + [1 0] x2 + [0] 514.68/148.29 [0 0] [4 4] [0] 514.68/148.29 514.68/148.29 [c_2](x1, x2, x3) = [1 0] x1 + [1 1] x2 + [1 1] x3 + [0] 514.68/148.29 [0 0] [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [activate^#](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [splitAt^#](x1, x2) = [0 4] x1 + [2 0] x2 + [0] 514.68/148.29 [0 0] [0 0] [0] 514.68/148.29 514.68/148.29 [c_3](x1) = [2 0] x1 + [1] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_4](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_5](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_6](x1) = [2 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [natsFrom^#](x1) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [afterNth^#](x1, x2) = [7 7] x1 + [7 7] x2 + [7] 514.68/148.29 [7 7] [7 7] [7] 514.68/148.29 514.68/148.29 [c_7](x1) = [2 0] x1 + [3] 514.68/148.29 [0 0] [7] 514.68/148.29 514.68/148.29 [snd^#](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_8](x1) = [1 1] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [and^#](x1, x2) = [0 4] x1 + [7 7] x2 + [7] 514.68/148.29 [0 7] [7 7] [7] 514.68/148.29 514.68/148.29 [c_9](x1) = [2 0] x1 + [3] 514.68/148.29 [0 0] [3] 514.68/148.29 514.68/148.29 [fst^#](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_10](x1) = [1 1] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [head^#](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_11](x1) = [1 0] x1 + [0] 514.68/148.29 [0 0] [0] 514.68/148.29 514.68/148.29 [c_12](x1, x2) = [0] 514.68/148.29 [0] 514.68/148.29 514.68/148.29 [c_13](x1) = [0] 514.93/148.30 [0] 514.93/148.30 514.93/148.30 [sel^#](x1, x2) = [7 7] x1 + [7 7] x2 + [7] 514.93/148.30 [7 7] [7 7] [7] 514.93/148.30 514.93/148.30 [c_14](x1) = [1 0] x1 + [3] 514.93/148.30 [0 0] [7] 514.93/148.30 514.93/148.30 [tail^#](x1) = [2 0] x1 + [7] 514.93/148.30 [0 0] [7] 514.93/148.30 514.93/148.30 [c_15](x1) = [1 0] x1 + [3] 514.93/148.30 [0 0] [3] 514.93/148.30 514.93/148.30 [take^#](x1, x2) = [7 7] x1 + [7 7] x2 + [7] 514.93/148.30 [7 7] [7 7] [7] 514.93/148.30 514.93/148.30 [c_16](x1) = [1 0] x1 + [3] 514.93/148.30 [0 0] [7] 514.93/148.30 514.93/148.30 The order satisfies the following ordering constraints: 514.93/148.30 514.93/148.30 [U11(tt(), N, X, XS)] = [1 2] N + [1 0] X + [1 1] XS + [5] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 >= [1 2] N + [1 0] X + [1 1] XS + [5] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [U12(splitAt(activate(N), activate(XS)), activate(X))] 514.93/148.30 514.93/148.30 [U12(pair(YS, ZS), X)] = [1 0] X + [1 1] YS + [1 1] ZS + [1] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 >= [1 0] X + [1 1] YS + [1 1] ZS + [1] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [pair(cons(activate(X), YS), ZS)] 514.93/148.30 514.93/148.30 [splitAt(s(N), cons(X, XS))] = [2 2] N + [1 0] X + [1 1] XS + [7] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 > [1 2] N + [1 0] X + [1 1] XS + [6] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [U11(tt(), N, X, activate(XS))] 514.93/148.30 514.93/148.30 [splitAt(0(), XS)] = [1 1] XS + [5] 514.93/148.30 [0 0] [0] 514.93/148.30 > [1 1] XS + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [pair(nil(), XS)] 514.93/148.30 514.93/148.30 [activate(X)] = [1 0] X + [1] 514.93/148.30 [0 1] [0] 514.93/148.30 > [1 0] X + [0] 514.93/148.30 [0 1] [0] 514.93/148.30 = [X] 514.93/148.30 514.93/148.30 [activate(n__natsFrom(X))] = [1 0] X + [1] 514.93/148.30 [0 0] [0] 514.93/148.30 > [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [natsFrom(X)] 514.93/148.30 514.93/148.30 [afterNth(N, XS)] = [4 4] N + [2 1] XS + [1] 514.93/148.30 [4 4] [4 4] [4] 514.93/148.30 >= [1 2] N + [1 1] XS + [1] 514.93/148.30 [1 2] [1 1] [1] 514.93/148.30 = [snd(splitAt(N, XS))] 514.93/148.30 514.93/148.30 [snd(pair(X, Y))] = [1 1] X + [1 1] Y + [0] 514.93/148.30 [1 1] [1 1] [0] 514.93/148.30 >= [1 0] Y + [0] 514.93/148.30 [0 1] [0] 514.93/148.30 = [Y] 514.93/148.30 514.93/148.30 [natsFrom(N)] = [1 0] N + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 >= [1 0] N + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [cons(N, n__natsFrom(s(N)))] 514.93/148.30 514.93/148.30 [natsFrom(X)] = [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 >= [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [n__natsFrom(X)] 514.93/148.30 514.93/148.30 [U11^#(tt(), N, X, XS)] = [1 2] N + [1 0] X + [1 1] XS + [4] 514.93/148.30 [0 4] [0 0] [4 0] [0] 514.93/148.30 >= [1 2] N + [1 0] X + [1 1] XS + [4] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X)))] 514.93/148.30 514.93/148.30 [U12^#(pair(YS, ZS), X)] = [1 0] X + [1 1] YS + [1 1] ZS + [0] 514.93/148.30 [4 4] [0 0] [0 0] [0] 514.93/148.30 >= [1 0] X + [1 1] YS + [1 1] ZS + [0] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [c_2(activate^#(X), YS, ZS)] 514.93/148.30 514.93/148.30 [activate^#(X)] = [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 >= [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [c_5(X)] 514.93/148.30 514.93/148.30 [activate^#(n__natsFrom(X))] = [1 0] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 >= [0] 514.93/148.30 [0] 514.93/148.30 = [c_6(natsFrom^#(X))] 514.93/148.30 514.93/148.30 [splitAt^#(s(N), cons(X, XS))] = [4 4] N + [2 0] X + [2 2] XS + [12] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 > [2 4] N + [2 0] X + [2 2] XS + [11] 514.93/148.30 [0 0] [0 0] [0 0] [0] 514.93/148.30 = [c_3(U11^#(tt(), N, X, activate(XS)))] 514.93/148.30 514.93/148.30 [splitAt^#(0(), XS)] = [2 0] XS + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 >= [1 0] XS + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [c_4(XS)] 514.93/148.30 514.93/148.30 [natsFrom^#(N)] = [0] 514.93/148.30 [0] 514.93/148.30 >= [0] 514.93/148.30 [0] 514.93/148.30 = [c_12(N, N)] 514.93/148.30 514.93/148.30 [natsFrom^#(X)] = [0] 514.93/148.30 [0] 514.93/148.30 >= [0] 514.93/148.30 [0] 514.93/148.30 = [c_13(X)] 514.93/148.30 514.93/148.30 [afterNth^#(N, XS)] = [7 7] N + [7 7] XS + [7] 514.93/148.30 [7 7] [7 7] [7] 514.93/148.30 > [2 4] N + [2 2] XS + [5] 514.93/148.30 [0 0] [0 0] [7] 514.93/148.30 = [c_7(snd^#(splitAt(N, XS)))] 514.93/148.30 514.93/148.30 [snd^#(pair(X, Y))] = [1 1] X + [1 1] Y + [0] 514.93/148.30 [0 0] [0 0] [0] 514.93/148.30 >= [1 1] Y + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [c_8(Y)] 514.93/148.30 514.93/148.30 [and^#(tt(), X)] = [7 7] X + [7] 514.93/148.30 [7 7] [7] 514.93/148.30 > [2 0] X + [3] 514.93/148.30 [0 0] [3] 514.93/148.30 = [c_9(activate^#(X))] 514.93/148.30 514.93/148.30 [fst^#(pair(X, Y))] = [1 1] X + [1 1] Y + [0] 514.93/148.30 [0 0] [0 0] [0] 514.93/148.30 >= [1 1] X + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [c_10(X)] 514.93/148.30 514.93/148.30 [head^#(cons(N, XS))] = [1 0] N + [1 1] XS + [0] 514.93/148.30 [0 0] [0 0] [0] 514.93/148.30 >= [1 0] N + [0] 514.93/148.30 [0 0] [0] 514.93/148.30 = [c_11(N)] 514.93/148.30 514.93/148.30 [sel^#(N, XS)] = [7 7] N + [7 7] XS + [7] 514.93/148.30 [7 7] [7 7] [7] 514.93/148.30 > [4 4] N + [2 1] XS + [4] 514.93/148.30 [0 0] [0 0] [7] 514.93/148.30 = [c_14(head^#(afterNth(N, XS)))] 514.93/148.30 514.93/148.30 [tail^#(cons(N, XS))] = [2 0] N + [2 2] XS + [7] 514.93/148.30 [0 0] [0 0] [7] 514.93/148.30 > [1 0] XS + [3] 514.93/148.30 [0 0] [3] 514.93/148.30 = [c_15(activate^#(XS))] 514.93/148.30 514.93/148.30 [take^#(N, XS)] = [7 7] N + [7 7] XS + [7] 514.93/148.30 [7 7] [7 7] [7] 514.93/148.30 > [1 2] N + [1 1] XS + [4] 514.93/148.30 [0 0] [0 0] [7] 514.93/148.30 = [c_16(fst^#(splitAt(N, XS)))] 514.93/148.30 514.93/148.30 514.93/148.30 We return to the main proof. 514.93/148.30 514.93/148.30 We are left with following problem, upon which TcT provides the 514.93/148.30 certificate YES(O(1),O(1)). 514.93/148.30 514.93/148.30 Weak DPs: 514.93/148.30 { U11^#(tt(), N, X, XS) -> 514.93/148.30 c_1(U12^#(splitAt(activate(N), activate(XS)), activate(X))) 514.93/148.30 , U12^#(pair(YS, ZS), X) -> c_2(activate^#(X), YS, ZS) 514.93/148.30 , activate^#(X) -> c_5(X) 514.93/148.30 , activate^#(n__natsFrom(X)) -> c_6(natsFrom^#(X)) 514.93/148.30 , splitAt^#(s(N), cons(X, XS)) -> 514.93/148.30 c_3(U11^#(tt(), N, X, activate(XS))) 514.93/148.30 , splitAt^#(0(), XS) -> c_4(XS) 514.93/148.30 , natsFrom^#(N) -> c_12(N, N) 514.93/148.30 , natsFrom^#(X) -> c_13(X) 514.93/148.30 , afterNth^#(N, XS) -> c_7(snd^#(splitAt(N, XS))) 514.93/148.30 , snd^#(pair(X, Y)) -> c_8(Y) 514.93/148.30 , and^#(tt(), X) -> c_9(activate^#(X)) 514.93/148.30 , fst^#(pair(X, Y)) -> c_10(X) 514.93/148.30 , head^#(cons(N, XS)) -> c_11(N) 514.93/148.30 , sel^#(N, XS) -> c_14(head^#(afterNth(N, XS))) 514.93/148.30 , tail^#(cons(N, XS)) -> c_15(activate^#(XS)) 514.93/148.30 , take^#(N, XS) -> c_16(fst^#(splitAt(N, XS))) } 514.93/148.30 Weak Trs: 514.93/148.30 { U11(tt(), N, X, XS) -> 514.93/148.30 U12(splitAt(activate(N), activate(XS)), activate(X)) 514.93/148.30 , U12(pair(YS, ZS), X) -> pair(cons(activate(X), YS), ZS) 514.93/148.30 , splitAt(s(N), cons(X, XS)) -> U11(tt(), N, X, activate(XS)) 514.93/148.30 , splitAt(0(), XS) -> pair(nil(), XS) 514.93/148.30 , activate(X) -> X 514.93/148.30 , activate(n__natsFrom(X)) -> natsFrom(X) 514.93/148.30 , afterNth(N, XS) -> snd(splitAt(N, XS)) 514.93/148.30 , snd(pair(X, Y)) -> Y 514.93/148.30 , natsFrom(N) -> cons(N, n__natsFrom(s(N))) 514.93/148.30 , natsFrom(X) -> n__natsFrom(X) } 514.93/148.30 Obligation: 514.93/148.30 runtime complexity 514.93/148.30 Answer: 514.93/148.30 YES(O(1),O(1)) 514.93/148.30 514.93/148.30 Empty rules are trivially bounded 514.93/148.30 514.93/148.30 Hurray, we answered YES(O(1),O(n^1)) 515.24/148.62 EOF