WORST_CASE(Omega(n^1),O(n^3)) * Step 1: Sum. WORST_CASE(Omega(n^1),O(n^3)) + Considered Problem: - Strict TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1,c4/0,c5/0,c6/1,c7/0 ,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ,IF_MIN,IF_REPLACE,LE,MIN,REPLACE,SORT,eq,if_min ,if_replace,le,min,replace,sort} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18,c2,c3,c4,c5,c6 ,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:1: Sum. WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1,c4/0,c5/0,c6/1,c7/0 ,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ,IF_MIN,IF_REPLACE,LE,MIN,REPLACE,SORT,eq,if_min ,if_replace,le,min,replace,sort} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18,c2,c3,c4,c5,c6 ,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: Sum {left = someStrategy, right = someStrategy} + Details: () ** Step 1.a:2: DecreasingLoops. WORST_CASE(Omega(n^1),?) + Considered Problem: - Strict TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1,c4/0,c5/0,c6/1,c7/0 ,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ,IF_MIN,IF_REPLACE,LE,MIN,REPLACE,SORT,eq,if_min ,if_replace,le,min,replace,sort} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18,c2,c3,c4,c5,c6 ,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: DecreasingLoops {bound = AnyLoop, narrow = 10} + Details: The system has following decreasing Loops: EQ(x,y){x -> s(x),y -> s(y)} = EQ(s(x),s(y)) ->^+ c3(EQ(x,y)) = C[EQ(x,y) = EQ(x,y){}] ** Step 1.b:1: DependencyPairs. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1,c4/0,c5/0,c6/1,c7/0 ,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ,IF_MIN,IF_REPLACE,LE,MIN,REPLACE,SORT,eq,if_min ,if_replace,le,min,replace,sort} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18,c2,c3,c4,c5,c6 ,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: DependencyPairs {dpKind_ = DT} + Details: We add the following dependency tuples: Strict DPs EQ#(0(),0()) -> c_1() EQ#(0(),s(z0)) -> c_2() EQ#(s(z0),0()) -> c_3() EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() LE#(0(),z0) -> c_9() LE#(s(z0),0()) -> c_10() LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) MIN#(cons(0(),nil())) -> c_13() MIN#(cons(s(z0),nil())) -> c_14() REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) REPLACE#(z0,z1,nil()) -> c_16() SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) SORT#(nil()) -> c_19() Weak DPs eq#(0(),0()) -> c_20() eq#(0(),s(z0)) -> c_21() eq#(s(z0),0()) -> c_22() eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() le#(0(),z0) -> c_28() le#(s(z0),0()) -> c_29() le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) min#(cons(0(),nil())) -> c_32() min#(cons(s(z0),nil())) -> c_33() replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) replace#(z0,z1,nil()) -> c_35() sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) sort#(nil()) -> c_37() and mark the set of starting terms. ** Step 1.b:2: PredecessorEstimation. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: EQ#(0(),0()) -> c_1() EQ#(0(),s(z0)) -> c_2() EQ#(s(z0),0()) -> c_3() EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() LE#(0(),z0) -> c_9() LE#(s(z0),0()) -> c_10() LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) MIN#(cons(0(),nil())) -> c_13() MIN#(cons(s(z0),nil())) -> c_14() REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) REPLACE#(z0,z1,nil()) -> c_16() SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) SORT#(nil()) -> c_19() - Weak DPs: eq#(0(),0()) -> c_20() eq#(0(),s(z0)) -> c_21() eq#(s(z0),0()) -> c_22() eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() le#(0(),z0) -> c_28() le#(s(z0),0()) -> c_29() le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) min#(cons(0(),nil())) -> c_32() min#(cons(s(z0),nil())) -> c_33() replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) replace#(z0,z1,nil()) -> c_35() sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) sort#(nil()) -> c_37() - Weak TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/3,c_13/0,c_14/0,c_15/3,c_16/0,c_17/1,c_18/6,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} + Details: We estimate the number of application of {1,2,3,8,9,10,13,14,16,19} by application of Pre({1,2,3,8,9,10,13,14,16,19}) = {4,5,6,7,11,12,15,17,18}. Here rules are labelled as follows: 1: EQ#(0(),0()) -> c_1() 2: EQ#(0(),s(z0)) -> c_2() 3: EQ#(s(z0),0()) -> c_3() 4: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) 5: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) 6: IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) 7: IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) 8: IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() 9: LE#(0(),z0) -> c_9() 10: LE#(s(z0),0()) -> c_10() 11: LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) 12: MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) 13: MIN#(cons(0(),nil())) -> c_13() 14: MIN#(cons(s(z0),nil())) -> c_14() 15: REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) 16: REPLACE#(z0,z1,nil()) -> c_16() 17: SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) 18: SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) 19: SORT#(nil()) -> c_19() 20: eq#(0(),0()) -> c_20() 21: eq#(0(),s(z0)) -> c_21() 22: eq#(s(z0),0()) -> c_22() 23: eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) 24: if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) 25: if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) 26: if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) 27: if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() 28: le#(0(),z0) -> c_28() 29: le#(s(z0),0()) -> c_29() 30: le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) 31: min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) 32: min#(cons(0(),nil())) -> c_32() 33: min#(cons(s(z0),nil())) -> c_33() 34: replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) 35: replace#(z0,z1,nil()) -> c_35() 36: sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) 37: sort#(nil()) -> c_37() ** Step 1.b:3: RemoveWeakSuffixes. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) - Weak DPs: EQ#(0(),0()) -> c_1() EQ#(0(),s(z0)) -> c_2() EQ#(s(z0),0()) -> c_3() IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() LE#(0(),z0) -> c_9() LE#(s(z0),0()) -> c_10() MIN#(cons(0(),nil())) -> c_13() MIN#(cons(s(z0),nil())) -> c_14() REPLACE#(z0,z1,nil()) -> c_16() SORT#(nil()) -> c_19() eq#(0(),0()) -> c_20() eq#(0(),s(z0)) -> c_21() eq#(s(z0),0()) -> c_22() eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() le#(0(),z0) -> c_28() le#(s(z0),0()) -> c_29() le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) min#(cons(0(),nil())) -> c_32() min#(cons(s(z0),nil())) -> c_33() replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) replace#(z0,z1,nil()) -> c_35() sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) sort#(nil()) -> c_37() - Weak TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/3,c_13/0,c_14/0,c_15/3,c_16/0,c_17/1,c_18/6,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: RemoveWeakSuffixes + Details: Consider the dependency graph 1:S:EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) -->_1 EQ#(s(z0),0()) -> c_3():12 -->_1 EQ#(0(),s(z0)) -> c_2():11 -->_1 EQ#(0(),0()) -> c_1():10 -->_1 EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)):1 2:S:IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 -->_1 MIN#(cons(s(z0),nil())) -> c_14():17 -->_1 MIN#(cons(0(),nil())) -> c_13():16 3:S:IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 -->_1 MIN#(cons(s(z0),nil())) -> c_14():17 -->_1 MIN#(cons(0(),nil())) -> c_13():16 4:S:IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) -->_1 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) ,eq#(z0,z2) ,EQ#(z0,z2)):7 -->_1 REPLACE#(z0,z1,nil()) -> c_16():18 5:S:LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) -->_1 LE#(s(z0),0()) -> c_10():15 -->_1 LE#(0(),z0) -> c_9():14 -->_1 LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)):5 6:S:MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) -->_2 le#(s(z0),s(z1)) -> c_30(le#(z0,z1)):30 -->_2 le#(s(z0),0()) -> c_29():29 -->_2 le#(0(),z0) -> c_28():28 -->_3 LE#(s(z0),0()) -> c_10():15 -->_3 LE#(0(),z0) -> c_9():14 -->_3 LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)):5 -->_1 IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))):3 -->_1 IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))):2 7:S:REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) -->_2 eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)):23 -->_2 eq#(s(z0),0()) -> c_22():22 -->_2 eq#(0(),s(z0)) -> c_21():21 -->_2 eq#(0(),0()) -> c_20():20 -->_1 IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8():13 -->_3 EQ#(s(z0),0()) -> c_3():12 -->_3 EQ#(0(),s(z0)) -> c_2():11 -->_3 EQ#(0(),0()) -> c_1():10 -->_1 IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)):4 -->_3 EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)):1 8:S:SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) -->_1 MIN#(cons(s(z0),nil())) -> c_14():17 -->_1 MIN#(cons(0(),nil())) -> c_13():16 -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 9:S:SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) -->_2 replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)):34 -->_5 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 -->_3 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 -->_2 replace#(z0,z1,nil()) -> c_35():35 -->_5 min#(cons(s(z0),nil())) -> c_33():33 -->_3 min#(cons(s(z0),nil())) -> c_33():33 -->_5 min#(cons(0(),nil())) -> c_32():32 -->_3 min#(cons(0(),nil())) -> c_32():32 -->_1 SORT#(nil()) -> c_19():19 -->_4 REPLACE#(z0,z1,nil()) -> c_16():18 -->_6 MIN#(cons(s(z0),nil())) -> c_14():17 -->_6 MIN#(cons(0(),nil())) -> c_13():16 -->_1 SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))):9 -->_1 SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))):8 -->_4 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)):7 -->_6 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 10:W:EQ#(0(),0()) -> c_1() 11:W:EQ#(0(),s(z0)) -> c_2() 12:W:EQ#(s(z0),0()) -> c_3() 13:W:IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() 14:W:LE#(0(),z0) -> c_9() 15:W:LE#(s(z0),0()) -> c_10() 16:W:MIN#(cons(0(),nil())) -> c_13() 17:W:MIN#(cons(s(z0),nil())) -> c_14() 18:W:REPLACE#(z0,z1,nil()) -> c_16() 19:W:SORT#(nil()) -> c_19() 20:W:eq#(0(),0()) -> c_20() 21:W:eq#(0(),s(z0)) -> c_21() 22:W:eq#(s(z0),0()) -> c_22() 23:W:eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) -->_1 eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)):23 -->_1 eq#(s(z0),0()) -> c_22():22 -->_1 eq#(0(),s(z0)) -> c_21():21 -->_1 eq#(0(),0()) -> c_20():20 24:W:if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) -->_1 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 -->_1 min#(cons(s(z0),nil())) -> c_33():33 -->_1 min#(cons(0(),nil())) -> c_32():32 25:W:if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) -->_1 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 -->_1 min#(cons(s(z0),nil())) -> c_33():33 -->_1 min#(cons(0(),nil())) -> c_32():32 26:W:if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) -->_1 replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)):34 -->_1 replace#(z0,z1,nil()) -> c_35():35 27:W:if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() 28:W:le#(0(),z0) -> c_28() 29:W:le#(s(z0),0()) -> c_29() 30:W:le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) -->_1 le#(s(z0),s(z1)) -> c_30(le#(z0,z1)):30 -->_1 le#(s(z0),0()) -> c_29():29 -->_1 le#(0(),z0) -> c_28():28 31:W:min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) -->_2 le#(s(z0),s(z1)) -> c_30(le#(z0,z1)):30 -->_2 le#(s(z0),0()) -> c_29():29 -->_2 le#(0(),z0) -> c_28():28 -->_1 if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))):25 -->_1 if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))):24 32:W:min#(cons(0(),nil())) -> c_32() 33:W:min#(cons(s(z0),nil())) -> c_33() 34:W:replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) -->_1 if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27():27 -->_1 if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)):26 -->_2 eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)):23 -->_2 eq#(s(z0),0()) -> c_22():22 -->_2 eq#(0(),s(z0)) -> c_21():21 -->_2 eq#(0(),0()) -> c_20():20 35:W:replace#(z0,z1,nil()) -> c_35() 36:W:sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) -->_2 sort#(nil()) -> c_37():37 -->_2 sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))):36 -->_3 replace#(z0,z1,nil()) -> c_35():35 -->_3 replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)):34 -->_4 min#(cons(s(z0),nil())) -> c_33():33 -->_1 min#(cons(s(z0),nil())) -> c_33():33 -->_4 min#(cons(0(),nil())) -> c_32():32 -->_1 min#(cons(0(),nil())) -> c_32():32 -->_4 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 -->_1 min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)):31 37:W:sort#(nil()) -> c_37() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 36: sort#(cons(z0,z1)) -> c_36(min#(cons(z0,z1)) ,sort#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1))) 37: sort#(nil()) -> c_37() 19: SORT#(nil()) -> c_19() 31: min#(cons(z0,cons(z1,z2))) -> c_31(if_min#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1)) 25: if_min#(true(),cons(z0,cons(z1,z2))) -> c_25(min#(cons(z0,z2))) 24: if_min#(false(),cons(z0,cons(z1,z2))) -> c_24(min#(cons(z1,z2))) 32: min#(cons(0(),nil())) -> c_32() 33: min#(cons(s(z0),nil())) -> c_33() 34: replace#(z0,z1,cons(z2,z3)) -> c_34(if_replace#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2)) 26: if_replace#(false(),z0,z1,cons(z2,z3)) -> c_26(replace#(z0,z1,z3)) 35: replace#(z0,z1,nil()) -> c_35() 27: if_replace#(true(),z0,z1,cons(z2,z3)) -> c_27() 18: REPLACE#(z0,z1,nil()) -> c_16() 13: IF_REPLACE#(true(),z0,z1,cons(z2,z3)) -> c_8() 23: eq#(s(z0),s(z1)) -> c_23(eq#(z0,z1)) 20: eq#(0(),0()) -> c_20() 21: eq#(0(),s(z0)) -> c_21() 22: eq#(s(z0),0()) -> c_22() 16: MIN#(cons(0(),nil())) -> c_13() 17: MIN#(cons(s(z0),nil())) -> c_14() 14: LE#(0(),z0) -> c_9() 15: LE#(s(z0),0()) -> c_10() 30: le#(s(z0),s(z1)) -> c_30(le#(z0,z1)) 28: le#(0(),z0) -> c_28() 29: le#(s(z0),0()) -> c_29() 10: EQ#(0(),0()) -> c_1() 11: EQ#(0(),s(z0)) -> c_2() 12: EQ#(s(z0),0()) -> c_3() ** Step 1.b:4: SimplifyRHS. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) - Weak TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/3,c_13/0,c_14/0,c_15/3,c_16/0,c_17/1,c_18/6,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) -->_1 EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)):1 2:S:IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 3:S:IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 4:S:IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) -->_1 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) ,eq#(z0,z2) ,EQ#(z0,z2)):7 5:S:LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) -->_1 LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)):5 6:S:MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)) -->_3 LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)):5 -->_1 IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))):3 -->_1 IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))):2 7:S:REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)) -->_1 IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)):4 -->_3 EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)):1 8:S:SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 9:S:SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))) -->_1 SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,replace#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,min#(cons(z0,z1)) ,MIN#(cons(z0,z1))):9 -->_1 SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))):8 -->_4 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),eq#(z0,z2),EQ#(z0,z2)):7 -->_6 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),le#(z0,z1),LE#(z0,z1)):6 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) ** Step 1.b:5: UsableRules. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) - Weak TRS: EQ(0(),0()) -> c() EQ(0(),s(z0)) -> c1() EQ(s(z0),0()) -> c2() EQ(s(z0),s(z1)) -> c3(EQ(z0,z1)) IF_MIN(false(),cons(z0,cons(z1,z2))) -> c11(MIN(cons(z1,z2))) IF_MIN(true(),cons(z0,cons(z1,z2))) -> c10(MIN(cons(z0,z2))) IF_REPLACE(false(),z0,z1,cons(z2,z3)) -> c15(REPLACE(z0,z1,z3)) IF_REPLACE(true(),z0,z1,cons(z2,z3)) -> c14() LE(0(),z0) -> c4() LE(s(z0),0()) -> c5() LE(s(z0),s(z1)) -> c6(LE(z0,z1)) MIN(cons(z0,cons(z1,z2))) -> c9(IF_MIN(le(z0,z1),cons(z0,cons(z1,z2))),LE(z0,z1)) MIN(cons(0(),nil())) -> c7() MIN(cons(s(z0),nil())) -> c8() REPLACE(z0,z1,cons(z2,z3)) -> c13(IF_REPLACE(eq(z0,z2),z0,z1,cons(z2,z3)),EQ(z0,z2)) REPLACE(z0,z1,nil()) -> c12() SORT(cons(z0,z1)) -> c17(MIN(cons(z0,z1))) SORT(cons(z0,z1)) -> c18(SORT(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE(min(cons(z0,z1)),z0,z1) ,MIN(cons(z0,z1))) SORT(nil()) -> c16() eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() sort(cons(z0,z1)) -> cons(min(cons(z0,z1)),sort(replace(min(cons(z0,z1)),z0,z1))) sort(nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: UsableRules + Details: We replace rewrite rules by usable rules: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) ** Step 1.b:6: DecomposeDG. WORST_CASE(?,O(n^3)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) and a lower component EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) Further, following extension rules are added to the lower component. SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) *** Step 1.b:6.a:1: SimplifyRHS. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))) -->_1 SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1)) ,REPLACE#(min(cons(z0,z1)),z0,z1) ,MIN#(cons(z0,z1))):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1))) *** Step 1.b:6.a:2: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/1,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_18) = {1} Following symbols are considered usable: {if_replace,replace,EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq#,if_min#,if_replace#,le#,min# ,replace#,sort#} TcT has computed the following interpretation: p(0) = [4] p(EQ) = [1] x2 + [0] p(IF_MIN) = [1] x1 + [1] x2 + [4] p(IF_REPLACE) = [1] x2 + [1] x3 + [0] p(LE) = [1] x1 + [1] x2 + [4] p(MIN) = [4] p(REPLACE) = [1] x1 + [1] x2 + [1] x3 + [1] p(SORT) = [1] x1 + [2] p(c) = [1] p(c1) = [2] p(c10) = [4] p(c11) = [0] p(c12) = [2] p(c13) = [1] x2 + [1] p(c14) = [1] p(c15) = [1] p(c16) = [0] p(c17) = [1] x1 + [1] p(c18) = [1] x2 + [1] x3 + [1] p(c2) = [4] p(c3) = [4] p(c4) = [1] p(c5) = [4] p(c6) = [0] p(c7) = [0] p(c8) = [0] p(c9) = [1] x2 + [1] p(cons) = [1] x2 + [1] p(eq) = [0] p(false) = [0] p(if_min) = [1] x1 + [6] p(if_replace) = [1] x4 + [0] p(le) = [1] x2 + [2] p(min) = [0] p(nil) = [1] p(replace) = [1] x3 + [0] p(s) = [4] p(sort) = [0] p(true) = [0] p(EQ#) = [2] x1 + [4] x2 + [1] p(IF_MIN#) = [2] x1 + [2] x2 + [1] p(IF_REPLACE#) = [1] p(LE#) = [4] x2 + [4] p(MIN#) = [1] x1 + [0] p(REPLACE#) = [1] x1 + [2] x3 + [1] p(SORT#) = [4] x1 + [0] p(eq#) = [0] p(if_min#) = [1] x1 + [1] x2 + [1] p(if_replace#) = [4] x1 + [1] x2 + [4] x3 + [2] p(le#) = [2] x1 + [1] p(min#) = [4] p(replace#) = [4] x3 + [0] p(sort#) = [4] x1 + [1] p(c_1) = [4] p(c_2) = [4] p(c_3) = [1] p(c_4) = [1] x1 + [1] p(c_5) = [1] p(c_6) = [1] p(c_7) = [4] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [1] p(c_11) = [1] x1 + [4] p(c_12) = [1] p(c_13) = [4] p(c_14) = [2] p(c_15) = [1] p(c_16) = [2] p(c_17) = [1] p(c_18) = [1] x1 + [2] p(c_19) = [0] p(c_20) = [1] p(c_21) = [4] p(c_22) = [1] p(c_23) = [0] p(c_24) = [1] p(c_25) = [2] x1 + [2] p(c_26) = [1] x1 + [0] p(c_27) = [1] p(c_28) = [0] p(c_29) = [2] p(c_30) = [1] x1 + [0] p(c_31) = [1] x1 + [1] p(c_32) = [1] p(c_33) = [1] p(c_34) = [2] p(c_35) = [2] p(c_36) = [4] x1 + [1] x3 + [1] x4 + [1] p(c_37) = [0] Following rules are strictly oriented: SORT#(cons(z0,z1)) = [4] z1 + [4] > [4] z1 + [2] = c_18(SORT#(replace(min(cons(z0,z1)),z0,z1))) Following rules are (at-least) weakly oriented: if_replace(false(),z0,z1,cons(z2,z3)) = [1] z3 + [1] >= [1] z3 + [1] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z3 + [1] >= [1] z3 + [1] = cons(z1,z3) replace(z0,z1,cons(z2,z3)) = [1] z3 + [1] >= [1] z3 + [1] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] >= [1] = nil() *** Step 1.b:6.a:3: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: SORT#(cons(z0,z1)) -> c_18(SORT#(replace(min(cons(z0,z1)),z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/1,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). *** Step 1.b:6.b:1: DecomposeDG. WORST_CASE(?,O(n^2)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak DPs: SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: DecomposeDG {onSelection = all below first cut in WDG, onUpper = Nothing, onLower = Nothing} + Details: We decompose the input problem according to the dependency graph into the upper component IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) and a lower component EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) Further, following extension rules are added to the lower component. IF_MIN#(false(),cons(z0,cons(z1,z2))) -> MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> REPLACE#(z0,z1,z3) MIN#(cons(z0,cons(z1,z2))) -> IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) -> LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) -> EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) -> IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) **** Step 1.b:6.b:1.a:1: SimplifyRHS. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak DPs: SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: SimplifyRHS + Details: Consider the dependency graph 1:S:IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)):4 2:S:IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)):4 3:S:IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) -->_1 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)):5 4:S:MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)) -->_1 IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))):2 -->_1 IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))):1 5:S:REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)) -->_1 IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)):3 6:S:SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)):4 7:W:SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) -->_1 MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))),LE#(z0,z1)):4 8:W:SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) -->_1 REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)),EQ#(z0,z2)):5 9:W:SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) -->_1 SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)):9 -->_1 SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1):8 -->_1 SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)):7 -->_1 SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))):6 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) **** Step 1.b:6.b:1.a:2: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak DPs: SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_12) = {1}, uargs(c_15) = {1}, uargs(c_17) = {1} Following symbols are considered usable: {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq#,if_min#,if_replace#,le#,min#,replace#,sort#} TcT has computed the following interpretation: p(0) = [4] p(EQ) = [1] x1 + [0] p(IF_MIN) = [1] x2 + [1] p(IF_REPLACE) = [1] x1 + [1] x2 + [1] x3 + [1] p(LE) = [1] x2 + [0] p(MIN) = [0] p(REPLACE) = [2] x2 + [2] p(SORT) = [1] p(c) = [1] p(c1) = [0] p(c10) = [1] x1 + [2] p(c11) = [1] x1 + [0] p(c12) = [1] p(c13) = [0] p(c14) = [1] p(c15) = [1] p(c16) = [0] p(c17) = [4] p(c18) = [2] p(c2) = [0] p(c3) = [0] p(c4) = [2] p(c5) = [1] p(c6) = [0] p(c7) = [2] p(c8) = [2] p(c9) = [1] x1 + [0] p(cons) = [0] p(eq) = [0] p(false) = [0] p(if_min) = [0] p(if_replace) = [1] x1 + [1] x2 + [0] p(le) = [0] p(min) = [1] x1 + [0] p(nil) = [0] p(replace) = [1] x1 + [1] x2 + [6] x3 + [0] p(s) = [1] p(sort) = [1] x1 + [0] p(true) = [2] p(EQ#) = [1] x1 + [1] x2 + [2] p(IF_MIN#) = [0] p(IF_REPLACE#) = [0] p(LE#) = [1] x2 + [1] p(MIN#) = [0] p(REPLACE#) = [0] p(SORT#) = [2] p(eq#) = [2] x1 + [1] x2 + [0] p(if_min#) = [4] x2 + [1] p(if_replace#) = [1] x2 + [2] x3 + [0] p(le#) = [2] x1 + [1] x2 + [0] p(min#) = [4] x1 + [0] p(replace#) = [1] x2 + [2] x3 + [0] p(sort#) = [1] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [2] x1 + [0] p(c_6) = [4] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] p(c_11) = [0] p(c_12) = [4] x1 + [0] p(c_13) = [2] p(c_14) = [0] p(c_15) = [4] x1 + [0] p(c_16) = [0] p(c_17) = [2] x1 + [1] p(c_18) = [1] x1 + [0] p(c_19) = [1] p(c_20) = [0] p(c_21) = [0] p(c_22) = [1] p(c_23) = [4] p(c_24) = [4] p(c_25) = [2] x1 + [1] p(c_26) = [1] x1 + [0] p(c_27) = [2] p(c_28) = [0] p(c_29) = [1] p(c_30) = [1] p(c_31) = [1] x1 + [4] x2 + [2] p(c_32) = [2] p(c_33) = [1] p(c_34) = [1] p(c_35) = [0] p(c_36) = [1] x4 + [1] p(c_37) = [1] Following rules are strictly oriented: SORT#(cons(z0,z1)) = [2] > [1] = c_17(MIN#(cons(z0,z1))) Following rules are (at-least) weakly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [0] >= [0] = c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [0] >= [0] = c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [0] >= [0] = c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) = [0] >= [0] = c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) = [0] >= [0] = c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) = [2] >= [0] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [2] >= [0] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [2] >= [2] = SORT#(replace(min(cons(z0,z1)),z0,z1)) **** Step 1.b:6.b:1.a:3: WeightGap. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) - Weak DPs: SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {2}, uargs(if_min) = {1}, uargs(if_replace) = {1}, uargs(replace) = {1}, uargs(IF_MIN#) = {1}, uargs(IF_REPLACE#) = {1}, uargs(REPLACE#) = {1}, uargs(SORT#) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_12) = {1}, uargs(c_15) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(EQ) = [0] p(IF_MIN) = [0] p(IF_REPLACE) = [0] p(LE) = [0] p(MIN) = [0] p(REPLACE) = [0] p(SORT) = [0] p(c) = [0] p(c1) = [0] p(c10) = [1] x1 + [0] p(c11) = [1] x1 + [0] p(c12) = [0] p(c13) = [1] x1 + [1] x2 + [0] p(c14) = [0] p(c15) = [1] x1 + [0] p(c16) = [0] p(c17) = [1] x1 + [0] p(c18) = [1] x1 + [1] x2 + [1] x3 + [0] p(c2) = [0] p(c3) = [1] x1 + [0] p(c4) = [0] p(c5) = [0] p(c6) = [1] x1 + [0] p(c7) = [0] p(c8) = [0] p(c9) = [1] x1 + [1] x2 + [0] p(cons) = [1] x2 + [0] p(eq) = [0] p(false) = [0] p(if_min) = [1] x1 + [0] p(if_replace) = [1] x1 + [1] x2 + [1] x4 + [0] p(le) = [0] p(min) = [0] p(nil) = [5] p(replace) = [1] x1 + [1] x3 + [0] p(s) = [0] p(sort) = [1] x1 + [4] p(true) = [0] p(EQ#) = [4] x1 + [4] x2 + [1] p(IF_MIN#) = [1] x1 + [1] x2 + [1] p(IF_REPLACE#) = [1] x1 + [1] x2 + [0] p(LE#) = [0] p(MIN#) = [1] x1 + [0] p(REPLACE#) = [1] x1 + [0] p(SORT#) = [1] x1 + [0] p(eq#) = [0] p(if_min#) = [0] p(if_replace#) = [0] p(le#) = [0] p(min#) = [0] p(replace#) = [0] p(sort#) = [0] p(c_1) = [0] p(c_2) = [0] p(c_3) = [0] p(c_4) = [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [0] p(c_10) = [0] p(c_11) = [0] p(c_12) = [1] x1 + [0] p(c_13) = [0] p(c_14) = [0] p(c_15) = [1] x1 + [0] p(c_16) = [0] p(c_17) = [1] x1 + [0] p(c_18) = [0] p(c_19) = [0] p(c_20) = [0] p(c_21) = [0] p(c_22) = [0] p(c_23) = [0] p(c_24) = [0] p(c_25) = [0] p(c_26) = [0] p(c_27) = [0] p(c_28) = [0] p(c_29) = [0] p(c_30) = [0] p(c_31) = [0] p(c_32) = [0] p(c_33) = [0] p(c_34) = [0] p(c_35) = [0] p(c_36) = [0] p(c_37) = [0] Following rules are strictly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [1] z2 + [1] > [1] z2 + [0] = c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [1] z2 + [1] > [1] z2 + [0] = c_6(MIN#(cons(z0,z2))) Following rules are (at-least) weakly oriented: IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [1] z0 + [0] >= [1] z0 + [0] = c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) = [1] z2 + [0] >= [1] z2 + [1] = c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) = [1] z0 + [0] >= [1] z0 + [0] = c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [1] z1 + [0] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [0] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [1] z1 + [0] = SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [1] z1 + [0] = c_17(MIN#(cons(z0,z1))) eq(0(),0()) = [0] >= [0] = true() eq(0(),s(z0)) = [0] >= [0] = false() eq(s(z0),0()) = [0] >= [0] = false() eq(s(z0),s(z1)) = [0] >= [0] = eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z0 + [1] z3 + [0] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z3 + [0] = cons(z1,z3) le(0(),z0) = [0] >= [0] = true() le(s(z0),0()) = [0] >= [0] = false() le(s(z0),s(z1)) = [0] >= [0] = le(z0,z1) min(cons(z0,cons(z1,z2))) = [0] >= [0] = if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) = [0] >= [0] = 0() min(cons(s(z0),nil())) = [0] >= [0] = s(z0) replace(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z0 + [1] z3 + [0] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z0 + [5] >= [5] = nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. **** Step 1.b:6.b:1.a:4: WeightGap. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) - Weak DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {2}, uargs(if_min) = {1}, uargs(if_replace) = {1}, uargs(replace) = {1}, uargs(IF_MIN#) = {1}, uargs(IF_REPLACE#) = {1}, uargs(REPLACE#) = {1}, uargs(SORT#) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_12) = {1}, uargs(c_15) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(EQ) = [0] p(IF_MIN) = [0] p(IF_REPLACE) = [0] p(LE) = [0] p(MIN) = [0] p(REPLACE) = [0] p(SORT) = [0] p(c) = [0] p(c1) = [0] p(c10) = [1] x1 + [0] p(c11) = [1] x1 + [0] p(c12) = [0] p(c13) = [1] x1 + [1] x2 + [0] p(c14) = [0] p(c15) = [1] x1 + [0] p(c16) = [0] p(c17) = [1] x1 + [0] p(c18) = [1] x1 + [1] x2 + [1] x3 + [0] p(c2) = [0] p(c3) = [1] x1 + [0] p(c4) = [0] p(c5) = [0] p(c6) = [1] x1 + [0] p(c7) = [0] p(c8) = [0] p(c9) = [1] x1 + [1] x2 + [0] p(cons) = [1] x2 + [0] p(eq) = [0] p(false) = [0] p(if_min) = [1] x1 + [0] p(if_replace) = [1] x1 + [1] x2 + [1] x4 + [0] p(le) = [0] p(min) = [0] p(nil) = [0] p(replace) = [1] x1 + [1] x3 + [0] p(s) = [0] p(sort) = [0] p(true) = [0] p(EQ#) = [0] p(IF_MIN#) = [1] x1 + [0] p(IF_REPLACE#) = [1] x1 + [1] x2 + [1] x4 + [4] p(LE#) = [0] p(MIN#) = [0] p(REPLACE#) = [1] x1 + [1] x3 + [0] p(SORT#) = [1] x1 + [0] p(eq#) = [1] x1 + [2] x2 + [1] p(if_min#) = [0] p(if_replace#) = [1] x1 + [2] x2 + [2] x3 + [0] p(le#) = [1] x1 + [0] p(min#) = [1] x1 + [4] p(replace#) = [1] x2 + [1] p(sort#) = [1] p(c_1) = [4] p(c_2) = [0] p(c_3) = [2] p(c_4) = [1] x1 + [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [0] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [4] p(c_10) = [1] p(c_11) = [4] p(c_12) = [1] x1 + [0] p(c_13) = [1] p(c_14) = [1] p(c_15) = [1] x1 + [0] p(c_16) = [1] p(c_17) = [1] x1 + [0] p(c_18) = [1] x1 + [1] x3 + [2] p(c_19) = [1] p(c_20) = [2] p(c_21) = [2] p(c_22) = [0] p(c_23) = [0] p(c_24) = [0] p(c_25) = [1] x1 + [1] p(c_26) = [1] x1 + [1] p(c_27) = [4] p(c_28) = [1] p(c_29) = [2] p(c_30) = [2] x1 + [1] p(c_31) = [1] x2 + [4] p(c_32) = [0] p(c_33) = [4] p(c_34) = [1] x2 + [4] p(c_35) = [0] p(c_36) = [2] x1 + [4] x2 + [4] p(c_37) = [4] Following rules are strictly oriented: IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] > [1] z0 + [1] z3 + [0] = c_7(REPLACE#(z0,z1,z3)) Following rules are (at-least) weakly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [0] >= [0] = c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [0] >= [0] = c_6(MIN#(cons(z0,z2))) MIN#(cons(z0,cons(z1,z2))) = [0] >= [0] = c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z0 + [1] z3 + [4] = c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [0] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [1] z1 + [0] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [1] z1 + [0] = SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [0] >= [0] = c_17(MIN#(cons(z0,z1))) eq(0(),0()) = [0] >= [0] = true() eq(0(),s(z0)) = [0] >= [0] = false() eq(s(z0),0()) = [0] >= [0] = false() eq(s(z0),s(z1)) = [0] >= [0] = eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z0 + [1] z3 + [0] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z3 + [0] = cons(z1,z3) le(0(),z0) = [0] >= [0] = true() le(s(z0),0()) = [0] >= [0] = false() le(s(z0),s(z1)) = [0] >= [0] = le(z0,z1) min(cons(z0,cons(z1,z2))) = [0] >= [0] = if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) = [0] >= [0] = 0() min(cons(s(z0),nil())) = [0] >= [0] = s(z0) replace(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [0] >= [1] z0 + [1] z3 + [0] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z0 + [0] >= [0] = nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. **** Step 1.b:6.b:1.a:5: WeightGap. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) - Weak DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {2}, uargs(if_min) = {1}, uargs(if_replace) = {1}, uargs(replace) = {1}, uargs(IF_MIN#) = {1}, uargs(IF_REPLACE#) = {1}, uargs(REPLACE#) = {1}, uargs(SORT#) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_12) = {1}, uargs(c_15) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [4] p(EQ) = [1] x1 + [1] p(IF_MIN) = [0] p(IF_REPLACE) = [4] x2 + [2] x3 + [1] x4 + [1] p(LE) = [4] x1 + [4] x2 + [1] p(MIN) = [1] x1 + [2] p(REPLACE) = [4] x2 + [1] x3 + [0] p(SORT) = [0] p(c) = [0] p(c1) = [1] p(c10) = [1] x1 + [1] p(c11) = [1] p(c12) = [0] p(c13) = [4] p(c14) = [4] p(c15) = [1] x1 + [1] p(c16) = [4] p(c17) = [2] p(c18) = [1] x1 + [1] x3 + [4] p(c2) = [4] p(c3) = [0] p(c4) = [0] p(c5) = [1] p(c6) = [0] p(c7) = [1] p(c8) = [0] p(c9) = [2] p(cons) = [1] x2 + [4] p(eq) = [0] p(false) = [0] p(if_min) = [1] x1 + [4] p(if_replace) = [1] x1 + [1] x2 + [1] x4 + [0] p(le) = [0] p(min) = [4] p(nil) = [4] p(replace) = [1] x1 + [1] x3 + [0] p(s) = [4] p(sort) = [4] x1 + [2] p(true) = [0] p(EQ#) = [2] x1 + [1] x2 + [1] p(IF_MIN#) = [1] x1 + [1] p(IF_REPLACE#) = [1] x1 + [1] x2 + [1] x4 + [0] p(LE#) = [1] x1 + [1] x2 + [1] p(MIN#) = [0] p(REPLACE#) = [1] x1 + [1] x3 + [1] p(SORT#) = [1] x1 + [5] p(eq#) = [1] x1 + [1] p(if_min#) = [1] x1 + [0] p(if_replace#) = [1] x1 + [1] x2 + [2] x3 + [0] p(le#) = [2] x1 + [1] x2 + [1] p(min#) = [0] p(replace#) = [1] x2 + [0] p(sort#) = [1] x1 + [1] p(c_1) = [1] p(c_2) = [0] p(c_3) = [1] p(c_4) = [1] x1 + [0] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [1] p(c_7) = [1] x1 + [0] p(c_8) = [0] p(c_9) = [1] p(c_10) = [1] p(c_11) = [1] x1 + [1] p(c_12) = [1] x1 + [2] p(c_13) = [0] p(c_14) = [1] p(c_15) = [1] x1 + [0] p(c_16) = [1] p(c_17) = [1] x1 + [0] p(c_18) = [1] x1 + [2] x2 + [0] p(c_19) = [0] p(c_20) = [4] p(c_21) = [0] p(c_22) = [0] p(c_23) = [0] p(c_24) = [2] x1 + [0] p(c_25) = [1] p(c_26) = [1] x1 + [0] p(c_27) = [0] p(c_28) = [1] p(c_29) = [2] p(c_30) = [1] x1 + [2] p(c_31) = [4] x1 + [2] x2 + [4] p(c_32) = [1] p(c_33) = [2] p(c_34) = [1] x2 + [1] p(c_35) = [1] p(c_36) = [1] x3 + [4] x4 + [1] p(c_37) = [2] Following rules are strictly oriented: REPLACE#(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [5] > [1] z0 + [1] z3 + [4] = c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) Following rules are (at-least) weakly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [1] >= [0] = c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [1] >= [1] = c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z0 + [1] z3 + [1] = c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) = [0] >= [3] = c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) SORT#(cons(z0,z1)) = [1] z1 + [9] >= [0] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [9] >= [1] z1 + [5] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [1] z1 + [9] >= [1] z1 + [9] = SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [9] >= [0] = c_17(MIN#(cons(z0,z1))) eq(0(),0()) = [0] >= [0] = true() eq(0(),s(z0)) = [0] >= [0] = false() eq(s(z0),0()) = [0] >= [0] = false() eq(s(z0),s(z1)) = [0] >= [0] = eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) = [4] >= [4] = min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) = [4] >= [4] = min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z0 + [1] z3 + [4] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z3 + [4] = cons(z1,z3) le(0(),z0) = [0] >= [0] = true() le(s(z0),0()) = [0] >= [0] = false() le(s(z0),s(z1)) = [0] >= [0] = le(z0,z1) min(cons(z0,cons(z1,z2))) = [4] >= [4] = if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) = [4] >= [4] = 0() min(cons(s(z0),nil())) = [4] >= [4] = s(z0) replace(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z0 + [1] z3 + [4] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z0 + [4] >= [4] = nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. **** Step 1.b:6.b:1.a:6: WeightGap. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) - Weak DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnAny} + Details: The weightgap principle applies using the following constant growth matrix-interpretation: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(cons) = {2}, uargs(if_min) = {1}, uargs(if_replace) = {1}, uargs(replace) = {1}, uargs(IF_MIN#) = {1}, uargs(IF_REPLACE#) = {1}, uargs(REPLACE#) = {1}, uargs(SORT#) = {1}, uargs(c_5) = {1}, uargs(c_6) = {1}, uargs(c_7) = {1}, uargs(c_12) = {1}, uargs(c_15) = {1}, uargs(c_17) = {1} Following symbols are considered usable: all TcT has computed the following interpretation: p(0) = [0] p(EQ) = [2] x1 + [1] x2 + [1] p(IF_MIN) = [1] x2 + [0] p(IF_REPLACE) = [1] x1 + [1] x2 + [1] p(LE) = [4] x1 + [1] x2 + [0] p(MIN) = [4] p(REPLACE) = [1] x2 + [4] x3 + [2] p(SORT) = [1] x1 + [0] p(c) = [0] p(c1) = [1] p(c10) = [0] p(c11) = [1] x1 + [0] p(c12) = [2] p(c13) = [1] x2 + [1] p(c14) = [2] p(c15) = [2] p(c16) = [4] p(c17) = [0] p(c18) = [1] x1 + [1] x3 + [1] p(c2) = [0] p(c3) = [0] p(c4) = [1] p(c5) = [0] p(c6) = [0] p(c7) = [0] p(c8) = [0] p(c9) = [1] x1 + [1] x2 + [1] p(cons) = [1] x2 + [4] p(eq) = [0] p(false) = [0] p(if_min) = [1] x1 + [0] p(if_replace) = [1] x1 + [1] x2 + [1] x4 + [0] p(le) = [0] p(min) = [0] p(nil) = [1] p(replace) = [1] x1 + [1] x3 + [0] p(s) = [0] p(sort) = [0] p(true) = [0] p(EQ#) = [1] x1 + [2] x2 + [1] p(IF_MIN#) = [1] x1 + [1] x2 + [0] p(IF_REPLACE#) = [1] x1 + [1] x2 + [1] x4 + [4] p(LE#) = [4] p(MIN#) = [1] x1 + [1] p(REPLACE#) = [1] x1 + [1] x3 + [4] p(SORT#) = [1] x1 + [1] p(eq#) = [1] x2 + [1] p(if_min#) = [4] x1 + [0] p(if_replace#) = [4] x4 + [1] p(le#) = [4] x1 + [1] x2 + [1] p(min#) = [1] x1 + [4] p(replace#) = [2] x1 + [1] x2 + [4] p(sort#) = [1] x1 + [1] p(c_1) = [1] p(c_2) = [1] p(c_3) = [0] p(c_4) = [1] p(c_5) = [1] x1 + [0] p(c_6) = [1] x1 + [1] p(c_7) = [1] x1 + [4] p(c_8) = [0] p(c_9) = [2] p(c_10) = [1] p(c_11) = [2] x1 + [0] p(c_12) = [1] x1 + [0] p(c_13) = [1] p(c_14) = [0] p(c_15) = [1] x1 + [0] p(c_16) = [1] p(c_17) = [1] x1 + [0] p(c_18) = [4] x1 + [1] x2 + [2] p(c_19) = [0] p(c_20) = [0] p(c_21) = [0] p(c_22) = [4] p(c_23) = [1] x1 + [1] p(c_24) = [1] x1 + [4] p(c_25) = [1] x1 + [0] p(c_26) = [1] p(c_27) = [1] p(c_28) = [0] p(c_29) = [0] p(c_30) = [4] x1 + [0] p(c_31) = [4] x2 + [0] p(c_32) = [0] p(c_33) = [2] p(c_34) = [4] x1 + [4] x2 + [4] p(c_35) = [4] p(c_36) = [2] x1 + [2] x4 + [0] p(c_37) = [1] Following rules are strictly oriented: MIN#(cons(z0,cons(z1,z2))) = [1] z2 + [9] > [1] z2 + [8] = c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) Following rules are (at-least) weakly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [1] z2 + [8] >= [1] z2 + [5] = c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [1] z2 + [8] >= [1] z2 + [6] = c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [8] >= [1] z0 + [1] z3 + [8] = c_7(REPLACE#(z0,z1,z3)) REPLACE#(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [8] >= [1] z0 + [1] z3 + [8] = c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) = [1] z1 + [5] >= [1] z1 + [5] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [5] >= [1] z1 + [4] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [1] z1 + [5] >= [1] z1 + [1] = SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) = [1] z1 + [5] >= [1] z1 + [5] = c_17(MIN#(cons(z0,z1))) eq(0(),0()) = [0] >= [0] = true() eq(0(),s(z0)) = [0] >= [0] = false() eq(s(z0),0()) = [0] >= [0] = false() eq(s(z0),s(z1)) = [0] >= [0] = eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) = [0] >= [0] = min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z0 + [1] z3 + [4] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z3 + [4] = cons(z1,z3) le(0(),z0) = [0] >= [0] = true() le(s(z0),0()) = [0] >= [0] = false() le(s(z0),s(z1)) = [0] >= [0] = le(z0,z1) min(cons(z0,cons(z1,z2))) = [0] >= [0] = if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) = [0] >= [0] = 0() min(cons(s(z0),nil())) = [0] >= [0] = s(z0) replace(z0,z1,cons(z2,z3)) = [1] z0 + [1] z3 + [4] >= [1] z0 + [1] z3 + [4] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z0 + [1] >= [1] = nil() Further, it can be verified that all rules not oriented are covered by the weightgap condition. **** Step 1.b:6.b:1.a:7: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> c_5(MIN#(cons(z1,z2))) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> c_6(MIN#(cons(z0,z2))) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> c_7(REPLACE#(z0,z1,z3)) MIN#(cons(z0,cons(z1,z2))) -> c_12(IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2)))) REPLACE#(z0,z1,cons(z2,z3)) -> c_15(IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3))) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) SORT#(cons(z0,z1)) -> c_17(MIN#(cons(z0,z1))) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/1,c_13/0,c_14/0,c_15/1,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). **** Step 1.b:6.b:1.b:1: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) - Weak DPs: IF_MIN#(false(),cons(z0,cons(z1,z2))) -> MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> REPLACE#(z0,z1,z3) MIN#(cons(z0,cons(z1,z2))) -> IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) -> LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) -> EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) -> IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_4) = {1}, uargs(c_11) = {1} Following symbols are considered usable: {if_replace,replace,EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq#,if_min#,if_replace#,le#,min# ,replace#,sort#} TcT has computed the following interpretation: p(0) = [1] p(EQ) = [0] p(IF_MIN) = [1] x1 + [0] p(IF_REPLACE) = [1] x3 + [2] p(LE) = [1] x1 + [1] x2 + [0] p(MIN) = [0] p(REPLACE) = [0] p(SORT) = [4] x1 + [0] p(c) = [1] p(c1) = [4] p(c10) = [0] p(c11) = [4] p(c12) = [0] p(c13) = [1] x2 + [0] p(c14) = [1] p(c15) = [1] p(c16) = [2] p(c17) = [1] x1 + [0] p(c18) = [0] p(c2) = [0] p(c3) = [4] p(c4) = [0] p(c5) = [0] p(c6) = [4] p(c7) = [4] p(c8) = [2] p(c9) = [1] x1 + [1] p(cons) = [1] x1 + [1] x2 + [1] p(eq) = [4] x2 + [4] p(false) = [2] p(if_min) = [2] x1 + [5] p(if_replace) = [1] x3 + [1] x4 + [1] p(le) = [1] x1 + [4] x2 + [5] p(min) = [0] p(nil) = [6] p(replace) = [1] x2 + [1] x3 + [1] p(s) = [1] x1 + [1] p(sort) = [2] x1 + [1] p(true) = [2] p(EQ#) = [6] x2 + [2] p(IF_MIN#) = [1] x2 + [6] p(IF_REPLACE#) = [4] x3 + [7] x4 + [0] p(LE#) = [4] p(MIN#) = [1] x1 + [6] p(REPLACE#) = [4] x2 + [7] x3 + [7] p(SORT#) = [7] x1 + [0] p(eq#) = [4] x2 + [1] p(if_min#) = [2] x2 + [1] p(if_replace#) = [1] x3 + [1] x4 + [0] p(le#) = [1] p(min#) = [1] p(replace#) = [2] x2 + [1] x3 + [0] p(sort#) = [1] p(c_1) = [2] p(c_2) = [0] p(c_3) = [2] p(c_4) = [1] x1 + [4] p(c_5) = [4] p(c_6) = [1] p(c_7) = [0] p(c_8) = [2] p(c_9) = [1] p(c_10) = [1] p(c_11) = [1] x1 + [0] p(c_12) = [4] x1 + [4] p(c_13) = [0] p(c_14) = [1] p(c_15) = [0] p(c_16) = [0] p(c_17) = [2] p(c_18) = [1] x1 + [1] x3 + [4] p(c_19) = [0] p(c_20) = [0] p(c_21) = [1] p(c_22) = [0] p(c_23) = [1] x1 + [1] p(c_24) = [1] x1 + [2] p(c_25) = [0] p(c_26) = [1] x1 + [4] p(c_27) = [0] p(c_28) = [0] p(c_29) = [0] p(c_30) = [1] x1 + [0] p(c_31) = [4] x2 + [1] p(c_32) = [0] p(c_33) = [1] p(c_34) = [2] x1 + [4] x2 + [1] p(c_35) = [2] p(c_36) = [1] x1 + [4] x2 + [2] x3 + [4] x4 + [1] p(c_37) = [0] Following rules are strictly oriented: EQ#(s(z0),s(z1)) = [6] z1 + [8] > [6] z1 + [6] = c_4(EQ#(z0,z1)) Following rules are (at-least) weakly oriented: IF_MIN#(false(),cons(z0,cons(z1,z2))) = [1] z0 + [1] z1 + [1] z2 + [8] >= [1] z1 + [1] z2 + [7] = MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [1] z0 + [1] z1 + [1] z2 + [8] >= [1] z0 + [1] z2 + [7] = MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [4] z1 + [7] z2 + [7] z3 + [7] >= [4] z1 + [7] z3 + [7] = REPLACE#(z0,z1,z3) LE#(s(z0),s(z1)) = [4] >= [4] = c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) = [1] z0 + [1] z1 + [1] z2 + [8] >= [1] z0 + [1] z1 + [1] z2 + [8] = IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) = [1] z0 + [1] z1 + [1] z2 + [8] >= [4] = LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) = [4] z1 + [7] z2 + [7] z3 + [14] >= [6] z2 + [2] = EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) = [4] z1 + [7] z2 + [7] z3 + [14] >= [4] z1 + [7] z2 + [7] z3 + [7] = IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) = [7] z0 + [7] z1 + [7] >= [1] z0 + [1] z1 + [7] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [7] z0 + [7] z1 + [7] >= [4] z0 + [7] z1 + [7] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [7] z0 + [7] z1 + [7] >= [7] z0 + [7] z1 + [7] = SORT#(replace(min(cons(z0,z1)),z0,z1)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [2] >= [1] z1 + [1] z2 + [1] z3 + [2] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [2] >= [1] z1 + [1] z3 + [1] = cons(z1,z3) replace(z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [2] >= [1] z1 + [1] z2 + [1] z3 + [2] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z1 + [7] >= [6] = nil() **** Step 1.b:6.b:1.b:2: NaturalMI. WORST_CASE(?,O(n^1)) + Considered Problem: - Strict DPs: LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) - Weak DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> REPLACE#(z0,z1,z3) MIN#(cons(z0,cons(z1,z2))) -> IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) -> LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) -> EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) -> IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just any strict-rules} + Details: We apply a matrix interpretation of kind constructor based matrix interpretation: The following argument positions are considered usable: uargs(c_4) = {1}, uargs(c_11) = {1} Following symbols are considered usable: {if_min,if_replace,le,min,replace,EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq#,if_min#,if_replace# ,le#,min#,replace#,sort#} TcT has computed the following interpretation: p(0) = [2] p(EQ) = [0] p(IF_MIN) = [4] x2 + [0] p(IF_REPLACE) = [4] x3 + [4] x4 + [0] p(LE) = [2] p(MIN) = [1] x1 + [0] p(REPLACE) = [2] x1 + [2] x2 + [1] x3 + [1] p(SORT) = [2] x1 + [1] p(c) = [0] p(c1) = [0] p(c10) = [0] p(c11) = [0] p(c12) = [2] p(c13) = [2] p(c14) = [1] p(c15) = [0] p(c16) = [4] p(c17) = [4] p(c18) = [1] x2 + [1] p(c2) = [2] p(c3) = [1] x1 + [0] p(c4) = [0] p(c5) = [4] p(c6) = [1] x1 + [2] p(c7) = [0] p(c8) = [1] p(c9) = [0] p(cons) = [1] x1 + [1] x2 + [0] p(eq) = [1] x2 + [0] p(false) = [1] p(if_min) = [1] x1 + [2] x2 + [1] p(if_replace) = [1] x3 + [1] x4 + [0] p(le) = [1] p(min) = [2] x1 + [2] p(nil) = [3] p(replace) = [1] x2 + [1] x3 + [0] p(s) = [1] x1 + [2] p(sort) = [1] p(true) = [1] p(EQ#) = [0] p(IF_MIN#) = [4] x2 + [1] p(IF_REPLACE#) = [2] x2 + [1] p(LE#) = [4] x1 + [0] p(MIN#) = [4] x1 + [1] p(REPLACE#) = [2] x1 + [1] p(SORT#) = [4] x1 + [5] p(eq#) = [4] x2 + [1] p(if_min#) = [2] x1 + [0] p(if_replace#) = [2] x1 + [0] p(le#) = [4] x1 + [1] x2 + [1] p(min#) = [1] x1 + [1] p(replace#) = [1] x1 + [4] x2 + [1] x3 + [1] p(sort#) = [1] p(c_1) = [1] p(c_2) = [1] p(c_3) = [0] p(c_4) = [1] x1 + [0] p(c_5) = [0] p(c_6) = [0] p(c_7) = [1] p(c_8) = [2] p(c_9) = [0] p(c_10) = [4] p(c_11) = [1] x1 + [4] p(c_12) = [0] p(c_13) = [0] p(c_14) = [1] p(c_15) = [2] x2 + [1] p(c_16) = [0] p(c_17) = [4] x1 + [1] p(c_18) = [1] x1 + [1] x3 + [2] p(c_19) = [1] p(c_20) = [0] p(c_21) = [1] p(c_22) = [0] p(c_23) = [4] x1 + [0] p(c_24) = [0] p(c_25) = [0] p(c_26) = [1] x1 + [0] p(c_27) = [0] p(c_28) = [0] p(c_29) = [2] p(c_30) = [2] p(c_31) = [1] x2 + [1] p(c_32) = [0] p(c_33) = [2] p(c_34) = [1] x1 + [1] x2 + [0] p(c_35) = [1] p(c_36) = [1] x2 + [1] x3 + [0] p(c_37) = [0] Following rules are strictly oriented: LE#(s(z0),s(z1)) = [4] z0 + [8] > [4] z0 + [4] = c_11(LE#(z0,z1)) Following rules are (at-least) weakly oriented: EQ#(s(z0),s(z1)) = [0] >= [0] = c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) = [4] z0 + [4] z1 + [4] z2 + [1] >= [4] z1 + [4] z2 + [1] = MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) = [4] z0 + [4] z1 + [4] z2 + [1] >= [4] z0 + [4] z2 + [1] = MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) = [2] z0 + [1] >= [2] z0 + [1] = REPLACE#(z0,z1,z3) MIN#(cons(z0,cons(z1,z2))) = [4] z0 + [4] z1 + [4] z2 + [1] >= [4] z0 + [4] z1 + [4] z2 + [1] = IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) = [4] z0 + [4] z1 + [4] z2 + [1] >= [4] z0 + [0] = LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) = [2] z0 + [1] >= [0] = EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) = [2] z0 + [1] >= [2] z0 + [1] = IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) = [4] z0 + [4] z1 + [5] >= [4] z0 + [4] z1 + [1] = MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) = [4] z0 + [4] z1 + [5] >= [4] z0 + [4] z1 + [5] = REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) = [4] z0 + [4] z1 + [5] >= [4] z0 + [4] z1 + [5] = SORT#(replace(min(cons(z0,z1)),z0,z1)) if_min(false(),cons(z0,cons(z1,z2))) = [2] z0 + [2] z1 + [2] z2 + [2] >= [2] z1 + [2] z2 + [2] = min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) = [2] z0 + [2] z1 + [2] z2 + [2] >= [2] z0 + [2] z2 + [2] = min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [0] >= [1] z1 + [1] z2 + [1] z3 + [0] = cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [0] >= [1] z1 + [1] z3 + [0] = cons(z1,z3) le(0(),z0) = [1] >= [1] = true() le(s(z0),0()) = [1] >= [1] = false() le(s(z0),s(z1)) = [1] >= [1] = le(z0,z1) min(cons(z0,cons(z1,z2))) = [2] z0 + [2] z1 + [2] z2 + [2] >= [2] z0 + [2] z1 + [2] z2 + [2] = if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) = [12] >= [2] = 0() min(cons(s(z0),nil())) = [2] z0 + [12] >= [1] z0 + [2] = s(z0) replace(z0,z1,cons(z2,z3)) = [1] z1 + [1] z2 + [1] z3 + [0] >= [1] z1 + [1] z2 + [1] z3 + [0] = if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) = [1] z1 + [3] >= [3] = nil() **** Step 1.b:6.b:1.b:3: EmptyProcessor. WORST_CASE(?,O(1)) + Considered Problem: - Weak DPs: EQ#(s(z0),s(z1)) -> c_4(EQ#(z0,z1)) IF_MIN#(false(),cons(z0,cons(z1,z2))) -> MIN#(cons(z1,z2)) IF_MIN#(true(),cons(z0,cons(z1,z2))) -> MIN#(cons(z0,z2)) IF_REPLACE#(false(),z0,z1,cons(z2,z3)) -> REPLACE#(z0,z1,z3) LE#(s(z0),s(z1)) -> c_11(LE#(z0,z1)) MIN#(cons(z0,cons(z1,z2))) -> IF_MIN#(le(z0,z1),cons(z0,cons(z1,z2))) MIN#(cons(z0,cons(z1,z2))) -> LE#(z0,z1) REPLACE#(z0,z1,cons(z2,z3)) -> EQ#(z0,z2) REPLACE#(z0,z1,cons(z2,z3)) -> IF_REPLACE#(eq(z0,z2),z0,z1,cons(z2,z3)) SORT#(cons(z0,z1)) -> MIN#(cons(z0,z1)) SORT#(cons(z0,z1)) -> REPLACE#(min(cons(z0,z1)),z0,z1) SORT#(cons(z0,z1)) -> SORT#(replace(min(cons(z0,z1)),z0,z1)) - Weak TRS: eq(0(),0()) -> true() eq(0(),s(z0)) -> false() eq(s(z0),0()) -> false() eq(s(z0),s(z1)) -> eq(z0,z1) if_min(false(),cons(z0,cons(z1,z2))) -> min(cons(z1,z2)) if_min(true(),cons(z0,cons(z1,z2))) -> min(cons(z0,z2)) if_replace(false(),z0,z1,cons(z2,z3)) -> cons(z2,replace(z0,z1,z3)) if_replace(true(),z0,z1,cons(z2,z3)) -> cons(z1,z3) le(0(),z0) -> true() le(s(z0),0()) -> false() le(s(z0),s(z1)) -> le(z0,z1) min(cons(z0,cons(z1,z2))) -> if_min(le(z0,z1),cons(z0,cons(z1,z2))) min(cons(0(),nil())) -> 0() min(cons(s(z0),nil())) -> s(z0) replace(z0,z1,cons(z2,z3)) -> if_replace(eq(z0,z2),z0,z1,cons(z2,z3)) replace(z0,z1,nil()) -> nil() - Signature: {EQ/2,IF_MIN/2,IF_REPLACE/4,LE/2,MIN/1,REPLACE/3,SORT/1,eq/2,if_min/2,if_replace/4,le/2,min/1,replace/3 ,sort/1,EQ#/2,IF_MIN#/2,IF_REPLACE#/4,LE#/2,MIN#/1,REPLACE#/3,SORT#/1,eq#/2,if_min#/2,if_replace#/4,le#/2 ,min#/1,replace#/3,sort#/1} / {0/0,c/0,c1/0,c10/1,c11/1,c12/0,c13/2,c14/0,c15/1,c16/0,c17/1,c18/3,c2/0,c3/1 ,c4/0,c5/0,c6/1,c7/0,c8/0,c9/2,cons/2,false/0,nil/0,s/1,true/0,c_1/0,c_2/0,c_3/0,c_4/1,c_5/1,c_6/1,c_7/1 ,c_8/0,c_9/0,c_10/0,c_11/1,c_12/2,c_13/0,c_14/0,c_15/2,c_16/0,c_17/1,c_18/3,c_19/0,c_20/0,c_21/0,c_22/0 ,c_23/1,c_24/1,c_25/1,c_26/1,c_27/0,c_28/0,c_29/0,c_30/1,c_31/2,c_32/0,c_33/0,c_34/2,c_35/0,c_36/4,c_37/0} - Obligation: innermost runtime complexity wrt. defined symbols {EQ#,IF_MIN#,IF_REPLACE#,LE#,MIN#,REPLACE#,SORT#,eq# ,if_min#,if_replace#,le#,min#,replace#,sort#} and constructors {0,c,c1,c10,c11,c12,c13,c14,c15,c16,c17,c18 ,c2,c3,c4,c5,c6,c7,c8,c9,cons,false,nil,s,true} + Applied Processor: EmptyProcessor + Details: The problem is already closed. The intended complexity is O(1). WORST_CASE(Omega(n^1),O(n^3))