MAYBE We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [0] [nil] = [0] [flatten](x1) = [2] x1 + [0] [flatten#1](x1) = [2] x1 + [0] [leaf] = [0] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [1] [insertionsort](x1) = [1] x1 + [0] [insert](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [0] >= [1] @l2 + [1] @xs + [0] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [@l2] [flatten(@t)] = [2] @t + [0] >= [2] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] >= [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2] @l + [2] @t1 + [2] @t2 + [4] > [1] @l + [2] @t1 + [2] @t2 + [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [1] > [2] @t + [0] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [0] >= [1] @ys + [0] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [0] >= [0] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1] @xs + [0] >= [1] @xs + [0] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [0] >= [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { flatten#1(leaf()) -> nil() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [0] [nil] = [0] [flatten](x1) = [2] x1 + [0] [flatten#1](x1) = [2] x1 + [0] [leaf] = [2] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [1] [insertionsort](x1) = [1] x1 + [0] [insert](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [0] >= [1] @l2 + [1] @xs + [0] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [@l2] [flatten(@t)] = [2] @t + [0] >= [2] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [4] > [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2] @l + [2] @t1 + [2] @t2 + [4] > [1] @l + [2] @t1 + [2] @t2 + [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [1] > [2] @t + [0] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [0] >= [1] @ys + [0] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [0] >= [0] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1] @xs + [0] >= [1] @xs + [0] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [0] >= [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { insertionsort#1(nil()) -> nil() } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [0] [nil] = [0] [flatten](x1) = [2] x1 + [0] [flatten#1](x1) = [2] x1 + [0] [leaf] = [0] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [2] [insertionsort](x1) = [1] x1 + [2] [insert](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [1] x1 + [2] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [0] >= [1] @l2 + [1] @xs + [0] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [@l2] [flatten(@t)] = [2] @t + [0] >= [2] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] >= [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2] @l + [2] @t1 + [2] @t2 + [4] > [1] @l + [2] @t1 + [2] @t2 + [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [2] >= [2] @t + [2] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1] @l + [2] >= [1] @l + [2] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [0] >= [1] @ys + [0] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [0] >= [0] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1] @xs + [2] >= [1] @xs + [2] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [2] > [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { append#1(nil(), @l2) -> @l2 } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [0] [nil] = [1] [flatten](x1) = [2] x1 + [0] [flatten#1](x1) = [2] x1 + [0] [leaf] = [2] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [1] [insertionsort](x1) = [1] x1 + [0] [insert](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [0] >= [1] @l2 + [1] @xs + [0] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [1] > [1] @l2 + [0] = [@l2] [flatten(@t)] = [2] @t + [0] >= [2] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [4] > [1] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2] @l + [2] @t1 + [2] @t2 + [4] > [1] @l + [2] @t1 + [2] @t2 + [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [1] > [2] @t + [0] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [0] >= [1] @ys + [0] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] >= [1] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1] @xs + [0] >= [1] @xs + [0] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [1] >= [1] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , flatten(@t) -> flatten#1(@t) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append#1(nil(), @l2) -> @l2 , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { flatten(@t) -> flatten#1(@t) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [0] [nil] = [0] [flatten](x1) = [2] x1 + [2] [flatten#1](x1) = [2] x1 + [0] [leaf] = [0] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [2] [insertionsort](x1) = [1] x1 + [0] [insert](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [1] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [0] >= [1] @l2 + [1] @xs + [0] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [0] >= [1] @l2 + [0] = [@l2] [flatten(@t)] = [2] @t + [2] > [2] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] >= [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2] @l + [2] @t1 + [2] @t2 + [4] >= [1] @l + [2] @t1 + [2] @t2 + [4] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [2] >= [2] @t + [2] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1] @l + [0] >= [1] @l + [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [0] >= [1] @l + [0] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [0] >= [1] @ys + [0] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [0] >= [0] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [0] >= [1] @ys + [0] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1] @xs + [0] >= [1] @xs + [0] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [0] >= [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [0] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [0] [append](x1, x2) = [1] x1 + [1] x2 + [1] [append#1](x1, x2) = [1] x1 + [1] x2 + [1] [::](x1, x2) = [1] x2 + [1] [nil] = [0] [flatten](x1) = [1] x1 + [0] [flatten#1](x1) = [1] x1 + [0] [leaf] = [0] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [1] [insertionsort](x1) = [2] x1 + [0] [insert](x1, x2) = [1] x2 + [1] [insert#1](x1, x2) = [1] x1 + [1] [insert#2](x1, x2, x3, x4) = [1] x1 + [1] x4 + [2] [#false] = [0] [#true] = [0] [insertionsort#1](x1) = [2] x1 + [0] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [0] >= [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [0] >= [0] = [#false()] [#cklt(#GT())] = [0] >= [0] = [#false()] [#cklt(#LT())] = [0] >= [0] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [1] >= [1] @l1 + [1] @l2 + [1] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [2] >= [1] @l2 + [1] @xs + [2] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [1] > [1] @l2 + [0] = [@l2] [flatten(@t)] = [1] @t + [0] >= [1] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] >= [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [1] @l + [1] @t1 + [1] @t2 + [2] >= [1] @l + [1] @t1 + [1] @t2 + [2] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [1] > [2] @t + [0] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [2] @l + [0] >= [2] @l + [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [1] >= [1] @l + [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [2] >= [1] @ys + [2] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [1] >= [1] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [2] >= [1] @ys + [2] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [2] @xs + [2] > [2] @xs + [1] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [0] >= [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , insertionsort(@l) -> insertionsort#1(@l) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { insertionsort(@l) -> insertionsort#1(@l) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [2] [#compare](x1, x2) = [0] [#cklt](x1) = [2] x1 + [2] [append](x1, x2) = [1] x1 + [1] x2 + [0] [append#1](x1, x2) = [1] x1 + [1] x2 + [0] [::](x1, x2) = [1] x2 + [2] [nil] = [2] [flatten](x1) = [1] x1 + [0] [flatten#1](x1) = [1] x1 + [0] [leaf] = [2] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [0] [flattensort](x1) = [2] x1 + [2] [insertionsort](x1) = [2] x1 + [2] [insert](x1, x2) = [1] x2 + [2] [insert#1](x1, x2) = [1] x1 + [2] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [0] [#false] = [2] [#true] = [2] [insertionsort#1](x1) = [2] x1 + [1] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [2] >= [2] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [2] >= [2] = [#false()] [#cklt(#GT())] = [2] >= [2] = [#false()] [#cklt(#LT())] = [2] >= [2] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [0] >= [1] @l1 + [1] @l2 + [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [2] >= [1] @l2 + [1] @xs + [2] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [2] > [1] @l2 + [0] = [@l2] [flatten(@t)] = [1] @t + [0] >= [1] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [2] >= [2] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [1] @l + [1] @t1 + [1] @t2 + [0] >= [1] @l + [1] @t1 + [1] @t2 + [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [2] >= [2] @t + [2] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [2] @l + [2] > [2] @l + [1] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [2] >= [1] @l + [2] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [4] >= [1] @ys + [4] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [4] >= [4] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [4] >= [1] @ys + [4] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [4] >= [1] @ys + [4] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [2] @xs + [5] > [2] @xs + [4] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [5] > [2] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort(@l) -> insertionsort#1(@l) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. Trs: { insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^1)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [1] [#compare](x1, x2) = [0] [#cklt](x1) = [1] x1 + [1] [append](x1, x2) = [1] x1 + [1] x2 + [1] [append#1](x1, x2) = [1] x1 + [1] x2 + [1] [::](x1, x2) = [1] x2 + [1] [nil] = [0] [flatten](x1) = [1] x1 + [0] [flatten#1](x1) = [1] x1 + [0] [leaf] = [0] [node](x1, x2, x3) = [1] x1 + [1] x2 + [1] x3 + [2] [flattensort](x1) = [2] x1 + [2] [insertionsort](x1) = [2] x1 + [2] [insert](x1, x2) = [1] x2 + [2] [insert#1](x1, x2) = [1] x1 + [2] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x4 + [1] [#false] = [1] [#true] = [1] [insertionsort#1](x1) = [2] x1 + [2] [#EQ] = [0] [#GT] = [0] [#LT] = [0] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#pos](x1) = [1] x1 + [0] [#s](x1) = [1] x1 + [0] This order satisfies following ordering constraints [#less(@x, @y)] = [1] >= [1] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [#cklt(#EQ())] = [1] >= [1] = [#false()] [#cklt(#GT())] = [1] >= [1] = [#false()] [#cklt(#LT())] = [1] >= [1] = [#true()] [append(@l1, @l2)] = [1] @l1 + [1] @l2 + [1] >= [1] @l1 + [1] @l2 + [1] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1] @l2 + [1] @xs + [2] >= [1] @l2 + [1] @xs + [2] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1] @l2 + [1] > [1] @l2 + [0] = [@l2] [flatten(@t)] = [1] @t + [0] >= [1] @t + [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] >= [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [1] @l + [1] @t1 + [1] @t2 + [2] >= [1] @l + [1] @t1 + [1] @t2 + [2] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2] @t + [2] >= [2] @t + [2] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [2] @l + [2] >= [2] @l + [2] = [insertionsort#1(@l)] [insert(@x, @l)] = [1] @l + [2] >= [1] @l + [2] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1] @ys + [3] >= [1] @ys + [3] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [2] > [1] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [3] > [1] @ys + [2] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [3] >= [1] @ys + [3] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [2] @xs + [4] >= [2] @xs + [4] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [2] > [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort(@l) -> insertionsort#1(@l) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } Obligation: innermost runtime complexity Answer: MAYBE We use the processor 'matrix interpretation of dimension 2' to orient following rules strictly. Trs: { append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) } The induced complexity on above rules (modulo remaining rules) is YES(?,O(n^2)) . These rules are moved into the corresponding weak component(s). Sub-proof: ---------- The following argument positions are usable: Uargs(#cklt) = {1}, Uargs(append) = {1, 2}, Uargs(::) = {2}, Uargs(insertionsort) = {1}, Uargs(insert) = {2}, Uargs(insert#2) = {1} TcT has computed following constructor-based matrix interpretation satisfying not(EDA). [#less](x1, x2) = [2] [0] [#compare](x1, x2) = [2] [2] [#cklt](x1) = [1 0] x1 + [0] [0 0] [0] [append](x1, x2) = [1 2] x1 + [1 0] x2 + [1] [0 1] [0 1] [0] [append#1](x1, x2) = [1 2] x1 + [1 0] x2 + [0] [0 1] [0 1] [0] [::](x1, x2) = [1 0] x1 + [1 0] x2 + [1] [0 0] [0 1] [1] [nil] = [0] [0] [flatten](x1) = [2 2] x1 + [0] [0 2] [0] [flatten#1](x1) = [2 2] x1 + [0] [0 2] [0] [leaf] = [0] [0] [node](x1, x2, x3) = [1 1] x1 + [1 2] x2 + [1 0] x3 + [1] [0 1] [0 1] [0 1] [0] [flattensort](x1) = [2 2] x1 + [2] [2 2] [2] [insertionsort](x1) = [1 0] x1 + [2] [1 0] [0] [insert](x1, x2) = [1 0] x1 + [1 0] x2 + [1] [0 0] [0 1] [1] [insert#1](x1, x2) = [1 0] x1 + [1 0] x2 + [1] [0 1] [0 0] [1] [insert#2](x1, x2, x3, x4) = [1 1] x1 + [1 0] x2 + [1 0] x3 + [1 0] x4 + [0] [0 0] [0 0] [0 0] [0 1] [2] [#false] = [2] [0] [#true] = [2] [0] [insertionsort#1](x1) = [1 0] x1 + [2] [1 0] [0] [#EQ] = [2] [0] [#GT] = [2] [0] [#LT] = [2] [1] [#0] = [2] [2] [#neg](x1) = [1 0] x1 + [1] [0 0] [1] [#pos](x1) = [1 0] x1 + [1] [0 1] [0] [#s](x1) = [1 0] x1 + [0] [0 1] [0] This order satisfies following ordering constraints [#less(@x, @y)] = [2] [0] >= [2] [0] = [#cklt(#compare(@x, @y))] [#compare(#0(), #0())] = [2] [2] >= [2] [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [2] [2] >= [2] [0] = [#GT()] [#compare(#0(), #pos(@y))] = [2] [2] >= [2] [1] = [#LT()] [#compare(#0(), #s(@y))] = [2] [2] >= [2] [1] = [#LT()] [#compare(#neg(@x), #0())] = [2] [2] >= [2] [1] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [2] [2] >= [2] [2] = [#compare(@y, @x)] [#compare(#neg(@x), #pos(@y))] = [2] [2] >= [2] [1] = [#LT()] [#compare(#pos(@x), #0())] = [2] [2] >= [2] [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [2] [2] >= [2] [0] = [#GT()] [#compare(#pos(@x), #pos(@y))] = [2] [2] >= [2] [2] = [#compare(@x, @y)] [#compare(#s(@x), #0())] = [2] [2] >= [2] [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [2] [2] >= [2] [2] = [#compare(@x, @y)] [#cklt(#EQ())] = [2] [0] >= [2] [0] = [#false()] [#cklt(#GT())] = [2] [0] >= [2] [0] = [#false()] [#cklt(#LT())] = [2] [0] >= [2] [0] = [#true()] [append(@l1, @l2)] = [1 2] @l1 + [1 0] @l2 + [1] [0 1] [0 1] [0] > [1 2] @l1 + [1 0] @l2 + [0] [0 1] [0 1] [0] = [append#1(@l1, @l2)] [append#1(::(@x, @xs), @l2)] = [1 0] @l2 + [1 0] @x + [1 2] @xs + [3] [0 1] [0 0] [0 1] [1] > [1 0] @l2 + [1 0] @x + [1 2] @xs + [2] [0 1] [0 0] [0 1] [1] = [::(@x, append(@xs, @l2))] [append#1(nil(), @l2)] = [1 0] @l2 + [0] [0 1] [0] >= [1 0] @l2 + [0] [0 1] [0] = [@l2] [flatten(@t)] = [2 2] @t + [0] [0 2] [0] >= [2 2] @t + [0] [0 2] [0] = [flatten#1(@t)] [flatten#1(leaf())] = [0] [0] >= [0] [0] = [nil()] [flatten#1(node(@l, @t1, @t2))] = [2 4] @l + [2 6] @t1 + [2 2] @t2 + [2] [0 2] [0 2] [0 2] [0] >= [1 2] @l + [2 6] @t1 + [2 2] @t2 + [2] [0 1] [0 2] [0 2] [0] = [append(@l, append(flatten(@t1), flatten(@t2)))] [flattensort(@t)] = [2 2] @t + [2] [2 2] [2] >= [2 2] @t + [2] [2 2] [0] = [insertionsort(flatten(@t))] [insertionsort(@l)] = [1 0] @l + [2] [1 0] [0] >= [1 0] @l + [2] [1 0] [0] = [insertionsort#1(@l)] [insert(@x, @l)] = [1 0] @l + [1 0] @x + [1] [0 1] [0 0] [1] >= [1 0] @l + [1 0] @x + [1] [0 1] [0 0] [1] = [insert#1(@l, @x)] [insert#1(::(@y, @ys), @x)] = [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] >= [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] = [insert#2(#less(@y, @x), @x, @y, @ys)] [insert#1(nil(), @x)] = [1 0] @x + [1] [0 0] [1] >= [1 0] @x + [1] [0 0] [1] = [::(@x, nil())] [insert#2(#false(), @x, @y, @ys)] = [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] >= [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] = [::(@x, ::(@y, @ys))] [insert#2(#true(), @x, @y, @ys)] = [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] >= [1 0] @x + [1 0] @y + [1 0] @ys + [2] [0 0] [0 0] [0 1] [2] = [::(@y, insert(@x, @ys))] [insertionsort#1(::(@x, @xs))] = [1 0] @x + [1 0] @xs + [3] [1 0] [1 0] [1] >= [1 0] @x + [1 0] @xs + [3] [0 0] [1 0] [1] = [insert(@x, insertionsort(@xs))] [insertionsort#1(nil())] = [2] [0] > [0] [0] = [nil()] We return to the main proof. We are left with following problem, upon which TcT provides the certificate MAYBE. Strict Trs: { #less(@x, @y) -> #cklt(#compare(@x, @y)) , insert(@x, @l) -> insert#1(@l, @x) , insert#1(::(@y, @ys), @x) -> insert#2(#less(@y, @x), @x, @y, @ys) , insert#2(#true(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) } Weak Trs: { #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#GT()) -> #false() , #cklt(#LT()) -> #true() , append(@l1, @l2) -> append#1(@l1, @l2) , append#1(::(@x, @xs), @l2) -> ::(@x, append(@xs, @l2)) , append#1(nil(), @l2) -> @l2 , flatten(@t) -> flatten#1(@t) , flatten#1(leaf()) -> nil() , flatten#1(node(@l, @t1, @t2)) -> append(@l, append(flatten(@t1), flatten(@t2))) , flattensort(@t) -> insertionsort(flatten(@t)) , insertionsort(@l) -> insertionsort#1(@l) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#2(#false(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insertionsort#1(::(@x, @xs)) -> insert(@x, insertionsort(@xs)) , insertionsort#1(nil()) -> nil() } 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 minimal-enrichment and initial automaton 'match'' failed due to the following reason: match-boundness of the problem could not be verified. 2) 'Bounds with perSymbol-enrichment and initial automaton 'match'' failed due to the following reason: match-boundness of the problem could not be verified. Arrrr..