YES(O(1),O(n^2)) We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict Trs: { #equal(@x, @y) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Weak Trs: { #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We add the following dependency tuples: Strict DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , leq#2^#(nil(), @x, @xs) -> c_2() , leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , or^#(@x, @y) -> c_4(#or^#(@x, @y)) , #less^#(@x, @y) -> c_17(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_5(#and^#(@x, @y)) , leq^#(@l1, @l2) -> c_12(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(nil()) -> c_13() , isortlist#1^#(::(@x, @xs)) -> c_14(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#1^#(nil(), @l2) -> c_7() , leq#1^#(::(@x, @xs), @l2) -> c_8(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_9(insert#1^#(@l, @x)) , insert#1^#(nil(), @x) -> c_15() , insert#1^#(::(@y, @ys), @x) -> c_16(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#true(), @x, @y, @ys) -> c_10() , insert#2^#(#false(), @x, @y, @ys) -> c_11(insert^#(@x, @ys)) } Weak DPs: { #eq^#(#pos(@x), #pos(@y)) -> c_18(#eq^#(@x, @y)) , #eq^#(#pos(@x), #0()) -> c_19() , #eq^#(#pos(@x), #neg(@y)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_22() , #eq^#(::(@x_1, @x_2), nil()) -> c_23() , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_24(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(#0(), #pos(@y)) -> c_25() , #eq^#(#0(), #0()) -> c_26() , #eq^#(#0(), #neg(@y)) -> c_27() , #eq^#(#0(), #s(@y)) -> c_28() , #eq^#(#neg(@x), #pos(@y)) -> c_29() , #eq^#(#neg(@x), #0()) -> c_30() , #eq^#(#neg(@x), #neg(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #or^#(#true(), #true()) -> c_53() , #or^#(#true(), #false()) -> c_54() , #or^#(#false(), #true()) -> c_55() , #or^#(#false(), #false()) -> c_56() , #and^#(#true(), #true()) -> c_37() , #and^#(#true(), #false()) -> c_38() , #and^#(#false(), #true()) -> c_39() , #and^#(#false(), #false()) -> c_40() , #cklt^#(#EQ()) -> c_34() , #cklt^#(#LT()) -> c_35() , #cklt^#(#GT()) -> c_36() , #compare^#(#pos(@x), #pos(@y)) -> c_41(#compare^#(@x, @y)) , #compare^#(#pos(@x), #0()) -> c_42() , #compare^#(#pos(@x), #neg(@y)) -> c_43() , #compare^#(#0(), #pos(@y)) -> c_44() , #compare^#(#0(), #0()) -> c_45() , #compare^#(#0(), #neg(@y)) -> c_46() , #compare^#(#0(), #s(@y)) -> c_47() , #compare^#(#neg(@x), #pos(@y)) -> c_48() , #compare^#(#neg(@x), #0()) -> c_49() , #compare^#(#neg(@x), #neg(@y)) -> c_50(#compare^#(@y, @x)) , #compare^#(#s(@x), #0()) -> c_51() , #compare^#(#s(@x), #s(@y)) -> c_52(#compare^#(@x, @y)) } and mark the set of starting terms. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , leq#2^#(nil(), @x, @xs) -> c_2() , leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , or^#(@x, @y) -> c_4(#or^#(@x, @y)) , #less^#(@x, @y) -> c_17(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_5(#and^#(@x, @y)) , leq^#(@l1, @l2) -> c_12(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(nil()) -> c_13() , isortlist#1^#(::(@x, @xs)) -> c_14(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#1^#(nil(), @l2) -> c_7() , leq#1^#(::(@x, @xs), @l2) -> c_8(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_9(insert#1^#(@l, @x)) , insert#1^#(nil(), @x) -> c_15() , insert#1^#(::(@y, @ys), @x) -> c_16(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#true(), @x, @y, @ys) -> c_10() , insert#2^#(#false(), @x, @y, @ys) -> c_11(insert^#(@x, @ys)) } Weak DPs: { #eq^#(#pos(@x), #pos(@y)) -> c_18(#eq^#(@x, @y)) , #eq^#(#pos(@x), #0()) -> c_19() , #eq^#(#pos(@x), #neg(@y)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_22() , #eq^#(::(@x_1, @x_2), nil()) -> c_23() , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_24(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(#0(), #pos(@y)) -> c_25() , #eq^#(#0(), #0()) -> c_26() , #eq^#(#0(), #neg(@y)) -> c_27() , #eq^#(#0(), #s(@y)) -> c_28() , #eq^#(#neg(@x), #pos(@y)) -> c_29() , #eq^#(#neg(@x), #0()) -> c_30() , #eq^#(#neg(@x), #neg(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , #or^#(#true(), #true()) -> c_53() , #or^#(#true(), #false()) -> c_54() , #or^#(#false(), #true()) -> c_55() , #or^#(#false(), #false()) -> c_56() , #and^#(#true(), #true()) -> c_37() , #and^#(#true(), #false()) -> c_38() , #and^#(#false(), #true()) -> c_39() , #and^#(#false(), #false()) -> c_40() , #cklt^#(#EQ()) -> c_34() , #cklt^#(#LT()) -> c_35() , #cklt^#(#GT()) -> c_36() , #compare^#(#pos(@x), #pos(@y)) -> c_41(#compare^#(@x, @y)) , #compare^#(#pos(@x), #0()) -> c_42() , #compare^#(#pos(@x), #neg(@y)) -> c_43() , #compare^#(#0(), #pos(@y)) -> c_44() , #compare^#(#0(), #0()) -> c_45() , #compare^#(#0(), #neg(@y)) -> c_46() , #compare^#(#0(), #s(@y)) -> c_47() , #compare^#(#neg(@x), #pos(@y)) -> c_48() , #compare^#(#neg(@x), #0()) -> c_49() , #compare^#(#neg(@x), #neg(@y)) -> c_50(#compare^#(@y, @x)) , #compare^#(#s(@x), #0()) -> c_51() , #compare^#(#s(@x), #s(@y)) -> c_52(#compare^#(@x, @y)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We estimate the number of application of {1,2,4,5,6,9,11,14,16} by applications of Pre({1,2,4,5,6,9,11,14,16}) = {3,7,8,12,13,15}. Here rules are labeled as follows: DPs: { 1: #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , 2: leq#2^#(nil(), @x, @xs) -> c_2() , 3: leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , 4: or^#(@x, @y) -> c_4(#or^#(@x, @y)) , 5: #less^#(@x, @y) -> c_17(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , 6: and^#(@x, @y) -> c_5(#and^#(@x, @y)) , 7: leq^#(@l1, @l2) -> c_12(leq#1^#(@l1, @l2)) , 8: isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , 9: isortlist#1^#(nil()) -> c_13() , 10: isortlist#1^#(::(@x, @xs)) -> c_14(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , 11: leq#1^#(nil(), @l2) -> c_7() , 12: leq#1^#(::(@x, @xs), @l2) -> c_8(leq#2^#(@l2, @x, @xs)) , 13: insert^#(@x, @l) -> c_9(insert#1^#(@l, @x)) , 14: insert#1^#(nil(), @x) -> c_15() , 15: insert#1^#(::(@y, @ys), @x) -> c_16(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 16: insert#2^#(#true(), @x, @y, @ys) -> c_10() , 17: insert#2^#(#false(), @x, @y, @ys) -> c_11(insert^#(@x, @ys)) , 18: #eq^#(#pos(@x), #pos(@y)) -> c_18(#eq^#(@x, @y)) , 19: #eq^#(#pos(@x), #0()) -> c_19() , 20: #eq^#(#pos(@x), #neg(@y)) -> c_20() , 21: #eq^#(nil(), nil()) -> c_21() , 22: #eq^#(nil(), ::(@y_1, @y_2)) -> c_22() , 23: #eq^#(::(@x_1, @x_2), nil()) -> c_23() , 24: #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_24(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , 25: #eq^#(#0(), #pos(@y)) -> c_25() , 26: #eq^#(#0(), #0()) -> c_26() , 27: #eq^#(#0(), #neg(@y)) -> c_27() , 28: #eq^#(#0(), #s(@y)) -> c_28() , 29: #eq^#(#neg(@x), #pos(@y)) -> c_29() , 30: #eq^#(#neg(@x), #0()) -> c_30() , 31: #eq^#(#neg(@x), #neg(@y)) -> c_31(#eq^#(@x, @y)) , 32: #eq^#(#s(@x), #0()) -> c_32() , 33: #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , 34: #or^#(#true(), #true()) -> c_53() , 35: #or^#(#true(), #false()) -> c_54() , 36: #or^#(#false(), #true()) -> c_55() , 37: #or^#(#false(), #false()) -> c_56() , 38: #and^#(#true(), #true()) -> c_37() , 39: #and^#(#true(), #false()) -> c_38() , 40: #and^#(#false(), #true()) -> c_39() , 41: #and^#(#false(), #false()) -> c_40() , 42: #cklt^#(#EQ()) -> c_34() , 43: #cklt^#(#LT()) -> c_35() , 44: #cklt^#(#GT()) -> c_36() , 45: #compare^#(#pos(@x), #pos(@y)) -> c_41(#compare^#(@x, @y)) , 46: #compare^#(#pos(@x), #0()) -> c_42() , 47: #compare^#(#pos(@x), #neg(@y)) -> c_43() , 48: #compare^#(#0(), #pos(@y)) -> c_44() , 49: #compare^#(#0(), #0()) -> c_45() , 50: #compare^#(#0(), #neg(@y)) -> c_46() , 51: #compare^#(#0(), #s(@y)) -> c_47() , 52: #compare^#(#neg(@x), #pos(@y)) -> c_48() , 53: #compare^#(#neg(@x), #0()) -> c_49() , 54: #compare^#(#neg(@x), #neg(@y)) -> c_50(#compare^#(@y, @x)) , 55: #compare^#(#s(@x), #0()) -> c_51() , 56: #compare^#(#s(@x), #s(@y)) -> c_52(#compare^#(@x, @y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_12(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_14(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#1^#(::(@x, @xs), @l2) -> c_8(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_9(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_16(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_11(insert^#(@x, @ys)) } Weak DPs: { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #eq^#(#pos(@x), #pos(@y)) -> c_18(#eq^#(@x, @y)) , #eq^#(#pos(@x), #0()) -> c_19() , #eq^#(#pos(@x), #neg(@y)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_22() , #eq^#(::(@x_1, @x_2), nil()) -> c_23() , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_24(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(#0(), #pos(@y)) -> c_25() , #eq^#(#0(), #0()) -> c_26() , #eq^#(#0(), #neg(@y)) -> c_27() , #eq^#(#0(), #s(@y)) -> c_28() , #eq^#(#neg(@x), #pos(@y)) -> c_29() , #eq^#(#neg(@x), #0()) -> c_30() , #eq^#(#neg(@x), #neg(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , leq#2^#(nil(), @x, @xs) -> c_2() , or^#(@x, @y) -> c_4(#or^#(@x, @y)) , #less^#(@x, @y) -> c_17(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_5(#and^#(@x, @y)) , #or^#(#true(), #true()) -> c_53() , #or^#(#true(), #false()) -> c_54() , #or^#(#false(), #true()) -> c_55() , #or^#(#false(), #false()) -> c_56() , #and^#(#true(), #true()) -> c_37() , #and^#(#true(), #false()) -> c_38() , #and^#(#false(), #true()) -> c_39() , #and^#(#false(), #false()) -> c_40() , isortlist#1^#(nil()) -> c_13() , leq#1^#(nil(), @l2) -> c_7() , insert#1^#(nil(), @x) -> c_15() , insert#2^#(#true(), @x, @y, @ys) -> c_10() , #cklt^#(#EQ()) -> c_34() , #cklt^#(#LT()) -> c_35() , #cklt^#(#GT()) -> c_36() , #compare^#(#pos(@x), #pos(@y)) -> c_41(#compare^#(@x, @y)) , #compare^#(#pos(@x), #0()) -> c_42() , #compare^#(#pos(@x), #neg(@y)) -> c_43() , #compare^#(#0(), #pos(@y)) -> c_44() , #compare^#(#0(), #0()) -> c_45() , #compare^#(#0(), #neg(@y)) -> c_46() , #compare^#(#0(), #s(@y)) -> c_47() , #compare^#(#neg(@x), #pos(@y)) -> c_48() , #compare^#(#neg(@x), #0()) -> c_49() , #compare^#(#neg(@x), #neg(@y)) -> c_50(#compare^#(@y, @x)) , #compare^#(#s(@x), #0()) -> c_51() , #compare^#(#s(@x), #s(@y)) -> c_52(#compare^#(@x, @y)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { #equal^#(@x, @y) -> c_1(#eq^#(@x, @y)) , #eq^#(#pos(@x), #pos(@y)) -> c_18(#eq^#(@x, @y)) , #eq^#(#pos(@x), #0()) -> c_19() , #eq^#(#pos(@x), #neg(@y)) -> c_20() , #eq^#(nil(), nil()) -> c_21() , #eq^#(nil(), ::(@y_1, @y_2)) -> c_22() , #eq^#(::(@x_1, @x_2), nil()) -> c_23() , #eq^#(::(@x_1, @x_2), ::(@y_1, @y_2)) -> c_24(#and^#(#eq(@x_1, @y_1), #eq(@x_2, @y_2)), #eq^#(@x_1, @y_1), #eq^#(@x_2, @y_2)) , #eq^#(#0(), #pos(@y)) -> c_25() , #eq^#(#0(), #0()) -> c_26() , #eq^#(#0(), #neg(@y)) -> c_27() , #eq^#(#0(), #s(@y)) -> c_28() , #eq^#(#neg(@x), #pos(@y)) -> c_29() , #eq^#(#neg(@x), #0()) -> c_30() , #eq^#(#neg(@x), #neg(@y)) -> c_31(#eq^#(@x, @y)) , #eq^#(#s(@x), #0()) -> c_32() , #eq^#(#s(@x), #s(@y)) -> c_33(#eq^#(@x, @y)) , leq#2^#(nil(), @x, @xs) -> c_2() , or^#(@x, @y) -> c_4(#or^#(@x, @y)) , #less^#(@x, @y) -> c_17(#cklt^#(#compare(@x, @y)), #compare^#(@x, @y)) , and^#(@x, @y) -> c_5(#and^#(@x, @y)) , #or^#(#true(), #true()) -> c_53() , #or^#(#true(), #false()) -> c_54() , #or^#(#false(), #true()) -> c_55() , #or^#(#false(), #false()) -> c_56() , #and^#(#true(), #true()) -> c_37() , #and^#(#true(), #false()) -> c_38() , #and^#(#false(), #true()) -> c_39() , #and^#(#false(), #false()) -> c_40() , isortlist#1^#(nil()) -> c_13() , leq#1^#(nil(), @l2) -> c_7() , insert#1^#(nil(), @x) -> c_15() , insert#2^#(#true(), @x, @y, @ys) -> c_10() , #cklt^#(#EQ()) -> c_34() , #cklt^#(#LT()) -> c_35() , #cklt^#(#GT()) -> c_36() , #compare^#(#pos(@x), #pos(@y)) -> c_41(#compare^#(@x, @y)) , #compare^#(#pos(@x), #0()) -> c_42() , #compare^#(#pos(@x), #neg(@y)) -> c_43() , #compare^#(#0(), #pos(@y)) -> c_44() , #compare^#(#0(), #0()) -> c_45() , #compare^#(#0(), #neg(@y)) -> c_46() , #compare^#(#0(), #s(@y)) -> c_47() , #compare^#(#neg(@x), #pos(@y)) -> c_48() , #compare^#(#neg(@x), #0()) -> c_49() , #compare^#(#neg(@x), #neg(@y)) -> c_50(#compare^#(@y, @x)) , #compare^#(#s(@x), #0()) -> c_51() , #compare^#(#s(@x), #s(@y)) -> c_52(#compare^#(@x, @y)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_12(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> c_6(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_14(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#1^#(::(@x, @xs), @l2) -> c_8(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_9(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_16(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_11(insert^#(@x, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) Due to missing edges in the dependency-graph, the right-hand sides of following rules could be simplified: { leq#2^#(::(@y, @ys), @x, @xs) -> c_3(or^#(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))), #less^#(@x, @y), and^#(#equal(@x, @y), leq(@xs, @ys)), #equal^#(@x, @y), leq^#(@xs, @ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^2)). Strict DPs: { leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^2)) We decompose the input problem according to the dependency graph into the upper component { isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } and lower component { leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) } Further, following extension rules are added to the lower component. { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) } TcT solves the upper component with certificate YES(O(1),O(n^1)). Sub-proof: ---------- We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 2: isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } Trs: { #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , and(@x, @y) -> #and(@x, @y) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Sub-proof: ---------- The following argument positions are usable: Uargs(c_3) = {1}, Uargs(c_4) = {1, 2} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [4] x1 + [4] x2 + [0] [#eq](x1, x2) = [2] x1 + [0] [leq#2](x1, x2, x3) = [1] [or](x1, x2) = [1] [#true] = [1] [and](x1, x2) = [4] [isortlist](x1) = [2] x1 + [0] [leq#1](x1, x2) = [1] [#cklt](x1) = [1] [insert](x1, x2) = [1] x2 + [4] [#pos](x1) = [1] x1 + [4] [#EQ] = [0] [insert#2](x1, x2, x3, x4) = [4] x1 + [1] x4 + [4] [#and](x1, x2) = [2] [#compare](x1, x2) = [0] [nil] = [2] [leq](x1, x2) = [1] [#false] = [1] [::](x1, x2) = [1] x2 + [4] [isortlist#1](x1) = [2] x1 + [0] [#LT] = [0] [#or](x1, x2) = [1] [insert#1](x1, x2) = [1] x1 + [4] [#0] = [1] [#neg](x1) = [1] x1 + [4] [#less](x1, x2) = [4] [#s](x1) = [1] x1 + [4] [#GT] = [0] [#equal^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_1](x1) = [7] x1 + [0] [#eq^#](x1, x2) = [7] x1 + [7] x2 + [0] [leq#2^#](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_2] = [0] [c_3](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [or^#](x1, x2) = [7] x1 + [7] x2 + [0] [#less^#](x1, x2) = [7] x1 + [7] x2 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [leq^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_4](x1) = [7] x1 + [0] [#or^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_5](x1) = [7] x1 + [0] [#and^#](x1, x2) = [7] x1 + [7] x2 + [0] [isortlist^#](x1) = [1] x1 + [0] [c_6](x1) = [7] x1 + [0] [isortlist#1^#](x1) = [1] x1 + [0] [leq#1^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_7] = [0] [c_8](x1) = [7] x1 + [0] [insert^#](x1, x2) = [0] [c_9](x1) = [7] x1 + [0] [insert#1^#](x1, x2) = [7] x1 + [7] x2 + [0] [insert#2^#](x1, x2, x3, x4) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [0] [c_10] = [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13] = [0] [c_14](x1, x2) = [7] x1 + [7] x2 + [0] [c_15] = [0] [c_16](x1, x2) = [7] x1 + [7] x2 + [0] [c_17](x1, x2) = [7] x1 + [7] x2 + [0] [#cklt^#](x1) = [7] x1 + [0] [#compare^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_25] = [0] [c_26] = [0] [c_27] = [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31](x1) = [7] x1 + [0] [c_32] = [0] [c_33](x1) = [7] x1 + [0] [c_34] = [0] [c_35] = [0] [c_36] = [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41](x1) = [7] x1 + [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45] = [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50](x1) = [7] x1 + [0] [c_51] = [0] [c_52](x1) = [7] x1 + [0] [c_53] = [0] [c_54] = [0] [c_55] = [0] [c_56] = [0] [c] = [0] [c_1](x1) = [7] x1 + [0] [c_2](x1) = [7] x1 + [0] [c_3](x1) = [1] x1 + [0] [c_4](x1, x2) = [4] x1 + [1] x2 + [1] [c_5](x1) = [7] x1 + [0] [c_6](x1) = [7] x1 + [0] [c_7](x1, x2) = [7] x1 + [7] x2 + [0] [c_8](x1) = [7] x1 + [0] The following symbols are considered usable {#equal, #eq, leq#2, or, and, isortlist, leq#1, #cklt, insert, insert#2, #and, #compare, leq, isortlist#1, #or, insert#1, #less, isortlist^#, isortlist#1^#} The order satisfies the following ordering constraints: [#equal(@x, @y)] = [4] @x + [4] @y + [0] >= [2] @x + [0] = [#eq(@x, @y)] [#eq(#pos(@x), #pos(@y))] = [2] @x + [8] > [2] @x + [0] = [#eq(@x, @y)] [#eq(#pos(@x), #0())] = [2] @x + [8] > [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [2] @x + [8] > [1] = [#false()] [#eq(nil(), nil())] = [4] > [1] = [#true()] [#eq(nil(), ::(@y_1, @y_2))] = [4] > [1] = [#false()] [#eq(::(@x_1, @x_2), nil())] = [2] @x_2 + [8] > [1] = [#false()] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [2] @x_2 + [8] > [2] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(#0(), #pos(@y))] = [2] > [1] = [#false()] [#eq(#0(), #0())] = [2] > [1] = [#true()] [#eq(#0(), #neg(@y))] = [2] > [1] = [#false()] [#eq(#0(), #s(@y))] = [2] > [1] = [#false()] [#eq(#neg(@x), #pos(@y))] = [2] @x + [8] > [1] = [#false()] [#eq(#neg(@x), #0())] = [2] @x + [8] > [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [2] @x + [8] > [2] @x + [0] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [2] @x + [8] > [1] = [#false()] [#eq(#s(@x), #s(@y))] = [2] @x + [8] > [2] @x + [0] = [#eq(@x, @y)] [leq#2(nil(), @x, @xs)] = [1] >= [1] = [#false()] [leq#2(::(@y, @ys), @x, @xs)] = [1] >= [1] = [or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys)))] [or(@x, @y)] = [1] >= [1] = [#or(@x, @y)] [and(@x, @y)] = [4] > [2] = [#and(@x, @y)] [isortlist(@l)] = [2] @l + [0] >= [2] @l + [0] = [isortlist#1(@l)] [leq#1(nil(), @l2)] = [1] >= [1] = [#true()] [leq#1(::(@x, @xs), @l2)] = [1] >= [1] = [leq#2(@l2, @x, @xs)] [#cklt(#EQ())] = [1] >= [1] = [#false()] [#cklt(#LT())] = [1] >= [1] = [#true()] [#cklt(#GT())] = [1] >= [1] = [#false()] [insert(@x, @l)] = [1] @l + [4] >= [1] @l + [4] = [insert#1(@l, @x)] [insert#2(#true(), @x, @y, @ys)] = [1] @ys + [8] >= [1] @ys + [8] = [::(@x, ::(@y, @ys))] [insert#2(#false(), @x, @y, @ys)] = [1] @ys + [8] >= [1] @ys + [8] = [::(@y, insert(@x, @ys))] [#and(#true(), #true())] = [2] > [1] = [#true()] [#and(#true(), #false())] = [2] > [1] = [#false()] [#and(#false(), #true())] = [2] > [1] = [#false()] [#and(#false(), #false())] = [2] > [1] = [#false()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [leq(@l1, @l2)] = [1] >= [1] = [leq#1(@l1, @l2)] [isortlist#1(nil())] = [4] > [2] = [nil()] [isortlist#1(::(@x, @xs))] = [2] @xs + [8] > [2] @xs + [4] = [insert(@x, isortlist(@xs))] [#or(#true(), #true())] = [1] >= [1] = [#true()] [#or(#true(), #false())] = [1] >= [1] = [#true()] [#or(#false(), #true())] = [1] >= [1] = [#true()] [#or(#false(), #false())] = [1] >= [1] = [#false()] [insert#1(nil(), @x)] = [6] >= [6] = [::(@x, nil())] [insert#1(::(@y, @ys), @x)] = [1] @ys + [8] >= [1] @ys + [8] = [insert#2(leq(@x, @y), @x, @y, @ys)] [#less(@x, @y)] = [4] > [1] = [#cklt(#compare(@x, @y))] [isortlist^#(@l)] = [1] @l + [0] >= [1] @l + [0] = [c_3(isortlist#1^#(@l))] [isortlist#1^#(::(@x, @xs))] = [1] @xs + [4] > [1] @xs + [1] = [c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs))] We return to the main proof. Consider the set of all dependency pairs : { 1: isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , 2: isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {2}. These cover all (indirect) predecessors of dependency pairs {1,2}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { isortlist^#(@l) -> c_3(isortlist#1^#(@l)) , isortlist#1^#(::(@x, @xs)) -> c_4(insert^#(@x, isortlist(@xs)), isortlist^#(@xs)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded We return to the main proof. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(n^1)). Strict DPs: { leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) } Weak DPs: { isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(n^1)) We use the processor 'matrix interpretation of dimension 1' to orient following rules strictly. DPs: { 1: leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , 5: insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 7: isortlist^#(@l) -> isortlist#1^#(@l) , 8: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , 9: isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) } Trs: { #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#s(@x), #0()) -> #false() , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() } Sub-proof: ---------- The following argument positions are usable: Uargs(c_1) = {1}, Uargs(c_2) = {1}, Uargs(c_5) = {1}, Uargs(c_6) = {1}, Uargs(c_7) = {1, 2}, Uargs(c_8) = {1} TcT has computed the following constructor-based matrix interpretation satisfying not(EDA). [#equal](x1, x2) = [2] [#eq](x1, x2) = [2] [leq#2](x1, x2, x3) = [1] [or](x1, x2) = [1] x2 + [0] [#true] = [1] [and](x1, x2) = [1] [isortlist](x1) = [1] x1 + [0] [leq#1](x1, x2) = [1] [#cklt](x1) = [4] [insert](x1, x2) = [1] x1 + [1] x2 + [2] [#pos](x1) = [1] x1 + [0] [#EQ] = [0] [insert#2](x1, x2, x3, x4) = [2] x1 + [1] x2 + [1] x3 + [1] x4 + [2] [#and](x1, x2) = [1] [#compare](x1, x2) = [0] [nil] = [0] [leq](x1, x2) = [1] [#false] = [1] [::](x1, x2) = [1] x1 + [1] x2 + [2] [isortlist#1](x1) = [1] x1 + [0] [#LT] = [0] [#or](x1, x2) = [1] x2 + [0] [insert#1](x1, x2) = [1] x1 + [1] x2 + [2] [#0] = [0] [#neg](x1) = [1] x1 + [0] [#less](x1, x2) = [4] x1 + [4] x2 + [4] [#s](x1) = [1] x1 + [0] [#GT] = [0] [#equal^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_1](x1) = [7] x1 + [0] [#eq^#](x1, x2) = [7] x1 + [7] x2 + [0] [leq#2^#](x1, x2, x3) = [2] x1 + [0] [c_2] = [0] [c_3](x1, x2, x3, x4, x5) = [7] x1 + [7] x2 + [7] x3 + [7] x4 + [7] x5 + [0] [or^#](x1, x2) = [7] x1 + [7] x2 + [0] [#less^#](x1, x2) = [7] x1 + [7] x2 + [0] [and^#](x1, x2) = [7] x1 + [7] x2 + [0] [leq^#](x1, x2) = [2] x2 + [0] [c_4](x1) = [7] x1 + [0] [#or^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_5](x1) = [7] x1 + [0] [#and^#](x1, x2) = [7] x1 + [7] x2 + [0] [isortlist^#](x1) = [4] x1 + [7] [c_6](x1) = [7] x1 + [0] [isortlist#1^#](x1) = [4] x1 + [1] [leq#1^#](x1, x2) = [2] x2 + [0] [c_7] = [0] [c_8](x1) = [7] x1 + [0] [insert^#](x1, x2) = [4] x2 + [0] [c_9](x1) = [7] x1 + [0] [insert#1^#](x1, x2) = [4] x1 + [0] [insert#2^#](x1, x2, x3, x4) = [4] x4 + [0] [c_10] = [0] [c_11](x1) = [7] x1 + [0] [c_12](x1) = [7] x1 + [0] [c_13] = [0] [c_14](x1, x2) = [7] x1 + [7] x2 + [0] [c_15] = [0] [c_16](x1, x2) = [7] x1 + [7] x2 + [0] [c_17](x1, x2) = [7] x1 + [7] x2 + [0] [#cklt^#](x1) = [7] x1 + [0] [#compare^#](x1, x2) = [7] x1 + [7] x2 + [0] [c_18](x1) = [7] x1 + [0] [c_19] = [0] [c_20] = [0] [c_21] = [0] [c_22] = [0] [c_23] = [0] [c_24](x1, x2, x3) = [7] x1 + [7] x2 + [7] x3 + [0] [c_25] = [0] [c_26] = [0] [c_27] = [0] [c_28] = [0] [c_29] = [0] [c_30] = [0] [c_31](x1) = [7] x1 + [0] [c_32] = [0] [c_33](x1) = [7] x1 + [0] [c_34] = [0] [c_35] = [0] [c_36] = [0] [c_37] = [0] [c_38] = [0] [c_39] = [0] [c_40] = [0] [c_41](x1) = [7] x1 + [0] [c_42] = [0] [c_43] = [0] [c_44] = [0] [c_45] = [0] [c_46] = [0] [c_47] = [0] [c_48] = [0] [c_49] = [0] [c_50](x1) = [7] x1 + [0] [c_51] = [0] [c_52](x1) = [7] x1 + [0] [c_53] = [0] [c_54] = [0] [c_55] = [0] [c_56] = [0] [c] = [0] [c_1](x1) = [1] x1 + [1] [c_2](x1) = [1] x1 + [0] [c_3](x1) = [7] x1 + [0] [c_4](x1, x2) = [7] x1 + [7] x2 + [0] [c_5](x1) = [1] x1 + [0] [c_6](x1) = [1] x1 + [0] [c_7](x1, x2) = [1] x1 + [2] x2 + [7] [c_8](x1) = [1] x1 + [0] The following symbols are considered usable {#equal, #eq, leq#2, or, and, isortlist, leq#1, #cklt, insert, insert#2, #and, #compare, leq, isortlist#1, #or, insert#1, #less, leq#2^#, leq^#, isortlist^#, isortlist#1^#, leq#1^#, insert^#, insert#1^#, insert#2^#} The order satisfies the following ordering constraints: [#equal(@x, @y)] = [2] >= [2] = [#eq(@x, @y)] [#eq(#pos(@x), #pos(@y))] = [2] >= [2] = [#eq(@x, @y)] [#eq(#pos(@x), #0())] = [2] > [1] = [#false()] [#eq(#pos(@x), #neg(@y))] = [2] > [1] = [#false()] [#eq(nil(), nil())] = [2] > [1] = [#true()] [#eq(nil(), ::(@y_1, @y_2))] = [2] > [1] = [#false()] [#eq(::(@x_1, @x_2), nil())] = [2] > [1] = [#false()] [#eq(::(@x_1, @x_2), ::(@y_1, @y_2))] = [2] > [1] = [#and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))] [#eq(#0(), #pos(@y))] = [2] > [1] = [#false()] [#eq(#0(), #0())] = [2] > [1] = [#true()] [#eq(#0(), #neg(@y))] = [2] > [1] = [#false()] [#eq(#0(), #s(@y))] = [2] > [1] = [#false()] [#eq(#neg(@x), #pos(@y))] = [2] > [1] = [#false()] [#eq(#neg(@x), #0())] = [2] > [1] = [#false()] [#eq(#neg(@x), #neg(@y))] = [2] >= [2] = [#eq(@x, @y)] [#eq(#s(@x), #0())] = [2] > [1] = [#false()] [#eq(#s(@x), #s(@y))] = [2] >= [2] = [#eq(@x, @y)] [leq#2(nil(), @x, @xs)] = [1] >= [1] = [#false()] [leq#2(::(@y, @ys), @x, @xs)] = [1] >= [1] = [or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys)))] [or(@x, @y)] = [1] @y + [0] >= [1] @y + [0] = [#or(@x, @y)] [and(@x, @y)] = [1] >= [1] = [#and(@x, @y)] [isortlist(@l)] = [1] @l + [0] >= [1] @l + [0] = [isortlist#1(@l)] [leq#1(nil(), @l2)] = [1] >= [1] = [#true()] [leq#1(::(@x, @xs), @l2)] = [1] >= [1] = [leq#2(@l2, @x, @xs)] [#cklt(#EQ())] = [4] > [1] = [#false()] [#cklt(#LT())] = [4] > [1] = [#true()] [#cklt(#GT())] = [4] > [1] = [#false()] [insert(@x, @l)] = [1] @x + [1] @l + [2] >= [1] @x + [1] @l + [2] = [insert#1(@l, @x)] [insert#2(#true(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [4] >= [1] @x + [1] @y + [1] @ys + [4] = [::(@x, ::(@y, @ys))] [insert#2(#false(), @x, @y, @ys)] = [1] @x + [1] @y + [1] @ys + [4] >= [1] @x + [1] @y + [1] @ys + [4] = [::(@y, insert(@x, @ys))] [#and(#true(), #true())] = [1] >= [1] = [#true()] [#and(#true(), #false())] = [1] >= [1] = [#false()] [#and(#false(), #true())] = [1] >= [1] = [#false()] [#and(#false(), #false())] = [1] >= [1] = [#false()] [#compare(#pos(@x), #pos(@y))] = [0] >= [0] = [#compare(@x, @y)] [#compare(#pos(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#pos(@x), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#0(), #0())] = [0] >= [0] = [#EQ()] [#compare(#0(), #neg(@y))] = [0] >= [0] = [#GT()] [#compare(#0(), #s(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #pos(@y))] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #0())] = [0] >= [0] = [#LT()] [#compare(#neg(@x), #neg(@y))] = [0] >= [0] = [#compare(@y, @x)] [#compare(#s(@x), #0())] = [0] >= [0] = [#GT()] [#compare(#s(@x), #s(@y))] = [0] >= [0] = [#compare(@x, @y)] [leq(@l1, @l2)] = [1] >= [1] = [leq#1(@l1, @l2)] [isortlist#1(nil())] = [0] >= [0] = [nil()] [isortlist#1(::(@x, @xs))] = [1] @x + [1] @xs + [2] >= [1] @x + [1] @xs + [2] = [insert(@x, isortlist(@xs))] [#or(#true(), #true())] = [1] >= [1] = [#true()] [#or(#true(), #false())] = [1] >= [1] = [#true()] [#or(#false(), #true())] = [1] >= [1] = [#true()] [#or(#false(), #false())] = [1] >= [1] = [#false()] [insert#1(nil(), @x)] = [1] @x + [2] >= [1] @x + [2] = [::(@x, nil())] [insert#1(::(@y, @ys), @x)] = [1] @x + [1] @y + [1] @ys + [4] >= [1] @x + [1] @y + [1] @ys + [4] = [insert#2(leq(@x, @y), @x, @y, @ys)] [#less(@x, @y)] = [4] @x + [4] @y + [4] >= [4] = [#cklt(#compare(@x, @y))] [leq#2^#(::(@y, @ys), @x, @xs)] = [2] @y + [2] @ys + [4] > [2] @ys + [1] = [c_1(leq^#(@xs, @ys))] [leq^#(@l1, @l2)] = [2] @l2 + [0] >= [2] @l2 + [0] = [c_2(leq#1^#(@l1, @l2))] [isortlist^#(@l)] = [4] @l + [7] > [4] @l + [1] = [isortlist#1^#(@l)] [isortlist#1^#(::(@x, @xs))] = [4] @x + [4] @xs + [9] > [4] @xs + [7] = [isortlist^#(@xs)] [isortlist#1^#(::(@x, @xs))] = [4] @x + [4] @xs + [9] > [4] @xs + [0] = [insert^#(@x, isortlist(@xs))] [leq#1^#(::(@x, @xs), @l2)] = [2] @l2 + [0] >= [2] @l2 + [0] = [c_5(leq#2^#(@l2, @x, @xs))] [insert^#(@x, @l)] = [4] @l + [0] >= [4] @l + [0] = [c_6(insert#1^#(@l, @x))] [insert#1^#(::(@y, @ys), @x)] = [4] @y + [4] @ys + [8] > [4] @y + [4] @ys + [7] = [c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y))] [insert#2^#(#false(), @x, @y, @ys)] = [4] @ys + [0] >= [4] @ys + [0] = [c_8(insert^#(@x, @ys))] We return to the main proof. Consider the set of all dependency pairs : { 1: leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , 2: leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , 3: leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , 4: insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , 5: insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , 6: insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) , 7: isortlist^#(@l) -> isortlist#1^#(@l) , 8: isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , 9: isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) } Processor 'matrix interpretation of dimension 1' induces the complexity certificate YES(?,O(n^1)) on application of dependency pairs {1,5,7,8,9}. These cover all (indirect) predecessors of dependency pairs {1,2,3,4,5,6,7,8,9}, their number of application is equally bounded. The dependency pairs are shifted into the weak component. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak DPs: { leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) } Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. { leq#2^#(::(@y, @ys), @x, @xs) -> c_1(leq^#(@xs, @ys)) , leq^#(@l1, @l2) -> c_2(leq#1^#(@l1, @l2)) , isortlist^#(@l) -> isortlist#1^#(@l) , isortlist#1^#(::(@x, @xs)) -> isortlist^#(@xs) , isortlist#1^#(::(@x, @xs)) -> insert^#(@x, isortlist(@xs)) , leq#1^#(::(@x, @xs), @l2) -> c_5(leq#2^#(@l2, @x, @xs)) , insert^#(@x, @l) -> c_6(insert#1^#(@l, @x)) , insert#1^#(::(@y, @ys), @x) -> c_7(insert#2^#(leq(@x, @y), @x, @y, @ys), leq^#(@x, @y)) , insert#2^#(#false(), @x, @y, @ys) -> c_8(insert^#(@x, @ys)) } We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Weak Trs: { #equal(@x, @y) -> #eq(@x, @y) , #eq(#pos(@x), #pos(@y)) -> #eq(@x, @y) , #eq(#pos(@x), #0()) -> #false() , #eq(#pos(@x), #neg(@y)) -> #false() , #eq(nil(), nil()) -> #true() , #eq(nil(), ::(@y_1, @y_2)) -> #false() , #eq(::(@x_1, @x_2), nil()) -> #false() , #eq(::(@x_1, @x_2), ::(@y_1, @y_2)) -> #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) , #eq(#0(), #pos(@y)) -> #false() , #eq(#0(), #0()) -> #true() , #eq(#0(), #neg(@y)) -> #false() , #eq(#0(), #s(@y)) -> #false() , #eq(#neg(@x), #pos(@y)) -> #false() , #eq(#neg(@x), #0()) -> #false() , #eq(#neg(@x), #neg(@y)) -> #eq(@x, @y) , #eq(#s(@x), #0()) -> #false() , #eq(#s(@x), #s(@y)) -> #eq(@x, @y) , leq#2(nil(), @x, @xs) -> #false() , leq#2(::(@y, @ys), @x, @xs) -> or(#less(@x, @y), and(#equal(@x, @y), leq(@xs, @ys))) , or(@x, @y) -> #or(@x, @y) , and(@x, @y) -> #and(@x, @y) , isortlist(@l) -> isortlist#1(@l) , leq#1(nil(), @l2) -> #true() , leq#1(::(@x, @xs), @l2) -> leq#2(@l2, @x, @xs) , #cklt(#EQ()) -> #false() , #cklt(#LT()) -> #true() , #cklt(#GT()) -> #false() , insert(@x, @l) -> insert#1(@l, @x) , insert#2(#true(), @x, @y, @ys) -> ::(@x, ::(@y, @ys)) , insert#2(#false(), @x, @y, @ys) -> ::(@y, insert(@x, @ys)) , #and(#true(), #true()) -> #true() , #and(#true(), #false()) -> #false() , #and(#false(), #true()) -> #false() , #and(#false(), #false()) -> #false() , #compare(#pos(@x), #pos(@y)) -> #compare(@x, @y) , #compare(#pos(@x), #0()) -> #GT() , #compare(#pos(@x), #neg(@y)) -> #GT() , #compare(#0(), #pos(@y)) -> #LT() , #compare(#0(), #0()) -> #EQ() , #compare(#0(), #neg(@y)) -> #GT() , #compare(#0(), #s(@y)) -> #LT() , #compare(#neg(@x), #pos(@y)) -> #LT() , #compare(#neg(@x), #0()) -> #LT() , #compare(#neg(@x), #neg(@y)) -> #compare(@y, @x) , #compare(#s(@x), #0()) -> #GT() , #compare(#s(@x), #s(@y)) -> #compare(@x, @y) , leq(@l1, @l2) -> leq#1(@l1, @l2) , isortlist#1(nil()) -> nil() , isortlist#1(::(@x, @xs)) -> insert(@x, isortlist(@xs)) , #or(#true(), #true()) -> #true() , #or(#true(), #false()) -> #true() , #or(#false(), #true()) -> #true() , #or(#false(), #false()) -> #false() , insert#1(nil(), @x) -> ::(@x, nil()) , insert#1(::(@y, @ys), @x) -> insert#2(leq(@x, @y), @x, @y, @ys) , #less(@x, @y) -> #cklt(#compare(@x, @y)) } Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) No rule is usable, rules are removed from the input problem. We are left with following problem, upon which TcT provides the certificate YES(O(1),O(1)). Rules: Empty Obligation: innermost runtime complexity Answer: YES(O(1),O(1)) Empty rules are trivially bounded Hurray, we answered YES(O(1),O(n^2))