YES(O(1),O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [0] [#eq](x1, x2) = [0] [and](x1, x2) = [1] x1 + [2] x2 + [0] [#and](x1, x2) = [1] x1 + [2] x2 + [0] [eq](x1, x2) = [0] [eq#1](x1, x2) = [0] [::](x1, x2) = [1] x1 + [1] x2 + [1] [eq#3](x1, x2, x3) = [0] [nil] = [0] [eq#2](x1) = [0] [#false] = [0] [#true] = [0] [nub](x1) = [1] x1 + [0] [nub#1](x1) = [1] x1 + [0] [remove](x1, x2) = [1] x2 + [0] [remove#1](x1, x2) = [1] x1 + [0] [remove#2](x1, x2, x3, x4) = [1] x1 + [1] x3 + [1] x4 + [1] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] >= [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] >= [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] >= [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] >= [0] = [#false()] [#eq(nil(), nil())] = [0] >= [0] = [#true()] [#eq(#0(), #0())] = [0] >= [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #s(@y))] = [0] >= [0] = [#false()] [#eq(#neg(@x), #0())] = [0] >= [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #0())] = [0] >= [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] >= [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] >= [0] = [#eq(@x, @y)] [and(@x, @y)] = [1] @x + [2] @y + [0] >= [1] @x + [2] @y + [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] >= [0] = [#false()] [#and(#false(), #true())] = [0] >= [0] = [#false()] [#and(#true(), #false())] = [0] >= [0] = [#false()] [#and(#true(), #true())] = [0] >= [0] = [#true()] [eq(@l1, @l2)] = [0] >= [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0] >= [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0] >= [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0] >= [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] >= [0] = [#false()] [eq#2(::(@y, @ys))] = [0] >= [0] = [#false()] [eq#2(nil())] = [0] >= [0] = [#true()] [nub(@l)] = [1] @l + [0] >= [1] @l + [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1] @x + [1] @xs + [1] >= [1] @x + [1] @xs + [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] >= [0] = [nil()] [remove(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1] @y + [1] @ys + [1] >= [1] @y + [1] @ys + [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [0] >= [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1] @y + [1] @ys + [1] >= [1] @y + [1] @ys + [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1] @y + [1] @ys + [1] > [1] @ys + [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { nub(@l) -> nub#1(@l) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [0] [#eq](x1, x2) = [0] [and](x1, x2) = [2] x1 + [1] x2 + [0] [#and](x1, x2) = [1] x1 + [1] x2 + [0] [eq](x1, x2) = [0] [eq#1](x1, x2) = [0] [::](x1, x2) = [1] x1 + [1] x2 + [2] [eq#3](x1, x2, x3) = [0] [nil] = [0] [eq#2](x1) = [0] [#false] = [0] [#true] = [0] [nub](x1) = [2] x1 + [2] [nub#1](x1) = [2] x1 + [0] [remove](x1, x2) = [1] x2 + [0] [remove#1](x1, x2) = [1] x1 + [0] [remove#2](x1, x2, x3, x4) = [2] x1 + [1] x3 + [1] x4 + [2] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] >= [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] >= [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] >= [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] >= [0] = [#false()] [#eq(nil(), nil())] = [0] >= [0] = [#true()] [#eq(#0(), #0())] = [0] >= [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #s(@y))] = [0] >= [0] = [#false()] [#eq(#neg(@x), #0())] = [0] >= [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #0())] = [0] >= [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] >= [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] >= [0] = [#eq(@x, @y)] [and(@x, @y)] = [2] @x + [1] @y + [0] >= [1] @x + [1] @y + [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] >= [0] = [#false()] [#and(#false(), #true())] = [0] >= [0] = [#false()] [#and(#true(), #false())] = [0] >= [0] = [#false()] [#and(#true(), #true())] = [0] >= [0] = [#true()] [eq(@l1, @l2)] = [0] >= [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0] >= [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0] >= [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0] >= [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] >= [0] = [#false()] [eq#2(::(@y, @ys))] = [0] >= [0] = [#false()] [eq#2(nil())] = [0] >= [0] = [#true()] [nub(@l)] = [2] @l + [2] > [2] @l + [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [2] @x + [2] @xs + [4] >= [1] @x + [2] @xs + [4] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] >= [0] = [nil()] [remove(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1] @y + [1] @ys + [2] >= [1] @y + [1] @ys + [2] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [0] >= [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1] @y + [1] @ys + [2] >= [1] @y + [1] @ys + [2] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1] @y + [1] @ys + [2] > [1] @ys + [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , nub(@l) -> nub#1(@l) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [0] [#eq](x1, x2) = [0] [and](x1, x2) = [2] x1 + [2] x2 + [0] [#and](x1, x2) = [1] x1 + [2] x2 + [0] [eq](x1, x2) = [0] [eq#1](x1, x2) = [0] [::](x1, x2) = [1] x1 + [1] x2 + [1] [eq#3](x1, x2, x3) = [0] [nil] = [0] [eq#2](x1) = [0] [#false] = [0] [#true] = [0] [nub](x1) = [2] x1 + [2] [nub#1](x1) = [2] x1 + [2] [remove](x1, x2) = [1] x2 + [0] [remove#1](x1, x2) = [1] x1 + [0] [remove#2](x1, x2, x3, x4) = [1] x1 + [1] x3 + [1] x4 + [1] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] >= [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] >= [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] >= [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] >= [0] = [#false()] [#eq(nil(), nil())] = [0] >= [0] = [#true()] [#eq(#0(), #0())] = [0] >= [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#0(), #s(@y))] = [0] >= [0] = [#false()] [#eq(#neg(@x), #0())] = [0] >= [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #0())] = [0] >= [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] >= [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] >= [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] >= [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] >= [0] = [#eq(@x, @y)] [and(@x, @y)] = [2] @x + [2] @y + [0] >= [1] @x + [2] @y + [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] >= [0] = [#false()] [#and(#false(), #true())] = [0] >= [0] = [#false()] [#and(#true(), #false())] = [0] >= [0] = [#false()] [#and(#true(), #true())] = [0] >= [0] = [#true()] [eq(@l1, @l2)] = [0] >= [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0] >= [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0] >= [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0] >= [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] >= [0] = [#false()] [eq#2(::(@y, @ys))] = [0] >= [0] = [#false()] [eq#2(nil())] = [0] >= [0] = [#true()] [nub(@l)] = [2] @l + [2] >= [2] @l + [2] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [2] @x + [2] @xs + [4] > [1] @x + [2] @xs + [3] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [2] > [0] = [nil()] [remove(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1] @y + [1] @ys + [1] >= [1] @y + [1] @ys + [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [0] >= [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1] @y + [1] @ys + [1] >= [1] @y + [1] @ys + [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1] @y + [1] @ys + [1] > [1] @ys + [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 2' to orient following rules strictly. Trs: { remove#1(nil(), @x) -> nil() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(1)). [#equal](x1, x2) = [0] [1] [#eq](x1, x2) = [0] [1] [and](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [0 0] [0 0] [0] [#and](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [0 0] [0 0] [0] [eq](x1, x2) = [0] [0] [eq#1](x1, x2) = [0] [0] [::](x1, x2) = [1 0] x1 + [1 0] x2 + [0] [1 0] [0 1] [2] [eq#3](x1, x2, x3) = [0] [0] [nil] = [0] [0] [eq#2](x1) = [0] [0] [#false] = [0] [0] [#true] = [0] [0] [nub](x1) = [1 2] x1 + [1] [0 1] [2] [nub#1](x1) = [1 2] x1 + [0] [0 1] [2] [remove](x1, x2) = [2 0] x1 + [1 0] x2 + [2] [0 0] [0 1] [0] [remove#1](x1, x2) = [1 0] x1 + [2 0] x2 + [2] [0 1] [0 0] [0] [remove#2](x1, x2, x3, x4) = [1 1] x1 + [2 0] x2 + [1 0] x3 + [1 0] x4 + [2] [0 0] [0 0] [1 0] [0 1] [2] [#0] = [0] [0] [#neg](x1) = [1 0] x1 + [0] [1 0] [0] [#pos](x1) = [1 0] x1 + [0] [1 0] [0] [#s](x1) = [1 0] x1 + [0] [1 0] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] [1] >= [0] [1] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [1] >= [0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] >= [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [1] >= [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [1] >= [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] >= [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [1] >= [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [1] >= [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [1] >= [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] >= [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [1] >= [0] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [1] >= [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] >= [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [1] >= [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [1] >= [0] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] >= [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [1] >= [0] [1] = [#eq(@x, @y)] [and(@x, @y)] = [1 0] @x + [1 0] @y + [0] [0 0] [0 0] [0] >= [1 0] @x + [1 0] @y + [0] [0 0] [0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] >= [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] >= [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] >= [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] >= [0] [0] = [#true()] [eq(@l1, @l2)] = [0] [0] >= [0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0] [0] >= [0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0] [0] >= [0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0] [0] >= [0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [0] >= [0] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [0] >= [0] [0] = [#false()] [eq#2(nil())] = [0] [0] >= [0] [0] = [#true()] [nub(@l)] = [1 2] @l + [1] [0 1] [2] > [1 2] @l + [0] [0 1] [2] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [3 0] @x + [1 2] @xs + [4] [1 0] [0 1] [4] > [3 0] @x + [1 2] @xs + [3] [1 0] [0 1] [4] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] [2] >= [0] [0] = [nil()] [remove(@x, @l)] = [1 0] @l + [2 0] @x + [2] [0 1] [0 0] [0] >= [1 0] @l + [2 0] @x + [2] [0 1] [0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [2 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [1 0] [0 1] [2] >= [2 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [1 0] [0 1] [2] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [2 0] @x + [2] [0 0] [0] > [0] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [2 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [1 0] [0 1] [2] >= [2 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [1 0] [0 1] [2] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [2 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [1 0] [0 1] [2] >= [2 0] @x + [1 0] @ys + [2] [0 0] [0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove#1(nil(), @x) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { remove(@x, @l) -> remove#1(@l, @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0] [#equal](x1, x2) = [0 1 0] x2 + [1] [0 0 0] [0] [0] [#eq](x1, x2) = [1] [0] [1 0 1] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [0] [0] [eq](x1, x2) = [1] [0] [0] [eq#1](x1, x2) = [1] [0] [0 0 0] [1 0 0] [0] [::](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [1] [1 0 0] [0 1 1] [1] [0] [eq#3](x1, x2, x3) = [1] [0] [1] [nil] = [1] [1] [0] [eq#2](x1) = [1] [0] [0] [#false] = [1] [0] [0] [#true] = [0] [0] [1 1 1] [0] [nub](x1) = [0 1 0] x1 + [0] [0 1 1] [0] [1 1 1] [0] [nub#1](x1) = [0 1 0] x1 + [0] [0 1 1] [0] [0 1 0] [1] [remove](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [1] [0 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0] [0 0 1] [1] [1 0 1] [0 0 0] [0 1 0] [1] [remove#2](x1, x2, x3, x4) = [1 0 1] x1 + [0 0 0] x3 + [0 1 0] x4 + [1] [0 1 0] [1 0 0] [0 1 1] [1] [1] [#0] = [0] [1] [0 1 0] [0] [#neg](x1) = [0 0 0] x1 + [0] [0 0 1] [1] [0 1 0] [0] [#pos](x1) = [0 0 0] x1 + [0] [0 0 1] [1] [0 1 0] [0] [#s](x1) = [0 0 0] x1 + [0] [0 0 1] [1] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 0] [0] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [1] [0] >= [0] [1] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(nil(), nil())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 1] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [0] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#false(), #true())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#true(), #false())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#true(), #true())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0] [1] [0] >= [0] [1] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0] [1] [0] >= [0] [1] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0] [1] [0] >= [0] [1] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0] [1] [0] >= [0] [1] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [1] [0] >= [0] [1] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [1] [0] >= [0] [1] [0] = [#false()] [eq#2(nil())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 1 1] [0] [0 1 0] @l + [0] [0 1 1] [0] >= [1 1 1] [0] [0 1 0] @l + [0] [0 1 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 0 0] [1 2 1] [2] [0 0 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 2 1] [2] >= [0 0 0] [0 2 1] [2] [0 0 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 2 1] [2] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [3] [1] [2] > [1] [1] [1] = [nil()] [remove(@x, @l)] = [0 1 0] [1] [0 1 0] @l + [0] [0 0 1] [1] > [0 1 0] [0] [0 1 0] @l + [0] [0 0 1] [1] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 0 0] [0 1 0] [1] [0 0 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [2] >= [0 0 0] [0 1 0] [1] [0 0 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [2] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1] [1] [2] >= [1] [1] [1] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 0 0] [0 1 0] [1] [0 0 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [2] >= [0 0 0] [0 1 0] [1] [0 0 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [2] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 0 0] [0 1 0] [1] [0 0 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] >= [0 1 0] [1] [0 1 0] @ys + [0] [0 0 1] [1] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(nil(), @x) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0] [#equal](x1, x2) = [0 0 0] x2 + [1] [1 1 1] [1] [0] [#eq](x1, x2) = [1] [1] [1 0 0] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [0 0 0] [0] [eq](x1, x2) = [0 0 0] x2 + [1] [0 1 0] [0] [0 0 0] [0] [eq#1](x1, x2) = [0 0 0] x2 + [1] [0 1 0] [0] [0 0 0] [1 0 0] [1] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [0 0 0] [0 1 1] [1] [0 0 0] [0] [eq#3](x1, x2, x3) = [0 0 0] x1 + [1] [0 1 0] [0] [1] [nil] = [1] [1] [0 0 0] [0] [eq#2](x1) = [0 0 0] x1 + [1] [0 1 0] [0] [0] [#false] = [1] [1] [0] [#true] = [0] [0] [1 0 1] [1] [nub](x1) = [0 1 0] x1 + [0] [0 1 1] [1] [1 0 1] [1] [nub#1](x1) = [0 1 0] x1 + [0] [0 1 1] [1] [1 1 0] [0] [remove](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [0] [1 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [0 0 0] [1 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 1 0] x1 + [0 1 0] x3 + [0 1 0] x4 + [0] [1 1 0] [0 0 0] [0 1 1] [0] [1] [#0] = [1] [1] [1 0 0] [1] [#neg](x1) = [0 1 0] x1 + [1] [0 0 1] [1] [1 0 0] [1] [#pos](x1) = [0 0 0] x1 + [1] [1 0 0] [1] [0 1 0] [1] [#s](x1) = [0 1 0] x1 + [1] [0 1 1] [1] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 1] [1] >= [0] [1] [1] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [1] [1] >= [0] [1] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(nil(), nil())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#0(), #s(@y))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [1] [1] >= [0] [1] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [1] [1] >= [0] [1] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [1] [1] >= [0] [1] [1] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#false(), #true())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#true(), #false())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#true(), #true())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] >= [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] >= [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] >= [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 0 0] [0 0 0] [0] [0 0 0] @y + [0 0 0] @ys + [1] [0 1 0] [0 1 0] [1] >= [0] [1] [1] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [1] [1] >= [0] [1] [1] = [#false()] [eq#2(::(@y, @ys))] = [0 0 0] [0 0 0] [0] [0 0 0] @y + [0 0 0] @ys + [1] [0 1 0] [0 1 0] [1] >= [0] [1] [1] = [#false()] [eq#2(nil())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 0 1] [1] [0 1 0] @l + [0] [0 1 1] [1] >= [1 0 1] [1] [0 1 0] @l + [0] [0 1 1] [1] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [0 0 0] [1 1 1] [3] [0 1 0] @x + [0 1 0] @xs + [1] [0 1 0] [0 2 1] [3] > [0 0 0] [1 1 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [0 0 0] [0 2 1] [2] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [3] [1] [3] > [1] [1] [1] = [nil()] [remove(@x, @l)] = [1 1 0] [0] [0 1 0] @l + [0] [0 0 1] [0] >= [1 1 0] [0] [0 1 0] @l + [0] [0 0 1] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 1 0] [1 1 0] [2] [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 1] [1] > [0 1 0] [1 1 0] [0] [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [2] [1] [1] > [1] [1] [1] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 0 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 1] [1] >= [0 0 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 0 0] [1 1 0] [0] [0 1 0] @y + [0 1 0] @ys + [0] [0 0 0] [0 1 1] [0] >= [1 1 0] [0] [0 1 0] @ys + [0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(nil(), @x, @xs) -> #false() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0 0 0] [0] [#equal](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 1] [1 1 1] [1] [0 0 0] [0] [#eq](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [1] [1 0 0] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [0 0 0] [1] [eq](x1, x2) = [0 0 0] x2 + [1] [0 1 0] [0] [0 0 0] [1] [eq#1](x1, x2) = [0 0 0] x2 + [1] [0 1 0] [0] [0 0 0] [1 0 0] [1] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [1 0 0] [0 1 1] [1] [0 0 0] [1] [eq#3](x1, x2, x3) = [0 0 0] x1 + [1] [0 1 0] [0] [1] [nil] = [1] [0] [0 0 0] [0] [eq#2](x1) = [0 0 0] x1 + [1] [0 1 0] [0] [0] [#false] = [1] [1] [0] [#true] = [1] [0] [1 0 1] [0] [nub](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [0] [nub#1](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [0 1 0] [0] [remove](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [0] [0 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [0 0 0] [0 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 1 0] x1 + [0 1 0] x3 + [0 1 0] x4 + [0] [0 1 0] [1 0 0] [0 1 1] [0] [0] [#0] = [1] [0] [1 0 0] [0] [#neg](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [0 0 0] [0] [#pos](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [0 0 0] [0] [#s](x1) = [0 1 0] x1 + [1] [0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0 0 0] [0] [0 0 0] @x + [0 1 0] @y + [0] [0 0 1] [1 1 1] [1] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 1] [1] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 1 0] @y_1 + [0 1 0] @y_2 + [1] [1 0 0] [0 1 1] [2] >= [0] [1] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 1 0] @y_1 + [0 1 0] @y_2 + [1] [1 0 0] [0 1 1] [2] >= [0] [1] [1] = [#false()] [#eq(nil(), nil())] = [0] [1] [1] >= [0] [1] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] [1] >= [0] [1] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0] [1] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0] [1] [1] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0] [1] [1] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 1] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0] [1] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 1] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0] [0 1 0] @y + [1] [0 0 1] [1] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 1] [1] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#false(), #true())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#true(), #false())] = [0] [1] [1] >= [0] [1] [1] = [#false()] [#and(#true(), #true())] = [0] [1] [1] >= [0] [1] [0] = [#true()] [eq(@l1, @l2)] = [0 0 0] [1] [0 0 0] @l2 + [1] [0 1 0] [0] >= [0 0 0] [1] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 0 0] [1] [0 0 0] @l2 + [1] [0 1 0] [0] >= [0 0 0] [1] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 0 0] [1] [0 0 0] @l2 + [1] [0 1 0] [0] > [0 0 0] [0] [0 0 0] @l2 + [1] [0 1 0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 0 0] [0 0 0] [1] [0 0 0] @y + [0 0 0] @ys + [1] [0 1 0] [0 1 0] [1] >= [1] [1] [1] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [1] [1] [1] > [0] [1] [1] = [#false()] [eq#2(::(@y, @ys))] = [0 0 0] [0 0 0] [0] [0 0 0] @y + [0 0 0] @ys + [1] [0 1 0] [0 1 0] [1] >= [0] [1] [1] = [#false()] [eq#2(nil())] = [0] [1] [1] >= [0] [1] [0] = [#true()] [nub(@l)] = [1 0 1] [0] [0 1 0] @l + [0] [0 0 1] [0] >= [1 0 1] [0] [0 1 0] @l + [0] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 0 0] [1 1 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] > [0 0 0] [0 1 1] [1] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [1] [1] [0] >= [1] [1] [0] = [nil()] [remove(@x, @l)] = [0 1 0] [0] [0 1 0] @l + [0] [0 0 1] [0] >= [0 1 0] [0] [0 1 0] @l + [0] [0 0 1] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 1 0] [0 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] >= [0 1 0] [0 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1] [1] [0] >= [1] [1] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 0 0] [0 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] >= [0 0 0] [0 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 0 0] [0 1 0] [0] [0 1 0] @y + [0 1 0] @ys + [1] [1 0 0] [0 1 1] [1] >= [0 1 0] [0] [0 1 0] @ys + [0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(nil(), @x, @xs) -> #false() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq#2(nil()) -> #true() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0 0 0] [0] [#equal](x1, x2) = [0 0 1] x1 + [0 0 1] x2 + [0] [0 0 0] [0 0 0] [0] [0 0 0] [0 0 0] [0] [#eq](x1, x2) = [0 0 1] x1 + [0 0 1] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 1] [1 0 0] [0] [and](x1, x2) = [0 1 1] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 1] [1 0 0] [0] [#and](x1, x2) = [0 1 1] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0 0 0] [0 0 1] [0] [eq](x1, x2) = [1 1 0] x1 + [1 0 1] x2 + [1] [0 0 0] [0 0 0] [0] [0 0 0] [0 0 1] [0] [eq#1](x1, x2) = [0 1 0] x1 + [1 0 1] x2 + [1] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [::](x1, x2) = [0 0 1] x1 + [0 1 1] x2 + [1] [0 0 1] [0 0 1] [0] [0 0 1] [0 0 0] [0] [eq#3](x1, x2, x3) = [0 0 1] x1 + [0 0 1] x2 + [0] [0 0 0] [0 0 0] [0] [1] [nil] = [0] [1] [0 0 1] [0] [eq#2](x1) = [0 0 0] x1 + [1] [0 0 0] [0] [0] [#false] = [1] [0] [0] [#true] = [1] [0] [1 1 1] [1] [nub](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 1 1] [1] [nub#1](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [1] [remove](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [0] [1 0 1] [1] [remove#1](x1, x2) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [1 0 0] [1 0 1] [1] [remove#2](x1, x2, x3, x4) = [0 0 0] x1 + [0 0 1] x3 + [0 1 1] x4 + [1] [0 0 0] [0 0 1] [0 0 1] [0] [0] [#0] = [1] [1] [1 0 0] [0] [#neg](x1) = [0 1 1] x1 + [1] [0 0 1] [1] [0 0 1] [0] [#pos](x1) = [0 1 0] x1 + [1] [0 0 1] [1] [1 0 0] [0] [#s](x1) = [0 1 0] x1 + [1] [0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0] [0 0 1] @x_1 + [0 0 1] @x_2 + [0 0 1] @y_1 + [0 0 1] @y_2 + [0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0] [0 0 1] @x_1 + [0 0 1] @y_1 + [0] [0 0 0] [0 0 0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0 0 0] [0 0 0] [0] [0 0 1] @x_1 + [0 0 1] @x_2 + [1] [0 0 0] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 0 1] @y_1 + [0 0 1] @y_2 + [1] [0 0 0] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(nil(), nil())] = [0] [2] [0] >= [0] [1] [0] = [#true()] [#eq(#0(), #0())] = [0] [2] [0] >= [0] [1] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0] [0] [0 0 1] @y + [2] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0] [0] [0 0 1] @y + [2] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0] [0] [0 0 1] @y + [1] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0] [0] [0 0 1] @x + [2] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [2] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [2] [0 0 0] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0] [0] [0 0 1] @x + [2] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [2] [0 0 0] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [2] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0] [0] [0 0 1] @x + [1] [0 0 0] [0] >= [0] [1] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0] [0 0 1] @x + [0 0 1] @y + [0] [0 0 0] [0 0 0] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 1] [1 0 0] [0] [0 1 1] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] >= [1 0 1] [1 0 0] [0] [0 1 1] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#false(), #true())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#true(), #false())] = [0] [1] [0] >= [0] [1] [0] = [#false()] [#and(#true(), #true())] = [0] [1] [0] >= [0] [1] [0] = [#true()] [eq(@l1, @l2)] = [0 0 0] [0 0 1] [0] [1 1 0] @l1 + [1 0 1] @l2 + [1] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 1] [0] [0 1 0] @l1 + [1 0 1] @l2 + [1] [0 0 0] [0 0 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 0 1] [0 0 0] [0 0 0] [0] [1 0 1] @l2 + [0 0 1] @x + [0 1 1] @xs + [2] [0 0 0] [0 0 0] [0 0 0] [0] >= [0 0 1] [0 0 0] [0] [0 0 1] @l2 + [0 0 1] @x + [0] [0 0 0] [0 0 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 0 1] [0] [1 0 1] @l2 + [1] [0 0 0] [0] >= [0 0 1] [0] [0 0 0] @l2 + [1] [0 0 0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 0 0] [0 0 1] [0 0 1] [0] [0 0 1] @x + [0 0 1] @y + [0 0 1] @ys + [0] [0 0 0] [0 0 0] [0 0 0] [0] >= [0 0 0] [0 0 0] [0 0 1] [0] [0 0 1] @x + [0 0 1] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0 0 0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0 0 0] [1] [0 0 1] @x + [1] [0 0 0] [0] > [0] [1] [0] = [#false()] [eq#2(::(@y, @ys))] = [0 0 1] [0 0 1] [0] [0 0 0] @y + [0 0 0] @ys + [1] [0 0 0] [0 0 0] [0] >= [0] [1] [0] = [#false()] [eq#2(nil())] = [1] [1] [0] > [0] [1] [0] = [#true()] [nub(@l)] = [1 1 1] [1] [0 1 0] @l + [0] [0 0 1] [0] >= [1 1 1] [1] [0 1 0] @l + [0] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 0 2] [1 1 2] [2] [0 0 1] @x + [0 1 1] @xs + [1] [0 0 1] [0 0 1] [0] >= [1 0 0] [1 1 2] [2] [0 0 1] @x + [0 1 1] @xs + [1] [0 0 1] [0 0 1] [0] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [3] [0] [1] > [1] [0] [1] = [nil()] [remove(@x, @l)] = [1 0 1] [1] [0 1 0] @l + [0] [0 0 1] [0] >= [1 0 1] [1] [0 1 0] @l + [0] [0 0 1] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1 0 1] [1 0 1] [1] [0 0 1] @y + [0 1 1] @ys + [1] [0 0 1] [0 0 1] [0] >= [1 0 1] [1 0 1] [1] [0 0 1] @y + [0 1 1] @ys + [1] [0 0 1] [0 0 1] [0] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [3] [0] [1] > [1] [0] [1] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1 0 0] [1 0 1] [1] [0 0 1] @y + [0 1 1] @ys + [1] [0 0 1] [0 0 1] [0] >= [1 0 0] [1 0 1] [1] [0 0 1] @y + [0 1 1] @ys + [1] [0 0 1] [0 0 1] [0] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1 0 0] [1 0 1] [1] [0 0 1] @y + [0 1 1] @ys + [1] [0 0 1] [0 0 1] [0] >= [1 0 1] [1] [0 1 0] @ys + [0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#2(::(@y, @ys)) -> #false() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } Weak Trs: { #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(nil(), @x, @xs) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { #equal(@x, @y) -> #eq(@x, @y) , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0 1 0] [1] [#equal](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 1 0] [1] [0 0 0] [0 1 0] [0] [#eq](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 1 0] [0] [1 0 0] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [1] [0 0 0] [0 0 0] [1] [0 1 0] [1] [eq](x1, x2) = [0 0 0] x2 + [1] [0 0 0] [1] [0 1 0] [1] [eq#1](x1, x2) = [0 0 0] x2 + [1] [0 0 0] [1] [0 1 0] [1 0 0] [0] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [0 1 0] [0 1 1] [1] [0 1 0] [1] [eq#3](x1, x2, x3) = [0 0 0] x1 + [1] [0 0 0] [1] [0] [nil] = [1] [1] [1] [eq#2](x1) = [1] [1] [1] [#false] = [1] [1] [1] [#true] = [1] [0] [1 0 1] [1] [nub](x1) = [0 1 0] x1 + [0] [0 1 1] [1] [1 0 1] [1] [nub#1](x1) = [0 1 0] x1 + [0] [0 1 1] [1] [1 1 0] [0] [remove](x1, x2) = [0 1 0] x2 + [0] [0 0 1] [1] [1 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0] [0 0 1] [1] [1 0 0] [0 1 0] [1 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 1 0] x1 + [0 1 0] x3 + [0 1 0] x4 + [0] [0 1 1] [0 1 0] [0 1 1] [0] [0] [#0] = [1] [1] [0 1 1] [0] [#neg](x1) = [0 1 0] x1 + [1] [0 1 0] [1] [1 1 0] [0] [#pos](x1) = [0 1 0] x1 + [1] [0 0 1] [1] [0 0 0] [0] [#s](x1) = [0 1 0] x1 + [1] [0 1 1] [1] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [0] [0 0 0] [0 1 0] [1] > [0 0 0] [0 1 0] [0] [0 1 0] @x + [0 0 0] @y + [0] [0 0 0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0 1 0] [0 1 0] [1] [0 1 0] @x_1 + [0 1 0] @x_2 + [0 0 0] @y_1 + [0 0 0] @y_2 + [1] [0 0 0] [0 0 0] [0 1 0] [0 1 0] [1] > [0 1 0] [0 1 0] [0] [0 0 0] @y_1 + [0 0 0] @y_2 + [1] [0 0 0] [0 0 0] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0 0 0] [0 0 0] [1] [0 1 0] @x_1 + [0 1 0] @x_2 + [1] [0 0 0] [0 0 0] [1] >= [1] [1] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 1 0] [0 1 0] [1] [0 0 0] @y_1 + [0 0 0] @y_2 + [1] [0 1 0] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(nil(), nil())] = [1] [1] [1] >= [1] [1] [0] = [#true()] [#eq(#0(), #0())] = [1] [1] [1] >= [1] [1] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 1 0] [1] [0 0 0] @y + [1] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0 1 0] [1] [0 0 0] @y + [1] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(#0(), #s(@y))] = [0 1 0] [1] [0 0 0] @y + [1] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0] [1] [0 1 0] @x + [1] [0 0 0] [1] >= [1] [1] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [1] [0 0 0] [0 1 0] [1] > [0 0 0] [0 1 0] [0] [0 1 0] @x + [0 0 0] @y + [0] [0 0 0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [1] [0 0 0] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0] [1] [0 1 0] @x + [1] [0 0 0] [1] >= [1] [1] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [1] [0 0 0] [0 1 0] [1] >= [1] [1] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [1] [0 0 0] [0 1 0] [1] > [0 0 0] [0 1 0] [0] [0 1 0] @x + [0 0 0] @y + [0] [0 0 0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0] [1] [0 1 0] @x + [1] [0 0 0] [1] >= [1] [1] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0 1 0] [1] [0 1 0] @x + [0 0 0] @y + [1] [0 0 0] [0 1 0] [1] > [0 0 0] [0 1 0] [0] [0 1 0] @x + [0 0 0] @y + [0] [0 0 0] [0 1 0] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [1] [0 0 0] [0 0 0] [1] = [#and(@x, @y)] [#and(#false(), #false())] = [2] [1] [1] > [1] [1] [1] = [#false()] [#and(#false(), #true())] = [2] [1] [1] > [1] [1] [1] = [#false()] [#and(#true(), #false())] = [2] [1] [1] > [1] [1] [1] = [#false()] [#and(#true(), #true())] = [2] [1] [1] > [1] [1] [0] = [#true()] [eq(@l1, @l2)] = [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] >= [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] >= [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] >= [1] [1] [1] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 1 0] [0 1 0] [2] [0 0 0] @y + [0 0 0] @ys + [1] [0 0 0] [0 0 0] [1] >= [0 1 0] [0 1 0] [2] [0 0 0] @y + [0 0 0] @ys + [1] [0 0 0] [0 0 0] [1] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [2] [1] [1] > [1] [1] [1] = [#false()] [eq#2(::(@y, @ys))] = [1] [1] [1] >= [1] [1] [1] = [#false()] [eq#2(nil())] = [1] [1] [1] >= [1] [1] [0] = [#true()] [nub(@l)] = [1 0 1] [1] [0 1 0] @l + [0] [0 1 1] [1] >= [1 0 1] [1] [0 1 0] @l + [0] [0 1 1] [1] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [0 2 0] [1 1 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [0 2 0] [0 2 1] [3] >= [0 1 0] [1 1 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [0 1 0] [0 2 1] [3] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [2] [1] [3] > [0] [1] [1] = [nil()] [remove(@x, @l)] = [1 1 0] [0] [0 1 0] @l + [0] [0 0 1] [1] >= [1 1 0] [0] [0 1 0] @l + [0] [0 0 1] [1] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 2 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 1 0] [0 1 1] [2] >= [0 2 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 1 0] [0 1 1] [2] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1] [1] [2] > [0] [1] [1] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 1 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 1 0] [0 1 1] [2] > [0 1 0] [1 1 0] [0] [0 1 0] @y + [0 1 0] @ys + [1] [0 1 0] [0 1 1] [2] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 1 0] [1 1 0] [1] [0 1 0] @y + [0 1 0] @ys + [1] [0 1 0] [0 1 1] [1] > [1 1 0] [0] [0 1 0] @ys + [0] [0 0 1] [1] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#2(::(@y, @ys)) -> #false() } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(nil(), @x, @xs) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0] [#equal](x1, x2) = [0 1 0] x2 + [0] [0 0 0] [1] [0 0 0] [0] [#eq](x1, x2) = [0 1 0] x2 + [0] [0 0 0] [0] [1 1 0] [1 0 1] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0 1 0] [0] [eq](x1, x2) = [0 0 0] x2 + [0] [0 0 0] [0] [0 1 0] [0] [eq#1](x1, x2) = [0 0 0] x2 + [0] [0 0 0] [0] [0 0 0] [1 0 0] [0] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [1 0 0] [0 1 1] [1] [0 1 0] [0] [eq#3](x1, x2, x3) = [0 0 0] x1 + [0] [0 0 0] [0] [0] [nil] = [0] [0] [0] [eq#2](x1) = [0] [0] [0] [#false] = [0] [0] [0] [#true] = [0] [0] [1 1 1] [0] [nub](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 1 1] [0] [nub#1](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 1 0] [0 1 0] [0] [remove](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] [0 1 0] [1 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 1] [0 0 0] [0] [1 1 1] [1 1 0] [0 0 0] [0 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 1 0] x1 + [0 0 0] x2 + [0 1 0] x3 + [0 1 0] x4 + [1] [0 0 0] [0 0 0] [1 0 0] [0 1 1] [1] [0] [#0] = [0] [0] [0 0 0] [0] [#neg](x1) = [0 1 0] x1 + [0] [0 1 1] [0] [0 0 0] [0] [#pos](x1) = [0 1 0] x1 + [0] [1 0 0] [0] [0 0 0] [0] [#s](x1) = [0 1 0] x1 + [0] [0 1 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [1] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 1 0] @y_1 + [0 1 0] @y_2 + [1] [0 0 0] [0 0 0] [0] >= [0] [0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 1 0] @y_1 + [0 1 0] @y_2 + [1] [0 0 0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] >= [0 0 0] [0] [0 1 0] @y + [0] [0 0 0] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 1 0] [1 0 1] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] >= [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] >= [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] >= [0] [0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 1 0] [0 1 0] [1] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0] > [0 1 0] [0 1 0] [0] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 1 1] [0] [0 1 0] @l + [0] [0 0 1] [0] >= [1 1 1] [0] [0 1 0] @l + [0] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 1 0] [1 2 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] > [1 1 0] [0 2 1] [0] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] [0] [0] >= [0] [0] [0] = [nil()] [remove(@x, @l)] = [0 1 0] [1 1 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] >= [0 1 0] [1 1 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1 1 0] [0 1 0] [0 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] > [1 1 0] [0 1 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1 1 0] [0] [0 0 0] @x + [0] [0 0 0] [0] >= [0] [0] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] >= [1 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] >= [1 1 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @ys + [0] [0 0 0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { and(@x, @y) -> #and(@x, @y) , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#2(::(@y, @ys)) -> #false() } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { and(@x, @y) -> #and(@x, @y) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0] [#equal](x1, x2) = [1] [1] [0] [#eq](x1, x2) = [1] [0] [1 0 0] [1 0 0] [1] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0 0 0] [0 0 1] [0] [eq](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [1 0 1] [1 0 0] [0] [0 0 1] [0] [eq#1](x1, x2) = [0 0 0] x2 + [0] [1 0 0] [0] [1 0 0] [1 0 0] [0] [::](x1, x2) = [0 1 1] x1 + [0 1 1] x2 + [1] [0 0 1] [0 0 1] [1] [0 0 1] [0] [eq#3](x1, x2, x3) = [0 0 0] x1 + [0] [0 0 0] [0] [0] [nil] = [0] [0] [0] [eq#2](x1) = [0] [0] [0] [#false] = [0] [0] [0] [#true] = [0] [0] [1 1 0] [0] [nub](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [1 1 0] [0] [nub#1](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [0 0 1] [1 0 1] [0] [remove](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] [1 0 1] [0 0 1] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 1] [0 0 0] [0] [1 1 0] [0 0 1] [1 0 0] [1 0 1] [1] [remove#2](x1, x2, x3, x4) = [0 0 0] x1 + [0 0 0] x2 + [0 1 1] x3 + [0 1 1] x4 + [1] [0 1 0] [0 0 0] [0 0 1] [0 0 1] [1] [0] [#0] = [0] [0] [0 0 0] [0] [#neg](x1) = [0 1 1] x1 + [0] [0 0 1] [0] [0] [#pos](x1) = [0] [0] [0 0 0] [0] [#s](x1) = [0 1 1] x1 + [0] [0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] [1] [1] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [1] [0] >= [0] [0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [0] >= [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [1] [0] >= [0] [1] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 0] [1 0 0] [1] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] > [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0 0 0] [0 0 1] [0] [0 0 0] @l1 + [0 0 0] @l2 + [0] [1 0 1] [1 0 0] [0] >= [0 0 1] [0] [0 0 0] @l2 + [0] [1 0 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 0 1] [0] [0 0 0] @l2 + [0] [1 0 0] [0] >= [0 0 1] [0] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 0 1] [0] [0 0 0] @l2 + [0] [1 0 0] [0] >= [0] [0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 0 1] [0 0 1] [1] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0] >= [0 0 1] [1] [0 0 0] @ys + [0] [0 0 0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 1 0] [0] [0 1 0] @l + [1] [0 0 1] [0] >= [1 1 0] [0] [0 1 0] @l + [1] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 1 1] [1 1 1] [1] [0 1 1] @x + [0 1 1] @xs + [2] [0 0 1] [0 0 1] [1] > [1 0 1] [1 1 1] [0] [0 1 1] @x + [0 1 1] @xs + [2] [0 0 1] [0 0 1] [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] [1] [0] >= [0] [0] [0] = [nil()] [remove(@x, @l)] = [1 0 1] [0 0 1] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] >= [1 0 1] [0 0 1] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 0 1] [1 0 1] [1 0 1] [1] [0 0 0] @x + [0 1 1] @y + [0 1 1] @ys + [1] [0 0 0] [0 0 1] [0 0 1] [1] >= [0 0 1] [1 0 1] [1 0 1] [1] [0 0 0] @x + [0 1 1] @y + [0 1 1] @ys + [1] [0 0 0] [0 0 1] [0 0 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [0 0 1] [0] [0 0 0] @x + [0] [0 0 0] [0] >= [0] [0] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 0 1] [1 0 0] [1 0 1] [1] [0 0 0] @x + [0 1 1] @y + [0 1 1] @ys + [1] [0 0 0] [0 0 1] [0 0 1] [1] > [0 0 1] [1 0 0] [1 0 1] [0] [0 0 0] @x + [0 1 1] @y + [0 1 1] @ys + [1] [0 0 0] [0 0 1] [0 0 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 0 1] [1 0 0] [1 0 1] [1] [0 0 0] @x + [0 1 1] @y + [0 1 1] @ys + [1] [0 0 0] [0 0 1] [0 0 1] [1] > [0 0 1] [1 0 1] [0] [0 0 0] @x + [0 1 0] @ys + [0] [0 0 0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#2(::(@y, @ys)) -> #false() } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq#2(::(@y, @ys)) -> #false() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0] [#equal](x1, x2) = [0 0 0] x2 + [1] [0 1 0] [0] [0 0 0] [0] [#eq](x1, x2) = [0 0 0] x2 + [0] [0 1 0] [0] [1 1 1] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [1] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [1] [0 1 0] [1] [eq](x1, x2) = [1 1 1] x2 + [1] [0 0 0] [1] [0 1 0] [1] [eq#1](x1, x2) = [1 1 1] x2 + [1] [0 0 0] [1] [0 0 0] [1 0 0] [1] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [1 0 0] [0 1 1] [1] [0 1 0] [1] [eq#3](x1, x2, x3) = [0 0 0] x1 + [1] [0 0 0] [1] [1] [nil] = [1] [1] [1] [eq#2](x1) = [1] [1] [0] [#false] = [0] [1] [0] [#true] = [0] [1] [1 0 1] [0] [nub](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 1] [0] [nub#1](x1) = [0 1 0] x1 + [0] [0 0 1] [0] [1 0 0] [1 1 0] [0] [remove](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] [1 1 0] [1 0 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 1] [0 0 0] [0] [1 0 1] [1 0 0] [0 0 0] [1 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 0 1] x1 + [0 0 0] x2 + [0 1 0] x3 + [0 1 0] x4 + [0] [0 0 1] [0 0 0] [1 0 0] [0 1 1] [0] [1] [#0] = [1] [1] [1 0 0] [1] [#neg](x1) = [0 1 0] x1 + [1] [0 1 1] [1] [0 1 0] [1] [#pos](x1) = [0 1 0] x1 + [1] [0 1 0] [1] [1 0 0] [1] [#s](x1) = [0 1 0] x1 + [1] [0 1 1] [1] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0] [0 0 0] @y + [1] [0 1 0] [0] >= [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 0 0] @y_1 + [0 0 0] @y_2 + [0] [0 1 0] [0 1 0] [1] >= [0] [0] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 0 0] @y_1 + [0 0 0] @y_2 + [0] [0 1 0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(nil(), nil())] = [0] [0] [1] >= [0] [0] [1] = [#true()] [#eq(#0(), #0())] = [0] [0] [1] >= [0] [0] [1] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0] [0] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [1] >= [0 0 0] [0] [0 0 0] @y + [0] [0 1 0] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 1 1] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [1] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [1] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#and(#false(), #true())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#and(#true(), #false())] = [0] [0] [1] >= [0] [0] [1] = [#false()] [#and(#true(), #true())] = [0] [0] [1] >= [0] [0] [1] = [#true()] [eq(@l1, @l2)] = [0 1 0] [1] [1 1 1] @l2 + [1] [0 0 0] [1] >= [0 1 0] [1] [1 1 1] @l2 + [1] [0 0 0] [1] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 1 0] [1] [1 1 1] @l2 + [1] [0 0 0] [1] >= [0 1 0] [1] [0 0 0] @l2 + [1] [0 0 0] [1] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 1 0] [1] [1 1 1] @l2 + [1] [0 0 0] [1] >= [1] [1] [1] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 1 0] [0 1 0] [2] [0 0 0] @y + [0 0 0] @ys + [1] [0 0 0] [0 0 0] [1] >= [0 1 0] [0 1 0] [2] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [1] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [2] [1] [1] > [0] [0] [1] = [#false()] [eq#2(::(@y, @ys))] = [1] [1] [1] > [0] [0] [1] = [#false()] [eq#2(nil())] = [1] [1] [1] > [0] [0] [1] = [#true()] [nub(@l)] = [1 0 1] [0] [0 1 0] @l + [0] [0 0 1] [0] >= [1 0 1] [0] [0 1 0] @l + [0] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 0 0] [1 1 1] [2] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] > [1 0 0] [1 1 1] [1] [0 1 0] @x + [0 1 0] @xs + [1] [1 0 0] [0 1 1] [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [2] [1] [1] > [1] [1] [1] = [nil()] [remove(@x, @l)] = [1 1 0] [1 0 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] >= [1 1 0] [1 0 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1 0 0] [0 1 0] [1 1 0] [2] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] >= [1 0 0] [0 1 0] [1 1 0] [2] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1 0 0] [2] [0 0 0] @x + [1] [0 0 0] [1] > [1] [1] [1] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1 0 0] [0 0 0] [1 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] >= [1 0 0] [0 0 0] [1 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1 0 0] [0 0 0] [1 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [1 0 0] [0 1 1] [1] > [1 0 0] [1 1 0] [0] [0 0 0] @x + [0 1 0] @ys + [0] [0 0 0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq(@l1, @l2) -> eq#1(@l1, @l2) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0 0 0] [0] [#equal](x1, x2) = [1 0 0] x1 + [0 0 0] x2 + [1] [1 0 0] [1 1 0] [1] [0 0 0] [0] [#eq](x1, x2) = [0 0 0] x2 + [1] [1 1 0] [1] [1 0 0] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0 0 0] [0 0 1] [1] [eq](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [1 0 1] [0 0 0] [0] [0 0 0] [0 0 1] [0] [eq#1](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [1 0 0] [0 0 0] [0] [0 1 1] [1 0 0] [0] [::](x1, x2) = [1 0 0] x1 + [0 1 1] x2 + [0] [0 0 1] [0 0 1] [1] [0 0 1] [0] [eq#3](x1, x2, x3) = [0 0 0] x1 + [0] [0 0 0] [0] [0] [nil] = [0] [0] [0] [eq#2](x1) = [0] [0] [0] [#false] = [0] [0] [0] [#true] = [0] [0] [1 1 0] [0] [nub](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [1 1 0] [0] [nub#1](x1) = [0 1 0] x1 + [1] [0 0 1] [0] [1 0 0] [1 0 1] [0] [remove](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] [1 0 1] [1 0 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 1] [0 0 0] [0] [1 1 0] [1 0 0] [0 1 1] [1 0 1] [0] [remove#2](x1, x2, x3, x4) = [0 0 0] x1 + [0 0 0] x2 + [1 0 0] x3 + [0 1 1] x4 + [0] [0 0 0] [0 0 0] [0 0 1] [0 0 1] [1] [0] [#0] = [0] [0] [1 0 1] [0] [#neg](x1) = [0 1 1] x1 + [0] [0 0 1] [0] [1 0 1] [0] [#pos](x1) = [0 1 1] x1 + [0] [0 0 1] [0] [0 1 1] [0] [#s](x1) = [1 0 1] x1 + [0] [0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0 0 0] [0] [1 0 0] @x + [0 0 0] @y + [1] [1 0 0] [1 1 0] [1] >= [0 0 0] [0] [0 0 0] @y + [1] [1 1 0] [1] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 0 0] @y_1 + [0 0 0] @y_2 + [1] [1 1 1] [1 1 1] [1] >= [0] [0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [1] >= [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0] [0 0 0] [0] [0 0 0] @y_1 + [0 0 0] @y_2 + [1] [1 1 1] [1 1 1] [1] >= [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [1] [1] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [1] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0 0 0] [0] [0 0 0] @y + [1] [1 1 0] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [1] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0 0 0] [0] [0 0 0] @y + [1] [1 1 0] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [1] >= [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0] [0] [0 0 0] @y + [1] [1 1 2] [1] >= [0 0 0] [0] [0 0 0] @y + [1] [1 1 0] [1] = [#eq(@x, @y)] [and(@x, @y)] = [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0 0 0] [0 0 1] [1] [0 0 0] @l1 + [0 0 0] @l2 + [0] [1 0 1] [0 0 0] [0] > [0 0 0] [0 0 1] [0] [0 0 0] @l1 + [0 0 0] @l2 + [0] [1 0 0] [0 0 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 0 1] [0 0 0] [0 0 0] [0] [0 0 0] @l2 + [0 0 0] @x + [0 0 0] @xs + [0] [0 0 0] [0 1 1] [1 0 0] [0] >= [0 0 1] [0] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 0 1] [0] [0 0 0] @l2 + [0] [0 0 0] [0] >= [0] [0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 0 1] [0 0 1] [1] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0] >= [0 0 1] [1] [0 0 0] @ys + [0] [0 0 0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 1 0] [0] [0 1 0] @l + [1] [0 0 1] [0] >= [1 1 0] [0] [0 1 0] @l + [1] [0 0 1] [0] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [1 1 1] [1 1 1] [0] [1 0 0] @x + [0 1 1] @xs + [1] [0 0 1] [0 0 1] [1] >= [1 1 1] [1 1 1] [0] [1 0 0] @x + [0 1 1] @xs + [1] [0 0 1] [0 0 1] [1] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] [1] [0] >= [0] [0] [0] = [nil()] [remove(@x, @l)] = [1 0 1] [1 0 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] >= [1 0 1] [1 0 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [1 0 0] [0 1 2] [1 0 1] [1] [0 0 0] @x + [1 0 0] @y + [0 1 1] @ys + [0] [0 0 0] [0 0 1] [0 0 1] [1] >= [1 0 0] [0 1 2] [1 0 1] [1] [0 0 0] @x + [1 0 0] @y + [0 1 1] @ys + [0] [0 0 0] [0 0 1] [0 0 1] [1] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [1 0 0] [0] [0 0 0] @x + [0] [0 0 0] [0] >= [0] [0] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [1 0 0] [0 1 1] [1 0 1] [0] [0 0 0] @x + [1 0 0] @y + [0 1 1] @ys + [0] [0 0 0] [0 0 1] [0 0 1] [1] >= [1 0 0] [0 1 1] [1 0 1] [0] [0 0 0] @x + [1 0 0] @y + [0 1 1] @ys + [0] [0 0 0] [0 0 1] [0 0 1] [1] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [1 0 0] [0 1 1] [1 0 1] [0] [0 0 0] @x + [1 0 0] @y + [0 1 1] @ys + [0] [0 0 0] [0 0 1] [0 0 1] [1] >= [1 0 0] [1 0 1] [0] [0 0 0] @x + [0 1 0] @ys + [0] [0 0 0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We use the processor 'matrix interpretation of dimension 3' to orient following rules strictly. Trs: { eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(and) = {1, 2}, Uargs(#and) = {1, 2}, Uargs(::) = {2}, Uargs(nub) = {1}, Uargs(remove#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA) and not(IDA(2)). [0 0 0] [0] [#equal](x1, x2) = [0 0 0] x2 + [0] [1 0 0] [1] [0] [#eq](x1, x2) = [0] [0] [1 1 0] [1 0 0] [0] [and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [1 0 0] [1 0 0] [0] [#and](x1, x2) = [0 0 0] x1 + [0 0 0] x2 + [0] [0 0 0] [0 0 0] [0] [0 1 0] [1] [eq](x1, x2) = [0 0 0] x2 + [0] [0 0 0] [0] [0 1 0] [1] [eq#1](x1, x2) = [0 0 0] x2 + [0] [0 0 0] [0] [0 0 0] [1 0 0] [0] [::](x1, x2) = [0 1 0] x1 + [0 1 0] x2 + [1] [0 1 0] [0 1 1] [0] [0 1 0] [0] [eq#3](x1, x2, x3) = [0 0 0] x1 + [0] [0 0 0] [0] [0] [nil] = [0] [0] [0] [eq#2](x1) = [0] [0] [0] [#false] = [0] [0] [0] [#true] = [0] [0] [1 1 1] [0] [nub](x1) = [0 1 0] x1 + [1] [0 1 1] [1] [1 1 1] [0] [nub#1](x1) = [0 1 0] x1 + [1] [0 1 1] [1] [0 1 0] [0 1 0] [0] [remove](x1, x2) = [0 0 0] x1 + [0 1 0] x2 + [0] [0 0 0] [0 0 1] [0] [0 1 0] [0 1 0] [0] [remove#1](x1, x2) = [0 1 0] x1 + [0 0 0] x2 + [0] [0 0 1] [0 0 0] [0] [1 1 1] [0 1 0] [0 0 0] [0 1 0] [0] [remove#2](x1, x2, x3, x4) = [0 0 0] x1 + [0 0 0] x2 + [0 1 0] x3 + [0 1 0] x4 + [1] [0 0 1] [0 0 0] [0 1 0] [0 1 1] [0] [0] [#0] = [0] [0] [0 0 1] [0] [#neg](x1) = [0 1 0] x1 + [0] [0 0 0] [0] [1 1 0] [0] [#pos](x1) = [0 1 0] x1 + [0] [0 1 0] [0] [0 1 1] [0] [#s](x1) = [0 0 0] x1 + [0] [0 0 0] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0] [0] [0 0 0] @y + [0] [1 0 0] [1] >= [0] [0] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [0] [0] >= [0] [0] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #0())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [0] [0] >= [0] [0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [0] [0] >= [0] [0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [0] [0] >= [0] [0] [0] = [#eq(@x, @y)] [and(@x, @y)] = [1 1 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] >= [1 0 0] [1 0 0] [0] [0 0 0] @x + [0 0 0] @y + [0] [0 0 0] [0 0 0] [0] = [#and(@x, @y)] [#and(#false(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] >= [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [eq(@l1, @l2)] = [0 1 0] [1] [0 0 0] @l2 + [0] [0 0 0] [0] >= [0 1 0] [1] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#1(@l1, @l2)] [eq#1(::(@x, @xs), @l2)] = [0 1 0] [1] [0 0 0] @l2 + [0] [0 0 0] [0] > [0 1 0] [0] [0 0 0] @l2 + [0] [0 0 0] [0] = [eq#3(@l2, @x, @xs)] [eq#1(nil(), @l2)] = [0 1 0] [1] [0 0 0] @l2 + [0] [0 0 0] [0] > [0] [0] [0] = [eq#2(@l2)] [eq#3(::(@y, @ys), @x, @xs)] = [0 1 0] [0 1 0] [1] [0 0 0] @y + [0 0 0] @ys + [0] [0 0 0] [0 0 0] [0] >= [0 1 0] [1] [0 0 0] @ys + [0] [0 0 0] [0] = [and(#equal(@x, @y), eq(@xs, @ys))] [eq#3(nil(), @x, @xs)] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(::(@y, @ys))] = [0] [0] [0] >= [0] [0] [0] = [#false()] [eq#2(nil())] = [0] [0] [0] >= [0] [0] [0] = [#true()] [nub(@l)] = [1 1 1] [0] [0 1 0] @l + [1] [0 1 1] [1] >= [1 1 1] [0] [0 1 0] @l + [1] [0 1 1] [1] = [nub#1(@l)] [nub#1(::(@x, @xs))] = [0 2 0] [1 2 1] [1] [0 1 0] @x + [0 1 0] @xs + [2] [0 2 0] [0 2 1] [2] > [0 1 0] [0 2 1] [0] [0 1 0] @x + [0 1 0] @xs + [2] [0 1 0] [0 2 1] [2] = [::(@x, nub(remove(@x, @xs)))] [nub#1(nil())] = [0] [1] [1] >= [0] [0] [0] = [nil()] [remove(@x, @l)] = [0 1 0] [0 1 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] >= [0 1 0] [0 1 0] [0] [0 1 0] @l + [0 0 0] @x + [0] [0 0 1] [0 0 0] [0] = [remove#1(@l, @x)] [remove#1(::(@y, @ys), @x)] = [0 1 0] [0 1 0] [0 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 0] [0 1 1] [0] >= [0 1 0] [0 1 0] [0 1 0] [1] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 0] [0 1 1] [0] = [remove#2(eq(@x, @y), @x, @y, @ys)] [remove#1(nil(), @x)] = [0 1 0] [0] [0 0 0] @x + [0] [0 0 0] [0] >= [0] [0] [0] = [nil()] [remove#2(#false(), @x, @y, @ys)] = [0 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 0] [0 1 1] [0] >= [0 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 0] [0 1 1] [0] = [::(@y, remove(@x, @ys))] [remove#2(#true(), @x, @y, @ys)] = [0 1 0] [0 0 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @y + [0 1 0] @ys + [1] [0 0 0] [0 1 0] [0 1 1] [0] >= [0 1 0] [0 1 0] [0] [0 0 0] @x + [0 1 0] @ys + [0] [0 0 0] [0 0 1] [0] = [remove(@x, @ys)] We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() , eq(@l1, @l2) -> eq#1(@l1, @l2) , eq#1(::(@x, @xs), @l2) -> eq#3(@l2, @x, @xs) , eq#1(nil(), @l2) -> eq#2(@l2) , eq#3(::(@y, @ys), @x, @xs) -> and(#equal(@x, @y), eq(@xs, @ys)) , eq#3(nil(), @x, @xs) -> #false() , eq#2(::(@y, @ys)) -> #false() , eq#2(nil()) -> #true() , nub(@l) -> nub#1(@l) , nub#1(::(@x, @xs)) -> ::(@x, nub(remove(@x, @xs))) , nub#1(nil()) -> nil() , remove(@x, @l) -> remove#1(@l, @x) , remove#1(::(@y, @ys), @x) -> remove#2(eq(@x, @y), @x, @y, @ys) , remove#1(nil(), @x) -> nil() , remove#2(#false(), @x, @y, @ys) -> ::(@y, remove(@x, @ys)) , remove#2(#true(), @x, @y, @ys) -> remove(@x, @ys) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))