*** 1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Weak DP Rules: Weak TRS Rules: Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0} Obligation: Innermost basic terms: {append,f_1,f_2,f_3,lt,qsort,split}/{0,add,false,nil,pair,s,true} Applied Processor: DependencyPairs {dpKind_ = DT} Proof: We add the following dependency tuples: Strict DPs append#(add(N,X),Y) -> c_1(append#(X,Y)) append#(nil(),Y) -> c_2() f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) qsort#(nil()) -> c_11() split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) split#(N,nil()) -> c_13() Weak DPs and mark the set of starting terms. *** 1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) append#(nil(),Y) -> c_2() f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) qsort#(nil()) -> c_11() split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) split#(N,nil()) -> c_13() Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: PredecessorEstimation {onSelection = all simple predecessor estimation selector} Proof: We estimate the number of application of {2,4,5,7,8,11,13} by application of Pre({2,4,5,7,8,11,13}) = {1,3,6,9,10,12}. Here rules are labelled as follows: 1: append#(add(N,X),Y) -> c_1(append#(X,Y)) 2: append#(nil(),Y) -> c_2() 3: f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z) ,lt#(N,M)) 4: f_2#(false(),N,M,Y,X,Z) -> c_4() 5: f_2#(true(),N,M,Y,X,Z) -> c_5() 6: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y) ,add(X,qsort(Z))) ,qsort#(Y) ,qsort#(Z)) 7: lt#(0(),s(X)) -> c_7() 8: lt#(s(X),0()) -> c_8() 9: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) 10: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X) ,split#(N,X)) 11: qsort#(nil()) -> c_11() 12: split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y) ,split#(N,Y)) 13: split#(N,nil()) -> c_13() *** 1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: append#(nil(),Y) -> c_2() f_2#(false(),N,M,Y,X,Z) -> c_4() f_2#(true(),N,M,Y,X,Z) -> c_5() lt#(0(),s(X)) -> c_7() lt#(s(X),0()) -> c_8() qsort#(nil()) -> c_11() split#(N,nil()) -> c_13() Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(nil(),Y) -> c_2():7 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:S:f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) -->_2 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 -->_2 lt#(s(X),0()) -> c_8():11 -->_2 lt#(0(),s(X)) -> c_7():10 -->_1 f_2#(true(),N,M,Y,X,Z) -> c_5():9 -->_1 f_2#(false(),N,M,Y,X,Z) -> c_4():8 3:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_3 qsort#(nil()) -> c_11():12 -->_2 qsort#(nil()) -> c_11():12 -->_1 append#(nil(),Y) -> c_2():7 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),0()) -> c_8():11 -->_1 lt#(0(),s(X)) -> c_7():10 -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 5:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_2 split#(N,nil()) -> c_13():13 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 6:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,nil()) -> c_13():13 -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)):2 7:W:append#(nil(),Y) -> c_2() 8:W:f_2#(false(),N,M,Y,X,Z) -> c_4() 9:W:f_2#(true(),N,M,Y,X,Z) -> c_5() 10:W:lt#(0(),s(X)) -> c_7() 11:W:lt#(s(X),0()) -> c_8() 12:W:qsort#(nil()) -> c_11() 13:W:split#(N,nil()) -> c_13() The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 12: qsort#(nil()) -> c_11() 13: split#(N,nil()) -> c_13() 8: f_2#(false(),N,M,Y,X,Z) -> c_4() 9: f_2#(true(),N,M,Y,X,Z) -> c_5() 10: lt#(0(),s(X)) -> c_7() 11: lt#(s(X),0()) -> c_8() 7: append#(nil(),Y) -> c_2() *** 1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/2,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:S:f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)) -->_2 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 3:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 5:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 6:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(f_2#(lt(N,M),N,M,Y,X,Z),lt#(N,M)):2 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) *** 1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} Proof: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Problem (S) Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} *** 1.1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:W:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 3:W:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 4:W:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):4 5:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 6:W:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):2 -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y) ,split#(N,Y)) 2: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) 4: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) *** 1.1.1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 3:W:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):5 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 5:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):3 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) *** 1.1.1.1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: append#(add(N,X),Y) -> c_1(append#(X,Y)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_1) = {1}, uargs(c_6) = {1,2,3}, uargs(c_10) = {1} Following symbols are considered usable: {append,f_1,f_2,f_3,qsort,split,append#,f_1#,f_2#,f_3#,lt#,qsort#,split#} TcT has computed the following interpretation: p(0) = 0 p(add) = 1 + x2 p(append) = x1 + x2 p(f_1) = 1 + x1 p(f_2) = 1 + x5 + x6 p(f_3) = 1 + 2*x1 p(false) = 0 p(lt) = 0 p(nil) = 0 p(pair) = x1 + x2 p(qsort) = 2*x1 p(s) = x1 p(split) = x2 p(true) = 1 p(append#) = x1 p(f_1#) = 2*x1 + x1^2 + x2^2 + x4 + x4^2 p(f_2#) = 2*x1*x2 + 2*x1^2 + x2*x5 + 2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5 + 2*x6^2 p(f_3#) = 2*x1 + x1^2 p(lt#) = 2 + x1 + x1*x2 + 2*x1^2 p(qsort#) = x1^2 p(split#) = 2*x1^2 + x2^2 p(c_1) = x1 p(c_2) = 0 p(c_3) = 0 p(c_4) = 1 p(c_5) = 1 p(c_6) = x1 + x2 + x3 p(c_7) = 0 p(c_8) = 0 p(c_9) = 1 p(c_10) = x1 p(c_11) = 0 p(c_12) = x1 + x2 p(c_13) = 0 Following rules are strictly oriented: append#(add(N,X),Y) = 1 + X > X = c_1(append#(X,Y)) Following rules are (at-least) weakly oriented: f_3#(pair(Y,Z),N,X) = 2*Y + 2*Y*Z + Y^2 + 2*Z + Z^2 >= 2*Y + Y^2 + Z^2 = c_6(append#(qsort(Y) ,add(X,qsort(Z))) ,qsort#(Y) ,qsort#(Z)) qsort#(add(N,X)) = 1 + 2*X + X^2 >= 2*X + X^2 = c_10(f_3#(split(N,X),N,X)) append(add(N,X),Y) = 1 + X + Y >= 1 + X + Y = add(N,append(X,Y)) append(nil(),Y) = Y >= Y = Y f_1(pair(X,Z),N,M,Y) = 1 + X + Z >= 1 + X + Z = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) = 1 + 2*Y + 2*Z >= 1 + 2*Y + 2*Z = append(qsort(Y),add(X,qsort(Z))) qsort(add(N,X)) = 2 + 2*X >= 1 + 2*X = f_3(split(N,X),N,X) qsort(nil()) = 0 >= 0 = nil() split(N,add(M,Y)) = 1 + Y >= 1 + Y = f_1(split(N,Y),N,M,Y) split(N,nil()) = 0 >= 0 = pair(nil(),nil()) *** 1.1.1.1.1.1.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.1.1.1.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:W:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 2:W:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)):3 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)):3 -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):1 3:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):2 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y) ,add(X,qsort(Z))) ,qsort#(Y) ,qsort#(Z)) 3: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X)) 1: append#(add(N,X),Y) -> c_1(append#(X,Y)) *** 1.1.1.1.1.1.1.1.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/1,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1). *** 1.1.1.1.1.2 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: append#(add(N,X),Y) -> c_1(append#(X,Y)) Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 2:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):6 -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 3:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 4:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):2 5:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):1 6:W:append#(add(N,X),Y) -> c_1(append#(X,Y)) -->_1 append#(add(N,X),Y) -> c_1(append#(X,Y)):6 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 6: append#(add(N,X),Y) -> c_1(append#(X,Y)) *** 1.1.1.1.1.2.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/3,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 2:S:f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)) -->_3 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 3:S:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 4:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(append#(qsort(Y),add(X,qsort(Z))),qsort#(Y),qsort#(Z)):2 5:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) *** 1.1.1.1.1.2.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: append(add(N,X),Y) -> add(N,append(X,Y)) append(nil(),Y) -> Y f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) f_3(pair(Y,Z),N,X) -> append(qsort(Y),add(X,qsort(Z))) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) qsort(add(N,X)) -> f_3(split(N,X),N,X) qsort(nil()) -> nil() split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: UsableRules Proof: We replace rewrite rules by usable rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) *** 1.1.1.1.1.2.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd} Proof: We analyse the complexity of following sub-problems (R) and (S). Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component. Problem (R) Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Problem (S) Strict DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} *** 1.1.1.1.1.2.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 3: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.2.1.1.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_3) = {1}, uargs(c_6) = {1,2}, uargs(c_9) = {1}, uargs(c_10) = {1,2}, uargs(c_12) = {1,2} Following symbols are considered usable: {f_1,f_2,split,append#,f_1#,f_2#,f_3#,lt#,qsort#,split#} TcT has computed the following interpretation: p(0) = 1 p(add) = 1 + x1 + x2 p(append) = 0 p(f_1) = 1 + x1 + x3 p(f_2) = 1 + x3 + x5 + x6 p(f_3) = 2*x1 + x1*x3 + x2 + 2*x2*x3 + x2^2 p(false) = 0 p(lt) = 0 p(nil) = 0 p(pair) = x1 + x2 p(qsort) = x1^2 p(s) = 1 + x1 p(split) = x2 p(true) = 0 p(append#) = x1 p(f_1#) = 2*x3 p(f_2#) = x1 + x1^2 + 2*x3^2 + x4*x5 + 2*x5 + x5*x6 + 2*x6^2 p(f_3#) = 1 + 2*x1 + 2*x1^2 + 2*x3 p(lt#) = x2 p(qsort#) = 2*x1 + 2*x1^2 p(split#) = 2*x2 p(c_1) = 1 p(c_2) = 1 p(c_3) = x1 p(c_4) = 1 p(c_5) = 1 p(c_6) = x1 + x2 p(c_7) = 0 p(c_8) = 1 p(c_9) = x1 p(c_10) = 1 + x1 + x2 p(c_11) = 0 p(c_12) = x1 + x2 p(c_13) = 1 Following rules are strictly oriented: lt#(s(X),s(Y)) = 1 + Y > Y = c_9(lt#(X,Y)) Following rules are (at-least) weakly oriented: f_1#(pair(X,Z),N,M,Y) = 2*M >= M = c_3(lt#(N,M)) f_3#(pair(Y,Z),N,X) = 1 + 2*X + 2*Y + 4*Y*Z + 2*Y^2 + 2*Z + 2*Z^2 >= 2*Y + 2*Y^2 + 2*Z + 2*Z^2 = c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) = 4 + 6*N + 4*N*X + 2*N^2 + 6*X + 2*X^2 >= 2 + 6*X + 2*X^2 = c_10(f_3#(split(N,X),N,X) ,split#(N,X)) split#(N,add(M,Y)) = 2 + 2*M + 2*Y >= 2*M + 2*Y = c_12(f_1#(split(N,Y),N,M,Y) ,split#(N,Y)) f_1(pair(X,Z),N,M,Y) = 1 + M + X + Z >= 1 + M + X + Z = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = 1 + M + X + Z >= 1 + M + X + Z = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = 1 + M + X + Z >= 1 + M + X + Z = pair(X,add(M,Z)) split(N,add(M,Y)) = 1 + M + Y >= 1 + M + Y = f_1(split(N,Y),N,M,Y) split(N,nil()) = 0 >= 0 = pair(nil(),nil()) *** 1.1.1.1.1.2.1.1.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.1.1.1.1.2 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 2:W:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 3:W:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):3 4:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):2 5:W:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 3: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) *** 1.1.1.1.1.2.1.1.1.1.2.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) 2:W:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):4 4:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):2 5:W:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):5 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):1 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: f_1#(pair(X,Z),N,M,Y) -> c_3() *** 1.1.1.1.1.2.1.1.1.1.2.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3() Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: f_1#(pair(X,Z),N,M,Y) -> c_3() The strictly oriented rules are moved into the weak component. *** 1.1.1.1.1.2.1.1.1.1.2.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3() Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_6) = {1,2}, uargs(c_10) = {1,2}, uargs(c_12) = {1,2} Following symbols are considered usable: {f_1,f_2,split,append#,f_1#,f_2#,f_3#,lt#,qsort#,split#} TcT has computed the following interpretation: p(0) = 0 p(add) = 1 + x2 p(append) = 2 + 2*x1 + 2*x1*x2 p(f_1) = 1 + x1 p(f_2) = 1 + x5 + x6 p(f_3) = 2*x2 + x2^2 + 2*x3 p(false) = 0 p(lt) = 0 p(nil) = 0 p(pair) = x1 + x2 p(qsort) = 1 p(s) = 0 p(split) = x2 p(true) = 0 p(append#) = 2*x1*x2 + x1^2 + x2^2 p(f_1#) = 1 p(f_2#) = x1 + x1*x2 + x2 + 2*x2*x5 + x5*x6 + x6^2 p(f_3#) = x1 + 2*x1^2 + 2*x3 p(lt#) = x1 + 2*x2 + 2*x2^2 p(qsort#) = x1 + 2*x1^2 p(split#) = x2 p(c_1) = 1 p(c_2) = 0 p(c_3) = 0 p(c_4) = 0 p(c_5) = 0 p(c_6) = x1 + x2 p(c_7) = 0 p(c_8) = 0 p(c_9) = 0 p(c_10) = x1 + x2 p(c_11) = 0 p(c_12) = x1 + x2 p(c_13) = 0 Following rules are strictly oriented: f_1#(pair(X,Z),N,M,Y) = 1 > 0 = c_3() Following rules are (at-least) weakly oriented: f_3#(pair(Y,Z),N,X) = 2*X + Y + 4*Y*Z + 2*Y^2 + Z + 2*Z^2 >= Y + 2*Y^2 + Z + 2*Z^2 = c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) = 3 + 5*X + 2*X^2 >= 4*X + 2*X^2 = c_10(f_3#(split(N,X),N,X) ,split#(N,X)) split#(N,add(M,Y)) = 1 + Y >= 1 + Y = c_12(f_1#(split(N,Y),N,M,Y) ,split#(N,Y)) f_1(pair(X,Z),N,M,Y) = 1 + X + Z >= 1 + X + Z = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(X,add(M,Z)) split(N,add(M,Y)) = 1 + Y >= 1 + Y = f_1(split(N,Y),N,M,Y) split(N,nil()) = 0 >= 0 = pair(nil(),nil()) *** 1.1.1.1.1.2.1.1.1.1.2.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3() f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.1.1.1.1.2.1.1.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3() f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:W:f_1#(pair(X,Z),N,M,Y) -> c_3() 2:W:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):3 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):3 3:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):4 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):2 4:W:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):4 -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3():1 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 2: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) 3: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X) ,split#(N,X)) 4: split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y) ,split#(N,Y)) 1: f_1#(pair(X,Z),N,M,Y) -> c_3() *** 1.1.1.1.1.2.1.1.1.1.2.1.1.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/0,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1). *** 1.1.1.1.1.2.1.1.1.2 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:S:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 2:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):3 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):1 3:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_1 f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)):4 -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):3 4:W:f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):5 5:W:lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) -->_1 lt#(s(X),s(Y)) -> c_9(lt#(X,Y)):5 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 4: f_1#(pair(X,Z),N,M,Y) -> c_3(lt#(N,M)) 5: lt#(s(X),s(Y)) -> c_9(lt#(X,Y)) *** 1.1.1.1.1.2.1.1.1.2.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/2,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: SimplifyRHS Proof: Consider the dependency graph 1:S:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 2:S:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):3 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):1 3:S:split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)) -->_2 split#(N,add(M,Y)) -> c_12(f_1#(split(N,Y),N,M,Y),split#(N,Y)):3 Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified: split#(N,add(M,Y)) -> c_12(split#(N,Y)) *** 1.1.1.1.1.2.1.1.1.2.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}} Proof: We first use the processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly: 1: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) 3: split#(N,add(M,Y)) -> c_12(split#(N,Y)) Consider the set of all dependency pairs 1: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) 2: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X) ,split#(N,X)) 3: split#(N,add(M,Y)) -> c_12(split#(N,Y)) Processor NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}induces the complexity certificateTIME (?,O(n^2)) SPACE(?,?)on application of the dependency pairs {1,3} These cover all (indirect) predecessors of dependency pairs {1,2,3} their number of applications is equally bounded. The dependency pairs are shifted into the weak component. *** 1.1.1.1.1.2.1.1.1.2.1.1.1 Progress [(?,O(n^2))] *** Considered Problem: Strict DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(split#(N,Y)) Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: NaturalPI {shape = Mixed 2, restrict = Restrict, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy} Proof: We apply a polynomial interpretation of kind constructor-based(mixed(2)): The following argument positions are considered usable: uargs(c_6) = {1,2}, uargs(c_10) = {1,2}, uargs(c_12) = {1} Following symbols are considered usable: {f_1,f_2,lt,split,append#,f_1#,f_2#,f_3#,lt#,qsort#,split#} TcT has computed the following interpretation: p(0) = 0 p(add) = 1 + x2 p(append) = 1 + x1 p(f_1) = 1 + x1 p(f_2) = x1^2 + x5 + x6 p(f_3) = 1 + x1 + x1^2 p(false) = 1 p(lt) = 1 p(nil) = 0 p(pair) = x1 + x2 p(qsort) = 1 + 2*x1 + 2*x1^2 p(s) = 0 p(split) = x2 p(true) = 1 p(append#) = 1 + 2*x1^2 p(f_1#) = 2*x2 + x2*x3 + x3^2 + 2*x4 p(f_2#) = x1*x4 + 2*x1*x5 + 2*x1*x6 + 2*x1^2 + 2*x2*x3 + x2*x5 + 2*x2^2 + x4 + x4*x5 p(f_3#) = 1 + 2*x1^2 + x3 p(lt#) = x1 + x2^2 p(qsort#) = 2*x1^2 p(split#) = x2 p(c_1) = 1 p(c_2) = 0 p(c_3) = 1 p(c_4) = 0 p(c_5) = 0 p(c_6) = x1 + x2 p(c_7) = 0 p(c_8) = 0 p(c_9) = 0 p(c_10) = 1 + x1 + x2 p(c_11) = 0 p(c_12) = x1 p(c_13) = 0 Following rules are strictly oriented: f_3#(pair(Y,Z),N,X) = 1 + X + 4*Y*Z + 2*Y^2 + 2*Z^2 > 2*Y^2 + 2*Z^2 = c_6(qsort#(Y),qsort#(Z)) split#(N,add(M,Y)) = 1 + Y > Y = c_12(split#(N,Y)) Following rules are (at-least) weakly oriented: qsort#(add(N,X)) = 2 + 4*X + 2*X^2 >= 2 + 2*X + 2*X^2 = c_10(f_3#(split(N,X),N,X) ,split#(N,X)) f_1(pair(X,Z),N,M,Y) = 1 + X + Z >= 1 + X + Z = f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) = 1 + X + Z >= 1 + X + Z = pair(X,add(M,Z)) lt(0(),s(X)) = 1 >= 1 = true() lt(s(X),0()) = 1 >= 1 = false() lt(s(X),s(Y)) = 1 >= 1 = lt(X,Y) split(N,add(M,Y)) = 1 + Y >= 1 + Y = f_1(split(N,Y),N,M,Y) split(N,nil()) = 0 >= 0 = pair(nil(),nil()) *** 1.1.1.1.1.2.1.1.1.2.1.1.1.1 Progress [(?,O(1))] *** Considered Problem: Strict DP Rules: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) split#(N,add(M,Y)) -> c_12(split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: Assumption Proof: () *** 1.1.1.1.1.2.1.1.1.2.1.1.2 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) split#(N,add(M,Y)) -> c_12(split#(N,Y)) Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: RemoveWeakSuffixes Proof: Consider the dependency graph 1:W:f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) -->_2 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 -->_1 qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)):2 2:W:qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X),split#(N,X)) -->_2 split#(N,add(M,Y)) -> c_12(split#(N,Y)):3 -->_1 f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)):1 3:W:split#(N,add(M,Y)) -> c_12(split#(N,Y)) -->_1 split#(N,add(M,Y)) -> c_12(split#(N,Y)):3 The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed. 1: f_3#(pair(Y,Z),N,X) -> c_6(qsort#(Y),qsort#(Z)) 2: qsort#(add(N,X)) -> c_10(f_3#(split(N,X),N,X) ,split#(N,X)) 3: split#(N,add(M,Y)) -> c_12(split#(N,Y)) *** 1.1.1.1.1.2.1.1.1.2.1.1.2.1 Progress [(O(1),O(1))] *** Considered Problem: Strict DP Rules: Strict TRS Rules: Weak DP Rules: Weak TRS Rules: f_1(pair(X,Z),N,M,Y) -> f_2(lt(N,M),N,M,Y,X,Z) f_2(false(),N,M,Y,X,Z) -> pair(add(M,X),Z) f_2(true(),N,M,Y,X,Z) -> pair(X,add(M,Z)) lt(0(),s(X)) -> true() lt(s(X),0()) -> false() lt(s(X),s(Y)) -> lt(X,Y) split(N,add(M,Y)) -> f_1(split(N,Y),N,M,Y) split(N,nil()) -> pair(nil(),nil()) Signature: {append/2,f_1/4,f_2/6,f_3/3,lt/2,qsort/1,split/2,append#/2,f_1#/4,f_2#/6,f_3#/3,lt#/2,qsort#/1,split#/2} / {0/0,add/2,false/0,nil/0,pair/2,s/1,true/0,c_1/1,c_2/0,c_3/1,c_4/0,c_5/0,c_6/2,c_7/0,c_8/0,c_9/1,c_10/2,c_11/0,c_12/1,c_13/0} Obligation: Innermost basic terms: {append#,f_1#,f_2#,f_3#,lt#,qsort#,split#}/{0,add,false,nil,pair,s,true} Applied Processor: EmptyProcessor Proof: The problem is already closed. The intended complexity is O(1).