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