YES(?,O(n^1)) 1025.14/297.14 YES(?,O(n^1)) 1025.14/297.14 1025.14/297.14 We are left with following problem, upon which TcT provides the 1025.14/297.14 certificate YES(?,O(n^1)). 1025.14/297.14 1025.14/297.14 Strict Trs: 1025.14/297.14 { active(zeros()) -> mark(cons(0(), zeros())) 1025.14/297.14 , active(cons(X1, X2)) -> cons(active(X1), X2) 1025.14/297.14 , active(and(X1, X2)) -> and(active(X1), X2) 1025.14/297.14 , active(and(tt(), X)) -> mark(X) 1025.14/297.14 , active(length(X)) -> length(active(X)) 1025.14/297.14 , active(length(cons(N, L))) -> mark(s(length(L))) 1025.14/297.14 , active(length(nil())) -> mark(0()) 1025.14/297.14 , active(s(X)) -> s(active(X)) 1025.14/297.14 , active(take(X1, X2)) -> take(X1, active(X2)) 1025.14/297.14 , active(take(X1, X2)) -> take(active(X1), X2) 1025.14/297.14 , active(take(0(), IL)) -> mark(nil()) 1025.14/297.14 , active(take(s(M), cons(N, IL))) -> mark(cons(N, take(M, IL))) 1025.14/297.14 , cons(mark(X1), X2) -> mark(cons(X1, X2)) 1025.14/297.14 , cons(ok(X1), ok(X2)) -> ok(cons(X1, X2)) 1025.14/297.14 , and(mark(X1), X2) -> mark(and(X1, X2)) 1025.14/297.14 , and(ok(X1), ok(X2)) -> ok(and(X1, X2)) 1025.14/297.14 , length(mark(X)) -> mark(length(X)) 1025.14/297.14 , length(ok(X)) -> ok(length(X)) 1025.14/297.14 , s(mark(X)) -> mark(s(X)) 1025.14/297.14 , s(ok(X)) -> ok(s(X)) 1025.14/297.14 , take(X1, mark(X2)) -> mark(take(X1, X2)) 1025.14/297.14 , take(mark(X1), X2) -> mark(take(X1, X2)) 1025.14/297.14 , take(ok(X1), ok(X2)) -> ok(take(X1, X2)) 1025.14/297.14 , proper(zeros()) -> ok(zeros()) 1025.14/297.14 , proper(cons(X1, X2)) -> cons(proper(X1), proper(X2)) 1025.14/297.14 , proper(0()) -> ok(0()) 1025.14/297.14 , proper(and(X1, X2)) -> and(proper(X1), proper(X2)) 1025.14/297.14 , proper(tt()) -> ok(tt()) 1025.14/297.14 , proper(length(X)) -> length(proper(X)) 1025.14/297.14 , proper(nil()) -> ok(nil()) 1025.14/297.14 , proper(s(X)) -> s(proper(X)) 1025.14/297.14 , proper(take(X1, X2)) -> take(proper(X1), proper(X2)) 1025.14/297.14 , top(mark(X)) -> top(proper(X)) 1025.14/297.14 , top(ok(X)) -> top(active(X)) } 1025.14/297.14 Obligation: 1025.14/297.14 runtime complexity 1025.14/297.14 Answer: 1025.14/297.14 YES(?,O(n^1)) 1025.14/297.14 1025.14/297.14 The problem is match-bounded by 5. The enriched problem is 1025.14/297.14 compatible with the following automaton. 1025.14/297.14 { active_0(2) -> 1 1025.14/297.14 , active_0(3) -> 1 1025.14/297.14 , active_0(5) -> 1 1025.14/297.14 , active_0(7) -> 1 1025.14/297.14 , active_0(9) -> 1 1025.14/297.14 , active_0(13) -> 1 1025.14/297.14 , active_1(2) -> 23 1025.14/297.14 , active_1(3) -> 23 1025.14/297.14 , active_1(5) -> 23 1025.14/297.14 , active_1(7) -> 23 1025.14/297.14 , active_1(9) -> 23 1025.14/297.14 , active_1(13) -> 23 1025.14/297.14 , active_2(16) -> 24 1025.14/297.14 , active_2(17) -> 24 1025.14/297.14 , active_3(34) -> 30 1025.14/297.14 , active_4(26) -> 36 1025.14/297.14 , active_4(37) -> 38 1025.14/297.14 , active_5(33) -> 39 1025.14/297.14 , zeros_0() -> 2 1025.14/297.14 , zeros_1() -> 17 1025.14/297.14 , zeros_2() -> 27 1025.14/297.14 , zeros_3() -> 35 1025.14/297.14 , mark_0(2) -> 3 1025.14/297.14 , mark_0(3) -> 3 1025.14/297.14 , mark_0(5) -> 3 1025.14/297.14 , mark_0(7) -> 3 1025.14/297.14 , mark_0(9) -> 3 1025.14/297.14 , mark_0(13) -> 3 1025.14/297.14 , mark_1(15) -> 1 1025.14/297.14 , mark_1(15) -> 23 1025.14/297.14 , mark_1(18) -> 4 1025.14/297.14 , mark_1(18) -> 18 1025.14/297.14 , mark_1(19) -> 6 1025.14/297.14 , mark_1(19) -> 19 1025.14/297.14 , mark_1(20) -> 8 1025.14/297.14 , mark_1(20) -> 20 1025.14/297.14 , mark_1(21) -> 10 1025.14/297.14 , mark_1(21) -> 21 1025.14/297.14 , mark_1(22) -> 11 1025.14/297.14 , mark_1(22) -> 22 1025.14/297.14 , mark_2(25) -> 24 1025.14/297.14 , cons_0(2, 2) -> 4 1025.14/297.14 , cons_0(2, 3) -> 4 1025.14/297.14 , cons_0(2, 5) -> 4 1025.14/297.14 , cons_0(2, 7) -> 4 1025.14/297.14 , cons_0(2, 9) -> 4 1025.14/297.14 , cons_0(2, 13) -> 4 1025.14/297.14 , cons_0(3, 2) -> 4 1025.14/297.14 , cons_0(3, 3) -> 4 1025.14/297.14 , cons_0(3, 5) -> 4 1025.14/297.14 , cons_0(3, 7) -> 4 1025.14/297.14 , cons_0(3, 9) -> 4 1025.14/297.14 , cons_0(3, 13) -> 4 1025.14/297.14 , cons_0(5, 2) -> 4 1025.14/297.14 , cons_0(5, 3) -> 4 1025.14/297.14 , cons_0(5, 5) -> 4 1025.14/297.14 , cons_0(5, 7) -> 4 1025.14/297.14 , cons_0(5, 9) -> 4 1025.14/297.14 , cons_0(5, 13) -> 4 1025.14/297.14 , cons_0(7, 2) -> 4 1025.14/297.14 , cons_0(7, 3) -> 4 1025.14/297.14 , cons_0(7, 5) -> 4 1025.14/297.14 , cons_0(7, 7) -> 4 1025.14/297.14 , cons_0(7, 9) -> 4 1025.14/297.14 , cons_0(7, 13) -> 4 1025.14/297.14 , cons_0(9, 2) -> 4 1025.14/297.14 , cons_0(9, 3) -> 4 1025.14/297.14 , cons_0(9, 5) -> 4 1025.14/297.14 , cons_0(9, 7) -> 4 1025.14/297.14 , cons_0(9, 9) -> 4 1025.14/297.14 , cons_0(9, 13) -> 4 1025.14/297.14 , cons_0(13, 2) -> 4 1025.14/297.14 , cons_0(13, 3) -> 4 1025.14/297.14 , cons_0(13, 5) -> 4 1025.14/297.14 , cons_0(13, 7) -> 4 1025.14/297.14 , cons_0(13, 9) -> 4 1025.14/297.14 , cons_0(13, 13) -> 4 1025.14/297.14 , cons_1(2, 2) -> 18 1025.14/297.14 , cons_1(2, 3) -> 18 1025.14/297.14 , cons_1(2, 5) -> 18 1025.14/297.14 , cons_1(2, 7) -> 18 1025.14/297.14 , cons_1(2, 9) -> 18 1025.14/297.14 , cons_1(2, 13) -> 18 1025.14/297.14 , cons_1(3, 2) -> 18 1025.14/297.14 , cons_1(3, 3) -> 18 1025.14/297.14 , cons_1(3, 5) -> 18 1025.14/297.14 , cons_1(3, 7) -> 18 1025.14/297.14 , cons_1(3, 9) -> 18 1025.14/297.14 , cons_1(3, 13) -> 18 1025.14/297.14 , cons_1(5, 2) -> 18 1025.14/297.14 , cons_1(5, 3) -> 18 1025.14/297.14 , cons_1(5, 5) -> 18 1025.14/297.14 , cons_1(5, 7) -> 18 1025.14/297.14 , cons_1(5, 9) -> 18 1025.14/297.14 , cons_1(5, 13) -> 18 1025.14/297.14 , cons_1(7, 2) -> 18 1025.14/297.14 , cons_1(7, 3) -> 18 1025.14/297.14 , cons_1(7, 5) -> 18 1025.14/297.14 , cons_1(7, 7) -> 18 1025.14/297.14 , cons_1(7, 9) -> 18 1025.14/297.14 , cons_1(7, 13) -> 18 1025.14/297.14 , cons_1(9, 2) -> 18 1025.14/297.14 , cons_1(9, 3) -> 18 1025.14/297.14 , cons_1(9, 5) -> 18 1025.14/297.14 , cons_1(9, 7) -> 18 1025.14/297.14 , cons_1(9, 9) -> 18 1025.14/297.14 , cons_1(9, 13) -> 18 1025.14/297.14 , cons_1(13, 2) -> 18 1025.14/297.14 , cons_1(13, 3) -> 18 1025.14/297.14 , cons_1(13, 5) -> 18 1025.14/297.14 , cons_1(13, 7) -> 18 1025.14/297.14 , cons_1(13, 9) -> 18 1025.14/297.14 , cons_1(13, 13) -> 18 1025.14/297.14 , cons_1(16, 17) -> 15 1025.14/297.14 , cons_2(26, 27) -> 25 1025.14/297.14 , cons_2(28, 29) -> 24 1025.14/297.14 , cons_3(26, 27) -> 34 1025.14/297.14 , cons_3(31, 32) -> 30 1025.14/297.14 , cons_4(33, 35) -> 37 1025.14/297.14 , cons_4(36, 27) -> 30 1025.14/297.14 , cons_5(39, 35) -> 38 1025.14/297.14 , 0_0() -> 5 1025.14/297.14 , 0_1() -> 16 1025.14/297.14 , 0_2() -> 26 1025.14/297.14 , 0_3() -> 33 1025.14/297.14 , and_0(2, 2) -> 6 1025.14/297.14 , and_0(2, 3) -> 6 1025.14/297.14 , and_0(2, 5) -> 6 1025.14/297.14 , and_0(2, 7) -> 6 1025.14/297.14 , and_0(2, 9) -> 6 1025.14/297.14 , and_0(2, 13) -> 6 1025.14/297.14 , and_0(3, 2) -> 6 1025.14/297.14 , and_0(3, 3) -> 6 1025.14/297.14 , and_0(3, 5) -> 6 1025.14/297.14 , and_0(3, 7) -> 6 1025.14/297.14 , and_0(3, 9) -> 6 1025.14/297.14 , and_0(3, 13) -> 6 1025.14/297.14 , and_0(5, 2) -> 6 1025.14/297.14 , and_0(5, 3) -> 6 1025.14/297.14 , and_0(5, 5) -> 6 1025.14/297.14 , and_0(5, 7) -> 6 1025.14/297.14 , and_0(5, 9) -> 6 1025.14/297.14 , and_0(5, 13) -> 6 1025.14/297.14 , and_0(7, 2) -> 6 1025.14/297.14 , and_0(7, 3) -> 6 1025.14/297.14 , and_0(7, 5) -> 6 1025.14/297.14 , and_0(7, 7) -> 6 1025.14/297.14 , and_0(7, 9) -> 6 1025.14/297.14 , and_0(7, 13) -> 6 1025.14/297.14 , and_0(9, 2) -> 6 1025.14/297.14 , and_0(9, 3) -> 6 1025.14/297.14 , and_0(9, 5) -> 6 1025.14/297.14 , and_0(9, 7) -> 6 1025.14/297.14 , and_0(9, 9) -> 6 1025.14/297.14 , and_0(9, 13) -> 6 1025.14/297.14 , and_0(13, 2) -> 6 1025.14/297.14 , and_0(13, 3) -> 6 1025.14/297.14 , and_0(13, 5) -> 6 1025.14/297.14 , and_0(13, 7) -> 6 1025.14/297.14 , and_0(13, 9) -> 6 1025.14/297.14 , and_0(13, 13) -> 6 1025.14/297.14 , and_1(2, 2) -> 19 1025.14/297.14 , and_1(2, 3) -> 19 1025.14/297.14 , and_1(2, 5) -> 19 1025.14/297.14 , and_1(2, 7) -> 19 1025.14/297.14 , and_1(2, 9) -> 19 1025.14/297.14 , and_1(2, 13) -> 19 1025.14/297.14 , and_1(3, 2) -> 19 1025.14/297.14 , and_1(3, 3) -> 19 1025.14/297.14 , and_1(3, 5) -> 19 1025.14/297.14 , and_1(3, 7) -> 19 1025.14/297.14 , and_1(3, 9) -> 19 1025.14/297.14 , and_1(3, 13) -> 19 1025.14/297.14 , and_1(5, 2) -> 19 1025.14/297.14 , and_1(5, 3) -> 19 1025.14/297.14 , and_1(5, 5) -> 19 1025.14/297.14 , and_1(5, 7) -> 19 1025.14/297.14 , and_1(5, 9) -> 19 1025.14/297.14 , and_1(5, 13) -> 19 1025.14/297.14 , and_1(7, 2) -> 19 1025.14/297.14 , and_1(7, 3) -> 19 1025.14/297.14 , and_1(7, 5) -> 19 1025.14/297.14 , and_1(7, 7) -> 19 1025.14/297.14 , and_1(7, 9) -> 19 1025.14/297.14 , and_1(7, 13) -> 19 1025.14/297.14 , and_1(9, 2) -> 19 1025.14/297.14 , and_1(9, 3) -> 19 1025.14/297.14 , and_1(9, 5) -> 19 1025.14/297.14 , and_1(9, 7) -> 19 1025.14/297.14 , and_1(9, 9) -> 19 1025.14/297.14 , and_1(9, 13) -> 19 1025.14/297.14 , and_1(13, 2) -> 19 1025.14/297.14 , and_1(13, 3) -> 19 1025.14/297.14 , and_1(13, 5) -> 19 1025.14/297.14 , and_1(13, 7) -> 19 1025.14/297.14 , and_1(13, 9) -> 19 1025.14/297.14 , and_1(13, 13) -> 19 1025.14/297.14 , tt_0() -> 7 1025.14/297.14 , tt_1() -> 16 1025.14/297.14 , tt_2() -> 26 1025.14/297.14 , tt_3() -> 33 1025.14/297.14 , length_0(2) -> 8 1025.14/297.14 , length_0(3) -> 8 1025.14/297.14 , length_0(5) -> 8 1025.14/297.14 , length_0(7) -> 8 1025.14/297.14 , length_0(9) -> 8 1025.14/297.14 , length_0(13) -> 8 1025.14/297.14 , length_1(2) -> 20 1025.14/297.14 , length_1(3) -> 20 1025.14/297.14 , length_1(5) -> 20 1025.14/297.14 , length_1(7) -> 20 1025.14/297.14 , length_1(9) -> 20 1025.14/297.14 , length_1(13) -> 20 1025.14/297.14 , nil_0() -> 9 1025.14/297.14 , nil_1() -> 16 1025.14/297.14 , nil_2() -> 26 1025.14/297.14 , nil_3() -> 33 1025.14/297.14 , s_0(2) -> 10 1025.14/297.14 , s_0(3) -> 10 1025.14/297.14 , s_0(5) -> 10 1025.14/297.14 , s_0(7) -> 10 1025.14/297.14 , s_0(9) -> 10 1025.14/297.14 , s_0(13) -> 10 1025.14/297.14 , s_1(2) -> 21 1025.14/297.14 , s_1(3) -> 21 1025.14/297.14 , s_1(5) -> 21 1025.14/297.14 , s_1(7) -> 21 1025.14/297.14 , s_1(9) -> 21 1025.14/297.14 , s_1(13) -> 21 1025.14/297.14 , take_0(2, 2) -> 11 1025.14/297.14 , take_0(2, 3) -> 11 1025.14/297.14 , take_0(2, 5) -> 11 1025.14/297.14 , take_0(2, 7) -> 11 1025.14/297.14 , take_0(2, 9) -> 11 1025.14/297.14 , take_0(2, 13) -> 11 1025.14/297.14 , take_0(3, 2) -> 11 1025.14/297.14 , take_0(3, 3) -> 11 1025.14/297.14 , take_0(3, 5) -> 11 1025.14/297.14 , take_0(3, 7) -> 11 1025.14/297.14 , take_0(3, 9) -> 11 1025.14/297.14 , take_0(3, 13) -> 11 1025.14/297.14 , take_0(5, 2) -> 11 1025.14/297.14 , take_0(5, 3) -> 11 1025.14/297.14 , take_0(5, 5) -> 11 1025.14/297.14 , take_0(5, 7) -> 11 1025.14/297.14 , take_0(5, 9) -> 11 1025.14/297.14 , take_0(5, 13) -> 11 1025.14/297.14 , take_0(7, 2) -> 11 1025.14/297.14 , take_0(7, 3) -> 11 1025.14/297.14 , take_0(7, 5) -> 11 1025.14/297.14 , take_0(7, 7) -> 11 1025.14/297.14 , take_0(7, 9) -> 11 1025.14/297.14 , take_0(7, 13) -> 11 1025.14/297.14 , take_0(9, 2) -> 11 1025.14/297.14 , take_0(9, 3) -> 11 1025.14/297.14 , take_0(9, 5) -> 11 1025.14/297.14 , take_0(9, 7) -> 11 1025.14/297.14 , take_0(9, 9) -> 11 1025.14/297.14 , take_0(9, 13) -> 11 1025.14/297.14 , take_0(13, 2) -> 11 1025.14/297.14 , take_0(13, 3) -> 11 1025.14/297.14 , take_0(13, 5) -> 11 1025.14/297.14 , take_0(13, 7) -> 11 1025.14/297.14 , take_0(13, 9) -> 11 1025.14/297.14 , take_0(13, 13) -> 11 1025.14/297.14 , take_1(2, 2) -> 22 1025.14/297.14 , take_1(2, 3) -> 22 1025.14/297.14 , take_1(2, 5) -> 22 1025.14/297.14 , take_1(2, 7) -> 22 1025.14/297.14 , take_1(2, 9) -> 22 1025.14/297.14 , take_1(2, 13) -> 22 1025.14/297.14 , take_1(3, 2) -> 22 1025.14/297.14 , take_1(3, 3) -> 22 1025.14/297.14 , take_1(3, 5) -> 22 1025.14/297.14 , take_1(3, 7) -> 22 1025.14/297.14 , take_1(3, 9) -> 22 1025.14/297.14 , take_1(3, 13) -> 22 1025.14/297.14 , take_1(5, 2) -> 22 1025.14/297.14 , take_1(5, 3) -> 22 1025.14/297.14 , take_1(5, 5) -> 22 1025.14/297.14 , take_1(5, 7) -> 22 1025.14/297.14 , take_1(5, 9) -> 22 1025.14/297.14 , take_1(5, 13) -> 22 1025.14/297.14 , take_1(7, 2) -> 22 1025.14/297.14 , take_1(7, 3) -> 22 1025.14/297.14 , take_1(7, 5) -> 22 1025.14/297.14 , take_1(7, 7) -> 22 1025.14/297.14 , take_1(7, 9) -> 22 1025.14/297.14 , take_1(7, 13) -> 22 1025.14/297.14 , take_1(9, 2) -> 22 1025.14/297.14 , take_1(9, 3) -> 22 1025.14/297.14 , take_1(9, 5) -> 22 1025.14/297.14 , take_1(9, 7) -> 22 1025.14/297.14 , take_1(9, 9) -> 22 1025.14/297.14 , take_1(9, 13) -> 22 1025.14/297.14 , take_1(13, 2) -> 22 1025.14/297.14 , take_1(13, 3) -> 22 1025.14/297.14 , take_1(13, 5) -> 22 1025.14/297.14 , take_1(13, 7) -> 22 1025.14/297.14 , take_1(13, 9) -> 22 1025.14/297.14 , take_1(13, 13) -> 22 1025.14/297.14 , proper_0(2) -> 12 1025.14/297.14 , proper_0(3) -> 12 1025.14/297.14 , proper_0(5) -> 12 1025.14/297.14 , proper_0(7) -> 12 1025.14/297.14 , proper_0(9) -> 12 1025.14/297.14 , proper_0(13) -> 12 1025.14/297.14 , proper_1(2) -> 23 1025.14/297.14 , proper_1(3) -> 23 1025.14/297.14 , proper_1(5) -> 23 1025.14/297.14 , proper_1(7) -> 23 1025.14/297.14 , proper_1(9) -> 23 1025.14/297.14 , proper_1(13) -> 23 1025.14/297.14 , proper_2(15) -> 24 1025.14/297.14 , proper_2(16) -> 28 1025.14/297.14 , proper_2(17) -> 29 1025.14/297.14 , proper_3(25) -> 30 1025.14/297.14 , proper_3(26) -> 31 1025.14/297.14 , proper_3(27) -> 32 1025.14/297.14 , ok_0(2) -> 13 1025.14/297.14 , ok_0(3) -> 13 1025.14/297.14 , ok_0(5) -> 13 1025.14/297.14 , ok_0(7) -> 13 1025.14/297.14 , ok_0(9) -> 13 1025.14/297.14 , ok_0(13) -> 13 1025.14/297.14 , ok_1(16) -> 12 1025.14/297.14 , ok_1(16) -> 23 1025.14/297.14 , ok_1(17) -> 12 1025.14/297.14 , ok_1(17) -> 23 1025.14/297.14 , ok_1(18) -> 4 1025.14/297.14 , ok_1(18) -> 18 1025.14/297.14 , ok_1(19) -> 6 1025.14/297.14 , ok_1(19) -> 19 1025.14/297.14 , ok_1(20) -> 8 1025.14/297.14 , ok_1(20) -> 20 1025.14/297.14 , ok_1(21) -> 10 1025.14/297.14 , ok_1(21) -> 21 1025.14/297.14 , ok_1(22) -> 11 1025.14/297.14 , ok_1(22) -> 22 1025.14/297.14 , ok_2(26) -> 28 1025.14/297.14 , ok_2(27) -> 29 1025.14/297.14 , ok_3(33) -> 31 1025.14/297.14 , ok_3(34) -> 24 1025.14/297.14 , ok_3(35) -> 32 1025.14/297.14 , ok_4(37) -> 30 1025.14/297.14 , top_0(2) -> 14 1025.14/297.14 , top_0(3) -> 14 1025.14/297.14 , top_0(5) -> 14 1025.14/297.14 , top_0(7) -> 14 1025.14/297.14 , top_0(9) -> 14 1025.14/297.14 , top_0(13) -> 14 1025.14/297.14 , top_1(23) -> 14 1025.14/297.14 , top_2(24) -> 14 1025.14/297.14 , top_3(30) -> 14 1025.14/297.14 , top_4(38) -> 14 } 1025.14/297.14 1025.14/297.14 Hurray, we answered YES(?,O(n^1)) 1025.14/297.26 EOF