MAYBE We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { bfs2#1(@t', @x) -> dobfs(@t', @x) , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x1 + [0 1 0 0] x2 + [0] [1 0 1 0] [1 0 1 1] [0] [0 0 0 0] [1 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 0 1] [0 0 1 0] [0] [0 1 1 0] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [1 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 0 0 1] [1 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [1 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 0 0 1] [1 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [1 0 0 1] x1 + [1 0 1 0] x2 + [1 0 1 0] x3 + [0] [0 1 1 0] [1 0 0 1] [0 0 0 1] [0] [0 0 0 1] [0 0 1 0] [0 0 1 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [1 0 1 0] x1 + [0] [1 0 0 1] [0] [0 0 1 0] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [1 0 0 1] [0] [0] [leaf] = [0] [0] [0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [0 0 0 0] x1 + [1 1 0 0] x2 + [1 1 0 0] x3 + [0] [0 0 1 0] [1 0 1 1] [0 1 1 1] [0] [1 1 0 0] [0 1 1 1] [0 1 1 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [1 0 1 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 0 1 0] x5 + [1 1 0 0] x7 + [0] [0 0 0 0] [1 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 1 0] [0] [0 0 0 0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [1 1 0 0] [0] [0] [#false] = [0] [0] [0] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [1 0 0 1] x1 + [0] [0 1 1 0] [0] [0 0 0 1] [0] [1 0 0 0] [1] [bfs2#1](x1, x2) = [1 0 0 1] x1 + [0] [0 1 1 0] [0] [0 0 0 1] [0] [1 1 0 0] [0] [dfs](x1, x2) = [1 0 1 1] x1 + [0] [0 0 1 1] [0] [1 0 1 1] [0] [1 1 0 0] [0] [dfs#1](x1, x2) = [1 0 1 1] x1 + [0] [0 0 1 1] [0] [1 0 1 1] [0] [0 1 0 0] [1 0 0 0] [1 1 0 0] [0] [dfs#2](x1, x2, x3, x4) = [1 0 0 1] x1 + [0 1 0 0] x2 + [1 0 1 1] x3 + [0] [0 1 0 1] [0 0 1 0] [0 0 1 1] [0] [1 1 1 0] [0 0 0 1] [1 0 1 1] [0] [1 0 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 0 1 1] x5 + [0] [0 0 0 0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 1] [0] [1 1 0 0] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [0 0 0 0] [0] [#neg](x1) = [0 0 0 0] x1 + [0] [1 0 1 0] [0] [1 1 0 1] [0] [0 0 0 0] [0] [#pos](x1) = [0 0 0 0] x1 + [0] [0 0 1 0] [0] [1 1 0 1] [0] [0 0 0 0] [0] [#s](x1) = [0 0 0 0] x1 + [0] [1 0 1 0] [0] [1 1 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 1 0 0] @y + [0] [1 0 1 0] [1 0 1 1] [0] [0 0 0 0] [1 1 1 1] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [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 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 0 1] [0 0 1 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [1 2 1 0] [1 1 0 1] [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] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 1] [0 0 1 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 1] [0 0 1 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 0 1] [0 0 1 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [1 1 0 0] [2 2 1 1] [2 2 1 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 2 1 0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] [2 2 1 1] [2 2 1 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 2 1 0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] [2 2 1 1] [2 2 1 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_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 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 1 0] [1 0 1 1] [0 1 1 1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1 2 1 0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 1 0] [1 0 1 1] [0 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 1 0] [1 0 1 1] [0 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 1 0] [1 0 1 1] [0 1 1 1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1 1 0 0] [2 2 1 1] [2 2 1 1] [0] >= [0] [0] [0] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [1 0 1 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [1 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [1 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 1 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [1 0 1 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [1 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 1 0 1] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [1 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [1 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 0 0 1] [0 0 1 0] [0 0 1 0] [0] [1 1 1 0] [1 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 0 0 1] [0 0 1 0] [0 0 1 0] [0] [0 1 1 0] [1 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @queue + [0] [1 0 0 1] [0 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @queue + [0] [1 0 0 1] [0 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 0 1] @t + [1 0 1 0] @ts + [0] [1 0 0 1] [0 1 1 0] [0 0 0 1] [0] [0 0 1 0] [0 0 0 1] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 0 1] @t + [1 0 1 0] @ts + [0] [1 0 0 1] [0 1 1 0] [0 0 0 1] [0] [0 0 1 0] [0 0 0 1] [0 0 1 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [1 0 1 0] @futurequeue + [0] [1 0 0 1] [0] [0 0 1 0] [0] >= [1 0 0 0] [0] [1 0 1 0] @futurequeue + [0] [1 0 0 1] [0] [0 0 1 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @ts + [0] [1 0 0 1] [0 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @ts + [0] [1 0 0 1] [0 0 0 1] [0] [0 0 1 0] [0 0 1 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 0 0] @y + [0] [1 0 0 1] [2 1 1 1] [1 2 1 1] [0 0 0 1] [0 0 1 0] [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 0 0] @y + [0] [1 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 1 0] [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [1 1 0 0] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 0 1] @t + [1 0 1 0] @ts + [0] [1 1 1 0] [1 0 0 1] [0] [0 0 0 1] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 0 1] @t + [1 0 1 0] @ts + [0] [1 1 1 0] [1 0 0 1] [0] [0 0 0 1] [0 0 1 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [1 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [1 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 0 0] @y + [0] [1 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 1 0] [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 0 1] @t1 + [1 0 0 1] @t2 + [1 0 1 0] @ts + [0] [1 0 0 1] [1 1 1 0] [1 1 1 0] [0 0 0 1] [0] [0 0 1 0] [0 0 0 1] [0 0 0 1] [0 0 1 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 0 0] @y + [0] [1 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 1 0] [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 0 0 0] @y + [0] [1 0 1 1] [0 1 1 1] [0 0 1 0] [0] [0 1 1 1] [0 1 1 1] [1 1 0 0] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 0] [1] [1 0 0 1] @t + [0] [1 1 1 1] [0] [0 0 0 1] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [1 0 0 1] @t + [0] [0 1 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [1 0 0 1] @t + [0] [0 1 1 0] [0] [0 0 0 1] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [1] [1 0 0 1] @t' + [0] [0 1 1 0] [0] [0 0 0 1] [0] > [1 0 0 0] [0] [1 0 0 1] @t' + [0] [0 1 1 0] [0] [0 0 0 1] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [1 1 0 0] [0] [1 0 1 1] @queue + [0] [0 0 1 1] [0] [1 0 1 1] [0] >= [1 1 0 0] [0] [1 0 1 1] @queue + [0] [0 0 1 1] [0] [1 0 1 1] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 1 0 0] [1 1 0 0] [0] [1 1 1 1] @t + [1 0 1 1] @ts + [0] [0 1 1 1] [0 0 1 1] [0] [1 1 1 1] [1 0 1 1] [0] >= [1 1 0 0] [1 1 0 0] [0] [1 1 0 1] @t + [1 0 1 1] @ts + [0] [0 1 1 1] [0 0 1 1] [0] [1 1 1 1] [1 0 1 1] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 0 1 1] @ts + [0] [0 0 1 0] [0 0 1 1] [0] [0 0 0 1] [1 0 1 1] [0] >= [1 1 0 0] [0] [1 0 1 1] @ts + [0] [0 0 1 1] [0] [1 0 1 1] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [1 1 0 0] @a + [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 1] @ts + [0] [1 1 0 0] [0 0 1 0] [1 2 1 1] [1 2 1 1] [0 0 1 1] [0] [0 0 1 0] [0 0 0 1] [3 1 1 1] [2 2 1 1] [1 0 1 1] [0] >= [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 1] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 1] [0] >= [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 1] @ts + [0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [1 1 1 1] [1 1 1 1] [1 0 1 1] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 1 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 1 0 0] [0] [1 1 1 1] @t + [0] [0 1 1 1] [0] [1 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 1 0 0] [0] [0 0 0 0] [1 1 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [#eq](x1, x2) = [0 1 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [1 1 1 1] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 1] x2 + [0] [0 1 0 0] [1 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 1] x2 + [0] [0 1 0 0] [1 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [0 1 0 0] x1 + [0 1 0 1] x2 + [0 1 0 0] x3 + [0] [0 1 0 0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [0 1 0 0] x1 + [0] [0 1 0 0] [0] [1 1 0 0] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [0 1 0 0] x1 + [1 1 1 1] x2 + [1 1 1 1] x3 + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0] [0 0 0 0] [1 0 0 1] [1 0 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [0 1 0 1] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [0 1 0 0] x5 + [0 1 0 0] x7 + [0] [0 0 0 0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 0 0] [0] [0 0 0 0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0 0 0 0] [0] [0] [#false] = [0] [0] [0] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [0 1 0 0] x1 + [0] [0 1 0 0] [0] [1 1 0 0] [0] [1 0 0 0] [0] [bfs2#1](x1, x2) = [0 1 0 0] x1 + [0] [0 1 0 0] [0] [1 1 0 0] [0] [0 0 0 1] [0] [dfs](x1, x2) = [0 0 1 0] x1 + [0] [0 0 1 0] [0] [0 0 1 0] [0] [0 0 0 1] [0] [dfs#1](x1, x2) = [0 0 1 0] x1 + [0] [0 0 1 0] [0] [0 0 1 0] [0] [0 0 0 1] [1 0 0 0] [0 0 0 1] [0] [dfs#2](x1, x2, x3, x4) = [1 0 1 0] x1 + [0 1 0 0] x2 + [0 0 1 0] x3 + [0] [0 1 0 0] [0 0 1 0] [0 0 1 0] [0] [0 1 0 0] [0 0 0 1] [0 0 1 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [0 0 1 0] x5 + [0] [0 0 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [1 0 0 1] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [1 0 0 0] [0] [#neg](x1) = [1 1 0 0] x1 + [0] [0 1 1 1] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#pos](x1) = [0 1 0 0] x1 + [0] [1 1 1 1] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#s](x1) = [1 1 0 0] x1 + [0] [0 1 1 1] [0] [0 0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 1 0 0] @y + [0] [0 0 1 0] [0 1 0 0] [0] [0 0 0 0] [1 1 0 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 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 0] [0] [0 1 0 0] @x_1 + [0 1 0 0] @x_2 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [1 1 1 1] [0 0 1 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [1 0 0 0] [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] [0 1 0 0] @x_1 + [0 1 0 0] @x_2 + [0] [1 1 1 1] [0 0 1 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x_1 + [0 1 0 0] @x_2 + [0] [1 1 1 1] [0 0 1 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x_1 + [0 1 0 0] @x_2 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 1 1 1] [0 0 1 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_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 1 0 0] @x_1 + [1 1 1 1] @x_2 + [1 1 1 1] @x_3 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x_1 + [1 1 1 1] @x_2 + [1 1 1 1] @x_3 + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x_1 + [1 1 1 1] @x_2 + [1 1 1 1] @x_3 + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x_1 + [1 1 1 1] @x_2 + [1 1 1 1] @x_3 + [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0 0] [0] [1 1 0 0] @x + [0] [0 1 1 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] @x + [0 0 0 0] @y + [0] [0 1 1 1] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] @x + [0 0 0 0] @y + [0] [0 1 1 1] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0 0] [0] [0 1 0 0] @x + [0] [1 1 1 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [1 1 1 1] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [1 1 1 1] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0 0] [0] [1 1 0 0] @x + [0] [0 1 1 1] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0 0 0 0] [0] [1 1 0 0] @x + [0 0 0 0] @y + [0] [0 1 1 1] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 1 0 0] @x + [0 0 0 0] @y + [0] [0 0 1 0] [0 0 0 0] [0] [0 0 0 0] [1 0 0 0] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 1 1 1] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 1 1 1] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @queue + [0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @queue + [0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 1 0 0] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 1 0 0] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0] [1 1 0 0] [0] [1 1 0 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [0 1 0 0] [0] [1 1 0 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @ts + [0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @ts + [0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 0 0] @y + [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [2 1 1 1] [2 1 1 1] [1 1 0 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 0 0] @y + [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0 0 0 0] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 0 0] @y + [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 1 0 1] @t1 + [1 1 0 1] @t2 + [0 1 0 0] @ts + [0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 0 0] @y + [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 0 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @y + [0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0] [1 0 0 1] [1 0 0 1] [0 0 0 0] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 1 0 0] [0] [1 1 0 0] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 1 0 0] [0] [1 1 0 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 1 0 0] [0] [1 1 0 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [0] [0 1 0 0] @t' + [0] [0 1 0 0] [0] [1 1 0 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t' + [0] [0 1 0 0] [0] [1 1 0 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [0 0 0 1] [0] [0 0 1 0] @queue + [0] [0 0 1 0] [0] [0 0 1 0] [0] >= [0 0 0 1] [0] [0 0 1 0] @queue + [0] [0 0 1 0] [0] [0 0 1 0] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 0 1] [0 0 0 1] [0] [1 1 1 1] @t + [0 0 1 0] @ts + [0] [1 1 1 1] [0 0 1 0] [0] [1 1 1 1] [0 0 1 0] [0] >= [1 0 0 1] [0 0 0 1] [0] [1 1 1 0] @t + [0 0 1 0] @ts + [0] [0 1 1 0] [0 0 1 0] [0] [0 1 0 1] [0 0 1 0] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [0 0 0 1] [0] [0 1 0 0] @t + [0 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 1 0] [0] >= [0 0 0 1] [0] [0 0 1 0] @ts + [0] [0 0 1 0] [0] [0 0 1 0] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [1 1 0 0] @a + [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 1 0] @ts + [0] [0 1 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [0 1 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] >= [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 1 0] @ts + [0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [0] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 0 1] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 0 1] [0] [1 1 1 1] @t + [0] [1 1 1 1] [0] [1 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs#1(nil(), @x) -> leaf() , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x1 + [1 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] [0 0 0 0] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x1 + [1 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0 1 0 0] x3 + [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [0 1 0 0] x1 + [0] [0 1 0 0] [0] [0 1 0 0] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [0 1 1 1] x1 + [1 1 1 1] x2 + [1 1 1 1] x3 + [0] [0 0 1 0] [1 0 1 0] [1 0 1 0] [0] [0 1 1 1] [0 1 0 1] [0 1 1 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [0 1 0 0] x5 + [0 1 1 1] x7 + [0] [0 0 0 0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 1 0] [0] [0 0 0 0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] [0] [#false] = [0] [0] [0] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [0 1 0 0] x1 + [0] [1 1 0 0] [0] [1 1 0 0] [0] [1 0 0 0] [1] [bfs2#1](x1, x2) = [0 1 0 0] x1 + [0] [1 1 0 0] [0] [1 1 0 0] [0] [0 0 1 0] [0 0 1 0] [1] [dfs](x1, x2) = [0 0 0 1] x1 + [0 0 0 0] x2 + [0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] [0 0 1 0] [0 0 1 0] [1] [dfs#1](x1, x2) = [0 0 0 1] x1 + [0 0 0 0] x2 + [0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] [0 0 1 0] [1 0 0 0] [0 0 1 0] [0 0 1 0] [1] [dfs#2](x1, x2, x3, x4) = [1 0 1 1] x1 + [0 1 0 0] x2 + [0 0 0 1] x3 + [0 0 0 0] x4 + [0] [0 1 0 1] [0 0 1 0] [0 0 0 1] [0 0 0 0] [0] [1 1 1 0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [0 0 0 1] x5 + [0 0 0 0] x6 + [0] [0 0 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [1 0 1 0] [1 0 1 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [1 0 0 0] [0] [#neg](x1) = [0 1 0 1] x1 + [0] [0 0 1 0] [0] [1 0 0 0] [0] [1 0 0 0] [0] [#pos](x1) = [0 1 1 1] x1 + [0] [1 0 1 0] [0] [0 1 1 1] [0] [1 0 0 0] [0] [#s](x1) = [0 1 0 1] x1 + [0] [1 0 1 0] [0] [1 1 1 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 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 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 1 0] [0 0 1 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] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [1 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0 0 1 0] [1 0 1 0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 1 0] [0 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [1 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 1 0] [1 0 1 0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 1 0] [0 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [1 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 1 0] [1 0 1 0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_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 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 1 0] [0 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [1 0 0 0] @y_1 + [1 0 0 0] @y_2 + [1 0 0 0] @y_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 1 0] [1 0 1 0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [1 0 0 0] @y + [0] [0 0 0 0] [0] [0 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [1 0 0 0] @y + [0] [0 0 0 0] [0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [1 0 0 0] @y + [0] [0 0 0 0] [0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 1 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [0] [1 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [1 0 1 0] [0] >= [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 0 0 0] [0 0 0 0] [0] [1 0 0 0] [0 0 1 0] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 1 1 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 1 1 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [0 1 0 0] [0] [0 1 0 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [0 1 0 0] [0] [0 1 0 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 1 0] [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 1 0] [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t1 + [0 1 0 0] @t2 + [0 1 0 0] @ts + [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0 1 0 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 1 0] [0] [0 1 0 0] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 1 1] @y + [0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0] [0 1 0 1] [0 1 1 1] [0 1 1 1] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 0] [1] [0 1 0 0] @t + [0] [1 1 0 0] [0] [1 1 0 0] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [0 1 0 0] @t + [0] [1 1 0 0] [0] [1 1 0 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 1 0 0] [0] [0 1 0 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [1] [0 1 0 0] @t' + [0] [1 1 0 0] [0] [1 1 0 0] [0] > [1 0 0 0] [0] [0 1 0 0] @t' + [0] [1 1 0 0] [0] [1 1 0 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [0 0 1 0] [0 0 1 0] [1] [0 0 0 1] @queue + [0 0 0 0] @x + [0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] >= [0 0 1 0] [0 0 1 0] [1] [0 0 0 1] @queue + [0 0 0 0] @x + [0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [1 1 1 1] @t + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [1 1 1 1] @t + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0 0 1 0] [1] [0 0 0 0] @x + [0] [0 0 0 0] [0] [0 0 0 0] [0] > [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [0 0 1 0] [0 0 1 0] [1] [0 1 0 0] @t + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] >= [0 0 1 0] [0 0 1 0] [1] [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 1 0] [1 0 0 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [1 1 2 1] @a + [0 1 0 0] @t + [2 1 1 1] @t1 + [2 1 2 1] @t2 + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 2 2 2] [0 0 1 0] [1 2 1 2] [1 2 2 2] [0 0 0 1] [0 0 0 0] [0] [1 1 2 1] [0 0 0 1] [3 1 2 1] [3 1 2 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 0 0 1] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 0 0 1] [0 0 0 0] [0] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 1 0] [1 0 1 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 1 0] [0 0 1 0] [1] [1 1 1 1] @t + [0 0 0 0] @x + [0] [1 1 1 1] [0 0 0 0] [0] [1 1 1 1] [0 0 0 0] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(nil(), @x) -> leaf() , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0] [#equal](x1, x2) = [1] [1] [0] [0] [#eq](x1, x2) = [1] [1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 0 1 0] x1 + [0 1 0 0] x2 + [0] [1 1 0 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 1] x2 + [1] [0 0 1 0] [0 1 1 0] [0] [0 1 0 0] [0 1 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 1] x2 + [1] [0 0 1 0] [0 1 1 0] [0] [0 1 0 0] [0 1 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [0 0 1 0] x1 + [0 1 0 1] x2 + [0 1 0 0] x3 + [1] [0 1 0 0] [0 1 1 0] [0 0 1 0] [0] [0 0 1 0] [0 1 0 1] [0 1 0 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [0 1 0 1] x1 + [1] [0 1 1 0] [0] [0 1 0 1] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 1] x1 + [0] [0 1 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [node](x1, x2, x3) = [0 1 1 1] x1 + [1 1 1 1] x2 + [1 1 1 1] x3 + [1] [0 1 1 1] [1 1 1 1] [1 1 1 1] [1] [0 0 0 0] [1 0 0 1] [1 0 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 1 1 1] x1 + [0 1 0 1] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [0 1 0 0] x5 + [0 1 1 1] x7 + [0] [0 0 1 1] [0 1 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0 1 1 1] [0] [0 0 0 0] [0 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 0 0] [0] [0] [#false] = [1] [0] [0] [0] [#true] = [1] [1] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [0 0 1 1] x1 + [1] [1 1 0 0] [0] [0 0 1 0] [0] [1 0 0 0] [0] [bfs2#1](x1, x2) = [0 0 1 1] x1 + [1] [1 1 0 0] [0] [0 1 1 0] [0] [0 0 0 1] [1] [dfs](x1, x2) = [0 1 1 0] x1 + [0] [0 1 1 0] [0] [0 1 0 1] [0] [0 0 0 1] [1] [dfs#1](x1, x2) = [0 1 1 0] x1 + [0] [0 1 1 0] [0] [0 1 0 1] [0] [0 0 0 1] [1 0 0 0] [0 0 0 1] [1] [dfs#2](x1, x2, x3, x4) = [1 0 1 0] x1 + [0 1 0 0] x2 + [0 1 1 0] x3 + [0] [0 1 0 0] [0 0 1 0] [0 1 1 0] [0] [0 0 1 0] [0 0 0 1] [0 1 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 0] x3 + [1 1 1 0] x4 + [0 1 1 0] x5 + [0] [0 0 0 0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] [0 0 0 0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [0] [1 0 0 1] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [1] [0 0 0 0] [0 0 0 0] [1] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [1 0 0 0] [0] [#neg](x1) = [1 1 1 1] x1 + [0] [0 0 0 1] [0] [0 0 0 0] [0] [1 0 0 0] [0] [#pos](x1) = [1 1 1 1] x1 + [0] [1 1 1 1] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#s](x1) = [1 1 1 1] x1 + [0] [1 1 1 1] [0] [0 0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#eq(@x, @y)] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#true()] [#eq(nil(), leaf())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 1 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 1 0 0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 1 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 1 0 0] [0 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @queue + [1] [0 1 1 0] [0 0 1 0] [0] [0 1 0 1] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @queue + [1] [0 1 1 0] [0 0 1 0] [0] [0 1 0 1] [0 1 0 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 0 1 0] @t + [0 1 0 0] @ts + [1] [0 1 1 0] [1 1 0 0] [0 0 1 0] [0] [0 1 0 1] [0 0 1 0] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 0 1 0] @t + [0 1 0 0] @ts + [1] [0 1 1 0] [0 1 0 0] [0 0 1 0] [0] [0 1 0 1] [0 0 1 0] [0 1 0 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1] [0 1 1 0] [0] [0 1 0 1] [0] >= [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1] [0 1 1 0] [0] [0 1 0 1] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @ts + [1] [0 1 1 0] [0 0 1 0] [0] [0 1 0 1] [0 1 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [0 1 0 0] @ts + [1] [0 1 1 0] [0 0 1 0] [0] [0 1 0 1] [0 1 0 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [2] [0 1 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0 1 1 1] [1] [0 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 1 1 1] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [2] [0 1 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0 1 1 1] [1] [0 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 0 0] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 1] @t + [0 1 0 1] @ts + [1] [1 1 1 0] [0 1 1 0] [0] [1 0 1 1] [0 1 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 1] @t + [0 1 0 1] @ts + [1] [1 1 1 0] [0 1 1 0] [0] [1 0 1 1] [0 1 0 1] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [1] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 1] @xs + [0] [0 1 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [1] [0 1 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0 1 1 1] [0] [0 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 0 0] [0] > [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @futurequeue + [1 0 1 1] @t1 + [1 0 1 1] @t2 + [0 1 0 0] @ts + [1] [0 1 1 0] [1 1 1 0] [1 1 1 0] [0 0 1 0] [0] [0 1 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [0 1 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 0 0] @ts + [0 1 1 1] @y + [2] [0 1 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 0] [0 1 1 1] [1] [0 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 0] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [0 1 1 1] @y + [1] [1 1 1 1] [1 1 1 1] [0 1 1 1] [1] [1 0 0 1] [1 0 0 1] [0 0 0 0] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 0 0] [0] [1 1 1 0] @t + [1] [1 0 1 1] [1] [1 1 1 1] [1] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [0 0 1 1] @t + [1] [1 1 0 0] [0] [0 0 1 0] [0] >= [1 0 0 0] [0] [0 0 1 0] @t + [1] [1 1 0 0] [0] [0 0 1 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [0] [0 0 1 1] @t' + [1] [1 1 0 0] [0] [0 1 1 0] [0] >= [1 0 0 0] [0] [0 0 1 1] @t' + [1] [1 1 0 0] [0] [0 0 1 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [0 0 0 1] [1] [0 1 1 0] @queue + [0] [0 1 1 0] [0] [0 1 0 1] [0] >= [0 0 0 1] [1] [0 1 1 0] @queue + [0] [0 1 1 0] [0] [0 1 0 1] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 0 1] [0 0 0 1] [1] [1 1 1 0] @t + [0 1 1 0] @ts + [0] [1 1 1 0] [0 1 1 0] [0] [1 0 1 1] [0 1 0 1] [0] >= [1 0 0 1] [0 0 0 1] [1] [1 1 1 0] @t + [0 1 1 0] @ts + [0] [0 1 1 0] [0 1 1 0] [0] [0 0 1 1] [0 1 0 1] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [1] [0] [0] [0] > [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [0 0 0 1] [1] [0 1 0 0] @t + [0 1 1 0] @ts + [0] [0 0 1 0] [0 1 1 0] [0] [0 0 0 1] [0 1 0 1] [0] >= [0 0 0 1] [1] [0 1 1 0] @ts + [0] [0 1 1 0] [0] [0 1 0 1] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [1 1 1 1] @a + [0 1 0 0] @t + [2 1 1 1] @t1 + [2 1 1 1] @t2 + [0 1 1 0] @ts + [2] [0 1 1 1] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [1] [0 1 1 1] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1] >= [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [0 1 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [0 1 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [0] >= [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [1 1 1 0] @t1 + [1 1 1 0] @t2 + [0 1 1 0] @ts + [0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] [1 0 1 1] [1 0 1 1] [0 1 0 1] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [0 1 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [0] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 0 1] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 1] [1] [1 1 1 0] @t + [0] [1 1 1 0] [0] [1 0 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [1] [1] [0] >= [0] [1] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [1] [1] [0] >= [0] [1] [1] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(nil(), @x) -> leaf() , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x1 + [0 0 0 1] x2 + [0] [1 0 0 1] [1 1 1 1] [0] [1 1 0 0] [1 0 0 1] [0] [0] [#eq](x1, x2) = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 1 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [1 0 1 0] [0] [0 1 1 0] [1 1 1 0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [1 0 1 0] [0] [0 1 1 0] [1 1 1 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0 1 0 0] x3 + [0] [0 0 1 0] [1 0 1 0] [0 0 1 0] [0] [0 1 1 0] [1 1 1 0] [0 1 1 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [0 1 0 0] x1 + [0] [1 0 1 0] [0] [0 1 1 0] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [0 0 1 0] x1 + [0 1 0 1] x2 + [0 1 0 1] x3 + [1] [0 0 0 0] [1 0 1 0] [1 0 1 0] [1] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [0 1 0 0] x2 + [0 1 0 1] x3 + [0 1 0 1] x4 + [0 1 0 0] x5 + [0 0 1 0] x7 + [1] [0 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 0 0] [1] [0 0 0 0] [1 1 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [0 0 1 0] [0] [0] [#false] = [0] [0] [0] [0] [#true] = [0] [0] [0] [1 0 1 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 1 1 0] [0] [1 0 1 0] [0] [bfs2#1](x1, x2) = [0 1 1 0] x1 + [0] [0 0 1 0] [0] [0 1 1 0] [0] [1 0 1 0] [0] [dfs](x1, x2) = [1 1 0 1] x1 + [0] [0 1 0 1] [0] [1 1 0 1] [0] [1 0 1 0] [0] [dfs#1](x1, x2) = [1 1 0 1] x1 + [0] [0 1 0 1] [0] [1 1 0 1] [0] [0 0 1 0] [1 0 0 0] [1 0 1 0] [0] [dfs#2](x1, x2, x3, x4) = [0 0 1 1] x1 + [0 1 0 0] x2 + [1 1 0 1] x3 + [0] [0 1 0 1] [0 0 1 0] [0 1 0 1] [0] [0 1 1 0] [0 0 0 1] [1 1 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 1 0 1] x5 + [0] [0 0 0 0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 1] [0] [1 0 1 0] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [0 0 0 0] [0] [#neg](x1) = [0 0 0 0] x1 + [0] [0 0 0 0] [0] [1 0 0 0] [0] [0 0 0 0] [0] [#pos](x1) = [1 0 0 0] x1 + [0] [0 0 1 0] [0] [0 1 1 0] [0] [0 0 0 0] [0] [#s](x1) = [0 0 1 0] x1 + [0] [1 0 0 0] [0] [0 1 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 1] @y + [0] [1 0 0 1] [1 1 1 1] [0] [1 1 0 0] [1 0 0 1] [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] = [#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] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@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] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 1 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 1 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0 1 1 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0 1 1 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [1 0 1 0] [0] [1 1 1 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [1 0 1 0] [0] [0 1 1 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 0] [0 1 1 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 1] @t1 + [0 1 0 1] @t2 + [0 1 0 0] @ts + [0 0 1 0] @y + [1] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 0 0] [1] [1 1 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [0 0 1 0] [2] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 1] @t1 + [0 1 0 1] @t2 + [0 1 0 0] @ts + [0 0 1 0] @y + [1] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 0 0] [1] [1 1 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [0 0 1 0] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 0 1 0] [1 0 1 0] [0] [0 1 1 0] [0 1 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [0 1 1 0] [0 1 1 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 1] @t1 + [0 1 0 1] @t2 + [0 1 0 0] @ts + [0 0 1 0] @y + [1] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 0 0] [1] [1 1 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t1 + [0 1 0 0] @t2 + [0 1 0 0] @ts + [0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0] [1 1 1 0] [1 1 1 0] [1 1 1 0] [0 1 1 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 1] @t1 + [0 1 0 1] @t2 + [0 1 0 0] @ts + [0 0 1 0] @y + [1] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0 0 1 0] [0 0 0 0] [1] [1 1 1 0] [1 1 1 1] [1 1 1 1] [0 1 1 0] [0 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [0 1 0 1] @t1 + [0 1 0 1] @t2 + [0 0 1 0] @y + [1] [1 0 1 0] [1 0 1 0] [0 0 0 0] [1] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 1 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 1 0] [0] [0 1 1 0] @t + [0] [0 0 1 0] [0] [0 1 1 0] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 1 1 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 1 1 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 1 0] [0] [0 1 1 0] @t' + [0] [0 0 1 0] [0] [0 1 1 0] [0] >= [1 0 0 0] [0] [0 1 0 0] @t' + [0] [0 0 1 0] [0] [0 1 1 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [1 0 1 0] [0] [1 1 0 1] @queue + [0] [0 1 0 1] [0] [1 1 0 1] [0] >= [1 0 1 0] [0] [1 1 0 1] @queue + [0] [0 1 0 1] [0] [1 1 0 1] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 1 0] [1 0 1 0] [0] [1 1 1 1] @t + [1 1 0 1] @ts + [0] [0 1 1 1] [0 1 0 1] [0] [1 1 1 1] [1 1 0 1] [0] >= [1 0 1 0] [1 0 1 0] [0] [0 1 1 1] @t + [1 1 0 1] @ts + [0] [0 1 1 1] [0 1 0 1] [0] [0 1 1 1] [1 1 0 1] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [1 0 1 0] [0] [0 1 0 0] @t + [1 1 0 1] @ts + [0] [0 0 1 0] [0 1 0 1] [0] [0 0 0 1] [1 1 0 1] [0] >= [1 0 1 0] [0] [1 1 0 1] @ts + [0] [0 1 0 1] [0] [1 1 0 1] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1] [0 0 1 0] @a + [0 1 0 0] @t + [1 1 2 1] @t1 + [1 1 2 1] @t2 + [1 1 0 1] @ts + [1] [0 0 2 0] [0 0 1 0] [0 2 1 2] [0 2 1 2] [0 1 0 1] [1] [0 0 1 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 1] [2] >= [1 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 1] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 1] [0] > [1 0 1 0] [1 0 1 0] [1 0 1 0] [0] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 1] @ts + [0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] [1 1 1 1] [1 1 1 1] [1 1 0 1] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 1] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 1] [0] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 1 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 1 0] [0] [1 1 1 1] @t + [0] [0 1 1 1] [0] [1 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(nil(), @x) -> leaf() , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0] [#equal](x1, x2) = [1 0 0 0] x2 + [1] [1 1 1 1] [1] [0 0 0 0] [1] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x2 + [1] [0 0 1 1] [1] [0 0 0 0] [1] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 0 1] [1 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 0 1] [1 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0 1 0 0] x3 + [0] [0 1 0 1] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [0 1 0 0] x1 + [0] [0 1 0 1] [0] [0 0 0 1] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [0 0 0 0] [1 0 0 0] [1 0 0 0] [1] [node](x1, x2, x3) = [0 0 0 0] x1 + [1 1 0 0] x2 + [1 1 0 0] x3 + [1] [1 0 0 0] [0 1 1 1] [0 1 1 1] [0] [1 0 0 0] [0 0 1 1] [0 0 1 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 0 0] x3 + [1 1 0 0] x4 + [0 1 0 0] x5 + [0 0 0 0] x7 + [1] [0 0 0 0] [1 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1 0 0 0] [0] [0 0 0 0] [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 0 0 1] [1 0 0 0] [0] [0] [#false] = [1] [1] [1] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [0 1 0 0] x1 + [0] [1 1 0 1] [0] [0 0 0 1] [0] [1 0 0 0] [0] [bfs2#1](x1, x2) = [0 1 0 0] x1 + [0] [1 1 0 1] [0] [0 1 0 1] [0] [1 1 0 0] [0] [dfs](x1, x2) = [1 0 1 0] x1 + [0] [0 0 1 1] [0] [0 0 1 1] [0] [1 1 0 0] [0] [dfs#1](x1, x2) = [1 0 1 0] x1 + [0] [0 0 1 1] [0] [0 0 1 1] [0] [0 1 0 0] [1 0 0 0] [1 1 0 0] [0] [dfs#2](x1, x2, x3, x4) = [1 0 1 0] x1 + [0 1 0 0] x2 + [1 0 1 0] x3 + [0] [0 1 0 1] [0 0 1 0] [0 0 1 1] [0] [0 1 1 0] [0 0 0 1] [0 0 1 1] [0] [1 0 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 0] x3 + [1 1 1 0] x4 + [1 0 1 0] x5 + [0] [0 0 0 0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [1 1 0 0] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [1] [0 0 0 0] [0 0 0 0] [1] [0 0 0 0] [0 0 0 0] [1] [0] [#0] = [0] [0] [0] [0 0 0 0] [0] [#neg](x1) = [1 0 0 0] x1 + [0] [0 1 1 1] [0] [0 1 0 0] [0] [1 0 0 0] [0] [#pos](x1) = [1 0 0 0] x1 + [0] [0 0 0 1] [0] [0 0 1 1] [0] [0 0 0 0] [0] [#s](x1) = [1 1 0 0] x1 + [0] [0 1 1 1] [0] [1 0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0] [1 0 0 0] @y + [1] [1 1 1 1] [1] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 1] [1] [0 0 0 0] [1] = [#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] @y_1 + [0 0 0 0] @y_2 + [1] [0 1 1 1] [0 0 1 1] [1] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [1] [2 0 0 0] [0 1 2 2] [0 1 2 2] [1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [1] [0 1 1 1] [0 0 1 1] [1] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(nil(), nil())] = [0] [1] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [1] [2 0 0 0] [0 1 2 2] [0 1 2 2] [1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [1] [0 1 1 1] [0 0 1 1] [1] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(leaf(), nil())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(leaf(), leaf())] = [0] [1] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [1] [2 0 0 0] [0 1 2 2] [0 1 2 2] [1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [1] [0 1 1 1] [0 0 1 1] [1] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [1] [2 0 0 0] [0 1 2 2] [0 1 2 2] [1] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [1] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 2 1 1] [1] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 2] [1] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [1 1 1 2] [1] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#neg(@x), #0())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 2 1 1] [1] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 1] [1] [0 0 0 0] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 2] [1] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#pos(@x), #0())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 2 1 1] [1] [0 0 0 0] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 2] [1] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 1] [1] [0 0 0 0] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [1] [1 1 1 2] [1] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [1] [0 0 1 1] [1] [0 0 0 0] [1] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 1 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 1 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @queue + [0] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 1 0 1] [0 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t + [0 1 0 0] @ts + [0] [1 1 0 1] [0 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [1 1 0 1] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0] [0 1 0 1] [0] [0 0 0 1] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @ts + [0] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [0 1 0 0] @futurequeue + [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 1 0 0] @ts + [0 0 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1 0 0 0] [1] [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 0 0 1] [1 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [0 1 0 0] @futurequeue + [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 1 0 0] @ts + [0 0 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1 0 0 0] [0] [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 0 0 1] [1 0 0 0] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @t + [0 1 0 0] @ts + [0] [0 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [0 1 0 0] @futurequeue + [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 1 0 0] @ts + [0 0 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1 0 0 0] [0] [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 0 0 1] [1 0 0 0] [0] > [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @futurequeue + [0 1 0 0] @t1 + [0 1 0 0] @t2 + [0 1 0 0] @ts + [0] [1 1 0 1] [1 1 0 1] [1 1 0 1] [0 1 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [0 1 0 0] @futurequeue + [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 1 0 0] @ts + [0 0 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1 0 0 0] [0] [0 0 0 1] [0 0 1 1] [0 0 1 1] [0 0 0 1] [1 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [1] [1 1 0 0] @t1 + [1 1 0 0] @t2 + [0 0 0 0] @y + [1] [0 1 1 1] [0 1 1 1] [1 0 0 0] [0] [0 0 1 1] [0 0 1 1] [1 0 0 0] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [1 1 0 1] [0] [0 1 0 1] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [0 1 0 0] @t + [0] [1 1 0 1] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 1 0 1] [0] [0 0 0 1] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [0] [0 1 0 0] @t' + [0] [1 1 0 1] [0] [0 1 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @t' + [0] [1 1 0 1] [0] [0 0 0 1] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [1 1 0 0] [0] [1 0 1 0] @queue + [0] [0 0 1 1] [0] [0 0 1 1] [0] >= [1 1 0 0] [0] [1 0 1 0] @queue + [0] [0 0 1 1] [0] [0 0 1 1] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 1 0 0] [1 1 0 0] [0] [1 1 1 0] @t + [1 0 1 0] @ts + [0] [0 1 1 1] [0 0 1 1] [0] [0 1 1 1] [0 0 1 1] [0] >= [1 1 0 0] [1 1 0 0] [0] [1 1 1 0] @t + [1 0 1 0] @ts + [0] [0 1 1 1] [0 0 1 1] [0] [0 1 1 1] [0 0 1 1] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 1] [0] [0 0 0 1] [0 0 1 1] [0] >= [1 1 0 0] [0] [1 0 1 0] @ts + [0] [0 0 1 1] [0] [0 0 1 1] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [1 0 0 0] @a + [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [1 0 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [0 0 1 1] [1] [1 0 0 0] [0 0 0 1] [1 2 1 1] [1 2 1 1] [0 0 1 1] [1] > [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [1 0 1 0] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [1 0 1 0] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] >= [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [1 1 1 0] @t1 + [1 1 1 0] @t2 + [1 0 1 0] @ts + [0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [0] [0 1 0 0] @t + [1 1 1 0] @t1 + [1 1 1 0] @t2 + [1 0 1 0] @ts + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 1 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 1 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 1 0 0] [0] [1 1 1 0] @t + [0] [0 1 1 1] [0] [0 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#and(#false(), #true())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#and(#true(), #false())] = [0] [1] [1] [1] >= [0] [1] [1] [1] = [#false()] [#and(#true(), #true())] = [0] [1] [1] [1] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x2 + [0] [0 1 0 0] [0] [0 0 0 0] [1] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x2 + [0] [0 1 0 0] [0] [0 0 0 0] [1] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 1] x1 + [0 1 0 1] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 1] x1 + [0 1 0 1] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 1 1] x1 + [0 1 0 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [1] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs](x1, x2, x3) = [1 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] [1 0 0 0] [1 0 0 0] [0] [bfs#1](x1, x2, x3) = [1 0 1 0] x1 + [1 0 1 0] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [1 0 1 0] x1 + [1 0 1 0] x2 + [1 0 1 0] x3 + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0] [1 0 0 0] [0] [bfs#2](x1, x2) = [1 0 1 0] x1 + [0] [0 0 1 0] [0] [1 0 1 0] [0] [1 0 0 0] [0] [reverse](x1) = [0 1 0 1] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [node](x1, x2, x3) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1 1 1 1] x3 + [0] [0 1 1 1] [0 1 1 1] [0 1 1 1] [0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [1] [1 0 0 1] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [1 0 1 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 0 1 0] x5 + [1 1 1 1] x7 + [0] [0 0 0 0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0 1 1 1] [0] [0 0 0 1] [1 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [1 0 0 1] [0] [0] [#false] = [0] [0] [1] [0] [#true] = [0] [0] [1] [1 0 0 0] [1 0 0 1] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0] [dobfs](x1, x2) = [1 0 1 0] x1 + [0] [0 0 1 0] [0] [1 0 1 0] [0] [1 0 0 0] [0 0 0 1] [1] [bfs2#1](x1, x2) = [1 0 1 0] x1 + [0 0 0 0] x2 + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [0 0 0 0] [0] [1 0 0 1] [0] [dfs](x1, x2) = [1 1 0 0] x1 + [0] [1 1 0 0] [0] [1 1 0 0] [0] [1 0 0 1] [0] [dfs#1](x1, x2) = [1 1 0 0] x1 + [0] [1 1 0 0] [0] [1 1 0 0] [0] [0 0 0 1] [1 0 0 0] [1 0 0 1] [1] [dfs#2](x1, x2, x3, x4) = [1 0 1 1] x1 + [0 1 0 0] x2 + [1 1 0 0] x3 + [0] [1 1 0 0] [0 0 1 0] [1 1 0 0] [0] [1 1 0 0] [0 0 0 1] [1 1 0 0] [0] [1 0 0 1] [1 0 0 0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 1 0 0] x5 + [0] [0 0 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [1 0 0 1] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 1] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [0 0 0 0] [0] [#neg](x1) = [1 1 0 0] x1 + [0] [0 0 1 1] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#pos](x1) = [1 1 1 1] x1 + [0] [0 1 1 1] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#s](x1) = [0 1 1 1] x1 + [0] [1 0 1 1] [0] [0 0 0 0] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 0 0] [0] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 0 0] [0] [0 0 0 0] [1] = [#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] @y_1 + [0 0 0 0] @y_2 + [0] [0 1 1 1] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(::(@x_1, @x_2), nil())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 1 1 1] [1 1 1 1] [1 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 1 1 1] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 1 1 1] [1 1 1 1] [1 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 1 1 1] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 1 1 1] [1 1 1 1] [1 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [0 1 1 1] [0 1 0 0] [0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 1 1 1] [1 1 1 1] [1 1 1 1] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 0 0] [0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 1 1] [0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 1 1] [0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 0 0] [0] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 0 0] [0] [0 0 0 0] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 1 1] [0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 0 0] [0] [0 0 0 0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 1 1 1] [0] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 0 0] [0] [0 0 0 0] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 1 1] [0] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [0 1 0 0] [0] [0 0 0 0] [1] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @sofar + [0 1 0 1] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @sofar + [0 1 0 1] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 1 2] @a + [0 1 0 1] @as + [0 1 0 1] @sofar + [1] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 1 2] @a + [0 1 0 1] @as + [0 1 0 1] @sofar + [1] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [1] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 1] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @queue + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @queue + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @t + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @t + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0] [1 0 1 0] @futurequeue + [0] [0 0 1 0] [0] [1 0 1 0] [0] >= [1 0 0 0] [0] [1 0 1 0] @futurequeue + [0] [0 0 1 0] [0] [1 0 1 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 1 1] @y + [1] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0 1 1 1] [0] [1 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [1 1 1 1] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 1 1] @y + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0 1 1 1] [0] [1 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [1 0 0 1] [1] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @t + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] >= [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @t + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 1] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 1] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 1 1] @y + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0 1 1 1] [0] [1 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [1 0 0 1] [1] > [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @futurequeue + [1 0 1 0] @t1 + [1 0 1 0] @t2 + [1 0 1 0] @ts + [0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0 0 1 0] [0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [1 0 1 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 0 1 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1 1 1 1] @y + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0 1 1 1] [0] [1 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [1 0 0 1] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 1 1] @y + [0] [0 1 1 1] [0 1 1 1] [0 1 1 1] [0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [1] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 1] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 0] [0 0 0 1] [1] [1 0 1 0] @t + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [0 0 0 0] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0] [1 0 1 0] @t + [0] [0 0 1 0] [0] [1 0 1 0] [0] >= [1 0 0 0] [0] [1 0 1 0] @t + [0] [0 0 1 0] [0] [1 0 1 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [0 0 0 1] [1] [1 0 1 0] @t' + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [0 0 0 0] [0] > [1 0 0 0] [0] [1 0 1 0] @t' + [0] [0 0 1 0] [0] [1 0 1 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [1 0 0 1] [0] [1 1 0 0] @queue + [0] [1 1 0 0] [0] [1 1 0 0] [0] >= [1 0 0 1] [0] [1 1 0 0] @queue + [0] [1 1 0 0] [0] [1 1 0 0] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 0 1] [1 0 0 1] [1] [1 1 1 1] @t + [1 1 0 0] @ts + [0] [1 1 1 1] [1 1 0 0] [0] [1 1 1 1] [1 1 0 0] [0] >= [1 0 0 1] [1 0 0 1] [1] [1 1 1 1] @t + [1 1 0 0] @ts + [0] [1 1 1 0] [1 1 0 0] [0] [1 1 0 1] [1 1 0 0] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1] [0 1 0 0] @t + [1 1 0 0] @ts + [0] [0 0 1 0] [1 1 0 0] [0] [0 0 0 1] [1 1 0 0] [0] > [1 0 0 1] [0] [1 1 0 0] @ts + [0] [1 1 0 0] [0] [1 1 0 0] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [1 0 0 1] [1 0 0 0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [2] [2 1 1 2] @a + [0 1 0 0] @t + [2 1 1 2] @t1 + [2 1 1 2] @t2 + [1 1 0 0] @ts + [2] [2 1 1 1] [0 0 1 0] [2 1 1 1] [2 1 1 1] [1 1 0 0] [1] [2 1 1 1] [0 0 0 1] [2 1 1 1] [2 1 1 1] [1 1 0 0] [1] >= [1 0 0 0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [2] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [2] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] >= [1 0 0 1] [1 0 0 1] [1 0 0 1] [2] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [1 0 0 1] [2] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 1 0 0] [0] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 0 1] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 1] [1] [1 1 1 1] @t + [0] [1 1 1 1] [0] [1 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 1 0] [1] [1 1 1 1] [0 0 0 0] [1] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x1 + [0] [0 0 0 0] [1] [1 0 0 1] [1] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [1 0 1 0] x1 + [0 1 0 1] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [1 0 1 0] x1 + [0 1 0 1] x2 + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [0 1 1 1] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs](x1, x2, x3) = [1 0 0 1] x1 + [1 0 0 1] x2 + [0 0 0 0] x3 + [1] [1 0 0 1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#1](x1, x2, x3) = [1 0 0 1] x1 + [1 0 0 1] x2 + [0 0 0 0] x3 + [1] [1 0 0 1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [1 0 0 1] x1 + [1 0 0 1] x2 + [1 0 0 1] x3 + [0 0 0 0] x4 + [1] [1 0 0 1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] [1 0 0 0] [0 0 0 0] [0] [bfs#2](x1, x2) = [1 0 0 1] x1 + [0 0 0 0] x2 + [1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] [1 0 0 0] [0] [reverse](x1) = [1 1 1 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [1] [0] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [1 1 0 0] x1 + [1 1 0 0] x2 + [1 1 0 0] x3 + [1] [1 0 0 1] [1 1 1 1] [0 1 1 1] [0] [0 1 0 1] [0 1 1 1] [0 1 1 1] [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 0] x1 + [1 0 0 1] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 0 0 1] x5 + [0 0 0 0] x6 + [1 1 0 0] x7 + [1] [0 1 0 0] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0 1 0 1] [0] [0] [#false] = [0] [1] [1] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0 0 0 0] [0] [dobfs](x1, x2) = [1 0 0 1] x1 + [0 0 0 0] x2 + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] [1 0 0 0] [0 0 0 0] [1] [bfs2#1](x1, x2) = [1 0 0 1] x1 + [0 0 0 0] x2 + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] [1 1 0 0] [1] [dfs](x1, x2) = [1 0 1 0] x1 + [1] [1 0 1 0] [0] [1 0 1 0] [0] [1 1 0 0] [1] [dfs#1](x1, x2) = [1 0 1 0] x1 + [1] [1 0 1 0] [0] [1 0 1 0] [0] [0 1 0 0] [1 0 0 0] [1 1 0 0] [0] [dfs#2](x1, x2, x3, x4) = [1 0 1 0] x1 + [0 1 0 0] x2 + [1 0 1 0] x3 + [1] [1 0 0 1] [0 0 1 0] [1 0 1 0] [0] [1 0 1 0] [0 0 0 1] [1 0 1 0] [0] [1 0 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 0 1 0] x5 + [1] [0 0 0 0] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [0 0 0 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [1 1 0 0] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [1] [0 0 0 0] [0 0 0 0] [1] [0] [#0] = [0] [0] [0] [0 0 0 0] [0] [#neg](x1) = [0 0 0 0] x1 + [0] [0 1 0 0] [0] [1 0 0 1] [0] [1 0 0 0] [0] [#pos](x1) = [1 1 0 0] x1 + [0] [1 0 1 1] [0] [0 1 1 1] [0] [1 0 0 0] [0] [#s](x1) = [1 1 0 0] x1 + [0] [1 1 1 1] [0] [0 0 1 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [0 0 0 0] @y + [0] [0 0 0 0] [0 0 1 0] [1] [1 1 1 1] [0 0 0 0] [1] >= [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] = [#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] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [1] [1 0 0 1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#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] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [1] [1 0 0 1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [1] [1 0 0 1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0] [0 0 0 0] [0 0 0 0] [1] [1 0 0 1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(nil(), nil())] = [0] [0] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(leaf(), nil())] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x_1 + [0 0 0 0] @x_2 + [0 0 0 0] @x_3 + [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [1] [1] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#0(), #pos(@y))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#0(), #s(@y))] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#neg(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] >= [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] = [#eq(@x, @y)] [#eq(#neg(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#pos(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 1 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 1 1 1] [1] >= [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 1 1] [1] >= [0] [0] [1] [1] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 1 1] [1] >= [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [1] [1 0 0 1] [1] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @sofar + [1 0 1 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @sofar + [1 0 1 0] @toreverse + [0] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 1 1 1] @a + [1 0 1 0] @as + [0 1 0 1] @sofar + [0] [0 1 1 1] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 1 0 1] @a + [1 0 1 0] @as + [0 1 0 1] @sofar + [0] [0 1 1 1] [0 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 1] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @queue + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @queue + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @t + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @t + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 0 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 0 1] @ts + [0 0 0 0] @x + [1 1 0 1] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1 0 0 1] [1 0 0 1] [1 1 0 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0 1 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 0 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 0 1] @ts + [0 0 0 0] @x + [1 1 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0 1 0 1] [0] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @t + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 1 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @t + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0 0 0 0] [0] [0 0 0 0] @x + [1] [1 0 0 1] [0] [0 0 0 0] [0] >= [0] [1] [0] [0] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [1 1 1 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [1 0 1 0] @xs + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 0 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 0 1] @ts + [0 0 0 0] @x + [1 1 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0 1 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @futurequeue + [1 0 0 1] @t1 + [1 0 0 1] @t2 + [1 0 0 1] @ts + [0 0 0 0] @x + [1] [1 1 0 1] [1 1 0 1] [1 1 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 1] [0 0 0 0] [0] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 0 0 1] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 0 1] @ts + [0 0 0 0] @x + [1 1 0 0] @y + [1] [1 1 0 1] [1 1 1 1] [1 1 1 1] [1 0 0 1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 1 1 1] [0 1 1 1] [0 0 0 1] [0 0 0 0] [0 1 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 1 0 0] @t1 + [1 1 0 0] @t2 + [1 1 0 0] @y + [1] [1 1 1 1] [0 1 1 1] [1 0 0 1] [0] [0 1 1 1] [0 1 1 1] [0 1 0 1] [0] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 0] [0 0 0 0] [1] [1 0 0 1] @t + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @t + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] >= [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @t + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [0 0 0 0] [1] [1 0 0 1] @t' + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] > [1 0 0 0] [0 0 0 0] [0] [1 0 0 1] @t' + [0 0 0 0] @x + [1] [1 0 0 1] [1 0 0 1] [0] [0 0 0 1] [0 0 0 0] [0] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [1 1 0 0] [1] [1 0 1 0] @queue + [1] [1 0 1 0] [0] [1 0 1 0] [0] >= [1 1 0 0] [1] [1 0 1 0] @queue + [1] [1 0 1 0] [0] [1 0 1 0] [0] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 1 0 0] [1 1 0 0] [1] [1 1 1 1] @t + [1 0 1 0] @ts + [1] [1 1 1 1] [1 0 1 0] [0] [1 1 1 1] [1 0 1 0] [0] > [1 1 0 0] [1 1 0 0] [0] [1 1 1 0] @t + [1 0 1 0] @ts + [1] [1 0 1 1] [1 0 1 0] [0] [1 0 1 1] [1 0 1 0] [0] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [1] [1] [0] [0] > [0] [1] [0] [0] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1] [0 1 0 0] @t + [1 0 1 0] @ts + [1] [0 0 1 0] [1 0 1 0] [0] [0 0 0 1] [1 0 1 0] [0] >= [1 1 0 0] [1] [1 0 1 0] @ts + [1] [1 0 1 0] [0] [1 0 1 0] [0] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [1 1 0 0] [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [2 0 0 1] @a + [0 1 0 0] @t + [2 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [1 1 0 1] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [2 0 0 1] [0 0 0 1] [2 1 1 1] [1 1 1 1] [1 0 1 0] [0] >= [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] >= [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 1 0 0] [1 1 0 0] [1 1 0 0] [1] [0 1 0 0] @t + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 0 1 0] @ts + [1] [0 0 1 0] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [1 0 1 0] [0] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 1 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 1 0 0] [1] [1 1 1 1] @t + [1] [1 1 1 1] [0] [1 1 1 1] [0] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#and(#false(), #true())] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#and(#true(), #false())] = [0] [0] [1] [1] >= [0] [0] [1] [1] = [#false()] [#and(#true(), #true())] = [0] [0] [1] [1] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 4' to orient following rules strictly. Trs: { dfs(@queue, @x) -> dfs#1(@queue, @x) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^4)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(bfs) = {1}, Uargs(bfs#4) = {1}, Uargs(bfs2#1) = {1}, Uargs(dfs#3) = {1}, Uargs(#and) = {1, 2} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [0 0 0 0] [0 0 0 0] [0] [#equal](x1, x2) = [0 0 0 0] x1 + [1 0 0 0] x2 + [0] [1 0 0 0] [1 1 1 1] [0] [0 0 0 0] [0 0 1 0] [0] [0 0 0 0] [0] [#eq](x1, x2) = [0 0 0 0] x2 + [0] [1 0 0 0] [0] [0 0 0 0] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [1 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [appendreverse#1](x1, x2) = [0 1 0 0] x1 + [0 1 0 0] x2 + [0] [1 0 1 0] [0 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] [1 0 0 0] [1 0 0 0] [0] [::](x1, x2) = [0 0 1 0] x1 + [0 1 0 0] x2 + [0] [0 1 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0] [0] [nil] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs](x1, x2, x3) = [1 1 0 0] x1 + [1 1 0 0] x2 + [0 0 0 0] x3 + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#1](x1, x2, x3) = [1 1 0 0] x1 + [1 1 0 0] x2 + [0 0 0 0] x3 + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [bfs#3](x1, x2, x3, x4) = [1 0 1 0] x1 + [1 1 0 0] x2 + [1 1 0 0] x3 + [0 0 0 0] x4 + [0] [0 0 1 0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 0 1 0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] [1 0 0 0] [0 0 0 0] [0] [bfs#2](x1, x2) = [1 1 0 0] x1 + [0 0 0 0] x2 + [0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 0 0] [1] [1 0 0 0] [0] [reverse](x1) = [0 1 0 0] x1 + [0] [1 0 1 0] [0] [0 0 0 1] [0] [0] [leaf] = [0] [0] [1] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [node](x1, x2, x3) = [1 0 0 0] x1 + [1 1 1 0] x2 + [0 1 1 0] x3 + [0] [0 0 1 0] [0 1 1 1] [0 1 1 1] [0] [0 0 0 0] [1 0 0 1] [1 0 0 1] [1] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [bfs#4](x1, x2, x3, x4, x5, x6, x7) = [0 0 0 1] x1 + [1 1 0 0] x2 + [1 1 1 1] x3 + [1 1 1 1] x4 + [1 1 0 0] x5 + [0 0 0 0] x6 + [1 0 0 0] x7 + [0] [0 0 0 0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0 0 0 0] [0 0 1 0] [0] [0 1 0 0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [1 0 0 0] [0 0 0 0] [1] [0] [#false] = [0] [0] [0] [0] [#true] = [0] [0] [0] [1 0 0 0] [1 0 0 0] [1] [bfs2](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [0 0 0 0] [0] [dobfs](x1, x2) = [1 0 1 0] x1 + [0 0 0 0] x2 + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] [1 0 0 0] [1 0 0 0] [0] [bfs2#1](x1, x2) = [1 0 1 0] x1 + [0 0 0 0] x2 + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] [0 0 0 1] [1] [dfs](x1, x2) = [0 0 1 0] x1 + [0] [1 0 1 0] [0] [0 1 0 1] [1] [0 0 0 1] [0] [dfs#1](x1, x2) = [0 0 1 0] x1 + [0] [1 0 1 0] [0] [0 1 0 1] [1] [0 0 0 1] [1 0 0 0] [0 0 0 1] [0] [dfs#2](x1, x2, x3, x4) = [0 0 1 0] x1 + [0 1 0 0] x2 + [0 0 1 0] x3 + [0] [1 1 0 0] [0 0 1 0] [1 0 1 0] [0] [1 0 1 0] [0 0 0 1] [0 1 0 1] [1] [1 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [dfs#3](x1, x2, x3, x4, x5, x6) = [0 0 0 0] x1 + [0 1 0 0] x2 + [0 1 1 0] x3 + [0 1 1 0] x4 + [0 0 1 0] x5 + [0] [0 0 0 0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [1 0 1 0] [0] [0 0 0 0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [1] [1 0 0 1] [1 0 0 0] [1] [dodfs](x1, x2) = [1 1 1 1] x1 + [1 1 1 1] x2 + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] [1 0 0 0] [1 0 0 0] [0] [#and](x1, x2) = [0 0 0 0] x1 + [0 0 0 0] x2 + [0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] [0] [#0] = [0] [0] [0] [1 0 0 0] [0] [#neg](x1) = [1 1 0 0] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [1 0 0 0] [0] [#pos](x1) = [1 0 1 1] x1 + [0] [0 0 1 0] [0] [0 0 0 1] [0] [1 0 0 0] [0] [#s](x1) = [1 0 0 1] x1 + [0] [0 1 1 0] [0] [1 0 0 1] [0] This order satisfies following ordering constraints [#equal(@x, @y)] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @x + [1 0 0 0] @y + [0] [1 0 0 0] [1 1 1 1] [0] [0 0 0 0] [0 0 1 0] [0] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 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] @y_1 + [0 0 0 0] @y_2 + [0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 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] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(nil(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(nil(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(leaf(), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(leaf(), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2))] = [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), nil())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), leaf())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3))] = [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] [0 0 0 0] @y_1 + [0 0 0 0] @y_2 + [0 0 0 0] @y_3 + [0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 0 0] [0 0 0 0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3)))] [#eq(#0(), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] [#eq(#0(), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#0(), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#neg(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 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] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #neg(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#pos(@x), #pos(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#eq(#s(@x), #s(@y))] = [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] >= [0 0 0 0] [0] [0 0 0 0] @y + [0] [1 0 0 0] [0] [0 0 0 0] [0] = [#eq(@x, @y)] [appendreverse(@toreverse, @sofar)] = [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [1 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [0] [0 1 0 0] @sofar + [0 1 0 0] @toreverse + [0] [0 0 1 0] [1 0 1 0] [0] [0 0 0 1] [0 0 0 1] [0] = [appendreverse#1(@toreverse, @sofar)] [appendreverse#1(::(@a, @as), @sofar)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 1 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [1 1 1 0] [1 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [0 0 1 0] @a + [0 1 0 0] @as + [0 1 0 0] @sofar + [0] [0 1 1 0] [1 0 1 0] [0 0 1 0] [0] [1 0 0 1] [0 0 0 1] [0 0 0 1] [0] = [appendreverse(@as, ::(@a, @sofar))] [appendreverse#1(nil(), @sofar)] = [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @sofar + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@sofar] [bfs(@queue, @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 0 0] @queue + [0 0 0 0] @x + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 0 0] @queue + [0 0 0 0] @x + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] = [bfs#1(@queue, @futurequeue, @x)] [bfs#1(::(@t, @ts), @futurequeue, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 0 1 0] @t + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 1 0 0] [0 0 1 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 1 0] [1 1 0 0] [1 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 0 1 0] @t + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 1 0 0] [0 0 1 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 1 0] [1 1 0 0] [1 0 0 0] [1] = [bfs#3(@t, @futurequeue, @ts, @x)] [bfs#1(nil(), @futurequeue, @x)] = [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [0 0 0 0] @x + [0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 0 0] [1] >= [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [0 0 0 0] @x + [0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 0 0] [1] = [bfs#2(@futurequeue, @x)] [bfs#3(leaf(), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 1 0 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 1 0 0] [1 0 0 0] [1] = [bfs(@ts, @futurequeue, @x)] [bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0 0 0 0] @x + [1 0 1 0] @y + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0 0 0 0] [0 0 1 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [1 0 0 0] [1 0 1 0] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0 0 0 0] @x + [1 0 1 0] @y + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0 0 0 0] [0 0 1 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [1 0 0 0] [1 0 0 0] [1] = [bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y)] [bfs#2(::(@t, @ts), @x)] = [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @t + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [0 1 0 0] [0 0 0 0] [0] [1 0 1 0] [1 1 0 0] [1 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @t + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 0 1 0] [0 1 0 0] [0 0 0 0] [0] [1 0 1 0] [1 1 0 0] [1 0 0 0] [1] = [bfs(reverse(::(@t, @ts)), nil(), @x)] [bfs#2(nil(), @x)] = [0 0 0 0] [0] [0 0 0 0] @x + [0] [0 0 0 0] [0] [1 0 0 0] [1] >= [0] [0] [0] [1] = [leaf()] [reverse(@xs)] = [1 0 0 0] [0] [0 1 0 0] @xs + [0] [1 0 1 0] [0] [0 0 0 1] [0] >= [1 0 0 0] [0] [0 1 0 0] @xs + [0] [1 0 1 0] [0] [0 0 0 1] [0] = [appendreverse(@xs, nil())] [bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0 0 0 0] [0 0 1 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [1 0 0 0] [0 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [0] [1 1 0 0] @futurequeue + [1 0 1 0] @t1 + [1 0 1 0] @t2 + [1 1 0 0] @ts + [0 0 0 0] @x + [0] [0 1 0 0] [0 0 1 0] [0 0 1 0] [0 1 0 0] [0 0 0 0] [0] [1 1 0 0] [1 0 1 0] [1 0 1 0] [1 1 0 0] [1 0 0 0] [1] = [bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x)] [bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y)] = [1 0 0 0] [1 0 0 0] [1 0 0 0] [1 0 0 0] [0 0 0 0] [1 0 0 0] [0] [1 1 0 0] @futurequeue + [1 1 1 1] @t1 + [1 1 1 1] @t2 + [1 1 0 0] @ts + [0 0 0 0] @x + [1 0 0 0] @y + [0] [0 1 0 0] [0 1 1 1] [0 1 1 1] [0 1 0 0] [0 0 0 0] [0 0 1 0] [0] [1 1 0 0] [1 1 1 1] [1 1 1 1] [1 1 0 0] [1 0 0 0] [0 0 0 0] [1] >= [1 0 0 0] [1 0 0 0] [1 0 0 0] [0] [1 1 1 0] @t1 + [0 1 1 0] @t2 + [1 0 0 0] @y + [0] [0 1 1 1] [0 1 1 1] [0 0 1 0] [0] [1 0 0 1] [1 0 0 1] [0 0 0 0] [1] = [node(@y, @t1, @t2)] [bfs2(@t, @x)] = [1 0 0 0] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] > [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @t + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] = [bfs2#1(dobfs(@t, @x), @x)] [dobfs(@t, @x)] = [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @t + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] >= [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @t + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] = [bfs(::(@t, nil()), nil(), @x)] [bfs2#1(@t', @x)] = [1 0 0 0] [1 0 0 0] [0] [1 0 1 0] @t' + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] >= [1 0 0 0] [0 0 0 0] [0] [1 0 1 0] @t' + [0 0 0 0] @x + [0] [0 0 1 0] [0 0 0 0] [0] [1 0 1 0] [1 0 0 0] [1] = [dobfs(@t', @x)] [dfs(@queue, @x)] = [0 0 0 1] [1] [0 0 1 0] @queue + [0] [1 0 1 0] [0] [0 1 0 1] [1] > [0 0 0 1] [0] [0 0 1 0] @queue + [0] [1 0 1 0] [0] [0 1 0 1] [1] = [dfs#1(@queue, @x)] [dfs#1(::(@t, @ts), @x)] = [1 0 0 1] [0 0 0 1] [0] [0 1 1 0] @t + [0 0 1 0] @ts + [0] [1 1 1 0] [1 0 1 0] [0] [1 0 1 1] [0 1 0 1] [1] >= [1 0 0 1] [0 0 0 1] [0] [0 1 1 0] @t + [0 0 1 0] @ts + [0] [1 1 1 0] [1 0 1 0] [0] [1 0 1 1] [0 1 0 1] [1] = [dfs#2(@t, @t, @ts, @x)] [dfs#1(nil(), @x)] = [0] [0] [0] [1] >= [0] [0] [0] [1] = [leaf()] [dfs#2(leaf(), @t, @ts, @x)] = [1 0 0 0] [0 0 0 1] [1] [0 1 0 0] @t + [0 0 1 0] @ts + [0] [0 0 1 0] [1 0 1 0] [0] [0 0 0 1] [0 1 0 1] [1] >= [0 0 0 1] [1] [0 0 1 0] @ts + [0] [1 0 1 0] [0] [0 1 0 1] [1] = [dfs(@ts, @x)] [dfs#2(node(@a, @t1, @t2), @t, @ts, @x)] = [0 0 0 0] [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 0 1 0] @a + [0 1 0 0] @t + [0 1 1 1] @t1 + [0 1 1 1] @t2 + [0 0 1 0] @ts + [0] [2 0 0 0] [0 0 1 0] [2 1 1 0] [1 1 1 0] [1 0 1 0] [0] [1 0 1 0] [0 0 0 1] [1 1 1 1] [1 1 1 1] [0 1 0 1] [1] >= [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [0 1 1 0] @t1 + [0 1 1 0] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [1 0 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [1] = [dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x)] [dfs#3(#false(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [0 1 1 0] @t1 + [0 1 1 0] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [1 0 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [1] >= [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 1 0] @t1 + [0 1 1 0] @t2 + [0 0 1 0] @ts + [0] [1 1 1 0] [1 1 1 0] [1 0 1 0] [0] [1 0 1 1] [1 0 1 1] [0 1 0 1] [1] = [dfs(::(@t1, ::(@t2, @ts)), @x)] [dfs#3(#true(), @t, @t1, @t2, @ts, @x)] = [1 0 0 0] [1 0 0 1] [1 0 0 1] [0 0 0 1] [1] [0 1 0 0] @t + [0 1 1 0] @t1 + [0 1 1 0] @t2 + [0 0 1 0] @ts + [0] [0 0 1 0] [1 1 1 0] [1 1 1 0] [1 0 1 0] [0] [0 0 0 1] [1 0 1 1] [1 0 1 1] [0 1 0 1] [1] > [1 0 0 0] [0] [0 1 0 0] @t + [0] [0 0 1 0] [0] [0 0 0 1] [0] = [@t] [dodfs(@t, @x)] = [1 0 0 1] [1 0 0 0] [1] [1 1 1 1] @t + [1 1 1 1] @x + [1] [1 1 1 1] [1 1 1 1] [1] [1 1 1 1] [1 1 1 1] [1] >= [1 0 0 1] [1] [0 1 1 0] @t + [0] [1 1 1 0] [0] [1 0 1 1] [1] = [dfs(::(@t, nil()), @x)] [#and(#false(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#false(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #false())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#false()] [#and(#true(), #true())] = [0] [0] [0] [0] >= [0] [0] [0] [0] = [#true()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , appendreverse(@toreverse, @sofar) -> appendreverse#1(@toreverse, @sofar) , appendreverse#1(::(@a, @as), @sofar) -> appendreverse(@as, ::(@a, @sofar)) , appendreverse#1(nil(), @sofar) -> @sofar , bfs(@queue, @futurequeue, @x) -> bfs#1(@queue, @futurequeue, @x) , bfs#1(::(@t, @ts), @futurequeue, @x) -> bfs#3(@t, @futurequeue, @ts, @x) , bfs#1(nil(), @futurequeue, @x) -> bfs#2(@futurequeue, @x) , bfs#3(leaf(), @futurequeue, @ts, @x) -> bfs(@ts, @futurequeue, @x) , bfs#3(node(@y, @t1, @t2), @futurequeue, @ts, @x) -> bfs#4(#equal(@x, @y), @futurequeue, @t1, @t2, @ts, @x, @y) , bfs#2(::(@t, @ts), @x) -> bfs(reverse(::(@t, @ts)), nil(), @x) , bfs#2(nil(), @x) -> leaf() , reverse(@xs) -> appendreverse(@xs, nil()) , bfs#4(#true(), @futurequeue, @t1, @t2, @ts, @x, @y) -> node(@y, @t1, @t2) , dobfs(@t, @x) -> bfs(::(@t, nil()), nil(), @x) } 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(::(@x_1, @x_2), leaf()) -> #false() , #eq(::(@x_1, @x_2), node(@y_1, @y_2, @y_3)) -> #false() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), leaf()) -> #false() , #eq(nil(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(leaf(), ::(@y_1, @y_2)) -> #false() , #eq(leaf(), nil()) -> #false() , #eq(leaf(), leaf()) -> #true() , #eq(leaf(), node(@y_1, @y_2, @y_3)) -> #false() , #eq(node(@x_1, @x_2, @x_3), ::(@y_1, @y_2)) -> #false() , #eq(node(@x_1, @x_2, @x_3), nil()) -> #false() , #eq(node(@x_1, @x_2, @x_3), leaf()) -> #false() , #eq(node(@x_1, @x_2, @x_3), node(@y_1, @y_2, @y_3)) -> #and(#eq(@x_1, @y_1), #and(#eq(@x_2, @y_2), #eq(@x_3, @y_3))) , #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) , bfs#4(#false(), @futurequeue, @t1, @t2, @ts, @x, @y) -> bfs(@ts, ::(@t2, ::(@t1, @futurequeue)), @x) , bfs2(@t, @x) -> bfs2#1(dobfs(@t, @x), @x) , bfs2#1(@t', @x) -> dobfs(@t', @x) , dfs(@queue, @x) -> dfs#1(@queue, @x) , dfs#1(::(@t, @ts), @x) -> dfs#2(@t, @t, @ts, @x) , dfs#1(nil(), @x) -> leaf() , dfs#2(leaf(), @t, @ts, @x) -> dfs(@ts, @x) , dfs#2(node(@a, @t1, @t2), @t, @ts, @x) -> dfs#3(#equal(@a, @x), @t, @t1, @t2, @ts, @x) , dfs#3(#false(), @t, @t1, @t2, @ts, @x) -> dfs(::(@t1, ::(@t2, @ts)), @x) , dfs#3(#true(), @t, @t1, @t2, @ts, @x) -> @t , dodfs(@t, @x) -> dfs(::(@t, nil()), @x) , #and(#false(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#true(), #false()) -> #false() , #and(#true(), #true()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE None of the processors succeeded. Details of failed attempt(s): ----------------------------- 1) 'empty' failed due to the following reason: Empty strict component of the problem is NOT empty. 2) 'Fastest' failed due to the following reason: None of the processors succeeded. Details of failed attempt(s): ----------------------------- 1) 'trivial' failed due to the following reason: None of the processors succeeded. Details of failed attempt(s): ----------------------------- 1) 'empty' failed due to the following reason: Empty strict component of the problem is NOT empty. 2) 'Sequentially' failed due to the following reason: None of the processors succeeded. Details of failed attempt(s): ----------------------------- 1) 'Polynomial Path Order (PS)' failed due to the following reason: The input cannot be shown compatible 2) 'Polynomial Path Order' failed due to the following reason: The input cannot be shown compatible 2) 'Fastest (timeout of 5 seconds)' failed due to the following reason: None of the processors succeeded. Details of failed attempt(s): ----------------------------- 1) 'Bounds with perSymbol-enrichment and initial automaton 'match'' failed due to the following reason: match-boundness of the problem could not be verified. 2) 'Bounds with minimal-enrichment and initial automaton 'match'' failed due to the following reason: match-boundness of the problem could not be verified. Arrrr..